diff --git a/.gitignore b/.gitignore index 5bcfd8f60..9825b96ee 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,8 @@ _testmain.go coverage.out +/modules/public/bindata.go + *.db *.log diff --git a/Makefile b/Makefile index de60dff81..26ee70016 100644 --- a/Makefile +++ b/Makefile @@ -37,12 +37,6 @@ clean: go clean -i ./... rm -rf $(BIN) $(DIST) -.PHONY: deps -deps: - @which go-bindata > /dev/null; if [ $$? -ne 0 ]; then \ - go get -u github.com/jteeuwen/go-bindata/...; \ - fi - .PHONY: fmt fmt: go fmt $(PACKAGES) @@ -51,6 +45,13 @@ fmt: vet: go vet $(PACKAGES) +.PHONY: generate +generate: + @which go-bindata > /dev/null; if [ $$? -ne 0 ]; then \ + go get -u github.com/jteeuwen/go-bindata/...; \ + fi + go generate $(PACKAGES) + .PHONY: errcheck errcheck: @which errcheck > /dev/null; if [ $$? -ne 0 ]; then \ @@ -129,6 +130,9 @@ bindata: modules/bindata/bindata.go .IGNORE: modules/bindata/bindata.go modules/bindata/bindata.go: $(BINDATA) + @which go-bindata > /dev/null; if [ $$? -ne 0 ]; then \ + go get -u github.com/jteeuwen/go-bindata/...; \ + fi go-bindata -o=$@ -ignore="\\.go|README.md|TRANSLATORS" -pkg=bindata conf/... go fmt $@ sed -i.bak 's/confLocaleLocale_/confLocaleLocale/' $@ @@ -148,5 +152,5 @@ stylesheets: public/css/index.css public/css/index.css: $(STYLESHEETS) lessc $< $@ -.PHONY: generate -generate: bindata javascripts stylesheets +.PHONY: assets +assets: bindata javascripts stylesheets diff --git a/cmd/web.go b/cmd/web.go index 2a69247f9..c53f518af 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -21,6 +21,7 @@ import ( "code.gitea.io/gitea/modules/bindata" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/public" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/template" "code.gitea.io/gitea/routers" @@ -125,9 +126,9 @@ func newMacaron() *macaron.Macaron { if setting.Protocol == setting.FCGI { m.SetURLPrefix(setting.AppSubURL) } - m.Use(macaron.Static( - path.Join(setting.StaticRootPath, "public"), - macaron.StaticOptions{ + m.Use(public.Static( + &public.Options{ + Directory: path.Join(setting.StaticRootPath, "public"), SkipLogging: setting.DisableRouterLog, }, )) diff --git a/modules/public/dynamic.go b/modules/public/dynamic.go new file mode 100644 index 000000000..c196d67ba --- /dev/null +++ b/modules/public/dynamic.go @@ -0,0 +1,21 @@ +// +build !bindata + +// Copyright 2016 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package public + +import ( + "gopkg.in/macaron.v1" +) + +// Static implements the macaron static handler for serving assets. +func Static(opts *Options) macaron.Handler { + return macaron.Static( + opts.Directory, + macaron.StaticOptions{ + SkipLogging: opts.SkipLogging, + }, + ) +} diff --git a/modules/public/public.go b/modules/public/public.go new file mode 100644 index 000000000..261ed8887 --- /dev/null +++ b/modules/public/public.go @@ -0,0 +1,14 @@ +// Copyright 2016 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package public + +//go:generate go-bindata -tags "bindata" -ignore "\\.go|\\.less" -pkg "public" -o "bindata.go" ../../public/... +//go:generate go fmt bindata.go + +// Options represents the available options to configure the macaron handler. +type Options struct { + Directory string + SkipLogging bool +} diff --git a/modules/public/static.go b/modules/public/static.go new file mode 100644 index 000000000..8184bc214 --- /dev/null +++ b/modules/public/static.go @@ -0,0 +1,29 @@ +// +build bindata + +// Copyright 2016 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package public + +import ( + "github.com/go-macaron/bindata" + "gopkg.in/macaron.v1" +) + +// Static implements the macaron static handler for serving assets. +func Static(opts *Options) macaron.Handler { + return macaron.Static( + opts.Directory, + macaron.StaticOptions{ + SkipLogging: opts.SkipLogging, + FileSystem: bindata.Static(bindata.Options{ + Asset: Asset, + AssetDir: AssetDir, + AssetInfo: AssetInfo, + AssetNames: AssetNames, + Prefix: "../../public", + }), + }, + ) +} diff --git a/public/config.codekit b/public/config.codekit deleted file mode 100644 index 697e245e8..000000000 --- a/public/config.codekit +++ /dev/null @@ -1,1261 +0,0 @@ -{ -"CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit", -"creatorBuild": "19115", -"files": { - "\/css\/github.min.css": { - "fileType": 16, - "ignore": 1, - "ignoreWasSetByUser": 1, - "inputAbbreviatedPath": "\/css\/github.min.css", - "outputAbbreviatedPath": "No Output Path", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0 - }, - "\/css\/index.css": { - "fileType": 16, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/css\/index.css", - "outputAbbreviatedPath": "No Output Path", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0 - }, - "\/css\/semantic-2.2.1.min.css": { - "fileType": 16, - "ignore": 0, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/css\/semantic-2.2.1.min.css", - "outputAbbreviatedPath": "No Output Path", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0 - }, - "\/css\/themes\/default\/assets\/images\/flags.png": { - "fileType": 32768, - "ignore": 0, - "ignoreWasSetByUser": 0, - "initialSize": 28123, - "inputAbbreviatedPath": "\/css\/themes\/default\/assets\/images\/flags.png", - "outputAbbreviatedPath": "\/css\/themes\/default\/assets\/images\/flags.png", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "processed": 0 - }, - "\/img\/404.png": { - "fileType": 32768, - "ignore": 0, - "ignoreWasSetByUser": 0, - "initialSize": 9754, - "inputAbbreviatedPath": "\/img\/404.png", - "outputAbbreviatedPath": "\/img\/404.png", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "processed": 1 - }, - "\/img\/500.png": { - "fileType": 32768, - "ignore": 0, - "ignoreWasSetByUser": 0, - "initialSize": 12066, - "inputAbbreviatedPath": "\/img\/500.png", - "outputAbbreviatedPath": "\/img\/500.png", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "processed": 1 - }, - "\/img\/avatar_default.png": { - "fileType": 32768, - "ignore": 0, - "ignoreWasSetByUser": 0, - "initialSize": 4048, - "inputAbbreviatedPath": "\/img\/avatar_default.png", - "outputAbbreviatedPath": "\/img\/avatar_default.png", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "processed": 0 - }, - "\/img\/checkmark.png": { - "fileType": 32768, - "ignore": 0, - "ignoreWasSetByUser": 0, - "initialSize": 169, - "inputAbbreviatedPath": "\/img\/checkmark.png", - "outputAbbreviatedPath": "\/img\/checkmark.png", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "processed": 1 - }, - "\/img\/favicon.png": { - "fileType": 32768, - "ignore": 0, - "ignoreWasSetByUser": 0, - "initialSize": 10305, - "inputAbbreviatedPath": "\/img\/favicon.png", - "outputAbbreviatedPath": "\/img\/favicon.png", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "processed": 1 - }, - "\/img\/gogs-large-resize.png": { - "fileType": 32768, - "ignore": 0, - "ignoreWasSetByUser": 0, - "initialSize": 78864, - "inputAbbreviatedPath": "\/img\/gogs-large-resize.png", - "outputAbbreviatedPath": "\/img\/gogs-large-resize.png", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "processed": 1 - }, - "\/img\/gogs-lg.png": { - "fileType": 32768, - "ignore": 0, - "ignoreWasSetByUser": 0, - "initialSize": 97903, - "inputAbbreviatedPath": "\/img\/gogs-lg.png", - "outputAbbreviatedPath": "\/img\/gogs-lg.png", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "processed": 1 - }, - "\/img\/slack.png": { - "fileType": 32768, - "ignore": 0, - "ignoreWasSetByUser": 0, - "initialSize": 1633, - "inputAbbreviatedPath": "\/img\/slack.png", - "outputAbbreviatedPath": "\/img\/slack.png", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "processed": 1 - }, - "\/js\/index.js": { - "fileType": 64, - "ignore": 1, - "ignoreWasSetByUser": 1, - "inputAbbreviatedPath": "\/js\/index.js", - "outputAbbreviatedPath": "\/js\/min\/gogs-min.js", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 1, - "syntaxCheckerStyle": 0 - }, - "\/js\/jquery-1.11.3.min.js": { - "fileType": 64, - "ignore": 1, - "ignoreWasSetByUser": 1, - "inputAbbreviatedPath": "\/js\/jquery-1.11.3.min.js", - "outputAbbreviatedPath": "\/js\/min\/jquery-1.11.3.min-min.js", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 1, - "syntaxCheckerStyle": 1 - }, - "\/js\/semantic-2.2.1.min.js": { - "fileType": 64, - "ignore": 1, - "ignoreWasSetByUser": 1, - "inputAbbreviatedPath": "\/js\/semantic-2.2.1.min.js", - "outputAbbreviatedPath": "\/js\/min\/semantic-2.2.1.min-min.js", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 1, - "syntaxCheckerStyle": 1 - }, - "\/less\/_admin.less": { - "allowInsecureImports": 0, - "createSourceMap": 0, - "disableJavascript": 0, - "fileType": 1, - "ieCompatibility": 1, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/less\/_admin.less", - "outputAbbreviatedPath": "\/css\/_admin.css", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 0, - "relativeURLS": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "strictImports": 0, - "strictMath": 0, - "strictUnits": 0 - }, - "\/less\/_base.less": { - "allowInsecureImports": 0, - "createSourceMap": 0, - "disableJavascript": 0, - "fileType": 1, - "ieCompatibility": 1, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/less\/_base.less", - "outputAbbreviatedPath": "\/css\/_base.css", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 0, - "relativeURLS": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "strictImports": 0, - "strictMath": 0, - "strictUnits": 0 - }, - "\/less\/_dashboard.less": { - "allowInsecureImports": 0, - "createSourceMap": 0, - "disableJavascript": 0, - "fileType": 1, - "ieCompatibility": 1, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/less\/_dashboard.less", - "outputAbbreviatedPath": "\/css\/_dashboard.css", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 0, - "relativeURLS": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "strictImports": 0, - "strictMath": 0, - "strictUnits": 0 - }, - "\/less\/_editor.less": { - "allowInsecureImports": 0, - "createSourceMap": 0, - "disableJavascript": 0, - "fileType": 1, - "ieCompatibility": 1, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/less\/_editor.less", - "outputAbbreviatedPath": "\/css\/_editor.css", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 0, - "relativeURLS": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "strictImports": 0, - "strictMath": 0, - "strictUnits": 0 - }, - "\/less\/_emojify.less": { - "allowInsecureImports": 0, - "createSourceMap": 0, - "disableJavascript": 0, - "fileType": 1, - "ieCompatibility": 1, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/less\/_emojify.less", - "outputAbbreviatedPath": "\/css\/_emojify.css", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 0, - "relativeURLS": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "strictImports": 0, - "strictMath": 0, - "strictUnits": 0 - }, - "\/less\/_explore.less": { - "allowInsecureImports": 0, - "createSourceMap": 0, - "disableJavascript": 0, - "fileType": 1, - "ieCompatibility": 1, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/less\/_explore.less", - "outputAbbreviatedPath": "\/css\/_explore.css", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 0, - "relativeURLS": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "strictImports": 0, - "strictMath": 0, - "strictUnits": 0 - }, - "\/less\/_form.less": { - "allowInsecureImports": 0, - "createSourceMap": 0, - "disableJavascript": 0, - "fileType": 1, - "ieCompatibility": 1, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/less\/_form.less", - "outputAbbreviatedPath": "\/css\/_form.css", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 0, - "relativeURLS": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "strictImports": 0, - "strictMath": 0, - "strictUnits": 0 - }, - "\/less\/_home.less": { - "allowInsecureImports": 0, - "createSourceMap": 0, - "disableJavascript": 0, - "fileType": 1, - "ieCompatibility": 1, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/less\/_home.less", - "outputAbbreviatedPath": "\/css\/_home.css", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 0, - "relativeURLS": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "strictImports": 0, - "strictMath": 0, - "strictUnits": 0 - }, - "\/less\/_install.less": { - "allowInsecureImports": 0, - "createSourceMap": 0, - "disableJavascript": 0, - "fileType": 1, - "ieCompatibility": 1, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/less\/_install.less", - "outputAbbreviatedPath": "\/css\/_install.css", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 0, - "relativeURLS": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "strictImports": 0, - "strictMath": 0, - "strictUnits": 0 - }, - "\/less\/_markdown.less": { - "allowInsecureImports": 0, - "createSourceMap": 0, - "disableJavascript": 0, - "fileType": 1, - "ieCompatibility": 1, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/less\/_markdown.less", - "outputAbbreviatedPath": "\/css\/_markdown.css", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 0, - "relativeURLS": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "strictImports": 0, - "strictMath": 0, - "strictUnits": 0 - }, - "\/less\/_organization.less": { - "allowInsecureImports": 0, - "createSourceMap": 0, - "disableJavascript": 0, - "fileType": 1, - "ieCompatibility": 1, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/less\/_organization.less", - "outputAbbreviatedPath": "\/css\/_organization.css", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 0, - "relativeURLS": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "strictImports": 0, - "strictMath": 0, - "strictUnits": 0 - }, - "\/less\/_repository.less": { - "allowInsecureImports": 0, - "createSourceMap": 0, - "disableJavascript": 0, - "fileType": 1, - "ieCompatibility": 1, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/less\/_repository.less", - "outputAbbreviatedPath": "\/css\/_repository.css", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 0, - "relativeURLS": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "strictImports": 0, - "strictMath": 0, - "strictUnits": 0 - }, - "\/less\/_user.less": { - "allowInsecureImports": 0, - "createSourceMap": 0, - "disableJavascript": 0, - "fileType": 1, - "ieCompatibility": 1, - "ignore": 1, - "ignoreWasSetByUser": 0, - "inputAbbreviatedPath": "\/less\/_user.less", - "outputAbbreviatedPath": "\/css\/_user.css", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 0, - "outputStyle": 0, - "relativeURLS": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "strictImports": 0, - "strictMath": 0, - "strictUnits": 0 - }, - "\/less\/index.less": { - "allowInsecureImports": 0, - "createSourceMap": 0, - "disableJavascript": 0, - "fileType": 1, - "ieCompatibility": 1, - "ignore": 0, - "ignoreWasSetByUser": 1, - "inputAbbreviatedPath": "\/less\/index.less", - "outputAbbreviatedPath": "\/css\/index.css", - "outputPathIsOutsideProject": 0, - "outputPathIsSetByUser": 1, - "outputStyle": 0, - "relativeURLS": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "strictImports": 0, - "strictMath": 0, - "strictUnits": 0 - } - }, -"hooks": [ - ], -"lastSavedByUser": "Jiahua Chen", -"manualImportLinks": { - }, -"projectAttributes": { - "bowerAbbreviatedPath": "", - "displayValue": "Gogs", - "displayValueWasSetByUser": 1, - "iconImageName": "brackets_brown" - }, -"projectSettings": { - "alwaysUseExternalServer": 0, - "animateCSSInjections": 1, - "autoApplyPSLanguageSettingsStyle": 0, - "autoprefixerBrowserString": "> 1%, last 2 versions, Firefox ESR, Opera 12.1", - "autoSyncProjectSettingsFile": 1, - "browserRefreshDelay": 0, - "coffeeAutoOutputPathEnabled": 1, - "coffeeAutoOutputPathFilenamePattern": "*.js", - "coffeeAutoOutputPathRelativePath": "", - "coffeeAutoOutputPathReplace1": "", - "coffeeAutoOutputPathReplace2": "", - "coffeeAutoOutputPathStyle": 0, - "coffeeCreateSourceMap": 0, - "coffeeLintFlags2": { - "arrow_spacing": { - "active": 0, - "flagValue": -1 - }, - "camel_case_classes": { - "active": 1, - "flagValue": -1 - }, - "colon_assignment_spacing": { - "active": 0, - "flagValue": 1 - }, - "cyclomatic_complexity": { - "active": 0, - "flagValue": 10 - }, - "duplicate_key": { - "active": 1, - "flagValue": -1 - }, - "empty_constructor_needs_parens": { - "active": 0, - "flagValue": -1 - }, - "ensure_comprehensions": { - "active": 1, - "flagValue": -1 - }, - "indentation": { - "active": 1, - "flagValue": 2 - }, - "line_endings": { - "active": 0, - "flagValue": 0 - }, - "max_line_length": { - "active": 0, - "flagValue": 150 - }, - "missing_fat_arrows": { - "active": 0, - "flagValue": -1 - }, - "newlines_after_classes": { - "active": 0, - "flagValue": 3 - }, - "no_backticks": { - "active": 1, - "flagValue": -1 - }, - "no_debugger": { - "active": 1, - "flagValue": -1 - }, - "no_empty_functions": { - "active": 0, - "flagValue": -1 - }, - "no_empty_param_list": { - "active": 0, - "flagValue": -1 - }, - "no_implicit_braces": { - "active": 1, - "flagValue": -1 - }, - "no_implicit_parens": { - "active": 0, - "flagValue": -1 - }, - "no_interpolation_in_single_quotes": { - "active": 0, - "flagValue": -1 - }, - "no_nested_string_interpolation": { - "active": 1, - "flagValue": -1 - }, - "no_plusplus": { - "active": 0, - "flagValue": -1 - }, - "no_private_function_fat_arrows": { - "active": 1, - "flagValue": -1 - }, - "no_stand_alone_at": { - "active": 1, - "flagValue": -1 - }, - "no_tabs": { - "active": 1, - "flagValue": -1 - }, - "no_this": { - "active": 0, - "flagValue": -1 - }, - "no_throwing_strings": { - "active": 1, - "flagValue": -1 - }, - "no_trailing_semicolons": { - "active": 1, - "flagValue": -1 - }, - "no_trailing_whitespace": { - "active": 1, - "flagValue": -1 - }, - "no_unnecessary_double_quotes": { - "active": 0, - "flagValue": -1 - }, - "no_unnecessary_fat_arrows": { - "active": 1, - "flagValue": -1 - }, - "non_empty_constructor_needs_parens": { - "active": 0, - "flagValue": -1 - }, - "prefer_english_operator": { - "active": 0, - "flagValue": -1 - }, - "space_operators": { - "active": 0, - "flagValue": -1 - }, - "spacing_after_comma": { - "active": 1, - "flagValue": -1 - } - }, - "coffeeMinifyOutput": 1, - "coffeeOutputStyle": 0, - "coffeeSyntaxCheckerStyle": 1, - "externalServerAddress": "http:\/\/localhost:8888", - "externalServerPreviewPathAddition": "", - "genericWebpageFileExtensionsString": "html, htm, shtml, shtm, xhtml, php, jsp, asp, aspx, erb, ctp", - "hamlAutoOutputPathEnabled": 1, - "hamlAutoOutputPathFilenamePattern": "*.html", - "hamlAutoOutputPathRelativePath": "", - "hamlAutoOutputPathReplace1": "", - "hamlAutoOutputPathReplace2": "", - "hamlAutoOutputPathStyle": 0, - "hamlEscapeHTMLCharacters": 0, - "hamlNoEscapeInAttributes": 0, - "hamlOutputFormat": 2, - "hamlOutputStyle": 0, - "hamlUseCDATA": 0, - "hamlUseDoubleQuotes": 0, - "hamlUseUnixNewlines": 0, - "jadeAutoOutputPathEnabled": 1, - "jadeAutoOutputPathFilenamePattern": "*.html", - "jadeAutoOutputPathRelativePath": "", - "jadeAutoOutputPathReplace1": "", - "jadeAutoOutputPathReplace2": "", - "jadeAutoOutputPathStyle": 0, - "jadeCompileDebug": 1, - "jadeOutputStyle": 0, - "javascriptAutoOutputPathEnabled": 1, - "javascriptAutoOutputPathFilenamePattern": "*-min.js", - "javascriptAutoOutputPathRelativePath": "\/min", - "javascriptAutoOutputPathReplace1": "", - "javascriptAutoOutputPathReplace2": "", - "javascriptAutoOutputPathStyle": 2, - "javascriptCreateSourceMap": 1, - "javascriptOutputStyle": 1, - "javascriptSyntaxCheckerStyle": 1, - "jsCheckerReservedNamesString": "", - "jsHintFlags2": { - "asi": { - "active": 0, - "flagValue": -1 - }, - "bitwise": { - "active": 1, - "flagValue": -1 - }, - "boss": { - "active": 0, - "flagValue": -1 - }, - "browser": { - "active": 1, - "flagValue": -1 - }, - "browserify": { - "active": 0, - "flagValue": -1 - }, - "camelcase": { - "active": 0, - "flagValue": -1 - }, - "couch": { - "active": 0, - "flagValue": -1 - }, - "curly": { - "active": 1, - "flagValue": -1 - }, - "debug": { - "active": 0, - "flagValue": -1 - }, - "devel": { - "active": 0, - "flagValue": -1 - }, - "dojo": { - "active": 0, - "flagValue": -1 - }, - "elision": { - "active": 1, - "flagValue": -1 - }, - "eqeqeq": { - "active": 1, - "flagValue": -1 - }, - "eqnull": { - "active": 0, - "flagValue": -1 - }, - "es3": { - "active": 0, - "flagValue": -1 - }, - "esnext": { - "active": 0, - "flagValue": -1 - }, - "evil": { - "active": 0, - "flagValue": -1 - }, - "expr": { - "active": 0, - "flagValue": -1 - }, - "forin": { - "active": 0, - "flagValue": -1 - }, - "freeze": { - "active": 1, - "flagValue": -1 - }, - "funcscope": { - "active": 0, - "flagValue": -1 - }, - "futurehostile": { - "active": 0, - "flagValue": -1 - }, - "globalstrict": { - "active": 0, - "flagValue": -1 - }, - "immed": { - "active": 0, - "flagValue": -1 - }, - "indent": { - "active": 0, - "flagValue": 4 - }, - "iterator": { - "active": 0, - "flagValue": -1 - }, - "jasmine": { - "active": 0, - "flagValue": -1 - }, - "jquery": { - "active": 1, - "flagValue": -1 - }, - "lastsemic": { - "active": 0, - "flagValue": -1 - }, - "latedef": { - "active": 1, - "flagValue": -1 - }, - "laxbreak": { - "active": 0, - "flagValue": -1 - }, - "laxcomma": { - "active": 0, - "flagValue": -1 - }, - "loopfunc": { - "active": 0, - "flagValue": -1 - }, - "maxcomplexity": { - "active": 0, - "flagValue": 10 - }, - "maxdepth": { - "active": 0, - "flagValue": 3 - }, - "maxlen": { - "active": 0, - "flagValue": 150 - }, - "maxparams": { - "active": 0, - "flagValue": 3 - }, - "maxstatements": { - "active": 0, - "flagValue": 4 - }, - "mocha": { - "active": 0, - "flagValue": -1 - }, - "mootools": { - "active": 0, - "flagValue": -1 - }, - "moz": { - "active": 0, - "flagValue": -1 - }, - "multistr": { - "active": 0, - "flagValue": -1 - }, - "newcap": { - "active": 1, - "flagValue": -1 - }, - "noarg": { - "active": 1, - "flagValue": -1 - }, - "nocomma": { - "active": 0, - "flagValue": -1 - }, - "node": { - "active": 0, - "flagValue": -1 - }, - "noempty": { - "active": 0, - "flagValue": -1 - }, - "nonbsp": { - "active": 0, - "flagValue": -1 - }, - "nonew": { - "active": 1, - "flagValue": -1 - }, - "nonstandard": { - "active": 0, - "flagValue": -1 - }, - "notypeof": { - "active": 1, - "flagValue": -1 - }, - "noyield": { - "active": 0, - "flagValue": -1 - }, - "onecase": { - "active": 0, - "flagValue": -1 - }, - "phantom": { - "active": 0, - "flagValue": -1 - }, - "plusplus": { - "active": 0, - "flagValue": -1 - }, - "proto": { - "active": 0, - "flagValue": -1 - }, - "prototypejs": { - "active": 0, - "flagValue": -1 - }, - "qunit": { - "active": 0, - "flagValue": -1 - }, - "regexp": { - "active": 1, - "flagValue": -1 - }, - "rhino": { - "active": 0, - "flagValue": -1 - }, - "scripturl": { - "active": 0, - "flagValue": -1 - }, - "shadow": { - "active": 0, - "flagValue": -1 - }, - "shelljs": { - "active": 0, - "flagValue": -1 - }, - "singleGroups": { - "active": 0, - "flagValue": -1 - }, - "strict": { - "active": 0, - "flagValue": -1 - }, - "sub": { - "active": 0, - "flagValue": -1 - }, - "supernew": { - "active": 0, - "flagValue": -1 - }, - "typed": { - "active": 0, - "flagValue": -1 - }, - "undef": { - "active": 1, - "flagValue": -1 - }, - "unused": { - "active": 1, - "flagValue": -1 - }, - "varstmt": { - "active": 0, - "flagValue": -1 - }, - "withstmt": { - "active": 0, - "flagValue": -1 - }, - "worker": { - "active": 0, - "flagValue": -1 - }, - "wsh": { - "active": 0, - "flagValue": -1 - }, - "yui": { - "active": 0, - "flagValue": -1 - } - }, - "jsLintFlags2": { - "bitwise": { - "active": 0, - "flagValue": -1 - }, - "browser": { - "active": 1, - "flagValue": -1 - }, - "couch": { - "active": 0, - "flagValue": -1 - }, - "devel": { - "active": 0, - "flagValue": -1 - }, - "es6": { - "active": 0, - "flagValue": -1 - }, - "eval": { - "active": 0, - "flagValue": -1 - }, - "for": { - "active": 0, - "flagValue": -1 - }, - "maxlen": { - "active": 0, - "flagValue": 150 - }, - "node": { - "active": 0, - "flagValue": -1 - }, - "this": { - "active": 0, - "flagValue": -1 - }, - "white": { - "active": 0, - "flagValue": -1 - } - }, - "jsonAutoOutputPathEnabled": 0, - "jsonAutoOutputPathFilenamePattern": "*-min.json", - "jsonAutoOutputPathRelativePath": "", - "jsonAutoOutputPathReplace1": "", - "jsonAutoOutputPathReplace2": "", - "jsonAutoOutputPathStyle": 0, - "jsonOrderOutput": 0, - "jsonOutputStyle": 1, - "kitAutoOutputPathEnabled": 1, - "kitAutoOutputPathFilenamePattern": "*.html", - "kitAutoOutputPathRelativePath": "", - "kitAutoOutputPathReplace1": "", - "kitAutoOutputPathReplace2": "", - "kitAutoOutputPathStyle": 0, - "lessAllowInsecureImports": 0, - "lessAutoOutputPathEnabled": 1, - "lessAutoOutputPathFilenamePattern": "*.css", - "lessAutoOutputPathRelativePath": "..\/css", - "lessAutoOutputPathReplace1": "less", - "lessAutoOutputPathReplace2": "css", - "lessAutoOutputPathStyle": 2, - "lessCreateSourceMap": 0, - "lessDisableJavascript": 0, - "lessIeCompatibility": 1, - "lessOutputStyle": 0, - "lessRelativeURLS": 0, - "lessStrictImports": 0, - "lessStrictMath": 0, - "lessStrictUnits": 0, - "markdownAutoOutputPathEnabled": 1, - "markdownAutoOutputPathFilenamePattern": "*.html", - "markdownAutoOutputPathRelativePath": "", - "markdownAutoOutputPathReplace1": "", - "markdownAutoOutputPathReplace2": "", - "markdownAutoOutputPathStyle": 0, - "markdownCriticStyle": 0, - "markdownEnableFootnotes": 0, - "markdownEnableLabels": 1, - "markdownEnableSmartQuotes": 1, - "markdownEscapeLineBreaks": 0, - "markdownMaskEmailAddresses": 1, - "markdownOutputFormat": 0, - "markdownOutputStyle": 0, - "markdownParseMetadata": 1, - "markdownProcessHTML": 0, - "markdownRandomFootnoteNumbers": 0, - "markdownUseCompatibilityMode": 0, - "reloadFileURLs": 0, - "sassAutoOutputPathEnabled": 1, - "sassAutoOutputPathFilenamePattern": "*.css", - "sassAutoOutputPathRelativePath": "..\/css", - "sassAutoOutputPathReplace1": "sass", - "sassAutoOutputPathReplace2": "css", - "sassAutoOutputPathStyle": 2, - "sassCreateSourceMap": 0, - "sassDebugStyle": 0, - "sassDecimalPrecision": 10, - "sassOutputStyle": 0, - "sassUseLibsass": 0, - "shouldRunAutoprefixer": 0, - "shouldRunBless": 0, - "skippedItemsString": "node_modules, _logs, .hg, \/plugins, _cache, log, logs, cache, \/assets, \/js\/libs, .git, .svn, \/img\/emoji", - "slimAutoOutputPathEnabled": 1, - "slimAutoOutputPathFilenamePattern": "*.html", - "slimAutoOutputPathRelativePath": "", - "slimAutoOutputPathReplace1": "", - "slimAutoOutputPathReplace2": "", - "slimAutoOutputPathStyle": 0, - "slimCompileOnly": 0, - "slimLogicless": 0, - "slimOutputFormat": 0, - "slimOutputStyle": 1, - "slimRailsCompatible": 0, - "stylusAutoOutputPathEnabled": 1, - "stylusAutoOutputPathFilenamePattern": "*.css", - "stylusAutoOutputPathRelativePath": "..\/css", - "stylusAutoOutputPathReplace1": "stylus", - "stylusAutoOutputPathReplace2": "css", - "stylusAutoOutputPathStyle": 2, - "stylusCreateSourceMap": 0, - "stylusDebugStyle": 0, - "stylusImportCSS": 0, - "stylusOutputStyle": 0, - "stylusResolveRelativeURLS": 0, - "typescriptAutoOutputPathEnabled": 1, - "typescriptAutoOutputPathFilenamePattern": "*.js", - "typescriptAutoOutputPathRelativePath": "\/js", - "typescriptAutoOutputPathReplace1": "", - "typescriptAutoOutputPathReplace2": "", - "typescriptAutoOutputPathStyle": 2, - "typescriptCreateDeclarationFile": 0, - "typescriptCreateSourceMap": 0, - "typescriptJSXMode": 0, - "typescriptMinifyOutput": 0, - "typescriptModuleResolutionType": 0, - "typescriptModuleType": 0, - "typescriptNoImplicitAny": 0, - "typescriptPreserveConstEnums": 0, - "typescriptRemoveComments": 0, - "typescriptSuppressImplicitAnyIndexErrors": 0, - "typescriptTargetECMAVersion": 0, - "uglifyDefinesString": "", - "uglifyFlags2": { - "ascii-only": { - "active": 0, - "flagValue": -1 - }, - "bare-returns": { - "active": 0, - "flagValue": -1 - }, - "booleans": { - "active": 1, - "flagValue": -1 - }, - "bracketize": { - "active": 0, - "flagValue": -1 - }, - "cascade": { - "active": 1, - "flagValue": -1 - }, - "comments": { - "active": 1, - "flagValue": -1 - }, - "comparisons": { - "active": 1, - "flagValue": -1 - }, - "compress": { - "active": 1, - "flagValue": -1 - }, - "conditionals": { - "active": 1, - "flagValue": -1 - }, - "dead_code": { - "active": 0, - "flagValue": -1 - }, - "drop_console": { - "active": 0, - "flagValue": -1 - }, - "drop_debugger": { - "active": 1, - "flagValue": -1 - }, - "eval": { - "active": 0, - "flagValue": -1 - }, - "evaluate": { - "active": 1, - "flagValue": -1 - }, - "hoist_funs": { - "active": 1, - "flagValue": -1 - }, - "hoist_vars": { - "active": 0, - "flagValue": -1 - }, - "if_return": { - "active": 1, - "flagValue": -1 - }, - "indent-level": { - "active": 0, - "flagValue": 4 - }, - "indent-start": { - "active": 0, - "flagValue": 0 - }, - "inline-script": { - "active": 0, - "flagValue": -1 - }, - "join_vars": { - "active": 1, - "flagValue": -1 - }, - "keep_fargs": { - "active": 0, - "flagValue": -1 - }, - "keep_fnames": { - "active": 0, - "flagValue": -1 - }, - "loops": { - "active": 1, - "flagValue": -1 - }, - "mangle": { - "active": 1, - "flagValue": -1 - }, - "max-line-len": { - "active": 1, - "flagValue": 32000 - }, - "negate_iife": { - "active": 1, - "flagValue": -1 - }, - "properties": { - "active": 1, - "flagValue": -1 - }, - "pure_getters": { - "active": 0, - "flagValue": -1 - }, - "quote-keys": { - "active": 0, - "flagValue": -1 - }, - "screw-ie8": { - "active": 0, - "flagValue": -1 - }, - "semicolons": { - "active": 1, - "flagValue": -1 - }, - "sequences": { - "active": 1, - "flagValue": -1 - }, - "sort": { - "active": 0, - "flagValue": -1 - }, - "space-colon": { - "active": 1, - "flagValue": -1 - }, - "toplevel": { - "active": 0, - "flagValue": -1 - }, - "unsafe": { - "active": 0, - "flagValue": -1 - }, - "unused": { - "active": 0, - "flagValue": -1 - }, - "warnings": { - "active": 0, - "flagValue": -1 - }, - "width": { - "active": 1, - "flagValue": 80 - } - }, - "uglifyReservedNamesString": "$", - "websiteRelativeRoot": "" - }, -"settingsFileVersion": "2" -} diff --git a/vendor/github.com/boltdb/bolt/LICENSE b/vendor/github.com/boltdb/bolt/LICENSE new file mode 100644 index 000000000..004e77fe5 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 Ben Johnson + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/boltdb/bolt/Makefile b/vendor/github.com/boltdb/bolt/Makefile new file mode 100644 index 000000000..e035e63ad --- /dev/null +++ b/vendor/github.com/boltdb/bolt/Makefile @@ -0,0 +1,18 @@ +BRANCH=`git rev-parse --abbrev-ref HEAD` +COMMIT=`git rev-parse --short HEAD` +GOLDFLAGS="-X main.branch $(BRANCH) -X main.commit $(COMMIT)" + +default: build + +race: + @go test -v -race -test.run="TestSimulate_(100op|1000op)" + +# go get github.com/kisielk/errcheck +errcheck: + @errcheck -ignorepkg=bytes -ignore=os:Remove github.com/boltdb/bolt + +test: + @go test -v -cover . + @go test -v ./cmd/bolt + +.PHONY: fmt test diff --git a/vendor/github.com/boltdb/bolt/README.md b/vendor/github.com/boltdb/bolt/README.md new file mode 100644 index 000000000..4c9312c08 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/README.md @@ -0,0 +1,848 @@ +Bolt [![Coverage Status](https://coveralls.io/repos/boltdb/bolt/badge.svg?branch=master)](https://coveralls.io/r/boltdb/bolt?branch=master) [![GoDoc](https://godoc.org/github.com/boltdb/bolt?status.svg)](https://godoc.org/github.com/boltdb/bolt) ![Version](https://img.shields.io/badge/version-1.0-green.svg) +==== + +Bolt is a pure Go key/value store inspired by [Howard Chu's][hyc_symas] +[LMDB project][lmdb]. The goal of the project is to provide a simple, +fast, and reliable database for projects that don't require a full database +server such as Postgres or MySQL. + +Since Bolt is meant to be used as such a low-level piece of functionality, +simplicity is key. The API will be small and only focus on getting values +and setting values. That's it. + +[hyc_symas]: https://twitter.com/hyc_symas +[lmdb]: http://symas.com/mdb/ + +## Project Status + +Bolt is stable and the API is fixed. Full unit test coverage and randomized +black box testing are used to ensure database consistency and thread safety. +Bolt is currently in high-load production environments serving databases as +large as 1TB. Many companies such as Shopify and Heroku use Bolt-backed +services every day. + +## Table of Contents + +- [Getting Started](#getting-started) + - [Installing](#installing) + - [Opening a database](#opening-a-database) + - [Transactions](#transactions) + - [Read-write transactions](#read-write-transactions) + - [Read-only transactions](#read-only-transactions) + - [Batch read-write transactions](#batch-read-write-transactions) + - [Managing transactions manually](#managing-transactions-manually) + - [Using buckets](#using-buckets) + - [Using key/value pairs](#using-keyvalue-pairs) + - [Autoincrementing integer for the bucket](#autoincrementing-integer-for-the-bucket) + - [Iterating over keys](#iterating-over-keys) + - [Prefix scans](#prefix-scans) + - [Range scans](#range-scans) + - [ForEach()](#foreach) + - [Nested buckets](#nested-buckets) + - [Database backups](#database-backups) + - [Statistics](#statistics) + - [Read-Only Mode](#read-only-mode) + - [Mobile Use (iOS/Android)](#mobile-use-iosandroid) +- [Resources](#resources) +- [Comparison with other databases](#comparison-with-other-databases) + - [Postgres, MySQL, & other relational databases](#postgres-mysql--other-relational-databases) + - [LevelDB, RocksDB](#leveldb-rocksdb) + - [LMDB](#lmdb) +- [Caveats & Limitations](#caveats--limitations) +- [Reading the Source](#reading-the-source) +- [Other Projects Using Bolt](#other-projects-using-bolt) + +## Getting Started + +### Installing + +To start using Bolt, install Go and run `go get`: + +```sh +$ go get github.com/boltdb/bolt/... +``` + +This will retrieve the library and install the `bolt` command line utility into +your `$GOBIN` path. + + +### Opening a database + +The top-level object in Bolt is a `DB`. It is represented as a single file on +your disk and represents a consistent snapshot of your data. + +To open your database, simply use the `bolt.Open()` function: + +```go +package main + +import ( + "log" + + "github.com/boltdb/bolt" +) + +func main() { + // Open the my.db data file in your current directory. + // It will be created if it doesn't exist. + db, err := bolt.Open("my.db", 0600, nil) + if err != nil { + log.Fatal(err) + } + defer db.Close() + + ... +} +``` + +Please note that Bolt obtains a file lock on the data file so multiple processes +cannot open the same database at the same time. Opening an already open Bolt +database will cause it to hang until the other process closes it. To prevent +an indefinite wait you can pass a timeout option to the `Open()` function: + +```go +db, err := bolt.Open("my.db", 0600, &bolt.Options{Timeout: 1 * time.Second}) +``` + + +### Transactions + +Bolt allows only one read-write transaction at a time but allows as many +read-only transactions as you want at a time. Each transaction has a consistent +view of the data as it existed when the transaction started. + +Individual transactions and all objects created from them (e.g. buckets, keys) +are not thread safe. To work with data in multiple goroutines you must start +a transaction for each one or use locking to ensure only one goroutine accesses +a transaction at a time. Creating transaction from the `DB` is thread safe. + +Read-only transactions and read-write transactions should not depend on one +another and generally shouldn't be opened simultaneously in the same goroutine. +This can cause a deadlock as the read-write transaction needs to periodically +re-map the data file but it cannot do so while a read-only transaction is open. + + +#### Read-write transactions + +To start a read-write transaction, you can use the `DB.Update()` function: + +```go +err := db.Update(func(tx *bolt.Tx) error { + ... + return nil +}) +``` + +Inside the closure, you have a consistent view of the database. You commit the +transaction by returning `nil` at the end. You can also rollback the transaction +at any point by returning an error. All database operations are allowed inside +a read-write transaction. + +Always check the return error as it will report any disk failures that can cause +your transaction to not complete. If you return an error within your closure +it will be passed through. + + +#### Read-only transactions + +To start a read-only transaction, you can use the `DB.View()` function: + +```go +err := db.View(func(tx *bolt.Tx) error { + ... + return nil +}) +``` + +You also get a consistent view of the database within this closure, however, +no mutating operations are allowed within a read-only transaction. You can only +retrieve buckets, retrieve values, and copy the database within a read-only +transaction. + + +#### Batch read-write transactions + +Each `DB.Update()` waits for disk to commit the writes. This overhead +can be minimized by combining multiple updates with the `DB.Batch()` +function: + +```go +err := db.Batch(func(tx *bolt.Tx) error { + ... + return nil +}) +``` + +Concurrent Batch calls are opportunistically combined into larger +transactions. Batch is only useful when there are multiple goroutines +calling it. + +The trade-off is that `Batch` can call the given +function multiple times, if parts of the transaction fail. The +function must be idempotent and side effects must take effect only +after a successful return from `DB.Batch()`. + +For example: don't display messages from inside the function, instead +set variables in the enclosing scope: + +```go +var id uint64 +err := db.Batch(func(tx *bolt.Tx) error { + // Find last key in bucket, decode as bigendian uint64, increment + // by one, encode back to []byte, and add new key. + ... + id = newValue + return nil +}) +if err != nil { + return ... +} +fmt.Println("Allocated ID %d", id) +``` + + +#### Managing transactions manually + +The `DB.View()` and `DB.Update()` functions are wrappers around the `DB.Begin()` +function. These helper functions will start the transaction, execute a function, +and then safely close your transaction if an error is returned. This is the +recommended way to use Bolt transactions. + +However, sometimes you may want to manually start and end your transactions. +You can use the `Tx.Begin()` function directly but **please** be sure to close +the transaction. + +```go +// Start a writable transaction. +tx, err := db.Begin(true) +if err != nil { + return err +} +defer tx.Rollback() + +// Use the transaction... +_, err := tx.CreateBucket([]byte("MyBucket")) +if err != nil { + return err +} + +// Commit the transaction and check for error. +if err := tx.Commit(); err != nil { + return err +} +``` + +The first argument to `DB.Begin()` is a boolean stating if the transaction +should be writable. + + +### Using buckets + +Buckets are collections of key/value pairs within the database. All keys in a +bucket must be unique. You can create a bucket using the `DB.CreateBucket()` +function: + +```go +db.Update(func(tx *bolt.Tx) error { + b, err := tx.CreateBucket([]byte("MyBucket")) + if err != nil { + return fmt.Errorf("create bucket: %s", err) + } + return nil +}) +``` + +You can also create a bucket only if it doesn't exist by using the +`Tx.CreateBucketIfNotExists()` function. It's a common pattern to call this +function for all your top-level buckets after you open your database so you can +guarantee that they exist for future transactions. + +To delete a bucket, simply call the `Tx.DeleteBucket()` function. + + +### Using key/value pairs + +To save a key/value pair to a bucket, use the `Bucket.Put()` function: + +```go +db.Update(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("MyBucket")) + err := b.Put([]byte("answer"), []byte("42")) + return err +}) +``` + +This will set the value of the `"answer"` key to `"42"` in the `MyBucket` +bucket. To retrieve this value, we can use the `Bucket.Get()` function: + +```go +db.View(func(tx *bolt.Tx) error { + b := tx.Bucket([]byte("MyBucket")) + v := b.Get([]byte("answer")) + fmt.Printf("The answer is: %s\n", v) + return nil +}) +``` + +The `Get()` function does not return an error because its operation is +guaranteed to work (unless there is some kind of system failure). If the key +exists then it will return its byte slice value. If it doesn't exist then it +will return `nil`. It's important to note that you can have a zero-length value +set to a key which is different than the key not existing. + +Use the `Bucket.Delete()` function to delete a key from the bucket. + +Please note that values returned from `Get()` are only valid while the +transaction is open. If you need to use a value outside of the transaction +then you must use `copy()` to copy it to another byte slice. + + +### Autoincrementing integer for the bucket +By using the `NextSequence()` function, you can let Bolt determine a sequence +which can be used as the unique identifier for your key/value pairs. See the +example below. + +```go +// CreateUser saves u to the store. The new user ID is set on u once the data is persisted. +func (s *Store) CreateUser(u *User) error { + return s.db.Update(func(tx *bolt.Tx) error { + // Retrieve the users bucket. + // This should be created when the DB is first opened. + b := tx.Bucket([]byte("users")) + + // Generate ID for the user. + // This returns an error only if the Tx is closed or not writeable. + // That can't happen in an Update() call so I ignore the error check. + id, _ = b.NextSequence() + u.ID = int(id) + + // Marshal user data into bytes. + buf, err := json.Marshal(u) + if err != nil { + return err + } + + // Persist bytes to users bucket. + return b.Put(itob(u.ID), buf) + }) +} + +// itob returns an 8-byte big endian representation of v. +func itob(v int) []byte { + b := make([]byte, 8) + binary.BigEndian.PutUint64(b, uint64(v)) + return b +} + +type User struct { + ID int + ... +} +``` + +### Iterating over keys + +Bolt stores its keys in byte-sorted order within a bucket. This makes sequential +iteration over these keys extremely fast. To iterate over keys we'll use a +`Cursor`: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume bucket exists and has keys + b := tx.Bucket([]byte("MyBucket")) + + c := b.Cursor() + + for k, v := c.First(); k != nil; k, v = c.Next() { + fmt.Printf("key=%s, value=%s\n", k, v) + } + + return nil +}) +``` + +The cursor allows you to move to a specific point in the list of keys and move +forward or backward through the keys one at a time. + +The following functions are available on the cursor: + +``` +First() Move to the first key. +Last() Move to the last key. +Seek() Move to a specific key. +Next() Move to the next key. +Prev() Move to the previous key. +``` + +Each of those functions has a return signature of `(key []byte, value []byte)`. +When you have iterated to the end of the cursor then `Next()` will return a +`nil` key. You must seek to a position using `First()`, `Last()`, or `Seek()` +before calling `Next()` or `Prev()`. If you do not seek to a position then +these functions will return a `nil` key. + +During iteration, if the key is non-`nil` but the value is `nil`, that means +the key refers to a bucket rather than a value. Use `Bucket.Bucket()` to +access the sub-bucket. + + +#### Prefix scans + +To iterate over a key prefix, you can combine `Seek()` and `bytes.HasPrefix()`: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume bucket exists and has keys + c := tx.Bucket([]byte("MyBucket")).Cursor() + + prefix := []byte("1234") + for k, v := c.Seek(prefix); bytes.HasPrefix(k, prefix); k, v = c.Next() { + fmt.Printf("key=%s, value=%s\n", k, v) + } + + return nil +}) +``` + +#### Range scans + +Another common use case is scanning over a range such as a time range. If you +use a sortable time encoding such as RFC3339 then you can query a specific +date range like this: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume our events bucket exists and has RFC3339 encoded time keys. + c := tx.Bucket([]byte("Events")).Cursor() + + // Our time range spans the 90's decade. + min := []byte("1990-01-01T00:00:00Z") + max := []byte("2000-01-01T00:00:00Z") + + // Iterate over the 90's. + for k, v := c.Seek(min); k != nil && bytes.Compare(k, max) <= 0; k, v = c.Next() { + fmt.Printf("%s: %s\n", k, v) + } + + return nil +}) +``` + +Note that, while RFC3339 is sortable, the Golang implementation of RFC3339Nano does not use a fixed number of digits after the decimal point and is therefore not sortable. + + +#### ForEach() + +You can also use the function `ForEach()` if you know you'll be iterating over +all the keys in a bucket: + +```go +db.View(func(tx *bolt.Tx) error { + // Assume bucket exists and has keys + b := tx.Bucket([]byte("MyBucket")) + + b.ForEach(func(k, v []byte) error { + fmt.Printf("key=%s, value=%s\n", k, v) + return nil + }) + return nil +}) +``` + + +### Nested buckets + +You can also store a bucket in a key to create nested buckets. The API is the +same as the bucket management API on the `DB` object: + +```go +func (*Bucket) CreateBucket(key []byte) (*Bucket, error) +func (*Bucket) CreateBucketIfNotExists(key []byte) (*Bucket, error) +func (*Bucket) DeleteBucket(key []byte) error +``` + + +### Database backups + +Bolt is a single file so it's easy to backup. You can use the `Tx.WriteTo()` +function to write a consistent view of the database to a writer. If you call +this from a read-only transaction, it will perform a hot backup and not block +your other database reads and writes. + +By default, it will use a regular file handle which will utilize the operating +system's page cache. See the [`Tx`](https://godoc.org/github.com/boltdb/bolt#Tx) +documentation for information about optimizing for larger-than-RAM datasets. + +One common use case is to backup over HTTP so you can use tools like `cURL` to +do database backups: + +```go +func BackupHandleFunc(w http.ResponseWriter, req *http.Request) { + err := db.View(func(tx *bolt.Tx) error { + w.Header().Set("Content-Type", "application/octet-stream") + w.Header().Set("Content-Disposition", `attachment; filename="my.db"`) + w.Header().Set("Content-Length", strconv.Itoa(int(tx.Size()))) + _, err := tx.WriteTo(w) + return err + }) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + } +} +``` + +Then you can backup using this command: + +```sh +$ curl http://localhost/backup > my.db +``` + +Or you can open your browser to `http://localhost/backup` and it will download +automatically. + +If you want to backup to another file you can use the `Tx.CopyFile()` helper +function. + + +### Statistics + +The database keeps a running count of many of the internal operations it +performs so you can better understand what's going on. By grabbing a snapshot +of these stats at two points in time we can see what operations were performed +in that time range. + +For example, we could start a goroutine to log stats every 10 seconds: + +```go +go func() { + // Grab the initial stats. + prev := db.Stats() + + for { + // Wait for 10s. + time.Sleep(10 * time.Second) + + // Grab the current stats and diff them. + stats := db.Stats() + diff := stats.Sub(&prev) + + // Encode stats to JSON and print to STDERR. + json.NewEncoder(os.Stderr).Encode(diff) + + // Save stats for the next loop. + prev = stats + } +}() +``` + +It's also useful to pipe these stats to a service such as statsd for monitoring +or to provide an HTTP endpoint that will perform a fixed-length sample. + + +### Read-Only Mode + +Sometimes it is useful to create a shared, read-only Bolt database. To this, +set the `Options.ReadOnly` flag when opening your database. Read-only mode +uses a shared lock to allow multiple processes to read from the database but +it will block any processes from opening the database in read-write mode. + +```go +db, err := bolt.Open("my.db", 0666, &bolt.Options{ReadOnly: true}) +if err != nil { + log.Fatal(err) +} +``` + +### Mobile Use (iOS/Android) + +Bolt is able to run on mobile devices by leveraging the binding feature of the +[gomobile](https://github.com/golang/mobile) tool. Create a struct that will +contain your database logic and a reference to a `*bolt.DB` with a initializing +contstructor that takes in a filepath where the database file will be stored. +Neither Android nor iOS require extra permissions or cleanup from using this method. + +```go +func NewBoltDB(filepath string) *BoltDB { + db, err := bolt.Open(filepath+"/demo.db", 0600, nil) + if err != nil { + log.Fatal(err) + } + + return &BoltDB{db} +} + +type BoltDB struct { + db *bolt.DB + ... +} + +func (b *BoltDB) Path() string { + return b.db.Path() +} + +func (b *BoltDB) Close() { + b.db.Close() +} +``` + +Database logic should be defined as methods on this wrapper struct. + +To initialize this struct from the native language (both platforms now sync +their local storage to the cloud. These snippets disable that functionality for the +database file): + +#### Android + +```java +String path; +if (android.os.Build.VERSION.SDK_INT >=android.os.Build.VERSION_CODES.LOLLIPOP){ + path = getNoBackupFilesDir().getAbsolutePath(); +} else{ + path = getFilesDir().getAbsolutePath(); +} +Boltmobiledemo.BoltDB boltDB = Boltmobiledemo.NewBoltDB(path) +``` + +#### iOS + +```objc +- (void)demo { + NSString* path = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, + NSUserDomainMask, + YES) objectAtIndex:0]; + GoBoltmobiledemoBoltDB * demo = GoBoltmobiledemoNewBoltDB(path); + [self addSkipBackupAttributeToItemAtPath:demo.path]; + //Some DB Logic would go here + [demo close]; +} + +- (BOOL)addSkipBackupAttributeToItemAtPath:(NSString *) filePathString +{ + NSURL* URL= [NSURL fileURLWithPath: filePathString]; + assert([[NSFileManager defaultManager] fileExistsAtPath: [URL path]]); + + NSError *error = nil; + BOOL success = [URL setResourceValue: [NSNumber numberWithBool: YES] + forKey: NSURLIsExcludedFromBackupKey error: &error]; + if(!success){ + NSLog(@"Error excluding %@ from backup %@", [URL lastPathComponent], error); + } + return success; +} + +``` + +## Resources + +For more information on getting started with Bolt, check out the following articles: + +* [Intro to BoltDB: Painless Performant Persistence](http://npf.io/2014/07/intro-to-boltdb-painless-performant-persistence/) by [Nate Finch](https://github.com/natefinch). +* [Bolt -- an embedded key/value database for Go](https://www.progville.com/go/bolt-embedded-db-golang/) by Progville + + +## Comparison with other databases + +### Postgres, MySQL, & other relational databases + +Relational databases structure data into rows and are only accessible through +the use of SQL. This approach provides flexibility in how you store and query +your data but also incurs overhead in parsing and planning SQL statements. Bolt +accesses all data by a byte slice key. This makes Bolt fast to read and write +data by key but provides no built-in support for joining values together. + +Most relational databases (with the exception of SQLite) are standalone servers +that run separately from your application. This gives your systems +flexibility to connect multiple application servers to a single database +server but also adds overhead in serializing and transporting data over the +network. Bolt runs as a library included in your application so all data access +has to go through your application's process. This brings data closer to your +application but limits multi-process access to the data. + + +### LevelDB, RocksDB + +LevelDB and its derivatives (RocksDB, HyperLevelDB) are similar to Bolt in that +they are libraries bundled into the application, however, their underlying +structure is a log-structured merge-tree (LSM tree). An LSM tree optimizes +random writes by using a write ahead log and multi-tiered, sorted files called +SSTables. Bolt uses a B+tree internally and only a single file. Both approaches +have trade-offs. + +If you require a high random write throughput (>10,000 w/sec) or you need to use +spinning disks then LevelDB could be a good choice. If your application is +read-heavy or does a lot of range scans then Bolt could be a good choice. + +One other important consideration is that LevelDB does not have transactions. +It supports batch writing of key/values pairs and it supports read snapshots +but it will not give you the ability to do a compare-and-swap operation safely. +Bolt supports fully serializable ACID transactions. + + +### LMDB + +Bolt was originally a port of LMDB so it is architecturally similar. Both use +a B+tree, have ACID semantics with fully serializable transactions, and support +lock-free MVCC using a single writer and multiple readers. + +The two projects have somewhat diverged. LMDB heavily focuses on raw performance +while Bolt has focused on simplicity and ease of use. For example, LMDB allows +several unsafe actions such as direct writes for the sake of performance. Bolt +opts to disallow actions which can leave the database in a corrupted state. The +only exception to this in Bolt is `DB.NoSync`. + +There are also a few differences in API. LMDB requires a maximum mmap size when +opening an `mdb_env` whereas Bolt will handle incremental mmap resizing +automatically. LMDB overloads the getter and setter functions with multiple +flags whereas Bolt splits these specialized cases into their own functions. + + +## Caveats & Limitations + +It's important to pick the right tool for the job and Bolt is no exception. +Here are a few things to note when evaluating and using Bolt: + +* Bolt is good for read intensive workloads. Sequential write performance is + also fast but random writes can be slow. You can use `DB.Batch()` or add a + write-ahead log to help mitigate this issue. + +* Bolt uses a B+tree internally so there can be a lot of random page access. + SSDs provide a significant performance boost over spinning disks. + +* Try to avoid long running read transactions. Bolt uses copy-on-write so + old pages cannot be reclaimed while an old transaction is using them. + +* Byte slices returned from Bolt are only valid during a transaction. Once the + transaction has been committed or rolled back then the memory they point to + can be reused by a new page or can be unmapped from virtual memory and you'll + see an `unexpected fault address` panic when accessing it. + +* Be careful when using `Bucket.FillPercent`. Setting a high fill percent for + buckets that have random inserts will cause your database to have very poor + page utilization. + +* Use larger buckets in general. Smaller buckets causes poor page utilization + once they become larger than the page size (typically 4KB). + +* Bulk loading a lot of random writes into a new bucket can be slow as the + page will not split until the transaction is committed. Randomly inserting + more than 100,000 key/value pairs into a single new bucket in a single + transaction is not advised. + +* Bolt uses a memory-mapped file so the underlying operating system handles the + caching of the data. Typically, the OS will cache as much of the file as it + can in memory and will release memory as needed to other processes. This means + that Bolt can show very high memory usage when working with large databases. + However, this is expected and the OS will release memory as needed. Bolt can + handle databases much larger than the available physical RAM, provided its + memory-map fits in the process virtual address space. It may be problematic + on 32-bits systems. + +* The data structures in the Bolt database are memory mapped so the data file + will be endian specific. This means that you cannot copy a Bolt file from a + little endian machine to a big endian machine and have it work. For most + users this is not a concern since most modern CPUs are little endian. + +* Because of the way pages are laid out on disk, Bolt cannot truncate data files + and return free pages back to the disk. Instead, Bolt maintains a free list + of unused pages within its data file. These free pages can be reused by later + transactions. This works well for many use cases as databases generally tend + to grow. However, it's important to note that deleting large chunks of data + will not allow you to reclaim that space on disk. + + For more information on page allocation, [see this comment][page-allocation]. + +[page-allocation]: https://github.com/boltdb/bolt/issues/308#issuecomment-74811638 + + +## Reading the Source + +Bolt is a relatively small code base (<3KLOC) for an embedded, serializable, +transactional key/value database so it can be a good starting point for people +interested in how databases work. + +The best places to start are the main entry points into Bolt: + +- `Open()` - Initializes the reference to the database. It's responsible for + creating the database if it doesn't exist, obtaining an exclusive lock on the + file, reading the meta pages, & memory-mapping the file. + +- `DB.Begin()` - Starts a read-only or read-write transaction depending on the + value of the `writable` argument. This requires briefly obtaining the "meta" + lock to keep track of open transactions. Only one read-write transaction can + exist at a time so the "rwlock" is acquired during the life of a read-write + transaction. + +- `Bucket.Put()` - Writes a key/value pair into a bucket. After validating the + arguments, a cursor is used to traverse the B+tree to the page and position + where they key & value will be written. Once the position is found, the bucket + materializes the underlying page and the page's parent pages into memory as + "nodes". These nodes are where mutations occur during read-write transactions. + These changes get flushed to disk during commit. + +- `Bucket.Get()` - Retrieves a key/value pair from a bucket. This uses a cursor + to move to the page & position of a key/value pair. During a read-only + transaction, the key and value data is returned as a direct reference to the + underlying mmap file so there's no allocation overhead. For read-write + transactions, this data may reference the mmap file or one of the in-memory + node values. + +- `Cursor` - This object is simply for traversing the B+tree of on-disk pages + or in-memory nodes. It can seek to a specific key, move to the first or last + value, or it can move forward or backward. The cursor handles the movement up + and down the B+tree transparently to the end user. + +- `Tx.Commit()` - Converts the in-memory dirty nodes and the list of free pages + into pages to be written to disk. Writing to disk then occurs in two phases. + First, the dirty pages are written to disk and an `fsync()` occurs. Second, a + new meta page with an incremented transaction ID is written and another + `fsync()` occurs. This two phase write ensures that partially written data + pages are ignored in the event of a crash since the meta page pointing to them + is never written. Partially written meta pages are invalidated because they + are written with a checksum. + +If you have additional notes that could be helpful for others, please submit +them via pull request. + + +## Other Projects Using Bolt + +Below is a list of public, open source projects that use Bolt: + +* [Operation Go: A Routine Mission](http://gocode.io) - An online programming game for Golang using Bolt for user accounts and a leaderboard. +* [Bazil](https://bazil.org/) - A file system that lets your data reside where it is most convenient for it to reside. +* [DVID](https://github.com/janelia-flyem/dvid) - Added Bolt as optional storage engine and testing it against Basho-tuned leveldb. +* [Skybox Analytics](https://github.com/skybox/skybox) - A standalone funnel analysis tool for web analytics. +* [Scuttlebutt](https://github.com/benbjohnson/scuttlebutt) - Uses Bolt to store and process all Twitter mentions of GitHub projects. +* [Wiki](https://github.com/peterhellberg/wiki) - A tiny wiki using Goji, BoltDB and Blackfriday. +* [ChainStore](https://github.com/pressly/chainstore) - Simple key-value interface to a variety of storage engines organized as a chain of operations. +* [MetricBase](https://github.com/msiebuhr/MetricBase) - Single-binary version of Graphite. +* [Gitchain](https://github.com/gitchain/gitchain) - Decentralized, peer-to-peer Git repositories aka "Git meets Bitcoin". +* [event-shuttle](https://github.com/sclasen/event-shuttle) - A Unix system service to collect and reliably deliver messages to Kafka. +* [ipxed](https://github.com/kelseyhightower/ipxed) - Web interface and api for ipxed. +* [BoltStore](https://github.com/yosssi/boltstore) - Session store using Bolt. +* [photosite/session](https://godoc.org/bitbucket.org/kardianos/photosite/session) - Sessions for a photo viewing site. +* [LedisDB](https://github.com/siddontang/ledisdb) - A high performance NoSQL, using Bolt as optional storage. +* [ipLocator](https://github.com/AndreasBriese/ipLocator) - A fast ip-geo-location-server using bolt with bloom filters. +* [cayley](https://github.com/google/cayley) - Cayley is an open-source graph database using Bolt as optional backend. +* [bleve](http://www.blevesearch.com/) - A pure Go search engine similar to ElasticSearch that uses Bolt as the default storage backend. +* [tentacool](https://github.com/optiflows/tentacool) - REST api server to manage system stuff (IP, DNS, Gateway...) on a linux server. +* [SkyDB](https://github.com/skydb/sky) - Behavioral analytics database. +* [Seaweed File System](https://github.com/chrislusf/seaweedfs) - Highly scalable distributed key~file system with O(1) disk read. +* [InfluxDB](https://influxdata.com) - Scalable datastore for metrics, events, and real-time analytics. +* [Freehold](http://tshannon.bitbucket.org/freehold/) - An open, secure, and lightweight platform for your files and data. +* [Prometheus Annotation Server](https://github.com/oliver006/prom_annotation_server) - Annotation server for PromDash & Prometheus service monitoring system. +* [Consul](https://github.com/hashicorp/consul) - Consul is service discovery and configuration made easy. Distributed, highly available, and datacenter-aware. +* [Kala](https://github.com/ajvb/kala) - Kala is a modern job scheduler optimized to run on a single node. It is persistent, JSON over HTTP API, ISO 8601 duration notation, and dependent jobs. +* [drive](https://github.com/odeke-em/drive) - drive is an unofficial Google Drive command line client for \*NIX operating systems. +* [stow](https://github.com/djherbis/stow) - a persistence manager for objects + backed by boltdb. +* [buckets](https://github.com/joyrexus/buckets) - a bolt wrapper streamlining + simple tx and key scans. +* [mbuckets](https://github.com/abhigupta912/mbuckets) - A Bolt wrapper that allows easy operations on multi level (nested) buckets. +* [Request Baskets](https://github.com/darklynx/request-baskets) - A web service to collect arbitrary HTTP requests and inspect them via REST API or simple web UI, similar to [RequestBin](http://requestb.in/) service +* [Go Report Card](https://goreportcard.com/) - Go code quality report cards as a (free and open source) service. +* [Boltdb Boilerplate](https://github.com/bobintornado/boltdb-boilerplate) - Boilerplate wrapper around bolt aiming to make simple calls one-liners. +* [lru](https://github.com/crowdriff/lru) - Easy to use Bolt-backed Least-Recently-Used (LRU) read-through cache with chainable remote stores. +* [Storm](https://github.com/asdine/storm) - A simple ORM around BoltDB. +* [GoWebApp](https://github.com/josephspurrier/gowebapp) - A basic MVC web application in Go using BoltDB. + +If you are using Bolt in a project please send a pull request to add it to the list. diff --git a/vendor/github.com/boltdb/bolt/appveyor.yml b/vendor/github.com/boltdb/bolt/appveyor.yml new file mode 100644 index 000000000..6e26e941d --- /dev/null +++ b/vendor/github.com/boltdb/bolt/appveyor.yml @@ -0,0 +1,18 @@ +version: "{build}" + +os: Windows Server 2012 R2 + +clone_folder: c:\gopath\src\github.com\boltdb\bolt + +environment: + GOPATH: c:\gopath + +install: + - echo %PATH% + - echo %GOPATH% + - go version + - go env + - go get -v -t ./... + +build_script: + - go test -v ./... diff --git a/vendor/github.com/boltdb/bolt/bolt_386.go b/vendor/github.com/boltdb/bolt/bolt_386.go new file mode 100644 index 000000000..e659bfb91 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/bolt_386.go @@ -0,0 +1,7 @@ +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0x7FFFFFFF // 2GB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0xFFFFFFF diff --git a/vendor/github.com/boltdb/bolt/bolt_amd64.go b/vendor/github.com/boltdb/bolt/bolt_amd64.go new file mode 100644 index 000000000..cca6b7eb7 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/bolt_amd64.go @@ -0,0 +1,7 @@ +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF diff --git a/vendor/github.com/boltdb/bolt/bolt_arm.go b/vendor/github.com/boltdb/bolt/bolt_arm.go new file mode 100644 index 000000000..e659bfb91 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/bolt_arm.go @@ -0,0 +1,7 @@ +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0x7FFFFFFF // 2GB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0xFFFFFFF diff --git a/vendor/github.com/boltdb/bolt/bolt_arm64.go b/vendor/github.com/boltdb/bolt/bolt_arm64.go new file mode 100644 index 000000000..6d2309352 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/bolt_arm64.go @@ -0,0 +1,9 @@ +// +build arm64 + +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF diff --git a/vendor/github.com/boltdb/bolt/bolt_linux.go b/vendor/github.com/boltdb/bolt/bolt_linux.go new file mode 100644 index 000000000..2b6766614 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/bolt_linux.go @@ -0,0 +1,10 @@ +package bolt + +import ( + "syscall" +) + +// fdatasync flushes written data to a file descriptor. +func fdatasync(db *DB) error { + return syscall.Fdatasync(int(db.file.Fd())) +} diff --git a/vendor/github.com/boltdb/bolt/bolt_openbsd.go b/vendor/github.com/boltdb/bolt/bolt_openbsd.go new file mode 100644 index 000000000..7058c3d73 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/bolt_openbsd.go @@ -0,0 +1,27 @@ +package bolt + +import ( + "syscall" + "unsafe" +) + +const ( + msAsync = 1 << iota // perform asynchronous writes + msSync // perform synchronous writes + msInvalidate // invalidate cached data +) + +func msync(db *DB) error { + _, _, errno := syscall.Syscall(syscall.SYS_MSYNC, uintptr(unsafe.Pointer(db.data)), uintptr(db.datasz), msInvalidate) + if errno != 0 { + return errno + } + return nil +} + +func fdatasync(db *DB) error { + if db.data != nil { + return msync(db) + } + return db.file.Sync() +} diff --git a/vendor/github.com/boltdb/bolt/bolt_ppc.go b/vendor/github.com/boltdb/bolt/bolt_ppc.go new file mode 100644 index 000000000..645ddc3ed --- /dev/null +++ b/vendor/github.com/boltdb/bolt/bolt_ppc.go @@ -0,0 +1,9 @@ +// +build ppc + +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0x7FFFFFFF // 2GB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0xFFFFFFF diff --git a/vendor/github.com/boltdb/bolt/bolt_ppc64.go b/vendor/github.com/boltdb/bolt/bolt_ppc64.go new file mode 100644 index 000000000..2dc6be02e --- /dev/null +++ b/vendor/github.com/boltdb/bolt/bolt_ppc64.go @@ -0,0 +1,9 @@ +// +build ppc64 + +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF diff --git a/vendor/github.com/boltdb/bolt/bolt_ppc64le.go b/vendor/github.com/boltdb/bolt/bolt_ppc64le.go new file mode 100644 index 000000000..8351e129f --- /dev/null +++ b/vendor/github.com/boltdb/bolt/bolt_ppc64le.go @@ -0,0 +1,9 @@ +// +build ppc64le + +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF diff --git a/vendor/github.com/boltdb/bolt/bolt_s390x.go b/vendor/github.com/boltdb/bolt/bolt_s390x.go new file mode 100644 index 000000000..f4dd26bbb --- /dev/null +++ b/vendor/github.com/boltdb/bolt/bolt_s390x.go @@ -0,0 +1,9 @@ +// +build s390x + +package bolt + +// maxMapSize represents the largest mmap size supported by Bolt. +const maxMapSize = 0xFFFFFFFFFFFF // 256TB + +// maxAllocSize is the size used when creating array pointers. +const maxAllocSize = 0x7FFFFFFF diff --git a/vendor/github.com/boltdb/bolt/bolt_unix.go b/vendor/github.com/boltdb/bolt/bolt_unix.go new file mode 100644 index 000000000..cad62dda1 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/bolt_unix.go @@ -0,0 +1,89 @@ +// +build !windows,!plan9,!solaris + +package bolt + +import ( + "fmt" + "os" + "syscall" + "time" + "unsafe" +) + +// flock acquires an advisory lock on a file descriptor. +func flock(db *DB, mode os.FileMode, exclusive bool, timeout time.Duration) error { + var t time.Time + for { + // If we're beyond our timeout then return an error. + // This can only occur after we've attempted a flock once. + if t.IsZero() { + t = time.Now() + } else if timeout > 0 && time.Since(t) > timeout { + return ErrTimeout + } + flag := syscall.LOCK_SH + if exclusive { + flag = syscall.LOCK_EX + } + + // Otherwise attempt to obtain an exclusive lock. + err := syscall.Flock(int(db.file.Fd()), flag|syscall.LOCK_NB) + if err == nil { + return nil + } else if err != syscall.EWOULDBLOCK { + return err + } + + // Wait for a bit and try again. + time.Sleep(50 * time.Millisecond) + } +} + +// funlock releases an advisory lock on a file descriptor. +func funlock(db *DB) error { + return syscall.Flock(int(db.file.Fd()), syscall.LOCK_UN) +} + +// mmap memory maps a DB's data file. +func mmap(db *DB, sz int) error { + // Map the data file to memory. + b, err := syscall.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED|db.MmapFlags) + if err != nil { + return err + } + + // Advise the kernel that the mmap is accessed randomly. + if err := madvise(b, syscall.MADV_RANDOM); err != nil { + return fmt.Errorf("madvise: %s", err) + } + + // Save the original byte slice and convert to a byte array pointer. + db.dataref = b + db.data = (*[maxMapSize]byte)(unsafe.Pointer(&b[0])) + db.datasz = sz + return nil +} + +// munmap unmaps a DB's data file from memory. +func munmap(db *DB) error { + // Ignore the unmap if we have no mapped data. + if db.dataref == nil { + return nil + } + + // Unmap using the original byte slice. + err := syscall.Munmap(db.dataref) + db.dataref = nil + db.data = nil + db.datasz = 0 + return err +} + +// NOTE: This function is copied from stdlib because it is not available on darwin. +func madvise(b []byte, advice int) (err error) { + _, _, e1 := syscall.Syscall(syscall.SYS_MADVISE, uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = e1 + } + return +} diff --git a/vendor/github.com/boltdb/bolt/bolt_unix_solaris.go b/vendor/github.com/boltdb/bolt/bolt_unix_solaris.go new file mode 100644 index 000000000..307bf2b3e --- /dev/null +++ b/vendor/github.com/boltdb/bolt/bolt_unix_solaris.go @@ -0,0 +1,90 @@ +package bolt + +import ( + "fmt" + "os" + "syscall" + "time" + "unsafe" + + "golang.org/x/sys/unix" +) + +// flock acquires an advisory lock on a file descriptor. +func flock(db *DB, mode os.FileMode, exclusive bool, timeout time.Duration) error { + var t time.Time + for { + // If we're beyond our timeout then return an error. + // This can only occur after we've attempted a flock once. + if t.IsZero() { + t = time.Now() + } else if timeout > 0 && time.Since(t) > timeout { + return ErrTimeout + } + var lock syscall.Flock_t + lock.Start = 0 + lock.Len = 0 + lock.Pid = 0 + lock.Whence = 0 + lock.Pid = 0 + if exclusive { + lock.Type = syscall.F_WRLCK + } else { + lock.Type = syscall.F_RDLCK + } + err := syscall.FcntlFlock(db.file.Fd(), syscall.F_SETLK, &lock) + if err == nil { + return nil + } else if err != syscall.EAGAIN { + return err + } + + // Wait for a bit and try again. + time.Sleep(50 * time.Millisecond) + } +} + +// funlock releases an advisory lock on a file descriptor. +func funlock(db *DB) error { + var lock syscall.Flock_t + lock.Start = 0 + lock.Len = 0 + lock.Type = syscall.F_UNLCK + lock.Whence = 0 + return syscall.FcntlFlock(uintptr(db.file.Fd()), syscall.F_SETLK, &lock) +} + +// mmap memory maps a DB's data file. +func mmap(db *DB, sz int) error { + // Map the data file to memory. + b, err := unix.Mmap(int(db.file.Fd()), 0, sz, syscall.PROT_READ, syscall.MAP_SHARED|db.MmapFlags) + if err != nil { + return err + } + + // Advise the kernel that the mmap is accessed randomly. + if err := unix.Madvise(b, syscall.MADV_RANDOM); err != nil { + return fmt.Errorf("madvise: %s", err) + } + + // Save the original byte slice and convert to a byte array pointer. + db.dataref = b + db.data = (*[maxMapSize]byte)(unsafe.Pointer(&b[0])) + db.datasz = sz + return nil +} + +// munmap unmaps a DB's data file from memory. +func munmap(db *DB) error { + // Ignore the unmap if we have no mapped data. + if db.dataref == nil { + return nil + } + + // Unmap using the original byte slice. + err := unix.Munmap(db.dataref) + db.dataref = nil + db.data = nil + db.datasz = 0 + return err +} diff --git a/vendor/github.com/boltdb/bolt/bolt_windows.go b/vendor/github.com/boltdb/bolt/bolt_windows.go new file mode 100644 index 000000000..d538e6afd --- /dev/null +++ b/vendor/github.com/boltdb/bolt/bolt_windows.go @@ -0,0 +1,144 @@ +package bolt + +import ( + "fmt" + "os" + "syscall" + "time" + "unsafe" +) + +// LockFileEx code derived from golang build filemutex_windows.go @ v1.5.1 +var ( + modkernel32 = syscall.NewLazyDLL("kernel32.dll") + procLockFileEx = modkernel32.NewProc("LockFileEx") + procUnlockFileEx = modkernel32.NewProc("UnlockFileEx") +) + +const ( + lockExt = ".lock" + + // see https://msdn.microsoft.com/en-us/library/windows/desktop/aa365203(v=vs.85).aspx + flagLockExclusive = 2 + flagLockFailImmediately = 1 + + // see https://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).aspx + errLockViolation syscall.Errno = 0x21 +) + +func lockFileEx(h syscall.Handle, flags, reserved, locklow, lockhigh uint32, ol *syscall.Overlapped) (err error) { + r, _, err := procLockFileEx.Call(uintptr(h), uintptr(flags), uintptr(reserved), uintptr(locklow), uintptr(lockhigh), uintptr(unsafe.Pointer(ol))) + if r == 0 { + return err + } + return nil +} + +func unlockFileEx(h syscall.Handle, reserved, locklow, lockhigh uint32, ol *syscall.Overlapped) (err error) { + r, _, err := procUnlockFileEx.Call(uintptr(h), uintptr(reserved), uintptr(locklow), uintptr(lockhigh), uintptr(unsafe.Pointer(ol)), 0) + if r == 0 { + return err + } + return nil +} + +// fdatasync flushes written data to a file descriptor. +func fdatasync(db *DB) error { + return db.file.Sync() +} + +// flock acquires an advisory lock on a file descriptor. +func flock(db *DB, mode os.FileMode, exclusive bool, timeout time.Duration) error { + // Create a separate lock file on windows because a process + // cannot share an exclusive lock on the same file. This is + // needed during Tx.WriteTo(). + f, err := os.OpenFile(db.path+lockExt, os.O_CREATE, mode) + if err != nil { + return err + } + db.lockfile = f + + var t time.Time + for { + // If we're beyond our timeout then return an error. + // This can only occur after we've attempted a flock once. + if t.IsZero() { + t = time.Now() + } else if timeout > 0 && time.Since(t) > timeout { + return ErrTimeout + } + + var flag uint32 = flagLockFailImmediately + if exclusive { + flag |= flagLockExclusive + } + + err := lockFileEx(syscall.Handle(db.lockfile.Fd()), flag, 0, 1, 0, &syscall.Overlapped{}) + if err == nil { + return nil + } else if err != errLockViolation { + return err + } + + // Wait for a bit and try again. + time.Sleep(50 * time.Millisecond) + } +} + +// funlock releases an advisory lock on a file descriptor. +func funlock(db *DB) error { + err := unlockFileEx(syscall.Handle(db.lockfile.Fd()), 0, 1, 0, &syscall.Overlapped{}) + db.lockfile.Close() + os.Remove(db.path+lockExt) + return err +} + +// mmap memory maps a DB's data file. +// Based on: https://github.com/edsrzf/mmap-go +func mmap(db *DB, sz int) error { + if !db.readOnly { + // Truncate the database to the size of the mmap. + if err := db.file.Truncate(int64(sz)); err != nil { + return fmt.Errorf("truncate: %s", err) + } + } + + // Open a file mapping handle. + sizelo := uint32(sz >> 32) + sizehi := uint32(sz) & 0xffffffff + h, errno := syscall.CreateFileMapping(syscall.Handle(db.file.Fd()), nil, syscall.PAGE_READONLY, sizelo, sizehi, nil) + if h == 0 { + return os.NewSyscallError("CreateFileMapping", errno) + } + + // Create the memory map. + addr, errno := syscall.MapViewOfFile(h, syscall.FILE_MAP_READ, 0, 0, uintptr(sz)) + if addr == 0 { + return os.NewSyscallError("MapViewOfFile", errno) + } + + // Close mapping handle. + if err := syscall.CloseHandle(syscall.Handle(h)); err != nil { + return os.NewSyscallError("CloseHandle", err) + } + + // Convert to a byte array. + db.data = ((*[maxMapSize]byte)(unsafe.Pointer(addr))) + db.datasz = sz + + return nil +} + +// munmap unmaps a pointer from a file. +// Based on: https://github.com/edsrzf/mmap-go +func munmap(db *DB) error { + if db.data == nil { + return nil + } + + addr := (uintptr)(unsafe.Pointer(&db.data[0])) + if err := syscall.UnmapViewOfFile(addr); err != nil { + return os.NewSyscallError("UnmapViewOfFile", err) + } + return nil +} diff --git a/vendor/github.com/boltdb/bolt/boltsync_unix.go b/vendor/github.com/boltdb/bolt/boltsync_unix.go new file mode 100644 index 000000000..f50442523 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/boltsync_unix.go @@ -0,0 +1,8 @@ +// +build !windows,!plan9,!linux,!openbsd + +package bolt + +// fdatasync flushes written data to a file descriptor. +func fdatasync(db *DB) error { + return db.file.Sync() +} diff --git a/vendor/github.com/boltdb/bolt/bucket.go b/vendor/github.com/boltdb/bolt/bucket.go new file mode 100644 index 000000000..d2f8c524e --- /dev/null +++ b/vendor/github.com/boltdb/bolt/bucket.go @@ -0,0 +1,748 @@ +package bolt + +import ( + "bytes" + "fmt" + "unsafe" +) + +const ( + // MaxKeySize is the maximum length of a key, in bytes. + MaxKeySize = 32768 + + // MaxValueSize is the maximum length of a value, in bytes. + MaxValueSize = (1 << 31) - 2 +) + +const ( + maxUint = ^uint(0) + minUint = 0 + maxInt = int(^uint(0) >> 1) + minInt = -maxInt - 1 +) + +const bucketHeaderSize = int(unsafe.Sizeof(bucket{})) + +const ( + minFillPercent = 0.1 + maxFillPercent = 1.0 +) + +// DefaultFillPercent is the percentage that split pages are filled. +// This value can be changed by setting Bucket.FillPercent. +const DefaultFillPercent = 0.5 + +// Bucket represents a collection of key/value pairs inside the database. +type Bucket struct { + *bucket + tx *Tx // the associated transaction + buckets map[string]*Bucket // subbucket cache + page *page // inline page reference + rootNode *node // materialized node for the root page. + nodes map[pgid]*node // node cache + + // Sets the threshold for filling nodes when they split. By default, + // the bucket will fill to 50% but it can be useful to increase this + // amount if you know that your write workloads are mostly append-only. + // + // This is non-persisted across transactions so it must be set in every Tx. + FillPercent float64 +} + +// bucket represents the on-file representation of a bucket. +// This is stored as the "value" of a bucket key. If the bucket is small enough, +// then its root page can be stored inline in the "value", after the bucket +// header. In the case of inline buckets, the "root" will be 0. +type bucket struct { + root pgid // page id of the bucket's root-level page + sequence uint64 // monotonically incrementing, used by NextSequence() +} + +// newBucket returns a new bucket associated with a transaction. +func newBucket(tx *Tx) Bucket { + var b = Bucket{tx: tx, FillPercent: DefaultFillPercent} + if tx.writable { + b.buckets = make(map[string]*Bucket) + b.nodes = make(map[pgid]*node) + } + return b +} + +// Tx returns the tx of the bucket. +func (b *Bucket) Tx() *Tx { + return b.tx +} + +// Root returns the root of the bucket. +func (b *Bucket) Root() pgid { + return b.root +} + +// Writable returns whether the bucket is writable. +func (b *Bucket) Writable() bool { + return b.tx.writable +} + +// Cursor creates a cursor associated with the bucket. +// The cursor is only valid as long as the transaction is open. +// Do not use a cursor after the transaction is closed. +func (b *Bucket) Cursor() *Cursor { + // Update transaction statistics. + b.tx.stats.CursorCount++ + + // Allocate and return a cursor. + return &Cursor{ + bucket: b, + stack: make([]elemRef, 0), + } +} + +// Bucket retrieves a nested bucket by name. +// Returns nil if the bucket does not exist. +// The bucket instance is only valid for the lifetime of the transaction. +func (b *Bucket) Bucket(name []byte) *Bucket { + if b.buckets != nil { + if child := b.buckets[string(name)]; child != nil { + return child + } + } + + // Move cursor to key. + c := b.Cursor() + k, v, flags := c.seek(name) + + // Return nil if the key doesn't exist or it is not a bucket. + if !bytes.Equal(name, k) || (flags&bucketLeafFlag) == 0 { + return nil + } + + // Otherwise create a bucket and cache it. + var child = b.openBucket(v) + if b.buckets != nil { + b.buckets[string(name)] = child + } + + return child +} + +// Helper method that re-interprets a sub-bucket value +// from a parent into a Bucket +func (b *Bucket) openBucket(value []byte) *Bucket { + var child = newBucket(b.tx) + + // If this is a writable transaction then we need to copy the bucket entry. + // Read-only transactions can point directly at the mmap entry. + if b.tx.writable { + child.bucket = &bucket{} + *child.bucket = *(*bucket)(unsafe.Pointer(&value[0])) + } else { + child.bucket = (*bucket)(unsafe.Pointer(&value[0])) + } + + // Save a reference to the inline page if the bucket is inline. + if child.root == 0 { + child.page = (*page)(unsafe.Pointer(&value[bucketHeaderSize])) + } + + return &child +} + +// CreateBucket creates a new bucket at the given key and returns the new bucket. +// Returns an error if the key already exists, if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. +func (b *Bucket) CreateBucket(key []byte) (*Bucket, error) { + if b.tx.db == nil { + return nil, ErrTxClosed + } else if !b.tx.writable { + return nil, ErrTxNotWritable + } else if len(key) == 0 { + return nil, ErrBucketNameRequired + } + + // Move cursor to correct position. + c := b.Cursor() + k, _, flags := c.seek(key) + + // Return an error if there is an existing key. + if bytes.Equal(key, k) { + if (flags & bucketLeafFlag) != 0 { + return nil, ErrBucketExists + } else { + return nil, ErrIncompatibleValue + } + } + + // Create empty, inline bucket. + var bucket = Bucket{ + bucket: &bucket{}, + rootNode: &node{isLeaf: true}, + FillPercent: DefaultFillPercent, + } + var value = bucket.write() + + // Insert into node. + key = cloneBytes(key) + c.node().put(key, key, value, 0, bucketLeafFlag) + + // Since subbuckets are not allowed on inline buckets, we need to + // dereference the inline page, if it exists. This will cause the bucket + // to be treated as a regular, non-inline bucket for the rest of the tx. + b.page = nil + + return b.Bucket(key), nil +} + +// CreateBucketIfNotExists creates a new bucket if it doesn't already exist and returns a reference to it. +// Returns an error if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. +func (b *Bucket) CreateBucketIfNotExists(key []byte) (*Bucket, error) { + child, err := b.CreateBucket(key) + if err == ErrBucketExists { + return b.Bucket(key), nil + } else if err != nil { + return nil, err + } + return child, nil +} + +// DeleteBucket deletes a bucket at the given key. +// Returns an error if the bucket does not exists, or if the key represents a non-bucket value. +func (b *Bucket) DeleteBucket(key []byte) error { + if b.tx.db == nil { + return ErrTxClosed + } else if !b.Writable() { + return ErrTxNotWritable + } + + // Move cursor to correct position. + c := b.Cursor() + k, _, flags := c.seek(key) + + // Return an error if bucket doesn't exist or is not a bucket. + if !bytes.Equal(key, k) { + return ErrBucketNotFound + } else if (flags & bucketLeafFlag) == 0 { + return ErrIncompatibleValue + } + + // Recursively delete all child buckets. + child := b.Bucket(key) + err := child.ForEach(func(k, v []byte) error { + if v == nil { + if err := child.DeleteBucket(k); err != nil { + return fmt.Errorf("delete bucket: %s", err) + } + } + return nil + }) + if err != nil { + return err + } + + // Remove cached copy. + delete(b.buckets, string(key)) + + // Release all bucket pages to freelist. + child.nodes = nil + child.rootNode = nil + child.free() + + // Delete the node if we have a matching key. + c.node().del(key) + + return nil +} + +// Get retrieves the value for a key in the bucket. +// Returns a nil value if the key does not exist or if the key is a nested bucket. +// The returned value is only valid for the life of the transaction. +func (b *Bucket) Get(key []byte) []byte { + k, v, flags := b.Cursor().seek(key) + + // Return nil if this is a bucket. + if (flags & bucketLeafFlag) != 0 { + return nil + } + + // If our target node isn't the same key as what's passed in then return nil. + if !bytes.Equal(key, k) { + return nil + } + return v +} + +// Put sets the value for a key in the bucket. +// If the key exist then its previous value will be overwritten. +// Supplied value must remain valid for the life of the transaction. +// Returns an error if the bucket was created from a read-only transaction, if the key is blank, if the key is too large, or if the value is too large. +func (b *Bucket) Put(key []byte, value []byte) error { + if b.tx.db == nil { + return ErrTxClosed + } else if !b.Writable() { + return ErrTxNotWritable + } else if len(key) == 0 { + return ErrKeyRequired + } else if len(key) > MaxKeySize { + return ErrKeyTooLarge + } else if int64(len(value)) > MaxValueSize { + return ErrValueTooLarge + } + + // Move cursor to correct position. + c := b.Cursor() + k, _, flags := c.seek(key) + + // Return an error if there is an existing key with a bucket value. + if bytes.Equal(key, k) && (flags&bucketLeafFlag) != 0 { + return ErrIncompatibleValue + } + + // Insert into node. + key = cloneBytes(key) + c.node().put(key, key, value, 0, 0) + + return nil +} + +// Delete removes a key from the bucket. +// If the key does not exist then nothing is done and a nil error is returned. +// Returns an error if the bucket was created from a read-only transaction. +func (b *Bucket) Delete(key []byte) error { + if b.tx.db == nil { + return ErrTxClosed + } else if !b.Writable() { + return ErrTxNotWritable + } + + // Move cursor to correct position. + c := b.Cursor() + _, _, flags := c.seek(key) + + // Return an error if there is already existing bucket value. + if (flags & bucketLeafFlag) != 0 { + return ErrIncompatibleValue + } + + // Delete the node if we have a matching key. + c.node().del(key) + + return nil +} + +// NextSequence returns an autoincrementing integer for the bucket. +func (b *Bucket) NextSequence() (uint64, error) { + if b.tx.db == nil { + return 0, ErrTxClosed + } else if !b.Writable() { + return 0, ErrTxNotWritable + } + + // Materialize the root node if it hasn't been already so that the + // bucket will be saved during commit. + if b.rootNode == nil { + _ = b.node(b.root, nil) + } + + // Increment and return the sequence. + b.bucket.sequence++ + return b.bucket.sequence, nil +} + +// ForEach executes a function for each key/value pair in a bucket. +// If the provided function returns an error then the iteration is stopped and +// the error is returned to the caller. The provided function must not modify +// the bucket; this will result in undefined behavior. +func (b *Bucket) ForEach(fn func(k, v []byte) error) error { + if b.tx.db == nil { + return ErrTxClosed + } + c := b.Cursor() + for k, v := c.First(); k != nil; k, v = c.Next() { + if err := fn(k, v); err != nil { + return err + } + } + return nil +} + +// Stat returns stats on a bucket. +func (b *Bucket) Stats() BucketStats { + var s, subStats BucketStats + pageSize := b.tx.db.pageSize + s.BucketN += 1 + if b.root == 0 { + s.InlineBucketN += 1 + } + b.forEachPage(func(p *page, depth int) { + if (p.flags & leafPageFlag) != 0 { + s.KeyN += int(p.count) + + // used totals the used bytes for the page + used := pageHeaderSize + + if p.count != 0 { + // If page has any elements, add all element headers. + used += leafPageElementSize * int(p.count-1) + + // Add all element key, value sizes. + // The computation takes advantage of the fact that the position + // of the last element's key/value equals to the total of the sizes + // of all previous elements' keys and values. + // It also includes the last element's header. + lastElement := p.leafPageElement(p.count - 1) + used += int(lastElement.pos + lastElement.ksize + lastElement.vsize) + } + + if b.root == 0 { + // For inlined bucket just update the inline stats + s.InlineBucketInuse += used + } else { + // For non-inlined bucket update all the leaf stats + s.LeafPageN++ + s.LeafInuse += used + s.LeafOverflowN += int(p.overflow) + + // Collect stats from sub-buckets. + // Do that by iterating over all element headers + // looking for the ones with the bucketLeafFlag. + for i := uint16(0); i < p.count; i++ { + e := p.leafPageElement(i) + if (e.flags & bucketLeafFlag) != 0 { + // For any bucket element, open the element value + // and recursively call Stats on the contained bucket. + subStats.Add(b.openBucket(e.value()).Stats()) + } + } + } + } else if (p.flags & branchPageFlag) != 0 { + s.BranchPageN++ + lastElement := p.branchPageElement(p.count - 1) + + // used totals the used bytes for the page + // Add header and all element headers. + used := pageHeaderSize + (branchPageElementSize * int(p.count-1)) + + // Add size of all keys and values. + // Again, use the fact that last element's position equals to + // the total of key, value sizes of all previous elements. + used += int(lastElement.pos + lastElement.ksize) + s.BranchInuse += used + s.BranchOverflowN += int(p.overflow) + } + + // Keep track of maximum page depth. + if depth+1 > s.Depth { + s.Depth = (depth + 1) + } + }) + + // Alloc stats can be computed from page counts and pageSize. + s.BranchAlloc = (s.BranchPageN + s.BranchOverflowN) * pageSize + s.LeafAlloc = (s.LeafPageN + s.LeafOverflowN) * pageSize + + // Add the max depth of sub-buckets to get total nested depth. + s.Depth += subStats.Depth + // Add the stats for all sub-buckets + s.Add(subStats) + return s +} + +// forEachPage iterates over every page in a bucket, including inline pages. +func (b *Bucket) forEachPage(fn func(*page, int)) { + // If we have an inline page then just use that. + if b.page != nil { + fn(b.page, 0) + return + } + + // Otherwise traverse the page hierarchy. + b.tx.forEachPage(b.root, 0, fn) +} + +// forEachPageNode iterates over every page (or node) in a bucket. +// This also includes inline pages. +func (b *Bucket) forEachPageNode(fn func(*page, *node, int)) { + // If we have an inline page or root node then just use that. + if b.page != nil { + fn(b.page, nil, 0) + return + } + b._forEachPageNode(b.root, 0, fn) +} + +func (b *Bucket) _forEachPageNode(pgid pgid, depth int, fn func(*page, *node, int)) { + var p, n = b.pageNode(pgid) + + // Execute function. + fn(p, n, depth) + + // Recursively loop over children. + if p != nil { + if (p.flags & branchPageFlag) != 0 { + for i := 0; i < int(p.count); i++ { + elem := p.branchPageElement(uint16(i)) + b._forEachPageNode(elem.pgid, depth+1, fn) + } + } + } else { + if !n.isLeaf { + for _, inode := range n.inodes { + b._forEachPageNode(inode.pgid, depth+1, fn) + } + } + } +} + +// spill writes all the nodes for this bucket to dirty pages. +func (b *Bucket) spill() error { + // Spill all child buckets first. + for name, child := range b.buckets { + // If the child bucket is small enough and it has no child buckets then + // write it inline into the parent bucket's page. Otherwise spill it + // like a normal bucket and make the parent value a pointer to the page. + var value []byte + if child.inlineable() { + child.free() + value = child.write() + } else { + if err := child.spill(); err != nil { + return err + } + + // Update the child bucket header in this bucket. + value = make([]byte, unsafe.Sizeof(bucket{})) + var bucket = (*bucket)(unsafe.Pointer(&value[0])) + *bucket = *child.bucket + } + + // Skip writing the bucket if there are no materialized nodes. + if child.rootNode == nil { + continue + } + + // Update parent node. + var c = b.Cursor() + k, _, flags := c.seek([]byte(name)) + if !bytes.Equal([]byte(name), k) { + panic(fmt.Sprintf("misplaced bucket header: %x -> %x", []byte(name), k)) + } + if flags&bucketLeafFlag == 0 { + panic(fmt.Sprintf("unexpected bucket header flag: %x", flags)) + } + c.node().put([]byte(name), []byte(name), value, 0, bucketLeafFlag) + } + + // Ignore if there's not a materialized root node. + if b.rootNode == nil { + return nil + } + + // Spill nodes. + if err := b.rootNode.spill(); err != nil { + return err + } + b.rootNode = b.rootNode.root() + + // Update the root node for this bucket. + if b.rootNode.pgid >= b.tx.meta.pgid { + panic(fmt.Sprintf("pgid (%d) above high water mark (%d)", b.rootNode.pgid, b.tx.meta.pgid)) + } + b.root = b.rootNode.pgid + + return nil +} + +// inlineable returns true if a bucket is small enough to be written inline +// and if it contains no subbuckets. Otherwise returns false. +func (b *Bucket) inlineable() bool { + var n = b.rootNode + + // Bucket must only contain a single leaf node. + if n == nil || !n.isLeaf { + return false + } + + // Bucket is not inlineable if it contains subbuckets or if it goes beyond + // our threshold for inline bucket size. + var size = pageHeaderSize + for _, inode := range n.inodes { + size += leafPageElementSize + len(inode.key) + len(inode.value) + + if inode.flags&bucketLeafFlag != 0 { + return false + } else if size > b.maxInlineBucketSize() { + return false + } + } + + return true +} + +// Returns the maximum total size of a bucket to make it a candidate for inlining. +func (b *Bucket) maxInlineBucketSize() int { + return b.tx.db.pageSize / 4 +} + +// write allocates and writes a bucket to a byte slice. +func (b *Bucket) write() []byte { + // Allocate the appropriate size. + var n = b.rootNode + var value = make([]byte, bucketHeaderSize+n.size()) + + // Write a bucket header. + var bucket = (*bucket)(unsafe.Pointer(&value[0])) + *bucket = *b.bucket + + // Convert byte slice to a fake page and write the root node. + var p = (*page)(unsafe.Pointer(&value[bucketHeaderSize])) + n.write(p) + + return value +} + +// rebalance attempts to balance all nodes. +func (b *Bucket) rebalance() { + for _, n := range b.nodes { + n.rebalance() + } + for _, child := range b.buckets { + child.rebalance() + } +} + +// node creates a node from a page and associates it with a given parent. +func (b *Bucket) node(pgid pgid, parent *node) *node { + _assert(b.nodes != nil, "nodes map expected") + + // Retrieve node if it's already been created. + if n := b.nodes[pgid]; n != nil { + return n + } + + // Otherwise create a node and cache it. + n := &node{bucket: b, parent: parent} + if parent == nil { + b.rootNode = n + } else { + parent.children = append(parent.children, n) + } + + // Use the inline page if this is an inline bucket. + var p = b.page + if p == nil { + p = b.tx.page(pgid) + } + + // Read the page into the node and cache it. + n.read(p) + b.nodes[pgid] = n + + // Update statistics. + b.tx.stats.NodeCount++ + + return n +} + +// free recursively frees all pages in the bucket. +func (b *Bucket) free() { + if b.root == 0 { + return + } + + var tx = b.tx + b.forEachPageNode(func(p *page, n *node, _ int) { + if p != nil { + tx.db.freelist.free(tx.meta.txid, p) + } else { + n.free() + } + }) + b.root = 0 +} + +// dereference removes all references to the old mmap. +func (b *Bucket) dereference() { + if b.rootNode != nil { + b.rootNode.root().dereference() + } + + for _, child := range b.buckets { + child.dereference() + } +} + +// pageNode returns the in-memory node, if it exists. +// Otherwise returns the underlying page. +func (b *Bucket) pageNode(id pgid) (*page, *node) { + // Inline buckets have a fake page embedded in their value so treat them + // differently. We'll return the rootNode (if available) or the fake page. + if b.root == 0 { + if id != 0 { + panic(fmt.Sprintf("inline bucket non-zero page access(2): %d != 0", id)) + } + if b.rootNode != nil { + return nil, b.rootNode + } + return b.page, nil + } + + // Check the node cache for non-inline buckets. + if b.nodes != nil { + if n := b.nodes[id]; n != nil { + return nil, n + } + } + + // Finally lookup the page from the transaction if no node is materialized. + return b.tx.page(id), nil +} + +// BucketStats records statistics about resources used by a bucket. +type BucketStats struct { + // Page count statistics. + BranchPageN int // number of logical branch pages + BranchOverflowN int // number of physical branch overflow pages + LeafPageN int // number of logical leaf pages + LeafOverflowN int // number of physical leaf overflow pages + + // Tree statistics. + KeyN int // number of keys/value pairs + Depth int // number of levels in B+tree + + // Page size utilization. + BranchAlloc int // bytes allocated for physical branch pages + BranchInuse int // bytes actually used for branch data + LeafAlloc int // bytes allocated for physical leaf pages + LeafInuse int // bytes actually used for leaf data + + // Bucket statistics + BucketN int // total number of buckets including the top bucket + InlineBucketN int // total number on inlined buckets + InlineBucketInuse int // bytes used for inlined buckets (also accounted for in LeafInuse) +} + +func (s *BucketStats) Add(other BucketStats) { + s.BranchPageN += other.BranchPageN + s.BranchOverflowN += other.BranchOverflowN + s.LeafPageN += other.LeafPageN + s.LeafOverflowN += other.LeafOverflowN + s.KeyN += other.KeyN + if s.Depth < other.Depth { + s.Depth = other.Depth + } + s.BranchAlloc += other.BranchAlloc + s.BranchInuse += other.BranchInuse + s.LeafAlloc += other.LeafAlloc + s.LeafInuse += other.LeafInuse + + s.BucketN += other.BucketN + s.InlineBucketN += other.InlineBucketN + s.InlineBucketInuse += other.InlineBucketInuse +} + +// cloneBytes returns a copy of a given slice. +func cloneBytes(v []byte) []byte { + var clone = make([]byte, len(v)) + copy(clone, v) + return clone +} diff --git a/vendor/github.com/boltdb/bolt/cursor.go b/vendor/github.com/boltdb/bolt/cursor.go new file mode 100644 index 000000000..1be9f35e3 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/cursor.go @@ -0,0 +1,400 @@ +package bolt + +import ( + "bytes" + "fmt" + "sort" +) + +// Cursor represents an iterator that can traverse over all key/value pairs in a bucket in sorted order. +// Cursors see nested buckets with value == nil. +// Cursors can be obtained from a transaction and are valid as long as the transaction is open. +// +// Keys and values returned from the cursor are only valid for the life of the transaction. +// +// Changing data while traversing with a cursor may cause it to be invalidated +// and return unexpected keys and/or values. You must reposition your cursor +// after mutating data. +type Cursor struct { + bucket *Bucket + stack []elemRef +} + +// Bucket returns the bucket that this cursor was created from. +func (c *Cursor) Bucket() *Bucket { + return c.bucket +} + +// First moves the cursor to the first item in the bucket and returns its key and value. +// If the bucket is empty then a nil key and value are returned. +// The returned key and value are only valid for the life of the transaction. +func (c *Cursor) First() (key []byte, value []byte) { + _assert(c.bucket.tx.db != nil, "tx closed") + c.stack = c.stack[:0] + p, n := c.bucket.pageNode(c.bucket.root) + c.stack = append(c.stack, elemRef{page: p, node: n, index: 0}) + c.first() + + // If we land on an empty page then move to the next value. + // https://github.com/boltdb/bolt/issues/450 + if c.stack[len(c.stack)-1].count() == 0 { + c.next() + } + + k, v, flags := c.keyValue() + if (flags & uint32(bucketLeafFlag)) != 0 { + return k, nil + } + return k, v + +} + +// Last moves the cursor to the last item in the bucket and returns its key and value. +// If the bucket is empty then a nil key and value are returned. +// The returned key and value are only valid for the life of the transaction. +func (c *Cursor) Last() (key []byte, value []byte) { + _assert(c.bucket.tx.db != nil, "tx closed") + c.stack = c.stack[:0] + p, n := c.bucket.pageNode(c.bucket.root) + ref := elemRef{page: p, node: n} + ref.index = ref.count() - 1 + c.stack = append(c.stack, ref) + c.last() + k, v, flags := c.keyValue() + if (flags & uint32(bucketLeafFlag)) != 0 { + return k, nil + } + return k, v +} + +// Next moves the cursor to the next item in the bucket and returns its key and value. +// If the cursor is at the end of the bucket then a nil key and value are returned. +// The returned key and value are only valid for the life of the transaction. +func (c *Cursor) Next() (key []byte, value []byte) { + _assert(c.bucket.tx.db != nil, "tx closed") + k, v, flags := c.next() + if (flags & uint32(bucketLeafFlag)) != 0 { + return k, nil + } + return k, v +} + +// Prev moves the cursor to the previous item in the bucket and returns its key and value. +// If the cursor is at the beginning of the bucket then a nil key and value are returned. +// The returned key and value are only valid for the life of the transaction. +func (c *Cursor) Prev() (key []byte, value []byte) { + _assert(c.bucket.tx.db != nil, "tx closed") + + // Attempt to move back one element until we're successful. + // Move up the stack as we hit the beginning of each page in our stack. + for i := len(c.stack) - 1; i >= 0; i-- { + elem := &c.stack[i] + if elem.index > 0 { + elem.index-- + break + } + c.stack = c.stack[:i] + } + + // If we've hit the end then return nil. + if len(c.stack) == 0 { + return nil, nil + } + + // Move down the stack to find the last element of the last leaf under this branch. + c.last() + k, v, flags := c.keyValue() + if (flags & uint32(bucketLeafFlag)) != 0 { + return k, nil + } + return k, v +} + +// Seek moves the cursor to a given key and returns it. +// If the key does not exist then the next key is used. If no keys +// follow, a nil key is returned. +// The returned key and value are only valid for the life of the transaction. +func (c *Cursor) Seek(seek []byte) (key []byte, value []byte) { + k, v, flags := c.seek(seek) + + // If we ended up after the last element of a page then move to the next one. + if ref := &c.stack[len(c.stack)-1]; ref.index >= ref.count() { + k, v, flags = c.next() + } + + if k == nil { + return nil, nil + } else if (flags & uint32(bucketLeafFlag)) != 0 { + return k, nil + } + return k, v +} + +// Delete removes the current key/value under the cursor from the bucket. +// Delete fails if current key/value is a bucket or if the transaction is not writable. +func (c *Cursor) Delete() error { + if c.bucket.tx.db == nil { + return ErrTxClosed + } else if !c.bucket.Writable() { + return ErrTxNotWritable + } + + key, _, flags := c.keyValue() + // Return an error if current value is a bucket. + if (flags & bucketLeafFlag) != 0 { + return ErrIncompatibleValue + } + c.node().del(key) + + return nil +} + +// seek moves the cursor to a given key and returns it. +// If the key does not exist then the next key is used. +func (c *Cursor) seek(seek []byte) (key []byte, value []byte, flags uint32) { + _assert(c.bucket.tx.db != nil, "tx closed") + + // Start from root page/node and traverse to correct page. + c.stack = c.stack[:0] + c.search(seek, c.bucket.root) + ref := &c.stack[len(c.stack)-1] + + // If the cursor is pointing to the end of page/node then return nil. + if ref.index >= ref.count() { + return nil, nil, 0 + } + + // If this is a bucket then return a nil value. + return c.keyValue() +} + +// first moves the cursor to the first leaf element under the last page in the stack. +func (c *Cursor) first() { + for { + // Exit when we hit a leaf page. + var ref = &c.stack[len(c.stack)-1] + if ref.isLeaf() { + break + } + + // Keep adding pages pointing to the first element to the stack. + var pgid pgid + if ref.node != nil { + pgid = ref.node.inodes[ref.index].pgid + } else { + pgid = ref.page.branchPageElement(uint16(ref.index)).pgid + } + p, n := c.bucket.pageNode(pgid) + c.stack = append(c.stack, elemRef{page: p, node: n, index: 0}) + } +} + +// last moves the cursor to the last leaf element under the last page in the stack. +func (c *Cursor) last() { + for { + // Exit when we hit a leaf page. + ref := &c.stack[len(c.stack)-1] + if ref.isLeaf() { + break + } + + // Keep adding pages pointing to the last element in the stack. + var pgid pgid + if ref.node != nil { + pgid = ref.node.inodes[ref.index].pgid + } else { + pgid = ref.page.branchPageElement(uint16(ref.index)).pgid + } + p, n := c.bucket.pageNode(pgid) + + var nextRef = elemRef{page: p, node: n} + nextRef.index = nextRef.count() - 1 + c.stack = append(c.stack, nextRef) + } +} + +// next moves to the next leaf element and returns the key and value. +// If the cursor is at the last leaf element then it stays there and returns nil. +func (c *Cursor) next() (key []byte, value []byte, flags uint32) { + for { + // Attempt to move over one element until we're successful. + // Move up the stack as we hit the end of each page in our stack. + var i int + for i = len(c.stack) - 1; i >= 0; i-- { + elem := &c.stack[i] + if elem.index < elem.count()-1 { + elem.index++ + break + } + } + + // If we've hit the root page then stop and return. This will leave the + // cursor on the last element of the last page. + if i == -1 { + return nil, nil, 0 + } + + // Otherwise start from where we left off in the stack and find the + // first element of the first leaf page. + c.stack = c.stack[:i+1] + c.first() + + // If this is an empty page then restart and move back up the stack. + // https://github.com/boltdb/bolt/issues/450 + if c.stack[len(c.stack)-1].count() == 0 { + continue + } + + return c.keyValue() + } +} + +// search recursively performs a binary search against a given page/node until it finds a given key. +func (c *Cursor) search(key []byte, pgid pgid) { + p, n := c.bucket.pageNode(pgid) + if p != nil && (p.flags&(branchPageFlag|leafPageFlag)) == 0 { + panic(fmt.Sprintf("invalid page type: %d: %x", p.id, p.flags)) + } + e := elemRef{page: p, node: n} + c.stack = append(c.stack, e) + + // If we're on a leaf page/node then find the specific node. + if e.isLeaf() { + c.nsearch(key) + return + } + + if n != nil { + c.searchNode(key, n) + return + } + c.searchPage(key, p) +} + +func (c *Cursor) searchNode(key []byte, n *node) { + var exact bool + index := sort.Search(len(n.inodes), func(i int) bool { + // TODO(benbjohnson): Optimize this range search. It's a bit hacky right now. + // sort.Search() finds the lowest index where f() != -1 but we need the highest index. + ret := bytes.Compare(n.inodes[i].key, key) + if ret == 0 { + exact = true + } + return ret != -1 + }) + if !exact && index > 0 { + index-- + } + c.stack[len(c.stack)-1].index = index + + // Recursively search to the next page. + c.search(key, n.inodes[index].pgid) +} + +func (c *Cursor) searchPage(key []byte, p *page) { + // Binary search for the correct range. + inodes := p.branchPageElements() + + var exact bool + index := sort.Search(int(p.count), func(i int) bool { + // TODO(benbjohnson): Optimize this range search. It's a bit hacky right now. + // sort.Search() finds the lowest index where f() != -1 but we need the highest index. + ret := bytes.Compare(inodes[i].key(), key) + if ret == 0 { + exact = true + } + return ret != -1 + }) + if !exact && index > 0 { + index-- + } + c.stack[len(c.stack)-1].index = index + + // Recursively search to the next page. + c.search(key, inodes[index].pgid) +} + +// nsearch searches the leaf node on the top of the stack for a key. +func (c *Cursor) nsearch(key []byte) { + e := &c.stack[len(c.stack)-1] + p, n := e.page, e.node + + // If we have a node then search its inodes. + if n != nil { + index := sort.Search(len(n.inodes), func(i int) bool { + return bytes.Compare(n.inodes[i].key, key) != -1 + }) + e.index = index + return + } + + // If we have a page then search its leaf elements. + inodes := p.leafPageElements() + index := sort.Search(int(p.count), func(i int) bool { + return bytes.Compare(inodes[i].key(), key) != -1 + }) + e.index = index +} + +// keyValue returns the key and value of the current leaf element. +func (c *Cursor) keyValue() ([]byte, []byte, uint32) { + ref := &c.stack[len(c.stack)-1] + if ref.count() == 0 || ref.index >= ref.count() { + return nil, nil, 0 + } + + // Retrieve value from node. + if ref.node != nil { + inode := &ref.node.inodes[ref.index] + return inode.key, inode.value, inode.flags + } + + // Or retrieve value from page. + elem := ref.page.leafPageElement(uint16(ref.index)) + return elem.key(), elem.value(), elem.flags +} + +// node returns the node that the cursor is currently positioned on. +func (c *Cursor) node() *node { + _assert(len(c.stack) > 0, "accessing a node with a zero-length cursor stack") + + // If the top of the stack is a leaf node then just return it. + if ref := &c.stack[len(c.stack)-1]; ref.node != nil && ref.isLeaf() { + return ref.node + } + + // Start from root and traverse down the hierarchy. + var n = c.stack[0].node + if n == nil { + n = c.bucket.node(c.stack[0].page.id, nil) + } + for _, ref := range c.stack[:len(c.stack)-1] { + _assert(!n.isLeaf, "expected branch node") + n = n.childAt(int(ref.index)) + } + _assert(n.isLeaf, "expected leaf node") + return n +} + +// elemRef represents a reference to an element on a given page/node. +type elemRef struct { + page *page + node *node + index int +} + +// isLeaf returns whether the ref is pointing at a leaf page/node. +func (r *elemRef) isLeaf() bool { + if r.node != nil { + return r.node.isLeaf + } + return (r.page.flags & leafPageFlag) != 0 +} + +// count returns the number of inodes or page elements. +func (r *elemRef) count() int { + if r.node != nil { + return len(r.node.inodes) + } + return int(r.page.count) +} diff --git a/vendor/github.com/boltdb/bolt/db.go b/vendor/github.com/boltdb/bolt/db.go new file mode 100644 index 000000000..501d36aac --- /dev/null +++ b/vendor/github.com/boltdb/bolt/db.go @@ -0,0 +1,993 @@ +package bolt + +import ( + "errors" + "fmt" + "hash/fnv" + "log" + "os" + "runtime" + "runtime/debug" + "strings" + "sync" + "time" + "unsafe" +) + +// The largest step that can be taken when remapping the mmap. +const maxMmapStep = 1 << 30 // 1GB + +// The data file format version. +const version = 2 + +// Represents a marker value to indicate that a file is a Bolt DB. +const magic uint32 = 0xED0CDAED + +// IgnoreNoSync specifies whether the NoSync field of a DB is ignored when +// syncing changes to a file. This is required as some operating systems, +// such as OpenBSD, do not have a unified buffer cache (UBC) and writes +// must be synchronized using the msync(2) syscall. +const IgnoreNoSync = runtime.GOOS == "openbsd" + +// Default values if not set in a DB instance. +const ( + DefaultMaxBatchSize int = 1000 + DefaultMaxBatchDelay = 10 * time.Millisecond + DefaultAllocSize = 16 * 1024 * 1024 +) + +// DB represents a collection of buckets persisted to a file on disk. +// All data access is performed through transactions which can be obtained through the DB. +// All the functions on DB will return a ErrDatabaseNotOpen if accessed before Open() is called. +type DB struct { + // When enabled, the database will perform a Check() after every commit. + // A panic is issued if the database is in an inconsistent state. This + // flag has a large performance impact so it should only be used for + // debugging purposes. + StrictMode bool + + // Setting the NoSync flag will cause the database to skip fsync() + // calls after each commit. This can be useful when bulk loading data + // into a database and you can restart the bulk load in the event of + // a system failure or database corruption. Do not set this flag for + // normal use. + // + // If the package global IgnoreNoSync constant is true, this value is + // ignored. See the comment on that constant for more details. + // + // THIS IS UNSAFE. PLEASE USE WITH CAUTION. + NoSync bool + + // When true, skips the truncate call when growing the database. + // Setting this to true is only safe on non-ext3/ext4 systems. + // Skipping truncation avoids preallocation of hard drive space and + // bypasses a truncate() and fsync() syscall on remapping. + // + // https://github.com/boltdb/bolt/issues/284 + NoGrowSync bool + + // If you want to read the entire database fast, you can set MmapFlag to + // syscall.MAP_POPULATE on Linux 2.6.23+ for sequential read-ahead. + MmapFlags int + + // MaxBatchSize is the maximum size of a batch. Default value is + // copied from DefaultMaxBatchSize in Open. + // + // If <=0, disables batching. + // + // Do not change concurrently with calls to Batch. + MaxBatchSize int + + // MaxBatchDelay is the maximum delay before a batch starts. + // Default value is copied from DefaultMaxBatchDelay in Open. + // + // If <=0, effectively disables batching. + // + // Do not change concurrently with calls to Batch. + MaxBatchDelay time.Duration + + // AllocSize is the amount of space allocated when the database + // needs to create new pages. This is done to amortize the cost + // of truncate() and fsync() when growing the data file. + AllocSize int + + path string + file *os.File + lockfile *os.File // windows only + dataref []byte // mmap'ed readonly, write throws SEGV + data *[maxMapSize]byte + datasz int + filesz int // current on disk file size + meta0 *meta + meta1 *meta + pageSize int + opened bool + rwtx *Tx + txs []*Tx + freelist *freelist + stats Stats + + batchMu sync.Mutex + batch *batch + + rwlock sync.Mutex // Allows only one writer at a time. + metalock sync.Mutex // Protects meta page access. + mmaplock sync.RWMutex // Protects mmap access during remapping. + statlock sync.RWMutex // Protects stats access. + + ops struct { + writeAt func(b []byte, off int64) (n int, err error) + } + + // Read only mode. + // When true, Update() and Begin(true) return ErrDatabaseReadOnly immediately. + readOnly bool +} + +// Path returns the path to currently open database file. +func (db *DB) Path() string { + return db.path +} + +// GoString returns the Go string representation of the database. +func (db *DB) GoString() string { + return fmt.Sprintf("bolt.DB{path:%q}", db.path) +} + +// String returns the string representation of the database. +func (db *DB) String() string { + return fmt.Sprintf("DB<%q>", db.path) +} + +// Open creates and opens a database at the given path. +// If the file does not exist then it will be created automatically. +// Passing in nil options will cause Bolt to open the database with the default options. +func Open(path string, mode os.FileMode, options *Options) (*DB, error) { + var db = &DB{opened: true} + + // Set default options if no options are provided. + if options == nil { + options = DefaultOptions + } + db.NoGrowSync = options.NoGrowSync + db.MmapFlags = options.MmapFlags + + // Set default values for later DB operations. + db.MaxBatchSize = DefaultMaxBatchSize + db.MaxBatchDelay = DefaultMaxBatchDelay + db.AllocSize = DefaultAllocSize + + flag := os.O_RDWR + if options.ReadOnly { + flag = os.O_RDONLY + db.readOnly = true + } + + // Open data file and separate sync handler for metadata writes. + db.path = path + var err error + if db.file, err = os.OpenFile(db.path, flag|os.O_CREATE, mode); err != nil { + _ = db.close() + return nil, err + } + + // Lock file so that other processes using Bolt in read-write mode cannot + // use the database at the same time. This would cause corruption since + // the two processes would write meta pages and free pages separately. + // The database file is locked exclusively (only one process can grab the lock) + // if !options.ReadOnly. + // The database file is locked using the shared lock (more than one process may + // hold a lock at the same time) otherwise (options.ReadOnly is set). + if err := flock(db, mode, !db.readOnly, options.Timeout); err != nil { + _ = db.close() + return nil, err + } + + // Default values for test hooks + db.ops.writeAt = db.file.WriteAt + + // Initialize the database if it doesn't exist. + if info, err := db.file.Stat(); err != nil { + return nil, err + } else if info.Size() == 0 { + // Initialize new files with meta pages. + if err := db.init(); err != nil { + return nil, err + } + } else { + // Read the first meta page to determine the page size. + var buf [0x1000]byte + if _, err := db.file.ReadAt(buf[:], 0); err == nil { + m := db.pageInBuffer(buf[:], 0).meta() + if err := m.validate(); err != nil { + return nil, err + } + db.pageSize = int(m.pageSize) + } + } + + // Memory map the data file. + if err := db.mmap(options.InitialMmapSize); err != nil { + _ = db.close() + return nil, err + } + + // Read in the freelist. + db.freelist = newFreelist() + db.freelist.read(db.page(db.meta().freelist)) + + // Mark the database as opened and return. + return db, nil +} + +// mmap opens the underlying memory-mapped file and initializes the meta references. +// minsz is the minimum size that the new mmap can be. +func (db *DB) mmap(minsz int) error { + db.mmaplock.Lock() + defer db.mmaplock.Unlock() + + info, err := db.file.Stat() + if err != nil { + return fmt.Errorf("mmap stat error: %s", err) + } else if int(info.Size()) < db.pageSize*2 { + return fmt.Errorf("file size too small") + } + + // Ensure the size is at least the minimum size. + var size = int(info.Size()) + if size < minsz { + size = minsz + } + size, err = db.mmapSize(size) + if err != nil { + return err + } + + // Dereference all mmap references before unmapping. + if db.rwtx != nil { + db.rwtx.root.dereference() + } + + // Unmap existing data before continuing. + if err := db.munmap(); err != nil { + return err + } + + // Memory-map the data file as a byte slice. + if err := mmap(db, size); err != nil { + return err + } + + // Save references to the meta pages. + db.meta0 = db.page(0).meta() + db.meta1 = db.page(1).meta() + + // Validate the meta pages. + if err := db.meta0.validate(); err != nil { + return err + } + if err := db.meta1.validate(); err != nil { + return err + } + + return nil +} + +// munmap unmaps the data file from memory. +func (db *DB) munmap() error { + if err := munmap(db); err != nil { + return fmt.Errorf("unmap error: " + err.Error()) + } + return nil +} + +// mmapSize determines the appropriate size for the mmap given the current size +// of the database. The minimum size is 32KB and doubles until it reaches 1GB. +// Returns an error if the new mmap size is greater than the max allowed. +func (db *DB) mmapSize(size int) (int, error) { + // Double the size from 32KB until 1GB. + for i := uint(15); i <= 30; i++ { + if size <= 1< maxMapSize { + return 0, fmt.Errorf("mmap too large") + } + + // If larger than 1GB then grow by 1GB at a time. + sz := int64(size) + if remainder := sz % int64(maxMmapStep); remainder > 0 { + sz += int64(maxMmapStep) - remainder + } + + // Ensure that the mmap size is a multiple of the page size. + // This should always be true since we're incrementing in MBs. + pageSize := int64(db.pageSize) + if (sz % pageSize) != 0 { + sz = ((sz / pageSize) + 1) * pageSize + } + + // If we've exceeded the max size then only grow up to the max size. + if sz > maxMapSize { + sz = maxMapSize + } + + return int(sz), nil +} + +// init creates a new database file and initializes its meta pages. +func (db *DB) init() error { + // Set the page size to the OS page size. + db.pageSize = os.Getpagesize() + + // Create two meta pages on a buffer. + buf := make([]byte, db.pageSize*4) + for i := 0; i < 2; i++ { + p := db.pageInBuffer(buf[:], pgid(i)) + p.id = pgid(i) + p.flags = metaPageFlag + + // Initialize the meta page. + m := p.meta() + m.magic = magic + m.version = version + m.pageSize = uint32(db.pageSize) + m.freelist = 2 + m.root = bucket{root: 3} + m.pgid = 4 + m.txid = txid(i) + } + + // Write an empty freelist at page 3. + p := db.pageInBuffer(buf[:], pgid(2)) + p.id = pgid(2) + p.flags = freelistPageFlag + p.count = 0 + + // Write an empty leaf page at page 4. + p = db.pageInBuffer(buf[:], pgid(3)) + p.id = pgid(3) + p.flags = leafPageFlag + p.count = 0 + + // Write the buffer to our data file. + if _, err := db.ops.writeAt(buf, 0); err != nil { + return err + } + if err := fdatasync(db); err != nil { + return err + } + + return nil +} + +// Close releases all database resources. +// All transactions must be closed before closing the database. +func (db *DB) Close() error { + db.rwlock.Lock() + defer db.rwlock.Unlock() + + db.metalock.Lock() + defer db.metalock.Unlock() + + db.mmaplock.RLock() + defer db.mmaplock.RUnlock() + + return db.close() +} + +func (db *DB) close() error { + if !db.opened { + return nil + } + + db.opened = false + + db.freelist = nil + db.path = "" + + // Clear ops. + db.ops.writeAt = nil + + // Close the mmap. + if err := db.munmap(); err != nil { + return err + } + + // Close file handles. + if db.file != nil { + // No need to unlock read-only file. + if !db.readOnly { + // Unlock the file. + if err := funlock(db); err != nil { + log.Printf("bolt.Close(): funlock error: %s", err) + } + } + + // Close the file descriptor. + if err := db.file.Close(); err != nil { + return fmt.Errorf("db file close: %s", err) + } + db.file = nil + } + + return nil +} + +// Begin starts a new transaction. +// Multiple read-only transactions can be used concurrently but only one +// write transaction can be used at a time. Starting multiple write transactions +// will cause the calls to block and be serialized until the current write +// transaction finishes. +// +// Transactions should not be dependent on one another. Opening a read +// transaction and a write transaction in the same goroutine can cause the +// writer to deadlock because the database periodically needs to re-mmap itself +// as it grows and it cannot do that while a read transaction is open. +// +// If a long running read transaction (for example, a snapshot transaction) is +// needed, you might want to set DB.InitialMmapSize to a large enough value +// to avoid potential blocking of write transaction. +// +// IMPORTANT: You must close read-only transactions after you are finished or +// else the database will not reclaim old pages. +func (db *DB) Begin(writable bool) (*Tx, error) { + if writable { + return db.beginRWTx() + } + return db.beginTx() +} + +func (db *DB) beginTx() (*Tx, error) { + // Lock the meta pages while we initialize the transaction. We obtain + // the meta lock before the mmap lock because that's the order that the + // write transaction will obtain them. + db.metalock.Lock() + + // Obtain a read-only lock on the mmap. When the mmap is remapped it will + // obtain a write lock so all transactions must finish before it can be + // remapped. + db.mmaplock.RLock() + + // Exit if the database is not open yet. + if !db.opened { + db.mmaplock.RUnlock() + db.metalock.Unlock() + return nil, ErrDatabaseNotOpen + } + + // Create a transaction associated with the database. + t := &Tx{} + t.init(db) + + // Keep track of transaction until it closes. + db.txs = append(db.txs, t) + n := len(db.txs) + + // Unlock the meta pages. + db.metalock.Unlock() + + // Update the transaction stats. + db.statlock.Lock() + db.stats.TxN++ + db.stats.OpenTxN = n + db.statlock.Unlock() + + return t, nil +} + +func (db *DB) beginRWTx() (*Tx, error) { + // If the database was opened with Options.ReadOnly, return an error. + if db.readOnly { + return nil, ErrDatabaseReadOnly + } + + // Obtain writer lock. This is released by the transaction when it closes. + // This enforces only one writer transaction at a time. + db.rwlock.Lock() + + // Once we have the writer lock then we can lock the meta pages so that + // we can set up the transaction. + db.metalock.Lock() + defer db.metalock.Unlock() + + // Exit if the database is not open yet. + if !db.opened { + db.rwlock.Unlock() + return nil, ErrDatabaseNotOpen + } + + // Create a transaction associated with the database. + t := &Tx{writable: true} + t.init(db) + db.rwtx = t + + // Free any pages associated with closed read-only transactions. + var minid txid = 0xFFFFFFFFFFFFFFFF + for _, t := range db.txs { + if t.meta.txid < minid { + minid = t.meta.txid + } + } + if minid > 0 { + db.freelist.release(minid - 1) + } + + return t, nil +} + +// removeTx removes a transaction from the database. +func (db *DB) removeTx(tx *Tx) { + // Release the read lock on the mmap. + db.mmaplock.RUnlock() + + // Use the meta lock to restrict access to the DB object. + db.metalock.Lock() + + // Remove the transaction. + for i, t := range db.txs { + if t == tx { + db.txs = append(db.txs[:i], db.txs[i+1:]...) + break + } + } + n := len(db.txs) + + // Unlock the meta pages. + db.metalock.Unlock() + + // Merge statistics. + db.statlock.Lock() + db.stats.OpenTxN = n + db.stats.TxStats.add(&tx.stats) + db.statlock.Unlock() +} + +// Update executes a function within the context of a read-write managed transaction. +// If no error is returned from the function then the transaction is committed. +// If an error is returned then the entire transaction is rolled back. +// Any error that is returned from the function or returned from the commit is +// returned from the Update() method. +// +// Attempting to manually commit or rollback within the function will cause a panic. +func (db *DB) Update(fn func(*Tx) error) error { + t, err := db.Begin(true) + if err != nil { + return err + } + + // Make sure the transaction rolls back in the event of a panic. + defer func() { + if t.db != nil { + t.rollback() + } + }() + + // Mark as a managed tx so that the inner function cannot manually commit. + t.managed = true + + // If an error is returned from the function then rollback and return error. + err = fn(t) + t.managed = false + if err != nil { + _ = t.Rollback() + return err + } + + return t.Commit() +} + +// View executes a function within the context of a managed read-only transaction. +// Any error that is returned from the function is returned from the View() method. +// +// Attempting to manually rollback within the function will cause a panic. +func (db *DB) View(fn func(*Tx) error) error { + t, err := db.Begin(false) + if err != nil { + return err + } + + // Make sure the transaction rolls back in the event of a panic. + defer func() { + if t.db != nil { + t.rollback() + } + }() + + // Mark as a managed tx so that the inner function cannot manually rollback. + t.managed = true + + // If an error is returned from the function then pass it through. + err = fn(t) + t.managed = false + if err != nil { + _ = t.Rollback() + return err + } + + if err := t.Rollback(); err != nil { + return err + } + + return nil +} + +// Batch calls fn as part of a batch. It behaves similar to Update, +// except: +// +// 1. concurrent Batch calls can be combined into a single Bolt +// transaction. +// +// 2. the function passed to Batch may be called multiple times, +// regardless of whether it returns error or not. +// +// This means that Batch function side effects must be idempotent and +// take permanent effect only after a successful return is seen in +// caller. +// +// The maximum batch size and delay can be adjusted with DB.MaxBatchSize +// and DB.MaxBatchDelay, respectively. +// +// Batch is only useful when there are multiple goroutines calling it. +func (db *DB) Batch(fn func(*Tx) error) error { + errCh := make(chan error, 1) + + db.batchMu.Lock() + if (db.batch == nil) || (db.batch != nil && len(db.batch.calls) >= db.MaxBatchSize) { + // There is no existing batch, or the existing batch is full; start a new one. + db.batch = &batch{ + db: db, + } + db.batch.timer = time.AfterFunc(db.MaxBatchDelay, db.batch.trigger) + } + db.batch.calls = append(db.batch.calls, call{fn: fn, err: errCh}) + if len(db.batch.calls) >= db.MaxBatchSize { + // wake up batch, it's ready to run + go db.batch.trigger() + } + db.batchMu.Unlock() + + err := <-errCh + if err == trySolo { + err = db.Update(fn) + } + return err +} + +type call struct { + fn func(*Tx) error + err chan<- error +} + +type batch struct { + db *DB + timer *time.Timer + start sync.Once + calls []call +} + +// trigger runs the batch if it hasn't already been run. +func (b *batch) trigger() { + b.start.Do(b.run) +} + +// run performs the transactions in the batch and communicates results +// back to DB.Batch. +func (b *batch) run() { + b.db.batchMu.Lock() + b.timer.Stop() + // Make sure no new work is added to this batch, but don't break + // other batches. + if b.db.batch == b { + b.db.batch = nil + } + b.db.batchMu.Unlock() + +retry: + for len(b.calls) > 0 { + var failIdx = -1 + err := b.db.Update(func(tx *Tx) error { + for i, c := range b.calls { + if err := safelyCall(c.fn, tx); err != nil { + failIdx = i + return err + } + } + return nil + }) + + if failIdx >= 0 { + // take the failing transaction out of the batch. it's + // safe to shorten b.calls here because db.batch no longer + // points to us, and we hold the mutex anyway. + c := b.calls[failIdx] + b.calls[failIdx], b.calls = b.calls[len(b.calls)-1], b.calls[:len(b.calls)-1] + // tell the submitter re-run it solo, continue with the rest of the batch + c.err <- trySolo + continue retry + } + + // pass success, or bolt internal errors, to all callers + for _, c := range b.calls { + if c.err != nil { + c.err <- err + } + } + break retry + } +} + +// trySolo is a special sentinel error value used for signaling that a +// transaction function should be re-run. It should never be seen by +// callers. +var trySolo = errors.New("batch function returned an error and should be re-run solo") + +type panicked struct { + reason interface{} +} + +func (p panicked) Error() string { + if err, ok := p.reason.(error); ok { + return err.Error() + } + return fmt.Sprintf("panic: %v", p.reason) +} + +func safelyCall(fn func(*Tx) error, tx *Tx) (err error) { + defer func() { + if p := recover(); p != nil { + err = panicked{p} + } + }() + return fn(tx) +} + +// Sync executes fdatasync() against the database file handle. +// +// This is not necessary under normal operation, however, if you use NoSync +// then it allows you to force the database file to sync against the disk. +func (db *DB) Sync() error { return fdatasync(db) } + +// Stats retrieves ongoing performance stats for the database. +// This is only updated when a transaction closes. +func (db *DB) Stats() Stats { + db.statlock.RLock() + defer db.statlock.RUnlock() + return db.stats +} + +// This is for internal access to the raw data bytes from the C cursor, use +// carefully, or not at all. +func (db *DB) Info() *Info { + return &Info{uintptr(unsafe.Pointer(&db.data[0])), db.pageSize} +} + +// page retrieves a page reference from the mmap based on the current page size. +func (db *DB) page(id pgid) *page { + pos := id * pgid(db.pageSize) + return (*page)(unsafe.Pointer(&db.data[pos])) +} + +// pageInBuffer retrieves a page reference from a given byte array based on the current page size. +func (db *DB) pageInBuffer(b []byte, id pgid) *page { + return (*page)(unsafe.Pointer(&b[id*pgid(db.pageSize)])) +} + +// meta retrieves the current meta page reference. +func (db *DB) meta() *meta { + if db.meta0.txid > db.meta1.txid { + return db.meta0 + } + return db.meta1 +} + +// allocate returns a contiguous block of memory starting at a given page. +func (db *DB) allocate(count int) (*page, error) { + // Allocate a temporary buffer for the page. + buf := make([]byte, count*db.pageSize) + p := (*page)(unsafe.Pointer(&buf[0])) + p.overflow = uint32(count - 1) + + // Use pages from the freelist if they are available. + if p.id = db.freelist.allocate(count); p.id != 0 { + return p, nil + } + + // Resize mmap() if we're at the end. + p.id = db.rwtx.meta.pgid + var minsz = int((p.id+pgid(count))+1) * db.pageSize + if minsz >= db.datasz { + if err := db.mmap(minsz); err != nil { + return nil, fmt.Errorf("mmap allocate error: %s", err) + } + } + + // Move the page id high water mark. + db.rwtx.meta.pgid += pgid(count) + + return p, nil +} + +// grow grows the size of the database to the given sz. +func (db *DB) grow(sz int) error { + // Ignore if the new size is less than available file size. + if sz <= db.filesz { + return nil + } + + // If the data is smaller than the alloc size then only allocate what's needed. + // Once it goes over the allocation size then allocate in chunks. + if db.datasz < db.AllocSize { + sz = db.datasz + } else { + sz += db.AllocSize + } + + // Truncate and fsync to ensure file size metadata is flushed. + // https://github.com/boltdb/bolt/issues/284 + if !db.NoGrowSync && !db.readOnly { + if runtime.GOOS != "windows" { + if err := db.file.Truncate(int64(sz)); err != nil { + return fmt.Errorf("file resize error: %s", err) + } + } + if err := db.file.Sync(); err != nil { + return fmt.Errorf("file sync error: %s", err) + } + } + + db.filesz = sz + return nil +} + +func (db *DB) IsReadOnly() bool { + return db.readOnly +} + +// Options represents the options that can be set when opening a database. +type Options struct { + // Timeout is the amount of time to wait to obtain a file lock. + // When set to zero it will wait indefinitely. This option is only + // available on Darwin and Linux. + Timeout time.Duration + + // Sets the DB.NoGrowSync flag before memory mapping the file. + NoGrowSync bool + + // Open database in read-only mode. Uses flock(..., LOCK_SH |LOCK_NB) to + // grab a shared lock (UNIX). + ReadOnly bool + + // Sets the DB.MmapFlags flag before memory mapping the file. + MmapFlags int + + // InitialMmapSize is the initial mmap size of the database + // in bytes. Read transactions won't block write transaction + // if the InitialMmapSize is large enough to hold database mmap + // size. (See DB.Begin for more information) + // + // If <=0, the initial map size is 0. + // If initialMmapSize is smaller than the previous database size, + // it takes no effect. + InitialMmapSize int +} + +// DefaultOptions represent the options used if nil options are passed into Open(). +// No timeout is used which will cause Bolt to wait indefinitely for a lock. +var DefaultOptions = &Options{ + Timeout: 0, + NoGrowSync: false, +} + +// Stats represents statistics about the database. +type Stats struct { + // Freelist stats + FreePageN int // total number of free pages on the freelist + PendingPageN int // total number of pending pages on the freelist + FreeAlloc int // total bytes allocated in free pages + FreelistInuse int // total bytes used by the freelist + + // Transaction stats + TxN int // total number of started read transactions + OpenTxN int // number of currently open read transactions + + TxStats TxStats // global, ongoing stats. +} + +// Sub calculates and returns the difference between two sets of database stats. +// This is useful when obtaining stats at two different points and time and +// you need the performance counters that occurred within that time span. +func (s *Stats) Sub(other *Stats) Stats { + if other == nil { + return *s + } + var diff Stats + diff.FreePageN = s.FreePageN + diff.PendingPageN = s.PendingPageN + diff.FreeAlloc = s.FreeAlloc + diff.FreelistInuse = s.FreelistInuse + diff.TxN = other.TxN - s.TxN + diff.TxStats = s.TxStats.Sub(&other.TxStats) + return diff +} + +func (s *Stats) add(other *Stats) { + s.TxStats.add(&other.TxStats) +} + +type Info struct { + Data uintptr + PageSize int +} + +type meta struct { + magic uint32 + version uint32 + pageSize uint32 + flags uint32 + root bucket + freelist pgid + pgid pgid + txid txid + checksum uint64 +} + +// validate checks the marker bytes and version of the meta page to ensure it matches this binary. +func (m *meta) validate() error { + if m.checksum != 0 && m.checksum != m.sum64() { + return ErrChecksum + } else if m.magic != magic { + return ErrInvalid + } else if m.version != version { + return ErrVersionMismatch + } + return nil +} + +// copy copies one meta object to another. +func (m *meta) copy(dest *meta) { + *dest = *m +} + +// write writes the meta onto a page. +func (m *meta) write(p *page) { + if m.root.root >= m.pgid { + panic(fmt.Sprintf("root bucket pgid (%d) above high water mark (%d)", m.root.root, m.pgid)) + } else if m.freelist >= m.pgid { + panic(fmt.Sprintf("freelist pgid (%d) above high water mark (%d)", m.freelist, m.pgid)) + } + + // Page id is either going to be 0 or 1 which we can determine by the transaction ID. + p.id = pgid(m.txid % 2) + p.flags |= metaPageFlag + + // Calculate the checksum. + m.checksum = m.sum64() + + m.copy(p.meta()) +} + +// generates the checksum for the meta. +func (m *meta) sum64() uint64 { + var h = fnv.New64a() + _, _ = h.Write((*[unsafe.Offsetof(meta{}.checksum)]byte)(unsafe.Pointer(m))[:]) + return h.Sum64() +} + +// _assert will panic with a given formatted message if the given condition is false. +func _assert(condition bool, msg string, v ...interface{}) { + if !condition { + panic(fmt.Sprintf("assertion failed: "+msg, v...)) + } +} + +func warn(v ...interface{}) { fmt.Fprintln(os.Stderr, v...) } +func warnf(msg string, v ...interface{}) { fmt.Fprintf(os.Stderr, msg+"\n", v...) } + +func printstack() { + stack := strings.Join(strings.Split(string(debug.Stack()), "\n")[2:], "\n") + fmt.Fprintln(os.Stderr, stack) +} diff --git a/vendor/github.com/boltdb/bolt/doc.go b/vendor/github.com/boltdb/bolt/doc.go new file mode 100644 index 000000000..cc937845d --- /dev/null +++ b/vendor/github.com/boltdb/bolt/doc.go @@ -0,0 +1,44 @@ +/* +Package bolt implements a low-level key/value store in pure Go. It supports +fully serializable transactions, ACID semantics, and lock-free MVCC with +multiple readers and a single writer. Bolt can be used for projects that +want a simple data store without the need to add large dependencies such as +Postgres or MySQL. + +Bolt is a single-level, zero-copy, B+tree data store. This means that Bolt is +optimized for fast read access and does not require recovery in the event of a +system crash. Transactions which have not finished committing will simply be +rolled back in the event of a crash. + +The design of Bolt is based on Howard Chu's LMDB database project. + +Bolt currently works on Windows, Mac OS X, and Linux. + + +Basics + +There are only a few types in Bolt: DB, Bucket, Tx, and Cursor. The DB is +a collection of buckets and is represented by a single file on disk. A bucket is +a collection of unique keys that are associated with values. + +Transactions provide either read-only or read-write access to the database. +Read-only transactions can retrieve key/value pairs and can use Cursors to +iterate over the dataset sequentially. Read-write transactions can create and +delete buckets and can insert and remove keys. Only one read-write transaction +is allowed at a time. + + +Caveats + +The database uses a read-only, memory-mapped data file to ensure that +applications cannot corrupt the database, however, this means that keys and +values returned from Bolt cannot be changed. Writing to a read-only byte slice +will cause Go to panic. + +Keys and values retrieved from the database are only valid for the life of +the transaction. When used outside the transaction, these byte slices can +point to different data or can point to invalid memory which will cause a panic. + + +*/ +package bolt diff --git a/vendor/github.com/boltdb/bolt/errors.go b/vendor/github.com/boltdb/bolt/errors.go new file mode 100644 index 000000000..6883786d5 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/errors.go @@ -0,0 +1,70 @@ +package bolt + +import "errors" + +// These errors can be returned when opening or calling methods on a DB. +var ( + // ErrDatabaseNotOpen is returned when a DB instance is accessed before it + // is opened or after it is closed. + ErrDatabaseNotOpen = errors.New("database not open") + + // ErrDatabaseOpen is returned when opening a database that is + // already open. + ErrDatabaseOpen = errors.New("database already open") + + // ErrInvalid is returned when a data file is not a Bolt-formatted database. + ErrInvalid = errors.New("invalid database") + + // ErrVersionMismatch is returned when the data file was created with a + // different version of Bolt. + ErrVersionMismatch = errors.New("version mismatch") + + // ErrChecksum is returned when either meta page checksum does not match. + ErrChecksum = errors.New("checksum error") + + // ErrTimeout is returned when a database cannot obtain an exclusive lock + // on the data file after the timeout passed to Open(). + ErrTimeout = errors.New("timeout") +) + +// These errors can occur when beginning or committing a Tx. +var ( + // ErrTxNotWritable is returned when performing a write operation on a + // read-only transaction. + ErrTxNotWritable = errors.New("tx not writable") + + // ErrTxClosed is returned when committing or rolling back a transaction + // that has already been committed or rolled back. + ErrTxClosed = errors.New("tx closed") + + // ErrDatabaseReadOnly is returned when a mutating transaction is started on a + // read-only database. + ErrDatabaseReadOnly = errors.New("database is in read-only mode") +) + +// These errors can occur when putting or deleting a value or a bucket. +var ( + // ErrBucketNotFound is returned when trying to access a bucket that has + // not been created yet. + ErrBucketNotFound = errors.New("bucket not found") + + // ErrBucketExists is returned when creating a bucket that already exists. + ErrBucketExists = errors.New("bucket already exists") + + // ErrBucketNameRequired is returned when creating a bucket with a blank name. + ErrBucketNameRequired = errors.New("bucket name required") + + // ErrKeyRequired is returned when inserting a zero-length key. + ErrKeyRequired = errors.New("key required") + + // ErrKeyTooLarge is returned when inserting a key that is larger than MaxKeySize. + ErrKeyTooLarge = errors.New("key too large") + + // ErrValueTooLarge is returned when inserting a value that is larger than MaxValueSize. + ErrValueTooLarge = errors.New("value too large") + + // ErrIncompatibleValue is returned when trying create or delete a bucket + // on an existing non-bucket key or when trying to create or delete a + // non-bucket key on an existing bucket key. + ErrIncompatibleValue = errors.New("incompatible value") +) diff --git a/vendor/github.com/boltdb/bolt/freelist.go b/vendor/github.com/boltdb/bolt/freelist.go new file mode 100644 index 000000000..0161948fc --- /dev/null +++ b/vendor/github.com/boltdb/bolt/freelist.go @@ -0,0 +1,242 @@ +package bolt + +import ( + "fmt" + "sort" + "unsafe" +) + +// freelist represents a list of all pages that are available for allocation. +// It also tracks pages that have been freed but are still in use by open transactions. +type freelist struct { + ids []pgid // all free and available free page ids. + pending map[txid][]pgid // mapping of soon-to-be free page ids by tx. + cache map[pgid]bool // fast lookup of all free and pending page ids. +} + +// newFreelist returns an empty, initialized freelist. +func newFreelist() *freelist { + return &freelist{ + pending: make(map[txid][]pgid), + cache: make(map[pgid]bool), + } +} + +// size returns the size of the page after serialization. +func (f *freelist) size() int { + return pageHeaderSize + (int(unsafe.Sizeof(pgid(0))) * f.count()) +} + +// count returns count of pages on the freelist +func (f *freelist) count() int { + return f.free_count() + f.pending_count() +} + +// free_count returns count of free pages +func (f *freelist) free_count() int { + return len(f.ids) +} + +// pending_count returns count of pending pages +func (f *freelist) pending_count() int { + var count int + for _, list := range f.pending { + count += len(list) + } + return count +} + +// all returns a list of all free ids and all pending ids in one sorted list. +func (f *freelist) all() []pgid { + m := make(pgids, 0) + + for _, list := range f.pending { + m = append(m, list...) + } + + sort.Sort(m) + return pgids(f.ids).merge(m) +} + +// allocate returns the starting page id of a contiguous list of pages of a given size. +// If a contiguous block cannot be found then 0 is returned. +func (f *freelist) allocate(n int) pgid { + if len(f.ids) == 0 { + return 0 + } + + var initial, previd pgid + for i, id := range f.ids { + if id <= 1 { + panic(fmt.Sprintf("invalid page allocation: %d", id)) + } + + // Reset initial page if this is not contiguous. + if previd == 0 || id-previd != 1 { + initial = id + } + + // If we found a contiguous block then remove it and return it. + if (id-initial)+1 == pgid(n) { + // If we're allocating off the beginning then take the fast path + // and just adjust the existing slice. This will use extra memory + // temporarily but the append() in free() will realloc the slice + // as is necessary. + if (i + 1) == n { + f.ids = f.ids[i+1:] + } else { + copy(f.ids[i-n+1:], f.ids[i+1:]) + f.ids = f.ids[:len(f.ids)-n] + } + + // Remove from the free cache. + for i := pgid(0); i < pgid(n); i++ { + delete(f.cache, initial+i) + } + + return initial + } + + previd = id + } + return 0 +} + +// free releases a page and its overflow for a given transaction id. +// If the page is already free then a panic will occur. +func (f *freelist) free(txid txid, p *page) { + if p.id <= 1 { + panic(fmt.Sprintf("cannot free page 0 or 1: %d", p.id)) + } + + // Free page and all its overflow pages. + var ids = f.pending[txid] + for id := p.id; id <= p.id+pgid(p.overflow); id++ { + // Verify that page is not already free. + if f.cache[id] { + panic(fmt.Sprintf("page %d already freed", id)) + } + + // Add to the freelist and cache. + ids = append(ids, id) + f.cache[id] = true + } + f.pending[txid] = ids +} + +// release moves all page ids for a transaction id (or older) to the freelist. +func (f *freelist) release(txid txid) { + m := make(pgids, 0) + for tid, ids := range f.pending { + if tid <= txid { + // Move transaction's pending pages to the available freelist. + // Don't remove from the cache since the page is still free. + m = append(m, ids...) + delete(f.pending, tid) + } + } + sort.Sort(m) + f.ids = pgids(f.ids).merge(m) +} + +// rollback removes the pages from a given pending tx. +func (f *freelist) rollback(txid txid) { + // Remove page ids from cache. + for _, id := range f.pending[txid] { + delete(f.cache, id) + } + + // Remove pages from pending list. + delete(f.pending, txid) +} + +// freed returns whether a given page is in the free list. +func (f *freelist) freed(pgid pgid) bool { + return f.cache[pgid] +} + +// read initializes the freelist from a freelist page. +func (f *freelist) read(p *page) { + // If the page.count is at the max uint16 value (64k) then it's considered + // an overflow and the size of the freelist is stored as the first element. + idx, count := 0, int(p.count) + if count == 0xFFFF { + idx = 1 + count = int(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[0]) + } + + // Copy the list of page ids from the freelist. + ids := ((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[idx:count] + f.ids = make([]pgid, len(ids)) + copy(f.ids, ids) + + // Make sure they're sorted. + sort.Sort(pgids(f.ids)) + + // Rebuild the page cache. + f.reindex() +} + +// write writes the page ids onto a freelist page. All free and pending ids are +// saved to disk since in the event of a program crash, all pending ids will +// become free. +func (f *freelist) write(p *page) error { + // Combine the old free pgids and pgids waiting on an open transaction. + ids := f.all() + + // Update the header flag. + p.flags |= freelistPageFlag + + // The page.count can only hold up to 64k elements so if we overflow that + // number then we handle it by putting the size in the first element. + if len(ids) < 0xFFFF { + p.count = uint16(len(ids)) + copy(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[:], ids) + } else { + p.count = 0xFFFF + ((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[0] = pgid(len(ids)) + copy(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[1:], ids) + } + + return nil +} + +// reload reads the freelist from a page and filters out pending items. +func (f *freelist) reload(p *page) { + f.read(p) + + // Build a cache of only pending pages. + pcache := make(map[pgid]bool) + for _, pendingIDs := range f.pending { + for _, pendingID := range pendingIDs { + pcache[pendingID] = true + } + } + + // Check each page in the freelist and build a new available freelist + // with any pages not in the pending lists. + var a []pgid + for _, id := range f.ids { + if !pcache[id] { + a = append(a, id) + } + } + f.ids = a + + // Once the available list is rebuilt then rebuild the free cache so that + // it includes the available and pending free pages. + f.reindex() +} + +// reindex rebuilds the free cache based on available and pending free lists. +func (f *freelist) reindex() { + f.cache = make(map[pgid]bool) + for _, id := range f.ids { + f.cache[id] = true + } + for _, pendingIDs := range f.pending { + for _, pendingID := range pendingIDs { + f.cache[pendingID] = true + } + } +} diff --git a/vendor/github.com/boltdb/bolt/node.go b/vendor/github.com/boltdb/bolt/node.go new file mode 100644 index 000000000..e9d64af81 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/node.go @@ -0,0 +1,599 @@ +package bolt + +import ( + "bytes" + "fmt" + "sort" + "unsafe" +) + +// node represents an in-memory, deserialized page. +type node struct { + bucket *Bucket + isLeaf bool + unbalanced bool + spilled bool + key []byte + pgid pgid + parent *node + children nodes + inodes inodes +} + +// root returns the top-level node this node is attached to. +func (n *node) root() *node { + if n.parent == nil { + return n + } + return n.parent.root() +} + +// minKeys returns the minimum number of inodes this node should have. +func (n *node) minKeys() int { + if n.isLeaf { + return 1 + } + return 2 +} + +// size returns the size of the node after serialization. +func (n *node) size() int { + sz, elsz := pageHeaderSize, n.pageElementSize() + for i := 0; i < len(n.inodes); i++ { + item := &n.inodes[i] + sz += elsz + len(item.key) + len(item.value) + } + return sz +} + +// sizeLessThan returns true if the node is less than a given size. +// This is an optimization to avoid calculating a large node when we only need +// to know if it fits inside a certain page size. +func (n *node) sizeLessThan(v int) bool { + sz, elsz := pageHeaderSize, n.pageElementSize() + for i := 0; i < len(n.inodes); i++ { + item := &n.inodes[i] + sz += elsz + len(item.key) + len(item.value) + if sz >= v { + return false + } + } + return true +} + +// pageElementSize returns the size of each page element based on the type of node. +func (n *node) pageElementSize() int { + if n.isLeaf { + return leafPageElementSize + } + return branchPageElementSize +} + +// childAt returns the child node at a given index. +func (n *node) childAt(index int) *node { + if n.isLeaf { + panic(fmt.Sprintf("invalid childAt(%d) on a leaf node", index)) + } + return n.bucket.node(n.inodes[index].pgid, n) +} + +// childIndex returns the index of a given child node. +func (n *node) childIndex(child *node) int { + index := sort.Search(len(n.inodes), func(i int) bool { return bytes.Compare(n.inodes[i].key, child.key) != -1 }) + return index +} + +// numChildren returns the number of children. +func (n *node) numChildren() int { + return len(n.inodes) +} + +// nextSibling returns the next node with the same parent. +func (n *node) nextSibling() *node { + if n.parent == nil { + return nil + } + index := n.parent.childIndex(n) + if index >= n.parent.numChildren()-1 { + return nil + } + return n.parent.childAt(index + 1) +} + +// prevSibling returns the previous node with the same parent. +func (n *node) prevSibling() *node { + if n.parent == nil { + return nil + } + index := n.parent.childIndex(n) + if index == 0 { + return nil + } + return n.parent.childAt(index - 1) +} + +// put inserts a key/value. +func (n *node) put(oldKey, newKey, value []byte, pgid pgid, flags uint32) { + if pgid >= n.bucket.tx.meta.pgid { + panic(fmt.Sprintf("pgid (%d) above high water mark (%d)", pgid, n.bucket.tx.meta.pgid)) + } else if len(oldKey) <= 0 { + panic("put: zero-length old key") + } else if len(newKey) <= 0 { + panic("put: zero-length new key") + } + + // Find insertion index. + index := sort.Search(len(n.inodes), func(i int) bool { return bytes.Compare(n.inodes[i].key, oldKey) != -1 }) + + // Add capacity and shift nodes if we don't have an exact match and need to insert. + exact := (len(n.inodes) > 0 && index < len(n.inodes) && bytes.Equal(n.inodes[index].key, oldKey)) + if !exact { + n.inodes = append(n.inodes, inode{}) + copy(n.inodes[index+1:], n.inodes[index:]) + } + + inode := &n.inodes[index] + inode.flags = flags + inode.key = newKey + inode.value = value + inode.pgid = pgid + _assert(len(inode.key) > 0, "put: zero-length inode key") +} + +// del removes a key from the node. +func (n *node) del(key []byte) { + // Find index of key. + index := sort.Search(len(n.inodes), func(i int) bool { return bytes.Compare(n.inodes[i].key, key) != -1 }) + + // Exit if the key isn't found. + if index >= len(n.inodes) || !bytes.Equal(n.inodes[index].key, key) { + return + } + + // Delete inode from the node. + n.inodes = append(n.inodes[:index], n.inodes[index+1:]...) + + // Mark the node as needing rebalancing. + n.unbalanced = true +} + +// read initializes the node from a page. +func (n *node) read(p *page) { + n.pgid = p.id + n.isLeaf = ((p.flags & leafPageFlag) != 0) + n.inodes = make(inodes, int(p.count)) + + for i := 0; i < int(p.count); i++ { + inode := &n.inodes[i] + if n.isLeaf { + elem := p.leafPageElement(uint16(i)) + inode.flags = elem.flags + inode.key = elem.key() + inode.value = elem.value() + } else { + elem := p.branchPageElement(uint16(i)) + inode.pgid = elem.pgid + inode.key = elem.key() + } + _assert(len(inode.key) > 0, "read: zero-length inode key") + } + + // Save first key so we can find the node in the parent when we spill. + if len(n.inodes) > 0 { + n.key = n.inodes[0].key + _assert(len(n.key) > 0, "read: zero-length node key") + } else { + n.key = nil + } +} + +// write writes the items onto one or more pages. +func (n *node) write(p *page) { + // Initialize page. + if n.isLeaf { + p.flags |= leafPageFlag + } else { + p.flags |= branchPageFlag + } + + if len(n.inodes) >= 0xFFFF { + panic(fmt.Sprintf("inode overflow: %d (pgid=%d)", len(n.inodes), p.id)) + } + p.count = uint16(len(n.inodes)) + + // Loop over each item and write it to the page. + b := (*[maxAllocSize]byte)(unsafe.Pointer(&p.ptr))[n.pageElementSize()*len(n.inodes):] + for i, item := range n.inodes { + _assert(len(item.key) > 0, "write: zero-length inode key") + + // Write the page element. + if n.isLeaf { + elem := p.leafPageElement(uint16(i)) + elem.pos = uint32(uintptr(unsafe.Pointer(&b[0])) - uintptr(unsafe.Pointer(elem))) + elem.flags = item.flags + elem.ksize = uint32(len(item.key)) + elem.vsize = uint32(len(item.value)) + } else { + elem := p.branchPageElement(uint16(i)) + elem.pos = uint32(uintptr(unsafe.Pointer(&b[0])) - uintptr(unsafe.Pointer(elem))) + elem.ksize = uint32(len(item.key)) + elem.pgid = item.pgid + _assert(elem.pgid != p.id, "write: circular dependency occurred") + } + + // If the length of key+value is larger than the max allocation size + // then we need to reallocate the byte array pointer. + // + // See: https://github.com/boltdb/bolt/pull/335 + klen, vlen := len(item.key), len(item.value) + if len(b) < klen+vlen { + b = (*[maxAllocSize]byte)(unsafe.Pointer(&b[0]))[:] + } + + // Write data for the element to the end of the page. + copy(b[0:], item.key) + b = b[klen:] + copy(b[0:], item.value) + b = b[vlen:] + } + + // DEBUG ONLY: n.dump() +} + +// split breaks up a node into multiple smaller nodes, if appropriate. +// This should only be called from the spill() function. +func (n *node) split(pageSize int) []*node { + var nodes []*node + + node := n + for { + // Split node into two. + a, b := node.splitTwo(pageSize) + nodes = append(nodes, a) + + // If we can't split then exit the loop. + if b == nil { + break + } + + // Set node to b so it gets split on the next iteration. + node = b + } + + return nodes +} + +// splitTwo breaks up a node into two smaller nodes, if appropriate. +// This should only be called from the split() function. +func (n *node) splitTwo(pageSize int) (*node, *node) { + // Ignore the split if the page doesn't have at least enough nodes for + // two pages or if the nodes can fit in a single page. + if len(n.inodes) <= (minKeysPerPage*2) || n.sizeLessThan(pageSize) { + return n, nil + } + + // Determine the threshold before starting a new node. + var fillPercent = n.bucket.FillPercent + if fillPercent < minFillPercent { + fillPercent = minFillPercent + } else if fillPercent > maxFillPercent { + fillPercent = maxFillPercent + } + threshold := int(float64(pageSize) * fillPercent) + + // Determine split position and sizes of the two pages. + splitIndex, _ := n.splitIndex(threshold) + + // Split node into two separate nodes. + // If there's no parent then we'll need to create one. + if n.parent == nil { + n.parent = &node{bucket: n.bucket, children: []*node{n}} + } + + // Create a new node and add it to the parent. + next := &node{bucket: n.bucket, isLeaf: n.isLeaf, parent: n.parent} + n.parent.children = append(n.parent.children, next) + + // Split inodes across two nodes. + next.inodes = n.inodes[splitIndex:] + n.inodes = n.inodes[:splitIndex] + + // Update the statistics. + n.bucket.tx.stats.Split++ + + return n, next +} + +// splitIndex finds the position where a page will fill a given threshold. +// It returns the index as well as the size of the first page. +// This is only be called from split(). +func (n *node) splitIndex(threshold int) (index, sz int) { + sz = pageHeaderSize + + // Loop until we only have the minimum number of keys required for the second page. + for i := 0; i < len(n.inodes)-minKeysPerPage; i++ { + index = i + inode := n.inodes[i] + elsize := n.pageElementSize() + len(inode.key) + len(inode.value) + + // If we have at least the minimum number of keys and adding another + // node would put us over the threshold then exit and return. + if i >= minKeysPerPage && sz+elsize > threshold { + break + } + + // Add the element size to the total size. + sz += elsize + } + + return +} + +// spill writes the nodes to dirty pages and splits nodes as it goes. +// Returns an error if dirty pages cannot be allocated. +func (n *node) spill() error { + var tx = n.bucket.tx + if n.spilled { + return nil + } + + // Spill child nodes first. Child nodes can materialize sibling nodes in + // the case of split-merge so we cannot use a range loop. We have to check + // the children size on every loop iteration. + sort.Sort(n.children) + for i := 0; i < len(n.children); i++ { + if err := n.children[i].spill(); err != nil { + return err + } + } + + // We no longer need the child list because it's only used for spill tracking. + n.children = nil + + // Split nodes into appropriate sizes. The first node will always be n. + var nodes = n.split(tx.db.pageSize) + for _, node := range nodes { + // Add node's page to the freelist if it's not new. + if node.pgid > 0 { + tx.db.freelist.free(tx.meta.txid, tx.page(node.pgid)) + node.pgid = 0 + } + + // Allocate contiguous space for the node. + p, err := tx.allocate((node.size() / tx.db.pageSize) + 1) + if err != nil { + return err + } + + // Write the node. + if p.id >= tx.meta.pgid { + panic(fmt.Sprintf("pgid (%d) above high water mark (%d)", p.id, tx.meta.pgid)) + } + node.pgid = p.id + node.write(p) + node.spilled = true + + // Insert into parent inodes. + if node.parent != nil { + var key = node.key + if key == nil { + key = node.inodes[0].key + } + + node.parent.put(key, node.inodes[0].key, nil, node.pgid, 0) + node.key = node.inodes[0].key + _assert(len(node.key) > 0, "spill: zero-length node key") + } + + // Update the statistics. + tx.stats.Spill++ + } + + // If the root node split and created a new root then we need to spill that + // as well. We'll clear out the children to make sure it doesn't try to respill. + if n.parent != nil && n.parent.pgid == 0 { + n.children = nil + return n.parent.spill() + } + + return nil +} + +// rebalance attempts to combine the node with sibling nodes if the node fill +// size is below a threshold or if there are not enough keys. +func (n *node) rebalance() { + if !n.unbalanced { + return + } + n.unbalanced = false + + // Update statistics. + n.bucket.tx.stats.Rebalance++ + + // Ignore if node is above threshold (25%) and has enough keys. + var threshold = n.bucket.tx.db.pageSize / 4 + if n.size() > threshold && len(n.inodes) > n.minKeys() { + return + } + + // Root node has special handling. + if n.parent == nil { + // If root node is a branch and only has one node then collapse it. + if !n.isLeaf && len(n.inodes) == 1 { + // Move root's child up. + child := n.bucket.node(n.inodes[0].pgid, n) + n.isLeaf = child.isLeaf + n.inodes = child.inodes[:] + n.children = child.children + + // Reparent all child nodes being moved. + for _, inode := range n.inodes { + if child, ok := n.bucket.nodes[inode.pgid]; ok { + child.parent = n + } + } + + // Remove old child. + child.parent = nil + delete(n.bucket.nodes, child.pgid) + child.free() + } + + return + } + + // If node has no keys then just remove it. + if n.numChildren() == 0 { + n.parent.del(n.key) + n.parent.removeChild(n) + delete(n.bucket.nodes, n.pgid) + n.free() + n.parent.rebalance() + return + } + + _assert(n.parent.numChildren() > 1, "parent must have at least 2 children") + + // Destination node is right sibling if idx == 0, otherwise left sibling. + var target *node + var useNextSibling = (n.parent.childIndex(n) == 0) + if useNextSibling { + target = n.nextSibling() + } else { + target = n.prevSibling() + } + + // If both this node and the target node are too small then merge them. + if useNextSibling { + // Reparent all child nodes being moved. + for _, inode := range target.inodes { + if child, ok := n.bucket.nodes[inode.pgid]; ok { + child.parent.removeChild(child) + child.parent = n + child.parent.children = append(child.parent.children, child) + } + } + + // Copy over inodes from target and remove target. + n.inodes = append(n.inodes, target.inodes...) + n.parent.del(target.key) + n.parent.removeChild(target) + delete(n.bucket.nodes, target.pgid) + target.free() + } else { + // Reparent all child nodes being moved. + for _, inode := range n.inodes { + if child, ok := n.bucket.nodes[inode.pgid]; ok { + child.parent.removeChild(child) + child.parent = target + child.parent.children = append(child.parent.children, child) + } + } + + // Copy over inodes to target and remove node. + target.inodes = append(target.inodes, n.inodes...) + n.parent.del(n.key) + n.parent.removeChild(n) + delete(n.bucket.nodes, n.pgid) + n.free() + } + + // Either this node or the target node was deleted from the parent so rebalance it. + n.parent.rebalance() +} + +// removes a node from the list of in-memory children. +// This does not affect the inodes. +func (n *node) removeChild(target *node) { + for i, child := range n.children { + if child == target { + n.children = append(n.children[:i], n.children[i+1:]...) + return + } + } +} + +// dereference causes the node to copy all its inode key/value references to heap memory. +// This is required when the mmap is reallocated so inodes are not pointing to stale data. +func (n *node) dereference() { + if n.key != nil { + key := make([]byte, len(n.key)) + copy(key, n.key) + n.key = key + _assert(n.pgid == 0 || len(n.key) > 0, "dereference: zero-length node key on existing node") + } + + for i := range n.inodes { + inode := &n.inodes[i] + + key := make([]byte, len(inode.key)) + copy(key, inode.key) + inode.key = key + _assert(len(inode.key) > 0, "dereference: zero-length inode key") + + value := make([]byte, len(inode.value)) + copy(value, inode.value) + inode.value = value + } + + // Recursively dereference children. + for _, child := range n.children { + child.dereference() + } + + // Update statistics. + n.bucket.tx.stats.NodeDeref++ +} + +// free adds the node's underlying page to the freelist. +func (n *node) free() { + if n.pgid != 0 { + n.bucket.tx.db.freelist.free(n.bucket.tx.meta.txid, n.bucket.tx.page(n.pgid)) + n.pgid = 0 + } +} + +// dump writes the contents of the node to STDERR for debugging purposes. +/* +func (n *node) dump() { + // Write node header. + var typ = "branch" + if n.isLeaf { + typ = "leaf" + } + warnf("[NODE %d {type=%s count=%d}]", n.pgid, typ, len(n.inodes)) + + // Write out abbreviated version of each item. + for _, item := range n.inodes { + if n.isLeaf { + if item.flags&bucketLeafFlag != 0 { + bucket := (*bucket)(unsafe.Pointer(&item.value[0])) + warnf("+L %08x -> (bucket root=%d)", trunc(item.key, 4), bucket.root) + } else { + warnf("+L %08x -> %08x", trunc(item.key, 4), trunc(item.value, 4)) + } + } else { + warnf("+B %08x -> pgid=%d", trunc(item.key, 4), item.pgid) + } + } + warn("") +} +*/ + +type nodes []*node + +func (s nodes) Len() int { return len(s) } +func (s nodes) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s nodes) Less(i, j int) bool { return bytes.Compare(s[i].inodes[0].key, s[j].inodes[0].key) == -1 } + +// inode represents an internal node inside of a node. +// It can be used to point to elements in a page or point +// to an element which hasn't been added to a page yet. +type inode struct { + flags uint32 + pgid pgid + key []byte + value []byte +} + +type inodes []inode diff --git a/vendor/github.com/boltdb/bolt/page.go b/vendor/github.com/boltdb/bolt/page.go new file mode 100644 index 000000000..4a555286a --- /dev/null +++ b/vendor/github.com/boltdb/bolt/page.go @@ -0,0 +1,172 @@ +package bolt + +import ( + "fmt" + "os" + "sort" + "unsafe" +) + +const pageHeaderSize = int(unsafe.Offsetof(((*page)(nil)).ptr)) + +const minKeysPerPage = 2 + +const branchPageElementSize = int(unsafe.Sizeof(branchPageElement{})) +const leafPageElementSize = int(unsafe.Sizeof(leafPageElement{})) + +const ( + branchPageFlag = 0x01 + leafPageFlag = 0x02 + metaPageFlag = 0x04 + freelistPageFlag = 0x10 +) + +const ( + bucketLeafFlag = 0x01 +) + +type pgid uint64 + +type page struct { + id pgid + flags uint16 + count uint16 + overflow uint32 + ptr uintptr +} + +// typ returns a human readable page type string used for debugging. +func (p *page) typ() string { + if (p.flags & branchPageFlag) != 0 { + return "branch" + } else if (p.flags & leafPageFlag) != 0 { + return "leaf" + } else if (p.flags & metaPageFlag) != 0 { + return "meta" + } else if (p.flags & freelistPageFlag) != 0 { + return "freelist" + } + return fmt.Sprintf("unknown<%02x>", p.flags) +} + +// meta returns a pointer to the metadata section of the page. +func (p *page) meta() *meta { + return (*meta)(unsafe.Pointer(&p.ptr)) +} + +// leafPageElement retrieves the leaf node by index +func (p *page) leafPageElement(index uint16) *leafPageElement { + n := &((*[0x7FFFFFF]leafPageElement)(unsafe.Pointer(&p.ptr)))[index] + return n +} + +// leafPageElements retrieves a list of leaf nodes. +func (p *page) leafPageElements() []leafPageElement { + return ((*[0x7FFFFFF]leafPageElement)(unsafe.Pointer(&p.ptr)))[:] +} + +// branchPageElement retrieves the branch node by index +func (p *page) branchPageElement(index uint16) *branchPageElement { + return &((*[0x7FFFFFF]branchPageElement)(unsafe.Pointer(&p.ptr)))[index] +} + +// branchPageElements retrieves a list of branch nodes. +func (p *page) branchPageElements() []branchPageElement { + return ((*[0x7FFFFFF]branchPageElement)(unsafe.Pointer(&p.ptr)))[:] +} + +// dump writes n bytes of the page to STDERR as hex output. +func (p *page) hexdump(n int) { + buf := (*[maxAllocSize]byte)(unsafe.Pointer(p))[:n] + fmt.Fprintf(os.Stderr, "%x\n", buf) +} + +type pages []*page + +func (s pages) Len() int { return len(s) } +func (s pages) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s pages) Less(i, j int) bool { return s[i].id < s[j].id } + +// branchPageElement represents a node on a branch page. +type branchPageElement struct { + pos uint32 + ksize uint32 + pgid pgid +} + +// key returns a byte slice of the node key. +func (n *branchPageElement) key() []byte { + buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) + return (*[maxAllocSize]byte)(unsafe.Pointer(&buf[n.pos]))[:n.ksize] +} + +// leafPageElement represents a node on a leaf page. +type leafPageElement struct { + flags uint32 + pos uint32 + ksize uint32 + vsize uint32 +} + +// key returns a byte slice of the node key. +func (n *leafPageElement) key() []byte { + buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) + return (*[maxAllocSize]byte)(unsafe.Pointer(&buf[n.pos]))[:n.ksize:n.ksize] +} + +// value returns a byte slice of the node value. +func (n *leafPageElement) value() []byte { + buf := (*[maxAllocSize]byte)(unsafe.Pointer(n)) + return (*[maxAllocSize]byte)(unsafe.Pointer(&buf[n.pos+n.ksize]))[:n.vsize:n.vsize] +} + +// PageInfo represents human readable information about a page. +type PageInfo struct { + ID int + Type string + Count int + OverflowCount int +} + +type pgids []pgid + +func (s pgids) Len() int { return len(s) } +func (s pgids) Swap(i, j int) { s[i], s[j] = s[j], s[i] } +func (s pgids) Less(i, j int) bool { return s[i] < s[j] } + +// merge returns the sorted union of a and b. +func (a pgids) merge(b pgids) pgids { + // Return the opposite slice if one is nil. + if len(a) == 0 { + return b + } else if len(b) == 0 { + return a + } + + // Create a list to hold all elements from both lists. + merged := make(pgids, 0, len(a)+len(b)) + + // Assign lead to the slice with a lower starting value, follow to the higher value. + lead, follow := a, b + if b[0] < a[0] { + lead, follow = b, a + } + + // Continue while there are elements in the lead. + for len(lead) > 0 { + // Merge largest prefix of lead that is ahead of follow[0]. + n := sort.Search(len(lead), func(i int) bool { return lead[i] > follow[0] }) + merged = append(merged, lead[:n]...) + if n >= len(lead) { + break + } + + // Swap lead and follow. + lead, follow = follow, lead[n:] + } + + // Append what's left in follow. + merged = append(merged, follow...) + + return merged +} diff --git a/vendor/github.com/boltdb/bolt/tx.go b/vendor/github.com/boltdb/bolt/tx.go new file mode 100644 index 000000000..b8510fdb8 --- /dev/null +++ b/vendor/github.com/boltdb/bolt/tx.go @@ -0,0 +1,666 @@ +package bolt + +import ( + "fmt" + "io" + "os" + "sort" + "strings" + "time" + "unsafe" +) + +// txid represents the internal transaction identifier. +type txid uint64 + +// Tx represents a read-only or read/write transaction on the database. +// Read-only transactions can be used for retrieving values for keys and creating cursors. +// Read/write transactions can create and remove buckets and create and remove keys. +// +// IMPORTANT: You must commit or rollback transactions when you are done with +// them. Pages can not be reclaimed by the writer until no more transactions +// are using them. A long running read transaction can cause the database to +// quickly grow. +type Tx struct { + writable bool + managed bool + db *DB + meta *meta + root Bucket + pages map[pgid]*page + stats TxStats + commitHandlers []func() + + // WriteFlag specifies the flag for write-related methods like WriteTo(). + // Tx opens the database file with the specified flag to copy the data. + // + // By default, the flag is unset, which works well for mostly in-memory + // workloads. For databases that are much larger than available RAM, + // set the flag to syscall.O_DIRECT to avoid trashing the page cache. + WriteFlag int +} + +// init initializes the transaction. +func (tx *Tx) init(db *DB) { + tx.db = db + tx.pages = nil + + // Copy the meta page since it can be changed by the writer. + tx.meta = &meta{} + db.meta().copy(tx.meta) + + // Copy over the root bucket. + tx.root = newBucket(tx) + tx.root.bucket = &bucket{} + *tx.root.bucket = tx.meta.root + + // Increment the transaction id and add a page cache for writable transactions. + if tx.writable { + tx.pages = make(map[pgid]*page) + tx.meta.txid += txid(1) + } +} + +// ID returns the transaction id. +func (tx *Tx) ID() int { + return int(tx.meta.txid) +} + +// DB returns a reference to the database that created the transaction. +func (tx *Tx) DB() *DB { + return tx.db +} + +// Size returns current database size in bytes as seen by this transaction. +func (tx *Tx) Size() int64 { + return int64(tx.meta.pgid) * int64(tx.db.pageSize) +} + +// Writable returns whether the transaction can perform write operations. +func (tx *Tx) Writable() bool { + return tx.writable +} + +// Cursor creates a cursor associated with the root bucket. +// All items in the cursor will return a nil value because all root bucket keys point to buckets. +// The cursor is only valid as long as the transaction is open. +// Do not use a cursor after the transaction is closed. +func (tx *Tx) Cursor() *Cursor { + return tx.root.Cursor() +} + +// Stats retrieves a copy of the current transaction statistics. +func (tx *Tx) Stats() TxStats { + return tx.stats +} + +// Bucket retrieves a bucket by name. +// Returns nil if the bucket does not exist. +// The bucket instance is only valid for the lifetime of the transaction. +func (tx *Tx) Bucket(name []byte) *Bucket { + return tx.root.Bucket(name) +} + +// CreateBucket creates a new bucket. +// Returns an error if the bucket already exists, if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. +func (tx *Tx) CreateBucket(name []byte) (*Bucket, error) { + return tx.root.CreateBucket(name) +} + +// CreateBucketIfNotExists creates a new bucket if it doesn't already exist. +// Returns an error if the bucket name is blank, or if the bucket name is too long. +// The bucket instance is only valid for the lifetime of the transaction. +func (tx *Tx) CreateBucketIfNotExists(name []byte) (*Bucket, error) { + return tx.root.CreateBucketIfNotExists(name) +} + +// DeleteBucket deletes a bucket. +// Returns an error if the bucket cannot be found or if the key represents a non-bucket value. +func (tx *Tx) DeleteBucket(name []byte) error { + return tx.root.DeleteBucket(name) +} + +// ForEach executes a function for each bucket in the root. +// If the provided function returns an error then the iteration is stopped and +// the error is returned to the caller. +func (tx *Tx) ForEach(fn func(name []byte, b *Bucket) error) error { + return tx.root.ForEach(func(k, v []byte) error { + if err := fn(k, tx.root.Bucket(k)); err != nil { + return err + } + return nil + }) +} + +// OnCommit adds a handler function to be executed after the transaction successfully commits. +func (tx *Tx) OnCommit(fn func()) { + tx.commitHandlers = append(tx.commitHandlers, fn) +} + +// Commit writes all changes to disk and updates the meta page. +// Returns an error if a disk write error occurs, or if Commit is +// called on a read-only transaction. +func (tx *Tx) Commit() error { + _assert(!tx.managed, "managed tx commit not allowed") + if tx.db == nil { + return ErrTxClosed + } else if !tx.writable { + return ErrTxNotWritable + } + + // TODO(benbjohnson): Use vectorized I/O to write out dirty pages. + + // Rebalance nodes which have had deletions. + var startTime = time.Now() + tx.root.rebalance() + if tx.stats.Rebalance > 0 { + tx.stats.RebalanceTime += time.Since(startTime) + } + + // spill data onto dirty pages. + startTime = time.Now() + if err := tx.root.spill(); err != nil { + tx.rollback() + return err + } + tx.stats.SpillTime += time.Since(startTime) + + // Free the old root bucket. + tx.meta.root.root = tx.root.root + + opgid := tx.meta.pgid + + // Free the freelist and allocate new pages for it. This will overestimate + // the size of the freelist but not underestimate the size (which would be bad). + tx.db.freelist.free(tx.meta.txid, tx.db.page(tx.meta.freelist)) + p, err := tx.allocate((tx.db.freelist.size() / tx.db.pageSize) + 1) + if err != nil { + tx.rollback() + return err + } + if err := tx.db.freelist.write(p); err != nil { + tx.rollback() + return err + } + tx.meta.freelist = p.id + + // If the high water mark has moved up then attempt to grow the database. + if tx.meta.pgid > opgid { + if err := tx.db.grow(int(tx.meta.pgid+1) * tx.db.pageSize); err != nil { + tx.rollback() + return err + } + } + + // Write dirty pages to disk. + startTime = time.Now() + if err := tx.write(); err != nil { + tx.rollback() + return err + } + + // If strict mode is enabled then perform a consistency check. + // Only the first consistency error is reported in the panic. + if tx.db.StrictMode { + ch := tx.Check() + var errs []string + for { + err, ok := <-ch + if !ok { + break + } + errs = append(errs, err.Error()) + } + if len(errs) > 0 { + panic("check fail: " + strings.Join(errs, "\n")) + } + } + + // Write meta to disk. + if err := tx.writeMeta(); err != nil { + tx.rollback() + return err + } + tx.stats.WriteTime += time.Since(startTime) + + // Finalize the transaction. + tx.close() + + // Execute commit handlers now that the locks have been removed. + for _, fn := range tx.commitHandlers { + fn() + } + + return nil +} + +// Rollback closes the transaction and ignores all previous updates. Read-only +// transactions must be rolled back and not committed. +func (tx *Tx) Rollback() error { + _assert(!tx.managed, "managed tx rollback not allowed") + if tx.db == nil { + return ErrTxClosed + } + tx.rollback() + return nil +} + +func (tx *Tx) rollback() { + if tx.db == nil { + return + } + if tx.writable { + tx.db.freelist.rollback(tx.meta.txid) + tx.db.freelist.reload(tx.db.page(tx.db.meta().freelist)) + } + tx.close() +} + +func (tx *Tx) close() { + if tx.db == nil { + return + } + if tx.writable { + // Grab freelist stats. + var freelistFreeN = tx.db.freelist.free_count() + var freelistPendingN = tx.db.freelist.pending_count() + var freelistAlloc = tx.db.freelist.size() + + // Remove transaction ref & writer lock. + tx.db.rwtx = nil + tx.db.rwlock.Unlock() + + // Merge statistics. + tx.db.statlock.Lock() + tx.db.stats.FreePageN = freelistFreeN + tx.db.stats.PendingPageN = freelistPendingN + tx.db.stats.FreeAlloc = (freelistFreeN + freelistPendingN) * tx.db.pageSize + tx.db.stats.FreelistInuse = freelistAlloc + tx.db.stats.TxStats.add(&tx.stats) + tx.db.statlock.Unlock() + } else { + tx.db.removeTx(tx) + } + + // Clear all references. + tx.db = nil + tx.meta = nil + tx.root = Bucket{tx: tx} + tx.pages = nil +} + +// Copy writes the entire database to a writer. +// This function exists for backwards compatibility. Use WriteTo() instead. +func (tx *Tx) Copy(w io.Writer) error { + _, err := tx.WriteTo(w) + return err +} + +// WriteTo writes the entire database to a writer. +// If err == nil then exactly tx.Size() bytes will be written into the writer. +func (tx *Tx) WriteTo(w io.Writer) (n int64, err error) { + // Attempt to open reader with WriteFlag + f, err := os.OpenFile(tx.db.path, os.O_RDONLY|tx.WriteFlag, 0) + if err != nil { + return 0, err + } + defer func() { _ = f.Close() }() + + // Generate a meta page. We use the same page data for both meta pages. + buf := make([]byte, tx.db.pageSize) + page := (*page)(unsafe.Pointer(&buf[0])) + page.flags = metaPageFlag + *page.meta() = *tx.meta + + // Write meta 0. + page.id = 0 + page.meta().checksum = page.meta().sum64() + nn, err := w.Write(buf) + n += int64(nn) + if err != nil { + return n, fmt.Errorf("meta 0 copy: %s", err) + } + + // Write meta 1 with a lower transaction id. + page.id = 1 + page.meta().txid -= 1 + page.meta().checksum = page.meta().sum64() + nn, err = w.Write(buf) + n += int64(nn) + if err != nil { + return n, fmt.Errorf("meta 1 copy: %s", err) + } + + // Move past the meta pages in the file. + if _, err := f.Seek(int64(tx.db.pageSize*2), os.SEEK_SET); err != nil { + return n, fmt.Errorf("seek: %s", err) + } + + // Copy data pages. + wn, err := io.CopyN(w, f, tx.Size()-int64(tx.db.pageSize*2)) + n += wn + if err != nil { + return n, err + } + + return n, f.Close() +} + +// CopyFile copies the entire database to file at the given path. +// A reader transaction is maintained during the copy so it is safe to continue +// using the database while a copy is in progress. +func (tx *Tx) CopyFile(path string, mode os.FileMode) error { + f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE|os.O_TRUNC, mode) + if err != nil { + return err + } + + err = tx.Copy(f) + if err != nil { + _ = f.Close() + return err + } + return f.Close() +} + +// Check performs several consistency checks on the database for this transaction. +// An error is returned if any inconsistency is found. +// +// It can be safely run concurrently on a writable transaction. However, this +// incurs a high cost for large databases and databases with a lot of subbuckets +// because of caching. This overhead can be removed if running on a read-only +// transaction, however, it is not safe to execute other writer transactions at +// the same time. +func (tx *Tx) Check() <-chan error { + ch := make(chan error) + go tx.check(ch) + return ch +} + +func (tx *Tx) check(ch chan error) { + // Check if any pages are double freed. + freed := make(map[pgid]bool) + for _, id := range tx.db.freelist.all() { + if freed[id] { + ch <- fmt.Errorf("page %d: already freed", id) + } + freed[id] = true + } + + // Track every reachable page. + reachable := make(map[pgid]*page) + reachable[0] = tx.page(0) // meta0 + reachable[1] = tx.page(1) // meta1 + for i := uint32(0); i <= tx.page(tx.meta.freelist).overflow; i++ { + reachable[tx.meta.freelist+pgid(i)] = tx.page(tx.meta.freelist) + } + + // Recursively check buckets. + tx.checkBucket(&tx.root, reachable, freed, ch) + + // Ensure all pages below high water mark are either reachable or freed. + for i := pgid(0); i < tx.meta.pgid; i++ { + _, isReachable := reachable[i] + if !isReachable && !freed[i] { + ch <- fmt.Errorf("page %d: unreachable unfreed", int(i)) + } + } + + // Close the channel to signal completion. + close(ch) +} + +func (tx *Tx) checkBucket(b *Bucket, reachable map[pgid]*page, freed map[pgid]bool, ch chan error) { + // Ignore inline buckets. + if b.root == 0 { + return + } + + // Check every page used by this bucket. + b.tx.forEachPage(b.root, 0, func(p *page, _ int) { + if p.id > tx.meta.pgid { + ch <- fmt.Errorf("page %d: out of bounds: %d", int(p.id), int(b.tx.meta.pgid)) + } + + // Ensure each page is only referenced once. + for i := pgid(0); i <= pgid(p.overflow); i++ { + var id = p.id + i + if _, ok := reachable[id]; ok { + ch <- fmt.Errorf("page %d: multiple references", int(id)) + } + reachable[id] = p + } + + // We should only encounter un-freed leaf and branch pages. + if freed[p.id] { + ch <- fmt.Errorf("page %d: reachable freed", int(p.id)) + } else if (p.flags&branchPageFlag) == 0 && (p.flags&leafPageFlag) == 0 { + ch <- fmt.Errorf("page %d: invalid type: %s", int(p.id), p.typ()) + } + }) + + // Check each bucket within this bucket. + _ = b.ForEach(func(k, v []byte) error { + if child := b.Bucket(k); child != nil { + tx.checkBucket(child, reachable, freed, ch) + } + return nil + }) +} + +// allocate returns a contiguous block of memory starting at a given page. +func (tx *Tx) allocate(count int) (*page, error) { + p, err := tx.db.allocate(count) + if err != nil { + return nil, err + } + + // Save to our page cache. + tx.pages[p.id] = p + + // Update statistics. + tx.stats.PageCount++ + tx.stats.PageAlloc += count * tx.db.pageSize + + return p, nil +} + +// write writes any dirty pages to disk. +func (tx *Tx) write() error { + // Sort pages by id. + pages := make(pages, 0, len(tx.pages)) + for _, p := range tx.pages { + pages = append(pages, p) + } + sort.Sort(pages) + + // Write pages to disk in order. + for _, p := range pages { + size := (int(p.overflow) + 1) * tx.db.pageSize + offset := int64(p.id) * int64(tx.db.pageSize) + + // Write out page in "max allocation" sized chunks. + ptr := (*[maxAllocSize]byte)(unsafe.Pointer(p)) + for { + // Limit our write to our max allocation size. + sz := size + if sz > maxAllocSize-1 { + sz = maxAllocSize - 1 + } + + // Write chunk to disk. + buf := ptr[:sz] + if _, err := tx.db.ops.writeAt(buf, offset); err != nil { + return err + } + + // Update statistics. + tx.stats.Write++ + + // Exit inner for loop if we've written all the chunks. + size -= sz + if size == 0 { + break + } + + // Otherwise move offset forward and move pointer to next chunk. + offset += int64(sz) + ptr = (*[maxAllocSize]byte)(unsafe.Pointer(&ptr[sz])) + } + } + + // Ignore file sync if flag is set on DB. + if !tx.db.NoSync || IgnoreNoSync { + if err := fdatasync(tx.db); err != nil { + return err + } + } + + // Clear out page cache. + tx.pages = make(map[pgid]*page) + + return nil +} + +// writeMeta writes the meta to the disk. +func (tx *Tx) writeMeta() error { + // Create a temporary buffer for the meta page. + buf := make([]byte, tx.db.pageSize) + p := tx.db.pageInBuffer(buf, 0) + tx.meta.write(p) + + // Write the meta page to file. + if _, err := tx.db.ops.writeAt(buf, int64(p.id)*int64(tx.db.pageSize)); err != nil { + return err + } + if !tx.db.NoSync || IgnoreNoSync { + if err := fdatasync(tx.db); err != nil { + return err + } + } + + // Update statistics. + tx.stats.Write++ + + return nil +} + +// page returns a reference to the page with a given id. +// If page has been written to then a temporary buffered page is returned. +func (tx *Tx) page(id pgid) *page { + // Check the dirty pages first. + if tx.pages != nil { + if p, ok := tx.pages[id]; ok { + return p + } + } + + // Otherwise return directly from the mmap. + return tx.db.page(id) +} + +// forEachPage iterates over every page within a given page and executes a function. +func (tx *Tx) forEachPage(pgid pgid, depth int, fn func(*page, int)) { + p := tx.page(pgid) + + // Execute function. + fn(p, depth) + + // Recursively loop over children. + if (p.flags & branchPageFlag) != 0 { + for i := 0; i < int(p.count); i++ { + elem := p.branchPageElement(uint16(i)) + tx.forEachPage(elem.pgid, depth+1, fn) + } + } +} + +// Page returns page information for a given page number. +// This is only safe for concurrent use when used by a writable transaction. +func (tx *Tx) Page(id int) (*PageInfo, error) { + if tx.db == nil { + return nil, ErrTxClosed + } else if pgid(id) >= tx.meta.pgid { + return nil, nil + } + + // Build the page info. + p := tx.db.page(pgid(id)) + info := &PageInfo{ + ID: id, + Count: int(p.count), + OverflowCount: int(p.overflow), + } + + // Determine the type (or if it's free). + if tx.db.freelist.freed(pgid(id)) { + info.Type = "free" + } else { + info.Type = p.typ() + } + + return info, nil +} + +// TxStats represents statistics about the actions performed by the transaction. +type TxStats struct { + // Page statistics. + PageCount int // number of page allocations + PageAlloc int // total bytes allocated + + // Cursor statistics. + CursorCount int // number of cursors created + + // Node statistics + NodeCount int // number of node allocations + NodeDeref int // number of node dereferences + + // Rebalance statistics. + Rebalance int // number of node rebalances + RebalanceTime time.Duration // total time spent rebalancing + + // Split/Spill statistics. + Split int // number of nodes split + Spill int // number of nodes spilled + SpillTime time.Duration // total time spent spilling + + // Write statistics. + Write int // number of writes performed + WriteTime time.Duration // total time spent writing to disk +} + +func (s *TxStats) add(other *TxStats) { + s.PageCount += other.PageCount + s.PageAlloc += other.PageAlloc + s.CursorCount += other.CursorCount + s.NodeCount += other.NodeCount + s.NodeDeref += other.NodeDeref + s.Rebalance += other.Rebalance + s.RebalanceTime += other.RebalanceTime + s.Split += other.Split + s.Spill += other.Spill + s.SpillTime += other.SpillTime + s.Write += other.Write + s.WriteTime += other.WriteTime +} + +// Sub calculates and returns the difference between two sets of transaction stats. +// This is useful when obtaining stats at two different points and time and +// you need the performance counters that occurred within that time span. +func (s *TxStats) Sub(other *TxStats) TxStats { + var diff TxStats + diff.PageCount = s.PageCount - other.PageCount + diff.PageAlloc = s.PageAlloc - other.PageAlloc + diff.CursorCount = s.CursorCount - other.CursorCount + diff.NodeCount = s.NodeCount - other.NodeCount + diff.NodeDeref = s.NodeDeref - other.NodeDeref + diff.Rebalance = s.Rebalance - other.Rebalance + diff.RebalanceTime = s.RebalanceTime - other.RebalanceTime + diff.Split = s.Split - other.Split + diff.Spill = s.Spill - other.Spill + diff.SpillTime = s.SpillTime - other.SpillTime + diff.Write = s.Write - other.Write + diff.WriteTime = s.WriteTime - other.WriteTime + return diff +} diff --git a/vendor/github.com/coreos/etcd/LICENSE b/vendor/github.com/coreos/etcd/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/vendor/github.com/coreos/etcd/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/coreos/etcd/NOTICE b/vendor/github.com/coreos/etcd/NOTICE new file mode 100644 index 000000000..b39ddfa5c --- /dev/null +++ b/vendor/github.com/coreos/etcd/NOTICE @@ -0,0 +1,5 @@ +CoreOS Project +Copyright 2014 CoreOS, Inc + +This product includes software developed at CoreOS, Inc. +(http://www.coreos.com/). diff --git a/vendor/github.com/coreos/etcd/error/error.go b/vendor/github.com/coreos/etcd/error/error.go new file mode 100644 index 000000000..c5cf8ffb4 --- /dev/null +++ b/vendor/github.com/coreos/etcd/error/error.go @@ -0,0 +1,162 @@ +// Copyright 2015 CoreOS, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package error describes errors in etcd project. When any change happens, +// Documentation/errorcode.md needs to be updated correspondingly. +package error + +import ( + "encoding/json" + "fmt" + "net/http" +) + +var errors = map[int]string{ + // command related errors + EcodeKeyNotFound: "Key not found", + EcodeTestFailed: "Compare failed", //test and set + EcodeNotFile: "Not a file", + ecodeNoMorePeer: "Reached the max number of peers in the cluster", + EcodeNotDir: "Not a directory", + EcodeNodeExist: "Key already exists", // create + ecodeKeyIsPreserved: "The prefix of given key is a keyword in etcd", + EcodeRootROnly: "Root is read only", + EcodeDirNotEmpty: "Directory not empty", + ecodeExistingPeerAddr: "Peer address has existed", + EcodeUnauthorized: "The request requires user authentication", + + // Post form related errors + ecodeValueRequired: "Value is Required in POST form", + EcodePrevValueRequired: "PrevValue is Required in POST form", + EcodeTTLNaN: "The given TTL in POST form is not a number", + EcodeIndexNaN: "The given index in POST form is not a number", + ecodeValueOrTTLRequired: "Value or TTL is required in POST form", + ecodeTimeoutNaN: "The given timeout in POST form is not a number", + ecodeNameRequired: "Name is required in POST form", + ecodeIndexOrValueRequired: "Index or value is required", + ecodeIndexValueMutex: "Index and value cannot both be specified", + EcodeInvalidField: "Invalid field", + EcodeInvalidForm: "Invalid POST form", + EcodeRefreshValue: "Value provided on refresh", + EcodeRefreshTTLRequired: "A TTL must be provided on refresh", + + // raft related errors + EcodeRaftInternal: "Raft Internal Error", + EcodeLeaderElect: "During Leader Election", + + // etcd related errors + EcodeWatcherCleared: "watcher is cleared due to etcd recovery", + EcodeEventIndexCleared: "The event in requested index is outdated and cleared", + ecodeStandbyInternal: "Standby Internal Error", + ecodeInvalidActiveSize: "Invalid active size", + ecodeInvalidRemoveDelay: "Standby remove delay", + + // client related errors + ecodeClientInternal: "Client Internal Error", +} + +var errorStatus = map[int]int{ + EcodeKeyNotFound: http.StatusNotFound, + EcodeNotFile: http.StatusForbidden, + EcodeDirNotEmpty: http.StatusForbidden, + EcodeUnauthorized: http.StatusUnauthorized, + EcodeTestFailed: http.StatusPreconditionFailed, + EcodeNodeExist: http.StatusPreconditionFailed, + EcodeRaftInternal: http.StatusInternalServerError, + EcodeLeaderElect: http.StatusInternalServerError, +} + +const ( + EcodeKeyNotFound = 100 + EcodeTestFailed = 101 + EcodeNotFile = 102 + ecodeNoMorePeer = 103 + EcodeNotDir = 104 + EcodeNodeExist = 105 + ecodeKeyIsPreserved = 106 + EcodeRootROnly = 107 + EcodeDirNotEmpty = 108 + ecodeExistingPeerAddr = 109 + EcodeUnauthorized = 110 + + ecodeValueRequired = 200 + EcodePrevValueRequired = 201 + EcodeTTLNaN = 202 + EcodeIndexNaN = 203 + ecodeValueOrTTLRequired = 204 + ecodeTimeoutNaN = 205 + ecodeNameRequired = 206 + ecodeIndexOrValueRequired = 207 + ecodeIndexValueMutex = 208 + EcodeInvalidField = 209 + EcodeInvalidForm = 210 + EcodeRefreshValue = 211 + EcodeRefreshTTLRequired = 212 + + EcodeRaftInternal = 300 + EcodeLeaderElect = 301 + + EcodeWatcherCleared = 400 + EcodeEventIndexCleared = 401 + ecodeStandbyInternal = 402 + ecodeInvalidActiveSize = 403 + ecodeInvalidRemoveDelay = 404 + + ecodeClientInternal = 500 +) + +type Error struct { + ErrorCode int `json:"errorCode"` + Message string `json:"message"` + Cause string `json:"cause,omitempty"` + Index uint64 `json:"index"` +} + +func NewRequestError(errorCode int, cause string) *Error { + return NewError(errorCode, cause, 0) +} + +func NewError(errorCode int, cause string, index uint64) *Error { + return &Error{ + ErrorCode: errorCode, + Message: errors[errorCode], + Cause: cause, + Index: index, + } +} + +// Error is for the error interface +func (e Error) Error() string { + return e.Message + " (" + e.Cause + ")" +} + +func (e Error) toJsonString() string { + b, _ := json.Marshal(e) + return string(b) +} + +func (e Error) StatusCode() int { + status, ok := errorStatus[e.ErrorCode] + if !ok { + status = http.StatusBadRequest + } + return status +} + +func (e Error) WriteTo(w http.ResponseWriter) { + w.Header().Add("X-Etcd-Index", fmt.Sprint(e.Index)) + w.Header().Set("Content-Type", "application/json") + w.WriteHeader(e.StatusCode()) + fmt.Fprintln(w, e.toJsonString()) +} diff --git a/vendor/github.com/coreos/go-etcd/LICENSE b/vendor/github.com/coreos/go-etcd/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/coreos/go-etcd/etcd/add_child.go b/vendor/github.com/coreos/go-etcd/etcd/add_child.go new file mode 100644 index 000000000..7122be049 --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/add_child.go @@ -0,0 +1,23 @@ +package etcd + +// Add a new directory with a random etcd-generated key under the given path. +func (c *Client) AddChildDir(key string, ttl uint64) (*Response, error) { + raw, err := c.post(key, "", ttl) + + if err != nil { + return nil, err + } + + return raw.Unmarshal() +} + +// Add a new file with a random etcd-generated key under the given path. +func (c *Client) AddChild(key string, value string, ttl uint64) (*Response, error) { + raw, err := c.post(key, value, ttl) + + if err != nil { + return nil, err + } + + return raw.Unmarshal() +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/client.go b/vendor/github.com/coreos/go-etcd/etcd/client.go new file mode 100644 index 000000000..60ed762b9 --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/client.go @@ -0,0 +1,476 @@ +package etcd + +import ( + "crypto/tls" + "crypto/x509" + "encoding/json" + "errors" + "io" + "io/ioutil" + "math/rand" + "net" + "net/http" + "net/url" + "os" + "path" + "strings" + "time" +) + +// See SetConsistency for how to use these constants. +const ( + // Using strings rather than iota because the consistency level + // could be persisted to disk, so it'd be better to use + // human-readable values. + STRONG_CONSISTENCY = "STRONG" + WEAK_CONSISTENCY = "WEAK" +) + +const ( + defaultBufferSize = 10 +) + +func init() { + rand.Seed(int64(time.Now().Nanosecond())) +} + +type Config struct { + CertFile string `json:"certFile"` + KeyFile string `json:"keyFile"` + CaCertFile []string `json:"caCertFiles"` + DialTimeout time.Duration `json:"timeout"` + Consistency string `json:"consistency"` +} + +type credentials struct { + username string + password string +} + +type Client struct { + config Config `json:"config"` + cluster *Cluster `json:"cluster"` + httpClient *http.Client + credentials *credentials + transport *http.Transport + persistence io.Writer + cURLch chan string + // CheckRetry can be used to control the policy for failed requests + // and modify the cluster if needed. + // The client calls it before sending requests again, and + // stops retrying if CheckRetry returns some error. The cases that + // this function needs to handle include no response and unexpected + // http status code of response. + // If CheckRetry is nil, client will call the default one + // `DefaultCheckRetry`. + // Argument cluster is the etcd.Cluster object that these requests have been made on. + // Argument numReqs is the number of http.Requests that have been made so far. + // Argument lastResp is the http.Responses from the last request. + // Argument err is the reason of the failure. + CheckRetry func(cluster *Cluster, numReqs int, + lastResp http.Response, err error) error +} + +// NewClient create a basic client that is configured to be used +// with the given machine list. +func NewClient(machines []string) *Client { + config := Config{ + // default timeout is one second + DialTimeout: time.Second, + Consistency: WEAK_CONSISTENCY, + } + + client := &Client{ + cluster: NewCluster(machines), + config: config, + } + + client.initHTTPClient() + client.saveConfig() + + return client +} + +// NewTLSClient create a basic client with TLS configuration +func NewTLSClient(machines []string, cert, key, caCert string) (*Client, error) { + // overwrite the default machine to use https + if len(machines) == 0 { + machines = []string{"https://127.0.0.1:4001"} + } + + config := Config{ + // default timeout is one second + DialTimeout: time.Second, + Consistency: WEAK_CONSISTENCY, + CertFile: cert, + KeyFile: key, + CaCertFile: make([]string, 0), + } + + client := &Client{ + cluster: NewCluster(machines), + config: config, + } + + err := client.initHTTPSClient(cert, key) + if err != nil { + return nil, err + } + + err = client.AddRootCA(caCert) + + client.saveConfig() + + return client, nil +} + +// NewClientFromFile creates a client from a given file path. +// The given file is expected to use the JSON format. +func NewClientFromFile(fpath string) (*Client, error) { + fi, err := os.Open(fpath) + if err != nil { + return nil, err + } + + defer func() { + if err := fi.Close(); err != nil { + panic(err) + } + }() + + return NewClientFromReader(fi) +} + +// NewClientFromReader creates a Client configured from a given reader. +// The configuration is expected to use the JSON format. +func NewClientFromReader(reader io.Reader) (*Client, error) { + c := new(Client) + + b, err := ioutil.ReadAll(reader) + if err != nil { + return nil, err + } + + err = json.Unmarshal(b, c) + if err != nil { + return nil, err + } + if c.config.CertFile == "" { + c.initHTTPClient() + } else { + err = c.initHTTPSClient(c.config.CertFile, c.config.KeyFile) + } + + if err != nil { + return nil, err + } + + for _, caCert := range c.config.CaCertFile { + if err := c.AddRootCA(caCert); err != nil { + return nil, err + } + } + + return c, nil +} + +// Override the Client's HTTP Transport object +func (c *Client) SetTransport(tr *http.Transport) { + c.httpClient.Transport = tr + c.transport = tr +} + +func (c *Client) SetCredentials(username, password string) { + c.credentials = &credentials{username, password} +} + +func (c *Client) Close() { + c.transport.DisableKeepAlives = true + c.transport.CloseIdleConnections() +} + +// initHTTPClient initializes a HTTP client for etcd client +func (c *Client) initHTTPClient() { + c.transport = &http.Transport{ + Dial: c.DefaultDial, + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: true, + }, + } + c.httpClient = &http.Client{Transport: c.transport} +} + +// initHTTPClient initializes a HTTPS client for etcd client +func (c *Client) initHTTPSClient(cert, key string) error { + if cert == "" || key == "" { + return errors.New("Require both cert and key path") + } + + tlsCert, err := tls.LoadX509KeyPair(cert, key) + if err != nil { + return err + } + + tlsConfig := &tls.Config{ + Certificates: []tls.Certificate{tlsCert}, + InsecureSkipVerify: true, + } + + c.transport = &http.Transport{ + TLSClientConfig: tlsConfig, + Dial: c.DefaultDial, + } + + c.httpClient = &http.Client{Transport: c.transport} + return nil +} + +// SetPersistence sets a writer to which the config will be +// written every time it's changed. +func (c *Client) SetPersistence(writer io.Writer) { + c.persistence = writer +} + +// SetConsistency changes the consistency level of the client. +// +// When consistency is set to STRONG_CONSISTENCY, all requests, +// including GET, are sent to the leader. This means that, assuming +// the absence of leader failures, GET requests are guaranteed to see +// the changes made by previous requests. +// +// When consistency is set to WEAK_CONSISTENCY, other requests +// are still sent to the leader, but GET requests are sent to a +// random server from the server pool. This reduces the read +// load on the leader, but it's not guaranteed that the GET requests +// will see changes made by previous requests (they might have not +// yet been committed on non-leader servers). +func (c *Client) SetConsistency(consistency string) error { + if !(consistency == STRONG_CONSISTENCY || consistency == WEAK_CONSISTENCY) { + return errors.New("The argument must be either STRONG_CONSISTENCY or WEAK_CONSISTENCY.") + } + c.config.Consistency = consistency + return nil +} + +// Sets the DialTimeout value +func (c *Client) SetDialTimeout(d time.Duration) { + c.config.DialTimeout = d +} + +// AddRootCA adds a root CA cert for the etcd client +func (c *Client) AddRootCA(caCert string) error { + if c.httpClient == nil { + return errors.New("Client has not been initialized yet!") + } + + certBytes, err := ioutil.ReadFile(caCert) + if err != nil { + return err + } + + tr, ok := c.httpClient.Transport.(*http.Transport) + + if !ok { + panic("AddRootCA(): Transport type assert should not fail") + } + + if tr.TLSClientConfig.RootCAs == nil { + caCertPool := x509.NewCertPool() + ok = caCertPool.AppendCertsFromPEM(certBytes) + if ok { + tr.TLSClientConfig.RootCAs = caCertPool + } + tr.TLSClientConfig.InsecureSkipVerify = false + } else { + ok = tr.TLSClientConfig.RootCAs.AppendCertsFromPEM(certBytes) + } + + if !ok { + err = errors.New("Unable to load caCert") + } + + c.config.CaCertFile = append(c.config.CaCertFile, caCert) + c.saveConfig() + + return err +} + +// SetCluster updates cluster information using the given machine list. +func (c *Client) SetCluster(machines []string) bool { + success := c.internalSyncCluster(machines) + return success +} + +func (c *Client) GetCluster() []string { + return c.cluster.Machines +} + +// SyncCluster updates the cluster information using the internal machine list. +// If no members are found, the intenral machine list is left untouched. +func (c *Client) SyncCluster() bool { + return c.internalSyncCluster(c.cluster.Machines) +} + +// internalSyncCluster syncs cluster information using the given machine list. +func (c *Client) internalSyncCluster(machines []string) bool { + // comma-separated list of machines in the cluster. + members := "" + + for _, machine := range machines { + httpPath := c.createHttpPath(machine, path.Join(version, "members")) + resp, err := c.httpClient.Get(httpPath) + if err != nil { + // try another machine in the cluster + continue + } + + if resp.StatusCode != http.StatusOK { // fall-back to old endpoint + httpPath := c.createHttpPath(machine, path.Join(version, "machines")) + resp, err := c.httpClient.Get(httpPath) + if err != nil { + // try another machine in the cluster + continue + } + b, err := ioutil.ReadAll(resp.Body) + resp.Body.Close() + if err != nil { + // try another machine in the cluster + continue + } + members = string(b) + } else { + b, err := ioutil.ReadAll(resp.Body) + resp.Body.Close() + if err != nil { + // try another machine in the cluster + continue + } + + var mCollection memberCollection + if err := json.Unmarshal(b, &mCollection); err != nil { + // try another machine + continue + } + + urls := make([]string, 0) + for _, m := range mCollection { + urls = append(urls, m.ClientURLs...) + } + + members = strings.Join(urls, ",") + } + + // We should never do an empty cluster update. + if members == "" { + continue + } + + // update Machines List + c.cluster.updateFromStr(members) + logger.Debug("sync.machines ", c.cluster.Machines) + c.saveConfig() + return true + } + + return false +} + +// createHttpPath creates a complete HTTP URL. +// serverName should contain both the host name and a port number, if any. +func (c *Client) createHttpPath(serverName string, _path string) string { + u, err := url.Parse(serverName) + if err != nil { + panic(err) + } + + u.Path = path.Join(u.Path, _path) + + if u.Scheme == "" { + u.Scheme = "http" + } + return u.String() +} + +// DefaultDial attempts to open a TCP connection to the provided address, explicitly +// enabling keep-alives with a one-second interval. +func (c *Client) DefaultDial(network, addr string) (net.Conn, error) { + dialer := net.Dialer{ + Timeout: c.config.DialTimeout, + KeepAlive: time.Second, + } + + return dialer.Dial(network, addr) +} + +func (c *Client) OpenCURL() { + c.cURLch = make(chan string, defaultBufferSize) +} + +func (c *Client) CloseCURL() { + c.cURLch = nil +} + +func (c *Client) sendCURL(command string) { + go func() { + select { + case c.cURLch <- command: + default: + } + }() +} + +func (c *Client) RecvCURL() string { + return <-c.cURLch +} + +// saveConfig saves the current config using c.persistence. +func (c *Client) saveConfig() error { + if c.persistence != nil { + b, err := json.Marshal(c) + if err != nil { + return err + } + + _, err = c.persistence.Write(b) + if err != nil { + return err + } + } + + return nil +} + +// MarshalJSON implements the Marshaller interface +// as defined by the standard JSON package. +func (c *Client) MarshalJSON() ([]byte, error) { + b, err := json.Marshal(struct { + Config Config `json:"config"` + Cluster *Cluster `json:"cluster"` + }{ + Config: c.config, + Cluster: c.cluster, + }) + + if err != nil { + return nil, err + } + + return b, nil +} + +// UnmarshalJSON implements the Unmarshaller interface +// as defined by the standard JSON package. +func (c *Client) UnmarshalJSON(b []byte) error { + temp := struct { + Config Config `json:"config"` + Cluster *Cluster `json:"cluster"` + }{} + err := json.Unmarshal(b, &temp) + if err != nil { + return err + } + + c.cluster = temp.Cluster + c.config = temp.Config + return nil +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/cluster.go b/vendor/github.com/coreos/go-etcd/etcd/cluster.go new file mode 100644 index 000000000..d0461e17a --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/cluster.go @@ -0,0 +1,54 @@ +package etcd + +import ( + "math/rand" + "strings" + "sync" +) + +type Cluster struct { + Leader string `json:"leader"` + Machines []string `json:"machines"` + picked int + mu sync.RWMutex +} + +func NewCluster(machines []string) *Cluster { + // if an empty slice was sent in then just assume HTTP 4001 on localhost + if len(machines) == 0 { + machines = []string{"http://127.0.0.1:4001"} + } + + machines = shuffleStringSlice(machines) + logger.Debug("Shuffle cluster machines", machines) + // default leader and machines + return &Cluster{ + Leader: "", + Machines: machines, + picked: rand.Intn(len(machines)), + } +} + +func (cl *Cluster) failure() { + cl.mu.Lock() + defer cl.mu.Unlock() + cl.picked = (cl.picked + 1) % len(cl.Machines) +} + +func (cl *Cluster) pick() string { + cl.mu.Lock() + defer cl.mu.Unlock() + return cl.Machines[cl.picked] +} + +func (cl *Cluster) updateFromStr(machines string) { + cl.mu.Lock() + defer cl.mu.Unlock() + + cl.Machines = strings.Split(machines, ",") + for i := range cl.Machines { + cl.Machines[i] = strings.TrimSpace(cl.Machines[i]) + } + cl.Machines = shuffleStringSlice(cl.Machines) + cl.picked = rand.Intn(len(cl.Machines)) +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/compare_and_delete.go b/vendor/github.com/coreos/go-etcd/etcd/compare_and_delete.go new file mode 100644 index 000000000..11131bb76 --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/compare_and_delete.go @@ -0,0 +1,34 @@ +package etcd + +import "fmt" + +func (c *Client) CompareAndDelete(key string, prevValue string, prevIndex uint64) (*Response, error) { + raw, err := c.RawCompareAndDelete(key, prevValue, prevIndex) + if err != nil { + return nil, err + } + + return raw.Unmarshal() +} + +func (c *Client) RawCompareAndDelete(key string, prevValue string, prevIndex uint64) (*RawResponse, error) { + if prevValue == "" && prevIndex == 0 { + return nil, fmt.Errorf("You must give either prevValue or prevIndex.") + } + + options := Options{} + if prevValue != "" { + options["prevValue"] = prevValue + } + if prevIndex != 0 { + options["prevIndex"] = prevIndex + } + + raw, err := c.delete(key, options) + + if err != nil { + return nil, err + } + + return raw, err +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/compare_and_swap.go b/vendor/github.com/coreos/go-etcd/etcd/compare_and_swap.go new file mode 100644 index 000000000..bb4f90643 --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/compare_and_swap.go @@ -0,0 +1,36 @@ +package etcd + +import "fmt" + +func (c *Client) CompareAndSwap(key string, value string, ttl uint64, + prevValue string, prevIndex uint64) (*Response, error) { + raw, err := c.RawCompareAndSwap(key, value, ttl, prevValue, prevIndex) + if err != nil { + return nil, err + } + + return raw.Unmarshal() +} + +func (c *Client) RawCompareAndSwap(key string, value string, ttl uint64, + prevValue string, prevIndex uint64) (*RawResponse, error) { + if prevValue == "" && prevIndex == 0 { + return nil, fmt.Errorf("You must give either prevValue or prevIndex.") + } + + options := Options{} + if prevValue != "" { + options["prevValue"] = prevValue + } + if prevIndex != 0 { + options["prevIndex"] = prevIndex + } + + raw, err := c.put(key, value, ttl, options) + + if err != nil { + return nil, err + } + + return raw, err +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/debug.go b/vendor/github.com/coreos/go-etcd/etcd/debug.go new file mode 100644 index 000000000..0f777886b --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/debug.go @@ -0,0 +1,55 @@ +package etcd + +import ( + "fmt" + "io/ioutil" + "log" + "strings" +) + +var logger *etcdLogger + +func SetLogger(l *log.Logger) { + logger = &etcdLogger{l} +} + +func GetLogger() *log.Logger { + return logger.log +} + +type etcdLogger struct { + log *log.Logger +} + +func (p *etcdLogger) Debug(args ...interface{}) { + msg := "DEBUG: " + fmt.Sprint(args...) + p.log.Println(msg) +} + +func (p *etcdLogger) Debugf(f string, args ...interface{}) { + msg := "DEBUG: " + fmt.Sprintf(f, args...) + // Append newline if necessary + if !strings.HasSuffix(msg, "\n") { + msg = msg + "\n" + } + p.log.Print(msg) +} + +func (p *etcdLogger) Warning(args ...interface{}) { + msg := "WARNING: " + fmt.Sprint(args...) + p.log.Println(msg) +} + +func (p *etcdLogger) Warningf(f string, args ...interface{}) { + msg := "WARNING: " + fmt.Sprintf(f, args...) + // Append newline if necessary + if !strings.HasSuffix(msg, "\n") { + msg = msg + "\n" + } + p.log.Print(msg) +} + +func init() { + // Default logger uses the go default log. + SetLogger(log.New(ioutil.Discard, "go-etcd", log.LstdFlags)) +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/delete.go b/vendor/github.com/coreos/go-etcd/etcd/delete.go new file mode 100644 index 000000000..b37accd7d --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/delete.go @@ -0,0 +1,40 @@ +package etcd + +// Delete deletes the given key. +// +// When recursive set to false, if the key points to a +// directory the method will fail. +// +// When recursive set to true, if the key points to a file, +// the file will be deleted; if the key points to a directory, +// then everything under the directory (including all child directories) +// will be deleted. +func (c *Client) Delete(key string, recursive bool) (*Response, error) { + raw, err := c.RawDelete(key, recursive, false) + + if err != nil { + return nil, err + } + + return raw.Unmarshal() +} + +// DeleteDir deletes an empty directory or a key value pair +func (c *Client) DeleteDir(key string) (*Response, error) { + raw, err := c.RawDelete(key, false, true) + + if err != nil { + return nil, err + } + + return raw.Unmarshal() +} + +func (c *Client) RawDelete(key string, recursive bool, dir bool) (*RawResponse, error) { + ops := Options{ + "recursive": recursive, + "dir": dir, + } + + return c.delete(key, ops) +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/error.go b/vendor/github.com/coreos/go-etcd/etcd/error.go new file mode 100644 index 000000000..66dca54b5 --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/error.go @@ -0,0 +1,49 @@ +package etcd + +import ( + "encoding/json" + "fmt" +) + +const ( + ErrCodeEtcdNotReachable = 501 + ErrCodeUnhandledHTTPStatus = 502 +) + +var ( + errorMap = map[int]string{ + ErrCodeEtcdNotReachable: "All the given peers are not reachable", + } +) + +type EtcdError struct { + ErrorCode int `json:"errorCode"` + Message string `json:"message"` + Cause string `json:"cause,omitempty"` + Index uint64 `json:"index"` +} + +func (e EtcdError) Error() string { + return fmt.Sprintf("%v: %v (%v) [%v]", e.ErrorCode, e.Message, e.Cause, e.Index) +} + +func newError(errorCode int, cause string, index uint64) *EtcdError { + return &EtcdError{ + ErrorCode: errorCode, + Message: errorMap[errorCode], + Cause: cause, + Index: index, + } +} + +func handleError(b []byte) error { + etcdErr := new(EtcdError) + + err := json.Unmarshal(b, etcdErr) + if err != nil { + logger.Warningf("cannot unmarshal etcd error: %v", err) + return err + } + + return etcdErr +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/get.go b/vendor/github.com/coreos/go-etcd/etcd/get.go new file mode 100644 index 000000000..09fe641c2 --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/get.go @@ -0,0 +1,32 @@ +package etcd + +// Get gets the file or directory associated with the given key. +// If the key points to a directory, files and directories under +// it will be returned in sorted or unsorted order, depending on +// the sort flag. +// If recursive is set to false, contents under child directories +// will not be returned. +// If recursive is set to true, all the contents will be returned. +func (c *Client) Get(key string, sort, recursive bool) (*Response, error) { + raw, err := c.RawGet(key, sort, recursive) + + if err != nil { + return nil, err + } + + return raw.Unmarshal() +} + +func (c *Client) RawGet(key string, sort, recursive bool) (*RawResponse, error) { + var q bool + if c.config.Consistency == STRONG_CONSISTENCY { + q = true + } + ops := Options{ + "recursive": recursive, + "sorted": sort, + "quorum": q, + } + + return c.get(key, ops) +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/member.go b/vendor/github.com/coreos/go-etcd/etcd/member.go new file mode 100644 index 000000000..5b13b28e1 --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/member.go @@ -0,0 +1,30 @@ +package etcd + +import "encoding/json" + +type Member struct { + ID string `json:"id"` + Name string `json:"name"` + PeerURLs []string `json:"peerURLs"` + ClientURLs []string `json:"clientURLs"` +} + +type memberCollection []Member + +func (c *memberCollection) UnmarshalJSON(data []byte) error { + d := struct { + Members []Member + }{} + + if err := json.Unmarshal(data, &d); err != nil { + return err + } + + if d.Members == nil { + *c = make([]Member, 0) + return nil + } + + *c = d.Members + return nil +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/options.go b/vendor/github.com/coreos/go-etcd/etcd/options.go new file mode 100644 index 000000000..d21c96f08 --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/options.go @@ -0,0 +1,72 @@ +package etcd + +import ( + "fmt" + "net/url" + "reflect" +) + +type Options map[string]interface{} + +// An internally-used data structure that represents a mapping +// between valid options and their kinds +type validOptions map[string]reflect.Kind + +// Valid options for GET, PUT, POST, DELETE +// Using CAPITALIZED_UNDERSCORE to emphasize that these +// values are meant to be used as constants. +var ( + VALID_GET_OPTIONS = validOptions{ + "recursive": reflect.Bool, + "quorum": reflect.Bool, + "sorted": reflect.Bool, + "wait": reflect.Bool, + "waitIndex": reflect.Uint64, + } + + VALID_PUT_OPTIONS = validOptions{ + "prevValue": reflect.String, + "prevIndex": reflect.Uint64, + "prevExist": reflect.Bool, + "dir": reflect.Bool, + } + + VALID_POST_OPTIONS = validOptions{} + + VALID_DELETE_OPTIONS = validOptions{ + "recursive": reflect.Bool, + "dir": reflect.Bool, + "prevValue": reflect.String, + "prevIndex": reflect.Uint64, + } +) + +// Convert options to a string of HTML parameters +func (ops Options) toParameters(validOps validOptions) (string, error) { + p := "?" + values := url.Values{} + + if ops == nil { + return "", nil + } + + for k, v := range ops { + // Check if the given option is valid (that it exists) + kind := validOps[k] + if kind == reflect.Invalid { + return "", fmt.Errorf("Invalid option: %v", k) + } + + // Check if the given option is of the valid type + t := reflect.TypeOf(v) + if kind != t.Kind() { + return "", fmt.Errorf("Option %s should be of %v kind, not of %v kind.", + k, kind, t.Kind()) + } + + values.Set(k, fmt.Sprintf("%v", v)) + } + + p += values.Encode() + return p, nil +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/requests.go b/vendor/github.com/coreos/go-etcd/etcd/requests.go new file mode 100644 index 000000000..8f720f6f4 --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/requests.go @@ -0,0 +1,403 @@ +package etcd + +import ( + "errors" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/url" + "path" + "strings" + "sync" + "time" +) + +// Errors introduced by handling requests +var ( + ErrRequestCancelled = errors.New("sending request is cancelled") +) + +type RawRequest struct { + Method string + RelativePath string + Values url.Values + Cancel <-chan bool +} + +// NewRawRequest returns a new RawRequest +func NewRawRequest(method, relativePath string, values url.Values, cancel <-chan bool) *RawRequest { + return &RawRequest{ + Method: method, + RelativePath: relativePath, + Values: values, + Cancel: cancel, + } +} + +// getCancelable issues a cancelable GET request +func (c *Client) getCancelable(key string, options Options, + cancel <-chan bool) (*RawResponse, error) { + logger.Debugf("get %s [%s]", key, c.cluster.pick()) + p := keyToPath(key) + + str, err := options.toParameters(VALID_GET_OPTIONS) + if err != nil { + return nil, err + } + p += str + + req := NewRawRequest("GET", p, nil, cancel) + resp, err := c.SendRequest(req) + + if err != nil { + return nil, err + } + + return resp, nil +} + +// get issues a GET request +func (c *Client) get(key string, options Options) (*RawResponse, error) { + return c.getCancelable(key, options, nil) +} + +// put issues a PUT request +func (c *Client) put(key string, value string, ttl uint64, + options Options) (*RawResponse, error) { + + logger.Debugf("put %s, %s, ttl: %d, [%s]", key, value, ttl, c.cluster.pick()) + p := keyToPath(key) + + str, err := options.toParameters(VALID_PUT_OPTIONS) + if err != nil { + return nil, err + } + p += str + + req := NewRawRequest("PUT", p, buildValues(value, ttl), nil) + resp, err := c.SendRequest(req) + + if err != nil { + return nil, err + } + + return resp, nil +} + +// post issues a POST request +func (c *Client) post(key string, value string, ttl uint64) (*RawResponse, error) { + logger.Debugf("post %s, %s, ttl: %d, [%s]", key, value, ttl, c.cluster.pick()) + p := keyToPath(key) + + req := NewRawRequest("POST", p, buildValues(value, ttl), nil) + resp, err := c.SendRequest(req) + + if err != nil { + return nil, err + } + + return resp, nil +} + +// delete issues a DELETE request +func (c *Client) delete(key string, options Options) (*RawResponse, error) { + logger.Debugf("delete %s [%s]", key, c.cluster.pick()) + p := keyToPath(key) + + str, err := options.toParameters(VALID_DELETE_OPTIONS) + if err != nil { + return nil, err + } + p += str + + req := NewRawRequest("DELETE", p, nil, nil) + resp, err := c.SendRequest(req) + + if err != nil { + return nil, err + } + + return resp, nil +} + +// SendRequest sends a HTTP request and returns a Response as defined by etcd +func (c *Client) SendRequest(rr *RawRequest) (*RawResponse, error) { + var req *http.Request + var resp *http.Response + var httpPath string + var err error + var respBody []byte + + var numReqs = 1 + + checkRetry := c.CheckRetry + if checkRetry == nil { + checkRetry = DefaultCheckRetry + } + + cancelled := make(chan bool, 1) + reqLock := new(sync.Mutex) + + if rr.Cancel != nil { + cancelRoutine := make(chan bool) + defer close(cancelRoutine) + + go func() { + select { + case <-rr.Cancel: + cancelled <- true + logger.Debug("send.request is cancelled") + case <-cancelRoutine: + return + } + + // Repeat canceling request until this thread is stopped + // because we have no idea about whether it succeeds. + for { + reqLock.Lock() + c.httpClient.Transport.(*http.Transport).CancelRequest(req) + reqLock.Unlock() + + select { + case <-time.After(100 * time.Millisecond): + case <-cancelRoutine: + return + } + } + }() + } + + // If we connect to a follower and consistency is required, retry until + // we connect to a leader + sleep := 25 * time.Millisecond + maxSleep := time.Second + + for attempt := 0; ; attempt++ { + if attempt > 0 { + select { + case <-cancelled: + return nil, ErrRequestCancelled + case <-time.After(sleep): + sleep = sleep * 2 + if sleep > maxSleep { + sleep = maxSleep + } + } + } + + logger.Debug("Connecting to etcd: attempt ", attempt+1, " for ", rr.RelativePath) + + // get httpPath if not set + if httpPath == "" { + httpPath = c.getHttpPath(rr.RelativePath) + } + + // Return a cURL command if curlChan is set + if c.cURLch != nil { + command := fmt.Sprintf("curl -X %s %s", rr.Method, httpPath) + for key, value := range rr.Values { + command += fmt.Sprintf(" -d %s=%s", key, value[0]) + } + if c.credentials != nil { + command += fmt.Sprintf(" -u %s", c.credentials.username) + } + c.sendCURL(command) + } + + logger.Debug("send.request.to ", httpPath, " | method ", rr.Method) + + req, err := func() (*http.Request, error) { + reqLock.Lock() + defer reqLock.Unlock() + + if rr.Values == nil { + if req, err = http.NewRequest(rr.Method, httpPath, nil); err != nil { + return nil, err + } + } else { + body := strings.NewReader(rr.Values.Encode()) + if req, err = http.NewRequest(rr.Method, httpPath, body); err != nil { + return nil, err + } + + req.Header.Set("Content-Type", + "application/x-www-form-urlencoded; param=value") + } + return req, nil + }() + + if err != nil { + return nil, err + } + + if c.credentials != nil { + req.SetBasicAuth(c.credentials.username, c.credentials.password) + } + + resp, err = c.httpClient.Do(req) + // clear previous httpPath + httpPath = "" + defer func() { + if resp != nil { + resp.Body.Close() + } + }() + + // If the request was cancelled, return ErrRequestCancelled directly + select { + case <-cancelled: + return nil, ErrRequestCancelled + default: + } + + numReqs++ + + // network error, change a machine! + if err != nil { + logger.Debug("network error: ", err.Error()) + lastResp := http.Response{} + if checkErr := checkRetry(c.cluster, numReqs, lastResp, err); checkErr != nil { + return nil, checkErr + } + + c.cluster.failure() + continue + } + + // if there is no error, it should receive response + logger.Debug("recv.response.from ", httpPath) + + if validHttpStatusCode[resp.StatusCode] { + // try to read byte code and break the loop + respBody, err = ioutil.ReadAll(resp.Body) + if err == nil { + logger.Debug("recv.success ", httpPath) + break + } + // ReadAll error may be caused due to cancel request + select { + case <-cancelled: + return nil, ErrRequestCancelled + default: + } + + if err == io.ErrUnexpectedEOF { + // underlying connection was closed prematurely, probably by timeout + // TODO: empty body or unexpectedEOF can cause http.Transport to get hosed; + // this allows the client to detect that and take evasive action. Need + // to revisit once code.google.com/p/go/issues/detail?id=8648 gets fixed. + respBody = []byte{} + break + } + } + + if resp.StatusCode == http.StatusTemporaryRedirect { + u, err := resp.Location() + + if err != nil { + logger.Warning(err) + } else { + // set httpPath for following redirection + httpPath = u.String() + } + resp.Body.Close() + continue + } + + if checkErr := checkRetry(c.cluster, numReqs, *resp, + errors.New("Unexpected HTTP status code")); checkErr != nil { + return nil, checkErr + } + resp.Body.Close() + } + + r := &RawResponse{ + StatusCode: resp.StatusCode, + Body: respBody, + Header: resp.Header, + } + + return r, nil +} + +// DefaultCheckRetry defines the retrying behaviour for bad HTTP requests +// If we have retried 2 * machine number, stop retrying. +// If status code is InternalServerError, sleep for 200ms. +func DefaultCheckRetry(cluster *Cluster, numReqs int, lastResp http.Response, + err error) error { + + if numReqs > 2*len(cluster.Machines) { + errStr := fmt.Sprintf("failed to propose on members %v twice [last error: %v]", cluster.Machines, err) + return newError(ErrCodeEtcdNotReachable, errStr, 0) + } + + if isEmptyResponse(lastResp) { + // always retry if it failed to get response from one machine + return nil + } + if !shouldRetry(lastResp) { + body := []byte("nil") + if lastResp.Body != nil { + if b, err := ioutil.ReadAll(lastResp.Body); err == nil { + body = b + } + } + errStr := fmt.Sprintf("unhandled http status [%s] with body [%s]", http.StatusText(lastResp.StatusCode), body) + return newError(ErrCodeUnhandledHTTPStatus, errStr, 0) + } + // sleep some time and expect leader election finish + time.Sleep(time.Millisecond * 200) + logger.Warning("bad response status code ", lastResp.StatusCode) + return nil +} + +func isEmptyResponse(r http.Response) bool { return r.StatusCode == 0 } + +// shouldRetry returns whether the reponse deserves retry. +func shouldRetry(r http.Response) bool { + // TODO: only retry when the cluster is in leader election + // We cannot do it exactly because etcd doesn't support it well. + return r.StatusCode == http.StatusInternalServerError +} + +func (c *Client) getHttpPath(s ...string) string { + fullPath := c.cluster.pick() + "/" + version + for _, seg := range s { + fullPath = fullPath + "/" + seg + } + return fullPath +} + +// buildValues builds a url.Values map according to the given value and ttl +func buildValues(value string, ttl uint64) url.Values { + v := url.Values{} + + if value != "" { + v.Set("value", value) + } + + if ttl > 0 { + v.Set("ttl", fmt.Sprintf("%v", ttl)) + } + + return v +} + +// convert key string to http path exclude version, including URL escaping +// for example: key[foo] -> path[keys/foo] +// key[/%z] -> path[keys/%25z] +// key[/] -> path[keys/] +func keyToPath(key string) string { + // URL-escape our key, except for slashes + p := strings.Replace(url.QueryEscape(path.Join("keys", key)), "%2F", "/", -1) + + // corner case: if key is "/" or "//" ect + // path join will clear the tailing "/" + // we need to add it back + if p == "keys" { + p = "keys/" + } + + return p +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/response.generated.go b/vendor/github.com/coreos/go-etcd/etcd/response.generated.go new file mode 100644 index 000000000..95d2cd99d --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/response.generated.go @@ -0,0 +1,1587 @@ +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +package etcd + +import ( + "errors" + "fmt" + codec1978 "github.com/ugorji/go/codec" + pkg1_http "net/http" + "reflect" + "runtime" + time "time" +) + +const ( + // ----- content types ---- + codecSelferC_UTF81978 = 1 + codecSelferC_RAW1978 = 0 + // ----- value types used ---- + codecSelferValueTypeArray1978 = 10 + codecSelferValueTypeMap1978 = 9 + // ----- containerStateValues ---- + codecSelfer_containerMapKey1978 = 2 + codecSelfer_containerMapValue1978 = 3 + codecSelfer_containerMapEnd1978 = 4 + codecSelfer_containerArrayElem1978 = 6 + codecSelfer_containerArrayEnd1978 = 7 +) + +var ( + codecSelferBitsize1978 = uint8(reflect.TypeOf(uint(0)).Bits()) + codecSelferOnlyMapOrArrayEncodeToStructErr1978 = errors.New(`only encoded map or array can be decoded into a struct`) +) + +type codecSelfer1978 struct{} + +func init() { + if codec1978.GenVersion != 5 { + _, file, _, _ := runtime.Caller(0) + err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", + 5, codec1978.GenVersion, file) + panic(err) + } + if false { // reference the types, but skip this branch at build/run time + var v0 pkg1_http.Header + var v1 time.Time + _, _ = v0, v1 + } +} + +func (x responseType) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + yym1 := z.EncBinary() + _ = yym1 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + r.EncodeInt(int64(x)) + } +} + +func (x *responseType) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym2 := z.DecBinary() + _ = yym2 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + *((*int)(x)) = int(r.DecodeInt(codecSelferBitsize1978)) + } +} + +func (x *RawResponse) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym3 := z.EncBinary() + _ = yym3 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep4 := !z.EncBinary() + yy2arr4 := z.EncBasicHandle().StructToArray + var yyq4 [3]bool + _, _, _ = yysep4, yyq4, yy2arr4 + const yyr4 bool = false + var yynn4 int + if yyr4 || yy2arr4 { + r.EncodeArrayStart(3) + } else { + yynn4 = 3 + for _, b := range yyq4 { + if b { + yynn4++ + } + } + r.EncodeMapStart(yynn4) + yynn4 = 0 + } + if yyr4 || yy2arr4 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + yym6 := z.EncBinary() + _ = yym6 + if false { + } else { + r.EncodeInt(int64(x.StatusCode)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("StatusCode")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + yym7 := z.EncBinary() + _ = yym7 + if false { + } else { + r.EncodeInt(int64(x.StatusCode)) + } + } + if yyr4 || yy2arr4 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + if x.Body == nil { + r.EncodeNil() + } else { + yym9 := z.EncBinary() + _ = yym9 + if false { + } else { + r.EncodeStringBytes(codecSelferC_RAW1978, []byte(x.Body)) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("Body")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + if x.Body == nil { + r.EncodeNil() + } else { + yym10 := z.EncBinary() + _ = yym10 + if false { + } else { + r.EncodeStringBytes(codecSelferC_RAW1978, []byte(x.Body)) + } + } + } + if yyr4 || yy2arr4 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + if x.Header == nil { + r.EncodeNil() + } else { + yym12 := z.EncBinary() + _ = yym12 + if false { + } else if z.HasExtensions() && z.EncExt(x.Header) { + } else { + h.enchttp_Header((pkg1_http.Header)(x.Header), e) + } + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("Header")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + if x.Header == nil { + r.EncodeNil() + } else { + yym13 := z.EncBinary() + _ = yym13 + if false { + } else if z.HasExtensions() && z.EncExt(x.Header) { + } else { + h.enchttp_Header((pkg1_http.Header)(x.Header), e) + } + } + } + if yyr4 || yy2arr4 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1978) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1978) + } + } + } +} + +func (x *RawResponse) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym14 := z.DecBinary() + _ = yym14 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct15 := r.ContainerType() + if yyct15 == codecSelferValueTypeMap1978 { + yyl15 := r.ReadMapStart() + if yyl15 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1978) + } else { + x.codecDecodeSelfFromMap(yyl15, d) + } + } else if yyct15 == codecSelferValueTypeArray1978 { + yyl15 := r.ReadArrayStart() + if yyl15 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + } else { + x.codecDecodeSelfFromArray(yyl15, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1978) + } + } +} + +func (x *RawResponse) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys16Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys16Slc + var yyhl16 bool = l >= 0 + for yyj16 := 0; ; yyj16++ { + if yyhl16 { + if yyj16 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1978) + yys16Slc = r.DecodeBytes(yys16Slc, true, true) + yys16 := string(yys16Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1978) + switch yys16 { + case "StatusCode": + if r.TryDecodeAsNil() { + x.StatusCode = 0 + } else { + x.StatusCode = int(r.DecodeInt(codecSelferBitsize1978)) + } + case "Body": + if r.TryDecodeAsNil() { + x.Body = nil + } else { + yyv18 := &x.Body + yym19 := z.DecBinary() + _ = yym19 + if false { + } else { + *yyv18 = r.DecodeBytes(*(*[]byte)(yyv18), false, false) + } + } + case "Header": + if r.TryDecodeAsNil() { + x.Header = nil + } else { + yyv20 := &x.Header + yym21 := z.DecBinary() + _ = yym21 + if false { + } else if z.HasExtensions() && z.DecExt(yyv20) { + } else { + h.dechttp_Header((*pkg1_http.Header)(yyv20), d) + } + } + default: + z.DecStructFieldNotFound(-1, yys16) + } // end switch yys16 + } // end for yyj16 + z.DecSendContainerState(codecSelfer_containerMapEnd1978) +} + +func (x *RawResponse) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj22 int + var yyb22 bool + var yyhl22 bool = l >= 0 + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + x.StatusCode = 0 + } else { + x.StatusCode = int(r.DecodeInt(codecSelferBitsize1978)) + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + x.Body = nil + } else { + yyv24 := &x.Body + yym25 := z.DecBinary() + _ = yym25 + if false { + } else { + *yyv24 = r.DecodeBytes(*(*[]byte)(yyv24), false, false) + } + } + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + x.Header = nil + } else { + yyv26 := &x.Header + yym27 := z.DecBinary() + _ = yym27 + if false { + } else if z.HasExtensions() && z.DecExt(yyv26) { + } else { + h.dechttp_Header((*pkg1_http.Header)(yyv26), d) + } + } + for { + yyj22++ + if yyhl22 { + yyb22 = yyj22 > l + } else { + yyb22 = r.CheckBreak() + } + if yyb22 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + z.DecStructFieldNotFound(yyj22-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) +} + +func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym28 := z.EncBinary() + _ = yym28 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep29 := !z.EncBinary() + yy2arr29 := z.EncBasicHandle().StructToArray + var yyq29 [6]bool + _, _, _ = yysep29, yyq29, yy2arr29 + const yyr29 bool = false + yyq29[2] = x.PrevNode != nil + var yynn29 int + if yyr29 || yy2arr29 { + r.EncodeArrayStart(6) + } else { + yynn29 = 5 + for _, b := range yyq29 { + if b { + yynn29++ + } + } + r.EncodeMapStart(yynn29) + yynn29 = 0 + } + if yyr29 || yy2arr29 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + yym31 := z.EncBinary() + _ = yym31 + if false { + } else { + r.EncodeString(codecSelferC_UTF81978, string(x.Action)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("action")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + yym32 := z.EncBinary() + _ = yym32 + if false { + } else { + r.EncodeString(codecSelferC_UTF81978, string(x.Action)) + } + } + if yyr29 || yy2arr29 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + if x.Node == nil { + r.EncodeNil() + } else { + x.Node.CodecEncodeSelf(e) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("node")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + if x.Node == nil { + r.EncodeNil() + } else { + x.Node.CodecEncodeSelf(e) + } + } + if yyr29 || yy2arr29 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + if yyq29[2] { + if x.PrevNode == nil { + r.EncodeNil() + } else { + x.PrevNode.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq29[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("prevNode")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + if x.PrevNode == nil { + r.EncodeNil() + } else { + x.PrevNode.CodecEncodeSelf(e) + } + } + } + if yyr29 || yy2arr29 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + yym36 := z.EncBinary() + _ = yym36 + if false { + } else { + r.EncodeUint(uint64(x.EtcdIndex)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("etcdIndex")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + yym37 := z.EncBinary() + _ = yym37 + if false { + } else { + r.EncodeUint(uint64(x.EtcdIndex)) + } + } + if yyr29 || yy2arr29 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + yym39 := z.EncBinary() + _ = yym39 + if false { + } else { + r.EncodeUint(uint64(x.RaftIndex)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("raftIndex")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + yym40 := z.EncBinary() + _ = yym40 + if false { + } else { + r.EncodeUint(uint64(x.RaftIndex)) + } + } + if yyr29 || yy2arr29 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + yym42 := z.EncBinary() + _ = yym42 + if false { + } else { + r.EncodeUint(uint64(x.RaftTerm)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("raftTerm")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + yym43 := z.EncBinary() + _ = yym43 + if false { + } else { + r.EncodeUint(uint64(x.RaftTerm)) + } + } + if yyr29 || yy2arr29 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1978) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1978) + } + } + } +} + +func (x *Response) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym44 := z.DecBinary() + _ = yym44 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct45 := r.ContainerType() + if yyct45 == codecSelferValueTypeMap1978 { + yyl45 := r.ReadMapStart() + if yyl45 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1978) + } else { + x.codecDecodeSelfFromMap(yyl45, d) + } + } else if yyct45 == codecSelferValueTypeArray1978 { + yyl45 := r.ReadArrayStart() + if yyl45 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + } else { + x.codecDecodeSelfFromArray(yyl45, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1978) + } + } +} + +func (x *Response) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys46Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys46Slc + var yyhl46 bool = l >= 0 + for yyj46 := 0; ; yyj46++ { + if yyhl46 { + if yyj46 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1978) + yys46Slc = r.DecodeBytes(yys46Slc, true, true) + yys46 := string(yys46Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1978) + switch yys46 { + case "action": + if r.TryDecodeAsNil() { + x.Action = "" + } else { + x.Action = string(r.DecodeString()) + } + case "node": + if r.TryDecodeAsNil() { + if x.Node != nil { + x.Node = nil + } + } else { + if x.Node == nil { + x.Node = new(Node) + } + x.Node.CodecDecodeSelf(d) + } + case "prevNode": + if r.TryDecodeAsNil() { + if x.PrevNode != nil { + x.PrevNode = nil + } + } else { + if x.PrevNode == nil { + x.PrevNode = new(Node) + } + x.PrevNode.CodecDecodeSelf(d) + } + case "etcdIndex": + if r.TryDecodeAsNil() { + x.EtcdIndex = 0 + } else { + x.EtcdIndex = uint64(r.DecodeUint(64)) + } + case "raftIndex": + if r.TryDecodeAsNil() { + x.RaftIndex = 0 + } else { + x.RaftIndex = uint64(r.DecodeUint(64)) + } + case "raftTerm": + if r.TryDecodeAsNil() { + x.RaftTerm = 0 + } else { + x.RaftTerm = uint64(r.DecodeUint(64)) + } + default: + z.DecStructFieldNotFound(-1, yys46) + } // end switch yys46 + } // end for yyj46 + z.DecSendContainerState(codecSelfer_containerMapEnd1978) +} + +func (x *Response) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj53 int + var yyb53 bool + var yyhl53 bool = l >= 0 + yyj53++ + if yyhl53 { + yyb53 = yyj53 > l + } else { + yyb53 = r.CheckBreak() + } + if yyb53 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + x.Action = "" + } else { + x.Action = string(r.DecodeString()) + } + yyj53++ + if yyhl53 { + yyb53 = yyj53 > l + } else { + yyb53 = r.CheckBreak() + } + if yyb53 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + if x.Node != nil { + x.Node = nil + } + } else { + if x.Node == nil { + x.Node = new(Node) + } + x.Node.CodecDecodeSelf(d) + } + yyj53++ + if yyhl53 { + yyb53 = yyj53 > l + } else { + yyb53 = r.CheckBreak() + } + if yyb53 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + if x.PrevNode != nil { + x.PrevNode = nil + } + } else { + if x.PrevNode == nil { + x.PrevNode = new(Node) + } + x.PrevNode.CodecDecodeSelf(d) + } + yyj53++ + if yyhl53 { + yyb53 = yyj53 > l + } else { + yyb53 = r.CheckBreak() + } + if yyb53 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + x.EtcdIndex = 0 + } else { + x.EtcdIndex = uint64(r.DecodeUint(64)) + } + yyj53++ + if yyhl53 { + yyb53 = yyj53 > l + } else { + yyb53 = r.CheckBreak() + } + if yyb53 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + x.RaftIndex = 0 + } else { + x.RaftIndex = uint64(r.DecodeUint(64)) + } + yyj53++ + if yyhl53 { + yyb53 = yyj53 > l + } else { + yyb53 = r.CheckBreak() + } + if yyb53 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + x.RaftTerm = 0 + } else { + x.RaftTerm = uint64(r.DecodeUint(64)) + } + for { + yyj53++ + if yyhl53 { + yyb53 = yyj53 > l + } else { + yyb53 = r.CheckBreak() + } + if yyb53 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + z.DecStructFieldNotFound(yyj53-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) +} + +func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym60 := z.EncBinary() + _ = yym60 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + yysep61 := !z.EncBinary() + yy2arr61 := z.EncBasicHandle().StructToArray + var yyq61 [8]bool + _, _, _ = yysep61, yyq61, yy2arr61 + const yyr61 bool = false + yyq61[1] = x.Value != "" + yyq61[2] = x.Dir != false + yyq61[3] = x.Expiration != nil + yyq61[4] = x.TTL != 0 + yyq61[5] = len(x.Nodes) != 0 + yyq61[6] = x.ModifiedIndex != 0 + yyq61[7] = x.CreatedIndex != 0 + var yynn61 int + if yyr61 || yy2arr61 { + r.EncodeArrayStart(8) + } else { + yynn61 = 1 + for _, b := range yyq61 { + if b { + yynn61++ + } + } + r.EncodeMapStart(yynn61) + yynn61 = 0 + } + if yyr61 || yy2arr61 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + yym63 := z.EncBinary() + _ = yym63 + if false { + } else { + r.EncodeString(codecSelferC_UTF81978, string(x.Key)) + } + } else { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("key")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + yym64 := z.EncBinary() + _ = yym64 + if false { + } else { + r.EncodeString(codecSelferC_UTF81978, string(x.Key)) + } + } + if yyr61 || yy2arr61 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + if yyq61[1] { + yym66 := z.EncBinary() + _ = yym66 + if false { + } else { + r.EncodeString(codecSelferC_UTF81978, string(x.Value)) + } + } else { + r.EncodeString(codecSelferC_UTF81978, "") + } + } else { + if yyq61[1] { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("value")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + yym67 := z.EncBinary() + _ = yym67 + if false { + } else { + r.EncodeString(codecSelferC_UTF81978, string(x.Value)) + } + } + } + if yyr61 || yy2arr61 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + if yyq61[2] { + yym69 := z.EncBinary() + _ = yym69 + if false { + } else { + r.EncodeBool(bool(x.Dir)) + } + } else { + r.EncodeBool(false) + } + } else { + if yyq61[2] { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("dir")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + yym70 := z.EncBinary() + _ = yym70 + if false { + } else { + r.EncodeBool(bool(x.Dir)) + } + } + } + if yyr61 || yy2arr61 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + if yyq61[3] { + if x.Expiration == nil { + r.EncodeNil() + } else { + yym72 := z.EncBinary() + _ = yym72 + if false { + } else if yym73 := z.TimeRtidIfBinc(); yym73 != 0 { + r.EncodeBuiltin(yym73, x.Expiration) + } else if z.HasExtensions() && z.EncExt(x.Expiration) { + } else if yym72 { + z.EncBinaryMarshal(x.Expiration) + } else if !yym72 && z.IsJSONHandle() { + z.EncJSONMarshal(x.Expiration) + } else { + z.EncFallback(x.Expiration) + } + } + } else { + r.EncodeNil() + } + } else { + if yyq61[3] { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("expiration")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + if x.Expiration == nil { + r.EncodeNil() + } else { + yym74 := z.EncBinary() + _ = yym74 + if false { + } else if yym75 := z.TimeRtidIfBinc(); yym75 != 0 { + r.EncodeBuiltin(yym75, x.Expiration) + } else if z.HasExtensions() && z.EncExt(x.Expiration) { + } else if yym74 { + z.EncBinaryMarshal(x.Expiration) + } else if !yym74 && z.IsJSONHandle() { + z.EncJSONMarshal(x.Expiration) + } else { + z.EncFallback(x.Expiration) + } + } + } + } + if yyr61 || yy2arr61 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + if yyq61[4] { + yym77 := z.EncBinary() + _ = yym77 + if false { + } else { + r.EncodeInt(int64(x.TTL)) + } + } else { + r.EncodeInt(0) + } + } else { + if yyq61[4] { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("ttl")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + yym78 := z.EncBinary() + _ = yym78 + if false { + } else { + r.EncodeInt(int64(x.TTL)) + } + } + } + if yyr61 || yy2arr61 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + if yyq61[5] { + if x.Nodes == nil { + r.EncodeNil() + } else { + x.Nodes.CodecEncodeSelf(e) + } + } else { + r.EncodeNil() + } + } else { + if yyq61[5] { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("nodes")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + if x.Nodes == nil { + r.EncodeNil() + } else { + x.Nodes.CodecEncodeSelf(e) + } + } + } + if yyr61 || yy2arr61 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + if yyq61[6] { + yym81 := z.EncBinary() + _ = yym81 + if false { + } else { + r.EncodeUint(uint64(x.ModifiedIndex)) + } + } else { + r.EncodeUint(0) + } + } else { + if yyq61[6] { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("modifiedIndex")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + yym82 := z.EncBinary() + _ = yym82 + if false { + } else { + r.EncodeUint(uint64(x.ModifiedIndex)) + } + } + } + if yyr61 || yy2arr61 { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + if yyq61[7] { + yym84 := z.EncBinary() + _ = yym84 + if false { + } else { + r.EncodeUint(uint64(x.CreatedIndex)) + } + } else { + r.EncodeUint(0) + } + } else { + if yyq61[7] { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + r.EncodeString(codecSelferC_UTF81978, string("createdIndex")) + z.EncSendContainerState(codecSelfer_containerMapValue1978) + yym85 := z.EncBinary() + _ = yym85 + if false { + } else { + r.EncodeUint(uint64(x.CreatedIndex)) + } + } + } + if yyr61 || yy2arr61 { + z.EncSendContainerState(codecSelfer_containerArrayEnd1978) + } else { + z.EncSendContainerState(codecSelfer_containerMapEnd1978) + } + } + } +} + +func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym86 := z.DecBinary() + _ = yym86 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + yyct87 := r.ContainerType() + if yyct87 == codecSelferValueTypeMap1978 { + yyl87 := r.ReadMapStart() + if yyl87 == 0 { + z.DecSendContainerState(codecSelfer_containerMapEnd1978) + } else { + x.codecDecodeSelfFromMap(yyl87, d) + } + } else if yyct87 == codecSelferValueTypeArray1978 { + yyl87 := r.ReadArrayStart() + if yyl87 == 0 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + } else { + x.codecDecodeSelfFromArray(yyl87, d) + } + } else { + panic(codecSelferOnlyMapOrArrayEncodeToStructErr1978) + } + } +} + +func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yys88Slc = z.DecScratchBuffer() // default slice to decode into + _ = yys88Slc + var yyhl88 bool = l >= 0 + for yyj88 := 0; ; yyj88++ { + if yyhl88 { + if yyj88 >= l { + break + } + } else { + if r.CheckBreak() { + break + } + } + z.DecSendContainerState(codecSelfer_containerMapKey1978) + yys88Slc = r.DecodeBytes(yys88Slc, true, true) + yys88 := string(yys88Slc) + z.DecSendContainerState(codecSelfer_containerMapValue1978) + switch yys88 { + case "key": + if r.TryDecodeAsNil() { + x.Key = "" + } else { + x.Key = string(r.DecodeString()) + } + case "value": + if r.TryDecodeAsNil() { + x.Value = "" + } else { + x.Value = string(r.DecodeString()) + } + case "dir": + if r.TryDecodeAsNil() { + x.Dir = false + } else { + x.Dir = bool(r.DecodeBool()) + } + case "expiration": + if r.TryDecodeAsNil() { + if x.Expiration != nil { + x.Expiration = nil + } + } else { + if x.Expiration == nil { + x.Expiration = new(time.Time) + } + yym93 := z.DecBinary() + _ = yym93 + if false { + } else if yym94 := z.TimeRtidIfBinc(); yym94 != 0 { + r.DecodeBuiltin(yym94, x.Expiration) + } else if z.HasExtensions() && z.DecExt(x.Expiration) { + } else if yym93 { + z.DecBinaryUnmarshal(x.Expiration) + } else if !yym93 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.Expiration) + } else { + z.DecFallback(x.Expiration, false) + } + } + case "ttl": + if r.TryDecodeAsNil() { + x.TTL = 0 + } else { + x.TTL = int64(r.DecodeInt(64)) + } + case "nodes": + if r.TryDecodeAsNil() { + x.Nodes = nil + } else { + yyv96 := &x.Nodes + yyv96.CodecDecodeSelf(d) + } + case "modifiedIndex": + if r.TryDecodeAsNil() { + x.ModifiedIndex = 0 + } else { + x.ModifiedIndex = uint64(r.DecodeUint(64)) + } + case "createdIndex": + if r.TryDecodeAsNil() { + x.CreatedIndex = 0 + } else { + x.CreatedIndex = uint64(r.DecodeUint(64)) + } + default: + z.DecStructFieldNotFound(-1, yys88) + } // end switch yys88 + } // end for yyj88 + z.DecSendContainerState(codecSelfer_containerMapEnd1978) +} + +func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + var yyj99 int + var yyb99 bool + var yyhl99 bool = l >= 0 + yyj99++ + if yyhl99 { + yyb99 = yyj99 > l + } else { + yyb99 = r.CheckBreak() + } + if yyb99 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + x.Key = "" + } else { + x.Key = string(r.DecodeString()) + } + yyj99++ + if yyhl99 { + yyb99 = yyj99 > l + } else { + yyb99 = r.CheckBreak() + } + if yyb99 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + x.Value = "" + } else { + x.Value = string(r.DecodeString()) + } + yyj99++ + if yyhl99 { + yyb99 = yyj99 > l + } else { + yyb99 = r.CheckBreak() + } + if yyb99 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + x.Dir = false + } else { + x.Dir = bool(r.DecodeBool()) + } + yyj99++ + if yyhl99 { + yyb99 = yyj99 > l + } else { + yyb99 = r.CheckBreak() + } + if yyb99 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + if x.Expiration != nil { + x.Expiration = nil + } + } else { + if x.Expiration == nil { + x.Expiration = new(time.Time) + } + yym104 := z.DecBinary() + _ = yym104 + if false { + } else if yym105 := z.TimeRtidIfBinc(); yym105 != 0 { + r.DecodeBuiltin(yym105, x.Expiration) + } else if z.HasExtensions() && z.DecExt(x.Expiration) { + } else if yym104 { + z.DecBinaryUnmarshal(x.Expiration) + } else if !yym104 && z.IsJSONHandle() { + z.DecJSONUnmarshal(x.Expiration) + } else { + z.DecFallback(x.Expiration, false) + } + } + yyj99++ + if yyhl99 { + yyb99 = yyj99 > l + } else { + yyb99 = r.CheckBreak() + } + if yyb99 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + x.TTL = 0 + } else { + x.TTL = int64(r.DecodeInt(64)) + } + yyj99++ + if yyhl99 { + yyb99 = yyj99 > l + } else { + yyb99 = r.CheckBreak() + } + if yyb99 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + x.Nodes = nil + } else { + yyv107 := &x.Nodes + yyv107.CodecDecodeSelf(d) + } + yyj99++ + if yyhl99 { + yyb99 = yyj99 > l + } else { + yyb99 = r.CheckBreak() + } + if yyb99 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + x.ModifiedIndex = 0 + } else { + x.ModifiedIndex = uint64(r.DecodeUint(64)) + } + yyj99++ + if yyhl99 { + yyb99 = yyj99 > l + } else { + yyb99 = r.CheckBreak() + } + if yyb99 { + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) + return + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + if r.TryDecodeAsNil() { + x.CreatedIndex = 0 + } else { + x.CreatedIndex = uint64(r.DecodeUint(64)) + } + for { + yyj99++ + if yyhl99 { + yyb99 = yyj99 > l + } else { + yyb99 = r.CheckBreak() + } + if yyb99 { + break + } + z.DecSendContainerState(codecSelfer_containerArrayElem1978) + z.DecStructFieldNotFound(yyj99-1, "") + } + z.DecSendContainerState(codecSelfer_containerArrayEnd1978) +} + +func (x Nodes) CodecEncodeSelf(e *codec1978.Encoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + if x == nil { + r.EncodeNil() + } else { + yym110 := z.EncBinary() + _ = yym110 + if false { + } else if z.HasExtensions() && z.EncExt(x) { + } else { + h.encNodes((Nodes)(x), e) + } + } +} + +func (x *Nodes) CodecDecodeSelf(d *codec1978.Decoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + yym111 := z.DecBinary() + _ = yym111 + if false { + } else if z.HasExtensions() && z.DecExt(x) { + } else { + h.decNodes((*Nodes)(x), d) + } +} + +func (x codecSelfer1978) enchttp_Header(v pkg1_http.Header, e *codec1978.Encoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeMapStart(len(v)) + for yyk112, yyv112 := range v { + z.EncSendContainerState(codecSelfer_containerMapKey1978) + yym113 := z.EncBinary() + _ = yym113 + if false { + } else { + r.EncodeString(codecSelferC_UTF81978, string(yyk112)) + } + z.EncSendContainerState(codecSelfer_containerMapValue1978) + if yyv112 == nil { + r.EncodeNil() + } else { + yym114 := z.EncBinary() + _ = yym114 + if false { + } else { + z.F.EncSliceStringV(yyv112, false, e) + } + } + } + z.EncSendContainerState(codecSelfer_containerMapEnd1978) +} + +func (x codecSelfer1978) dechttp_Header(v *pkg1_http.Header, d *codec1978.Decoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv115 := *v + yyl115 := r.ReadMapStart() + yybh115 := z.DecBasicHandle() + if yyv115 == nil { + yyrl115, _ := z.DecInferLen(yyl115, yybh115.MaxInitLen, 40) + yyv115 = make(map[string][]string, yyrl115) + *v = yyv115 + } + var yymk115 string + var yymv115 []string + var yymg115 bool + if yybh115.MapValueReset { + yymg115 = true + } + if yyl115 > 0 { + for yyj115 := 0; yyj115 < yyl115; yyj115++ { + z.DecSendContainerState(codecSelfer_containerMapKey1978) + if r.TryDecodeAsNil() { + yymk115 = "" + } else { + yymk115 = string(r.DecodeString()) + } + + if yymg115 { + yymv115 = yyv115[yymk115] + } else { + yymv115 = nil + } + z.DecSendContainerState(codecSelfer_containerMapValue1978) + if r.TryDecodeAsNil() { + yymv115 = nil + } else { + yyv117 := &yymv115 + yym118 := z.DecBinary() + _ = yym118 + if false { + } else { + z.F.DecSliceStringX(yyv117, false, d) + } + } + + if yyv115 != nil { + yyv115[yymk115] = yymv115 + } + } + } else if yyl115 < 0 { + for yyj115 := 0; !r.CheckBreak(); yyj115++ { + z.DecSendContainerState(codecSelfer_containerMapKey1978) + if r.TryDecodeAsNil() { + yymk115 = "" + } else { + yymk115 = string(r.DecodeString()) + } + + if yymg115 { + yymv115 = yyv115[yymk115] + } else { + yymv115 = nil + } + z.DecSendContainerState(codecSelfer_containerMapValue1978) + if r.TryDecodeAsNil() { + yymv115 = nil + } else { + yyv120 := &yymv115 + yym121 := z.DecBinary() + _ = yym121 + if false { + } else { + z.F.DecSliceStringX(yyv120, false, d) + } + } + + if yyv115 != nil { + yyv115[yymk115] = yymv115 + } + } + } // else len==0: TODO: Should we clear map entries? + z.DecSendContainerState(codecSelfer_containerMapEnd1978) +} + +func (x codecSelfer1978) encNodes(v Nodes, e *codec1978.Encoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperEncoder(e) + _, _, _ = h, z, r + r.EncodeArrayStart(len(v)) + for _, yyv122 := range v { + z.EncSendContainerState(codecSelfer_containerArrayElem1978) + if yyv122 == nil { + r.EncodeNil() + } else { + yyv122.CodecEncodeSelf(e) + } + } + z.EncSendContainerState(codecSelfer_containerArrayEnd1978) +} + +func (x codecSelfer1978) decNodes(v *Nodes, d *codec1978.Decoder) { + var h codecSelfer1978 + z, r := codec1978.GenHelperDecoder(d) + _, _, _ = h, z, r + + yyv123 := *v + yyh123, yyl123 := z.DecSliceHelperStart() + var yyc123 bool + if yyl123 == 0 { + if yyv123 == nil { + yyv123 = []*Node{} + yyc123 = true + } else if len(yyv123) != 0 { + yyv123 = yyv123[:0] + yyc123 = true + } + } else if yyl123 > 0 { + var yyrr123, yyrl123 int + var yyrt123 bool + if yyl123 > cap(yyv123) { + + yyrg123 := len(yyv123) > 0 + yyv2123 := yyv123 + yyrl123, yyrt123 = z.DecInferLen(yyl123, z.DecBasicHandle().MaxInitLen, 8) + if yyrt123 { + if yyrl123 <= cap(yyv123) { + yyv123 = yyv123[:yyrl123] + } else { + yyv123 = make([]*Node, yyrl123) + } + } else { + yyv123 = make([]*Node, yyrl123) + } + yyc123 = true + yyrr123 = len(yyv123) + if yyrg123 { + copy(yyv123, yyv2123) + } + } else if yyl123 != len(yyv123) { + yyv123 = yyv123[:yyl123] + yyc123 = true + } + yyj123 := 0 + for ; yyj123 < yyrr123; yyj123++ { + yyh123.ElemContainerState(yyj123) + if r.TryDecodeAsNil() { + if yyv123[yyj123] != nil { + *yyv123[yyj123] = Node{} + } + } else { + if yyv123[yyj123] == nil { + yyv123[yyj123] = new(Node) + } + yyw124 := yyv123[yyj123] + yyw124.CodecDecodeSelf(d) + } + + } + if yyrt123 { + for ; yyj123 < yyl123; yyj123++ { + yyv123 = append(yyv123, nil) + yyh123.ElemContainerState(yyj123) + if r.TryDecodeAsNil() { + if yyv123[yyj123] != nil { + *yyv123[yyj123] = Node{} + } + } else { + if yyv123[yyj123] == nil { + yyv123[yyj123] = new(Node) + } + yyw125 := yyv123[yyj123] + yyw125.CodecDecodeSelf(d) + } + + } + } + + } else { + yyj123 := 0 + for ; !r.CheckBreak(); yyj123++ { + + if yyj123 >= len(yyv123) { + yyv123 = append(yyv123, nil) // var yyz123 *Node + yyc123 = true + } + yyh123.ElemContainerState(yyj123) + if yyj123 < len(yyv123) { + if r.TryDecodeAsNil() { + if yyv123[yyj123] != nil { + *yyv123[yyj123] = Node{} + } + } else { + if yyv123[yyj123] == nil { + yyv123[yyj123] = new(Node) + } + yyw126 := yyv123[yyj123] + yyw126.CodecDecodeSelf(d) + } + + } else { + z.DecSwallow() + } + + } + if yyj123 < len(yyv123) { + yyv123 = yyv123[:yyj123] + yyc123 = true + } else if yyj123 == 0 && yyv123 == nil { + yyv123 = []*Node{} + yyc123 = true + } + } + yyh123.End() + if yyc123 { + *v = yyv123 + } +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/response.go b/vendor/github.com/coreos/go-etcd/etcd/response.go new file mode 100644 index 000000000..69b38be46 --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/response.go @@ -0,0 +1,93 @@ +package etcd + +//go:generate codecgen -d 1978 -o response.generated.go response.go + +import ( + "net/http" + "strconv" + "time" + + "github.com/ugorji/go/codec" +) + +const ( + rawResponse = iota + normalResponse +) + +type responseType int + +type RawResponse struct { + StatusCode int + Body []byte + Header http.Header +} + +var ( + validHttpStatusCode = map[int]bool{ + http.StatusCreated: true, + http.StatusOK: true, + http.StatusBadRequest: true, + http.StatusNotFound: true, + http.StatusPreconditionFailed: true, + http.StatusForbidden: true, + http.StatusUnauthorized: true, + } +) + +// Unmarshal parses RawResponse and stores the result in Response +func (rr *RawResponse) Unmarshal() (*Response, error) { + if rr.StatusCode != http.StatusOK && rr.StatusCode != http.StatusCreated { + return nil, handleError(rr.Body) + } + + resp := new(Response) + + err := codec.NewDecoderBytes(rr.Body, new(codec.JsonHandle)).Decode(resp) + + if err != nil { + return nil, err + } + + // attach index and term to response + resp.EtcdIndex, _ = strconv.ParseUint(rr.Header.Get("X-Etcd-Index"), 10, 64) + resp.RaftIndex, _ = strconv.ParseUint(rr.Header.Get("X-Raft-Index"), 10, 64) + resp.RaftTerm, _ = strconv.ParseUint(rr.Header.Get("X-Raft-Term"), 10, 64) + + return resp, nil +} + +type Response struct { + Action string `json:"action"` + Node *Node `json:"node"` + PrevNode *Node `json:"prevNode,omitempty"` + EtcdIndex uint64 `json:"etcdIndex"` + RaftIndex uint64 `json:"raftIndex"` + RaftTerm uint64 `json:"raftTerm"` +} + +type Node struct { + Key string `json:"key, omitempty"` + Value string `json:"value,omitempty"` + Dir bool `json:"dir,omitempty"` + Expiration *time.Time `json:"expiration,omitempty"` + TTL int64 `json:"ttl,omitempty"` + Nodes Nodes `json:"nodes,omitempty"` + ModifiedIndex uint64 `json:"modifiedIndex,omitempty"` + CreatedIndex uint64 `json:"createdIndex,omitempty"` +} + +type Nodes []*Node + +// interfaces for sorting +func (ns Nodes) Len() int { + return len(ns) +} + +func (ns Nodes) Less(i, j int) bool { + return ns[i].Key < ns[j].Key +} + +func (ns Nodes) Swap(i, j int) { + ns[i], ns[j] = ns[j], ns[i] +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/set_update_create.go b/vendor/github.com/coreos/go-etcd/etcd/set_update_create.go new file mode 100644 index 000000000..e2840cf35 --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/set_update_create.go @@ -0,0 +1,137 @@ +package etcd + +// Set sets the given key to the given value. +// It will create a new key value pair or replace the old one. +// It will not replace a existing directory. +func (c *Client) Set(key string, value string, ttl uint64) (*Response, error) { + raw, err := c.RawSet(key, value, ttl) + + if err != nil { + return nil, err + } + + return raw.Unmarshal() +} + +// SetDir sets the given key to a directory. +// It will create a new directory or replace the old key value pair by a directory. +// It will not replace a existing directory. +func (c *Client) SetDir(key string, ttl uint64) (*Response, error) { + raw, err := c.RawSetDir(key, ttl) + + if err != nil { + return nil, err + } + + return raw.Unmarshal() +} + +// CreateDir creates a directory. It succeeds only if +// the given key does not yet exist. +func (c *Client) CreateDir(key string, ttl uint64) (*Response, error) { + raw, err := c.RawCreateDir(key, ttl) + + if err != nil { + return nil, err + } + + return raw.Unmarshal() +} + +// UpdateDir updates the given directory. It succeeds only if the +// given key already exists. +func (c *Client) UpdateDir(key string, ttl uint64) (*Response, error) { + raw, err := c.RawUpdateDir(key, ttl) + + if err != nil { + return nil, err + } + + return raw.Unmarshal() +} + +// Create creates a file with the given value under the given key. It succeeds +// only if the given key does not yet exist. +func (c *Client) Create(key string, value string, ttl uint64) (*Response, error) { + raw, err := c.RawCreate(key, value, ttl) + + if err != nil { + return nil, err + } + + return raw.Unmarshal() +} + +// CreateInOrder creates a file with a key that's guaranteed to be higher than other +// keys in the given directory. It is useful for creating queues. +func (c *Client) CreateInOrder(dir string, value string, ttl uint64) (*Response, error) { + raw, err := c.RawCreateInOrder(dir, value, ttl) + + if err != nil { + return nil, err + } + + return raw.Unmarshal() +} + +// Update updates the given key to the given value. It succeeds only if the +// given key already exists. +func (c *Client) Update(key string, value string, ttl uint64) (*Response, error) { + raw, err := c.RawUpdate(key, value, ttl) + + if err != nil { + return nil, err + } + + return raw.Unmarshal() +} + +func (c *Client) RawUpdateDir(key string, ttl uint64) (*RawResponse, error) { + ops := Options{ + "prevExist": true, + "dir": true, + } + + return c.put(key, "", ttl, ops) +} + +func (c *Client) RawCreateDir(key string, ttl uint64) (*RawResponse, error) { + ops := Options{ + "prevExist": false, + "dir": true, + } + + return c.put(key, "", ttl, ops) +} + +func (c *Client) RawSet(key string, value string, ttl uint64) (*RawResponse, error) { + return c.put(key, value, ttl, nil) +} + +func (c *Client) RawSetDir(key string, ttl uint64) (*RawResponse, error) { + ops := Options{ + "dir": true, + } + + return c.put(key, "", ttl, ops) +} + +func (c *Client) RawUpdate(key string, value string, ttl uint64) (*RawResponse, error) { + ops := Options{ + "prevExist": true, + } + + return c.put(key, value, ttl, ops) +} + +func (c *Client) RawCreate(key string, value string, ttl uint64) (*RawResponse, error) { + ops := Options{ + "prevExist": false, + } + + return c.put(key, value, ttl, ops) +} + +func (c *Client) RawCreateInOrder(dir string, value string, ttl uint64) (*RawResponse, error) { + return c.post(dir, value, ttl) +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/shuffle.go b/vendor/github.com/coreos/go-etcd/etcd/shuffle.go new file mode 100644 index 000000000..c26ddac30 --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/shuffle.go @@ -0,0 +1,19 @@ +package etcd + +import ( + "math/rand" +) + +func shuffleStringSlice(cards []string) []string { + size := len(cards) + //Do not need to copy if nothing changed + if size <= 1 { + return cards + } + shuffled := make([]string, size) + index := rand.Perm(size) + for i := range cards { + shuffled[index[i]] = cards[i] + } + return shuffled +} diff --git a/vendor/github.com/coreos/go-etcd/etcd/version.go b/vendor/github.com/coreos/go-etcd/etcd/version.go new file mode 100644 index 000000000..b1e9ed271 --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/version.go @@ -0,0 +1,6 @@ +package etcd + +const ( + version = "v2" + packageVersion = "v2.0.0+git" +) diff --git a/vendor/github.com/coreos/go-etcd/etcd/watch.go b/vendor/github.com/coreos/go-etcd/etcd/watch.go new file mode 100644 index 000000000..aa8d3df30 --- /dev/null +++ b/vendor/github.com/coreos/go-etcd/etcd/watch.go @@ -0,0 +1,103 @@ +package etcd + +import ( + "errors" +) + +// Errors introduced by the Watch command. +var ( + ErrWatchStoppedByUser = errors.New("Watch stopped by the user via stop channel") +) + +// If recursive is set to true the watch returns the first change under the given +// prefix since the given index. +// +// If recursive is set to false the watch returns the first change to the given key +// since the given index. +// +// To watch for the latest change, set waitIndex = 0. +// +// If a receiver channel is given, it will be a long-term watch. Watch will block at the +//channel. After someone receives the channel, it will go on to watch that +// prefix. If a stop channel is given, the client can close long-term watch using +// the stop channel. +func (c *Client) Watch(prefix string, waitIndex uint64, recursive bool, + receiver chan *Response, stop chan bool) (*Response, error) { + logger.Debugf("watch %s [%s]", prefix, c.cluster.Leader) + if receiver == nil { + raw, err := c.watchOnce(prefix, waitIndex, recursive, stop) + + if err != nil { + return nil, err + } + + return raw.Unmarshal() + } + defer close(receiver) + + for { + raw, err := c.watchOnce(prefix, waitIndex, recursive, stop) + + if err != nil { + return nil, err + } + + resp, err := raw.Unmarshal() + + if err != nil { + return nil, err + } + + waitIndex = resp.Node.ModifiedIndex + 1 + receiver <- resp + } +} + +func (c *Client) RawWatch(prefix string, waitIndex uint64, recursive bool, + receiver chan *RawResponse, stop chan bool) (*RawResponse, error) { + + logger.Debugf("rawWatch %s [%s]", prefix, c.cluster.Leader) + if receiver == nil { + return c.watchOnce(prefix, waitIndex, recursive, stop) + } + + for { + raw, err := c.watchOnce(prefix, waitIndex, recursive, stop) + + if err != nil { + return nil, err + } + + resp, err := raw.Unmarshal() + + if err != nil { + return nil, err + } + + waitIndex = resp.Node.ModifiedIndex + 1 + receiver <- raw + } +} + +// helper func +// return when there is change under the given prefix +func (c *Client) watchOnce(key string, waitIndex uint64, recursive bool, stop chan bool) (*RawResponse, error) { + + options := Options{ + "wait": true, + } + if waitIndex > 0 { + options["waitIndex"] = waitIndex + } + if recursive { + options["recursive"] = true + } + + resp, err := c.getCancelable(key, options, stop) + + if err == ErrRequestCancelled { + return nil, ErrWatchStoppedByUser + } + + return resp, err +} diff --git a/vendor/github.com/elazarl/go-bindata-assetfs/LICENSE b/vendor/github.com/elazarl/go-bindata-assetfs/LICENSE new file mode 100644 index 000000000..5782c7269 --- /dev/null +++ b/vendor/github.com/elazarl/go-bindata-assetfs/LICENSE @@ -0,0 +1,23 @@ +Copyright (c) 2014, Elazar Leibovich +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/elazarl/go-bindata-assetfs/README.md b/vendor/github.com/elazarl/go-bindata-assetfs/README.md new file mode 100644 index 000000000..27ee48f09 --- /dev/null +++ b/vendor/github.com/elazarl/go-bindata-assetfs/README.md @@ -0,0 +1,46 @@ +# go-bindata-assetfs + +Serve embedded files from [jteeuwen/go-bindata](https://github.com/jteeuwen/go-bindata) with `net/http`. + +[GoDoc](http://godoc.org/github.com/elazarl/go-bindata-assetfs) + +### Installation + +Install with + + $ go get github.com/jteeuwen/go-bindata/... + $ go get github.com/elazarl/go-bindata-assetfs/... + +### Creating embedded data + +Usage is identical to [jteeuwen/go-bindata](https://github.com/jteeuwen/go-bindata) usage, +instead of running `go-bindata` run `go-bindata-assetfs`. + +The tool will create a `bindata_assetfs.go` file, which contains the embedded data. + +A typical use case is + + $ go-bindata-assetfs data/... + +### Using assetFS in your code + +The generated file provides an `assetFS()` function that returns a `http.Filesystem` +wrapping the embedded files. What you usually want to do is: + + http.Handle("/", http.FileServer(assetFS())) + +This would run an HTTP server serving the embedded files. + +## Without running binary tool + +You can always just run the `go-bindata` tool, and then + +use + + import "github.com/elazarl/go-bindata-assetfs" + ... + http.Handle("/", + http.FileServer( + &assetfs.AssetFS{Asset: Asset, AssetDir: AssetDir, AssetInfo: AssetInfo, Prefix: "data"})) + +to serve files embedded from the `data` directory. diff --git a/vendor/github.com/elazarl/go-bindata-assetfs/assetfs.go b/vendor/github.com/elazarl/go-bindata-assetfs/assetfs.go new file mode 100644 index 000000000..9397e58d5 --- /dev/null +++ b/vendor/github.com/elazarl/go-bindata-assetfs/assetfs.go @@ -0,0 +1,158 @@ +package assetfs + +import ( + "bytes" + "errors" + "io" + "io/ioutil" + "net/http" + "os" + "path" + "path/filepath" + "time" +) + +var ( + defaultFileTimestamp = time.Now() +) + +// FakeFile implements os.FileInfo interface for a given path and size +type FakeFile struct { + // Path is the path of this file + Path string + // Dir marks of the path is a directory + Dir bool + // Len is the length of the fake file, zero if it is a directory + Len int64 + // Timestamp is the ModTime of this file + Timestamp time.Time +} + +func (f *FakeFile) Name() string { + _, name := filepath.Split(f.Path) + return name +} + +func (f *FakeFile) Mode() os.FileMode { + mode := os.FileMode(0644) + if f.Dir { + return mode | os.ModeDir + } + return mode +} + +func (f *FakeFile) ModTime() time.Time { + return f.Timestamp +} + +func (f *FakeFile) Size() int64 { + return f.Len +} + +func (f *FakeFile) IsDir() bool { + return f.Mode().IsDir() +} + +func (f *FakeFile) Sys() interface{} { + return nil +} + +// AssetFile implements http.File interface for a no-directory file with content +type AssetFile struct { + *bytes.Reader + io.Closer + FakeFile +} + +func NewAssetFile(name string, content []byte, timestamp time.Time) *AssetFile { + if timestamp.IsZero() { + timestamp = defaultFileTimestamp + } + return &AssetFile{ + bytes.NewReader(content), + ioutil.NopCloser(nil), + FakeFile{name, false, int64(len(content)), timestamp}} +} + +func (f *AssetFile) Readdir(count int) ([]os.FileInfo, error) { + return nil, errors.New("not a directory") +} + +func (f *AssetFile) Size() int64 { + return f.FakeFile.Size() +} + +func (f *AssetFile) Stat() (os.FileInfo, error) { + return f, nil +} + +// AssetDirectory implements http.File interface for a directory +type AssetDirectory struct { + AssetFile + ChildrenRead int + Children []os.FileInfo +} + +func NewAssetDirectory(name string, children []string, fs *AssetFS) *AssetDirectory { + fileinfos := make([]os.FileInfo, 0, len(children)) + for _, child := range children { + _, err := fs.AssetDir(filepath.Join(name, child)) + fileinfos = append(fileinfos, &FakeFile{child, err == nil, 0, time.Time{}}) + } + return &AssetDirectory{ + AssetFile{ + bytes.NewReader(nil), + ioutil.NopCloser(nil), + FakeFile{name, true, 0, time.Time{}}, + }, + 0, + fileinfos} +} + +func (f *AssetDirectory) Readdir(count int) ([]os.FileInfo, error) { + if count <= 0 { + return f.Children, nil + } + if f.ChildrenRead+count > len(f.Children) { + count = len(f.Children) - f.ChildrenRead + } + rv := f.Children[f.ChildrenRead : f.ChildrenRead+count] + f.ChildrenRead += count + return rv, nil +} + +func (f *AssetDirectory) Stat() (os.FileInfo, error) { + return f, nil +} + +// AssetFS implements http.FileSystem, allowing +// embedded files to be served from net/http package. +type AssetFS struct { + // Asset should return content of file in path if exists + Asset func(path string) ([]byte, error) + // AssetDir should return list of files in the path + AssetDir func(path string) ([]string, error) + // AssetInfo should return the info of file in path if exists + AssetInfo func(path string) (os.FileInfo, error) + // Prefix would be prepended to http requests + Prefix string +} + +func (fs *AssetFS) Open(name string) (http.File, error) { + name = path.Join(fs.Prefix, name) + if len(name) > 0 && name[0] == '/' { + name = name[1:] + } + if b, err := fs.Asset(name); err == nil { + timestamp := defaultFileTimestamp + if info, err := fs.AssetInfo(name); err == nil { + timestamp = info.ModTime() + } + return NewAssetFile(name, b, timestamp), nil + } + if children, err := fs.AssetDir(name); err == nil { + return NewAssetDirectory(name, children, fs), nil + } else { + return nil, err + } +} diff --git a/vendor/github.com/elazarl/go-bindata-assetfs/doc.go b/vendor/github.com/elazarl/go-bindata-assetfs/doc.go new file mode 100644 index 000000000..a664249f3 --- /dev/null +++ b/vendor/github.com/elazarl/go-bindata-assetfs/doc.go @@ -0,0 +1,13 @@ +// assetfs allows packages to serve static content embedded +// with the go-bindata tool with the standard net/http package. +// +// See https://github.com/jteeuwen/go-bindata for more information +// about embedding binary data with go-bindata. +// +// Usage example, after running +// $ go-bindata data/... +// use: +// http.Handle("/", +// http.FileServer( +// &assetfs.AssetFS{Asset: Asset, AssetDir: AssetDir, Prefix: "data"})) +package assetfs diff --git a/vendor/github.com/go-macaron/bindata/LICENSE b/vendor/github.com/go-macaron/bindata/LICENSE new file mode 100644 index 000000000..37ec93a14 --- /dev/null +++ b/vendor/github.com/go-macaron/bindata/LICENSE @@ -0,0 +1,191 @@ +Apache License +Version 2.0, January 2004 +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and +distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright +owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities +that control, are controlled by, or are under common control with that entity. +For the purposes of this definition, "control" means (i) the power, direct or +indirect, to cause the direction or management of such entity, whether by +contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the +outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising +permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including +but not limited to software source code, documentation source, and configuration +files. + +"Object" form shall mean any form resulting from mechanical transformation or +translation of a Source form, including but not limited to compiled object code, +generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made +available under the License, as indicated by a copyright notice that is included +in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that +is based on (or derived from) the Work and for which the editorial revisions, +annotations, elaborations, or other modifications represent, as a whole, an +original work of authorship. For the purposes of this License, Derivative Works +shall not include works that remain separable from, or merely link (or bind by +name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version +of the Work and any modifications or additions to that Work or Derivative Works +thereof, that is intentionally submitted to Licensor for inclusion in the Work +by the copyright owner or by an individual or Legal Entity authorized to submit +on behalf of the copyright owner. For the purposes of this definition, +"submitted" means any form of electronic, verbal, or written communication sent +to the Licensor or its representatives, including but not limited to +communication on electronic mailing lists, source code control systems, and +issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication +that is conspicuously marked or otherwise designated in writing by the copyright +owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf +of whom a Contribution has been received by Licensor and subsequently +incorporated within the Work. + +2. Grant of Copyright License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable copyright license to reproduce, prepare Derivative Works of, +publicly display, publicly perform, sublicense, and distribute the Work and such +Derivative Works in Source or Object form. + +3. Grant of Patent License. + +Subject to the terms and conditions of this License, each Contributor hereby +grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, +irrevocable (except as stated in this section) patent license to make, have +made, use, offer to sell, sell, import, and otherwise transfer the Work, where +such license applies only to those patent claims licensable by such Contributor +that are necessarily infringed by their Contribution(s) alone or by combination +of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a +cross-claim or counterclaim in a lawsuit) alleging that the Work or a +Contribution incorporated within the Work constitutes direct or contributory +patent infringement, then any patent licenses granted to You under this License +for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. + +You may reproduce and distribute copies of the Work or Derivative Works thereof +in any medium, with or without modifications, and in Source or Object form, +provided that You meet the following conditions: + +You must give any other recipients of the Work or Derivative Works a copy of +this License; and +You must cause any modified files to carry prominent notices stating that You +changed the files; and +You must retain, in the Source form of any Derivative Works that You distribute, +all copyright, patent, trademark, and attribution notices from the Source form +of the Work, excluding those notices that do not pertain to any part of the +Derivative Works; and +If the Work includes a "NOTICE" text file as part of its distribution, then any +Derivative Works that You distribute must include a readable copy of the +attribution notices contained within such NOTICE file, excluding those notices +that do not pertain to any part of the Derivative Works, in at least one of the +following places: within a NOTICE text file distributed as part of the +Derivative Works; within the Source form or documentation, if provided along +with the Derivative Works; or, within a display generated by the Derivative +Works, if and wherever such third-party notices normally appear. The contents of +the NOTICE file are for informational purposes only and do not modify the +License. You may add Your own attribution notices within Derivative Works that +You distribute, alongside or as an addendum to the NOTICE text from the Work, +provided that such additional attribution notices cannot be construed as +modifying the License. +You may add Your own copyright statement to Your modifications and may provide +additional or different license terms and conditions for use, reproduction, or +distribution of Your modifications, or for any such Derivative Works as a whole, +provided Your use, reproduction, and distribution of the Work otherwise complies +with the conditions stated in this License. + +5. Submission of Contributions. + +Unless You explicitly state otherwise, any Contribution intentionally submitted +for inclusion in the Work by You to the Licensor shall be under the terms and +conditions of this License, without any additional terms or conditions. +Notwithstanding the above, nothing herein shall supersede or modify the terms of +any separate license agreement you may have executed with Licensor regarding +such Contributions. + +6. Trademarks. + +This License does not grant permission to use the trade names, trademarks, +service marks, or product names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. + +Unless required by applicable law or agreed to in writing, Licensor provides the +Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, +including, without limitation, any warranties or conditions of TITLE, +NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are +solely responsible for determining the appropriateness of using or +redistributing the Work and assume any risks associated with Your exercise of +permissions under this License. + +8. Limitation of Liability. + +In no event and under no legal theory, whether in tort (including negligence), +contract, or otherwise, unless required by applicable law (such as deliberate +and grossly negligent acts) or agreed to in writing, shall any Contributor be +liable to You for damages, including any direct, indirect, special, incidental, +or consequential damages of any character arising as a result of this License or +out of the use or inability to use the Work (including but not limited to +damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has +been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. + +While redistributing the Work or Derivative Works thereof, You may choose to +offer, and charge a fee for, acceptance of support, warranty, indemnity, or +other liability obligations and/or rights consistent with this License. However, +in accepting such obligations, You may act only on Your own behalf and on Your +sole responsibility, not on behalf of any other Contributor, and only if You +agree to indemnify, defend, and hold each Contributor harmless for any liability +incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work + +To apply the Apache License to your work, attach the following boilerplate +notice, with the fields enclosed by brackets "[]" replaced with your own +identifying information. (Don't include the brackets!) The text should be +enclosed in the appropriate comment syntax for the file format. We also +recommend that a file or class name and description of purpose be included on +the same "printed page" as the copyright notice for easier identification within +third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/go-macaron/bindata/README.md b/vendor/github.com/go-macaron/bindata/README.md new file mode 100644 index 000000000..fd32bf3fb --- /dev/null +++ b/vendor/github.com/go-macaron/bindata/README.md @@ -0,0 +1,16 @@ +# bindata [![Build Status](https://travis-ci.org/go-macaron/bindata.svg?branch=master)](https://travis-ci.org/go-macaron/bindata) [![](http://gocover.io/_badge/github.com/go-macaron/bindata)](http://gocover.io/github.com/go-macaron/bindata) + +Package bindata is a helper module that allows to use in-memory static and template files for Macaron via [go-bindata](https://github.com/jteeuwen/go-bindata). + +### Installation + + go get github.com/go-macaron/bindata + +## Getting Help + +- [API Reference](https://gowalker.org/github.com/go-macaron/bindata) +- [Documentation](http://go-macaron.com/docs/middlewares/bindata) + +## License + +This project is under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for the full license text. \ No newline at end of file diff --git a/vendor/github.com/go-macaron/bindata/bindata.go b/vendor/github.com/go-macaron/bindata/bindata.go new file mode 100644 index 000000000..f20d13243 --- /dev/null +++ b/vendor/github.com/go-macaron/bindata/bindata.go @@ -0,0 +1,105 @@ +// Copyright 2014 Dustin Webber +// Copyright 2015 The Macaron Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package bindata is a helper module that allows to use in-memory static and template files for Macaron. +package bindata + +import ( + "os" + + "github.com/elazarl/go-bindata-assetfs" + "gopkg.in/macaron.v1" +) + +const _VERSION = "0.1.0" + +func Version() string { + return _VERSION +} + +type ( + templateFileSystem struct { + files []macaron.TemplateFile + } + + templateFile struct { + name string + data []byte + ext string + } + + Options struct { + // Asset should return content of file in path if exists + Asset func(path string) ([]byte, error) + // AssetDir should return list of files in the path + AssetDir func(path string) ([]string, error) + // AssetInfo should return the info of file in path if exists + AssetInfo func(path string) (os.FileInfo, error) + // AssetNames should return list of all asset names + AssetNames func() []string + // Prefix would be prepended to http requests + Prefix string + } +) + +func Static(opt Options) *assetfs.AssetFS { + fs := &assetfs.AssetFS{ + Asset: opt.Asset, + AssetDir: opt.AssetDir, + AssetInfo: opt.AssetInfo, + Prefix: opt.Prefix, + } + + return fs +} + +func (templates templateFileSystem) ListFiles() []macaron.TemplateFile { + return templates.files +} + +func (f *templateFile) Name() string { + return f.name +} + +func (f *templateFile) Data() []byte { + return f.data +} + +func (f *templateFile) Ext() string { + return f.ext +} + +func Templates(opt Options) templateFileSystem { + fs := templateFileSystem{} + fs.files = make([]macaron.TemplateFile, 0, 10) + + list := opt.AssetNames() + + for _, key := range list { + ext := macaron.GetExt(key) + + data, err := opt.Asset(key) + + if err != nil { + continue + } + + name := (key[0 : len(key)-len(ext)]) + + fs.files = append(fs.files, &templateFile{name, data, ext}) + } + + return fs +} diff --git a/vendor/github.com/go-xorm/tidb/README.md b/vendor/github.com/go-xorm/tidb/README.md new file mode 100644 index 000000000..261ebe340 --- /dev/null +++ b/vendor/github.com/go-xorm/tidb/README.md @@ -0,0 +1,24 @@ +tidb driver and dialect for github.com/go-xorm/xorm +======== + +Currently, we can support tidb for allmost all the operations. + +# How to use + +Just like other supports of xorm, but you should import the three packages: + +```Go +import ( + _ "github.com/pingcap/tidb" + _ "github.com/go-xorm/tidb" + "github.com/go-xorm/xorm" +) + +//The formate of DataSource name is store://uri/dbname +// for goleveldb as store +xorm.NewEngine("tidb", "goleveldb://./tidb/tidb") +// for memory as store +xorm.NewEngine("tidb", "memory://tidb/tidb") +// for boltdb as store +xorm.NewEngine("tidb", "boltdb://./tidb/tidb") +``` diff --git a/vendor/github.com/go-xorm/tidb/tidb_dialect.go b/vendor/github.com/go-xorm/tidb/tidb_dialect.go new file mode 100644 index 000000000..08e4d6241 --- /dev/null +++ b/vendor/github.com/go-xorm/tidb/tidb_dialect.go @@ -0,0 +1,326 @@ +// Copyright 2015 The Xorm Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package tidb + +import ( + "errors" + "fmt" + "strconv" + "strings" + + "github.com/go-xorm/core" +) + +type tidb struct { + core.Base +} + +func (db *tidb) Init(d *core.DB, uri *core.Uri, drivername, dataSourceName string) error { + return db.Base.Init(d, db, uri, drivername, dataSourceName) +} + +func (db *tidb) SqlType(c *core.Column) string { + var res string + switch t := c.SQLType.Name; t { + case core.Bool: + res = core.Bool + case core.Serial: + c.IsAutoIncrement = true + c.IsPrimaryKey = true + c.Nullable = false + res = core.Int + case core.BigSerial: + c.IsAutoIncrement = true + c.IsPrimaryKey = true + c.Nullable = false + res = core.BigInt + case core.Bytea: + res = core.Blob + case core.TimeStampz: + res = core.Char + c.Length = 64 + case core.Enum: //mysql enum + res = core.Enum + res += "(" + opts := "" + for v, _ := range c.EnumOptions { + opts += fmt.Sprintf(",'%v'", v) + } + res += strings.TrimLeft(opts, ",") + res += ")" + case core.Set: //mysql set + res = core.Set + res += "(" + opts := "" + for v, _ := range c.SetOptions { + opts += fmt.Sprintf(",'%v'", v) + } + res += strings.TrimLeft(opts, ",") + res += ")" + case core.NVarchar: + res = core.Varchar + case core.Uuid: + res = core.Varchar + c.Length = 40 + case core.Json: + res = core.Text + default: + res = t + } + + var hasLen1 bool = (c.Length > 0) + var hasLen2 bool = (c.Length2 > 0) + + if res == core.BigInt && !hasLen1 && !hasLen2 { + c.Length = 20 + hasLen1 = true + } + + if hasLen2 { + res += "(" + strconv.Itoa(c.Length) + "," + strconv.Itoa(c.Length2) + ")" + } else if hasLen1 { + res += "(" + strconv.Itoa(c.Length) + ")" + } + return res +} + +func (db *tidb) SupportInsertMany() bool { + return true +} + +func (db *tidb) IsReserved(name string) bool { + return false +} + +func (db *tidb) Quote(name string) string { + return "`" + name + "`" +} + +func (db *tidb) QuoteStr() string { + return "`" +} + +func (db *tidb) SupportEngine() bool { + return false +} + +func (db *tidb) AutoIncrStr() string { + return "AUTO_INCREMENT" +} + +func (db *tidb) SupportCharset() bool { + return false +} + +func (db *tidb) IndexOnTable() bool { + return true +} + +func (db *tidb) IndexCheckSql(tableName, idxName string) (string, []interface{}) { + args := []interface{}{db.DbName, tableName, idxName} + sql := "SELECT `INDEX_NAME` FROM `INFORMATION_SCHEMA`.`STATISTICS`" + sql += " WHERE `TABLE_SCHEMA` = ? AND `TABLE_NAME` = ? AND `INDEX_NAME`=?" + return sql, args +} + +func (db *tidb) TableCheckSql(tableName string) (string, []interface{}) { + args := []interface{}{db.DbName, tableName} + sql := "SELECT `TABLE_NAME` from `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA`=? and `TABLE_NAME`=?" + return sql, args +} + +func (db *tidb) GetColumns(tableName string) ([]string, map[string]*core.Column, error) { + args := []interface{}{db.DbName, tableName} + s := "SELECT `COLUMN_NAME`, `IS_NULLABLE`, `COLUMN_DEFAULT`, `COLUMN_TYPE`," + + " `COLUMN_KEY`, `EXTRA` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA` = ? AND `TABLE_NAME` = ?" + + rows, err := db.DB().Query(s, args...) + db.LogSQL(s, args) + + if err != nil { + return nil, nil, err + } + defer rows.Close() + + cols := make(map[string]*core.Column) + colSeq := make([]string, 0) + for rows.Next() { + col := new(core.Column) + col.Indexes = make(map[string]int) + + var columnName, isNullable, colType, colKey, extra string + var colDefault *string + err = rows.Scan(&columnName, &isNullable, &colDefault, &colType, &colKey, &extra) + if err != nil { + return nil, nil, err + } + col.Name = strings.Trim(columnName, "` ") + if "YES" == isNullable { + col.Nullable = true + } + + if colDefault != nil { + col.Default = *colDefault + if col.Default == "" { + col.DefaultIsEmpty = true + } + } + + cts := strings.Split(colType, "(") + colName := cts[0] + colType = strings.ToUpper(colName) + var len1, len2 int + if len(cts) == 2 { + idx := strings.Index(cts[1], ")") + if colType == core.Enum && cts[1][0] == '\'' { //enum + options := strings.Split(cts[1][0:idx], ",") + col.EnumOptions = make(map[string]int) + for k, v := range options { + v = strings.TrimSpace(v) + v = strings.Trim(v, "'") + col.EnumOptions[v] = k + } + } else if colType == core.Set && cts[1][0] == '\'' { + options := strings.Split(cts[1][0:idx], ",") + col.SetOptions = make(map[string]int) + for k, v := range options { + v = strings.TrimSpace(v) + v = strings.Trim(v, "'") + col.SetOptions[v] = k + } + } else { + lens := strings.Split(cts[1][0:idx], ",") + len1, err = strconv.Atoi(strings.TrimSpace(lens[0])) + if err != nil { + return nil, nil, err + } + if len(lens) == 2 { + len2, err = strconv.Atoi(lens[1]) + if err != nil { + return nil, nil, err + } + } + } + } + if colType == "FLOAT UNSIGNED" { + colType = "FLOAT" + } + col.Length = len1 + col.Length2 = len2 + if _, ok := core.SqlTypes[colType]; ok { + col.SQLType = core.SQLType{colType, len1, len2} + } else { + return nil, nil, errors.New(fmt.Sprintf("unkonw colType %v", colType)) + } + + if colKey == "PRI" { + col.IsPrimaryKey = true + } + if colKey == "UNI" { + //col.is + } + + if extra == "auto_increment" { + col.IsAutoIncrement = true + } + + if col.SQLType.IsText() || col.SQLType.IsTime() { + if col.Default != "" { + col.Default = "'" + col.Default + "'" + } else { + if col.DefaultIsEmpty { + col.Default = "''" + } + } + } + cols[col.Name] = col + colSeq = append(colSeq, col.Name) + } + return colSeq, cols, nil +} + +func (db *tidb) GetTables() ([]*core.Table, error) { + args := []interface{}{db.DbName} + s := "SELECT `TABLE_NAME`, `ENGINE`, `TABLE_ROWS`, `AUTO_INCREMENT` from " + + "`INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA`=? AND (`ENGINE`='MyISAM' OR `ENGINE` = 'InnoDB')" + + rows, err := db.DB().Query(s, args...) + db.LogSQL(s, args) + if err != nil { + return nil, err + } + defer rows.Close() + + tables := make([]*core.Table, 0) + for rows.Next() { + table := core.NewEmptyTable() + var name, engine, tableRows string + var autoIncr *string + err = rows.Scan(&name, &engine, &tableRows, &autoIncr) + if err != nil { + return nil, err + } + + table.Name = name + table.StoreEngine = engine + tables = append(tables, table) + } + return tables, nil +} + +func (db *tidb) GetIndexes(tableName string) (map[string]*core.Index, error) { + args := []interface{}{db.DbName, tableName} + s := "SELECT `INDEX_NAME`, `NON_UNIQUE`, `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`STATISTICS` WHERE `TABLE_SCHEMA` = ? AND `TABLE_NAME` = ?" + + rows, err := db.DB().Query(s, args...) + db.LogSQL(s, args) + if err != nil { + return nil, err + } + defer rows.Close() + + indexes := make(map[string]*core.Index, 0) + for rows.Next() { + var indexType int + var indexName, colName, nonUnique string + err = rows.Scan(&indexName, &nonUnique, &colName) + if err != nil { + return nil, err + } + + if indexName == "PRIMARY" { + continue + } + + if "YES" == nonUnique || nonUnique == "1" { + indexType = core.IndexType + } else { + indexType = core.UniqueType + } + + colName = strings.Trim(colName, "` ") + var isRegular bool + if strings.HasPrefix(indexName, "IDX_"+tableName) || strings.HasPrefix(indexName, "UQE_"+tableName) { + indexName = indexName[5+len(tableName) : len(indexName)] + isRegular = true + } + + var index *core.Index + var ok bool + if index, ok = indexes[indexName]; !ok { + index = new(core.Index) + index.IsRegular = isRegular + index.Type = indexType + index.Name = indexName + indexes[indexName] = index + } + index.AddColumn(colName) + } + return indexes, nil +} + +func (db *tidb) Filters() []core.Filter { + return []core.Filter{&core.IdFilter{}} +} diff --git a/vendor/github.com/go-xorm/tidb/tidb_driver.go b/vendor/github.com/go-xorm/tidb/tidb_driver.go new file mode 100644 index 000000000..1e73a84b1 --- /dev/null +++ b/vendor/github.com/go-xorm/tidb/tidb_driver.go @@ -0,0 +1,48 @@ +// Copyright 2015 The Xorm Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package tidb + +import ( + "errors" + "net/url" + "path/filepath" + + "github.com/go-xorm/core" +) + +var ( + _ core.Dialect = (*tidb)(nil) + + DBType core.DbType = "tidb" +) + +func init() { + core.RegisterDriver(string(DBType), &tidbDriver{}) + core.RegisterDialect(DBType, func() core.Dialect { + return &tidb{} + }) +} + +type tidbDriver struct { +} + +func (p *tidbDriver) Parse(driverName, dataSourceName string) (*core.Uri, error) { + u, err := url.Parse(dataSourceName) + if err != nil { + return nil, err + } + if u.Scheme != "goleveldb" && u.Scheme != "memory" && u.Scheme != "boltdb" { + return nil, errors.New(u.Scheme + " is not supported yet.") + } + path := filepath.Join(u.Host, u.Path) + dbName := filepath.Clean(filepath.Base(path)) + + uri := &core.Uri{ + DbType: DBType, + DbName: dbName, + } + + return uri, nil +} diff --git a/vendor/github.com/golang/protobuf/LICENSE b/vendor/github.com/golang/protobuf/LICENSE new file mode 100644 index 000000000..1b1b1921e --- /dev/null +++ b/vendor/github.com/golang/protobuf/LICENSE @@ -0,0 +1,31 @@ +Go support for Protocol Buffers - Google's data interchange format + +Copyright 2010 The Go Authors. All rights reserved. +https://github.com/golang/protobuf + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/vendor/github.com/golang/protobuf/proto/Makefile b/vendor/github.com/golang/protobuf/proto/Makefile new file mode 100644 index 000000000..e2e0651a9 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/Makefile @@ -0,0 +1,43 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2010 The Go Authors. All rights reserved. +# https://github.com/golang/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +install: + go install + +test: install generate-test-pbs + go test + + +generate-test-pbs: + make install + make -C testdata + protoc --go_out=Mtestdata/test.proto=github.com/golang/protobuf/proto/testdata,Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any:. proto3_proto/proto3.proto + make diff --git a/vendor/github.com/golang/protobuf/proto/clone.go b/vendor/github.com/golang/protobuf/proto/clone.go new file mode 100644 index 000000000..e98ddec98 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/clone.go @@ -0,0 +1,223 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Protocol buffer deep copy and merge. +// TODO: RawMessage. + +package proto + +import ( + "log" + "reflect" + "strings" +) + +// Clone returns a deep copy of a protocol buffer. +func Clone(pb Message) Message { + in := reflect.ValueOf(pb) + if in.IsNil() { + return pb + } + + out := reflect.New(in.Type().Elem()) + // out is empty so a merge is a deep copy. + mergeStruct(out.Elem(), in.Elem()) + return out.Interface().(Message) +} + +// Merge merges src into dst. +// Required and optional fields that are set in src will be set to that value in dst. +// Elements of repeated fields will be appended. +// Merge panics if src and dst are not the same type, or if dst is nil. +func Merge(dst, src Message) { + in := reflect.ValueOf(src) + out := reflect.ValueOf(dst) + if out.IsNil() { + panic("proto: nil destination") + } + if in.Type() != out.Type() { + // Explicit test prior to mergeStruct so that mistyped nils will fail + panic("proto: type mismatch") + } + if in.IsNil() { + // Merging nil into non-nil is a quiet no-op + return + } + mergeStruct(out.Elem(), in.Elem()) +} + +func mergeStruct(out, in reflect.Value) { + sprop := GetProperties(in.Type()) + for i := 0; i < in.NumField(); i++ { + f := in.Type().Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + mergeAny(out.Field(i), in.Field(i), false, sprop.Prop[i]) + } + + if emIn, ok := in.Addr().Interface().(extendableProto); ok { + emOut := out.Addr().Interface().(extendableProto) + mergeExtension(emOut.ExtensionMap(), emIn.ExtensionMap()) + } + + uf := in.FieldByName("XXX_unrecognized") + if !uf.IsValid() { + return + } + uin := uf.Bytes() + if len(uin) > 0 { + out.FieldByName("XXX_unrecognized").SetBytes(append([]byte(nil), uin...)) + } +} + +// mergeAny performs a merge between two values of the same type. +// viaPtr indicates whether the values were indirected through a pointer (implying proto2). +// prop is set if this is a struct field (it may be nil). +func mergeAny(out, in reflect.Value, viaPtr bool, prop *Properties) { + if in.Type() == protoMessageType { + if !in.IsNil() { + if out.IsNil() { + out.Set(reflect.ValueOf(Clone(in.Interface().(Message)))) + } else { + Merge(out.Interface().(Message), in.Interface().(Message)) + } + } + return + } + switch in.Kind() { + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, + reflect.String, reflect.Uint32, reflect.Uint64: + if !viaPtr && isProto3Zero(in) { + return + } + out.Set(in) + case reflect.Interface: + // Probably a oneof field; copy non-nil values. + if in.IsNil() { + return + } + // Allocate destination if it is not set, or set to a different type. + // Otherwise we will merge as normal. + if out.IsNil() || out.Elem().Type() != in.Elem().Type() { + out.Set(reflect.New(in.Elem().Elem().Type())) // interface -> *T -> T -> new(T) + } + mergeAny(out.Elem(), in.Elem(), false, nil) + case reflect.Map: + if in.Len() == 0 { + return + } + if out.IsNil() { + out.Set(reflect.MakeMap(in.Type())) + } + // For maps with value types of *T or []byte we need to deep copy each value. + elemKind := in.Type().Elem().Kind() + for _, key := range in.MapKeys() { + var val reflect.Value + switch elemKind { + case reflect.Ptr: + val = reflect.New(in.Type().Elem().Elem()) + mergeAny(val, in.MapIndex(key), false, nil) + case reflect.Slice: + val = in.MapIndex(key) + val = reflect.ValueOf(append([]byte{}, val.Bytes()...)) + default: + val = in.MapIndex(key) + } + out.SetMapIndex(key, val) + } + case reflect.Ptr: + if in.IsNil() { + return + } + if out.IsNil() { + out.Set(reflect.New(in.Elem().Type())) + } + mergeAny(out.Elem(), in.Elem(), true, nil) + case reflect.Slice: + if in.IsNil() { + return + } + if in.Type().Elem().Kind() == reflect.Uint8 { + // []byte is a scalar bytes field, not a repeated field. + + // Edge case: if this is in a proto3 message, a zero length + // bytes field is considered the zero value, and should not + // be merged. + if prop != nil && prop.proto3 && in.Len() == 0 { + return + } + + // Make a deep copy. + // Append to []byte{} instead of []byte(nil) so that we never end up + // with a nil result. + out.SetBytes(append([]byte{}, in.Bytes()...)) + return + } + n := in.Len() + if out.IsNil() { + out.Set(reflect.MakeSlice(in.Type(), 0, n)) + } + switch in.Type().Elem().Kind() { + case reflect.Bool, reflect.Float32, reflect.Float64, reflect.Int32, reflect.Int64, + reflect.String, reflect.Uint32, reflect.Uint64: + out.Set(reflect.AppendSlice(out, in)) + default: + for i := 0; i < n; i++ { + x := reflect.Indirect(reflect.New(in.Type().Elem())) + mergeAny(x, in.Index(i), false, nil) + out.Set(reflect.Append(out, x)) + } + } + case reflect.Struct: + mergeStruct(out, in) + default: + // unknown type, so not a protocol buffer + log.Printf("proto: don't know how to copy %v", in) + } +} + +func mergeExtension(out, in map[int32]Extension) { + for extNum, eIn := range in { + eOut := Extension{desc: eIn.desc} + if eIn.value != nil { + v := reflect.New(reflect.TypeOf(eIn.value)).Elem() + mergeAny(v, reflect.ValueOf(eIn.value), false, nil) + eOut.value = v.Interface() + } + if eIn.enc != nil { + eOut.enc = make([]byte, len(eIn.enc)) + copy(eOut.enc, eIn.enc) + } + + out[extNum] = eOut + } +} diff --git a/vendor/github.com/golang/protobuf/proto/decode.go b/vendor/github.com/golang/protobuf/proto/decode.go new file mode 100644 index 000000000..f94b9f416 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/decode.go @@ -0,0 +1,868 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Routines for decoding protocol buffer data to construct in-memory representations. + */ + +import ( + "errors" + "fmt" + "io" + "os" + "reflect" +) + +// errOverflow is returned when an integer is too large to be represented. +var errOverflow = errors.New("proto: integer overflow") + +// ErrInternalBadWireType is returned by generated code when an incorrect +// wire type is encountered. It does not get returned to user code. +var ErrInternalBadWireType = errors.New("proto: internal error: bad wiretype for oneof") + +// The fundamental decoders that interpret bytes on the wire. +// Those that take integer types all return uint64 and are +// therefore of type valueDecoder. + +// DecodeVarint reads a varint-encoded integer from the slice. +// It returns the integer and the number of bytes consumed, or +// zero if there is not enough. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func DecodeVarint(buf []byte) (x uint64, n int) { + // x, n already 0 + for shift := uint(0); shift < 64; shift += 7 { + if n >= len(buf) { + return 0, 0 + } + b := uint64(buf[n]) + n++ + x |= (b & 0x7F) << shift + if (b & 0x80) == 0 { + return x, n + } + } + + // The number is too large to represent in a 64-bit value. + return 0, 0 +} + +// DecodeVarint reads a varint-encoded integer from the Buffer. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func (p *Buffer) DecodeVarint() (x uint64, err error) { + // x, err already 0 + + i := p.index + l := len(p.buf) + + for shift := uint(0); shift < 64; shift += 7 { + if i >= l { + err = io.ErrUnexpectedEOF + return + } + b := p.buf[i] + i++ + x |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + p.index = i + return + } + } + + // The number is too large to represent in a 64-bit value. + err = errOverflow + return +} + +// DecodeFixed64 reads a 64-bit integer from the Buffer. +// This is the format for the +// fixed64, sfixed64, and double protocol buffer types. +func (p *Buffer) DecodeFixed64() (x uint64, err error) { + // x, err already 0 + i := p.index + 8 + if i < 0 || i > len(p.buf) { + err = io.ErrUnexpectedEOF + return + } + p.index = i + + x = uint64(p.buf[i-8]) + x |= uint64(p.buf[i-7]) << 8 + x |= uint64(p.buf[i-6]) << 16 + x |= uint64(p.buf[i-5]) << 24 + x |= uint64(p.buf[i-4]) << 32 + x |= uint64(p.buf[i-3]) << 40 + x |= uint64(p.buf[i-2]) << 48 + x |= uint64(p.buf[i-1]) << 56 + return +} + +// DecodeFixed32 reads a 32-bit integer from the Buffer. +// This is the format for the +// fixed32, sfixed32, and float protocol buffer types. +func (p *Buffer) DecodeFixed32() (x uint64, err error) { + // x, err already 0 + i := p.index + 4 + if i < 0 || i > len(p.buf) { + err = io.ErrUnexpectedEOF + return + } + p.index = i + + x = uint64(p.buf[i-4]) + x |= uint64(p.buf[i-3]) << 8 + x |= uint64(p.buf[i-2]) << 16 + x |= uint64(p.buf[i-1]) << 24 + return +} + +// DecodeZigzag64 reads a zigzag-encoded 64-bit integer +// from the Buffer. +// This is the format used for the sint64 protocol buffer type. +func (p *Buffer) DecodeZigzag64() (x uint64, err error) { + x, err = p.DecodeVarint() + if err != nil { + return + } + x = (x >> 1) ^ uint64((int64(x&1)<<63)>>63) + return +} + +// DecodeZigzag32 reads a zigzag-encoded 32-bit integer +// from the Buffer. +// This is the format used for the sint32 protocol buffer type. +func (p *Buffer) DecodeZigzag32() (x uint64, err error) { + x, err = p.DecodeVarint() + if err != nil { + return + } + x = uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31)) + return +} + +// These are not ValueDecoders: they produce an array of bytes or a string. +// bytes, embedded messages + +// DecodeRawBytes reads a count-delimited byte buffer from the Buffer. +// This is the format used for the bytes protocol buffer +// type and for embedded messages. +func (p *Buffer) DecodeRawBytes(alloc bool) (buf []byte, err error) { + n, err := p.DecodeVarint() + if err != nil { + return nil, err + } + + nb := int(n) + if nb < 0 { + return nil, fmt.Errorf("proto: bad byte length %d", nb) + } + end := p.index + nb + if end < p.index || end > len(p.buf) { + return nil, io.ErrUnexpectedEOF + } + + if !alloc { + // todo: check if can get more uses of alloc=false + buf = p.buf[p.index:end] + p.index += nb + return + } + + buf = make([]byte, nb) + copy(buf, p.buf[p.index:]) + p.index += nb + return +} + +// DecodeStringBytes reads an encoded string from the Buffer. +// This is the format used for the proto2 string type. +func (p *Buffer) DecodeStringBytes() (s string, err error) { + buf, err := p.DecodeRawBytes(false) + if err != nil { + return + } + return string(buf), nil +} + +// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. +// If the protocol buffer has extensions, and the field matches, add it as an extension. +// Otherwise, if the XXX_unrecognized field exists, append the skipped data there. +func (o *Buffer) skipAndSave(t reflect.Type, tag, wire int, base structPointer, unrecField field) error { + oi := o.index + + err := o.skip(t, tag, wire) + if err != nil { + return err + } + + if !unrecField.IsValid() { + return nil + } + + ptr := structPointer_Bytes(base, unrecField) + + // Add the skipped field to struct field + obuf := o.buf + + o.buf = *ptr + o.EncodeVarint(uint64(tag<<3 | wire)) + *ptr = append(o.buf, obuf[oi:o.index]...) + + o.buf = obuf + + return nil +} + +// Skip the next item in the buffer. Its wire type is decoded and presented as an argument. +func (o *Buffer) skip(t reflect.Type, tag, wire int) error { + + var u uint64 + var err error + + switch wire { + case WireVarint: + _, err = o.DecodeVarint() + case WireFixed64: + _, err = o.DecodeFixed64() + case WireBytes: + _, err = o.DecodeRawBytes(false) + case WireFixed32: + _, err = o.DecodeFixed32() + case WireStartGroup: + for { + u, err = o.DecodeVarint() + if err != nil { + break + } + fwire := int(u & 0x7) + if fwire == WireEndGroup { + break + } + ftag := int(u >> 3) + err = o.skip(t, ftag, fwire) + if err != nil { + break + } + } + default: + err = fmt.Errorf("proto: can't skip unknown wire type %d for %s", wire, t) + } + return err +} + +// Unmarshaler is the interface representing objects that can +// unmarshal themselves. The method should reset the receiver before +// decoding starts. The argument points to data that may be +// overwritten, so implementations should not keep references to the +// buffer. +type Unmarshaler interface { + Unmarshal([]byte) error +} + +// Unmarshal parses the protocol buffer representation in buf and places the +// decoded result in pb. If the struct underlying pb does not match +// the data in buf, the results can be unpredictable. +// +// Unmarshal resets pb before starting to unmarshal, so any +// existing data in pb is always removed. Use UnmarshalMerge +// to preserve and append to existing data. +func Unmarshal(buf []byte, pb Message) error { + pb.Reset() + return UnmarshalMerge(buf, pb) +} + +// UnmarshalMerge parses the protocol buffer representation in buf and +// writes the decoded result to pb. If the struct underlying pb does not match +// the data in buf, the results can be unpredictable. +// +// UnmarshalMerge merges into existing data in pb. +// Most code should use Unmarshal instead. +func UnmarshalMerge(buf []byte, pb Message) error { + // If the object can unmarshal itself, let it. + if u, ok := pb.(Unmarshaler); ok { + return u.Unmarshal(buf) + } + return NewBuffer(buf).Unmarshal(pb) +} + +// DecodeMessage reads a count-delimited message from the Buffer. +func (p *Buffer) DecodeMessage(pb Message) error { + enc, err := p.DecodeRawBytes(false) + if err != nil { + return err + } + return NewBuffer(enc).Unmarshal(pb) +} + +// DecodeGroup reads a tag-delimited group from the Buffer. +func (p *Buffer) DecodeGroup(pb Message) error { + typ, base, err := getbase(pb) + if err != nil { + return err + } + return p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), true, base) +} + +// Unmarshal parses the protocol buffer representation in the +// Buffer and places the decoded result in pb. If the struct +// underlying pb does not match the data in the buffer, the results can be +// unpredictable. +func (p *Buffer) Unmarshal(pb Message) error { + // If the object can unmarshal itself, let it. + if u, ok := pb.(Unmarshaler); ok { + err := u.Unmarshal(p.buf[p.index:]) + p.index = len(p.buf) + return err + } + + typ, base, err := getbase(pb) + if err != nil { + return err + } + + err = p.unmarshalType(typ.Elem(), GetProperties(typ.Elem()), false, base) + + if collectStats { + stats.Decode++ + } + + return err +} + +// unmarshalType does the work of unmarshaling a structure. +func (o *Buffer) unmarshalType(st reflect.Type, prop *StructProperties, is_group bool, base structPointer) error { + var state errorState + required, reqFields := prop.reqCount, uint64(0) + + var err error + for err == nil && o.index < len(o.buf) { + oi := o.index + var u uint64 + u, err = o.DecodeVarint() + if err != nil { + break + } + wire := int(u & 0x7) + if wire == WireEndGroup { + if is_group { + return nil // input is satisfied + } + return fmt.Errorf("proto: %s: wiretype end group for non-group", st) + } + tag := int(u >> 3) + if tag <= 0 { + return fmt.Errorf("proto: %s: illegal tag %d (wire type %d)", st, tag, wire) + } + fieldnum, ok := prop.decoderTags.get(tag) + if !ok { + // Maybe it's an extension? + if prop.extendable { + if e := structPointer_Interface(base, st).(extendableProto); isExtensionField(e, int32(tag)) { + if err = o.skip(st, tag, wire); err == nil { + ext := e.ExtensionMap()[int32(tag)] // may be missing + ext.enc = append(ext.enc, o.buf[oi:o.index]...) + e.ExtensionMap()[int32(tag)] = ext + } + continue + } + } + // Maybe it's a oneof? + if prop.oneofUnmarshaler != nil { + m := structPointer_Interface(base, st).(Message) + // First return value indicates whether tag is a oneof field. + ok, err = prop.oneofUnmarshaler(m, tag, wire, o) + if err == ErrInternalBadWireType { + // Map the error to something more descriptive. + // Do the formatting here to save generated code space. + err = fmt.Errorf("bad wiretype for oneof field in %T", m) + } + if ok { + continue + } + } + err = o.skipAndSave(st, tag, wire, base, prop.unrecField) + continue + } + p := prop.Prop[fieldnum] + + if p.dec == nil { + fmt.Fprintf(os.Stderr, "proto: no protobuf decoder for %s.%s\n", st, st.Field(fieldnum).Name) + continue + } + dec := p.dec + if wire != WireStartGroup && wire != p.WireType { + if wire == WireBytes && p.packedDec != nil { + // a packable field + dec = p.packedDec + } else { + err = fmt.Errorf("proto: bad wiretype for field %s.%s: got wiretype %d, want %d", st, st.Field(fieldnum).Name, wire, p.WireType) + continue + } + } + decErr := dec(o, p, base) + if decErr != nil && !state.shouldContinue(decErr, p) { + err = decErr + } + if err == nil && p.Required { + // Successfully decoded a required field. + if tag <= 64 { + // use bitmap for fields 1-64 to catch field reuse. + var mask uint64 = 1 << uint64(tag-1) + if reqFields&mask == 0 { + // new required field + reqFields |= mask + required-- + } + } else { + // This is imprecise. It can be fooled by a required field + // with a tag > 64 that is encoded twice; that's very rare. + // A fully correct implementation would require allocating + // a data structure, which we would like to avoid. + required-- + } + } + } + if err == nil { + if is_group { + return io.ErrUnexpectedEOF + } + if state.err != nil { + return state.err + } + if required > 0 { + // Not enough information to determine the exact field. If we use extra + // CPU, we could determine the field only if the missing required field + // has a tag <= 64 and we check reqFields. + return &RequiredNotSetError{"{Unknown}"} + } + } + return err +} + +// Individual type decoders +// For each, +// u is the decoded value, +// v is a pointer to the field (pointer) in the struct + +// Sizes of the pools to allocate inside the Buffer. +// The goal is modest amortization and allocation +// on at least 16-byte boundaries. +const ( + boolPoolSize = 16 + uint32PoolSize = 8 + uint64PoolSize = 4 +) + +// Decode a bool. +func (o *Buffer) dec_bool(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + if len(o.bools) == 0 { + o.bools = make([]bool, boolPoolSize) + } + o.bools[0] = u != 0 + *structPointer_Bool(base, p.field) = &o.bools[0] + o.bools = o.bools[1:] + return nil +} + +func (o *Buffer) dec_proto3_bool(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + *structPointer_BoolVal(base, p.field) = u != 0 + return nil +} + +// Decode an int32. +func (o *Buffer) dec_int32(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + word32_Set(structPointer_Word32(base, p.field), o, uint32(u)) + return nil +} + +func (o *Buffer) dec_proto3_int32(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + word32Val_Set(structPointer_Word32Val(base, p.field), uint32(u)) + return nil +} + +// Decode an int64. +func (o *Buffer) dec_int64(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + word64_Set(structPointer_Word64(base, p.field), o, u) + return nil +} + +func (o *Buffer) dec_proto3_int64(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + word64Val_Set(structPointer_Word64Val(base, p.field), o, u) + return nil +} + +// Decode a string. +func (o *Buffer) dec_string(p *Properties, base structPointer) error { + s, err := o.DecodeStringBytes() + if err != nil { + return err + } + *structPointer_String(base, p.field) = &s + return nil +} + +func (o *Buffer) dec_proto3_string(p *Properties, base structPointer) error { + s, err := o.DecodeStringBytes() + if err != nil { + return err + } + *structPointer_StringVal(base, p.field) = s + return nil +} + +// Decode a slice of bytes ([]byte). +func (o *Buffer) dec_slice_byte(p *Properties, base structPointer) error { + b, err := o.DecodeRawBytes(true) + if err != nil { + return err + } + *structPointer_Bytes(base, p.field) = b + return nil +} + +// Decode a slice of bools ([]bool). +func (o *Buffer) dec_slice_bool(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + v := structPointer_BoolSlice(base, p.field) + *v = append(*v, u != 0) + return nil +} + +// Decode a slice of bools ([]bool) in packed format. +func (o *Buffer) dec_slice_packed_bool(p *Properties, base structPointer) error { + v := structPointer_BoolSlice(base, p.field) + + nn, err := o.DecodeVarint() + if err != nil { + return err + } + nb := int(nn) // number of bytes of encoded bools + fin := o.index + nb + if fin < o.index { + return errOverflow + } + + y := *v + for o.index < fin { + u, err := p.valDec(o) + if err != nil { + return err + } + y = append(y, u != 0) + } + + *v = y + return nil +} + +// Decode a slice of int32s ([]int32). +func (o *Buffer) dec_slice_int32(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + structPointer_Word32Slice(base, p.field).Append(uint32(u)) + return nil +} + +// Decode a slice of int32s ([]int32) in packed format. +func (o *Buffer) dec_slice_packed_int32(p *Properties, base structPointer) error { + v := structPointer_Word32Slice(base, p.field) + + nn, err := o.DecodeVarint() + if err != nil { + return err + } + nb := int(nn) // number of bytes of encoded int32s + + fin := o.index + nb + if fin < o.index { + return errOverflow + } + for o.index < fin { + u, err := p.valDec(o) + if err != nil { + return err + } + v.Append(uint32(u)) + } + return nil +} + +// Decode a slice of int64s ([]int64). +func (o *Buffer) dec_slice_int64(p *Properties, base structPointer) error { + u, err := p.valDec(o) + if err != nil { + return err + } + + structPointer_Word64Slice(base, p.field).Append(u) + return nil +} + +// Decode a slice of int64s ([]int64) in packed format. +func (o *Buffer) dec_slice_packed_int64(p *Properties, base structPointer) error { + v := structPointer_Word64Slice(base, p.field) + + nn, err := o.DecodeVarint() + if err != nil { + return err + } + nb := int(nn) // number of bytes of encoded int64s + + fin := o.index + nb + if fin < o.index { + return errOverflow + } + for o.index < fin { + u, err := p.valDec(o) + if err != nil { + return err + } + v.Append(u) + } + return nil +} + +// Decode a slice of strings ([]string). +func (o *Buffer) dec_slice_string(p *Properties, base structPointer) error { + s, err := o.DecodeStringBytes() + if err != nil { + return err + } + v := structPointer_StringSlice(base, p.field) + *v = append(*v, s) + return nil +} + +// Decode a slice of slice of bytes ([][]byte). +func (o *Buffer) dec_slice_slice_byte(p *Properties, base structPointer) error { + b, err := o.DecodeRawBytes(true) + if err != nil { + return err + } + v := structPointer_BytesSlice(base, p.field) + *v = append(*v, b) + return nil +} + +// Decode a map field. +func (o *Buffer) dec_new_map(p *Properties, base structPointer) error { + raw, err := o.DecodeRawBytes(false) + if err != nil { + return err + } + oi := o.index // index at the end of this map entry + o.index -= len(raw) // move buffer back to start of map entry + + mptr := structPointer_NewAt(base, p.field, p.mtype) // *map[K]V + if mptr.Elem().IsNil() { + mptr.Elem().Set(reflect.MakeMap(mptr.Type().Elem())) + } + v := mptr.Elem() // map[K]V + + // Prepare addressable doubly-indirect placeholders for the key and value types. + // See enc_new_map for why. + keyptr := reflect.New(reflect.PtrTo(p.mtype.Key())).Elem() // addressable *K + keybase := toStructPointer(keyptr.Addr()) // **K + + var valbase structPointer + var valptr reflect.Value + switch p.mtype.Elem().Kind() { + case reflect.Slice: + // []byte + var dummy []byte + valptr = reflect.ValueOf(&dummy) // *[]byte + valbase = toStructPointer(valptr) // *[]byte + case reflect.Ptr: + // message; valptr is **Msg; need to allocate the intermediate pointer + valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V + valptr.Set(reflect.New(valptr.Type().Elem())) + valbase = toStructPointer(valptr) + default: + // everything else + valptr = reflect.New(reflect.PtrTo(p.mtype.Elem())).Elem() // addressable *V + valbase = toStructPointer(valptr.Addr()) // **V + } + + // Decode. + // This parses a restricted wire format, namely the encoding of a message + // with two fields. See enc_new_map for the format. + for o.index < oi { + // tagcode for key and value properties are always a single byte + // because they have tags 1 and 2. + tagcode := o.buf[o.index] + o.index++ + switch tagcode { + case p.mkeyprop.tagcode[0]: + if err := p.mkeyprop.dec(o, p.mkeyprop, keybase); err != nil { + return err + } + case p.mvalprop.tagcode[0]: + if err := p.mvalprop.dec(o, p.mvalprop, valbase); err != nil { + return err + } + default: + // TODO: Should we silently skip this instead? + return fmt.Errorf("proto: bad map data tag %d", raw[0]) + } + } + keyelem, valelem := keyptr.Elem(), valptr.Elem() + if !keyelem.IsValid() { + keyelem = reflect.Zero(p.mtype.Key()) + } + if !valelem.IsValid() { + valelem = reflect.Zero(p.mtype.Elem()) + } + + v.SetMapIndex(keyelem, valelem) + return nil +} + +// Decode a group. +func (o *Buffer) dec_struct_group(p *Properties, base structPointer) error { + bas := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(bas) { + // allocate new nested message + bas = toStructPointer(reflect.New(p.stype)) + structPointer_SetStructPointer(base, p.field, bas) + } + return o.unmarshalType(p.stype, p.sprop, true, bas) +} + +// Decode an embedded message. +func (o *Buffer) dec_struct_message(p *Properties, base structPointer) (err error) { + raw, e := o.DecodeRawBytes(false) + if e != nil { + return e + } + + bas := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(bas) { + // allocate new nested message + bas = toStructPointer(reflect.New(p.stype)) + structPointer_SetStructPointer(base, p.field, bas) + } + + // If the object can unmarshal itself, let it. + if p.isUnmarshaler { + iv := structPointer_Interface(bas, p.stype) + return iv.(Unmarshaler).Unmarshal(raw) + } + + obuf := o.buf + oi := o.index + o.buf = raw + o.index = 0 + + err = o.unmarshalType(p.stype, p.sprop, false, bas) + o.buf = obuf + o.index = oi + + return err +} + +// Decode a slice of embedded messages. +func (o *Buffer) dec_slice_struct_message(p *Properties, base structPointer) error { + return o.dec_slice_struct(p, false, base) +} + +// Decode a slice of embedded groups. +func (o *Buffer) dec_slice_struct_group(p *Properties, base structPointer) error { + return o.dec_slice_struct(p, true, base) +} + +// Decode a slice of structs ([]*struct). +func (o *Buffer) dec_slice_struct(p *Properties, is_group bool, base structPointer) error { + v := reflect.New(p.stype) + bas := toStructPointer(v) + structPointer_StructPointerSlice(base, p.field).Append(bas) + + if is_group { + err := o.unmarshalType(p.stype, p.sprop, is_group, bas) + return err + } + + raw, err := o.DecodeRawBytes(false) + if err != nil { + return err + } + + // If the object can unmarshal itself, let it. + if p.isUnmarshaler { + iv := v.Interface() + return iv.(Unmarshaler).Unmarshal(raw) + } + + obuf := o.buf + oi := o.index + o.buf = raw + o.index = 0 + + err = o.unmarshalType(p.stype, p.sprop, is_group, bas) + + o.buf = obuf + o.index = oi + + return err +} diff --git a/vendor/github.com/golang/protobuf/proto/encode.go b/vendor/github.com/golang/protobuf/proto/encode.go new file mode 100644 index 000000000..231b07401 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/encode.go @@ -0,0 +1,1325 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Routines for encoding data into the wire format for protocol buffers. + */ + +import ( + "errors" + "fmt" + "reflect" + "sort" +) + +// RequiredNotSetError is the error returned if Marshal is called with +// a protocol buffer struct whose required fields have not +// all been initialized. It is also the error returned if Unmarshal is +// called with an encoded protocol buffer that does not include all the +// required fields. +// +// When printed, RequiredNotSetError reports the first unset required field in a +// message. If the field cannot be precisely determined, it is reported as +// "{Unknown}". +type RequiredNotSetError struct { + field string +} + +func (e *RequiredNotSetError) Error() string { + return fmt.Sprintf("proto: required field %q not set", e.field) +} + +var ( + // errRepeatedHasNil is the error returned if Marshal is called with + // a struct with a repeated field containing a nil element. + errRepeatedHasNil = errors.New("proto: repeated field has nil element") + + // ErrNil is the error returned if Marshal is called with nil. + ErrNil = errors.New("proto: Marshal called with nil") +) + +// The fundamental encoders that put bytes on the wire. +// Those that take integer types all accept uint64 and are +// therefore of type valueEncoder. + +const maxVarintBytes = 10 // maximum length of a varint + +// EncodeVarint returns the varint encoding of x. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +// Not used by the package itself, but helpful to clients +// wishing to use the same encoding. +func EncodeVarint(x uint64) []byte { + var buf [maxVarintBytes]byte + var n int + for n = 0; x > 127; n++ { + buf[n] = 0x80 | uint8(x&0x7F) + x >>= 7 + } + buf[n] = uint8(x) + n++ + return buf[0:n] +} + +// EncodeVarint writes a varint-encoded integer to the Buffer. +// This is the format for the +// int32, int64, uint32, uint64, bool, and enum +// protocol buffer types. +func (p *Buffer) EncodeVarint(x uint64) error { + for x >= 1<<7 { + p.buf = append(p.buf, uint8(x&0x7f|0x80)) + x >>= 7 + } + p.buf = append(p.buf, uint8(x)) + return nil +} + +// SizeVarint returns the varint encoding size of an integer. +func SizeVarint(x uint64) int { + return sizeVarint(x) +} + +func sizeVarint(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} + +// EncodeFixed64 writes a 64-bit integer to the Buffer. +// This is the format for the +// fixed64, sfixed64, and double protocol buffer types. +func (p *Buffer) EncodeFixed64(x uint64) error { + p.buf = append(p.buf, + uint8(x), + uint8(x>>8), + uint8(x>>16), + uint8(x>>24), + uint8(x>>32), + uint8(x>>40), + uint8(x>>48), + uint8(x>>56)) + return nil +} + +func sizeFixed64(x uint64) int { + return 8 +} + +// EncodeFixed32 writes a 32-bit integer to the Buffer. +// This is the format for the +// fixed32, sfixed32, and float protocol buffer types. +func (p *Buffer) EncodeFixed32(x uint64) error { + p.buf = append(p.buf, + uint8(x), + uint8(x>>8), + uint8(x>>16), + uint8(x>>24)) + return nil +} + +func sizeFixed32(x uint64) int { + return 4 +} + +// EncodeZigzag64 writes a zigzag-encoded 64-bit integer +// to the Buffer. +// This is the format used for the sint64 protocol buffer type. +func (p *Buffer) EncodeZigzag64(x uint64) error { + // use signed number to get arithmetic right shift. + return p.EncodeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +func sizeZigzag64(x uint64) int { + return sizeVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} + +// EncodeZigzag32 writes a zigzag-encoded 32-bit integer +// to the Buffer. +// This is the format used for the sint32 protocol buffer type. +func (p *Buffer) EncodeZigzag32(x uint64) error { + // use signed number to get arithmetic right shift. + return p.EncodeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) +} + +func sizeZigzag32(x uint64) int { + return sizeVarint(uint64((uint32(x) << 1) ^ uint32((int32(x) >> 31)))) +} + +// EncodeRawBytes writes a count-delimited byte buffer to the Buffer. +// This is the format used for the bytes protocol buffer +// type and for embedded messages. +func (p *Buffer) EncodeRawBytes(b []byte) error { + p.EncodeVarint(uint64(len(b))) + p.buf = append(p.buf, b...) + return nil +} + +func sizeRawBytes(b []byte) int { + return sizeVarint(uint64(len(b))) + + len(b) +} + +// EncodeStringBytes writes an encoded string to the Buffer. +// This is the format used for the proto2 string type. +func (p *Buffer) EncodeStringBytes(s string) error { + p.EncodeVarint(uint64(len(s))) + p.buf = append(p.buf, s...) + return nil +} + +func sizeStringBytes(s string) int { + return sizeVarint(uint64(len(s))) + + len(s) +} + +// Marshaler is the interface representing objects that can marshal themselves. +type Marshaler interface { + Marshal() ([]byte, error) +} + +// Marshal takes the protocol buffer +// and encodes it into the wire format, returning the data. +func Marshal(pb Message) ([]byte, error) { + // Can the object marshal itself? + if m, ok := pb.(Marshaler); ok { + return m.Marshal() + } + p := NewBuffer(nil) + err := p.Marshal(pb) + var state errorState + if err != nil && !state.shouldContinue(err, nil) { + return nil, err + } + if p.buf == nil && err == nil { + // Return a non-nil slice on success. + return []byte{}, nil + } + return p.buf, err +} + +// EncodeMessage writes the protocol buffer to the Buffer, +// prefixed by a varint-encoded length. +func (p *Buffer) EncodeMessage(pb Message) error { + t, base, err := getbase(pb) + if structPointer_IsNil(base) { + return ErrNil + } + if err == nil { + var state errorState + err = p.enc_len_struct(GetProperties(t.Elem()), base, &state) + } + return err +} + +// Marshal takes the protocol buffer +// and encodes it into the wire format, writing the result to the +// Buffer. +func (p *Buffer) Marshal(pb Message) error { + // Can the object marshal itself? + if m, ok := pb.(Marshaler); ok { + data, err := m.Marshal() + if err != nil { + return err + } + p.buf = append(p.buf, data...) + return nil + } + + t, base, err := getbase(pb) + if structPointer_IsNil(base) { + return ErrNil + } + if err == nil { + err = p.enc_struct(GetProperties(t.Elem()), base) + } + + if collectStats { + stats.Encode++ + } + + return err +} + +// Size returns the encoded size of a protocol buffer. +func Size(pb Message) (n int) { + // Can the object marshal itself? If so, Size is slow. + // TODO: add Size to Marshaler, or add a Sizer interface. + if m, ok := pb.(Marshaler); ok { + b, _ := m.Marshal() + return len(b) + } + + t, base, err := getbase(pb) + if structPointer_IsNil(base) { + return 0 + } + if err == nil { + n = size_struct(GetProperties(t.Elem()), base) + } + + if collectStats { + stats.Size++ + } + + return +} + +// Individual type encoders. + +// Encode a bool. +func (o *Buffer) enc_bool(p *Properties, base structPointer) error { + v := *structPointer_Bool(base, p.field) + if v == nil { + return ErrNil + } + x := 0 + if *v { + x = 1 + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func (o *Buffer) enc_proto3_bool(p *Properties, base structPointer) error { + v := *structPointer_BoolVal(base, p.field) + if !v { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, 1) + return nil +} + +func size_bool(p *Properties, base structPointer) int { + v := *structPointer_Bool(base, p.field) + if v == nil { + return 0 + } + return len(p.tagcode) + 1 // each bool takes exactly one byte +} + +func size_proto3_bool(p *Properties, base structPointer) int { + v := *structPointer_BoolVal(base, p.field) + if !v && !p.oneof { + return 0 + } + return len(p.tagcode) + 1 // each bool takes exactly one byte +} + +// Encode an int32. +func (o *Buffer) enc_int32(p *Properties, base structPointer) error { + v := structPointer_Word32(base, p.field) + if word32_IsNil(v) { + return ErrNil + } + x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func (o *Buffer) enc_proto3_int32(p *Properties, base structPointer) error { + v := structPointer_Word32Val(base, p.field) + x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range + if x == 0 { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func size_int32(p *Properties, base structPointer) (n int) { + v := structPointer_Word32(base, p.field) + if word32_IsNil(v) { + return 0 + } + x := int32(word32_Get(v)) // permit sign extension to use full 64-bit range + n += len(p.tagcode) + n += p.valSize(uint64(x)) + return +} + +func size_proto3_int32(p *Properties, base structPointer) (n int) { + v := structPointer_Word32Val(base, p.field) + x := int32(word32Val_Get(v)) // permit sign extension to use full 64-bit range + if x == 0 && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += p.valSize(uint64(x)) + return +} + +// Encode a uint32. +// Exactly the same as int32, except for no sign extension. +func (o *Buffer) enc_uint32(p *Properties, base structPointer) error { + v := structPointer_Word32(base, p.field) + if word32_IsNil(v) { + return ErrNil + } + x := word32_Get(v) + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func (o *Buffer) enc_proto3_uint32(p *Properties, base structPointer) error { + v := structPointer_Word32Val(base, p.field) + x := word32Val_Get(v) + if x == 0 { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, uint64(x)) + return nil +} + +func size_uint32(p *Properties, base structPointer) (n int) { + v := structPointer_Word32(base, p.field) + if word32_IsNil(v) { + return 0 + } + x := word32_Get(v) + n += len(p.tagcode) + n += p.valSize(uint64(x)) + return +} + +func size_proto3_uint32(p *Properties, base structPointer) (n int) { + v := structPointer_Word32Val(base, p.field) + x := word32Val_Get(v) + if x == 0 && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += p.valSize(uint64(x)) + return +} + +// Encode an int64. +func (o *Buffer) enc_int64(p *Properties, base structPointer) error { + v := structPointer_Word64(base, p.field) + if word64_IsNil(v) { + return ErrNil + } + x := word64_Get(v) + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, x) + return nil +} + +func (o *Buffer) enc_proto3_int64(p *Properties, base structPointer) error { + v := structPointer_Word64Val(base, p.field) + x := word64Val_Get(v) + if x == 0 { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, x) + return nil +} + +func size_int64(p *Properties, base structPointer) (n int) { + v := structPointer_Word64(base, p.field) + if word64_IsNil(v) { + return 0 + } + x := word64_Get(v) + n += len(p.tagcode) + n += p.valSize(x) + return +} + +func size_proto3_int64(p *Properties, base structPointer) (n int) { + v := structPointer_Word64Val(base, p.field) + x := word64Val_Get(v) + if x == 0 && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += p.valSize(x) + return +} + +// Encode a string. +func (o *Buffer) enc_string(p *Properties, base structPointer) error { + v := *structPointer_String(base, p.field) + if v == nil { + return ErrNil + } + x := *v + o.buf = append(o.buf, p.tagcode...) + o.EncodeStringBytes(x) + return nil +} + +func (o *Buffer) enc_proto3_string(p *Properties, base structPointer) error { + v := *structPointer_StringVal(base, p.field) + if v == "" { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeStringBytes(v) + return nil +} + +func size_string(p *Properties, base structPointer) (n int) { + v := *structPointer_String(base, p.field) + if v == nil { + return 0 + } + x := *v + n += len(p.tagcode) + n += sizeStringBytes(x) + return +} + +func size_proto3_string(p *Properties, base structPointer) (n int) { + v := *structPointer_StringVal(base, p.field) + if v == "" && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += sizeStringBytes(v) + return +} + +// All protocol buffer fields are nillable, but be careful. +func isNil(v reflect.Value) bool { + switch v.Kind() { + case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice: + return v.IsNil() + } + return false +} + +// Encode a message struct. +func (o *Buffer) enc_struct_message(p *Properties, base structPointer) error { + var state errorState + structp := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(structp) { + return ErrNil + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, err := m.Marshal() + if err != nil && !state.shouldContinue(err, nil) { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + return state.err + } + + o.buf = append(o.buf, p.tagcode...) + return o.enc_len_struct(p.sprop, structp, &state) +} + +func size_struct_message(p *Properties, base structPointer) int { + structp := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(structp) { + return 0 + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, _ := m.Marshal() + n0 := len(p.tagcode) + n1 := sizeRawBytes(data) + return n0 + n1 + } + + n0 := len(p.tagcode) + n1 := size_struct(p.sprop, structp) + n2 := sizeVarint(uint64(n1)) // size of encoded length + return n0 + n1 + n2 +} + +// Encode a group struct. +func (o *Buffer) enc_struct_group(p *Properties, base structPointer) error { + var state errorState + b := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(b) { + return ErrNil + } + + o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) + err := o.enc_struct(p.sprop, b) + if err != nil && !state.shouldContinue(err, nil) { + return err + } + o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) + return state.err +} + +func size_struct_group(p *Properties, base structPointer) (n int) { + b := structPointer_GetStructPointer(base, p.field) + if structPointer_IsNil(b) { + return 0 + } + + n += sizeVarint(uint64((p.Tag << 3) | WireStartGroup)) + n += size_struct(p.sprop, b) + n += sizeVarint(uint64((p.Tag << 3) | WireEndGroup)) + return +} + +// Encode a slice of bools ([]bool). +func (o *Buffer) enc_slice_bool(p *Properties, base structPointer) error { + s := *structPointer_BoolSlice(base, p.field) + l := len(s) + if l == 0 { + return ErrNil + } + for _, x := range s { + o.buf = append(o.buf, p.tagcode...) + v := uint64(0) + if x { + v = 1 + } + p.valEnc(o, v) + } + return nil +} + +func size_slice_bool(p *Properties, base structPointer) int { + s := *structPointer_BoolSlice(base, p.field) + l := len(s) + if l == 0 { + return 0 + } + return l * (len(p.tagcode) + 1) // each bool takes exactly one byte +} + +// Encode a slice of bools ([]bool) in packed format. +func (o *Buffer) enc_slice_packed_bool(p *Properties, base structPointer) error { + s := *structPointer_BoolSlice(base, p.field) + l := len(s) + if l == 0 { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeVarint(uint64(l)) // each bool takes exactly one byte + for _, x := range s { + v := uint64(0) + if x { + v = 1 + } + p.valEnc(o, v) + } + return nil +} + +func size_slice_packed_bool(p *Properties, base structPointer) (n int) { + s := *structPointer_BoolSlice(base, p.field) + l := len(s) + if l == 0 { + return 0 + } + n += len(p.tagcode) + n += sizeVarint(uint64(l)) + n += l // each bool takes exactly one byte + return +} + +// Encode a slice of bytes ([]byte). +func (o *Buffer) enc_slice_byte(p *Properties, base structPointer) error { + s := *structPointer_Bytes(base, p.field) + if s == nil { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(s) + return nil +} + +func (o *Buffer) enc_proto3_slice_byte(p *Properties, base structPointer) error { + s := *structPointer_Bytes(base, p.field) + if len(s) == 0 { + return ErrNil + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(s) + return nil +} + +func size_slice_byte(p *Properties, base structPointer) (n int) { + s := *structPointer_Bytes(base, p.field) + if s == nil && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += sizeRawBytes(s) + return +} + +func size_proto3_slice_byte(p *Properties, base structPointer) (n int) { + s := *structPointer_Bytes(base, p.field) + if len(s) == 0 && !p.oneof { + return 0 + } + n += len(p.tagcode) + n += sizeRawBytes(s) + return +} + +// Encode a slice of int32s ([]int32). +func (o *Buffer) enc_slice_int32(p *Properties, base structPointer) error { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + for i := 0; i < l; i++ { + o.buf = append(o.buf, p.tagcode...) + x := int32(s.Index(i)) // permit sign extension to use full 64-bit range + p.valEnc(o, uint64(x)) + } + return nil +} + +func size_slice_int32(p *Properties, base structPointer) (n int) { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + for i := 0; i < l; i++ { + n += len(p.tagcode) + x := int32(s.Index(i)) // permit sign extension to use full 64-bit range + n += p.valSize(uint64(x)) + } + return +} + +// Encode a slice of int32s ([]int32) in packed format. +func (o *Buffer) enc_slice_packed_int32(p *Properties, base structPointer) error { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + // TODO: Reuse a Buffer. + buf := NewBuffer(nil) + for i := 0; i < l; i++ { + x := int32(s.Index(i)) // permit sign extension to use full 64-bit range + p.valEnc(buf, uint64(x)) + } + + o.buf = append(o.buf, p.tagcode...) + o.EncodeVarint(uint64(len(buf.buf))) + o.buf = append(o.buf, buf.buf...) + return nil +} + +func size_slice_packed_int32(p *Properties, base structPointer) (n int) { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + var bufSize int + for i := 0; i < l; i++ { + x := int32(s.Index(i)) // permit sign extension to use full 64-bit range + bufSize += p.valSize(uint64(x)) + } + + n += len(p.tagcode) + n += sizeVarint(uint64(bufSize)) + n += bufSize + return +} + +// Encode a slice of uint32s ([]uint32). +// Exactly the same as int32, except for no sign extension. +func (o *Buffer) enc_slice_uint32(p *Properties, base structPointer) error { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + for i := 0; i < l; i++ { + o.buf = append(o.buf, p.tagcode...) + x := s.Index(i) + p.valEnc(o, uint64(x)) + } + return nil +} + +func size_slice_uint32(p *Properties, base structPointer) (n int) { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + for i := 0; i < l; i++ { + n += len(p.tagcode) + x := s.Index(i) + n += p.valSize(uint64(x)) + } + return +} + +// Encode a slice of uint32s ([]uint32) in packed format. +// Exactly the same as int32, except for no sign extension. +func (o *Buffer) enc_slice_packed_uint32(p *Properties, base structPointer) error { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + // TODO: Reuse a Buffer. + buf := NewBuffer(nil) + for i := 0; i < l; i++ { + p.valEnc(buf, uint64(s.Index(i))) + } + + o.buf = append(o.buf, p.tagcode...) + o.EncodeVarint(uint64(len(buf.buf))) + o.buf = append(o.buf, buf.buf...) + return nil +} + +func size_slice_packed_uint32(p *Properties, base structPointer) (n int) { + s := structPointer_Word32Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + var bufSize int + for i := 0; i < l; i++ { + bufSize += p.valSize(uint64(s.Index(i))) + } + + n += len(p.tagcode) + n += sizeVarint(uint64(bufSize)) + n += bufSize + return +} + +// Encode a slice of int64s ([]int64). +func (o *Buffer) enc_slice_int64(p *Properties, base structPointer) error { + s := structPointer_Word64Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + for i := 0; i < l; i++ { + o.buf = append(o.buf, p.tagcode...) + p.valEnc(o, s.Index(i)) + } + return nil +} + +func size_slice_int64(p *Properties, base structPointer) (n int) { + s := structPointer_Word64Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + for i := 0; i < l; i++ { + n += len(p.tagcode) + n += p.valSize(s.Index(i)) + } + return +} + +// Encode a slice of int64s ([]int64) in packed format. +func (o *Buffer) enc_slice_packed_int64(p *Properties, base structPointer) error { + s := structPointer_Word64Slice(base, p.field) + l := s.Len() + if l == 0 { + return ErrNil + } + // TODO: Reuse a Buffer. + buf := NewBuffer(nil) + for i := 0; i < l; i++ { + p.valEnc(buf, s.Index(i)) + } + + o.buf = append(o.buf, p.tagcode...) + o.EncodeVarint(uint64(len(buf.buf))) + o.buf = append(o.buf, buf.buf...) + return nil +} + +func size_slice_packed_int64(p *Properties, base structPointer) (n int) { + s := structPointer_Word64Slice(base, p.field) + l := s.Len() + if l == 0 { + return 0 + } + var bufSize int + for i := 0; i < l; i++ { + bufSize += p.valSize(s.Index(i)) + } + + n += len(p.tagcode) + n += sizeVarint(uint64(bufSize)) + n += bufSize + return +} + +// Encode a slice of slice of bytes ([][]byte). +func (o *Buffer) enc_slice_slice_byte(p *Properties, base structPointer) error { + ss := *structPointer_BytesSlice(base, p.field) + l := len(ss) + if l == 0 { + return ErrNil + } + for i := 0; i < l; i++ { + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(ss[i]) + } + return nil +} + +func size_slice_slice_byte(p *Properties, base structPointer) (n int) { + ss := *structPointer_BytesSlice(base, p.field) + l := len(ss) + if l == 0 { + return 0 + } + n += l * len(p.tagcode) + for i := 0; i < l; i++ { + n += sizeRawBytes(ss[i]) + } + return +} + +// Encode a slice of strings ([]string). +func (o *Buffer) enc_slice_string(p *Properties, base structPointer) error { + ss := *structPointer_StringSlice(base, p.field) + l := len(ss) + for i := 0; i < l; i++ { + o.buf = append(o.buf, p.tagcode...) + o.EncodeStringBytes(ss[i]) + } + return nil +} + +func size_slice_string(p *Properties, base structPointer) (n int) { + ss := *structPointer_StringSlice(base, p.field) + l := len(ss) + n += l * len(p.tagcode) + for i := 0; i < l; i++ { + n += sizeStringBytes(ss[i]) + } + return +} + +// Encode a slice of message structs ([]*struct). +func (o *Buffer) enc_slice_struct_message(p *Properties, base structPointer) error { + var state errorState + s := structPointer_StructPointerSlice(base, p.field) + l := s.Len() + + for i := 0; i < l; i++ { + structp := s.Index(i) + if structPointer_IsNil(structp) { + return errRepeatedHasNil + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, err := m.Marshal() + if err != nil && !state.shouldContinue(err, nil) { + return err + } + o.buf = append(o.buf, p.tagcode...) + o.EncodeRawBytes(data) + continue + } + + o.buf = append(o.buf, p.tagcode...) + err := o.enc_len_struct(p.sprop, structp, &state) + if err != nil && !state.shouldContinue(err, nil) { + if err == ErrNil { + return errRepeatedHasNil + } + return err + } + } + return state.err +} + +func size_slice_struct_message(p *Properties, base structPointer) (n int) { + s := structPointer_StructPointerSlice(base, p.field) + l := s.Len() + n += l * len(p.tagcode) + for i := 0; i < l; i++ { + structp := s.Index(i) + if structPointer_IsNil(structp) { + return // return the size up to this point + } + + // Can the object marshal itself? + if p.isMarshaler { + m := structPointer_Interface(structp, p.stype).(Marshaler) + data, _ := m.Marshal() + n += len(p.tagcode) + n += sizeRawBytes(data) + continue + } + + n0 := size_struct(p.sprop, structp) + n1 := sizeVarint(uint64(n0)) // size of encoded length + n += n0 + n1 + } + return +} + +// Encode a slice of group structs ([]*struct). +func (o *Buffer) enc_slice_struct_group(p *Properties, base structPointer) error { + var state errorState + s := structPointer_StructPointerSlice(base, p.field) + l := s.Len() + + for i := 0; i < l; i++ { + b := s.Index(i) + if structPointer_IsNil(b) { + return errRepeatedHasNil + } + + o.EncodeVarint(uint64((p.Tag << 3) | WireStartGroup)) + + err := o.enc_struct(p.sprop, b) + + if err != nil && !state.shouldContinue(err, nil) { + if err == ErrNil { + return errRepeatedHasNil + } + return err + } + + o.EncodeVarint(uint64((p.Tag << 3) | WireEndGroup)) + } + return state.err +} + +func size_slice_struct_group(p *Properties, base structPointer) (n int) { + s := structPointer_StructPointerSlice(base, p.field) + l := s.Len() + + n += l * sizeVarint(uint64((p.Tag<<3)|WireStartGroup)) + n += l * sizeVarint(uint64((p.Tag<<3)|WireEndGroup)) + for i := 0; i < l; i++ { + b := s.Index(i) + if structPointer_IsNil(b) { + return // return size up to this point + } + + n += size_struct(p.sprop, b) + } + return +} + +// Encode an extension map. +func (o *Buffer) enc_map(p *Properties, base structPointer) error { + v := *structPointer_ExtMap(base, p.field) + if err := encodeExtensionMap(v); err != nil { + return err + } + // Fast-path for common cases: zero or one extensions. + if len(v) <= 1 { + for _, e := range v { + o.buf = append(o.buf, e.enc...) + } + return nil + } + + // Sort keys to provide a deterministic encoding. + keys := make([]int, 0, len(v)) + for k := range v { + keys = append(keys, int(k)) + } + sort.Ints(keys) + + for _, k := range keys { + o.buf = append(o.buf, v[int32(k)].enc...) + } + return nil +} + +func size_map(p *Properties, base structPointer) int { + v := *structPointer_ExtMap(base, p.field) + return sizeExtensionMap(v) +} + +// Encode a map field. +func (o *Buffer) enc_new_map(p *Properties, base structPointer) error { + var state errorState // XXX: or do we need to plumb this through? + + /* + A map defined as + map map_field = N; + is encoded in the same way as + message MapFieldEntry { + key_type key = 1; + value_type value = 2; + } + repeated MapFieldEntry map_field = N; + */ + + v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V + if v.Len() == 0 { + return nil + } + + keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) + + enc := func() error { + if err := p.mkeyprop.enc(o, p.mkeyprop, keybase); err != nil { + return err + } + if err := p.mvalprop.enc(o, p.mvalprop, valbase); err != nil { + return err + } + return nil + } + + // Don't sort map keys. It is not required by the spec, and C++ doesn't do it. + for _, key := range v.MapKeys() { + val := v.MapIndex(key) + + // The only illegal map entry values are nil message pointers. + if val.Kind() == reflect.Ptr && val.IsNil() { + return errors.New("proto: map has nil element") + } + + keycopy.Set(key) + valcopy.Set(val) + + o.buf = append(o.buf, p.tagcode...) + if err := o.enc_len_thing(enc, &state); err != nil { + return err + } + } + return nil +} + +func size_new_map(p *Properties, base structPointer) int { + v := structPointer_NewAt(base, p.field, p.mtype).Elem() // map[K]V + + keycopy, valcopy, keybase, valbase := mapEncodeScratch(p.mtype) + + n := 0 + for _, key := range v.MapKeys() { + val := v.MapIndex(key) + keycopy.Set(key) + valcopy.Set(val) + + // Tag codes for key and val are the responsibility of the sub-sizer. + keysize := p.mkeyprop.size(p.mkeyprop, keybase) + valsize := p.mvalprop.size(p.mvalprop, valbase) + entry := keysize + valsize + // Add on tag code and length of map entry itself. + n += len(p.tagcode) + sizeVarint(uint64(entry)) + entry + } + return n +} + +// mapEncodeScratch returns a new reflect.Value matching the map's value type, +// and a structPointer suitable for passing to an encoder or sizer. +func mapEncodeScratch(mapType reflect.Type) (keycopy, valcopy reflect.Value, keybase, valbase structPointer) { + // Prepare addressable doubly-indirect placeholders for the key and value types. + // This is needed because the element-type encoders expect **T, but the map iteration produces T. + + keycopy = reflect.New(mapType.Key()).Elem() // addressable K + keyptr := reflect.New(reflect.PtrTo(keycopy.Type())).Elem() // addressable *K + keyptr.Set(keycopy.Addr()) // + keybase = toStructPointer(keyptr.Addr()) // **K + + // Value types are more varied and require special handling. + switch mapType.Elem().Kind() { + case reflect.Slice: + // []byte + var dummy []byte + valcopy = reflect.ValueOf(&dummy).Elem() // addressable []byte + valbase = toStructPointer(valcopy.Addr()) + case reflect.Ptr: + // message; the generated field type is map[K]*Msg (so V is *Msg), + // so we only need one level of indirection. + valcopy = reflect.New(mapType.Elem()).Elem() // addressable V + valbase = toStructPointer(valcopy.Addr()) + default: + // everything else + valcopy = reflect.New(mapType.Elem()).Elem() // addressable V + valptr := reflect.New(reflect.PtrTo(valcopy.Type())).Elem() // addressable *V + valptr.Set(valcopy.Addr()) // + valbase = toStructPointer(valptr.Addr()) // **V + } + return +} + +// Encode a struct. +func (o *Buffer) enc_struct(prop *StructProperties, base structPointer) error { + var state errorState + // Encode fields in tag order so that decoders may use optimizations + // that depend on the ordering. + // https://developers.google.com/protocol-buffers/docs/encoding#order + for _, i := range prop.order { + p := prop.Prop[i] + if p.enc != nil { + err := p.enc(o, p, base) + if err != nil { + if err == ErrNil { + if p.Required && state.err == nil { + state.err = &RequiredNotSetError{p.Name} + } + } else if err == errRepeatedHasNil { + // Give more context to nil values in repeated fields. + return errors.New("repeated field " + p.OrigName + " has nil element") + } else if !state.shouldContinue(err, p) { + return err + } + } + } + } + + // Do oneof fields. + if prop.oneofMarshaler != nil { + m := structPointer_Interface(base, prop.stype).(Message) + if err := prop.oneofMarshaler(m, o); err != nil { + return err + } + } + + // Add unrecognized fields at the end. + if prop.unrecField.IsValid() { + v := *structPointer_Bytes(base, prop.unrecField) + if len(v) > 0 { + o.buf = append(o.buf, v...) + } + } + + return state.err +} + +func size_struct(prop *StructProperties, base structPointer) (n int) { + for _, i := range prop.order { + p := prop.Prop[i] + if p.size != nil { + n += p.size(p, base) + } + } + + // Add unrecognized fields at the end. + if prop.unrecField.IsValid() { + v := *structPointer_Bytes(base, prop.unrecField) + n += len(v) + } + + // Factor in any oneof fields. + if prop.oneofSizer != nil { + m := structPointer_Interface(base, prop.stype).(Message) + n += prop.oneofSizer(m) + } + + return +} + +var zeroes [20]byte // longer than any conceivable sizeVarint + +// Encode a struct, preceded by its encoded length (as a varint). +func (o *Buffer) enc_len_struct(prop *StructProperties, base structPointer, state *errorState) error { + return o.enc_len_thing(func() error { return o.enc_struct(prop, base) }, state) +} + +// Encode something, preceded by its encoded length (as a varint). +func (o *Buffer) enc_len_thing(enc func() error, state *errorState) error { + iLen := len(o.buf) + o.buf = append(o.buf, 0, 0, 0, 0) // reserve four bytes for length + iMsg := len(o.buf) + err := enc() + if err != nil && !state.shouldContinue(err, nil) { + return err + } + lMsg := len(o.buf) - iMsg + lLen := sizeVarint(uint64(lMsg)) + switch x := lLen - (iMsg - iLen); { + case x > 0: // actual length is x bytes larger than the space we reserved + // Move msg x bytes right. + o.buf = append(o.buf, zeroes[:x]...) + copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) + case x < 0: // actual length is x bytes smaller than the space we reserved + // Move msg x bytes left. + copy(o.buf[iMsg+x:], o.buf[iMsg:iMsg+lMsg]) + o.buf = o.buf[:len(o.buf)+x] // x is negative + } + // Encode the length in the reserved space. + o.buf = o.buf[:iLen] + o.EncodeVarint(uint64(lMsg)) + o.buf = o.buf[:len(o.buf)+lMsg] + return state.err +} + +// errorState maintains the first error that occurs and updates that error +// with additional context. +type errorState struct { + err error +} + +// shouldContinue reports whether encoding should continue upon encountering the +// given error. If the error is RequiredNotSetError, shouldContinue returns true +// and, if this is the first appearance of that error, remembers it for future +// reporting. +// +// If prop is not nil, it may update any error with additional context about the +// field with the error. +func (s *errorState) shouldContinue(err error, prop *Properties) bool { + // Ignore unset required fields. + reqNotSet, ok := err.(*RequiredNotSetError) + if !ok { + return false + } + if s.err == nil { + if prop != nil { + err = &RequiredNotSetError{prop.Name + "." + reqNotSet.field} + } + s.err = err + } + return true +} diff --git a/vendor/github.com/golang/protobuf/proto/equal.go b/vendor/github.com/golang/protobuf/proto/equal.go new file mode 100644 index 000000000..f5db1def3 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/equal.go @@ -0,0 +1,276 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2011 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Protocol buffer comparison. + +package proto + +import ( + "bytes" + "log" + "reflect" + "strings" +) + +/* +Equal returns true iff protocol buffers a and b are equal. +The arguments must both be pointers to protocol buffer structs. + +Equality is defined in this way: + - Two messages are equal iff they are the same type, + corresponding fields are equal, unknown field sets + are equal, and extensions sets are equal. + - Two set scalar fields are equal iff their values are equal. + If the fields are of a floating-point type, remember that + NaN != x for all x, including NaN. If the message is defined + in a proto3 .proto file, fields are not "set"; specifically, + zero length proto3 "bytes" fields are equal (nil == {}). + - Two repeated fields are equal iff their lengths are the same, + and their corresponding elements are equal (a "bytes" field, + although represented by []byte, is not a repeated field) + - Two unset fields are equal. + - Two unknown field sets are equal if their current + encoded state is equal. + - Two extension sets are equal iff they have corresponding + elements that are pairwise equal. + - Every other combination of things are not equal. + +The return value is undefined if a and b are not protocol buffers. +*/ +func Equal(a, b Message) bool { + if a == nil || b == nil { + return a == b + } + v1, v2 := reflect.ValueOf(a), reflect.ValueOf(b) + if v1.Type() != v2.Type() { + return false + } + if v1.Kind() == reflect.Ptr { + if v1.IsNil() { + return v2.IsNil() + } + if v2.IsNil() { + return false + } + v1, v2 = v1.Elem(), v2.Elem() + } + if v1.Kind() != reflect.Struct { + return false + } + return equalStruct(v1, v2) +} + +// v1 and v2 are known to have the same type. +func equalStruct(v1, v2 reflect.Value) bool { + sprop := GetProperties(v1.Type()) + for i := 0; i < v1.NumField(); i++ { + f := v1.Type().Field(i) + if strings.HasPrefix(f.Name, "XXX_") { + continue + } + f1, f2 := v1.Field(i), v2.Field(i) + if f.Type.Kind() == reflect.Ptr { + if n1, n2 := f1.IsNil(), f2.IsNil(); n1 && n2 { + // both unset + continue + } else if n1 != n2 { + // set/unset mismatch + return false + } + b1, ok := f1.Interface().(raw) + if ok { + b2 := f2.Interface().(raw) + // RawMessage + if !bytes.Equal(b1.Bytes(), b2.Bytes()) { + return false + } + continue + } + f1, f2 = f1.Elem(), f2.Elem() + } + if !equalAny(f1, f2, sprop.Prop[i]) { + return false + } + } + + if em1 := v1.FieldByName("XXX_extensions"); em1.IsValid() { + em2 := v2.FieldByName("XXX_extensions") + if !equalExtensions(v1.Type(), em1.Interface().(map[int32]Extension), em2.Interface().(map[int32]Extension)) { + return false + } + } + + uf := v1.FieldByName("XXX_unrecognized") + if !uf.IsValid() { + return true + } + + u1 := uf.Bytes() + u2 := v2.FieldByName("XXX_unrecognized").Bytes() + if !bytes.Equal(u1, u2) { + return false + } + + return true +} + +// v1 and v2 are known to have the same type. +// prop may be nil. +func equalAny(v1, v2 reflect.Value, prop *Properties) bool { + if v1.Type() == protoMessageType { + m1, _ := v1.Interface().(Message) + m2, _ := v2.Interface().(Message) + return Equal(m1, m2) + } + switch v1.Kind() { + case reflect.Bool: + return v1.Bool() == v2.Bool() + case reflect.Float32, reflect.Float64: + return v1.Float() == v2.Float() + case reflect.Int32, reflect.Int64: + return v1.Int() == v2.Int() + case reflect.Interface: + // Probably a oneof field; compare the inner values. + n1, n2 := v1.IsNil(), v2.IsNil() + if n1 || n2 { + return n1 == n2 + } + e1, e2 := v1.Elem(), v2.Elem() + if e1.Type() != e2.Type() { + return false + } + return equalAny(e1, e2, nil) + case reflect.Map: + if v1.Len() != v2.Len() { + return false + } + for _, key := range v1.MapKeys() { + val2 := v2.MapIndex(key) + if !val2.IsValid() { + // This key was not found in the second map. + return false + } + if !equalAny(v1.MapIndex(key), val2, nil) { + return false + } + } + return true + case reflect.Ptr: + return equalAny(v1.Elem(), v2.Elem(), prop) + case reflect.Slice: + if v1.Type().Elem().Kind() == reflect.Uint8 { + // short circuit: []byte + + // Edge case: if this is in a proto3 message, a zero length + // bytes field is considered the zero value. + if prop != nil && prop.proto3 && v1.Len() == 0 && v2.Len() == 0 { + return true + } + if v1.IsNil() != v2.IsNil() { + return false + } + return bytes.Equal(v1.Interface().([]byte), v2.Interface().([]byte)) + } + + if v1.Len() != v2.Len() { + return false + } + for i := 0; i < v1.Len(); i++ { + if !equalAny(v1.Index(i), v2.Index(i), prop) { + return false + } + } + return true + case reflect.String: + return v1.Interface().(string) == v2.Interface().(string) + case reflect.Struct: + return equalStruct(v1, v2) + case reflect.Uint32, reflect.Uint64: + return v1.Uint() == v2.Uint() + } + + // unknown type, so not a protocol buffer + log.Printf("proto: don't know how to compare %v", v1) + return false +} + +// base is the struct type that the extensions are based on. +// em1 and em2 are extension maps. +func equalExtensions(base reflect.Type, em1, em2 map[int32]Extension) bool { + if len(em1) != len(em2) { + return false + } + + for extNum, e1 := range em1 { + e2, ok := em2[extNum] + if !ok { + return false + } + + m1, m2 := e1.value, e2.value + + if m1 != nil && m2 != nil { + // Both are unencoded. + if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) { + return false + } + continue + } + + // At least one is encoded. To do a semantically correct comparison + // we need to unmarshal them first. + var desc *ExtensionDesc + if m := extensionMaps[base]; m != nil { + desc = m[extNum] + } + if desc == nil { + log.Printf("proto: don't know how to compare extension %d of %v", extNum, base) + continue + } + var err error + if m1 == nil { + m1, err = decodeExtension(e1.enc, desc) + } + if m2 == nil && err == nil { + m2, err = decodeExtension(e2.enc, desc) + } + if err != nil { + // The encoded form is invalid. + log.Printf("proto: badly encoded extension %d of %v: %v", extNum, base, err) + return false + } + if !equalAny(reflect.ValueOf(m1), reflect.ValueOf(m2), nil) { + return false + } + } + + return true +} diff --git a/vendor/github.com/golang/protobuf/proto/extensions.go b/vendor/github.com/golang/protobuf/proto/extensions.go new file mode 100644 index 000000000..054f4f1df --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/extensions.go @@ -0,0 +1,399 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Types and routines for supporting protocol buffer extensions. + */ + +import ( + "errors" + "fmt" + "reflect" + "strconv" + "sync" +) + +// ErrMissingExtension is the error returned by GetExtension if the named extension is not in the message. +var ErrMissingExtension = errors.New("proto: missing extension") + +// ExtensionRange represents a range of message extensions for a protocol buffer. +// Used in code generated by the protocol compiler. +type ExtensionRange struct { + Start, End int32 // both inclusive +} + +// extendableProto is an interface implemented by any protocol buffer that may be extended. +type extendableProto interface { + Message + ExtensionRangeArray() []ExtensionRange + ExtensionMap() map[int32]Extension +} + +var extendableProtoType = reflect.TypeOf((*extendableProto)(nil)).Elem() + +// ExtensionDesc represents an extension specification. +// Used in generated code from the protocol compiler. +type ExtensionDesc struct { + ExtendedType Message // nil pointer to the type that is being extended + ExtensionType interface{} // nil pointer to the extension type + Field int32 // field number + Name string // fully-qualified name of extension, for text formatting + Tag string // protobuf tag style +} + +func (ed *ExtensionDesc) repeated() bool { + t := reflect.TypeOf(ed.ExtensionType) + return t.Kind() == reflect.Slice && t.Elem().Kind() != reflect.Uint8 +} + +// Extension represents an extension in a message. +type Extension struct { + // When an extension is stored in a message using SetExtension + // only desc and value are set. When the message is marshaled + // enc will be set to the encoded form of the message. + // + // When a message is unmarshaled and contains extensions, each + // extension will have only enc set. When such an extension is + // accessed using GetExtension (or GetExtensions) desc and value + // will be set. + desc *ExtensionDesc + value interface{} + enc []byte +} + +// SetRawExtension is for testing only. +func SetRawExtension(base extendableProto, id int32, b []byte) { + base.ExtensionMap()[id] = Extension{enc: b} +} + +// isExtensionField returns true iff the given field number is in an extension range. +func isExtensionField(pb extendableProto, field int32) bool { + for _, er := range pb.ExtensionRangeArray() { + if er.Start <= field && field <= er.End { + return true + } + } + return false +} + +// checkExtensionTypes checks that the given extension is valid for pb. +func checkExtensionTypes(pb extendableProto, extension *ExtensionDesc) error { + // Check the extended type. + if a, b := reflect.TypeOf(pb), reflect.TypeOf(extension.ExtendedType); a != b { + return errors.New("proto: bad extended type; " + b.String() + " does not extend " + a.String()) + } + // Check the range. + if !isExtensionField(pb, extension.Field) { + return errors.New("proto: bad extension number; not in declared ranges") + } + return nil +} + +// extPropKey is sufficient to uniquely identify an extension. +type extPropKey struct { + base reflect.Type + field int32 +} + +var extProp = struct { + sync.RWMutex + m map[extPropKey]*Properties +}{ + m: make(map[extPropKey]*Properties), +} + +func extensionProperties(ed *ExtensionDesc) *Properties { + key := extPropKey{base: reflect.TypeOf(ed.ExtendedType), field: ed.Field} + + extProp.RLock() + if prop, ok := extProp.m[key]; ok { + extProp.RUnlock() + return prop + } + extProp.RUnlock() + + extProp.Lock() + defer extProp.Unlock() + // Check again. + if prop, ok := extProp.m[key]; ok { + return prop + } + + prop := new(Properties) + prop.Init(reflect.TypeOf(ed.ExtensionType), "unknown_name", ed.Tag, nil) + extProp.m[key] = prop + return prop +} + +// encodeExtensionMap encodes any unmarshaled (unencoded) extensions in m. +func encodeExtensionMap(m map[int32]Extension) error { + for k, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + et := reflect.TypeOf(e.desc.ExtensionType) + props := extensionProperties(e.desc) + + p := NewBuffer(nil) + // If e.value has type T, the encoder expects a *struct{ X T }. + // Pass a *T with a zero field and hope it all works out. + x := reflect.New(et) + x.Elem().Set(reflect.ValueOf(e.value)) + if err := props.enc(p, props, toStructPointer(x)); err != nil { + return err + } + e.enc = p.buf + m[k] = e + } + return nil +} + +func sizeExtensionMap(m map[int32]Extension) (n int) { + for _, e := range m { + if e.value == nil || e.desc == nil { + // Extension is only in its encoded form. + n += len(e.enc) + continue + } + + // We don't skip extensions that have an encoded form set, + // because the extension value may have been mutated after + // the last time this function was called. + + et := reflect.TypeOf(e.desc.ExtensionType) + props := extensionProperties(e.desc) + + // If e.value has type T, the encoder expects a *struct{ X T }. + // Pass a *T with a zero field and hope it all works out. + x := reflect.New(et) + x.Elem().Set(reflect.ValueOf(e.value)) + n += props.size(props, toStructPointer(x)) + } + return +} + +// HasExtension returns whether the given extension is present in pb. +func HasExtension(pb extendableProto, extension *ExtensionDesc) bool { + // TODO: Check types, field numbers, etc.? + _, ok := pb.ExtensionMap()[extension.Field] + return ok +} + +// ClearExtension removes the given extension from pb. +func ClearExtension(pb extendableProto, extension *ExtensionDesc) { + // TODO: Check types, field numbers, etc.? + delete(pb.ExtensionMap(), extension.Field) +} + +// GetExtension parses and returns the given extension of pb. +// If the extension is not present and has no default value it returns ErrMissingExtension. +func GetExtension(pb extendableProto, extension *ExtensionDesc) (interface{}, error) { + if err := checkExtensionTypes(pb, extension); err != nil { + return nil, err + } + + emap := pb.ExtensionMap() + e, ok := emap[extension.Field] + if !ok { + // defaultExtensionValue returns the default value or + // ErrMissingExtension if there is no default. + return defaultExtensionValue(extension) + } + + if e.value != nil { + // Already decoded. Check the descriptor, though. + if e.desc != extension { + // This shouldn't happen. If it does, it means that + // GetExtension was called twice with two different + // descriptors with the same field number. + return nil, errors.New("proto: descriptor conflict") + } + return e.value, nil + } + + v, err := decodeExtension(e.enc, extension) + if err != nil { + return nil, err + } + + // Remember the decoded version and drop the encoded version. + // That way it is safe to mutate what we return. + e.value = v + e.desc = extension + e.enc = nil + emap[extension.Field] = e + return e.value, nil +} + +// defaultExtensionValue returns the default value for extension. +// If no default for an extension is defined ErrMissingExtension is returned. +func defaultExtensionValue(extension *ExtensionDesc) (interface{}, error) { + t := reflect.TypeOf(extension.ExtensionType) + props := extensionProperties(extension) + + sf, _, err := fieldDefault(t, props) + if err != nil { + return nil, err + } + + if sf == nil || sf.value == nil { + // There is no default value. + return nil, ErrMissingExtension + } + + if t.Kind() != reflect.Ptr { + // We do not need to return a Ptr, we can directly return sf.value. + return sf.value, nil + } + + // We need to return an interface{} that is a pointer to sf.value. + value := reflect.New(t).Elem() + value.Set(reflect.New(value.Type().Elem())) + if sf.kind == reflect.Int32 { + // We may have an int32 or an enum, but the underlying data is int32. + // Since we can't set an int32 into a non int32 reflect.value directly + // set it as a int32. + value.Elem().SetInt(int64(sf.value.(int32))) + } else { + value.Elem().Set(reflect.ValueOf(sf.value)) + } + return value.Interface(), nil +} + +// decodeExtension decodes an extension encoded in b. +func decodeExtension(b []byte, extension *ExtensionDesc) (interface{}, error) { + o := NewBuffer(b) + + t := reflect.TypeOf(extension.ExtensionType) + + props := extensionProperties(extension) + + // t is a pointer to a struct, pointer to basic type or a slice. + // Allocate a "field" to store the pointer/slice itself; the + // pointer/slice will be stored here. We pass + // the address of this field to props.dec. + // This passes a zero field and a *t and lets props.dec + // interpret it as a *struct{ x t }. + value := reflect.New(t).Elem() + + for { + // Discard wire type and field number varint. It isn't needed. + if _, err := o.DecodeVarint(); err != nil { + return nil, err + } + + if err := props.dec(o, props, toStructPointer(value.Addr())); err != nil { + return nil, err + } + + if o.index >= len(o.buf) { + break + } + } + return value.Interface(), nil +} + +// GetExtensions returns a slice of the extensions present in pb that are also listed in es. +// The returned slice has the same length as es; missing extensions will appear as nil elements. +func GetExtensions(pb Message, es []*ExtensionDesc) (extensions []interface{}, err error) { + epb, ok := pb.(extendableProto) + if !ok { + err = errors.New("proto: not an extendable proto") + return + } + extensions = make([]interface{}, len(es)) + for i, e := range es { + extensions[i], err = GetExtension(epb, e) + if err == ErrMissingExtension { + err = nil + } + if err != nil { + return + } + } + return +} + +// SetExtension sets the specified extension of pb to the specified value. +func SetExtension(pb extendableProto, extension *ExtensionDesc, value interface{}) error { + if err := checkExtensionTypes(pb, extension); err != nil { + return err + } + typ := reflect.TypeOf(extension.ExtensionType) + if typ != reflect.TypeOf(value) { + return errors.New("proto: bad extension value type") + } + // nil extension values need to be caught early, because the + // encoder can't distinguish an ErrNil due to a nil extension + // from an ErrNil due to a missing field. Extensions are + // always optional, so the encoder would just swallow the error + // and drop all the extensions from the encoded message. + if reflect.ValueOf(value).IsNil() { + return fmt.Errorf("proto: SetExtension called with nil value of type %T", value) + } + + pb.ExtensionMap()[extension.Field] = Extension{desc: extension, value: value} + return nil +} + +// A global registry of extensions. +// The generated code will register the generated descriptors by calling RegisterExtension. + +var extensionMaps = make(map[reflect.Type]map[int32]*ExtensionDesc) + +// RegisterExtension is called from the generated code. +func RegisterExtension(desc *ExtensionDesc) { + st := reflect.TypeOf(desc.ExtendedType).Elem() + m := extensionMaps[st] + if m == nil { + m = make(map[int32]*ExtensionDesc) + extensionMaps[st] = m + } + if _, ok := m[desc.Field]; ok { + panic("proto: duplicate extension registered: " + st.String() + " " + strconv.Itoa(int(desc.Field))) + } + m[desc.Field] = desc +} + +// RegisteredExtensions returns a map of the registered extensions of a +// protocol buffer struct, indexed by the extension number. +// The argument pb should be a nil pointer to the struct type. +func RegisteredExtensions(pb Message) map[int32]*ExtensionDesc { + return extensionMaps[reflect.TypeOf(pb).Elem()] +} diff --git a/vendor/github.com/golang/protobuf/proto/lib.go b/vendor/github.com/golang/protobuf/proto/lib.go new file mode 100644 index 000000000..0de8f8dff --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/lib.go @@ -0,0 +1,894 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* +Package proto converts data structures to and from the wire format of +protocol buffers. It works in concert with the Go source code generated +for .proto files by the protocol compiler. + +A summary of the properties of the protocol buffer interface +for a protocol buffer variable v: + + - Names are turned from camel_case to CamelCase for export. + - There are no methods on v to set fields; just treat + them as structure fields. + - There are getters that return a field's value if set, + and return the field's default value if unset. + The getters work even if the receiver is a nil message. + - The zero value for a struct is its correct initialization state. + All desired fields must be set before marshaling. + - A Reset() method will restore a protobuf struct to its zero state. + - Non-repeated fields are pointers to the values; nil means unset. + That is, optional or required field int32 f becomes F *int32. + - Repeated fields are slices. + - Helper functions are available to aid the setting of fields. + msg.Foo = proto.String("hello") // set field + - Constants are defined to hold the default values of all fields that + have them. They have the form Default_StructName_FieldName. + Because the getter methods handle defaulted values, + direct use of these constants should be rare. + - Enums are given type names and maps from names to values. + Enum values are prefixed by the enclosing message's name, or by the + enum's type name if it is a top-level enum. Enum types have a String + method, and a Enum method to assist in message construction. + - Nested messages, groups and enums have type names prefixed with the name of + the surrounding message type. + - Extensions are given descriptor names that start with E_, + followed by an underscore-delimited list of the nested messages + that contain it (if any) followed by the CamelCased name of the + extension field itself. HasExtension, ClearExtension, GetExtension + and SetExtension are functions for manipulating extensions. + - Oneof field sets are given a single field in their message, + with distinguished wrapper types for each possible field value. + - Marshal and Unmarshal are functions to encode and decode the wire format. + +When the .proto file specifies `syntax="proto3"`, there are some differences: + + - Non-repeated fields of non-message type are values instead of pointers. + - Getters are only generated for message and oneof fields. + - Enum types do not get an Enum method. + +The simplest way to describe this is to see an example. +Given file test.proto, containing + + package example; + + enum FOO { X = 17; } + + message Test { + required string label = 1; + optional int32 type = 2 [default=77]; + repeated int64 reps = 3; + optional group OptionalGroup = 4 { + required string RequiredField = 5; + } + oneof union { + int32 number = 6; + string name = 7; + } + } + +The resulting file, test.pb.go, is: + + package example + + import proto "github.com/golang/protobuf/proto" + import math "math" + + type FOO int32 + const ( + FOO_X FOO = 17 + ) + var FOO_name = map[int32]string{ + 17: "X", + } + var FOO_value = map[string]int32{ + "X": 17, + } + + func (x FOO) Enum() *FOO { + p := new(FOO) + *p = x + return p + } + func (x FOO) String() string { + return proto.EnumName(FOO_name, int32(x)) + } + func (x *FOO) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FOO_value, data) + if err != nil { + return err + } + *x = FOO(value) + return nil + } + + type Test struct { + Label *string `protobuf:"bytes,1,req,name=label" json:"label,omitempty"` + Type *int32 `protobuf:"varint,2,opt,name=type,def=77" json:"type,omitempty"` + Reps []int64 `protobuf:"varint,3,rep,name=reps" json:"reps,omitempty"` + Optionalgroup *Test_OptionalGroup `protobuf:"group,4,opt,name=OptionalGroup" json:"optionalgroup,omitempty"` + // Types that are valid to be assigned to Union: + // *Test_Number + // *Test_Name + Union isTest_Union `protobuf_oneof:"union"` + XXX_unrecognized []byte `json:"-"` + } + func (m *Test) Reset() { *m = Test{} } + func (m *Test) String() string { return proto.CompactTextString(m) } + func (*Test) ProtoMessage() {} + + type isTest_Union interface { + isTest_Union() + } + + type Test_Number struct { + Number int32 `protobuf:"varint,6,opt,name=number"` + } + type Test_Name struct { + Name string `protobuf:"bytes,7,opt,name=name"` + } + + func (*Test_Number) isTest_Union() {} + func (*Test_Name) isTest_Union() {} + + func (m *Test) GetUnion() isTest_Union { + if m != nil { + return m.Union + } + return nil + } + const Default_Test_Type int32 = 77 + + func (m *Test) GetLabel() string { + if m != nil && m.Label != nil { + return *m.Label + } + return "" + } + + func (m *Test) GetType() int32 { + if m != nil && m.Type != nil { + return *m.Type + } + return Default_Test_Type + } + + func (m *Test) GetOptionalgroup() *Test_OptionalGroup { + if m != nil { + return m.Optionalgroup + } + return nil + } + + type Test_OptionalGroup struct { + RequiredField *string `protobuf:"bytes,5,req" json:"RequiredField,omitempty"` + } + func (m *Test_OptionalGroup) Reset() { *m = Test_OptionalGroup{} } + func (m *Test_OptionalGroup) String() string { return proto.CompactTextString(m) } + + func (m *Test_OptionalGroup) GetRequiredField() string { + if m != nil && m.RequiredField != nil { + return *m.RequiredField + } + return "" + } + + func (m *Test) GetNumber() int32 { + if x, ok := m.GetUnion().(*Test_Number); ok { + return x.Number + } + return 0 + } + + func (m *Test) GetName() string { + if x, ok := m.GetUnion().(*Test_Name); ok { + return x.Name + } + return "" + } + + func init() { + proto.RegisterEnum("example.FOO", FOO_name, FOO_value) + } + +To create and play with a Test object: + + package main + + import ( + "log" + + "github.com/golang/protobuf/proto" + pb "./example.pb" + ) + + func main() { + test := &pb.Test{ + Label: proto.String("hello"), + Type: proto.Int32(17), + Reps: []int64{1, 2, 3}, + Optionalgroup: &pb.Test_OptionalGroup{ + RequiredField: proto.String("good bye"), + }, + Union: &pb.Test_Name{"fred"}, + } + data, err := proto.Marshal(test) + if err != nil { + log.Fatal("marshaling error: ", err) + } + newTest := &pb.Test{} + err = proto.Unmarshal(data, newTest) + if err != nil { + log.Fatal("unmarshaling error: ", err) + } + // Now test and newTest contain the same data. + if test.GetLabel() != newTest.GetLabel() { + log.Fatalf("data mismatch %q != %q", test.GetLabel(), newTest.GetLabel()) + } + // Use a type switch to determine which oneof was set. + switch u := test.Union.(type) { + case *pb.Test_Number: // u.Number contains the number. + case *pb.Test_Name: // u.Name contains the string. + } + // etc. + } +*/ +package proto + +import ( + "encoding/json" + "fmt" + "log" + "reflect" + "sort" + "strconv" + "sync" +) + +// Message is implemented by generated protocol buffer messages. +type Message interface { + Reset() + String() string + ProtoMessage() +} + +// Stats records allocation details about the protocol buffer encoders +// and decoders. Useful for tuning the library itself. +type Stats struct { + Emalloc uint64 // mallocs in encode + Dmalloc uint64 // mallocs in decode + Encode uint64 // number of encodes + Decode uint64 // number of decodes + Chit uint64 // number of cache hits + Cmiss uint64 // number of cache misses + Size uint64 // number of sizes +} + +// Set to true to enable stats collection. +const collectStats = false + +var stats Stats + +// GetStats returns a copy of the global Stats structure. +func GetStats() Stats { return stats } + +// A Buffer is a buffer manager for marshaling and unmarshaling +// protocol buffers. It may be reused between invocations to +// reduce memory usage. It is not necessary to use a Buffer; +// the global functions Marshal and Unmarshal create a +// temporary Buffer and are fine for most applications. +type Buffer struct { + buf []byte // encode/decode byte stream + index int // write point + + // pools of basic types to amortize allocation. + bools []bool + uint32s []uint32 + uint64s []uint64 + + // extra pools, only used with pointer_reflect.go + int32s []int32 + int64s []int64 + float32s []float32 + float64s []float64 +} + +// NewBuffer allocates a new Buffer and initializes its internal data to +// the contents of the argument slice. +func NewBuffer(e []byte) *Buffer { + return &Buffer{buf: e} +} + +// Reset resets the Buffer, ready for marshaling a new protocol buffer. +func (p *Buffer) Reset() { + p.buf = p.buf[0:0] // for reading/writing + p.index = 0 // for reading +} + +// SetBuf replaces the internal buffer with the slice, +// ready for unmarshaling the contents of the slice. +func (p *Buffer) SetBuf(s []byte) { + p.buf = s + p.index = 0 +} + +// Bytes returns the contents of the Buffer. +func (p *Buffer) Bytes() []byte { return p.buf } + +/* + * Helper routines for simplifying the creation of optional fields of basic type. + */ + +// Bool is a helper routine that allocates a new bool value +// to store v and returns a pointer to it. +func Bool(v bool) *bool { + return &v +} + +// Int32 is a helper routine that allocates a new int32 value +// to store v and returns a pointer to it. +func Int32(v int32) *int32 { + return &v +} + +// Int is a helper routine that allocates a new int32 value +// to store v and returns a pointer to it, but unlike Int32 +// its argument value is an int. +func Int(v int) *int32 { + p := new(int32) + *p = int32(v) + return p +} + +// Int64 is a helper routine that allocates a new int64 value +// to store v and returns a pointer to it. +func Int64(v int64) *int64 { + return &v +} + +// Float32 is a helper routine that allocates a new float32 value +// to store v and returns a pointer to it. +func Float32(v float32) *float32 { + return &v +} + +// Float64 is a helper routine that allocates a new float64 value +// to store v and returns a pointer to it. +func Float64(v float64) *float64 { + return &v +} + +// Uint32 is a helper routine that allocates a new uint32 value +// to store v and returns a pointer to it. +func Uint32(v uint32) *uint32 { + return &v +} + +// Uint64 is a helper routine that allocates a new uint64 value +// to store v and returns a pointer to it. +func Uint64(v uint64) *uint64 { + return &v +} + +// String is a helper routine that allocates a new string value +// to store v and returns a pointer to it. +func String(v string) *string { + return &v +} + +// EnumName is a helper function to simplify printing protocol buffer enums +// by name. Given an enum map and a value, it returns a useful string. +func EnumName(m map[int32]string, v int32) string { + s, ok := m[v] + if ok { + return s + } + return strconv.Itoa(int(v)) +} + +// UnmarshalJSONEnum is a helper function to simplify recovering enum int values +// from their JSON-encoded representation. Given a map from the enum's symbolic +// names to its int values, and a byte buffer containing the JSON-encoded +// value, it returns an int32 that can be cast to the enum type by the caller. +// +// The function can deal with both JSON representations, numeric and symbolic. +func UnmarshalJSONEnum(m map[string]int32, data []byte, enumName string) (int32, error) { + if data[0] == '"' { + // New style: enums are strings. + var repr string + if err := json.Unmarshal(data, &repr); err != nil { + return -1, err + } + val, ok := m[repr] + if !ok { + return 0, fmt.Errorf("unrecognized enum %s value %q", enumName, repr) + } + return val, nil + } + // Old style: enums are ints. + var val int32 + if err := json.Unmarshal(data, &val); err != nil { + return 0, fmt.Errorf("cannot unmarshal %#q into enum %s", data, enumName) + } + return val, nil +} + +// DebugPrint dumps the encoded data in b in a debugging format with a header +// including the string s. Used in testing but made available for general debugging. +func (p *Buffer) DebugPrint(s string, b []byte) { + var u uint64 + + obuf := p.buf + index := p.index + p.buf = b + p.index = 0 + depth := 0 + + fmt.Printf("\n--- %s ---\n", s) + +out: + for { + for i := 0; i < depth; i++ { + fmt.Print(" ") + } + + index := p.index + if index == len(p.buf) { + break + } + + op, err := p.DecodeVarint() + if err != nil { + fmt.Printf("%3d: fetching op err %v\n", index, err) + break out + } + tag := op >> 3 + wire := op & 7 + + switch wire { + default: + fmt.Printf("%3d: t=%3d unknown wire=%d\n", + index, tag, wire) + break out + + case WireBytes: + var r []byte + + r, err = p.DecodeRawBytes(false) + if err != nil { + break out + } + fmt.Printf("%3d: t=%3d bytes [%d]", index, tag, len(r)) + if len(r) <= 6 { + for i := 0; i < len(r); i++ { + fmt.Printf(" %.2x", r[i]) + } + } else { + for i := 0; i < 3; i++ { + fmt.Printf(" %.2x", r[i]) + } + fmt.Printf(" ..") + for i := len(r) - 3; i < len(r); i++ { + fmt.Printf(" %.2x", r[i]) + } + } + fmt.Printf("\n") + + case WireFixed32: + u, err = p.DecodeFixed32() + if err != nil { + fmt.Printf("%3d: t=%3d fix32 err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d fix32 %d\n", index, tag, u) + + case WireFixed64: + u, err = p.DecodeFixed64() + if err != nil { + fmt.Printf("%3d: t=%3d fix64 err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d fix64 %d\n", index, tag, u) + + case WireVarint: + u, err = p.DecodeVarint() + if err != nil { + fmt.Printf("%3d: t=%3d varint err %v\n", index, tag, err) + break out + } + fmt.Printf("%3d: t=%3d varint %d\n", index, tag, u) + + case WireStartGroup: + fmt.Printf("%3d: t=%3d start\n", index, tag) + depth++ + + case WireEndGroup: + depth-- + fmt.Printf("%3d: t=%3d end\n", index, tag) + } + } + + if depth != 0 { + fmt.Printf("%3d: start-end not balanced %d\n", p.index, depth) + } + fmt.Printf("\n") + + p.buf = obuf + p.index = index +} + +// SetDefaults sets unset protocol buffer fields to their default values. +// It only modifies fields that are both unset and have defined defaults. +// It recursively sets default values in any non-nil sub-messages. +func SetDefaults(pb Message) { + setDefaults(reflect.ValueOf(pb), true, false) +} + +// v is a pointer to a struct. +func setDefaults(v reflect.Value, recur, zeros bool) { + v = v.Elem() + + defaultMu.RLock() + dm, ok := defaults[v.Type()] + defaultMu.RUnlock() + if !ok { + dm = buildDefaultMessage(v.Type()) + defaultMu.Lock() + defaults[v.Type()] = dm + defaultMu.Unlock() + } + + for _, sf := range dm.scalars { + f := v.Field(sf.index) + if !f.IsNil() { + // field already set + continue + } + dv := sf.value + if dv == nil && !zeros { + // no explicit default, and don't want to set zeros + continue + } + fptr := f.Addr().Interface() // **T + // TODO: Consider batching the allocations we do here. + switch sf.kind { + case reflect.Bool: + b := new(bool) + if dv != nil { + *b = dv.(bool) + } + *(fptr.(**bool)) = b + case reflect.Float32: + f := new(float32) + if dv != nil { + *f = dv.(float32) + } + *(fptr.(**float32)) = f + case reflect.Float64: + f := new(float64) + if dv != nil { + *f = dv.(float64) + } + *(fptr.(**float64)) = f + case reflect.Int32: + // might be an enum + if ft := f.Type(); ft != int32PtrType { + // enum + f.Set(reflect.New(ft.Elem())) + if dv != nil { + f.Elem().SetInt(int64(dv.(int32))) + } + } else { + // int32 field + i := new(int32) + if dv != nil { + *i = dv.(int32) + } + *(fptr.(**int32)) = i + } + case reflect.Int64: + i := new(int64) + if dv != nil { + *i = dv.(int64) + } + *(fptr.(**int64)) = i + case reflect.String: + s := new(string) + if dv != nil { + *s = dv.(string) + } + *(fptr.(**string)) = s + case reflect.Uint8: + // exceptional case: []byte + var b []byte + if dv != nil { + db := dv.([]byte) + b = make([]byte, len(db)) + copy(b, db) + } else { + b = []byte{} + } + *(fptr.(*[]byte)) = b + case reflect.Uint32: + u := new(uint32) + if dv != nil { + *u = dv.(uint32) + } + *(fptr.(**uint32)) = u + case reflect.Uint64: + u := new(uint64) + if dv != nil { + *u = dv.(uint64) + } + *(fptr.(**uint64)) = u + default: + log.Printf("proto: can't set default for field %v (sf.kind=%v)", f, sf.kind) + } + } + + for _, ni := range dm.nested { + f := v.Field(ni) + // f is *T or []*T or map[T]*T + switch f.Kind() { + case reflect.Ptr: + if f.IsNil() { + continue + } + setDefaults(f, recur, zeros) + + case reflect.Slice: + for i := 0; i < f.Len(); i++ { + e := f.Index(i) + if e.IsNil() { + continue + } + setDefaults(e, recur, zeros) + } + + case reflect.Map: + for _, k := range f.MapKeys() { + e := f.MapIndex(k) + if e.IsNil() { + continue + } + setDefaults(e, recur, zeros) + } + } + } +} + +var ( + // defaults maps a protocol buffer struct type to a slice of the fields, + // with its scalar fields set to their proto-declared non-zero default values. + defaultMu sync.RWMutex + defaults = make(map[reflect.Type]defaultMessage) + + int32PtrType = reflect.TypeOf((*int32)(nil)) +) + +// defaultMessage represents information about the default values of a message. +type defaultMessage struct { + scalars []scalarField + nested []int // struct field index of nested messages +} + +type scalarField struct { + index int // struct field index + kind reflect.Kind // element type (the T in *T or []T) + value interface{} // the proto-declared default value, or nil +} + +// t is a struct type. +func buildDefaultMessage(t reflect.Type) (dm defaultMessage) { + sprop := GetProperties(t) + for _, prop := range sprop.Prop { + fi, ok := sprop.decoderTags.get(prop.Tag) + if !ok { + // XXX_unrecognized + continue + } + ft := t.Field(fi).Type + + sf, nested, err := fieldDefault(ft, prop) + switch { + case err != nil: + log.Print(err) + case nested: + dm.nested = append(dm.nested, fi) + case sf != nil: + sf.index = fi + dm.scalars = append(dm.scalars, *sf) + } + } + + return dm +} + +// fieldDefault returns the scalarField for field type ft. +// sf will be nil if the field can not have a default. +// nestedMessage will be true if this is a nested message. +// Note that sf.index is not set on return. +func fieldDefault(ft reflect.Type, prop *Properties) (sf *scalarField, nestedMessage bool, err error) { + var canHaveDefault bool + switch ft.Kind() { + case reflect.Ptr: + if ft.Elem().Kind() == reflect.Struct { + nestedMessage = true + } else { + canHaveDefault = true // proto2 scalar field + } + + case reflect.Slice: + switch ft.Elem().Kind() { + case reflect.Ptr: + nestedMessage = true // repeated message + case reflect.Uint8: + canHaveDefault = true // bytes field + } + + case reflect.Map: + if ft.Elem().Kind() == reflect.Ptr { + nestedMessage = true // map with message values + } + } + + if !canHaveDefault { + if nestedMessage { + return nil, true, nil + } + return nil, false, nil + } + + // We now know that ft is a pointer or slice. + sf = &scalarField{kind: ft.Elem().Kind()} + + // scalar fields without defaults + if !prop.HasDefault { + return sf, false, nil + } + + // a scalar field: either *T or []byte + switch ft.Elem().Kind() { + case reflect.Bool: + x, err := strconv.ParseBool(prop.Default) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default bool %q: %v", prop.Default, err) + } + sf.value = x + case reflect.Float32: + x, err := strconv.ParseFloat(prop.Default, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default float32 %q: %v", prop.Default, err) + } + sf.value = float32(x) + case reflect.Float64: + x, err := strconv.ParseFloat(prop.Default, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default float64 %q: %v", prop.Default, err) + } + sf.value = x + case reflect.Int32: + x, err := strconv.ParseInt(prop.Default, 10, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default int32 %q: %v", prop.Default, err) + } + sf.value = int32(x) + case reflect.Int64: + x, err := strconv.ParseInt(prop.Default, 10, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default int64 %q: %v", prop.Default, err) + } + sf.value = x + case reflect.String: + sf.value = prop.Default + case reflect.Uint8: + // []byte (not *uint8) + sf.value = []byte(prop.Default) + case reflect.Uint32: + x, err := strconv.ParseUint(prop.Default, 10, 32) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default uint32 %q: %v", prop.Default, err) + } + sf.value = uint32(x) + case reflect.Uint64: + x, err := strconv.ParseUint(prop.Default, 10, 64) + if err != nil { + return nil, false, fmt.Errorf("proto: bad default uint64 %q: %v", prop.Default, err) + } + sf.value = x + default: + return nil, false, fmt.Errorf("proto: unhandled def kind %v", ft.Elem().Kind()) + } + + return sf, false, nil +} + +// Map fields may have key types of non-float scalars, strings and enums. +// The easiest way to sort them in some deterministic order is to use fmt. +// If this turns out to be inefficient we can always consider other options, +// such as doing a Schwartzian transform. + +func mapKeys(vs []reflect.Value) sort.Interface { + s := mapKeySorter{ + vs: vs, + // default Less function: textual comparison + less: func(a, b reflect.Value) bool { + return fmt.Sprint(a.Interface()) < fmt.Sprint(b.Interface()) + }, + } + + // Type specialization per https://developers.google.com/protocol-buffers/docs/proto#maps; + // numeric keys are sorted numerically. + if len(vs) == 0 { + return s + } + switch vs[0].Kind() { + case reflect.Int32, reflect.Int64: + s.less = func(a, b reflect.Value) bool { return a.Int() < b.Int() } + case reflect.Uint32, reflect.Uint64: + s.less = func(a, b reflect.Value) bool { return a.Uint() < b.Uint() } + } + + return s +} + +type mapKeySorter struct { + vs []reflect.Value + less func(a, b reflect.Value) bool +} + +func (s mapKeySorter) Len() int { return len(s.vs) } +func (s mapKeySorter) Swap(i, j int) { s.vs[i], s.vs[j] = s.vs[j], s.vs[i] } +func (s mapKeySorter) Less(i, j int) bool { + return s.less(s.vs[i], s.vs[j]) +} + +// isProto3Zero reports whether v is a zero proto3 value. +func isProto3Zero(v reflect.Value) bool { + switch v.Kind() { + case reflect.Bool: + return !v.Bool() + case reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint32, reflect.Uint64: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.String: + return v.String() == "" + } + return false +} + +// ProtoPackageIsVersion1 is referenced from generated protocol buffer files +// to assert that that code is compatible with this version of the proto package. +const ProtoPackageIsVersion1 = true diff --git a/vendor/github.com/golang/protobuf/proto/message_set.go b/vendor/github.com/golang/protobuf/proto/message_set.go new file mode 100644 index 000000000..e25e01e63 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/message_set.go @@ -0,0 +1,280 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Support for message sets. + */ + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "reflect" + "sort" +) + +// errNoMessageTypeID occurs when a protocol buffer does not have a message type ID. +// A message type ID is required for storing a protocol buffer in a message set. +var errNoMessageTypeID = errors.New("proto does not have a message type ID") + +// The first two types (_MessageSet_Item and messageSet) +// model what the protocol compiler produces for the following protocol message: +// message MessageSet { +// repeated group Item = 1 { +// required int32 type_id = 2; +// required string message = 3; +// }; +// } +// That is the MessageSet wire format. We can't use a proto to generate these +// because that would introduce a circular dependency between it and this package. + +type _MessageSet_Item struct { + TypeId *int32 `protobuf:"varint,2,req,name=type_id"` + Message []byte `protobuf:"bytes,3,req,name=message"` +} + +type messageSet struct { + Item []*_MessageSet_Item `protobuf:"group,1,rep"` + XXX_unrecognized []byte + // TODO: caching? +} + +// Make sure messageSet is a Message. +var _ Message = (*messageSet)(nil) + +// messageTypeIder is an interface satisfied by a protocol buffer type +// that may be stored in a MessageSet. +type messageTypeIder interface { + MessageTypeId() int32 +} + +func (ms *messageSet) find(pb Message) *_MessageSet_Item { + mti, ok := pb.(messageTypeIder) + if !ok { + return nil + } + id := mti.MessageTypeId() + for _, item := range ms.Item { + if *item.TypeId == id { + return item + } + } + return nil +} + +func (ms *messageSet) Has(pb Message) bool { + if ms.find(pb) != nil { + return true + } + return false +} + +func (ms *messageSet) Unmarshal(pb Message) error { + if item := ms.find(pb); item != nil { + return Unmarshal(item.Message, pb) + } + if _, ok := pb.(messageTypeIder); !ok { + return errNoMessageTypeID + } + return nil // TODO: return error instead? +} + +func (ms *messageSet) Marshal(pb Message) error { + msg, err := Marshal(pb) + if err != nil { + return err + } + if item := ms.find(pb); item != nil { + // reuse existing item + item.Message = msg + return nil + } + + mti, ok := pb.(messageTypeIder) + if !ok { + return errNoMessageTypeID + } + + mtid := mti.MessageTypeId() + ms.Item = append(ms.Item, &_MessageSet_Item{ + TypeId: &mtid, + Message: msg, + }) + return nil +} + +func (ms *messageSet) Reset() { *ms = messageSet{} } +func (ms *messageSet) String() string { return CompactTextString(ms) } +func (*messageSet) ProtoMessage() {} + +// Support for the message_set_wire_format message option. + +func skipVarint(buf []byte) []byte { + i := 0 + for ; buf[i]&0x80 != 0; i++ { + } + return buf[i+1:] +} + +// MarshalMessageSet encodes the extension map represented by m in the message set wire format. +// It is called by generated Marshal methods on protocol buffer messages with the message_set_wire_format option. +func MarshalMessageSet(m map[int32]Extension) ([]byte, error) { + if err := encodeExtensionMap(m); err != nil { + return nil, err + } + + // Sort extension IDs to provide a deterministic encoding. + // See also enc_map in encode.go. + ids := make([]int, 0, len(m)) + for id := range m { + ids = append(ids, int(id)) + } + sort.Ints(ids) + + ms := &messageSet{Item: make([]*_MessageSet_Item, 0, len(m))} + for _, id := range ids { + e := m[int32(id)] + // Remove the wire type and field number varint, as well as the length varint. + msg := skipVarint(skipVarint(e.enc)) + + ms.Item = append(ms.Item, &_MessageSet_Item{ + TypeId: Int32(int32(id)), + Message: msg, + }) + } + return Marshal(ms) +} + +// UnmarshalMessageSet decodes the extension map encoded in buf in the message set wire format. +// It is called by generated Unmarshal methods on protocol buffer messages with the message_set_wire_format option. +func UnmarshalMessageSet(buf []byte, m map[int32]Extension) error { + ms := new(messageSet) + if err := Unmarshal(buf, ms); err != nil { + return err + } + for _, item := range ms.Item { + id := *item.TypeId + msg := item.Message + + // Restore wire type and field number varint, plus length varint. + // Be careful to preserve duplicate items. + b := EncodeVarint(uint64(id)<<3 | WireBytes) + if ext, ok := m[id]; ok { + // Existing data; rip off the tag and length varint + // so we join the new data correctly. + // We can assume that ext.enc is set because we are unmarshaling. + o := ext.enc[len(b):] // skip wire type and field number + _, n := DecodeVarint(o) // calculate length of length varint + o = o[n:] // skip length varint + msg = append(o, msg...) // join old data and new data + } + b = append(b, EncodeVarint(uint64(len(msg)))...) + b = append(b, msg...) + + m[id] = Extension{enc: b} + } + return nil +} + +// MarshalMessageSetJSON encodes the extension map represented by m in JSON format. +// It is called by generated MarshalJSON methods on protocol buffer messages with the message_set_wire_format option. +func MarshalMessageSetJSON(m map[int32]Extension) ([]byte, error) { + var b bytes.Buffer + b.WriteByte('{') + + // Process the map in key order for deterministic output. + ids := make([]int32, 0, len(m)) + for id := range m { + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) // int32Slice defined in text.go + + for i, id := range ids { + ext := m[id] + if i > 0 { + b.WriteByte(',') + } + + msd, ok := messageSetMap[id] + if !ok { + // Unknown type; we can't render it, so skip it. + continue + } + fmt.Fprintf(&b, `"[%s]":`, msd.name) + + x := ext.value + if x == nil { + x = reflect.New(msd.t.Elem()).Interface() + if err := Unmarshal(ext.enc, x.(Message)); err != nil { + return nil, err + } + } + d, err := json.Marshal(x) + if err != nil { + return nil, err + } + b.Write(d) + } + b.WriteByte('}') + return b.Bytes(), nil +} + +// UnmarshalMessageSetJSON decodes the extension map encoded in buf in JSON format. +// It is called by generated UnmarshalJSON methods on protocol buffer messages with the message_set_wire_format option. +func UnmarshalMessageSetJSON(buf []byte, m map[int32]Extension) error { + // Common-case fast path. + if len(buf) == 0 || bytes.Equal(buf, []byte("{}")) { + return nil + } + + // This is fairly tricky, and it's not clear that it is needed. + return errors.New("TODO: UnmarshalMessageSetJSON not yet implemented") +} + +// A global registry of types that can be used in a MessageSet. + +var messageSetMap = make(map[int32]messageSetDesc) + +type messageSetDesc struct { + t reflect.Type // pointer to struct + name string +} + +// RegisterMessageSetType is called from the generated code. +func RegisterMessageSetType(m Message, fieldNum int32, name string) { + messageSetMap[fieldNum] = messageSetDesc{ + t: reflect.TypeOf(m), + name: name, + } +} diff --git a/vendor/github.com/golang/protobuf/proto/pointer_reflect.go b/vendor/github.com/golang/protobuf/proto/pointer_reflect.go new file mode 100644 index 000000000..749919d25 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/pointer_reflect.go @@ -0,0 +1,479 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +build appengine + +// This file contains an implementation of proto field accesses using package reflect. +// It is slower than the code in pointer_unsafe.go but it avoids package unsafe and can +// be used on App Engine. + +package proto + +import ( + "math" + "reflect" +) + +// A structPointer is a pointer to a struct. +type structPointer struct { + v reflect.Value +} + +// toStructPointer returns a structPointer equivalent to the given reflect value. +// The reflect value must itself be a pointer to a struct. +func toStructPointer(v reflect.Value) structPointer { + return structPointer{v} +} + +// IsNil reports whether p is nil. +func structPointer_IsNil(p structPointer) bool { + return p.v.IsNil() +} + +// Interface returns the struct pointer as an interface value. +func structPointer_Interface(p structPointer, _ reflect.Type) interface{} { + return p.v.Interface() +} + +// A field identifies a field in a struct, accessible from a structPointer. +// In this implementation, a field is identified by the sequence of field indices +// passed to reflect's FieldByIndex. +type field []int + +// toField returns a field equivalent to the given reflect field. +func toField(f *reflect.StructField) field { + return f.Index +} + +// invalidField is an invalid field identifier. +var invalidField = field(nil) + +// IsValid reports whether the field identifier is valid. +func (f field) IsValid() bool { return f != nil } + +// field returns the given field in the struct as a reflect value. +func structPointer_field(p structPointer, f field) reflect.Value { + // Special case: an extension map entry with a value of type T + // passes a *T to the struct-handling code with a zero field, + // expecting that it will be treated as equivalent to *struct{ X T }, + // which has the same memory layout. We have to handle that case + // specially, because reflect will panic if we call FieldByIndex on a + // non-struct. + if f == nil { + return p.v.Elem() + } + + return p.v.Elem().FieldByIndex(f) +} + +// ifield returns the given field in the struct as an interface value. +func structPointer_ifield(p structPointer, f field) interface{} { + return structPointer_field(p, f).Addr().Interface() +} + +// Bytes returns the address of a []byte field in the struct. +func structPointer_Bytes(p structPointer, f field) *[]byte { + return structPointer_ifield(p, f).(*[]byte) +} + +// BytesSlice returns the address of a [][]byte field in the struct. +func structPointer_BytesSlice(p structPointer, f field) *[][]byte { + return structPointer_ifield(p, f).(*[][]byte) +} + +// Bool returns the address of a *bool field in the struct. +func structPointer_Bool(p structPointer, f field) **bool { + return structPointer_ifield(p, f).(**bool) +} + +// BoolVal returns the address of a bool field in the struct. +func structPointer_BoolVal(p structPointer, f field) *bool { + return structPointer_ifield(p, f).(*bool) +} + +// BoolSlice returns the address of a []bool field in the struct. +func structPointer_BoolSlice(p structPointer, f field) *[]bool { + return structPointer_ifield(p, f).(*[]bool) +} + +// String returns the address of a *string field in the struct. +func structPointer_String(p structPointer, f field) **string { + return structPointer_ifield(p, f).(**string) +} + +// StringVal returns the address of a string field in the struct. +func structPointer_StringVal(p structPointer, f field) *string { + return structPointer_ifield(p, f).(*string) +} + +// StringSlice returns the address of a []string field in the struct. +func structPointer_StringSlice(p structPointer, f field) *[]string { + return structPointer_ifield(p, f).(*[]string) +} + +// ExtMap returns the address of an extension map field in the struct. +func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { + return structPointer_ifield(p, f).(*map[int32]Extension) +} + +// NewAt returns the reflect.Value for a pointer to a field in the struct. +func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { + return structPointer_field(p, f).Addr() +} + +// SetStructPointer writes a *struct field in the struct. +func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { + structPointer_field(p, f).Set(q.v) +} + +// GetStructPointer reads a *struct field in the struct. +func structPointer_GetStructPointer(p structPointer, f field) structPointer { + return structPointer{structPointer_field(p, f)} +} + +// StructPointerSlice the address of a []*struct field in the struct. +func structPointer_StructPointerSlice(p structPointer, f field) structPointerSlice { + return structPointerSlice{structPointer_field(p, f)} +} + +// A structPointerSlice represents the address of a slice of pointers to structs +// (themselves messages or groups). That is, v.Type() is *[]*struct{...}. +type structPointerSlice struct { + v reflect.Value +} + +func (p structPointerSlice) Len() int { return p.v.Len() } +func (p structPointerSlice) Index(i int) structPointer { return structPointer{p.v.Index(i)} } +func (p structPointerSlice) Append(q structPointer) { + p.v.Set(reflect.Append(p.v, q.v)) +} + +var ( + int32Type = reflect.TypeOf(int32(0)) + uint32Type = reflect.TypeOf(uint32(0)) + float32Type = reflect.TypeOf(float32(0)) + int64Type = reflect.TypeOf(int64(0)) + uint64Type = reflect.TypeOf(uint64(0)) + float64Type = reflect.TypeOf(float64(0)) +) + +// A word32 represents a field of type *int32, *uint32, *float32, or *enum. +// That is, v.Type() is *int32, *uint32, *float32, or *enum and v is assignable. +type word32 struct { + v reflect.Value +} + +// IsNil reports whether p is nil. +func word32_IsNil(p word32) bool { + return p.v.IsNil() +} + +// Set sets p to point at a newly allocated word with bits set to x. +func word32_Set(p word32, o *Buffer, x uint32) { + t := p.v.Type().Elem() + switch t { + case int32Type: + if len(o.int32s) == 0 { + o.int32s = make([]int32, uint32PoolSize) + } + o.int32s[0] = int32(x) + p.v.Set(reflect.ValueOf(&o.int32s[0])) + o.int32s = o.int32s[1:] + return + case uint32Type: + if len(o.uint32s) == 0 { + o.uint32s = make([]uint32, uint32PoolSize) + } + o.uint32s[0] = x + p.v.Set(reflect.ValueOf(&o.uint32s[0])) + o.uint32s = o.uint32s[1:] + return + case float32Type: + if len(o.float32s) == 0 { + o.float32s = make([]float32, uint32PoolSize) + } + o.float32s[0] = math.Float32frombits(x) + p.v.Set(reflect.ValueOf(&o.float32s[0])) + o.float32s = o.float32s[1:] + return + } + + // must be enum + p.v.Set(reflect.New(t)) + p.v.Elem().SetInt(int64(int32(x))) +} + +// Get gets the bits pointed at by p, as a uint32. +func word32_Get(p word32) uint32 { + elem := p.v.Elem() + switch elem.Kind() { + case reflect.Int32: + return uint32(elem.Int()) + case reflect.Uint32: + return uint32(elem.Uint()) + case reflect.Float32: + return math.Float32bits(float32(elem.Float())) + } + panic("unreachable") +} + +// Word32 returns a reference to a *int32, *uint32, *float32, or *enum field in the struct. +func structPointer_Word32(p structPointer, f field) word32 { + return word32{structPointer_field(p, f)} +} + +// A word32Val represents a field of type int32, uint32, float32, or enum. +// That is, v.Type() is int32, uint32, float32, or enum and v is assignable. +type word32Val struct { + v reflect.Value +} + +// Set sets *p to x. +func word32Val_Set(p word32Val, x uint32) { + switch p.v.Type() { + case int32Type: + p.v.SetInt(int64(x)) + return + case uint32Type: + p.v.SetUint(uint64(x)) + return + case float32Type: + p.v.SetFloat(float64(math.Float32frombits(x))) + return + } + + // must be enum + p.v.SetInt(int64(int32(x))) +} + +// Get gets the bits pointed at by p, as a uint32. +func word32Val_Get(p word32Val) uint32 { + elem := p.v + switch elem.Kind() { + case reflect.Int32: + return uint32(elem.Int()) + case reflect.Uint32: + return uint32(elem.Uint()) + case reflect.Float32: + return math.Float32bits(float32(elem.Float())) + } + panic("unreachable") +} + +// Word32Val returns a reference to a int32, uint32, float32, or enum field in the struct. +func structPointer_Word32Val(p structPointer, f field) word32Val { + return word32Val{structPointer_field(p, f)} +} + +// A word32Slice is a slice of 32-bit values. +// That is, v.Type() is []int32, []uint32, []float32, or []enum. +type word32Slice struct { + v reflect.Value +} + +func (p word32Slice) Append(x uint32) { + n, m := p.v.Len(), p.v.Cap() + if n < m { + p.v.SetLen(n + 1) + } else { + t := p.v.Type().Elem() + p.v.Set(reflect.Append(p.v, reflect.Zero(t))) + } + elem := p.v.Index(n) + switch elem.Kind() { + case reflect.Int32: + elem.SetInt(int64(int32(x))) + case reflect.Uint32: + elem.SetUint(uint64(x)) + case reflect.Float32: + elem.SetFloat(float64(math.Float32frombits(x))) + } +} + +func (p word32Slice) Len() int { + return p.v.Len() +} + +func (p word32Slice) Index(i int) uint32 { + elem := p.v.Index(i) + switch elem.Kind() { + case reflect.Int32: + return uint32(elem.Int()) + case reflect.Uint32: + return uint32(elem.Uint()) + case reflect.Float32: + return math.Float32bits(float32(elem.Float())) + } + panic("unreachable") +} + +// Word32Slice returns a reference to a []int32, []uint32, []float32, or []enum field in the struct. +func structPointer_Word32Slice(p structPointer, f field) word32Slice { + return word32Slice{structPointer_field(p, f)} +} + +// word64 is like word32 but for 64-bit values. +type word64 struct { + v reflect.Value +} + +func word64_Set(p word64, o *Buffer, x uint64) { + t := p.v.Type().Elem() + switch t { + case int64Type: + if len(o.int64s) == 0 { + o.int64s = make([]int64, uint64PoolSize) + } + o.int64s[0] = int64(x) + p.v.Set(reflect.ValueOf(&o.int64s[0])) + o.int64s = o.int64s[1:] + return + case uint64Type: + if len(o.uint64s) == 0 { + o.uint64s = make([]uint64, uint64PoolSize) + } + o.uint64s[0] = x + p.v.Set(reflect.ValueOf(&o.uint64s[0])) + o.uint64s = o.uint64s[1:] + return + case float64Type: + if len(o.float64s) == 0 { + o.float64s = make([]float64, uint64PoolSize) + } + o.float64s[0] = math.Float64frombits(x) + p.v.Set(reflect.ValueOf(&o.float64s[0])) + o.float64s = o.float64s[1:] + return + } + panic("unreachable") +} + +func word64_IsNil(p word64) bool { + return p.v.IsNil() +} + +func word64_Get(p word64) uint64 { + elem := p.v.Elem() + switch elem.Kind() { + case reflect.Int64: + return uint64(elem.Int()) + case reflect.Uint64: + return elem.Uint() + case reflect.Float64: + return math.Float64bits(elem.Float()) + } + panic("unreachable") +} + +func structPointer_Word64(p structPointer, f field) word64 { + return word64{structPointer_field(p, f)} +} + +// word64Val is like word32Val but for 64-bit values. +type word64Val struct { + v reflect.Value +} + +func word64Val_Set(p word64Val, o *Buffer, x uint64) { + switch p.v.Type() { + case int64Type: + p.v.SetInt(int64(x)) + return + case uint64Type: + p.v.SetUint(x) + return + case float64Type: + p.v.SetFloat(math.Float64frombits(x)) + return + } + panic("unreachable") +} + +func word64Val_Get(p word64Val) uint64 { + elem := p.v + switch elem.Kind() { + case reflect.Int64: + return uint64(elem.Int()) + case reflect.Uint64: + return elem.Uint() + case reflect.Float64: + return math.Float64bits(elem.Float()) + } + panic("unreachable") +} + +func structPointer_Word64Val(p structPointer, f field) word64Val { + return word64Val{structPointer_field(p, f)} +} + +type word64Slice struct { + v reflect.Value +} + +func (p word64Slice) Append(x uint64) { + n, m := p.v.Len(), p.v.Cap() + if n < m { + p.v.SetLen(n + 1) + } else { + t := p.v.Type().Elem() + p.v.Set(reflect.Append(p.v, reflect.Zero(t))) + } + elem := p.v.Index(n) + switch elem.Kind() { + case reflect.Int64: + elem.SetInt(int64(int64(x))) + case reflect.Uint64: + elem.SetUint(uint64(x)) + case reflect.Float64: + elem.SetFloat(float64(math.Float64frombits(x))) + } +} + +func (p word64Slice) Len() int { + return p.v.Len() +} + +func (p word64Slice) Index(i int) uint64 { + elem := p.v.Index(i) + switch elem.Kind() { + case reflect.Int64: + return uint64(elem.Int()) + case reflect.Uint64: + return uint64(elem.Uint()) + case reflect.Float64: + return math.Float64bits(float64(elem.Float())) + } + panic("unreachable") +} + +func structPointer_Word64Slice(p structPointer, f field) word64Slice { + return word64Slice{structPointer_field(p, f)} +} diff --git a/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go b/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go new file mode 100644 index 000000000..e9be0fe92 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/pointer_unsafe.go @@ -0,0 +1,266 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2012 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// +build !appengine + +// This file contains the implementation of the proto field accesses using package unsafe. + +package proto + +import ( + "reflect" + "unsafe" +) + +// NOTE: These type_Foo functions would more idiomatically be methods, +// but Go does not allow methods on pointer types, and we must preserve +// some pointer type for the garbage collector. We use these +// funcs with clunky names as our poor approximation to methods. +// +// An alternative would be +// type structPointer struct { p unsafe.Pointer } +// but that does not registerize as well. + +// A structPointer is a pointer to a struct. +type structPointer unsafe.Pointer + +// toStructPointer returns a structPointer equivalent to the given reflect value. +func toStructPointer(v reflect.Value) structPointer { + return structPointer(unsafe.Pointer(v.Pointer())) +} + +// IsNil reports whether p is nil. +func structPointer_IsNil(p structPointer) bool { + return p == nil +} + +// Interface returns the struct pointer, assumed to have element type t, +// as an interface value. +func structPointer_Interface(p structPointer, t reflect.Type) interface{} { + return reflect.NewAt(t, unsafe.Pointer(p)).Interface() +} + +// A field identifies a field in a struct, accessible from a structPointer. +// In this implementation, a field is identified by its byte offset from the start of the struct. +type field uintptr + +// toField returns a field equivalent to the given reflect field. +func toField(f *reflect.StructField) field { + return field(f.Offset) +} + +// invalidField is an invalid field identifier. +const invalidField = ^field(0) + +// IsValid reports whether the field identifier is valid. +func (f field) IsValid() bool { + return f != ^field(0) +} + +// Bytes returns the address of a []byte field in the struct. +func structPointer_Bytes(p structPointer, f field) *[]byte { + return (*[]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// BytesSlice returns the address of a [][]byte field in the struct. +func structPointer_BytesSlice(p structPointer, f field) *[][]byte { + return (*[][]byte)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// Bool returns the address of a *bool field in the struct. +func structPointer_Bool(p structPointer, f field) **bool { + return (**bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// BoolVal returns the address of a bool field in the struct. +func structPointer_BoolVal(p structPointer, f field) *bool { + return (*bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// BoolSlice returns the address of a []bool field in the struct. +func structPointer_BoolSlice(p structPointer, f field) *[]bool { + return (*[]bool)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// String returns the address of a *string field in the struct. +func structPointer_String(p structPointer, f field) **string { + return (**string)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// StringVal returns the address of a string field in the struct. +func structPointer_StringVal(p structPointer, f field) *string { + return (*string)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// StringSlice returns the address of a []string field in the struct. +func structPointer_StringSlice(p structPointer, f field) *[]string { + return (*[]string)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// ExtMap returns the address of an extension map field in the struct. +func structPointer_ExtMap(p structPointer, f field) *map[int32]Extension { + return (*map[int32]Extension)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// NewAt returns the reflect.Value for a pointer to a field in the struct. +func structPointer_NewAt(p structPointer, f field, typ reflect.Type) reflect.Value { + return reflect.NewAt(typ, unsafe.Pointer(uintptr(p)+uintptr(f))) +} + +// SetStructPointer writes a *struct field in the struct. +func structPointer_SetStructPointer(p structPointer, f field, q structPointer) { + *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) = q +} + +// GetStructPointer reads a *struct field in the struct. +func structPointer_GetStructPointer(p structPointer, f field) structPointer { + return *(*structPointer)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// StructPointerSlice the address of a []*struct field in the struct. +func structPointer_StructPointerSlice(p structPointer, f field) *structPointerSlice { + return (*structPointerSlice)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// A structPointerSlice represents a slice of pointers to structs (themselves submessages or groups). +type structPointerSlice []structPointer + +func (v *structPointerSlice) Len() int { return len(*v) } +func (v *structPointerSlice) Index(i int) structPointer { return (*v)[i] } +func (v *structPointerSlice) Append(p structPointer) { *v = append(*v, p) } + +// A word32 is the address of a "pointer to 32-bit value" field. +type word32 **uint32 + +// IsNil reports whether *v is nil. +func word32_IsNil(p word32) bool { + return *p == nil +} + +// Set sets *v to point at a newly allocated word set to x. +func word32_Set(p word32, o *Buffer, x uint32) { + if len(o.uint32s) == 0 { + o.uint32s = make([]uint32, uint32PoolSize) + } + o.uint32s[0] = x + *p = &o.uint32s[0] + o.uint32s = o.uint32s[1:] +} + +// Get gets the value pointed at by *v. +func word32_Get(p word32) uint32 { + return **p +} + +// Word32 returns the address of a *int32, *uint32, *float32, or *enum field in the struct. +func structPointer_Word32(p structPointer, f field) word32 { + return word32((**uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +} + +// A word32Val is the address of a 32-bit value field. +type word32Val *uint32 + +// Set sets *p to x. +func word32Val_Set(p word32Val, x uint32) { + *p = x +} + +// Get gets the value pointed at by p. +func word32Val_Get(p word32Val) uint32 { + return *p +} + +// Word32Val returns the address of a *int32, *uint32, *float32, or *enum field in the struct. +func structPointer_Word32Val(p structPointer, f field) word32Val { + return word32Val((*uint32)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +} + +// A word32Slice is a slice of 32-bit values. +type word32Slice []uint32 + +func (v *word32Slice) Append(x uint32) { *v = append(*v, x) } +func (v *word32Slice) Len() int { return len(*v) } +func (v *word32Slice) Index(i int) uint32 { return (*v)[i] } + +// Word32Slice returns the address of a []int32, []uint32, []float32, or []enum field in the struct. +func structPointer_Word32Slice(p structPointer, f field) *word32Slice { + return (*word32Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} + +// word64 is like word32 but for 64-bit values. +type word64 **uint64 + +func word64_Set(p word64, o *Buffer, x uint64) { + if len(o.uint64s) == 0 { + o.uint64s = make([]uint64, uint64PoolSize) + } + o.uint64s[0] = x + *p = &o.uint64s[0] + o.uint64s = o.uint64s[1:] +} + +func word64_IsNil(p word64) bool { + return *p == nil +} + +func word64_Get(p word64) uint64 { + return **p +} + +func structPointer_Word64(p structPointer, f field) word64 { + return word64((**uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +} + +// word64Val is like word32Val but for 64-bit values. +type word64Val *uint64 + +func word64Val_Set(p word64Val, o *Buffer, x uint64) { + *p = x +} + +func word64Val_Get(p word64Val) uint64 { + return *p +} + +func structPointer_Word64Val(p structPointer, f field) word64Val { + return word64Val((*uint64)(unsafe.Pointer(uintptr(p) + uintptr(f)))) +} + +// word64Slice is like word32Slice but for 64-bit values. +type word64Slice []uint64 + +func (v *word64Slice) Append(x uint64) { *v = append(*v, x) } +func (v *word64Slice) Len() int { return len(*v) } +func (v *word64Slice) Index(i int) uint64 { return (*v)[i] } + +func structPointer_Word64Slice(p structPointer, f field) *word64Slice { + return (*word64Slice)(unsafe.Pointer(uintptr(p) + uintptr(f))) +} diff --git a/vendor/github.com/golang/protobuf/proto/properties.go b/vendor/github.com/golang/protobuf/proto/properties.go new file mode 100644 index 000000000..4fe2ec22e --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/properties.go @@ -0,0 +1,846 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +/* + * Routines for encoding data into the wire format for protocol buffers. + */ + +import ( + "fmt" + "log" + "os" + "reflect" + "sort" + "strconv" + "strings" + "sync" +) + +const debug bool = false + +// Constants that identify the encoding of a value on the wire. +const ( + WireVarint = 0 + WireFixed64 = 1 + WireBytes = 2 + WireStartGroup = 3 + WireEndGroup = 4 + WireFixed32 = 5 +) + +const startSize = 10 // initial slice/string sizes + +// Encoders are defined in encode.go +// An encoder outputs the full representation of a field, including its +// tag and encoder type. +type encoder func(p *Buffer, prop *Properties, base structPointer) error + +// A valueEncoder encodes a single integer in a particular encoding. +type valueEncoder func(o *Buffer, x uint64) error + +// Sizers are defined in encode.go +// A sizer returns the encoded size of a field, including its tag and encoder +// type. +type sizer func(prop *Properties, base structPointer) int + +// A valueSizer returns the encoded size of a single integer in a particular +// encoding. +type valueSizer func(x uint64) int + +// Decoders are defined in decode.go +// A decoder creates a value from its wire representation. +// Unrecognized subelements are saved in unrec. +type decoder func(p *Buffer, prop *Properties, base structPointer) error + +// A valueDecoder decodes a single integer in a particular encoding. +type valueDecoder func(o *Buffer) (x uint64, err error) + +// A oneofMarshaler does the marshaling for all oneof fields in a message. +type oneofMarshaler func(Message, *Buffer) error + +// A oneofUnmarshaler does the unmarshaling for a oneof field in a message. +type oneofUnmarshaler func(Message, int, int, *Buffer) (bool, error) + +// A oneofSizer does the sizing for all oneof fields in a message. +type oneofSizer func(Message) int + +// tagMap is an optimization over map[int]int for typical protocol buffer +// use-cases. Encoded protocol buffers are often in tag order with small tag +// numbers. +type tagMap struct { + fastTags []int + slowTags map[int]int +} + +// tagMapFastLimit is the upper bound on the tag number that will be stored in +// the tagMap slice rather than its map. +const tagMapFastLimit = 1024 + +func (p *tagMap) get(t int) (int, bool) { + if t > 0 && t < tagMapFastLimit { + if t >= len(p.fastTags) { + return 0, false + } + fi := p.fastTags[t] + return fi, fi >= 0 + } + fi, ok := p.slowTags[t] + return fi, ok +} + +func (p *tagMap) put(t int, fi int) { + if t > 0 && t < tagMapFastLimit { + for len(p.fastTags) < t+1 { + p.fastTags = append(p.fastTags, -1) + } + p.fastTags[t] = fi + return + } + if p.slowTags == nil { + p.slowTags = make(map[int]int) + } + p.slowTags[t] = fi +} + +// StructProperties represents properties for all the fields of a struct. +// decoderTags and decoderOrigNames should only be used by the decoder. +type StructProperties struct { + Prop []*Properties // properties for each field + reqCount int // required count + decoderTags tagMap // map from proto tag to struct field number + decoderOrigNames map[string]int // map from original name to struct field number + order []int // list of struct field numbers in tag order + unrecField field // field id of the XXX_unrecognized []byte field + extendable bool // is this an extendable proto + + oneofMarshaler oneofMarshaler + oneofUnmarshaler oneofUnmarshaler + oneofSizer oneofSizer + stype reflect.Type + + // OneofTypes contains information about the oneof fields in this message. + // It is keyed by the original name of a field. + OneofTypes map[string]*OneofProperties +} + +// OneofProperties represents information about a specific field in a oneof. +type OneofProperties struct { + Type reflect.Type // pointer to generated struct type for this oneof field + Field int // struct field number of the containing oneof in the message + Prop *Properties +} + +// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec. +// See encode.go, (*Buffer).enc_struct. + +func (sp *StructProperties) Len() int { return len(sp.order) } +func (sp *StructProperties) Less(i, j int) bool { + return sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag +} +func (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] } + +// Properties represents the protocol-specific behavior of a single struct field. +type Properties struct { + Name string // name of the field, for error messages + OrigName string // original name before protocol compiler (always set) + JSONName string // name to use for JSON; determined by protoc + Wire string + WireType int + Tag int + Required bool + Optional bool + Repeated bool + Packed bool // relevant for repeated primitives only + Enum string // set for enum types only + proto3 bool // whether this is known to be a proto3 field; set for []byte only + oneof bool // whether this is a oneof field + + Default string // default value + HasDefault bool // whether an explicit default was provided + def_uint64 uint64 + + enc encoder + valEnc valueEncoder // set for bool and numeric types only + field field + tagcode []byte // encoding of EncodeVarint((Tag<<3)|WireType) + tagbuf [8]byte + stype reflect.Type // set for struct types only + sprop *StructProperties // set for struct types only + isMarshaler bool + isUnmarshaler bool + + mtype reflect.Type // set for map types only + mkeyprop *Properties // set for map types only + mvalprop *Properties // set for map types only + + size sizer + valSize valueSizer // set for bool and numeric types only + + dec decoder + valDec valueDecoder // set for bool and numeric types only + + // If this is a packable field, this will be the decoder for the packed version of the field. + packedDec decoder +} + +// String formats the properties in the protobuf struct field tag style. +func (p *Properties) String() string { + s := p.Wire + s = "," + s += strconv.Itoa(p.Tag) + if p.Required { + s += ",req" + } + if p.Optional { + s += ",opt" + } + if p.Repeated { + s += ",rep" + } + if p.Packed { + s += ",packed" + } + s += ",name=" + p.OrigName + if p.JSONName != p.OrigName { + s += ",json=" + p.JSONName + } + if p.proto3 { + s += ",proto3" + } + if p.oneof { + s += ",oneof" + } + if len(p.Enum) > 0 { + s += ",enum=" + p.Enum + } + if p.HasDefault { + s += ",def=" + p.Default + } + return s +} + +// Parse populates p by parsing a string in the protobuf struct field tag style. +func (p *Properties) Parse(s string) { + // "bytes,49,opt,name=foo,def=hello!" + fields := strings.Split(s, ",") // breaks def=, but handled below. + if len(fields) < 2 { + fmt.Fprintf(os.Stderr, "proto: tag has too few fields: %q\n", s) + return + } + + p.Wire = fields[0] + switch p.Wire { + case "varint": + p.WireType = WireVarint + p.valEnc = (*Buffer).EncodeVarint + p.valDec = (*Buffer).DecodeVarint + p.valSize = sizeVarint + case "fixed32": + p.WireType = WireFixed32 + p.valEnc = (*Buffer).EncodeFixed32 + p.valDec = (*Buffer).DecodeFixed32 + p.valSize = sizeFixed32 + case "fixed64": + p.WireType = WireFixed64 + p.valEnc = (*Buffer).EncodeFixed64 + p.valDec = (*Buffer).DecodeFixed64 + p.valSize = sizeFixed64 + case "zigzag32": + p.WireType = WireVarint + p.valEnc = (*Buffer).EncodeZigzag32 + p.valDec = (*Buffer).DecodeZigzag32 + p.valSize = sizeZigzag32 + case "zigzag64": + p.WireType = WireVarint + p.valEnc = (*Buffer).EncodeZigzag64 + p.valDec = (*Buffer).DecodeZigzag64 + p.valSize = sizeZigzag64 + case "bytes", "group": + p.WireType = WireBytes + // no numeric converter for non-numeric types + default: + fmt.Fprintf(os.Stderr, "proto: tag has unknown wire type: %q\n", s) + return + } + + var err error + p.Tag, err = strconv.Atoi(fields[1]) + if err != nil { + return + } + + for i := 2; i < len(fields); i++ { + f := fields[i] + switch { + case f == "req": + p.Required = true + case f == "opt": + p.Optional = true + case f == "rep": + p.Repeated = true + case f == "packed": + p.Packed = true + case strings.HasPrefix(f, "name="): + p.OrigName = f[5:] + case strings.HasPrefix(f, "json="): + p.JSONName = f[5:] + case strings.HasPrefix(f, "enum="): + p.Enum = f[5:] + case f == "proto3": + p.proto3 = true + case f == "oneof": + p.oneof = true + case strings.HasPrefix(f, "def="): + p.HasDefault = true + p.Default = f[4:] // rest of string + if i+1 < len(fields) { + // Commas aren't escaped, and def is always last. + p.Default += "," + strings.Join(fields[i+1:], ",") + break + } + } + } +} + +func logNoSliceEnc(t1, t2 reflect.Type) { + fmt.Fprintf(os.Stderr, "proto: no slice oenc for %T = []%T\n", t1, t2) +} + +var protoMessageType = reflect.TypeOf((*Message)(nil)).Elem() + +// Initialize the fields for encoding and decoding. +func (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lockGetProp bool) { + p.enc = nil + p.dec = nil + p.size = nil + + switch t1 := typ; t1.Kind() { + default: + fmt.Fprintf(os.Stderr, "proto: no coders for %v\n", t1) + + // proto3 scalar types + + case reflect.Bool: + p.enc = (*Buffer).enc_proto3_bool + p.dec = (*Buffer).dec_proto3_bool + p.size = size_proto3_bool + case reflect.Int32: + p.enc = (*Buffer).enc_proto3_int32 + p.dec = (*Buffer).dec_proto3_int32 + p.size = size_proto3_int32 + case reflect.Uint32: + p.enc = (*Buffer).enc_proto3_uint32 + p.dec = (*Buffer).dec_proto3_int32 // can reuse + p.size = size_proto3_uint32 + case reflect.Int64, reflect.Uint64: + p.enc = (*Buffer).enc_proto3_int64 + p.dec = (*Buffer).dec_proto3_int64 + p.size = size_proto3_int64 + case reflect.Float32: + p.enc = (*Buffer).enc_proto3_uint32 // can just treat them as bits + p.dec = (*Buffer).dec_proto3_int32 + p.size = size_proto3_uint32 + case reflect.Float64: + p.enc = (*Buffer).enc_proto3_int64 // can just treat them as bits + p.dec = (*Buffer).dec_proto3_int64 + p.size = size_proto3_int64 + case reflect.String: + p.enc = (*Buffer).enc_proto3_string + p.dec = (*Buffer).dec_proto3_string + p.size = size_proto3_string + + case reflect.Ptr: + switch t2 := t1.Elem(); t2.Kind() { + default: + fmt.Fprintf(os.Stderr, "proto: no encoder function for %v -> %v\n", t1, t2) + break + case reflect.Bool: + p.enc = (*Buffer).enc_bool + p.dec = (*Buffer).dec_bool + p.size = size_bool + case reflect.Int32: + p.enc = (*Buffer).enc_int32 + p.dec = (*Buffer).dec_int32 + p.size = size_int32 + case reflect.Uint32: + p.enc = (*Buffer).enc_uint32 + p.dec = (*Buffer).dec_int32 // can reuse + p.size = size_uint32 + case reflect.Int64, reflect.Uint64: + p.enc = (*Buffer).enc_int64 + p.dec = (*Buffer).dec_int64 + p.size = size_int64 + case reflect.Float32: + p.enc = (*Buffer).enc_uint32 // can just treat them as bits + p.dec = (*Buffer).dec_int32 + p.size = size_uint32 + case reflect.Float64: + p.enc = (*Buffer).enc_int64 // can just treat them as bits + p.dec = (*Buffer).dec_int64 + p.size = size_int64 + case reflect.String: + p.enc = (*Buffer).enc_string + p.dec = (*Buffer).dec_string + p.size = size_string + case reflect.Struct: + p.stype = t1.Elem() + p.isMarshaler = isMarshaler(t1) + p.isUnmarshaler = isUnmarshaler(t1) + if p.Wire == "bytes" { + p.enc = (*Buffer).enc_struct_message + p.dec = (*Buffer).dec_struct_message + p.size = size_struct_message + } else { + p.enc = (*Buffer).enc_struct_group + p.dec = (*Buffer).dec_struct_group + p.size = size_struct_group + } + } + + case reflect.Slice: + switch t2 := t1.Elem(); t2.Kind() { + default: + logNoSliceEnc(t1, t2) + break + case reflect.Bool: + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_bool + p.size = size_slice_packed_bool + } else { + p.enc = (*Buffer).enc_slice_bool + p.size = size_slice_bool + } + p.dec = (*Buffer).dec_slice_bool + p.packedDec = (*Buffer).dec_slice_packed_bool + case reflect.Int32: + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_int32 + p.size = size_slice_packed_int32 + } else { + p.enc = (*Buffer).enc_slice_int32 + p.size = size_slice_int32 + } + p.dec = (*Buffer).dec_slice_int32 + p.packedDec = (*Buffer).dec_slice_packed_int32 + case reflect.Uint32: + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_uint32 + p.size = size_slice_packed_uint32 + } else { + p.enc = (*Buffer).enc_slice_uint32 + p.size = size_slice_uint32 + } + p.dec = (*Buffer).dec_slice_int32 + p.packedDec = (*Buffer).dec_slice_packed_int32 + case reflect.Int64, reflect.Uint64: + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_int64 + p.size = size_slice_packed_int64 + } else { + p.enc = (*Buffer).enc_slice_int64 + p.size = size_slice_int64 + } + p.dec = (*Buffer).dec_slice_int64 + p.packedDec = (*Buffer).dec_slice_packed_int64 + case reflect.Uint8: + p.enc = (*Buffer).enc_slice_byte + p.dec = (*Buffer).dec_slice_byte + p.size = size_slice_byte + // This is a []byte, which is either a bytes field, + // or the value of a map field. In the latter case, + // we always encode an empty []byte, so we should not + // use the proto3 enc/size funcs. + // f == nil iff this is the key/value of a map field. + if p.proto3 && f != nil { + p.enc = (*Buffer).enc_proto3_slice_byte + p.size = size_proto3_slice_byte + } + case reflect.Float32, reflect.Float64: + switch t2.Bits() { + case 32: + // can just treat them as bits + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_uint32 + p.size = size_slice_packed_uint32 + } else { + p.enc = (*Buffer).enc_slice_uint32 + p.size = size_slice_uint32 + } + p.dec = (*Buffer).dec_slice_int32 + p.packedDec = (*Buffer).dec_slice_packed_int32 + case 64: + // can just treat them as bits + if p.Packed { + p.enc = (*Buffer).enc_slice_packed_int64 + p.size = size_slice_packed_int64 + } else { + p.enc = (*Buffer).enc_slice_int64 + p.size = size_slice_int64 + } + p.dec = (*Buffer).dec_slice_int64 + p.packedDec = (*Buffer).dec_slice_packed_int64 + default: + logNoSliceEnc(t1, t2) + break + } + case reflect.String: + p.enc = (*Buffer).enc_slice_string + p.dec = (*Buffer).dec_slice_string + p.size = size_slice_string + case reflect.Ptr: + switch t3 := t2.Elem(); t3.Kind() { + default: + fmt.Fprintf(os.Stderr, "proto: no ptr oenc for %T -> %T -> %T\n", t1, t2, t3) + break + case reflect.Struct: + p.stype = t2.Elem() + p.isMarshaler = isMarshaler(t2) + p.isUnmarshaler = isUnmarshaler(t2) + if p.Wire == "bytes" { + p.enc = (*Buffer).enc_slice_struct_message + p.dec = (*Buffer).dec_slice_struct_message + p.size = size_slice_struct_message + } else { + p.enc = (*Buffer).enc_slice_struct_group + p.dec = (*Buffer).dec_slice_struct_group + p.size = size_slice_struct_group + } + } + case reflect.Slice: + switch t2.Elem().Kind() { + default: + fmt.Fprintf(os.Stderr, "proto: no slice elem oenc for %T -> %T -> %T\n", t1, t2, t2.Elem()) + break + case reflect.Uint8: + p.enc = (*Buffer).enc_slice_slice_byte + p.dec = (*Buffer).dec_slice_slice_byte + p.size = size_slice_slice_byte + } + } + + case reflect.Map: + p.enc = (*Buffer).enc_new_map + p.dec = (*Buffer).dec_new_map + p.size = size_new_map + + p.mtype = t1 + p.mkeyprop = &Properties{} + p.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), "Key", f.Tag.Get("protobuf_key"), nil, lockGetProp) + p.mvalprop = &Properties{} + vtype := p.mtype.Elem() + if vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice { + // The value type is not a message (*T) or bytes ([]byte), + // so we need encoders for the pointer to this type. + vtype = reflect.PtrTo(vtype) + } + p.mvalprop.init(vtype, "Value", f.Tag.Get("protobuf_val"), nil, lockGetProp) + } + + // precalculate tag code + wire := p.WireType + if p.Packed { + wire = WireBytes + } + x := uint32(p.Tag)<<3 | uint32(wire) + i := 0 + for i = 0; x > 127; i++ { + p.tagbuf[i] = 0x80 | uint8(x&0x7F) + x >>= 7 + } + p.tagbuf[i] = uint8(x) + p.tagcode = p.tagbuf[0 : i+1] + + if p.stype != nil { + if lockGetProp { + p.sprop = GetProperties(p.stype) + } else { + p.sprop = getPropertiesLocked(p.stype) + } + } +} + +var ( + marshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem() + unmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem() +) + +// isMarshaler reports whether type t implements Marshaler. +func isMarshaler(t reflect.Type) bool { + // We're checking for (likely) pointer-receiver methods + // so if t is not a pointer, something is very wrong. + // The calls above only invoke isMarshaler on pointer types. + if t.Kind() != reflect.Ptr { + panic("proto: misuse of isMarshaler") + } + return t.Implements(marshalerType) +} + +// isUnmarshaler reports whether type t implements Unmarshaler. +func isUnmarshaler(t reflect.Type) bool { + // We're checking for (likely) pointer-receiver methods + // so if t is not a pointer, something is very wrong. + // The calls above only invoke isUnmarshaler on pointer types. + if t.Kind() != reflect.Ptr { + panic("proto: misuse of isUnmarshaler") + } + return t.Implements(unmarshalerType) +} + +// Init populates the properties from a protocol buffer struct tag. +func (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) { + p.init(typ, name, tag, f, true) +} + +func (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) { + // "bytes,49,opt,def=hello!" + p.Name = name + p.OrigName = name + if f != nil { + p.field = toField(f) + } + if tag == "" { + return + } + p.Parse(tag) + p.setEncAndDec(typ, f, lockGetProp) +} + +var ( + propertiesMu sync.RWMutex + propertiesMap = make(map[reflect.Type]*StructProperties) +) + +// GetProperties returns the list of properties for the type represented by t. +// t must represent a generated struct type of a protocol message. +func GetProperties(t reflect.Type) *StructProperties { + if t.Kind() != reflect.Struct { + panic("proto: type must have kind struct") + } + + // Most calls to GetProperties in a long-running program will be + // retrieving details for types we have seen before. + propertiesMu.RLock() + sprop, ok := propertiesMap[t] + propertiesMu.RUnlock() + if ok { + if collectStats { + stats.Chit++ + } + return sprop + } + + propertiesMu.Lock() + sprop = getPropertiesLocked(t) + propertiesMu.Unlock() + return sprop +} + +// getPropertiesLocked requires that propertiesMu is held. +func getPropertiesLocked(t reflect.Type) *StructProperties { + if prop, ok := propertiesMap[t]; ok { + if collectStats { + stats.Chit++ + } + return prop + } + if collectStats { + stats.Cmiss++ + } + + prop := new(StructProperties) + // in case of recursive protos, fill this in now. + propertiesMap[t] = prop + + // build properties + prop.extendable = reflect.PtrTo(t).Implements(extendableProtoType) + prop.unrecField = invalidField + prop.Prop = make([]*Properties, t.NumField()) + prop.order = make([]int, t.NumField()) + + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + p := new(Properties) + name := f.Name + p.init(f.Type, name, f.Tag.Get("protobuf"), &f, false) + + if f.Name == "XXX_extensions" { // special case + p.enc = (*Buffer).enc_map + p.dec = nil // not needed + p.size = size_map + } + if f.Name == "XXX_unrecognized" { // special case + prop.unrecField = toField(&f) + } + oneof := f.Tag.Get("protobuf_oneof") != "" // special case + prop.Prop[i] = p + prop.order[i] = i + if debug { + print(i, " ", f.Name, " ", t.String(), " ") + if p.Tag > 0 { + print(p.String()) + } + print("\n") + } + if p.enc == nil && !strings.HasPrefix(f.Name, "XXX_") && !oneof { + fmt.Fprintln(os.Stderr, "proto: no encoder for", f.Name, f.Type.String(), "[GetProperties]") + } + } + + // Re-order prop.order. + sort.Sort(prop) + + type oneofMessage interface { + XXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{}) + } + if om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); ok { + var oots []interface{} + prop.oneofMarshaler, prop.oneofUnmarshaler, prop.oneofSizer, oots = om.XXX_OneofFuncs() + prop.stype = t + + // Interpret oneof metadata. + prop.OneofTypes = make(map[string]*OneofProperties) + for _, oot := range oots { + oop := &OneofProperties{ + Type: reflect.ValueOf(oot).Type(), // *T + Prop: new(Properties), + } + sft := oop.Type.Elem().Field(0) + oop.Prop.Name = sft.Name + oop.Prop.Parse(sft.Tag.Get("protobuf")) + // There will be exactly one interface field that + // this new value is assignable to. + for i := 0; i < t.NumField(); i++ { + f := t.Field(i) + if f.Type.Kind() != reflect.Interface { + continue + } + if !oop.Type.AssignableTo(f.Type) { + continue + } + oop.Field = i + break + } + prop.OneofTypes[oop.Prop.OrigName] = oop + } + } + + // build required counts + // build tags + reqCount := 0 + prop.decoderOrigNames = make(map[string]int) + for i, p := range prop.Prop { + if strings.HasPrefix(p.Name, "XXX_") { + // Internal fields should not appear in tags/origNames maps. + // They are handled specially when encoding and decoding. + continue + } + if p.Required { + reqCount++ + } + prop.decoderTags.put(p.Tag, i) + prop.decoderOrigNames[p.OrigName] = i + } + prop.reqCount = reqCount + + return prop +} + +// Return the Properties object for the x[0]'th field of the structure. +func propByIndex(t reflect.Type, x []int) *Properties { + if len(x) != 1 { + fmt.Fprintf(os.Stderr, "proto: field index dimension %d (not 1) for type %s\n", len(x), t) + return nil + } + prop := GetProperties(t) + return prop.Prop[x[0]] +} + +// Get the address and type of a pointer to a struct from an interface. +func getbase(pb Message) (t reflect.Type, b structPointer, err error) { + if pb == nil { + err = ErrNil + return + } + // get the reflect type of the pointer to the struct. + t = reflect.TypeOf(pb) + // get the address of the struct. + value := reflect.ValueOf(pb) + b = toStructPointer(value) + return +} + +// A global registry of enum types. +// The generated code will register the generated maps by calling RegisterEnum. + +var enumValueMaps = make(map[string]map[string]int32) + +// RegisterEnum is called from the generated code to install the enum descriptor +// maps into the global table to aid parsing text format protocol buffers. +func RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) { + if _, ok := enumValueMaps[typeName]; ok { + panic("proto: duplicate enum registered: " + typeName) + } + enumValueMaps[typeName] = valueMap +} + +// EnumValueMap returns the mapping from names to integers of the +// enum type enumType, or a nil if not found. +func EnumValueMap(enumType string) map[string]int32 { + return enumValueMaps[enumType] +} + +// A registry of all linked message types. +// The string is a fully-qualified proto name ("pkg.Message"). +var ( + protoTypes = make(map[string]reflect.Type) + revProtoTypes = make(map[reflect.Type]string) +) + +// RegisterType is called from generated code and maps from the fully qualified +// proto name to the type (pointer to struct) of the protocol buffer. +func RegisterType(x Message, name string) { + if _, ok := protoTypes[name]; ok { + // TODO: Some day, make this a panic. + log.Printf("proto: duplicate proto type registered: %s", name) + return + } + t := reflect.TypeOf(x) + protoTypes[name] = t + revProtoTypes[t] = name +} + +// MessageName returns the fully-qualified proto name for the given message type. +func MessageName(x Message) string { return revProtoTypes[reflect.TypeOf(x)] } + +// MessageType returns the message type (pointer to struct) for a named message. +func MessageType(name string) reflect.Type { return protoTypes[name] } diff --git a/vendor/github.com/golang/protobuf/proto/text.go b/vendor/github.com/golang/protobuf/proto/text.go new file mode 100644 index 000000000..37c953570 --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/text.go @@ -0,0 +1,849 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +// Functions for writing the text protocol buffer format. + +import ( + "bufio" + "bytes" + "encoding" + "errors" + "fmt" + "io" + "log" + "math" + "reflect" + "sort" + "strings" +) + +var ( + newline = []byte("\n") + spaces = []byte(" ") + gtNewline = []byte(">\n") + endBraceNewline = []byte("}\n") + backslashN = []byte{'\\', 'n'} + backslashR = []byte{'\\', 'r'} + backslashT = []byte{'\\', 't'} + backslashDQ = []byte{'\\', '"'} + backslashBS = []byte{'\\', '\\'} + posInf = []byte("inf") + negInf = []byte("-inf") + nan = []byte("nan") +) + +type writer interface { + io.Writer + WriteByte(byte) error +} + +// textWriter is an io.Writer that tracks its indentation level. +type textWriter struct { + ind int + complete bool // if the current position is a complete line + compact bool // whether to write out as a one-liner + w writer +} + +func (w *textWriter) WriteString(s string) (n int, err error) { + if !strings.Contains(s, "\n") { + if !w.compact && w.complete { + w.writeIndent() + } + w.complete = false + return io.WriteString(w.w, s) + } + // WriteString is typically called without newlines, so this + // codepath and its copy are rare. We copy to avoid + // duplicating all of Write's logic here. + return w.Write([]byte(s)) +} + +func (w *textWriter) Write(p []byte) (n int, err error) { + newlines := bytes.Count(p, newline) + if newlines == 0 { + if !w.compact && w.complete { + w.writeIndent() + } + n, err = w.w.Write(p) + w.complete = false + return n, err + } + + frags := bytes.SplitN(p, newline, newlines+1) + if w.compact { + for i, frag := range frags { + if i > 0 { + if err := w.w.WriteByte(' '); err != nil { + return n, err + } + n++ + } + nn, err := w.w.Write(frag) + n += nn + if err != nil { + return n, err + } + } + return n, nil + } + + for i, frag := range frags { + if w.complete { + w.writeIndent() + } + nn, err := w.w.Write(frag) + n += nn + if err != nil { + return n, err + } + if i+1 < len(frags) { + if err := w.w.WriteByte('\n'); err != nil { + return n, err + } + n++ + } + } + w.complete = len(frags[len(frags)-1]) == 0 + return n, nil +} + +func (w *textWriter) WriteByte(c byte) error { + if w.compact && c == '\n' { + c = ' ' + } + if !w.compact && w.complete { + w.writeIndent() + } + err := w.w.WriteByte(c) + w.complete = c == '\n' + return err +} + +func (w *textWriter) indent() { w.ind++ } + +func (w *textWriter) unindent() { + if w.ind == 0 { + log.Printf("proto: textWriter unindented too far") + return + } + w.ind-- +} + +func writeName(w *textWriter, props *Properties) error { + if _, err := w.WriteString(props.OrigName); err != nil { + return err + } + if props.Wire != "group" { + return w.WriteByte(':') + } + return nil +} + +// raw is the interface satisfied by RawMessage. +type raw interface { + Bytes() []byte +} + +func requiresQuotes(u string) bool { + // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. + for _, ch := range u { + switch { + case ch == '.' || ch == '/' || ch == '_': + continue + case '0' <= ch && ch <= '9': + continue + case 'A' <= ch && ch <= 'Z': + continue + case 'a' <= ch && ch <= 'z': + continue + default: + return true + } + } + return false +} + +// isAny reports whether sv is a google.protobuf.Any message +func isAny(sv reflect.Value) bool { + type wkt interface { + XXX_WellKnownType() string + } + t, ok := sv.Addr().Interface().(wkt) + return ok && t.XXX_WellKnownType() == "Any" +} + +// writeProto3Any writes an expanded google.protobuf.Any message. +// +// It returns (false, nil) if sv value can't be unmarshaled (e.g. because +// required messages are not linked in). +// +// It returns (true, error) when sv was written in expanded format or an error +// was encountered. +func (tm *TextMarshaler) writeProto3Any(w *textWriter, sv reflect.Value) (bool, error) { + turl := sv.FieldByName("TypeUrl") + val := sv.FieldByName("Value") + if !turl.IsValid() || !val.IsValid() { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + b, ok := val.Interface().([]byte) + if !ok { + return true, errors.New("proto: invalid google.protobuf.Any message") + } + + parts := strings.Split(turl.String(), "/") + mt := MessageType(parts[len(parts)-1]) + if mt == nil { + return false, nil + } + m := reflect.New(mt.Elem()) + if err := Unmarshal(b, m.Interface().(Message)); err != nil { + return false, nil + } + w.Write([]byte("[")) + u := turl.String() + if requiresQuotes(u) { + writeString(w, u) + } else { + w.Write([]byte(u)) + } + if w.compact { + w.Write([]byte("]:<")) + } else { + w.Write([]byte("]: <\n")) + w.ind++ + } + if err := tm.writeStruct(w, m.Elem()); err != nil { + return true, err + } + if w.compact { + w.Write([]byte("> ")) + } else { + w.ind-- + w.Write([]byte(">\n")) + } + return true, nil +} + +func (tm *TextMarshaler) writeStruct(w *textWriter, sv reflect.Value) error { + if tm.ExpandAny && isAny(sv) { + if canExpand, err := tm.writeProto3Any(w, sv); canExpand { + return err + } + } + st := sv.Type() + sprops := GetProperties(st) + for i := 0; i < sv.NumField(); i++ { + fv := sv.Field(i) + props := sprops.Prop[i] + name := st.Field(i).Name + + if strings.HasPrefix(name, "XXX_") { + // There are two XXX_ fields: + // XXX_unrecognized []byte + // XXX_extensions map[int32]proto.Extension + // The first is handled here; + // the second is handled at the bottom of this function. + if name == "XXX_unrecognized" && !fv.IsNil() { + if err := writeUnknownStruct(w, fv.Interface().([]byte)); err != nil { + return err + } + } + continue + } + if fv.Kind() == reflect.Ptr && fv.IsNil() { + // Field not filled in. This could be an optional field or + // a required field that wasn't filled in. Either way, there + // isn't anything we can show for it. + continue + } + if fv.Kind() == reflect.Slice && fv.IsNil() { + // Repeated field that is empty, or a bytes field that is unused. + continue + } + + if props.Repeated && fv.Kind() == reflect.Slice { + // Repeated field. + for j := 0; j < fv.Len(); j++ { + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + v := fv.Index(j) + if v.Kind() == reflect.Ptr && v.IsNil() { + // A nil message in a repeated field is not valid, + // but we can handle that more gracefully than panicking. + if _, err := w.Write([]byte("\n")); err != nil { + return err + } + continue + } + if err := tm.writeAny(w, v, props); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + continue + } + if fv.Kind() == reflect.Map { + // Map fields are rendered as a repeated struct with key/value fields. + keys := fv.MapKeys() + sort.Sort(mapKeys(keys)) + for _, key := range keys { + val := fv.MapIndex(key) + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + // open struct + if err := w.WriteByte('<'); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + // key + if _, err := w.WriteString("key:"); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, key, props.mkeyprop); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + // nil values aren't legal, but we can avoid panicking because of them. + if val.Kind() != reflect.Ptr || !val.IsNil() { + // value + if _, err := w.WriteString("value:"); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, val, props.mvalprop); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + // close struct + w.unindent() + if err := w.WriteByte('>'); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + } + continue + } + if props.proto3 && fv.Kind() == reflect.Slice && fv.Len() == 0 { + // empty bytes field + continue + } + if fv.Kind() != reflect.Ptr && fv.Kind() != reflect.Slice { + // proto3 non-repeated scalar field; skip if zero value + if isProto3Zero(fv) { + continue + } + } + + if fv.Kind() == reflect.Interface { + // Check if it is a oneof. + if st.Field(i).Tag.Get("protobuf_oneof") != "" { + // fv is nil, or holds a pointer to generated struct. + // That generated struct has exactly one field, + // which has a protobuf struct tag. + if fv.IsNil() { + continue + } + inner := fv.Elem().Elem() // interface -> *T -> T + tag := inner.Type().Field(0).Tag.Get("protobuf") + props = new(Properties) // Overwrite the outer props var, but not its pointee. + props.Parse(tag) + // Write the value in the oneof, not the oneof itself. + fv = inner.Field(0) + + // Special case to cope with malformed messages gracefully: + // If the value in the oneof is a nil pointer, don't panic + // in writeAny. + if fv.Kind() == reflect.Ptr && fv.IsNil() { + // Use errors.New so writeAny won't render quotes. + msg := errors.New("/* nil */") + fv = reflect.ValueOf(&msg).Elem() + } + } + } + + if err := writeName(w, props); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if b, ok := fv.Interface().(raw); ok { + if err := writeRaw(w, b.Bytes()); err != nil { + return err + } + continue + } + + // Enums have a String method, so writeAny will work fine. + if err := tm.writeAny(w, fv, props); err != nil { + return err + } + + if err := w.WriteByte('\n'); err != nil { + return err + } + } + + // Extensions (the XXX_extensions field). + pv := sv.Addr() + if pv.Type().Implements(extendableProtoType) { + if err := tm.writeExtensions(w, pv); err != nil { + return err + } + } + + return nil +} + +// writeRaw writes an uninterpreted raw message. +func writeRaw(w *textWriter, b []byte) error { + if err := w.WriteByte('<'); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + if err := writeUnknownStruct(w, b); err != nil { + return err + } + w.unindent() + if err := w.WriteByte('>'); err != nil { + return err + } + return nil +} + +// writeAny writes an arbitrary field. +func (tm *TextMarshaler) writeAny(w *textWriter, v reflect.Value, props *Properties) error { + v = reflect.Indirect(v) + + // Floats have special cases. + if v.Kind() == reflect.Float32 || v.Kind() == reflect.Float64 { + x := v.Float() + var b []byte + switch { + case math.IsInf(x, 1): + b = posInf + case math.IsInf(x, -1): + b = negInf + case math.IsNaN(x): + b = nan + } + if b != nil { + _, err := w.Write(b) + return err + } + // Other values are handled below. + } + + // We don't attempt to serialise every possible value type; only those + // that can occur in protocol buffers. + switch v.Kind() { + case reflect.Slice: + // Should only be a []byte; repeated fields are handled in writeStruct. + if err := writeString(w, string(v.Interface().([]byte))); err != nil { + return err + } + case reflect.String: + if err := writeString(w, v.String()); err != nil { + return err + } + case reflect.Struct: + // Required/optional group/message. + var bra, ket byte = '<', '>' + if props != nil && props.Wire == "group" { + bra, ket = '{', '}' + } + if err := w.WriteByte(bra); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte('\n'); err != nil { + return err + } + } + w.indent() + if etm, ok := v.Interface().(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() + if err != nil { + return err + } + if _, err = w.Write(text); err != nil { + return err + } + } else if err := tm.writeStruct(w, v); err != nil { + return err + } + w.unindent() + if err := w.WriteByte(ket); err != nil { + return err + } + default: + _, err := fmt.Fprint(w, v.Interface()) + return err + } + return nil +} + +// equivalent to C's isprint. +func isprint(c byte) bool { + return c >= 0x20 && c < 0x7f +} + +// writeString writes a string in the protocol buffer text format. +// It is similar to strconv.Quote except we don't use Go escape sequences, +// we treat the string as a byte sequence, and we use octal escapes. +// These differences are to maintain interoperability with the other +// languages' implementations of the text format. +func writeString(w *textWriter, s string) error { + // use WriteByte here to get any needed indent + if err := w.WriteByte('"'); err != nil { + return err + } + // Loop over the bytes, not the runes. + for i := 0; i < len(s); i++ { + var err error + // Divergence from C++: we don't escape apostrophes. + // There's no need to escape them, and the C++ parser + // copes with a naked apostrophe. + switch c := s[i]; c { + case '\n': + _, err = w.w.Write(backslashN) + case '\r': + _, err = w.w.Write(backslashR) + case '\t': + _, err = w.w.Write(backslashT) + case '"': + _, err = w.w.Write(backslashDQ) + case '\\': + _, err = w.w.Write(backslashBS) + default: + if isprint(c) { + err = w.w.WriteByte(c) + } else { + _, err = fmt.Fprintf(w.w, "\\%03o", c) + } + } + if err != nil { + return err + } + } + return w.WriteByte('"') +} + +func writeUnknownStruct(w *textWriter, data []byte) (err error) { + if !w.compact { + if _, err := fmt.Fprintf(w, "/* %d unknown bytes */\n", len(data)); err != nil { + return err + } + } + b := NewBuffer(data) + for b.index < len(b.buf) { + x, err := b.DecodeVarint() + if err != nil { + _, err := fmt.Fprintf(w, "/* %v */\n", err) + return err + } + wire, tag := x&7, x>>3 + if wire == WireEndGroup { + w.unindent() + if _, err := w.Write(endBraceNewline); err != nil { + return err + } + continue + } + if _, err := fmt.Fprint(w, tag); err != nil { + return err + } + if wire != WireStartGroup { + if err := w.WriteByte(':'); err != nil { + return err + } + } + if !w.compact || wire == WireStartGroup { + if err := w.WriteByte(' '); err != nil { + return err + } + } + switch wire { + case WireBytes: + buf, e := b.DecodeRawBytes(false) + if e == nil { + _, err = fmt.Fprintf(w, "%q", buf) + } else { + _, err = fmt.Fprintf(w, "/* %v */", e) + } + case WireFixed32: + x, err = b.DecodeFixed32() + err = writeUnknownInt(w, x, err) + case WireFixed64: + x, err = b.DecodeFixed64() + err = writeUnknownInt(w, x, err) + case WireStartGroup: + err = w.WriteByte('{') + w.indent() + case WireVarint: + x, err = b.DecodeVarint() + err = writeUnknownInt(w, x, err) + default: + _, err = fmt.Fprintf(w, "/* unknown wire type %d */", wire) + } + if err != nil { + return err + } + if err = w.WriteByte('\n'); err != nil { + return err + } + } + return nil +} + +func writeUnknownInt(w *textWriter, x uint64, err error) error { + if err == nil { + _, err = fmt.Fprint(w, x) + } else { + _, err = fmt.Fprintf(w, "/* %v */", err) + } + return err +} + +type int32Slice []int32 + +func (s int32Slice) Len() int { return len(s) } +func (s int32Slice) Less(i, j int) bool { return s[i] < s[j] } +func (s int32Slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } + +// writeExtensions writes all the extensions in pv. +// pv is assumed to be a pointer to a protocol message struct that is extendable. +func (tm *TextMarshaler) writeExtensions(w *textWriter, pv reflect.Value) error { + emap := extensionMaps[pv.Type().Elem()] + ep := pv.Interface().(extendableProto) + + // Order the extensions by ID. + // This isn't strictly necessary, but it will give us + // canonical output, which will also make testing easier. + m := ep.ExtensionMap() + ids := make([]int32, 0, len(m)) + for id := range m { + ids = append(ids, id) + } + sort.Sort(int32Slice(ids)) + + for _, extNum := range ids { + ext := m[extNum] + var desc *ExtensionDesc + if emap != nil { + desc = emap[extNum] + } + if desc == nil { + // Unknown extension. + if err := writeUnknownStruct(w, ext.enc); err != nil { + return err + } + continue + } + + pb, err := GetExtension(ep, desc) + if err != nil { + return fmt.Errorf("failed getting extension: %v", err) + } + + // Repeated extensions will appear as a slice. + if !desc.repeated() { + if err := tm.writeExtension(w, desc.Name, pb); err != nil { + return err + } + } else { + v := reflect.ValueOf(pb) + for i := 0; i < v.Len(); i++ { + if err := tm.writeExtension(w, desc.Name, v.Index(i).Interface()); err != nil { + return err + } + } + } + } + return nil +} + +func (tm *TextMarshaler) writeExtension(w *textWriter, name string, pb interface{}) error { + if _, err := fmt.Fprintf(w, "[%s]:", name); err != nil { + return err + } + if !w.compact { + if err := w.WriteByte(' '); err != nil { + return err + } + } + if err := tm.writeAny(w, reflect.ValueOf(pb), nil); err != nil { + return err + } + if err := w.WriteByte('\n'); err != nil { + return err + } + return nil +} + +func (w *textWriter) writeIndent() { + if !w.complete { + return + } + remain := w.ind * 2 + for remain > 0 { + n := remain + if n > len(spaces) { + n = len(spaces) + } + w.w.Write(spaces[:n]) + remain -= n + } + w.complete = false +} + +// TextMarshaler is a configurable text format marshaler. +type TextMarshaler struct { + Compact bool // use compact text format (one line). + ExpandAny bool // expand google.protobuf.Any messages of known types +} + +// Marshal writes a given protocol buffer in text format. +// The only errors returned are from w. +func (tm *TextMarshaler) Marshal(w io.Writer, pb Message) error { + val := reflect.ValueOf(pb) + if pb == nil || val.IsNil() { + w.Write([]byte("")) + return nil + } + var bw *bufio.Writer + ww, ok := w.(writer) + if !ok { + bw = bufio.NewWriter(w) + ww = bw + } + aw := &textWriter{ + w: ww, + complete: true, + compact: tm.Compact, + } + + if etm, ok := pb.(encoding.TextMarshaler); ok { + text, err := etm.MarshalText() + if err != nil { + return err + } + if _, err = aw.Write(text); err != nil { + return err + } + if bw != nil { + return bw.Flush() + } + return nil + } + // Dereference the received pointer so we don't have outer < and >. + v := reflect.Indirect(val) + if err := tm.writeStruct(aw, v); err != nil { + return err + } + if bw != nil { + return bw.Flush() + } + return nil +} + +// Text is the same as Marshal, but returns the string directly. +func (tm *TextMarshaler) Text(pb Message) string { + var buf bytes.Buffer + tm.Marshal(&buf, pb) + return buf.String() +} + +var ( + defaultTextMarshaler = TextMarshaler{} + compactTextMarshaler = TextMarshaler{Compact: true} +) + +// TODO: consider removing some of the Marshal functions below. + +// MarshalText writes a given protocol buffer in text format. +// The only errors returned are from w. +func MarshalText(w io.Writer, pb Message) error { return defaultTextMarshaler.Marshal(w, pb) } + +// MarshalTextString is the same as MarshalText, but returns the string directly. +func MarshalTextString(pb Message) string { return defaultTextMarshaler.Text(pb) } + +// CompactText writes a given protocol buffer in compact text format (one line). +func CompactText(w io.Writer, pb Message) error { return compactTextMarshaler.Marshal(w, pb) } + +// CompactTextString is the same as CompactText, but returns the string directly. +func CompactTextString(pb Message) string { return compactTextMarshaler.Text(pb) } diff --git a/vendor/github.com/golang/protobuf/proto/text_parser.go b/vendor/github.com/golang/protobuf/proto/text_parser.go new file mode 100644 index 000000000..b5e1c8e1f --- /dev/null +++ b/vendor/github.com/golang/protobuf/proto/text_parser.go @@ -0,0 +1,871 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2010 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package proto + +// Functions for parsing the Text protocol buffer format. +// TODO: message sets. + +import ( + "encoding" + "errors" + "fmt" + "reflect" + "strconv" + "strings" + "unicode/utf8" +) + +type ParseError struct { + Message string + Line int // 1-based line number + Offset int // 0-based byte offset from start of input +} + +func (p *ParseError) Error() string { + if p.Line == 1 { + // show offset only for first line + return fmt.Sprintf("line 1.%d: %v", p.Offset, p.Message) + } + return fmt.Sprintf("line %d: %v", p.Line, p.Message) +} + +type token struct { + value string + err *ParseError + line int // line number + offset int // byte number from start of input, not start of line + unquoted string // the unquoted version of value, if it was a quoted string +} + +func (t *token) String() string { + if t.err == nil { + return fmt.Sprintf("%q (line=%d, offset=%d)", t.value, t.line, t.offset) + } + return fmt.Sprintf("parse error: %v", t.err) +} + +type textParser struct { + s string // remaining input + done bool // whether the parsing is finished (success or error) + backed bool // whether back() was called + offset, line int + cur token +} + +func newTextParser(s string) *textParser { + p := new(textParser) + p.s = s + p.line = 1 + p.cur.line = 1 + return p +} + +func (p *textParser) errorf(format string, a ...interface{}) *ParseError { + pe := &ParseError{fmt.Sprintf(format, a...), p.cur.line, p.cur.offset} + p.cur.err = pe + p.done = true + return pe +} + +// Numbers and identifiers are matched by [-+._A-Za-z0-9] +func isIdentOrNumberChar(c byte) bool { + switch { + case 'A' <= c && c <= 'Z', 'a' <= c && c <= 'z': + return true + case '0' <= c && c <= '9': + return true + } + switch c { + case '-', '+', '.', '_': + return true + } + return false +} + +func isWhitespace(c byte) bool { + switch c { + case ' ', '\t', '\n', '\r': + return true + } + return false +} + +func isQuote(c byte) bool { + switch c { + case '"', '\'': + return true + } + return false +} + +func (p *textParser) skipWhitespace() { + i := 0 + for i < len(p.s) && (isWhitespace(p.s[i]) || p.s[i] == '#') { + if p.s[i] == '#' { + // comment; skip to end of line or input + for i < len(p.s) && p.s[i] != '\n' { + i++ + } + if i == len(p.s) { + break + } + } + if p.s[i] == '\n' { + p.line++ + } + i++ + } + p.offset += i + p.s = p.s[i:len(p.s)] + if len(p.s) == 0 { + p.done = true + } +} + +func (p *textParser) advance() { + // Skip whitespace + p.skipWhitespace() + if p.done { + return + } + + // Start of non-whitespace + p.cur.err = nil + p.cur.offset, p.cur.line = p.offset, p.line + p.cur.unquoted = "" + switch p.s[0] { + case '<', '>', '{', '}', ':', '[', ']', ';', ',', '/': + // Single symbol + p.cur.value, p.s = p.s[0:1], p.s[1:len(p.s)] + case '"', '\'': + // Quoted string + i := 1 + for i < len(p.s) && p.s[i] != p.s[0] && p.s[i] != '\n' { + if p.s[i] == '\\' && i+1 < len(p.s) { + // skip escaped char + i++ + } + i++ + } + if i >= len(p.s) || p.s[i] != p.s[0] { + p.errorf("unmatched quote") + return + } + unq, err := unquoteC(p.s[1:i], rune(p.s[0])) + if err != nil { + p.errorf("invalid quoted string %s: %v", p.s[0:i+1], err) + return + } + p.cur.value, p.s = p.s[0:i+1], p.s[i+1:len(p.s)] + p.cur.unquoted = unq + default: + i := 0 + for i < len(p.s) && isIdentOrNumberChar(p.s[i]) { + i++ + } + if i == 0 { + p.errorf("unexpected byte %#x", p.s[0]) + return + } + p.cur.value, p.s = p.s[0:i], p.s[i:len(p.s)] + } + p.offset += len(p.cur.value) +} + +var ( + errBadUTF8 = errors.New("proto: bad UTF-8") + errBadHex = errors.New("proto: bad hexadecimal") +) + +func unquoteC(s string, quote rune) (string, error) { + // This is based on C++'s tokenizer.cc. + // Despite its name, this is *not* parsing C syntax. + // For instance, "\0" is an invalid quoted string. + + // Avoid allocation in trivial cases. + simple := true + for _, r := range s { + if r == '\\' || r == quote { + simple = false + break + } + } + if simple { + return s, nil + } + + buf := make([]byte, 0, 3*len(s)/2) + for len(s) > 0 { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", errBadUTF8 + } + s = s[n:] + if r != '\\' { + if r < utf8.RuneSelf { + buf = append(buf, byte(r)) + } else { + buf = append(buf, string(r)...) + } + continue + } + + ch, tail, err := unescape(s) + if err != nil { + return "", err + } + buf = append(buf, ch...) + s = tail + } + return string(buf), nil +} + +func unescape(s string) (ch string, tail string, err error) { + r, n := utf8.DecodeRuneInString(s) + if r == utf8.RuneError && n == 1 { + return "", "", errBadUTF8 + } + s = s[n:] + switch r { + case 'a': + return "\a", s, nil + case 'b': + return "\b", s, nil + case 'f': + return "\f", s, nil + case 'n': + return "\n", s, nil + case 'r': + return "\r", s, nil + case 't': + return "\t", s, nil + case 'v': + return "\v", s, nil + case '?': + return "?", s, nil // trigraph workaround + case '\'', '"', '\\': + return string(r), s, nil + case '0', '1', '2', '3', '4', '5', '6', '7', 'x', 'X': + if len(s) < 2 { + return "", "", fmt.Errorf(`\%c requires 2 following digits`, r) + } + base := 8 + ss := s[:2] + s = s[2:] + if r == 'x' || r == 'X' { + base = 16 + } else { + ss = string(r) + ss + } + i, err := strconv.ParseUint(ss, base, 8) + if err != nil { + return "", "", err + } + return string([]byte{byte(i)}), s, nil + case 'u', 'U': + n := 4 + if r == 'U' { + n = 8 + } + if len(s) < n { + return "", "", fmt.Errorf(`\%c requires %d digits`, r, n) + } + + bs := make([]byte, n/2) + for i := 0; i < n; i += 2 { + a, ok1 := unhex(s[i]) + b, ok2 := unhex(s[i+1]) + if !ok1 || !ok2 { + return "", "", errBadHex + } + bs[i/2] = a<<4 | b + } + s = s[n:] + return string(bs), s, nil + } + return "", "", fmt.Errorf(`unknown escape \%c`, r) +} + +// Adapted from src/pkg/strconv/quote.go. +func unhex(b byte) (v byte, ok bool) { + switch { + case '0' <= b && b <= '9': + return b - '0', true + case 'a' <= b && b <= 'f': + return b - 'a' + 10, true + case 'A' <= b && b <= 'F': + return b - 'A' + 10, true + } + return 0, false +} + +// Back off the parser by one token. Can only be done between calls to next(). +// It makes the next advance() a no-op. +func (p *textParser) back() { p.backed = true } + +// Advances the parser and returns the new current token. +func (p *textParser) next() *token { + if p.backed || p.done { + p.backed = false + return &p.cur + } + p.advance() + if p.done { + p.cur.value = "" + } else if len(p.cur.value) > 0 && isQuote(p.cur.value[0]) { + // Look for multiple quoted strings separated by whitespace, + // and concatenate them. + cat := p.cur + for { + p.skipWhitespace() + if p.done || !isQuote(p.s[0]) { + break + } + p.advance() + if p.cur.err != nil { + return &p.cur + } + cat.value += " " + p.cur.value + cat.unquoted += p.cur.unquoted + } + p.done = false // parser may have seen EOF, but we want to return cat + p.cur = cat + } + return &p.cur +} + +func (p *textParser) consumeToken(s string) error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != s { + p.back() + return p.errorf("expected %q, found %q", s, tok.value) + } + return nil +} + +// Return a RequiredNotSetError indicating which required field was not set. +func (p *textParser) missingRequiredFieldError(sv reflect.Value) *RequiredNotSetError { + st := sv.Type() + sprops := GetProperties(st) + for i := 0; i < st.NumField(); i++ { + if !isNil(sv.Field(i)) { + continue + } + + props := sprops.Prop[i] + if props.Required { + return &RequiredNotSetError{fmt.Sprintf("%v.%v", st, props.OrigName)} + } + } + return &RequiredNotSetError{fmt.Sprintf("%v.", st)} // should not happen +} + +// Returns the index in the struct for the named field, as well as the parsed tag properties. +func structFieldByName(sprops *StructProperties, name string) (int, *Properties, bool) { + i, ok := sprops.decoderOrigNames[name] + if ok { + return i, sprops.Prop[i], true + } + return -1, nil, false +} + +// Consume a ':' from the input stream (if the next token is a colon), +// returning an error if a colon is needed but not present. +func (p *textParser) checkForColon(props *Properties, typ reflect.Type) *ParseError { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ":" { + // Colon is optional when the field is a group or message. + needColon := true + switch props.Wire { + case "group": + needColon = false + case "bytes": + // A "bytes" field is either a message, a string, or a repeated field; + // those three become *T, *string and []T respectively, so we can check for + // this field being a pointer to a non-string. + if typ.Kind() == reflect.Ptr { + // *T or *string + if typ.Elem().Kind() == reflect.String { + break + } + } else if typ.Kind() == reflect.Slice { + // []T or []*T + if typ.Elem().Kind() != reflect.Ptr { + break + } + } else if typ.Kind() == reflect.String { + // The proto3 exception is for a string field, + // which requires a colon. + break + } + needColon = false + } + if needColon { + return p.errorf("expected ':', found %q", tok.value) + } + p.back() + } + return nil +} + +func (p *textParser) readStruct(sv reflect.Value, terminator string) error { + st := sv.Type() + sprops := GetProperties(st) + reqCount := sprops.reqCount + var reqFieldErr error + fieldSet := make(map[string]bool) + // A struct is a sequence of "name: value", terminated by one of + // '>' or '}', or the end of the input. A name may also be + // "[extension]" or "[type/url]". + // + // The whole struct can also be an expanded Any message, like: + // [type/url] < ... struct contents ... > + for { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == terminator { + break + } + if tok.value == "[" { + // Looks like an extension or an Any. + // + // TODO: Check whether we need to handle + // namespace rooted names (e.g. ".something.Foo"). + extName, err := p.consumeExtName() + if err != nil { + return err + } + + if s := strings.LastIndex(extName, "/"); s >= 0 { + // If it contains a slash, it's an Any type URL. + messageName := extName[s+1:] + mt := MessageType(messageName) + if mt == nil { + return p.errorf("unrecognized message %q in google.protobuf.Any", messageName) + } + tok = p.next() + if tok.err != nil { + return tok.err + } + // consume an optional colon + if tok.value == ":" { + tok = p.next() + if tok.err != nil { + return tok.err + } + } + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + v := reflect.New(mt.Elem()) + if pe := p.readStruct(v.Elem(), terminator); pe != nil { + return pe + } + b, err := Marshal(v.Interface().(Message)) + if err != nil { + return p.errorf("failed to marshal message of type %q: %v", messageName, err) + } + sv.FieldByName("TypeUrl").SetString(extName) + sv.FieldByName("Value").SetBytes(b) + continue + } + + var desc *ExtensionDesc + // This could be faster, but it's functional. + // TODO: Do something smarter than a linear scan. + for _, d := range RegisteredExtensions(reflect.New(st).Interface().(Message)) { + if d.Name == extName { + desc = d + break + } + } + if desc == nil { + return p.errorf("unrecognized extension %q", extName) + } + + props := &Properties{} + props.Parse(desc.Tag) + + typ := reflect.TypeOf(desc.ExtensionType) + if err := p.checkForColon(props, typ); err != nil { + return err + } + + rep := desc.repeated() + + // Read the extension structure, and set it in + // the value we're constructing. + var ext reflect.Value + if !rep { + ext = reflect.New(typ).Elem() + } else { + ext = reflect.New(typ.Elem()).Elem() + } + if err := p.readAny(ext, props); err != nil { + if _, ok := err.(*RequiredNotSetError); !ok { + return err + } + reqFieldErr = err + } + ep := sv.Addr().Interface().(extendableProto) + if !rep { + SetExtension(ep, desc, ext.Interface()) + } else { + old, err := GetExtension(ep, desc) + var sl reflect.Value + if err == nil { + sl = reflect.ValueOf(old) // existing slice + } else { + sl = reflect.MakeSlice(typ, 0, 1) + } + sl = reflect.Append(sl, ext) + SetExtension(ep, desc, sl.Interface()) + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + continue + } + + // This is a normal, non-extension field. + name := tok.value + var dst reflect.Value + fi, props, ok := structFieldByName(sprops, name) + if ok { + dst = sv.Field(fi) + } else if oop, ok := sprops.OneofTypes[name]; ok { + // It is a oneof. + props = oop.Prop + nv := reflect.New(oop.Type.Elem()) + dst = nv.Elem().Field(0) + sv.Field(oop.Field).Set(nv) + } + if !dst.IsValid() { + return p.errorf("unknown field name %q in %v", name, st) + } + + if dst.Kind() == reflect.Map { + // Consume any colon. + if err := p.checkForColon(props, dst.Type()); err != nil { + return err + } + + // Construct the map if it doesn't already exist. + if dst.IsNil() { + dst.Set(reflect.MakeMap(dst.Type())) + } + key := reflect.New(dst.Type().Key()).Elem() + val := reflect.New(dst.Type().Elem()).Elem() + + // The map entry should be this sequence of tokens: + // < key : KEY value : VALUE > + // Technically the "key" and "value" could come in any order, + // but in practice they won't. + + tok := p.next() + var terminator string + switch tok.value { + case "<": + terminator = ">" + case "{": + terminator = "}" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + if err := p.consumeToken("key"); err != nil { + return err + } + if err := p.consumeToken(":"); err != nil { + return err + } + if err := p.readAny(key, props.mkeyprop); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + if err := p.consumeToken("value"); err != nil { + return err + } + if err := p.checkForColon(props.mvalprop, dst.Type().Elem()); err != nil { + return err + } + if err := p.readAny(val, props.mvalprop); err != nil { + return err + } + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + if err := p.consumeToken(terminator); err != nil { + return err + } + + dst.SetMapIndex(key, val) + continue + } + + // Check that it's not already set if it's not a repeated field. + if !props.Repeated && fieldSet[name] { + return p.errorf("non-repeated field %q was repeated", name) + } + + if err := p.checkForColon(props, dst.Type()); err != nil { + return err + } + + // Parse into the field. + fieldSet[name] = true + if err := p.readAny(dst, props); err != nil { + if _, ok := err.(*RequiredNotSetError); !ok { + return err + } + reqFieldErr = err + } else if props.Required { + reqCount-- + } + + if err := p.consumeOptionalSeparator(); err != nil { + return err + } + + } + + if reqCount > 0 { + return p.missingRequiredFieldError(sv) + } + return reqFieldErr +} + +// consumeExtName consumes extension name or expanded Any type URL and the +// following ']'. It returns the name or URL consumed. +func (p *textParser) consumeExtName() (string, error) { + tok := p.next() + if tok.err != nil { + return "", tok.err + } + + // If extension name or type url is quoted, it's a single token. + if len(tok.value) > 2 && isQuote(tok.value[0]) && tok.value[len(tok.value)-1] == tok.value[0] { + name, err := unquoteC(tok.value[1:len(tok.value)-1], rune(tok.value[0])) + if err != nil { + return "", err + } + return name, p.consumeToken("]") + } + + // Consume everything up to "]" + var parts []string + for tok.value != "]" { + parts = append(parts, tok.value) + tok = p.next() + if tok.err != nil { + return "", p.errorf("unrecognized type_url or extension name: %s", tok.err) + } + } + return strings.Join(parts, ""), nil +} + +// consumeOptionalSeparator consumes an optional semicolon or comma. +// It is used in readStruct to provide backward compatibility. +func (p *textParser) consumeOptionalSeparator() error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value != ";" && tok.value != "," { + p.back() + } + return nil +} + +func (p *textParser) readAny(v reflect.Value, props *Properties) error { + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == "" { + return p.errorf("unexpected EOF") + } + + switch fv := v; fv.Kind() { + case reflect.Slice: + at := v.Type() + if at.Elem().Kind() == reflect.Uint8 { + // Special case for []byte + if tok.value[0] != '"' && tok.value[0] != '\'' { + // Deliberately written out here, as the error after + // this switch statement would write "invalid []byte: ...", + // which is not as user-friendly. + return p.errorf("invalid string: %v", tok.value) + } + bytes := []byte(tok.unquoted) + fv.Set(reflect.ValueOf(bytes)) + return nil + } + // Repeated field. + if tok.value == "[" { + // Repeated field with list notation, like [1,2,3]. + for { + fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) + err := p.readAny(fv.Index(fv.Len()-1), props) + if err != nil { + return err + } + tok := p.next() + if tok.err != nil { + return tok.err + } + if tok.value == "]" { + break + } + if tok.value != "," { + return p.errorf("Expected ']' or ',' found %q", tok.value) + } + } + return nil + } + // One value of the repeated field. + p.back() + fv.Set(reflect.Append(fv, reflect.New(at.Elem()).Elem())) + return p.readAny(fv.Index(fv.Len()-1), props) + case reflect.Bool: + // Either "true", "false", 1 or 0. + switch tok.value { + case "true", "1": + fv.SetBool(true) + return nil + case "false", "0": + fv.SetBool(false) + return nil + } + case reflect.Float32, reflect.Float64: + v := tok.value + // Ignore 'f' for compatibility with output generated by C++, but don't + // remove 'f' when the value is "-inf" or "inf". + if strings.HasSuffix(v, "f") && tok.value != "-inf" && tok.value != "inf" { + v = v[:len(v)-1] + } + if f, err := strconv.ParseFloat(v, fv.Type().Bits()); err == nil { + fv.SetFloat(f) + return nil + } + case reflect.Int32: + if x, err := strconv.ParseInt(tok.value, 0, 32); err == nil { + fv.SetInt(x) + return nil + } + + if len(props.Enum) == 0 { + break + } + m, ok := enumValueMaps[props.Enum] + if !ok { + break + } + x, ok := m[tok.value] + if !ok { + break + } + fv.SetInt(int64(x)) + return nil + case reflect.Int64: + if x, err := strconv.ParseInt(tok.value, 0, 64); err == nil { + fv.SetInt(x) + return nil + } + + case reflect.Ptr: + // A basic field (indirected through pointer), or a repeated message/group + p.back() + fv.Set(reflect.New(fv.Type().Elem())) + return p.readAny(fv.Elem(), props) + case reflect.String: + if tok.value[0] == '"' || tok.value[0] == '\'' { + fv.SetString(tok.unquoted) + return nil + } + case reflect.Struct: + var terminator string + switch tok.value { + case "{": + terminator = "}" + case "<": + terminator = ">" + default: + return p.errorf("expected '{' or '<', found %q", tok.value) + } + // TODO: Handle nested messages which implement encoding.TextUnmarshaler. + return p.readStruct(fv, terminator) + case reflect.Uint32: + if x, err := strconv.ParseUint(tok.value, 0, 32); err == nil { + fv.SetUint(uint64(x)) + return nil + } + case reflect.Uint64: + if x, err := strconv.ParseUint(tok.value, 0, 64); err == nil { + fv.SetUint(x) + return nil + } + } + return p.errorf("invalid %v: %v", v.Type(), tok.value) +} + +// UnmarshalText reads a protocol buffer in Text format. UnmarshalText resets pb +// before starting to unmarshal, so any existing data in pb is always removed. +// If a required field is not set and no other error occurs, +// UnmarshalText returns *RequiredNotSetError. +func UnmarshalText(s string, pb Message) error { + if um, ok := pb.(encoding.TextUnmarshaler); ok { + err := um.UnmarshalText([]byte(s)) + return err + } + pb.Reset() + v := reflect.ValueOf(pb) + if pe := newTextParser(s).readStruct(v.Elem(), ""); pe != nil { + return pe + } + return nil +} diff --git a/vendor/github.com/golang/snappy/AUTHORS b/vendor/github.com/golang/snappy/AUTHORS new file mode 100644 index 000000000..bcfa19520 --- /dev/null +++ b/vendor/github.com/golang/snappy/AUTHORS @@ -0,0 +1,15 @@ +# This is the official list of Snappy-Go authors for copyright purposes. +# This file is distinct from the CONTRIBUTORS files. +# See the latter for an explanation. + +# Names should be added to this file as +# Name or Organization +# The email address is not required for organizations. + +# Please keep the list sorted. + +Damian Gryski +Google Inc. +Jan Mercl <0xjnml@gmail.com> +Rodolfo Carvalho +Sebastien Binet diff --git a/vendor/github.com/golang/snappy/CONTRIBUTORS b/vendor/github.com/golang/snappy/CONTRIBUTORS new file mode 100644 index 000000000..931ae3160 --- /dev/null +++ b/vendor/github.com/golang/snappy/CONTRIBUTORS @@ -0,0 +1,37 @@ +# This is the official list of people who can contribute +# (and typically have contributed) code to the Snappy-Go repository. +# The AUTHORS file lists the copyright holders; this file +# lists people. For example, Google employees are listed here +# but not in AUTHORS, because Google holds the copyright. +# +# The submission process automatically checks to make sure +# that people submitting code are listed in this file (by email address). +# +# Names should be added to this file only after verifying that +# the individual or the individual's organization has agreed to +# the appropriate Contributor License Agreement, found here: +# +# http://code.google.com/legal/individual-cla-v1.0.html +# http://code.google.com/legal/corporate-cla-v1.0.html +# +# The agreement for individuals can be filled out on the web. +# +# When adding J Random Contributor's name to this file, +# either J's name or J's organization's name should be +# added to the AUTHORS file, depending on whether the +# individual or corporate CLA was used. + +# Names should be added to this file like so: +# Name + +# Please keep the list sorted. + +Damian Gryski +Jan Mercl <0xjnml@gmail.com> +Kai Backman +Marc-Antoine Ruel +Nigel Tao +Rob Pike +Rodolfo Carvalho +Russ Cox +Sebastien Binet diff --git a/vendor/github.com/golang/snappy/LICENSE b/vendor/github.com/golang/snappy/LICENSE new file mode 100644 index 000000000..6050c10f4 --- /dev/null +++ b/vendor/github.com/golang/snappy/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2011 The Snappy-Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/golang/snappy/README b/vendor/github.com/golang/snappy/README new file mode 100644 index 000000000..5074bbab8 --- /dev/null +++ b/vendor/github.com/golang/snappy/README @@ -0,0 +1,7 @@ +The Snappy compression format in the Go programming language. + +To download and install from source: +$ go get github.com/golang/snappy + +Unless otherwise noted, the Snappy-Go source files are distributed +under the BSD-style license found in the LICENSE file. diff --git a/vendor/github.com/golang/snappy/decode.go b/vendor/github.com/golang/snappy/decode.go new file mode 100644 index 000000000..7be590cee --- /dev/null +++ b/vendor/github.com/golang/snappy/decode.go @@ -0,0 +1,237 @@ +// Copyright 2011 The Snappy-Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package snappy + +import ( + "encoding/binary" + "errors" + "io" +) + +var ( + // ErrCorrupt reports that the input is invalid. + ErrCorrupt = errors.New("snappy: corrupt input") + // ErrTooLarge reports that the uncompressed length is too large. + ErrTooLarge = errors.New("snappy: decoded block is too large") + // ErrUnsupported reports that the input isn't supported. + ErrUnsupported = errors.New("snappy: unsupported input") + + errUnsupportedCopy4Tag = errors.New("snappy: unsupported COPY_4 tag") + errUnsupportedLiteralLength = errors.New("snappy: unsupported literal length") +) + +// DecodedLen returns the length of the decoded block. +func DecodedLen(src []byte) (int, error) { + v, _, err := decodedLen(src) + return v, err +} + +// decodedLen returns the length of the decoded block and the number of bytes +// that the length header occupied. +func decodedLen(src []byte) (blockLen, headerLen int, err error) { + v, n := binary.Uvarint(src) + if n <= 0 || v > 0xffffffff { + return 0, 0, ErrCorrupt + } + + const wordSize = 32 << (^uint(0) >> 32 & 1) + if wordSize == 32 && v > 0x7fffffff { + return 0, 0, ErrTooLarge + } + return int(v), n, nil +} + +const ( + decodeErrCodeCorrupt = 1 + decodeErrCodeUnsupportedLiteralLength = 2 + decodeErrCodeUnsupportedCopy4Tag = 3 +) + +// Decode returns the decoded form of src. The returned slice may be a sub- +// slice of dst if dst was large enough to hold the entire decoded block. +// Otherwise, a newly allocated slice will be returned. +// +// The dst and src must not overlap. It is valid to pass a nil dst. +func Decode(dst, src []byte) ([]byte, error) { + dLen, s, err := decodedLen(src) + if err != nil { + return nil, err + } + if dLen <= len(dst) { + dst = dst[:dLen] + } else { + dst = make([]byte, dLen) + } + switch decode(dst, src[s:]) { + case 0: + return dst, nil + case decodeErrCodeUnsupportedLiteralLength: + return nil, errUnsupportedLiteralLength + case decodeErrCodeUnsupportedCopy4Tag: + return nil, errUnsupportedCopy4Tag + } + return nil, ErrCorrupt +} + +// NewReader returns a new Reader that decompresses from r, using the framing +// format described at +// https://github.com/google/snappy/blob/master/framing_format.txt +func NewReader(r io.Reader) *Reader { + return &Reader{ + r: r, + decoded: make([]byte, maxBlockSize), + buf: make([]byte, maxEncodedLenOfMaxBlockSize+checksumSize), + } +} + +// Reader is an io.Reader that can read Snappy-compressed bytes. +type Reader struct { + r io.Reader + err error + decoded []byte + buf []byte + // decoded[i:j] contains decoded bytes that have not yet been passed on. + i, j int + readHeader bool +} + +// Reset discards any buffered data, resets all state, and switches the Snappy +// reader to read from r. This permits reusing a Reader rather than allocating +// a new one. +func (r *Reader) Reset(reader io.Reader) { + r.r = reader + r.err = nil + r.i = 0 + r.j = 0 + r.readHeader = false +} + +func (r *Reader) readFull(p []byte) (ok bool) { + if _, r.err = io.ReadFull(r.r, p); r.err != nil { + if r.err == io.ErrUnexpectedEOF { + r.err = ErrCorrupt + } + return false + } + return true +} + +// Read satisfies the io.Reader interface. +func (r *Reader) Read(p []byte) (int, error) { + if r.err != nil { + return 0, r.err + } + for { + if r.i < r.j { + n := copy(p, r.decoded[r.i:r.j]) + r.i += n + return n, nil + } + if !r.readFull(r.buf[:4]) { + return 0, r.err + } + chunkType := r.buf[0] + if !r.readHeader { + if chunkType != chunkTypeStreamIdentifier { + r.err = ErrCorrupt + return 0, r.err + } + r.readHeader = true + } + chunkLen := int(r.buf[1]) | int(r.buf[2])<<8 | int(r.buf[3])<<16 + if chunkLen > len(r.buf) { + r.err = ErrUnsupported + return 0, r.err + } + + // The chunk types are specified at + // https://github.com/google/snappy/blob/master/framing_format.txt + switch chunkType { + case chunkTypeCompressedData: + // Section 4.2. Compressed data (chunk type 0x00). + if chunkLen < checksumSize { + r.err = ErrCorrupt + return 0, r.err + } + buf := r.buf[:chunkLen] + if !r.readFull(buf) { + return 0, r.err + } + checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24 + buf = buf[checksumSize:] + + n, err := DecodedLen(buf) + if err != nil { + r.err = err + return 0, r.err + } + if n > len(r.decoded) { + r.err = ErrCorrupt + return 0, r.err + } + if _, err := Decode(r.decoded, buf); err != nil { + r.err = err + return 0, r.err + } + if crc(r.decoded[:n]) != checksum { + r.err = ErrCorrupt + return 0, r.err + } + r.i, r.j = 0, n + continue + + case chunkTypeUncompressedData: + // Section 4.3. Uncompressed data (chunk type 0x01). + if chunkLen < checksumSize { + r.err = ErrCorrupt + return 0, r.err + } + buf := r.buf[:checksumSize] + if !r.readFull(buf) { + return 0, r.err + } + checksum := uint32(buf[0]) | uint32(buf[1])<<8 | uint32(buf[2])<<16 | uint32(buf[3])<<24 + // Read directly into r.decoded instead of via r.buf. + n := chunkLen - checksumSize + if !r.readFull(r.decoded[:n]) { + return 0, r.err + } + if crc(r.decoded[:n]) != checksum { + r.err = ErrCorrupt + return 0, r.err + } + r.i, r.j = 0, n + continue + + case chunkTypeStreamIdentifier: + // Section 4.1. Stream identifier (chunk type 0xff). + if chunkLen != len(magicBody) { + r.err = ErrCorrupt + return 0, r.err + } + if !r.readFull(r.buf[:len(magicBody)]) { + return 0, r.err + } + for i := 0; i < len(magicBody); i++ { + if r.buf[i] != magicBody[i] { + r.err = ErrCorrupt + return 0, r.err + } + } + continue + } + + if chunkType <= 0x7f { + // Section 4.5. Reserved unskippable chunks (chunk types 0x02-0x7f). + r.err = ErrUnsupported + return 0, r.err + } + // Section 4.4 Padding (chunk type 0xfe). + // Section 4.6. Reserved skippable chunks (chunk types 0x80-0xfd). + if !r.readFull(r.buf[:chunkLen]) { + return 0, r.err + } + } +} diff --git a/vendor/github.com/golang/snappy/decode_amd64.go b/vendor/github.com/golang/snappy/decode_amd64.go new file mode 100644 index 000000000..32bce4709 --- /dev/null +++ b/vendor/github.com/golang/snappy/decode_amd64.go @@ -0,0 +1,10 @@ +// Copyright 2016 The Snappy-Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package snappy + +// decode has the same semantics as in decode_other.go. +// +//go:noescape +func decode(dst, src []byte) int diff --git a/vendor/github.com/golang/snappy/decode_amd64.s b/vendor/github.com/golang/snappy/decode_amd64.s new file mode 100644 index 000000000..c33f5bf97 --- /dev/null +++ b/vendor/github.com/golang/snappy/decode_amd64.s @@ -0,0 +1,472 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#include "textflag.h" + +// func decode(dst, src []byte) int +// +// The asm code generally follows the pure Go code in decode_other.go, except +// where marked with a "!!!". +// +// All local variables fit into registers. The non-zero stack size is only to +// spill registers and push args when issuing a CALL. The register allocation: +// - AX scratch +// - BX scratch +// - CX length or x +// - DX offset +// - SI &src[s] +// - DI &dst[d] +// + R8 dst_base +// + R9 dst_len +// + R10 dst_base + dst_len +// + R11 src_base +// + R12 src_len +// + R13 src_base + src_len +// - R14 used by doCopy +// - R15 used by doCopy +// +// The registers R8-R13 (marked with a "+") are set at the start of the +// function, and after a CALL returns, and are not otherwise modified. +// +// The d variable is implicitly DI - R8, and len(dst)-d is R10 - DI. +// The s variable is implicitly SI - R11, and len(src)-s is R13 - SI. +TEXT ·decode(SB), NOSPLIT, $48-56 + // Initialize SI, DI and R8-R13. + MOVQ dst_base+0(FP), R8 + MOVQ dst_len+8(FP), R9 + MOVQ R8, DI + MOVQ R8, R10 + ADDQ R9, R10 + MOVQ src_base+24(FP), R11 + MOVQ src_len+32(FP), R12 + MOVQ R11, SI + MOVQ R11, R13 + ADDQ R12, R13 + +loop: + // for s < len(src) + CMPQ SI, R13 + JEQ end + + // CX = uint32(src[s]) + // + // switch src[s] & 0x03 + MOVBLZX (SI), CX + MOVL CX, BX + ANDL $3, BX + CMPL BX, $1 + JAE tagCopy + + // ---------------------------------------- + // The code below handles literal tags. + + // case tagLiteral: + // x := uint32(src[s] >> 2) + // switch + SHRL $2, CX + CMPL CX, $60 + JAE tagLit60Plus + + // case x < 60: + // s++ + INCQ SI + +doLit: + // This is the end of the inner "switch", when we have a literal tag. + // + // We assume that CX == x and x fits in a uint32, where x is the variable + // used in the pure Go decode_other.go code. + + // length = int(x) + 1 + // + // Unlike the pure Go code, we don't need to check if length <= 0 because + // CX can hold 64 bits, so the increment cannot overflow. + INCQ CX + + // Prepare to check if copying length bytes will run past the end of dst or + // src. + // + // AX = len(dst) - d + // BX = len(src) - s + MOVQ R10, AX + SUBQ DI, AX + MOVQ R13, BX + SUBQ SI, BX + + // !!! Try a faster technique for short (16 or fewer bytes) copies. + // + // if length > 16 || len(dst)-d < 16 || len(src)-s < 16 { + // goto callMemmove // Fall back on calling runtime·memmove. + // } + // + // The C++ snappy code calls this TryFastAppend. It also checks len(src)-s + // against 21 instead of 16, because it cannot assume that all of its input + // is contiguous in memory and so it needs to leave enough source bytes to + // read the next tag without refilling buffers, but Go's Decode assumes + // contiguousness (the src argument is a []byte). + CMPQ CX, $16 + JGT callMemmove + CMPQ AX, $16 + JLT callMemmove + CMPQ BX, $16 + JLT callMemmove + + // !!! Implement the copy from src to dst as a 16-byte load and store. + // (Decode's documentation says that dst and src must not overlap.) + // + // This always copies 16 bytes, instead of only length bytes, but that's + // OK. If the input is a valid Snappy encoding then subsequent iterations + // will fix up the overrun. Otherwise, Decode returns a nil []byte (and a + // non-nil error), so the overrun will be ignored. + // + // Note that on amd64, it is legal and cheap to issue unaligned 8-byte or + // 16-byte loads and stores. This technique probably wouldn't be as + // effective on architectures that are fussier about alignment. + MOVOU 0(SI), X0 + MOVOU X0, 0(DI) + + // d += length + // s += length + ADDQ CX, DI + ADDQ CX, SI + JMP loop + +callMemmove: + // if length > len(dst)-d || length > len(src)-s { etc } + CMPQ CX, AX + JGT errCorrupt + CMPQ CX, BX + JGT errCorrupt + + // copy(dst[d:], src[s:s+length]) + // + // This means calling runtime·memmove(&dst[d], &src[s], length), so we push + // DI, SI and CX as arguments. Coincidentally, we also need to spill those + // three registers to the stack, to save local variables across the CALL. + MOVQ DI, 0(SP) + MOVQ SI, 8(SP) + MOVQ CX, 16(SP) + MOVQ DI, 24(SP) + MOVQ SI, 32(SP) + MOVQ CX, 40(SP) + CALL runtime·memmove(SB) + + // Restore local variables: unspill registers from the stack and + // re-calculate R8-R13. + MOVQ 24(SP), DI + MOVQ 32(SP), SI + MOVQ 40(SP), CX + MOVQ dst_base+0(FP), R8 + MOVQ dst_len+8(FP), R9 + MOVQ R8, R10 + ADDQ R9, R10 + MOVQ src_base+24(FP), R11 + MOVQ src_len+32(FP), R12 + MOVQ R11, R13 + ADDQ R12, R13 + + // d += length + // s += length + ADDQ CX, DI + ADDQ CX, SI + JMP loop + +tagLit60Plus: + // !!! This fragment does the + // + // s += x - 58; if uint(s) > uint(len(src)) { etc } + // + // checks. In the asm version, we code it once instead of once per switch case. + ADDQ CX, SI + SUBQ $58, SI + MOVQ SI, BX + SUBQ R11, BX + CMPQ BX, R12 + JA errCorrupt + + // case x == 60: + CMPL CX, $61 + JEQ tagLit61 + JA tagLit62Plus + + // x = uint32(src[s-1]) + MOVBLZX -1(SI), CX + JMP doLit + +tagLit61: + // case x == 61: + // x = uint32(src[s-2]) | uint32(src[s-1])<<8 + MOVWLZX -2(SI), CX + JMP doLit + +tagLit62Plus: + CMPL CX, $62 + JA tagLit63 + + // case x == 62: + // x = uint32(src[s-3]) | uint32(src[s-2])<<8 | uint32(src[s-1])<<16 + MOVWLZX -3(SI), CX + MOVBLZX -1(SI), BX + SHLL $16, BX + ORL BX, CX + JMP doLit + +tagLit63: + // case x == 63: + // x = uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24 + MOVL -4(SI), CX + JMP doLit + +// The code above handles literal tags. +// ---------------------------------------- +// The code below handles copy tags. + +tagCopy2: + // case tagCopy2: + // s += 3 + ADDQ $3, SI + + // if uint(s) > uint(len(src)) { etc } + MOVQ SI, BX + SUBQ R11, BX + CMPQ BX, R12 + JA errCorrupt + + // length = 1 + int(src[s-3])>>2 + SHRQ $2, CX + INCQ CX + + // offset = int(src[s-2]) | int(src[s-1])<<8 + MOVWQZX -2(SI), DX + JMP doCopy + +tagCopy: + // We have a copy tag. We assume that: + // - BX == src[s] & 0x03 + // - CX == src[s] + CMPQ BX, $2 + JEQ tagCopy2 + JA errUC4T + + // case tagCopy1: + // s += 2 + ADDQ $2, SI + + // if uint(s) > uint(len(src)) { etc } + MOVQ SI, BX + SUBQ R11, BX + CMPQ BX, R12 + JA errCorrupt + + // offset = int(src[s-2])&0xe0<<3 | int(src[s-1]) + MOVQ CX, DX + ANDQ $0xe0, DX + SHLQ $3, DX + MOVBQZX -1(SI), BX + ORQ BX, DX + + // length = 4 + int(src[s-2])>>2&0x7 + SHRQ $2, CX + ANDQ $7, CX + ADDQ $4, CX + +doCopy: + // This is the end of the outer "switch", when we have a copy tag. + // + // We assume that: + // - CX == length && CX > 0 + // - DX == offset + + // if offset <= 0 { etc } + CMPQ DX, $0 + JLE errCorrupt + + // if d < offset { etc } + MOVQ DI, BX + SUBQ R8, BX + CMPQ BX, DX + JLT errCorrupt + + // if length > len(dst)-d { etc } + MOVQ R10, BX + SUBQ DI, BX + CMPQ CX, BX + JGT errCorrupt + + // forwardCopy(dst[d:d+length], dst[d-offset:]); d += length + // + // Set: + // - R14 = len(dst)-d + // - R15 = &dst[d-offset] + MOVQ R10, R14 + SUBQ DI, R14 + MOVQ DI, R15 + SUBQ DX, R15 + + // !!! Try a faster technique for short (16 or fewer bytes) forward copies. + // + // First, try using two 8-byte load/stores, similar to the doLit technique + // above. Even if dst[d:d+length] and dst[d-offset:] can overlap, this is + // still OK if offset >= 8. Note that this has to be two 8-byte load/stores + // and not one 16-byte load/store, and the first store has to be before the + // second load, due to the overlap if offset is in the range [8, 16). + // + // if length > 16 || offset < 8 || len(dst)-d < 16 { + // goto slowForwardCopy + // } + // copy 16 bytes + // d += length + CMPQ CX, $16 + JGT slowForwardCopy + CMPQ DX, $8 + JLT slowForwardCopy + CMPQ R14, $16 + JLT slowForwardCopy + MOVQ 0(R15), AX + MOVQ AX, 0(DI) + MOVQ 8(R15), BX + MOVQ BX, 8(DI) + ADDQ CX, DI + JMP loop + +slowForwardCopy: + // !!! If the forward copy is longer than 16 bytes, or if offset < 8, we + // can still try 8-byte load stores, provided we can overrun up to 10 extra + // bytes. As above, the overrun will be fixed up by subsequent iterations + // of the outermost loop. + // + // The C++ snappy code calls this technique IncrementalCopyFastPath. Its + // commentary says: + // + // ---- + // + // The main part of this loop is a simple copy of eight bytes at a time + // until we've copied (at least) the requested amount of bytes. However, + // if d and d-offset are less than eight bytes apart (indicating a + // repeating pattern of length < 8), we first need to expand the pattern in + // order to get the correct results. For instance, if the buffer looks like + // this, with the eight-byte and patterns marked as + // intervals: + // + // abxxxxxxxxxxxx + // [------] d-offset + // [------] d + // + // a single eight-byte copy from to will repeat the pattern + // once, after which we can move two bytes without moving : + // + // ababxxxxxxxxxx + // [------] d-offset + // [------] d + // + // and repeat the exercise until the two no longer overlap. + // + // This allows us to do very well in the special case of one single byte + // repeated many times, without taking a big hit for more general cases. + // + // The worst case of extra writing past the end of the match occurs when + // offset == 1 and length == 1; the last copy will read from byte positions + // [0..7] and write to [4..11], whereas it was only supposed to write to + // position 1. Thus, ten excess bytes. + // + // ---- + // + // That "10 byte overrun" worst case is confirmed by Go's + // TestSlowForwardCopyOverrun, which also tests the fixUpSlowForwardCopy + // and finishSlowForwardCopy algorithm. + // + // if length > len(dst)-d-10 { + // goto verySlowForwardCopy + // } + SUBQ $10, R14 + CMPQ CX, R14 + JGT verySlowForwardCopy + +makeOffsetAtLeast8: + // !!! As above, expand the pattern so that offset >= 8 and we can use + // 8-byte load/stores. + // + // for offset < 8 { + // copy 8 bytes from dst[d-offset:] to dst[d:] + // length -= offset + // d += offset + // offset += offset + // // The two previous lines together means that d-offset, and therefore + // // R15, is unchanged. + // } + CMPQ DX, $8 + JGE fixUpSlowForwardCopy + MOVQ (R15), BX + MOVQ BX, (DI) + SUBQ DX, CX + ADDQ DX, DI + ADDQ DX, DX + JMP makeOffsetAtLeast8 + +fixUpSlowForwardCopy: + // !!! Add length (which might be negative now) to d (implied by DI being + // &dst[d]) so that d ends up at the right place when we jump back to the + // top of the loop. Before we do that, though, we save DI to AX so that, if + // length is positive, copying the remaining length bytes will write to the + // right place. + MOVQ DI, AX + ADDQ CX, DI + +finishSlowForwardCopy: + // !!! Repeat 8-byte load/stores until length <= 0. Ending with a negative + // length means that we overrun, but as above, that will be fixed up by + // subsequent iterations of the outermost loop. + CMPQ CX, $0 + JLE loop + MOVQ (R15), BX + MOVQ BX, (AX) + ADDQ $8, R15 + ADDQ $8, AX + SUBQ $8, CX + JMP finishSlowForwardCopy + +verySlowForwardCopy: + // verySlowForwardCopy is a simple implementation of forward copy. In C + // parlance, this is a do/while loop instead of a while loop, since we know + // that length > 0. In Go syntax: + // + // for { + // dst[d] = dst[d - offset] + // d++ + // length-- + // if length == 0 { + // break + // } + // } + MOVB (R15), BX + MOVB BX, (DI) + INCQ R15 + INCQ DI + DECQ CX + JNZ verySlowForwardCopy + JMP loop + +// The code above handles copy tags. +// ---------------------------------------- + +end: + // This is the end of the "for s < len(src)". + // + // if d != len(dst) { etc } + CMPQ DI, R10 + JNE errCorrupt + + // return 0 + MOVQ $0, ret+48(FP) + RET + +errCorrupt: + // return decodeErrCodeCorrupt + MOVQ $1, ret+48(FP) + RET + +errUC4T: + // return decodeErrCodeUnsupportedCopy4Tag + MOVQ $3, ret+48(FP) + RET diff --git a/vendor/github.com/golang/snappy/decode_other.go b/vendor/github.com/golang/snappy/decode_other.go new file mode 100644 index 000000000..1a8114ab1 --- /dev/null +++ b/vendor/github.com/golang/snappy/decode_other.go @@ -0,0 +1,96 @@ +// Copyright 2016 The Snappy-Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !amd64 + +package snappy + +// decode writes the decoding of src to dst. It assumes that the varint-encoded +// length of the decompressed bytes has already been read, and that len(dst) +// equals that length. +// +// It returns 0 on success or a decodeErrCodeXxx error code on failure. +func decode(dst, src []byte) int { + var d, s, offset, length int + for s < len(src) { + switch src[s] & 0x03 { + case tagLiteral: + x := uint32(src[s] >> 2) + switch { + case x < 60: + s++ + case x == 60: + s += 2 + if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. + return decodeErrCodeCorrupt + } + x = uint32(src[s-1]) + case x == 61: + s += 3 + if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. + return decodeErrCodeCorrupt + } + x = uint32(src[s-2]) | uint32(src[s-1])<<8 + case x == 62: + s += 4 + if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. + return decodeErrCodeCorrupt + } + x = uint32(src[s-3]) | uint32(src[s-2])<<8 | uint32(src[s-1])<<16 + case x == 63: + s += 5 + if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. + return decodeErrCodeCorrupt + } + x = uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24 + } + length = int(x) + 1 + if length <= 0 { + return decodeErrCodeUnsupportedLiteralLength + } + if length > len(dst)-d || length > len(src)-s { + return decodeErrCodeCorrupt + } + copy(dst[d:], src[s:s+length]) + d += length + s += length + continue + + case tagCopy1: + s += 2 + if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. + return decodeErrCodeCorrupt + } + length = 4 + int(src[s-2])>>2&0x7 + offset = int(src[s-2])&0xe0<<3 | int(src[s-1]) + + case tagCopy2: + s += 3 + if uint(s) > uint(len(src)) { // The uint conversions catch overflow from the previous line. + return decodeErrCodeCorrupt + } + length = 1 + int(src[s-3])>>2 + offset = int(src[s-2]) | int(src[s-1])<<8 + + case tagCopy4: + return decodeErrCodeUnsupportedCopy4Tag + } + + if offset <= 0 || d < offset || length > len(dst)-d { + return decodeErrCodeCorrupt + } + // Copy from an earlier sub-slice of dst to a later sub-slice. Unlike + // the built-in copy function, this byte-by-byte copy always runs + // forwards, even if the slices overlap. Conceptually, this is: + // + // d += forwardCopy(dst[d:d+length], dst[d-offset:]) + for end := d + length; d != end; d++ { + dst[d] = dst[d-offset] + } + } + if d != len(dst) { + return decodeErrCodeCorrupt + } + return 0 +} diff --git a/vendor/github.com/golang/snappy/encode.go b/vendor/github.com/golang/snappy/encode.go new file mode 100644 index 000000000..38ebe952e --- /dev/null +++ b/vendor/github.com/golang/snappy/encode.go @@ -0,0 +1,403 @@ +// Copyright 2011 The Snappy-Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package snappy + +import ( + "encoding/binary" + "errors" + "io" +) + +// maxOffset limits how far copy back-references can go, the same as the C++ +// code. +const maxOffset = 1 << 15 + +// emitLiteral writes a literal chunk and returns the number of bytes written. +func emitLiteral(dst, lit []byte) int { + i, n := 0, uint(len(lit)-1) + switch { + case n < 60: + dst[0] = uint8(n)<<2 | tagLiteral + i = 1 + case n < 1<<8: + dst[0] = 60<<2 | tagLiteral + dst[1] = uint8(n) + i = 2 + case n < 1<<16: + dst[0] = 61<<2 | tagLiteral + dst[1] = uint8(n) + dst[2] = uint8(n >> 8) + i = 3 + case n < 1<<24: + dst[0] = 62<<2 | tagLiteral + dst[1] = uint8(n) + dst[2] = uint8(n >> 8) + dst[3] = uint8(n >> 16) + i = 4 + case int64(n) < 1<<32: + dst[0] = 63<<2 | tagLiteral + dst[1] = uint8(n) + dst[2] = uint8(n >> 8) + dst[3] = uint8(n >> 16) + dst[4] = uint8(n >> 24) + i = 5 + default: + panic("snappy: source buffer is too long") + } + if copy(dst[i:], lit) != len(lit) { + panic("snappy: destination buffer is too short") + } + return i + len(lit) +} + +// emitCopy writes a copy chunk and returns the number of bytes written. +func emitCopy(dst []byte, offset, length int32) int { + i := 0 + for length > 0 { + x := length - 4 + if 0 <= x && x < 1<<3 && offset < 1<<11 { + dst[i+0] = uint8(offset>>8)&0x07<<5 | uint8(x)<<2 | tagCopy1 + dst[i+1] = uint8(offset) + i += 2 + break + } + + x = length + if x > 1<<6 { + x = 1 << 6 + } + dst[i+0] = uint8(x-1)<<2 | tagCopy2 + dst[i+1] = uint8(offset) + dst[i+2] = uint8(offset >> 8) + i += 3 + length -= x + } + return i +} + +// Encode returns the encoded form of src. The returned slice may be a sub- +// slice of dst if dst was large enough to hold the entire encoded block. +// Otherwise, a newly allocated slice will be returned. +// +// It is valid to pass a nil dst. +func Encode(dst, src []byte) []byte { + if n := MaxEncodedLen(len(src)); n < 0 { + panic(ErrTooLarge) + } else if len(dst) < n { + dst = make([]byte, n) + } + + // The block starts with the varint-encoded length of the decompressed bytes. + d := binary.PutUvarint(dst, uint64(len(src))) + + for len(src) > 0 { + p := src + src = nil + if len(p) > maxBlockSize { + p, src = p[:maxBlockSize], p[maxBlockSize:] + } + d += encodeBlock(dst[d:], p) + } + return dst[:d] +} + +// encodeBlock encodes a non-empty src to a guaranteed-large-enough dst. It +// assumes that the varint-encoded length of the decompressed bytes has already +// been written. +// +// It also assumes that: +// len(dst) >= MaxEncodedLen(len(src)) && +// 0 < len(src) && len(src) <= maxBlockSize +func encodeBlock(dst, src []byte) (d int) { + // Return early if src is short. + if len(src) <= 4 { + return emitLiteral(dst, src) + } + + // Initialize the hash table. Its size ranges from 1<<8 to 1<<14 inclusive. + const maxTableSize = 1 << 14 + shift, tableSize := uint(32-8), 1<<8 + for tableSize < maxTableSize && tableSize < len(src) { + shift-- + tableSize *= 2 + } + var table [maxTableSize]int32 + + // Iterate over the source bytes. + var ( + s int32 // The iterator position. + t int32 // The last position with the same hash as s. + lit int32 // The start position of any pending literal bytes. + + // Copied from the C++ snappy implementation: + // + // Heuristic match skipping: If 32 bytes are scanned with no matches + // found, start looking only at every other byte. If 32 more bytes are + // scanned, look at every third byte, etc.. When a match is found, + // immediately go back to looking at every byte. This is a small loss + // (~5% performance, ~0.1% density) for compressible data due to more + // bookkeeping, but for non-compressible data (such as JPEG) it's a + // huge win since the compressor quickly "realizes" the data is + // incompressible and doesn't bother looking for matches everywhere. + // + // The "skip" variable keeps track of how many bytes there are since + // the last match; dividing it by 32 (ie. right-shifting by five) gives + // the number of bytes to move ahead for each iteration. + skip uint32 = 32 + ) + for uint32(s+3) < uint32(len(src)) { // The uint32 conversions catch overflow from the +3. + // Update the hash table. + b0, b1, b2, b3 := src[s], src[s+1], src[s+2], src[s+3] + h := uint32(b0) | uint32(b1)<<8 | uint32(b2)<<16 | uint32(b3)<<24 + p := &table[(h*0x1e35a7bd)>>shift] + // We need to to store values in [-1, inf) in table. To save + // some initialization time, (re)use the table's zero value + // and shift the values against this zero: add 1 on writes, + // subtract 1 on reads. + t, *p = *p-1, s+1 + // If t is invalid or src[s:s+4] differs from src[t:t+4], accumulate a literal byte. + if t < 0 || s-t >= maxOffset || b0 != src[t] || b1 != src[t+1] || b2 != src[t+2] || b3 != src[t+3] { + s += int32(skip >> 5) + skip++ + continue + } + skip = 32 + // Otherwise, we have a match. First, emit any pending literal bytes. + if lit != s { + d += emitLiteral(dst[d:], src[lit:s]) + } + // Extend the match to be as long as possible. + s0 := s + s, t = s+4, t+4 + for int(s) < len(src) && src[s] == src[t] { + s++ + t++ + } + // Emit the copied bytes. + d += emitCopy(dst[d:], s-t, s-s0) + lit = s + } + + // Emit any final pending literal bytes and return. + if int(lit) != len(src) { + d += emitLiteral(dst[d:], src[lit:]) + } + return d +} + +// MaxEncodedLen returns the maximum length of a snappy block, given its +// uncompressed length. +// +// It will return a negative value if srcLen is too large to encode. +func MaxEncodedLen(srcLen int) int { + n := uint64(srcLen) + if n > 0xffffffff { + return -1 + } + // Compressed data can be defined as: + // compressed := item* literal* + // item := literal* copy + // + // The trailing literal sequence has a space blowup of at most 62/60 + // since a literal of length 60 needs one tag byte + one extra byte + // for length information. + // + // Item blowup is trickier to measure. Suppose the "copy" op copies + // 4 bytes of data. Because of a special check in the encoding code, + // we produce a 4-byte copy only if the offset is < 65536. Therefore + // the copy op takes 3 bytes to encode, and this type of item leads + // to at most the 62/60 blowup for representing literals. + // + // Suppose the "copy" op copies 5 bytes of data. If the offset is big + // enough, it will take 5 bytes to encode the copy op. Therefore the + // worst case here is a one-byte literal followed by a five-byte copy. + // That is, 6 bytes of input turn into 7 bytes of "compressed" data. + // + // This last factor dominates the blowup, so the final estimate is: + n = 32 + n + n/6 + if n > 0xffffffff { + return -1 + } + return int(n) +} + +var errClosed = errors.New("snappy: Writer is closed") + +// NewWriter returns a new Writer that compresses to w. +// +// The Writer returned does not buffer writes. There is no need to Flush or +// Close such a Writer. +// +// Deprecated: the Writer returned is not suitable for many small writes, only +// for few large writes. Use NewBufferedWriter instead, which is efficient +// regardless of the frequency and shape of the writes, and remember to Close +// that Writer when done. +func NewWriter(w io.Writer) *Writer { + return &Writer{ + w: w, + obuf: make([]byte, obufLen), + } +} + +// NewBufferedWriter returns a new Writer that compresses to w, using the +// framing format described at +// https://github.com/google/snappy/blob/master/framing_format.txt +// +// The Writer returned buffers writes. Users must call Close to guarantee all +// data has been forwarded to the underlying io.Writer. They may also call +// Flush zero or more times before calling Close. +func NewBufferedWriter(w io.Writer) *Writer { + return &Writer{ + w: w, + ibuf: make([]byte, 0, maxBlockSize), + obuf: make([]byte, obufLen), + } +} + +// Writer is an io.Writer than can write Snappy-compressed bytes. +type Writer struct { + w io.Writer + err error + + // ibuf is a buffer for the incoming (uncompressed) bytes. + // + // Its use is optional. For backwards compatibility, Writers created by the + // NewWriter function have ibuf == nil, do not buffer incoming bytes, and + // therefore do not need to be Flush'ed or Close'd. + ibuf []byte + + // obuf is a buffer for the outgoing (compressed) bytes. + obuf []byte + + // wroteStreamHeader is whether we have written the stream header. + wroteStreamHeader bool +} + +// Reset discards the writer's state and switches the Snappy writer to write to +// w. This permits reusing a Writer rather than allocating a new one. +func (w *Writer) Reset(writer io.Writer) { + w.w = writer + w.err = nil + if w.ibuf != nil { + w.ibuf = w.ibuf[:0] + } + w.wroteStreamHeader = false +} + +// Write satisfies the io.Writer interface. +func (w *Writer) Write(p []byte) (nRet int, errRet error) { + if w.ibuf == nil { + // Do not buffer incoming bytes. This does not perform or compress well + // if the caller of Writer.Write writes many small slices. This + // behavior is therefore deprecated, but still supported for backwards + // compatibility with code that doesn't explicitly Flush or Close. + return w.write(p) + } + + // The remainder of this method is based on bufio.Writer.Write from the + // standard library. + + for len(p) > (cap(w.ibuf)-len(w.ibuf)) && w.err == nil { + var n int + if len(w.ibuf) == 0 { + // Large write, empty buffer. + // Write directly from p to avoid copy. + n, _ = w.write(p) + } else { + n = copy(w.ibuf[len(w.ibuf):cap(w.ibuf)], p) + w.ibuf = w.ibuf[:len(w.ibuf)+n] + w.Flush() + } + nRet += n + p = p[n:] + } + if w.err != nil { + return nRet, w.err + } + n := copy(w.ibuf[len(w.ibuf):cap(w.ibuf)], p) + w.ibuf = w.ibuf[:len(w.ibuf)+n] + nRet += n + return nRet, nil +} + +func (w *Writer) write(p []byte) (nRet int, errRet error) { + if w.err != nil { + return 0, w.err + } + for len(p) > 0 { + obufStart := len(magicChunk) + if !w.wroteStreamHeader { + w.wroteStreamHeader = true + copy(w.obuf, magicChunk) + obufStart = 0 + } + + var uncompressed []byte + if len(p) > maxBlockSize { + uncompressed, p = p[:maxBlockSize], p[maxBlockSize:] + } else { + uncompressed, p = p, nil + } + checksum := crc(uncompressed) + + // Compress the buffer, discarding the result if the improvement + // isn't at least 12.5%. + compressed := Encode(w.obuf[obufHeaderLen:], uncompressed) + chunkType := uint8(chunkTypeCompressedData) + chunkLen := 4 + len(compressed) + obufEnd := obufHeaderLen + len(compressed) + if len(compressed) >= len(uncompressed)-len(uncompressed)/8 { + chunkType = chunkTypeUncompressedData + chunkLen = 4 + len(uncompressed) + obufEnd = obufHeaderLen + } + + // Fill in the per-chunk header that comes before the body. + w.obuf[len(magicChunk)+0] = chunkType + w.obuf[len(magicChunk)+1] = uint8(chunkLen >> 0) + w.obuf[len(magicChunk)+2] = uint8(chunkLen >> 8) + w.obuf[len(magicChunk)+3] = uint8(chunkLen >> 16) + w.obuf[len(magicChunk)+4] = uint8(checksum >> 0) + w.obuf[len(magicChunk)+5] = uint8(checksum >> 8) + w.obuf[len(magicChunk)+6] = uint8(checksum >> 16) + w.obuf[len(magicChunk)+7] = uint8(checksum >> 24) + + if _, err := w.w.Write(w.obuf[obufStart:obufEnd]); err != nil { + w.err = err + return nRet, err + } + if chunkType == chunkTypeUncompressedData { + if _, err := w.w.Write(uncompressed); err != nil { + w.err = err + return nRet, err + } + } + nRet += len(uncompressed) + } + return nRet, nil +} + +// Flush flushes the Writer to its underlying io.Writer. +func (w *Writer) Flush() error { + if w.err != nil { + return w.err + } + if len(w.ibuf) == 0 { + return nil + } + w.write(w.ibuf) + w.ibuf = w.ibuf[:0] + return w.err +} + +// Close calls Flush and then closes the Writer. +func (w *Writer) Close() error { + w.Flush() + ret := w.err + if w.err == nil { + w.err = errClosed + } + return ret +} diff --git a/vendor/github.com/golang/snappy/snappy.go b/vendor/github.com/golang/snappy/snappy.go new file mode 100644 index 000000000..010254265 --- /dev/null +++ b/vendor/github.com/golang/snappy/snappy.go @@ -0,0 +1,84 @@ +// Copyright 2011 The Snappy-Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package snappy implements the snappy block-based compression format. +// It aims for very high speeds and reasonable compression. +// +// The C++ snappy implementation is at https://github.com/google/snappy +package snappy // import "github.com/golang/snappy" + +import ( + "hash/crc32" +) + +/* +Each encoded block begins with the varint-encoded length of the decoded data, +followed by a sequence of chunks. Chunks begin and end on byte boundaries. The +first byte of each chunk is broken into its 2 least and 6 most significant bits +called l and m: l ranges in [0, 4) and m ranges in [0, 64). l is the chunk tag. +Zero means a literal tag. All other values mean a copy tag. + +For literal tags: + - If m < 60, the next 1 + m bytes are literal bytes. + - Otherwise, let n be the little-endian unsigned integer denoted by the next + m - 59 bytes. The next 1 + n bytes after that are literal bytes. + +For copy tags, length bytes are copied from offset bytes ago, in the style of +Lempel-Ziv compression algorithms. In particular: + - For l == 1, the offset ranges in [0, 1<<11) and the length in [4, 12). + The length is 4 + the low 3 bits of m. The high 3 bits of m form bits 8-10 + of the offset. The next byte is bits 0-7 of the offset. + - For l == 2, the offset ranges in [0, 1<<16) and the length in [1, 65). + The length is 1 + m. The offset is the little-endian unsigned integer + denoted by the next 2 bytes. + - For l == 3, this tag is a legacy format that is no longer supported. +*/ +const ( + tagLiteral = 0x00 + tagCopy1 = 0x01 + tagCopy2 = 0x02 + tagCopy4 = 0x03 +) + +const ( + checksumSize = 4 + chunkHeaderSize = 4 + magicChunk = "\xff\x06\x00\x00" + magicBody + magicBody = "sNaPpY" + + // maxBlockSize is the maximum size of the input to encodeBlock. It is not + // part of the wire format per se, but some parts of the encoder assume + // that an offset fits into a uint16. + // + // Also, for the framing format (Writer type instead of Encode function), + // https://github.com/google/snappy/blob/master/framing_format.txt says + // that "the uncompressed data in a chunk must be no longer than 65536 + // bytes". + maxBlockSize = 65536 + + // maxEncodedLenOfMaxBlockSize equals MaxEncodedLen(maxBlockSize), but is + // hard coded to be a const instead of a variable, so that obufLen can also + // be a const. Their equivalence is confirmed by + // TestMaxEncodedLenOfMaxBlockSize. + maxEncodedLenOfMaxBlockSize = 76490 + + obufHeaderLen = len(magicChunk) + checksumSize + chunkHeaderSize + obufLen = obufHeaderLen + maxEncodedLenOfMaxBlockSize +) + +const ( + chunkTypeCompressedData = 0x00 + chunkTypeUncompressedData = 0x01 + chunkTypePadding = 0xfe + chunkTypeStreamIdentifier = 0xff +) + +var crcTable = crc32.MakeTable(crc32.Castagnoli) + +// crc implements the checksum specified in section 3 of +// https://github.com/google/snappy/blob/master/framing_format.txt +func crc(b []byte) uint32 { + c := crc32.Update(0, crcTable, b) + return uint32(c>>15|c<<17) + 0xa282ead8 +} diff --git a/vendor/github.com/gopherjs/gopherjs/LICENSE b/vendor/github.com/gopherjs/gopherjs/LICENSE new file mode 100644 index 000000000..d496fef10 --- /dev/null +++ b/vendor/github.com/gopherjs/gopherjs/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2013 Richard Musiol. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/gopherjs/gopherjs/js/js.go b/vendor/github.com/gopherjs/gopherjs/js/js.go new file mode 100644 index 000000000..42249fdd6 --- /dev/null +++ b/vendor/github.com/gopherjs/gopherjs/js/js.go @@ -0,0 +1,168 @@ +// Package js provides functions for interacting with native JavaScript APIs. Calls to these functions are treated specially by GopherJS and translated directly to their corresponding JavaScript syntax. +// +// Use MakeWrapper to expose methods to JavaScript. When passing values directly, the following type conversions are performed: +// +// | Go type | JavaScript type | Conversions back to interface{} | +// | --------------------- | --------------------- | ------------------------------- | +// | bool | Boolean | bool | +// | integers and floats | Number | float64 | +// | string | String | string | +// | []int8 | Int8Array | []int8 | +// | []int16 | Int16Array | []int16 | +// | []int32, []int | Int32Array | []int | +// | []uint8 | Uint8Array | []uint8 | +// | []uint16 | Uint16Array | []uint16 | +// | []uint32, []uint | Uint32Array | []uint | +// | []float32 | Float32Array | []float32 | +// | []float64 | Float64Array | []float64 | +// | all other slices | Array | []interface{} | +// | arrays | see slice type | see slice type | +// | functions | Function | func(...interface{}) *js.Object | +// | time.Time | Date | time.Time | +// | - | instanceof Node | *js.Object | +// | maps, structs | instanceof Object | map[string]interface{} | +// +// Additionally, for a struct containing a *js.Object field, only the content of the field will be passed to JavaScript and vice versa. +package js + +// Object is a container for a native JavaScript object. Calls to its methods are treated specially by GopherJS and translated directly to their JavaScript syntax. A nil pointer to Object is equal to JavaScript's "null". Object can not be used as a map key. +type Object struct{ object *Object } + +// Get returns the object's property with the given key. +func (o *Object) Get(key string) *Object { return o.object.Get(key) } + +// Set assigns the value to the object's property with the given key. +func (o *Object) Set(key string, value interface{}) { o.object.Set(key, value) } + +// Delete removes the object's property with the given key. +func (o *Object) Delete(key string) { o.object.Delete(key) } + +// Length returns the object's "length" property, converted to int. +func (o *Object) Length() int { return o.object.Length() } + +// Index returns the i'th element of an array. +func (o *Object) Index(i int) *Object { return o.object.Index(i) } + +// SetIndex sets the i'th element of an array. +func (o *Object) SetIndex(i int, value interface{}) { o.object.SetIndex(i, value) } + +// Call calls the object's method with the given name. +func (o *Object) Call(name string, args ...interface{}) *Object { return o.object.Call(name, args...) } + +// Invoke calls the object itself. This will fail if it is not a function. +func (o *Object) Invoke(args ...interface{}) *Object { return o.object.Invoke(args...) } + +// New creates a new instance of this type object. This will fail if it not a function (constructor). +func (o *Object) New(args ...interface{}) *Object { return o.object.New(args...) } + +// Bool returns the object converted to bool according to JavaScript type conversions. +func (o *Object) Bool() bool { return o.object.Bool() } + +// String returns the object converted to string according to JavaScript type conversions. +func (o *Object) String() string { return o.object.String() } + +// Int returns the object converted to int according to JavaScript type conversions (parseInt). +func (o *Object) Int() int { return o.object.Int() } + +// Int64 returns the object converted to int64 according to JavaScript type conversions (parseInt). +func (o *Object) Int64() int64 { return o.object.Int64() } + +// Uint64 returns the object converted to uint64 according to JavaScript type conversions (parseInt). +func (o *Object) Uint64() uint64 { return o.object.Uint64() } + +// Float returns the object converted to float64 according to JavaScript type conversions (parseFloat). +func (o *Object) Float() float64 { return o.object.Float() } + +// Interface returns the object converted to interface{}. See GopherJS' README for details. +func (o *Object) Interface() interface{} { return o.object.Interface() } + +// Unsafe returns the object as an uintptr, which can be converted via unsafe.Pointer. Not intended for public use. +func (o *Object) Unsafe() uintptr { return o.object.Unsafe() } + +// Error encapsulates JavaScript errors. Those are turned into a Go panic and may be recovered, giving an *Error that holds the JavaScript error object. +type Error struct { + *Object +} + +// Error returns the message of the encapsulated JavaScript error object. +func (err *Error) Error() string { + return "JavaScript error: " + err.Get("message").String() +} + +// Stack returns the stack property of the encapsulated JavaScript error object. +func (err *Error) Stack() string { + return err.Get("stack").String() +} + +// Global gives JavaScript's global object ("window" for browsers and "GLOBAL" for Node.js). +var Global *Object + +// Module gives the value of the "module" variable set by Node.js. Hint: Set a module export with 'js.Module.Get("exports").Set("exportName", ...)'. +var Module *Object + +// Undefined gives the JavaScript value "undefined". +var Undefined *Object + +// Debugger gets compiled to JavaScript's "debugger;" statement. +func Debugger() {} + +// InternalObject returns the internal JavaScript object that represents i. Not intended for public use. +func InternalObject(i interface{}) *Object { + return nil +} + +// MakeFunc wraps a function and gives access to the values of JavaScript's "this" and "arguments" keywords. +func MakeFunc(fn func(this *Object, arguments []*Object) interface{}) *Object { + return Global.Call("$makeFunc", InternalObject(fn)) +} + +// Keys returns the keys of the given JavaScript object. +func Keys(o *Object) []string { + if o == nil || o == Undefined { + return nil + } + a := Global.Get("Object").Call("keys", o) + s := make([]string, a.Length()) + for i := 0; i < a.Length(); i++ { + s[i] = a.Index(i).String() + } + return s +} + +// MakeWrapper creates a JavaScript object which has wrappers for the exported methods of i. Use explicit getter and setter methods to expose struct fields to JavaScript. +func MakeWrapper(i interface{}) *Object { + v := InternalObject(i) + o := Global.Get("Object").New() + o.Set("__internal_object__", v) + methods := v.Get("constructor").Get("methods") + for i := 0; i < methods.Length(); i++ { + m := methods.Index(i) + if m.Get("pkg").String() != "" { // not exported + continue + } + o.Set(m.Get("name").String(), func(args ...*Object) *Object { + return Global.Call("$externalizeFunction", v.Get(m.Get("prop").String()), m.Get("typ"), true).Call("apply", v, args) + }) + } + return o +} + +// NewArrayBuffer creates a JavaScript ArrayBuffer from a byte slice. +func NewArrayBuffer(b []byte) *Object { + slice := InternalObject(b) + offset := slice.Get("$offset").Int() + length := slice.Get("$length").Int() + return slice.Get("$array").Get("buffer").Call("slice", offset, offset+length) +} + +// M is a simple map type. It is intended as a shorthand for JavaScript objects (before conversion). +type M map[string]interface{} + +// S is a simple slice type. It is intended as a shorthand for JavaScript arrays (before conversion). +type S []interface{} + +func init() { + // avoid dead code elimination + e := Error{} + _ = e +} diff --git a/vendor/github.com/juju/errors/LICENSE b/vendor/github.com/juju/errors/LICENSE new file mode 100644 index 000000000..ade9307b3 --- /dev/null +++ b/vendor/github.com/juju/errors/LICENSE @@ -0,0 +1,191 @@ +All files in this repository are licensed as follows. If you contribute +to this repository, it is assumed that you license your contribution +under the same license unless you state otherwise. + +All files Copyright (C) 2015 Canonical Ltd. unless otherwise specified in the file. + +This software is licensed under the LGPLv3, included below. + +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. + +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/vendor/github.com/juju/errors/Makefile b/vendor/github.com/juju/errors/Makefile new file mode 100644 index 000000000..ab7c2e6cf --- /dev/null +++ b/vendor/github.com/juju/errors/Makefile @@ -0,0 +1,11 @@ +default: check + +check: + go test && go test -compiler gccgo + +docs: + godoc2md github.com/juju/errors > README.md + sed -i 's|\[godoc-link-here\]|[![GoDoc](https://godoc.org/github.com/juju/errors?status.svg)](https://godoc.org/github.com/juju/errors)|' README.md + + +.PHONY: default check docs diff --git a/vendor/github.com/juju/errors/README.md b/vendor/github.com/juju/errors/README.md new file mode 100644 index 000000000..ee248911f --- /dev/null +++ b/vendor/github.com/juju/errors/README.md @@ -0,0 +1,536 @@ + +# errors + import "github.com/juju/errors" + +[![GoDoc](https://godoc.org/github.com/juju/errors?status.svg)](https://godoc.org/github.com/juju/errors) + +The juju/errors provides an easy way to annotate errors without losing the +orginal error context. + +The exported `New` and `Errorf` functions are designed to replace the +`errors.New` and `fmt.Errorf` functions respectively. The same underlying +error is there, but the package also records the location at which the error +was created. + +A primary use case for this library is to add extra context any time an +error is returned from a function. + + + if err := SomeFunc(); err != nil { + return err + } + +This instead becomes: + + + if err := SomeFunc(); err != nil { + return errors.Trace(err) + } + +which just records the file and line number of the Trace call, or + + + if err := SomeFunc(); err != nil { + return errors.Annotate(err, "more context") + } + +which also adds an annotation to the error. + +When you want to check to see if an error is of a particular type, a helper +function is normally exported by the package that returned the error, like the +`os` package does. The underlying cause of the error is available using the +`Cause` function. + + + os.IsNotExist(errors.Cause(err)) + +The result of the `Error()` call on an annotated error is the annotations joined +with colons, then the result of the `Error()` method for the underlying error +that was the cause. + + + err := errors.Errorf("original") + err = errors.Annotatef(err, "context") + err = errors.Annotatef(err, "more context") + err.Error() -> "more context: context: original" + +Obviously recording the file, line and functions is not very useful if you +cannot get them back out again. + + + errors.ErrorStack(err) + +will return something like: + + + first error + github.com/juju/errors/annotation_test.go:193: + github.com/juju/errors/annotation_test.go:194: annotation + github.com/juju/errors/annotation_test.go:195: + github.com/juju/errors/annotation_test.go:196: more context + github.com/juju/errors/annotation_test.go:197: + +The first error was generated by an external system, so there was no location +associated. The second, fourth, and last lines were generated with Trace calls, +and the other two through Annotate. + +Sometimes when responding to an error you want to return a more specific error +for the situation. + + + if err := FindField(field); err != nil { + return errors.Wrap(err, errors.NotFoundf(field)) + } + +This returns an error where the complete error stack is still available, and +`errors.Cause()` will return the `NotFound` error. + + + + + + +## func AlreadyExistsf +``` go +func AlreadyExistsf(format string, args ...interface{}) error +``` +AlreadyExistsf returns an error which satisfies IsAlreadyExists(). + + +## func Annotate +``` go +func Annotate(other error, message string) error +``` +Annotate is used to add extra context to an existing error. The location of +the Annotate call is recorded with the annotations. The file, line and +function are also recorded. + +For example: + + + if err := SomeFunc(); err != nil { + return errors.Annotate(err, "failed to frombulate") + } + + +## func Annotatef +``` go +func Annotatef(other error, format string, args ...interface{}) error +``` +Annotatef is used to add extra context to an existing error. The location of +the Annotate call is recorded with the annotations. The file, line and +function are also recorded. + +For example: + + + if err := SomeFunc(); err != nil { + return errors.Annotatef(err, "failed to frombulate the %s", arg) + } + + +## func Cause +``` go +func Cause(err error) error +``` +Cause returns the cause of the given error. This will be either the +original error, or the result of a Wrap or Mask call. + +Cause is the usual way to diagnose errors that may have been wrapped by +the other errors functions. + + +## func DeferredAnnotatef +``` go +func DeferredAnnotatef(err *error, format string, args ...interface{}) +``` +DeferredAnnotatef annotates the given error (when it is not nil) with the given +format string and arguments (like fmt.Sprintf). If *err is nil, DeferredAnnotatef +does nothing. This method is used in a defer statement in order to annotate any +resulting error with the same message. + +For example: + + + defer DeferredAnnotatef(&err, "failed to frombulate the %s", arg) + + +## func Details +``` go +func Details(err error) string +``` +Details returns information about the stack of errors wrapped by err, in +the format: + + + [{filename:99: error one} {otherfile:55: cause of error one}] + +This is a terse alternative to ErrorStack as it returns a single line. + + +## func ErrorStack +``` go +func ErrorStack(err error) string +``` +ErrorStack returns a string representation of the annotated error. If the +error passed as the parameter is not an annotated error, the result is +simply the result of the Error() method on that error. + +If the error is an annotated error, a multi-line string is returned where +each line represents one entry in the annotation stack. The full filename +from the call stack is used in the output. + + + first error + github.com/juju/errors/annotation_test.go:193: + github.com/juju/errors/annotation_test.go:194: annotation + github.com/juju/errors/annotation_test.go:195: + github.com/juju/errors/annotation_test.go:196: more context + github.com/juju/errors/annotation_test.go:197: + + +## func Errorf +``` go +func Errorf(format string, args ...interface{}) error +``` +Errorf creates a new annotated error and records the location that the +error is created. This should be a drop in replacement for fmt.Errorf. + +For example: + + + return errors.Errorf("validation failed: %s", message) + + +## func IsAlreadyExists +``` go +func IsAlreadyExists(err error) bool +``` +IsAlreadyExists reports whether the error was created with +AlreadyExistsf() or NewAlreadyExists(). + + +## func IsNotFound +``` go +func IsNotFound(err error) bool +``` +IsNotFound reports whether err was created with NotFoundf() or +NewNotFound(). + + +## func IsNotImplemented +``` go +func IsNotImplemented(err error) bool +``` +IsNotImplemented reports whether err was created with +NotImplementedf() or NewNotImplemented(). + + +## func IsNotSupported +``` go +func IsNotSupported(err error) bool +``` +IsNotSupported reports whether the error was created with +NotSupportedf() or NewNotSupported(). + + +## func IsNotValid +``` go +func IsNotValid(err error) bool +``` +IsNotValid reports whether the error was created with NotValidf() or +NewNotValid(). + + +## func IsUnauthorized +``` go +func IsUnauthorized(err error) bool +``` +IsUnauthorized reports whether err was created with Unauthorizedf() or +NewUnauthorized(). + + +## func Mask +``` go +func Mask(other error) error +``` +Mask hides the underlying error type, and records the location of the masking. + + +## func Maskf +``` go +func Maskf(other error, format string, args ...interface{}) error +``` +Mask masks the given error with the given format string and arguments (like +fmt.Sprintf), returning a new error that maintains the error stack, but +hides the underlying error type. The error string still contains the full +annotations. If you want to hide the annotations, call Wrap. + + +## func New +``` go +func New(message string) error +``` +New is a drop in replacement for the standard libary errors module that records +the location that the error is created. + +For example: + + + return errors.New("validation failed") + + +## func NewAlreadyExists +``` go +func NewAlreadyExists(err error, msg string) error +``` +NewAlreadyExists returns an error which wraps err and satisfies +IsAlreadyExists(). + + +## func NewNotFound +``` go +func NewNotFound(err error, msg string) error +``` +NewNotFound returns an error which wraps err that satisfies +IsNotFound(). + + +## func NewNotImplemented +``` go +func NewNotImplemented(err error, msg string) error +``` +NewNotImplemented returns an error which wraps err and satisfies +IsNotImplemented(). + + +## func NewNotSupported +``` go +func NewNotSupported(err error, msg string) error +``` +NewNotSupported returns an error which wraps err and satisfies +IsNotSupported(). + + +## func NewNotValid +``` go +func NewNotValid(err error, msg string) error +``` +NewNotValid returns an error which wraps err and satisfies IsNotValid(). + + +## func NewUnauthorized +``` go +func NewUnauthorized(err error, msg string) error +``` +NewUnauthorized returns an error which wraps err and satisfies +IsUnauthorized(). + + +## func NotFoundf +``` go +func NotFoundf(format string, args ...interface{}) error +``` +NotFoundf returns an error which satisfies IsNotFound(). + + +## func NotImplementedf +``` go +func NotImplementedf(format string, args ...interface{}) error +``` +NotImplementedf returns an error which satisfies IsNotImplemented(). + + +## func NotSupportedf +``` go +func NotSupportedf(format string, args ...interface{}) error +``` +NotSupportedf returns an error which satisfies IsNotSupported(). + + +## func NotValidf +``` go +func NotValidf(format string, args ...interface{}) error +``` +NotValidf returns an error which satisfies IsNotValid(). + + +## func Trace +``` go +func Trace(other error) error +``` +Trace adds the location of the Trace call to the stack. The Cause of the +resulting error is the same as the error parameter. If the other error is +nil, the result will be nil. + +For example: + + + if err := SomeFunc(); err != nil { + return errors.Trace(err) + } + + +## func Unauthorizedf +``` go +func Unauthorizedf(format string, args ...interface{}) error +``` +Unauthorizedf returns an error which satisfies IsUnauthorized(). + + +## func Wrap +``` go +func Wrap(other, newDescriptive error) error +``` +Wrap changes the Cause of the error. The location of the Wrap call is also +stored in the error stack. + +For example: + + + if err := SomeFunc(); err != nil { + newErr := &packageError{"more context", private_value} + return errors.Wrap(err, newErr) + } + + +## func Wrapf +``` go +func Wrapf(other, newDescriptive error, format string, args ...interface{}) error +``` +Wrapf changes the Cause of the error, and adds an annotation. The location +of the Wrap call is also stored in the error stack. + +For example: + + + if err := SomeFunc(); err != nil { + return errors.Wrapf(err, simpleErrorType, "invalid value %q", value) + } + + + +## type Err +``` go +type Err struct { + // contains filtered or unexported fields +} +``` +Err holds a description of an error along with information about +where the error was created. + +It may be embedded in custom error types to add extra information that +this errors package can understand. + + + + + + + + + +### func NewErr +``` go +func NewErr(format string, args ...interface{}) Err +``` +NewErr is used to return an Err for the purpose of embedding in other +structures. The location is not specified, and needs to be set with a call +to SetLocation. + +For example: + + + type FooError struct { + errors.Err + code int + } + + func NewFooError(code int) error { + err := &FooError{errors.NewErr("foo"), code} + err.SetLocation(1) + return err + } + + + + +### func (\*Err) Cause +``` go +func (e *Err) Cause() error +``` +The Cause of an error is the most recent error in the error stack that +meets one of these criteria: the original error that was raised; the new +error that was passed into the Wrap function; the most recently masked +error; or nil if the error itself is considered the Cause. Normally this +method is not invoked directly, but instead through the Cause stand alone +function. + + + +### func (\*Err) Error +``` go +func (e *Err) Error() string +``` +Error implements error.Error. + + + +### func (\*Err) Location +``` go +func (e *Err) Location() (filename string, line int) +``` +Location is the file and line of where the error was most recently +created or annotated. + + + +### func (\*Err) Message +``` go +func (e *Err) Message() string +``` +Message returns the message stored with the most recent location. This is +the empty string if the most recent call was Trace, or the message stored +with Annotate or Mask. + + + +### func (\*Err) SetLocation +``` go +func (e *Err) SetLocation(callDepth int) +``` +SetLocation records the source location of the error at callDepth stack +frames above the call. + + + +### func (\*Err) StackTrace +``` go +func (e *Err) StackTrace() []string +``` +StackTrace returns one string for each location recorded in the stack of +errors. The first value is the originating error, with a line for each +other annotation or tracing of the error. + + + +### func (\*Err) Underlying +``` go +func (e *Err) Underlying() error +``` +Underlying returns the previous error in the error stack, if any. A client +should not ever really call this method. It is used to build the error +stack and should not be introspected by client calls. Or more +specifically, clients should not depend on anything but the `Cause` of an +error. + + + + + + + + + +- - - +Generated by [godoc2md](http://godoc.org/github.com/davecheney/godoc2md) \ No newline at end of file diff --git a/vendor/github.com/juju/errors/doc.go b/vendor/github.com/juju/errors/doc.go new file mode 100644 index 000000000..35b119aa3 --- /dev/null +++ b/vendor/github.com/juju/errors/doc.go @@ -0,0 +1,81 @@ +// Copyright 2013, 2014 Canonical Ltd. +// Licensed under the LGPLv3, see LICENCE file for details. + +/* +[godoc-link-here] + +The juju/errors provides an easy way to annotate errors without losing the +orginal error context. + +The exported `New` and `Errorf` functions are designed to replace the +`errors.New` and `fmt.Errorf` functions respectively. The same underlying +error is there, but the package also records the location at which the error +was created. + +A primary use case for this library is to add extra context any time an +error is returned from a function. + + if err := SomeFunc(); err != nil { + return err + } + +This instead becomes: + + if err := SomeFunc(); err != nil { + return errors.Trace(err) + } + +which just records the file and line number of the Trace call, or + + if err := SomeFunc(); err != nil { + return errors.Annotate(err, "more context") + } + +which also adds an annotation to the error. + +When you want to check to see if an error is of a particular type, a helper +function is normally exported by the package that returned the error, like the +`os` package does. The underlying cause of the error is available using the +`Cause` function. + + os.IsNotExist(errors.Cause(err)) + +The result of the `Error()` call on an annotated error is the annotations joined +with colons, then the result of the `Error()` method for the underlying error +that was the cause. + + err := errors.Errorf("original") + err = errors.Annotatef(err, "context") + err = errors.Annotatef(err, "more context") + err.Error() -> "more context: context: original" + +Obviously recording the file, line and functions is not very useful if you +cannot get them back out again. + + errors.ErrorStack(err) + +will return something like: + + first error + github.com/juju/errors/annotation_test.go:193: + github.com/juju/errors/annotation_test.go:194: annotation + github.com/juju/errors/annotation_test.go:195: + github.com/juju/errors/annotation_test.go:196: more context + github.com/juju/errors/annotation_test.go:197: + +The first error was generated by an external system, so there was no location +associated. The second, fourth, and last lines were generated with Trace calls, +and the other two through Annotate. + +Sometimes when responding to an error you want to return a more specific error +for the situation. + + if err := FindField(field); err != nil { + return errors.Wrap(err, errors.NotFoundf(field)) + } + +This returns an error where the complete error stack is still available, and +`errors.Cause()` will return the `NotFound` error. + +*/ +package errors diff --git a/vendor/github.com/juju/errors/error.go b/vendor/github.com/juju/errors/error.go new file mode 100644 index 000000000..8c51c45b3 --- /dev/null +++ b/vendor/github.com/juju/errors/error.go @@ -0,0 +1,145 @@ +// Copyright 2014 Canonical Ltd. +// Licensed under the LGPLv3, see LICENCE file for details. + +package errors + +import ( + "fmt" + "reflect" + "runtime" +) + +// Err holds a description of an error along with information about +// where the error was created. +// +// It may be embedded in custom error types to add extra information that +// this errors package can understand. +type Err struct { + // message holds an annotation of the error. + message string + + // cause holds the cause of the error as returned + // by the Cause method. + cause error + + // previous holds the previous error in the error stack, if any. + previous error + + // file and line hold the source code location where the error was + // created. + file string + line int +} + +// NewErr is used to return an Err for the purpose of embedding in other +// structures. The location is not specified, and needs to be set with a call +// to SetLocation. +// +// For example: +// type FooError struct { +// errors.Err +// code int +// } +// +// func NewFooError(code int) error { +// err := &FooError{errors.NewErr("foo"), code} +// err.SetLocation(1) +// return err +// } +func NewErr(format string, args ...interface{}) Err { + return Err{ + message: fmt.Sprintf(format, args...), + } +} + +// NewErrWithCause is used to return an Err with case by other error for the purpose of embedding in other +// structures. The location is not specified, and needs to be set with a call +// to SetLocation. +// +// For example: +// type FooError struct { +// errors.Err +// code int +// } +// +// func (e *FooError) Annotate(format string, args ...interface{}) error { +// err := &FooError{errors.NewErrWithCause(e.Err, format, args...), e.code} +// err.SetLocation(1) +// return err +// }) +func NewErrWithCause(other error, format string, args ...interface{}) Err { + return Err{ + message: fmt.Sprintf(format, args...), + cause: Cause(other), + previous: other, + } +} + +// Location is the file and line of where the error was most recently +// created or annotated. +func (e *Err) Location() (filename string, line int) { + return e.file, e.line +} + +// Underlying returns the previous error in the error stack, if any. A client +// should not ever really call this method. It is used to build the error +// stack and should not be introspected by client calls. Or more +// specifically, clients should not depend on anything but the `Cause` of an +// error. +func (e *Err) Underlying() error { + return e.previous +} + +// The Cause of an error is the most recent error in the error stack that +// meets one of these criteria: the original error that was raised; the new +// error that was passed into the Wrap function; the most recently masked +// error; or nil if the error itself is considered the Cause. Normally this +// method is not invoked directly, but instead through the Cause stand alone +// function. +func (e *Err) Cause() error { + return e.cause +} + +// Message returns the message stored with the most recent location. This is +// the empty string if the most recent call was Trace, or the message stored +// with Annotate or Mask. +func (e *Err) Message() string { + return e.message +} + +// Error implements error.Error. +func (e *Err) Error() string { + // We want to walk up the stack of errors showing the annotations + // as long as the cause is the same. + err := e.previous + if !sameError(Cause(err), e.cause) && e.cause != nil { + err = e.cause + } + switch { + case err == nil: + return e.message + case e.message == "": + return err.Error() + } + return fmt.Sprintf("%s: %v", e.message, err) +} + +// SetLocation records the source location of the error at callDepth stack +// frames above the call. +func (e *Err) SetLocation(callDepth int) { + _, file, line, _ := runtime.Caller(callDepth + 1) + e.file = trimGoPath(file) + e.line = line +} + +// StackTrace returns one string for each location recorded in the stack of +// errors. The first value is the originating error, with a line for each +// other annotation or tracing of the error. +func (e *Err) StackTrace() []string { + return errorStack(e) +} + +// Ideally we'd have a way to check identity, but deep equals will do. +func sameError(e1, e2 error) bool { + return reflect.DeepEqual(e1, e2) +} diff --git a/vendor/github.com/juju/errors/errortypes.go b/vendor/github.com/juju/errors/errortypes.go new file mode 100644 index 000000000..10b3b19c2 --- /dev/null +++ b/vendor/github.com/juju/errors/errortypes.go @@ -0,0 +1,284 @@ +// Copyright 2014 Canonical Ltd. +// Licensed under the LGPLv3, see LICENCE file for details. + +package errors + +import ( + "fmt" +) + +// wrap is a helper to construct an *wrapper. +func wrap(err error, format, suffix string, args ...interface{}) Err { + newErr := Err{ + message: fmt.Sprintf(format+suffix, args...), + previous: err, + } + newErr.SetLocation(2) + return newErr +} + +// notFound represents an error when something has not been found. +type notFound struct { + Err +} + +// NotFoundf returns an error which satisfies IsNotFound(). +func NotFoundf(format string, args ...interface{}) error { + return ¬Found{wrap(nil, format, " not found", args...)} +} + +// NewNotFound returns an error which wraps err that satisfies +// IsNotFound(). +func NewNotFound(err error, msg string) error { + return ¬Found{wrap(err, msg, "")} +} + +// IsNotFound reports whether err was created with NotFoundf() or +// NewNotFound(). +func IsNotFound(err error) bool { + err = Cause(err) + _, ok := err.(*notFound) + return ok +} + +// userNotFound represents an error when an inexistent user is looked up. +type userNotFound struct { + Err +} + +// UserNotFoundf returns an error which satisfies IsUserNotFound(). +func UserNotFoundf(format string, args ...interface{}) error { + return &userNotFound{wrap(nil, format, " user not found", args...)} +} + +// NewUserNotFound returns an error which wraps err and satisfies +// IsUserNotFound(). +func NewUserNotFound(err error, msg string) error { + return &userNotFound{wrap(err, msg, "")} +} + +// IsUserNotFound reports whether err was created with UserNotFoundf() or +// NewUserNotFound(). +func IsUserNotFound(err error) bool { + err = Cause(err) + _, ok := err.(*userNotFound) + return ok +} + +// unauthorized represents an error when an operation is unauthorized. +type unauthorized struct { + Err +} + +// Unauthorizedf returns an error which satisfies IsUnauthorized(). +func Unauthorizedf(format string, args ...interface{}) error { + return &unauthorized{wrap(nil, format, "", args...)} +} + +// NewUnauthorized returns an error which wraps err and satisfies +// IsUnauthorized(). +func NewUnauthorized(err error, msg string) error { + return &unauthorized{wrap(err, msg, "")} +} + +// IsUnauthorized reports whether err was created with Unauthorizedf() or +// NewUnauthorized(). +func IsUnauthorized(err error) bool { + err = Cause(err) + _, ok := err.(*unauthorized) + return ok +} + +// notImplemented represents an error when something is not +// implemented. +type notImplemented struct { + Err +} + +// NotImplementedf returns an error which satisfies IsNotImplemented(). +func NotImplementedf(format string, args ...interface{}) error { + return ¬Implemented{wrap(nil, format, " not implemented", args...)} +} + +// NewNotImplemented returns an error which wraps err and satisfies +// IsNotImplemented(). +func NewNotImplemented(err error, msg string) error { + return ¬Implemented{wrap(err, msg, "")} +} + +// IsNotImplemented reports whether err was created with +// NotImplementedf() or NewNotImplemented(). +func IsNotImplemented(err error) bool { + err = Cause(err) + _, ok := err.(*notImplemented) + return ok +} + +// alreadyExists represents and error when something already exists. +type alreadyExists struct { + Err +} + +// AlreadyExistsf returns an error which satisfies IsAlreadyExists(). +func AlreadyExistsf(format string, args ...interface{}) error { + return &alreadyExists{wrap(nil, format, " already exists", args...)} +} + +// NewAlreadyExists returns an error which wraps err and satisfies +// IsAlreadyExists(). +func NewAlreadyExists(err error, msg string) error { + return &alreadyExists{wrap(err, msg, "")} +} + +// IsAlreadyExists reports whether the error was created with +// AlreadyExistsf() or NewAlreadyExists(). +func IsAlreadyExists(err error) bool { + err = Cause(err) + _, ok := err.(*alreadyExists) + return ok +} + +// notSupported represents an error when something is not supported. +type notSupported struct { + Err +} + +// NotSupportedf returns an error which satisfies IsNotSupported(). +func NotSupportedf(format string, args ...interface{}) error { + return ¬Supported{wrap(nil, format, " not supported", args...)} +} + +// NewNotSupported returns an error which wraps err and satisfies +// IsNotSupported(). +func NewNotSupported(err error, msg string) error { + return ¬Supported{wrap(err, msg, "")} +} + +// IsNotSupported reports whether the error was created with +// NotSupportedf() or NewNotSupported(). +func IsNotSupported(err error) bool { + err = Cause(err) + _, ok := err.(*notSupported) + return ok +} + +// notValid represents an error when something is not valid. +type notValid struct { + Err +} + +// NotValidf returns an error which satisfies IsNotValid(). +func NotValidf(format string, args ...interface{}) error { + return ¬Valid{wrap(nil, format, " not valid", args...)} +} + +// NewNotValid returns an error which wraps err and satisfies IsNotValid(). +func NewNotValid(err error, msg string) error { + return ¬Valid{wrap(err, msg, "")} +} + +// IsNotValid reports whether the error was created with NotValidf() or +// NewNotValid(). +func IsNotValid(err error) bool { + err = Cause(err) + _, ok := err.(*notValid) + return ok +} + +// notProvisioned represents an error when something is not yet provisioned. +type notProvisioned struct { + Err +} + +// NotProvisionedf returns an error which satisfies IsNotProvisioned(). +func NotProvisionedf(format string, args ...interface{}) error { + return ¬Provisioned{wrap(nil, format, " not provisioned", args...)} +} + +// NewNotProvisioned returns an error which wraps err that satisfies +// IsNotProvisioned(). +func NewNotProvisioned(err error, msg string) error { + return ¬Provisioned{wrap(err, msg, "")} +} + +// IsNotProvisioned reports whether err was created with NotProvisionedf() or +// NewNotProvisioned(). +func IsNotProvisioned(err error) bool { + err = Cause(err) + _, ok := err.(*notProvisioned) + return ok +} + +// notAssigned represents an error when something is not yet assigned to +// something else. +type notAssigned struct { + Err +} + +// NotAssignedf returns an error which satisfies IsNotAssigned(). +func NotAssignedf(format string, args ...interface{}) error { + return ¬Assigned{wrap(nil, format, " not assigned", args...)} +} + +// NewNotAssigned returns an error which wraps err that satisfies +// IsNotAssigned(). +func NewNotAssigned(err error, msg string) error { + return ¬Assigned{wrap(err, msg, "")} +} + +// IsNotAssigned reports whether err was created with NotAssignedf() or +// NewNotAssigned(). +func IsNotAssigned(err error) bool { + err = Cause(err) + _, ok := err.(*notAssigned) + return ok +} + +// badRequest represents an error when a request has bad parameters. +type badRequest struct { + Err +} + +// BadRequestf returns an error which satisfies IsBadRequest(). +func BadRequestf(format string, args ...interface{}) error { + return &badRequest{wrap(nil, format, "", args...)} +} + +// NewBadRequest returns an error which wraps err that satisfies +// IsBadRequest(). +func NewBadRequest(err error, msg string) error { + return &badRequest{wrap(err, msg, "")} +} + +// IsBadRequest reports whether err was created with BadRequestf() or +// NewBadRequest(). +func IsBadRequest(err error) bool { + err = Cause(err) + _, ok := err.(*badRequest) + return ok +} + +// methodNotAllowed represents an error when an HTTP request +// is made with an inappropriate method. +type methodNotAllowed struct { + Err +} + +// MethodNotAllowedf returns an error which satisfies IsMethodNotAllowed(). +func MethodNotAllowedf(format string, args ...interface{}) error { + return &methodNotAllowed{wrap(nil, format, "", args...)} +} + +// NewMethodNotAllowed returns an error which wraps err that satisfies +// IsMethodNotAllowed(). +func NewMethodNotAllowed(err error, msg string) error { + return &methodNotAllowed{wrap(err, msg, "")} +} + +// IsMethodNotAllowed reports whether err was created with MethodNotAllowedf() or +// NewMethodNotAllowed(). +func IsMethodNotAllowed(err error) bool { + err = Cause(err) + _, ok := err.(*methodNotAllowed) + return ok +} diff --git a/vendor/github.com/juju/errors/functions.go b/vendor/github.com/juju/errors/functions.go new file mode 100644 index 000000000..994208d8d --- /dev/null +++ b/vendor/github.com/juju/errors/functions.go @@ -0,0 +1,330 @@ +// Copyright 2014 Canonical Ltd. +// Licensed under the LGPLv3, see LICENCE file for details. + +package errors + +import ( + "fmt" + "strings" +) + +// New is a drop in replacement for the standard libary errors module that records +// the location that the error is created. +// +// For example: +// return errors.New("validation failed") +// +func New(message string) error { + err := &Err{message: message} + err.SetLocation(1) + return err +} + +// Errorf creates a new annotated error and records the location that the +// error is created. This should be a drop in replacement for fmt.Errorf. +// +// For example: +// return errors.Errorf("validation failed: %s", message) +// +func Errorf(format string, args ...interface{}) error { + err := &Err{message: fmt.Sprintf(format, args...)} + err.SetLocation(1) + return err +} + +// Trace adds the location of the Trace call to the stack. The Cause of the +// resulting error is the same as the error parameter. If the other error is +// nil, the result will be nil. +// +// For example: +// if err := SomeFunc(); err != nil { +// return errors.Trace(err) +// } +// +func Trace(other error) error { + if other == nil { + return nil + } + err := &Err{previous: other, cause: Cause(other)} + err.SetLocation(1) + return err +} + +// Annotate is used to add extra context to an existing error. The location of +// the Annotate call is recorded with the annotations. The file, line and +// function are also recorded. +// +// For example: +// if err := SomeFunc(); err != nil { +// return errors.Annotate(err, "failed to frombulate") +// } +// +func Annotate(other error, message string) error { + if other == nil { + return nil + } + err := &Err{ + previous: other, + cause: Cause(other), + message: message, + } + err.SetLocation(1) + return err +} + +// Annotatef is used to add extra context to an existing error. The location of +// the Annotate call is recorded with the annotations. The file, line and +// function are also recorded. +// +// For example: +// if err := SomeFunc(); err != nil { +// return errors.Annotatef(err, "failed to frombulate the %s", arg) +// } +// +func Annotatef(other error, format string, args ...interface{}) error { + if other == nil { + return nil + } + err := &Err{ + previous: other, + cause: Cause(other), + message: fmt.Sprintf(format, args...), + } + err.SetLocation(1) + return err +} + +// DeferredAnnotatef annotates the given error (when it is not nil) with the given +// format string and arguments (like fmt.Sprintf). If *err is nil, DeferredAnnotatef +// does nothing. This method is used in a defer statement in order to annotate any +// resulting error with the same message. +// +// For example: +// +// defer DeferredAnnotatef(&err, "failed to frombulate the %s", arg) +// +func DeferredAnnotatef(err *error, format string, args ...interface{}) { + if *err == nil { + return + } + newErr := &Err{ + message: fmt.Sprintf(format, args...), + cause: Cause(*err), + previous: *err, + } + newErr.SetLocation(1) + *err = newErr +} + +// Wrap changes the Cause of the error. The location of the Wrap call is also +// stored in the error stack. +// +// For example: +// if err := SomeFunc(); err != nil { +// newErr := &packageError{"more context", private_value} +// return errors.Wrap(err, newErr) +// } +// +func Wrap(other, newDescriptive error) error { + err := &Err{ + previous: other, + cause: newDescriptive, + } + err.SetLocation(1) + return err +} + +// Wrapf changes the Cause of the error, and adds an annotation. The location +// of the Wrap call is also stored in the error stack. +// +// For example: +// if err := SomeFunc(); err != nil { +// return errors.Wrapf(err, simpleErrorType, "invalid value %q", value) +// } +// +func Wrapf(other, newDescriptive error, format string, args ...interface{}) error { + err := &Err{ + message: fmt.Sprintf(format, args...), + previous: other, + cause: newDescriptive, + } + err.SetLocation(1) + return err +} + +// Mask masks the given error with the given format string and arguments (like +// fmt.Sprintf), returning a new error that maintains the error stack, but +// hides the underlying error type. The error string still contains the full +// annotations. If you want to hide the annotations, call Wrap. +func Maskf(other error, format string, args ...interface{}) error { + if other == nil { + return nil + } + err := &Err{ + message: fmt.Sprintf(format, args...), + previous: other, + } + err.SetLocation(1) + return err +} + +// Mask hides the underlying error type, and records the location of the masking. +func Mask(other error) error { + if other == nil { + return nil + } + err := &Err{ + previous: other, + } + err.SetLocation(1) + return err +} + +// Cause returns the cause of the given error. This will be either the +// original error, or the result of a Wrap or Mask call. +// +// Cause is the usual way to diagnose errors that may have been wrapped by +// the other errors functions. +func Cause(err error) error { + var diag error + if err, ok := err.(causer); ok { + diag = err.Cause() + } + if diag != nil { + return diag + } + return err +} + +type causer interface { + Cause() error +} + +type wrapper interface { + // Message returns the top level error message, + // not including the message from the Previous + // error. + Message() string + + // Underlying returns the Previous error, or nil + // if there is none. + Underlying() error +} + +type locationer interface { + Location() (string, int) +} + +var ( + _ wrapper = (*Err)(nil) + _ locationer = (*Err)(nil) + _ causer = (*Err)(nil) +) + +// Details returns information about the stack of errors wrapped by err, in +// the format: +// +// [{filename:99: error one} {otherfile:55: cause of error one}] +// +// This is a terse alternative to ErrorStack as it returns a single line. +func Details(err error) string { + if err == nil { + return "[]" + } + var s []byte + s = append(s, '[') + for { + s = append(s, '{') + if err, ok := err.(locationer); ok { + file, line := err.Location() + if file != "" { + s = append(s, fmt.Sprintf("%s:%d", file, line)...) + s = append(s, ": "...) + } + } + if cerr, ok := err.(wrapper); ok { + s = append(s, cerr.Message()...) + err = cerr.Underlying() + } else { + s = append(s, err.Error()...) + err = nil + } + s = append(s, '}') + if err == nil { + break + } + s = append(s, ' ') + } + s = append(s, ']') + return string(s) +} + +// ErrorStack returns a string representation of the annotated error. If the +// error passed as the parameter is not an annotated error, the result is +// simply the result of the Error() method on that error. +// +// If the error is an annotated error, a multi-line string is returned where +// each line represents one entry in the annotation stack. The full filename +// from the call stack is used in the output. +// +// first error +// github.com/juju/errors/annotation_test.go:193: +// github.com/juju/errors/annotation_test.go:194: annotation +// github.com/juju/errors/annotation_test.go:195: +// github.com/juju/errors/annotation_test.go:196: more context +// github.com/juju/errors/annotation_test.go:197: +func ErrorStack(err error) string { + return strings.Join(errorStack(err), "\n") +} + +func errorStack(err error) []string { + if err == nil { + return nil + } + + // We want the first error first + var lines []string + for { + var buff []byte + if err, ok := err.(locationer); ok { + file, line := err.Location() + // Strip off the leading GOPATH/src path elements. + file = trimGoPath(file) + if file != "" { + buff = append(buff, fmt.Sprintf("%s:%d", file, line)...) + buff = append(buff, ": "...) + } + } + if cerr, ok := err.(wrapper); ok { + message := cerr.Message() + buff = append(buff, message...) + // If there is a cause for this error, and it is different to the cause + // of the underlying error, then output the error string in the stack trace. + var cause error + if err1, ok := err.(causer); ok { + cause = err1.Cause() + } + err = cerr.Underlying() + if cause != nil && !sameError(Cause(err), cause) { + if message != "" { + buff = append(buff, ": "...) + } + buff = append(buff, cause.Error()...) + } + } else { + buff = append(buff, err.Error()...) + err = nil + } + lines = append(lines, string(buff)) + if err == nil { + break + } + } + // reverse the lines to get the original error, which was at the end of + // the list, back to the start. + var result []string + for i := len(lines); i > 0; i-- { + result = append(result, lines[i-1]) + } + return result +} diff --git a/vendor/github.com/juju/errors/path.go b/vendor/github.com/juju/errors/path.go new file mode 100644 index 000000000..a7b726ab0 --- /dev/null +++ b/vendor/github.com/juju/errors/path.go @@ -0,0 +1,38 @@ +// Copyright 2013, 2014 Canonical Ltd. +// Licensed under the LGPLv3, see LICENCE file for details. + +package errors + +import ( + "runtime" + "strings" +) + +// prefixSize is used internally to trim the user specific path from the +// front of the returned filenames from the runtime call stack. +var prefixSize int + +// goPath is the deduced path based on the location of this file as compiled. +var goPath string + +func init() { + _, file, _, ok := runtime.Caller(0) + if file == "?" { + return + } + if ok { + // We know that the end of the file should be: + // github.com/juju/errors/path.go + size := len(file) + suffix := len("github.com/juju/errors/path.go") + goPath = file[:size-suffix] + prefixSize = len(goPath) + } +} + +func trimGoPath(filename string) string { + if strings.HasPrefix(filename, goPath) { + return filename[prefixSize:] + } + return filename +} diff --git a/vendor/github.com/ngaut/deadline/rw.go b/vendor/github.com/ngaut/deadline/rw.go new file mode 100644 index 000000000..19d4368ef --- /dev/null +++ b/vendor/github.com/ngaut/deadline/rw.go @@ -0,0 +1,50 @@ +package deadline + +import ( + "io" + "time" +) + +type DeadlineReader interface { + io.Reader + SetReadDeadline(t time.Time) error +} + +type DeadlineWriter interface { + io.Writer + SetWriteDeadline(t time.Time) error +} + +type DeadlineReadWriter interface { + io.ReadWriter + SetReadDeadline(t time.Time) error + SetWriteDeadline(t time.Time) error +} + +type deadlineReader struct { + DeadlineReader + timeout time.Duration +} + +func (r *deadlineReader) Read(p []byte) (int, error) { + r.DeadlineReader.SetReadDeadline(time.Now().Add(r.timeout)) + return r.DeadlineReader.Read(p) +} + +func NewDeadlineReader(r DeadlineReader, timeout time.Duration) io.Reader { + return &deadlineReader{DeadlineReader: r, timeout: timeout} +} + +type deadlineWriter struct { + DeadlineWriter + timeout time.Duration +} + +func (r *deadlineWriter) Write(p []byte) (int, error) { + r.DeadlineWriter.SetWriteDeadline(time.Now().Add(r.timeout)) + return r.DeadlineWriter.Write(p) +} + +func NewDeadlineWriter(r DeadlineWriter, timeout time.Duration) io.Writer { + return &deadlineWriter{DeadlineWriter: r, timeout: timeout} +} diff --git a/vendor/github.com/ngaut/go-zookeeper/LICENSE b/vendor/github.com/ngaut/go-zookeeper/LICENSE new file mode 100644 index 000000000..bc00498c5 --- /dev/null +++ b/vendor/github.com/ngaut/go-zookeeper/LICENSE @@ -0,0 +1,25 @@ +Copyright (c) 2013, Samuel Stauffer +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of the author nor the + names of its contributors may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/ngaut/go-zookeeper/zk/conn.go b/vendor/github.com/ngaut/go-zookeeper/zk/conn.go new file mode 100644 index 000000000..f4043b9fd --- /dev/null +++ b/vendor/github.com/ngaut/go-zookeeper/zk/conn.go @@ -0,0 +1,788 @@ +package zk + +/* +TODO: +* make sure a ping response comes back in a reasonable time + +Possible watcher events: +* Event{Type: EventNotWatching, State: StateDisconnected, Path: path, Err: err} +*/ + +import ( + "crypto/rand" + "encoding/binary" + "errors" + "fmt" + "io" + "log" + "net" + "strconv" + "strings" + "sync" + "sync/atomic" + "time" +) + +var ErrNoServer = errors.New("zk: could not connect to a server") + +const ( + bufferSize = 10 * 1024 * 1024 + eventChanSize = 6 + sendChanSize = 16 + protectedPrefix = "_c_" +) + +type watchType int + +const ( + watchTypeData = iota + watchTypeExist = iota + watchTypeChild = iota +) + +type watchPathType struct { + path string + wType watchType +} + +type Dialer func(network, address string, timeout time.Duration) (net.Conn, error) + +type Conn struct { + lastZxid int64 + sessionID int64 + state State // must be 32-bit aligned + xid int32 + timeout int32 // session timeout in seconds + passwd []byte + + dialer Dialer + servers []string + serverIndex int + conn net.Conn + eventChan chan Event + shouldQuit chan bool + pingInterval time.Duration + recvTimeout time.Duration + connectTimeout time.Duration + + sendChan chan *request + requests map[int32]*request // Xid -> pending request + requestsLock sync.Mutex + watchers map[watchPathType][]chan Event + watchersLock sync.Mutex + + // Debug (used by unit tests) + reconnectDelay time.Duration +} + +type request struct { + xid int32 + opcode int32 + pkt interface{} + recvStruct interface{} + recvChan chan response + + // Because sending and receiving happen in separate go routines, there's + // a possible race condition when creating watches from outside the read + // loop. We must ensure that a watcher gets added to the list synchronously + // with the response from the server on any request that creates a watch. + // In order to not hard code the watch logic for each opcode in the recv + // loop the caller can use recvFunc to insert some synchronously code + // after a response. + recvFunc func(*request, *responseHeader, error) +} + +type response struct { + zxid int64 + err error +} + +type Event struct { + Type EventType + State State + Path string // For non-session events, the path of the watched node. + Err error +} + +func Connect(servers []string, recvTimeout time.Duration) (*Conn, <-chan Event, error) { + return ConnectWithDialer(servers, recvTimeout, nil) +} + +func ConnectWithDialer(servers []string, recvTimeout time.Duration, dialer Dialer) (*Conn, <-chan Event, error) { + // Randomize the order of the servers to avoid creating hotspots + stringShuffle(servers) + + for i, addr := range servers { + if !strings.Contains(addr, ":") { + servers[i] = addr + ":" + strconv.Itoa(DefaultPort) + } + } + ec := make(chan Event, eventChanSize) + if dialer == nil { + dialer = net.DialTimeout + } + conn := Conn{ + dialer: dialer, + servers: servers, + serverIndex: 0, + conn: nil, + state: StateDisconnected, + eventChan: ec, + shouldQuit: make(chan bool), + recvTimeout: recvTimeout, + pingInterval: time.Duration((int64(recvTimeout) / 2)), + connectTimeout: 1 * time.Second, + sendChan: make(chan *request, sendChanSize), + requests: make(map[int32]*request), + watchers: make(map[watchPathType][]chan Event), + passwd: emptyPassword, + timeout: 30000, + + // Debug + reconnectDelay: time.Second, + } + go func() { + conn.loop() + conn.flushRequests(ErrClosing) + conn.invalidateWatches(ErrClosing) + close(conn.eventChan) + }() + return &conn, ec, nil +} + +func (c *Conn) Close() { + close(c.shouldQuit) + + select { + case <-c.queueRequest(opClose, &closeRequest{}, &closeResponse{}, nil): + case <-time.After(time.Second): + } +} + +func (c *Conn) State() State { + return State(atomic.LoadInt32((*int32)(&c.state))) +} + +func (c *Conn) setState(state State) { + atomic.StoreInt32((*int32)(&c.state), int32(state)) + select { + case c.eventChan <- Event{Type: EventSession, State: state}: + default: + // panic("zk: event channel full - it must be monitored and never allowed to be full") + } +} + +func (c *Conn) connect() { + c.serverIndex = (c.serverIndex + 1) % len(c.servers) + startIndex := c.serverIndex + c.setState(StateConnecting) + for { + zkConn, err := c.dialer("tcp", c.servers[c.serverIndex], c.connectTimeout) + if err == nil { + c.conn = zkConn + c.setState(StateConnected) + return + } + + log.Printf("Failed to connect to %s: %+v", c.servers[c.serverIndex], err) + + c.serverIndex = (c.serverIndex + 1) % len(c.servers) + if c.serverIndex == startIndex { + c.flushUnsentRequests(ErrNoServer) + time.Sleep(time.Second) + } + } +} + +func (c *Conn) loop() { + for { + c.connect() + err := c.authenticate() + switch { + case err == ErrSessionExpired: + c.invalidateWatches(err) + case err != nil && c.conn != nil: + c.conn.Close() + case err == nil: + closeChan := make(chan bool) // channel to tell send loop stop + var wg sync.WaitGroup + + wg.Add(1) + go func() { + c.sendLoop(c.conn, closeChan) + c.conn.Close() // causes recv loop to EOF/exit + wg.Done() + }() + + wg.Add(1) + go func() { + err = c.recvLoop(c.conn) + if err == nil { + panic("zk: recvLoop should never return nil error") + } + close(closeChan) // tell send loop to exit + wg.Done() + }() + + wg.Wait() + } + + c.setState(StateDisconnected) + + // Yeesh + if err != io.EOF && err != ErrSessionExpired && !strings.Contains(err.Error(), "use of closed network connection") { + log.Println(err) + } + + select { + case <-c.shouldQuit: + c.flushRequests(ErrClosing) + return + default: + } + + if err != ErrSessionExpired { + err = ErrConnectionClosed + } + c.flushRequests(err) + + if c.reconnectDelay > 0 { + select { + case <-c.shouldQuit: + return + case <-time.After(c.reconnectDelay): + } + } + } +} + +func (c *Conn) flushUnsentRequests(err error) { + for { + select { + default: + return + case req := <-c.sendChan: + req.recvChan <- response{-1, err} + } + } +} + +// Send error to all pending requests and clear request map +func (c *Conn) flushRequests(err error) { + c.requestsLock.Lock() + for _, req := range c.requests { + req.recvChan <- response{-1, err} + } + c.requests = make(map[int32]*request) + c.requestsLock.Unlock() +} + +// Send error to all watchers and clear watchers map +func (c *Conn) invalidateWatches(err error) { + c.watchersLock.Lock() + defer c.watchersLock.Unlock() + + if len(c.watchers) >= 0 { + for pathType, watchers := range c.watchers { + ev := Event{Type: EventNotWatching, State: StateDisconnected, Path: pathType.path, Err: err} + for _, ch := range watchers { + ch <- ev + close(ch) + } + } + c.watchers = make(map[watchPathType][]chan Event) + } +} + +func (c *Conn) sendSetWatches() { + c.watchersLock.Lock() + defer c.watchersLock.Unlock() + + if len(c.watchers) == 0 { + return + } + + req := &setWatchesRequest{ + RelativeZxid: c.lastZxid, + DataWatches: make([]string, 0), + ExistWatches: make([]string, 0), + ChildWatches: make([]string, 0), + } + n := 0 + for pathType, watchers := range c.watchers { + if len(watchers) == 0 { + continue + } + switch pathType.wType { + case watchTypeData: + req.DataWatches = append(req.DataWatches, pathType.path) + case watchTypeExist: + req.ExistWatches = append(req.ExistWatches, pathType.path) + case watchTypeChild: + req.ChildWatches = append(req.ChildWatches, pathType.path) + } + n++ + } + if n == 0 { + return + } + + go func() { + res := &setWatchesResponse{} + _, err := c.request(opSetWatches, req, res, nil) + if err != nil { + log.Printf("Failed to set previous watches: %s", err.Error()) + } + }() +} + +func (c *Conn) authenticate() error { + buf := make([]byte, 256) + + // connect request + + n, err := encodePacket(buf[4:], &connectRequest{ + ProtocolVersion: protocolVersion, + LastZxidSeen: c.lastZxid, + TimeOut: c.timeout, + SessionID: c.sessionID, + Passwd: c.passwd, + }) + if err != nil { + return err + } + + binary.BigEndian.PutUint32(buf[:4], uint32(n)) + + _, err = c.conn.Write(buf[:n+4]) + if err != nil { + return err + } + + c.sendSetWatches() + + // connect response + + // package length + _, err = io.ReadFull(c.conn, buf[:4]) + if err != nil { + return err + } + + blen := int(binary.BigEndian.Uint32(buf[:4])) + if cap(buf) < blen { + buf = make([]byte, blen) + } + + _, err = io.ReadFull(c.conn, buf[:blen]) + if err != nil { + return err + } + + r := connectResponse{} + _, err = decodePacket(buf[:blen], &r) + if err != nil { + return err + } + if r.SessionID == 0 { + c.sessionID = 0 + c.passwd = emptyPassword + c.lastZxid = 0 + c.setState(StateExpired) + return ErrSessionExpired + } + + if c.sessionID != r.SessionID { + atomic.StoreInt32(&c.xid, 0) + } + c.timeout = r.TimeOut + c.sessionID = r.SessionID + c.passwd = r.Passwd + c.setState(StateHasSession) + + return nil +} + +func (c *Conn) sendLoop(conn net.Conn, closeChan <-chan bool) error { + pingTicker := time.NewTicker(c.pingInterval) + defer pingTicker.Stop() + + buf := make([]byte, bufferSize) + for { + select { + case req := <-c.sendChan: + header := &requestHeader{req.xid, req.opcode} + n, err := encodePacket(buf[4:], header) + if err != nil { + req.recvChan <- response{-1, err} + continue + } + + n2, err := encodePacket(buf[4+n:], req.pkt) + if err != nil { + req.recvChan <- response{-1, err} + continue + } + + n += n2 + + binary.BigEndian.PutUint32(buf[:4], uint32(n)) + + c.requestsLock.Lock() + select { + case <-closeChan: + req.recvChan <- response{-1, ErrConnectionClosed} + c.requestsLock.Unlock() + return ErrConnectionClosed + default: + } + c.requests[req.xid] = req + c.requestsLock.Unlock() + + conn.SetWriteDeadline(time.Now().Add(c.recvTimeout)) + _, err = conn.Write(buf[:n+4]) + conn.SetWriteDeadline(time.Time{}) + if err != nil { + req.recvChan <- response{-1, err} + conn.Close() + return err + } + case <-pingTicker.C: + n, err := encodePacket(buf[4:], &requestHeader{Xid: -2, Opcode: opPing}) + if err != nil { + panic("zk: opPing should never fail to serialize") + } + + binary.BigEndian.PutUint32(buf[:4], uint32(n)) + + conn.SetWriteDeadline(time.Now().Add(c.recvTimeout)) + _, err = conn.Write(buf[:n+4]) + conn.SetWriteDeadline(time.Time{}) + if err != nil { + conn.Close() + return err + } + case <-closeChan: + return nil + } + } +} + +func (c *Conn) recvLoop(conn net.Conn) error { + buf := make([]byte, bufferSize) + for { + // package length + conn.SetReadDeadline(time.Now().Add(c.recvTimeout)) + _, err := io.ReadFull(conn, buf[:4]) + if err != nil { + return err + } + + blen := int(binary.BigEndian.Uint32(buf[:4])) + if cap(buf) < blen { + buf = make([]byte, blen) + } + + _, err = io.ReadFull(conn, buf[:blen]) + conn.SetReadDeadline(time.Time{}) + if err != nil { + return err + } + + res := responseHeader{} + _, err = decodePacket(buf[:16], &res) + if err != nil { + return err + } + + if res.Xid == -1 { + res := &watcherEvent{} + _, err := decodePacket(buf[16:16+blen], res) + if err != nil { + return err + } + ev := Event{ + Type: res.Type, + State: res.State, + Path: res.Path, + Err: nil, + } + select { + case c.eventChan <- ev: + default: + } + wTypes := make([]watchType, 0, 2) + switch res.Type { + case EventNodeCreated: + wTypes = append(wTypes, watchTypeExist) + case EventNodeDeleted, EventNodeDataChanged: + wTypes = append(wTypes, watchTypeExist, watchTypeData, watchTypeChild) + case EventNodeChildrenChanged: + wTypes = append(wTypes, watchTypeChild) + } + c.watchersLock.Lock() + for _, t := range wTypes { + wpt := watchPathType{res.Path, t} + if watchers := c.watchers[wpt]; watchers != nil && len(watchers) > 0 { + for _, ch := range watchers { + ch <- ev + close(ch) + } + delete(c.watchers, wpt) + } + } + c.watchersLock.Unlock() + } else if res.Xid == -2 { + // Ping response. Ignore. + } else if res.Xid < 0 { + log.Printf("Xid < 0 (%d) but not ping or watcher event", res.Xid) + } else { + if res.Zxid > 0 { + c.lastZxid = res.Zxid + } + + c.requestsLock.Lock() + req, ok := c.requests[res.Xid] + if ok { + delete(c.requests, res.Xid) + } + c.requestsLock.Unlock() + + if !ok { + log.Printf("Response for unknown request with xid %d", res.Xid) + } else { + if res.Err != 0 { + err = res.Err.toError() + } else { + _, err = decodePacket(buf[16:16+blen], req.recvStruct) + } + if req.recvFunc != nil { + req.recvFunc(req, &res, err) + } + req.recvChan <- response{res.Zxid, err} + if req.opcode == opClose { + return io.EOF + } + } + } + } +} + +func (c *Conn) nextXid() int32 { + return atomic.AddInt32(&c.xid, 1) +} + +func (c *Conn) addWatcher(path string, watchType watchType) <-chan Event { + c.watchersLock.Lock() + defer c.watchersLock.Unlock() + + ch := make(chan Event, 1) + wpt := watchPathType{path, watchType} + c.watchers[wpt] = append(c.watchers[wpt], ch) + return ch +} + +func (c *Conn) queueRequest(opcode int32, req interface{}, res interface{}, recvFunc func(*request, *responseHeader, error)) <-chan response { + rq := &request{ + xid: c.nextXid(), + opcode: opcode, + pkt: req, + recvStruct: res, + recvChan: make(chan response, 1), + recvFunc: recvFunc, + } + c.sendChan <- rq + return rq.recvChan +} + +func (c *Conn) request(opcode int32, req interface{}, res interface{}, recvFunc func(*request, *responseHeader, error)) (int64, error) { + r := <-c.queueRequest(opcode, req, res, recvFunc) + return r.zxid, r.err +} + +func (c *Conn) AddAuth(scheme string, auth []byte) error { + _, err := c.request(opSetAuth, &setAuthRequest{Type: 0, Scheme: scheme, Auth: auth}, &setAuthResponse{}, nil) + return err +} + +func (c *Conn) Children(path string) ([]string, Stat, error) { + res := &getChildren2Response{} + _, err := c.request(opGetChildren2, &getChildren2Request{Path: path, Watch: false}, res, nil) + return res.Children, &res.Stat, err +} + +func (c *Conn) ChildrenW(path string) ([]string, Stat, <-chan Event, error) { + var ech <-chan Event + res := &getChildren2Response{} + _, err := c.request(opGetChildren2, &getChildren2Request{Path: path, Watch: true}, res, func(req *request, res *responseHeader, err error) { + if err == nil { + ech = c.addWatcher(path, watchTypeChild) + } + }) + if err != nil { + return nil, nil, nil, err + } + return res.Children, &res.Stat, ech, err +} + +func (c *Conn) Get(path string) ([]byte, Stat, error) { + res := &getDataResponse{} + _, err := c.request(opGetData, &getDataRequest{Path: path, Watch: false}, res, nil) + return res.Data, &res.Stat, err +} + +// GetW returns the contents of a znode and sets a watch +func (c *Conn) GetW(path string) ([]byte, Stat, <-chan Event, error) { + var ech <-chan Event + res := &getDataResponse{} + _, err := c.request(opGetData, &getDataRequest{Path: path, Watch: true}, res, func(req *request, res *responseHeader, err error) { + if err == nil { + ech = c.addWatcher(path, watchTypeData) + } + }) + if err != nil { + return nil, nil, nil, err + } + return res.Data, &res.Stat, ech, err +} + +func (c *Conn) Set(path string, data []byte, version int32) (Stat, error) { + res := &setDataResponse{} + _, err := c.request(opSetData, &SetDataRequest{path, data, version}, res, nil) + return &res.Stat, err +} + +func (c *Conn) Create(path string, data []byte, flags int32, acl []ACL) (string, error) { + res := &createResponse{} + _, err := c.request(opCreate, &CreateRequest{path, data, acl, flags}, res, nil) + return res.Path, err +} + +// CreateProtectedEphemeralSequential fixes a race condition if the server crashes +// after it creates the node. On reconnect the session may still be valid so the +// ephemeral node still exists. Therefore, on reconnect we need to check if a node +// with a GUID generated on create exists. +func (c *Conn) CreateProtectedEphemeralSequential(path string, data []byte, acl []ACL) (string, error) { + var guid [16]byte + _, err := io.ReadFull(rand.Reader, guid[:16]) + if err != nil { + return "", err + } + guidStr := fmt.Sprintf("%x", guid) + + parts := strings.Split(path, "/") + parts[len(parts)-1] = fmt.Sprintf("%s%s-%s", protectedPrefix, guidStr, parts[len(parts)-1]) + rootPath := strings.Join(parts[:len(parts)-1], "/") + protectedPath := strings.Join(parts, "/") + + var newPath string + for i := 0; i < 3; i++ { + newPath, err = c.Create(protectedPath, data, FlagEphemeral|FlagSequence, acl) + switch err { + case ErrSessionExpired: + // No need to search for the node since it can't exist. Just try again. + case ErrConnectionClosed: + children, _, err := c.Children(rootPath) + if err != nil { + return "", err + } + for _, p := range children { + parts := strings.Split(p, "/") + if pth := parts[len(parts)-1]; strings.HasPrefix(pth, protectedPrefix) { + if g := pth[len(protectedPrefix) : len(protectedPrefix)+32]; g == guidStr { + return rootPath + "/" + p, nil + } + } + } + case nil: + return newPath, nil + default: + return "", err + } + } + return "", err +} + +func (c *Conn) Delete(path string, version int32) error { + _, err := c.request(opDelete, &DeleteRequest{path, version}, &deleteResponse{}, nil) + return err +} + +func (c *Conn) Exists(path string) (bool, Stat, error) { + res := &existsResponse{} + _, err := c.request(opExists, &existsRequest{Path: path, Watch: false}, res, nil) + exists := true + if err == ErrNoNode { + exists = false + err = nil + } + return exists, &res.Stat, err +} + +func (c *Conn) ExistsW(path string) (bool, Stat, <-chan Event, error) { + var ech <-chan Event + res := &existsResponse{} + _, err := c.request(opExists, &existsRequest{Path: path, Watch: true}, res, func(req *request, res *responseHeader, err error) { + if err == nil { + ech = c.addWatcher(path, watchTypeData) + } else if err == ErrNoNode { + ech = c.addWatcher(path, watchTypeExist) + } + }) + exists := true + if err == ErrNoNode { + exists = false + err = nil + } + if err != nil { + return false, nil, nil, err + } + return exists, &res.Stat, ech, err +} + +func (c *Conn) GetACL(path string) ([]ACL, Stat, error) { + res := &getAclResponse{} + _, err := c.request(opGetAcl, &getAclRequest{Path: path}, res, nil) + return res.Acl, &res.Stat, err +} + +func (c *Conn) SetACL(path string, acl []ACL, version int32) (Stat, error) { + res := &setAclResponse{} + _, err := c.request(opSetAcl, &setAclRequest{Path: path, Acl: acl, Version: version}, res, nil) + return &res.Stat, err +} + +func (c *Conn) Sync(path string) (string, error) { + res := &syncResponse{} + _, err := c.request(opSync, &syncRequest{Path: path}, res, nil) + return res.Path, err +} + +type MultiOps struct { + Create []CreateRequest + Delete []DeleteRequest + SetData []SetDataRequest + Check []CheckVersionRequest +} + +func (c *Conn) Multi(ops MultiOps) error { + req := &multiRequest{ + Ops: make([]multiRequestOp, 0, len(ops.Create)+len(ops.Delete)+len(ops.SetData)+len(ops.Check)), + DoneHeader: multiHeader{Type: -1, Done: true, Err: -1}, + } + for _, r := range ops.Create { + req.Ops = append(req.Ops, multiRequestOp{multiHeader{opCreate, false, -1}, r}) + } + for _, r := range ops.SetData { + req.Ops = append(req.Ops, multiRequestOp{multiHeader{opSetData, false, -1}, r}) + } + for _, r := range ops.Delete { + req.Ops = append(req.Ops, multiRequestOp{multiHeader{opDelete, false, -1}, r}) + } + for _, r := range ops.Check { + req.Ops = append(req.Ops, multiRequestOp{multiHeader{opCheck, false, -1}, r}) + } + res := &multiResponse{} + _, err := c.request(opMulti, req, res, nil) + return err +} diff --git a/vendor/github.com/ngaut/go-zookeeper/zk/constants.go b/vendor/github.com/ngaut/go-zookeeper/zk/constants.go new file mode 100644 index 000000000..ee8772437 --- /dev/null +++ b/vendor/github.com/ngaut/go-zookeeper/zk/constants.go @@ -0,0 +1,217 @@ +package zk + +import ( + "errors" +) + +const ( + protocolVersion = 0 + + DefaultPort = 2181 +) + +const ( + opNotify = 0 + opCreate = 1 + opDelete = 2 + opExists = 3 + opGetData = 4 + opSetData = 5 + opGetAcl = 6 + opSetAcl = 7 + opGetChildren = 8 + opSync = 9 + opPing = 11 + opGetChildren2 = 12 + opCheck = 13 + opMulti = 14 + opClose = -11 + opSetAuth = 100 + opSetWatches = 101 + // Not in protocol, used internally + opWatcherEvent = -2 +) + +const ( + EventNodeCreated = EventType(1) + EventNodeDeleted = EventType(2) + EventNodeDataChanged = EventType(3) + EventNodeChildrenChanged = EventType(4) + + EventSession = EventType(-1) + EventNotWatching = EventType(-2) +) + +var ( + eventNames = map[EventType]string{ + EventNodeCreated: "EventNodeCreated", + EventNodeDeleted: "EventNodeDeleted", + EventNodeDataChanged: "EventNodeDataChanged", + EventNodeChildrenChanged: "EventNodeChildrenChanged", + EventSession: "EventSession", + EventNotWatching: "EventNotWatching", + } +) + +const ( + StateUnknown = State(-1) + StateDisconnected = State(0) + StateConnecting = State(1) + StateSyncConnected = State(3) + StateAuthFailed = State(4) + StateConnectedReadOnly = State(5) + StateSaslAuthenticated = State(6) + StateExpired = State(-112) + // StateAuthFailed = State(-113) + + StateConnected = State(100) + StateHasSession = State(101) +) + +const ( + FlagEphemeral = 1 + FlagSequence = 2 +) + +var ( + stateNames = map[State]string{ + StateUnknown: "StateUnknown", + StateDisconnected: "StateDisconnected", + StateSyncConnected: "StateSyncConnected", + StateConnectedReadOnly: "StateConnectedReadOnly", + StateSaslAuthenticated: "StateSaslAuthenticated", + StateExpired: "StateExpired", + StateAuthFailed: "StateAuthFailed", + StateConnecting: "StateConnecting", + StateConnected: "StateConnected", + StateHasSession: "StateHasSession", + } +) + +type State int32 + +func (s State) String() string { + if name := stateNames[s]; name != "" { + return name + } + return "Unknown" +} + +type ErrCode int32 + +var ( + ErrConnectionClosed = errors.New("zk: connection closed") + ErrUnknown = errors.New("zk: unknown error") + ErrAPIError = errors.New("zk: api error") + ErrNoNode = errors.New("zk: node does not exist") + ErrNoAuth = errors.New("zk: not authenticated") + ErrBadVersion = errors.New("zk: version conflict") + ErrNoChildrenForEphemerals = errors.New("zk: ephemeral nodes may not have children") + ErrNodeExists = errors.New("zk: node already exists") + ErrNotEmpty = errors.New("zk: node has children") + ErrSessionExpired = errors.New("zk: session has been expired by the server") + ErrInvalidACL = errors.New("zk: invalid ACL specified") + ErrAuthFailed = errors.New("zk: client authentication failed") + ErrClosing = errors.New("zk: zookeeper is closing") + ErrNothing = errors.New("zk: no server responsees to process") + ErrSessionMoved = errors.New("zk: session moved to another server, so operation is ignored") + + // ErrInvalidCallback = errors.New("zk: invalid callback specified") + errCodeToError = map[ErrCode]error{ + 0: nil, + errAPIError: ErrAPIError, + errNoNode: ErrNoNode, + errNoAuth: ErrNoAuth, + errBadVersion: ErrBadVersion, + errNoChildrenForEphemerals: ErrNoChildrenForEphemerals, + errNodeExists: ErrNodeExists, + errNotEmpty: ErrNotEmpty, + errSessionExpired: ErrSessionExpired, + // errInvalidCallback: ErrInvalidCallback, + errInvalidAcl: ErrInvalidACL, + errAuthFailed: ErrAuthFailed, + errClosing: ErrClosing, + errNothing: ErrNothing, + errSessionMoved: ErrSessionMoved, + } +) + +func (e ErrCode) toError() error { + if err, ok := errCodeToError[e]; ok { + return err + } + return ErrUnknown +} + +const ( + errOk = 0 + // System and server-side errors + errSystemError = -1 + errRuntimeInconsistency = -2 + errDataInconsistency = -3 + errConnectionLoss = -4 + errMarshallingError = -5 + errUnimplemented = -6 + errOperationTimeout = -7 + errBadArguments = -8 + errInvalidState = -9 + // API errors + errAPIError = ErrCode(-100) + errNoNode = ErrCode(-101) // * + errNoAuth = ErrCode(-102) + errBadVersion = ErrCode(-103) // * + errNoChildrenForEphemerals = ErrCode(-108) + errNodeExists = ErrCode(-110) // * + errNotEmpty = ErrCode(-111) + errSessionExpired = ErrCode(-112) + errInvalidCallback = ErrCode(-113) + errInvalidAcl = ErrCode(-114) + errAuthFailed = ErrCode(-115) + errClosing = ErrCode(-116) + errNothing = ErrCode(-117) + errSessionMoved = ErrCode(-118) +) + +// Constants for ACL permissions +const ( + PermRead = 1 << iota + PermWrite + PermCreate + PermDelete + PermAdmin + PermAll = 0x1f +) + +var ( + emptyPassword = []byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} + opNames = map[int32]string{ + opNotify: "notify", + opCreate: "create", + opDelete: "delete", + opExists: "exists", + opGetData: "getData", + opSetData: "setData", + opGetAcl: "getACL", + opSetAcl: "setACL", + opGetChildren: "getChildren", + opSync: "sync", + opPing: "ping", + opGetChildren2: "getChildren2", + opCheck: "check", + opMulti: "multi", + opClose: "close", + opSetAuth: "setAuth", + opSetWatches: "setWatches", + + opWatcherEvent: "watcherEvent", + } +) + +type EventType int32 + +func (t EventType) String() string { + if name := eventNames[t]; name != "" { + return name + } + return "Unknown" +} diff --git a/vendor/github.com/ngaut/go-zookeeper/zk/lock.go b/vendor/github.com/ngaut/go-zookeeper/zk/lock.go new file mode 100644 index 000000000..fb77e4a53 --- /dev/null +++ b/vendor/github.com/ngaut/go-zookeeper/zk/lock.go @@ -0,0 +1,131 @@ +package zk + +import ( + "errors" + "fmt" + "strconv" + "strings" +) + +var ( + ErrDeadlock = errors.New("zk: trying to acquire a lock twice") + ErrNotLocked = errors.New("zk: not locked") +) + +type Lock struct { + c *Conn + path string + acl []ACL + lockPath string + seq int +} + +func NewLock(c *Conn, path string, acl []ACL) *Lock { + return &Lock{ + c: c, + path: path, + acl: acl, + } +} + +func parseSeq(path string) (int, error) { + parts := strings.Split(path, "-") + return strconv.Atoi(parts[len(parts)-1]) +} + +func (l *Lock) Lock() error { + if l.lockPath != "" { + return ErrDeadlock + } + + prefix := fmt.Sprintf("%s/lock-", l.path) + + path := "" + var err error + for i := 0; i < 3; i++ { + path, err = l.c.CreateProtectedEphemeralSequential(prefix, []byte{}, l.acl) + if err == ErrNoNode { + // Create parent node. + parts := strings.Split(l.path, "/") + pth := "" + for _, p := range parts[1:] { + pth += "/" + p + _, err := l.c.Create(pth, []byte{}, 0, l.acl) + if err != nil && err != ErrNodeExists { + return err + } + } + } else if err == nil { + break + } else { + return err + } + } + if err != nil { + return err + } + + seq, err := parseSeq(path) + if err != nil { + return err + } + + for { + children, _, err := l.c.Children(l.path) + if err != nil { + return err + } + + lowestSeq := seq + prevSeq := 0 + prevSeqPath := "" + for _, p := range children { + s, err := parseSeq(p) + if err != nil { + return err + } + if s < lowestSeq { + lowestSeq = s + } + if s < seq && s > prevSeq { + prevSeq = s + prevSeqPath = p + } + } + + if seq == lowestSeq { + // Acquired the lock + break + } + + // Wait on the node next in line for the lock + _, _, ch, err := l.c.GetW(l.path + "/" + prevSeqPath) + if err != nil && err != ErrNoNode { + return err + } else if err != nil && err == ErrNoNode { + // try again + continue + } + + ev := <-ch + if ev.Err != nil { + return ev.Err + } + } + + l.seq = seq + l.lockPath = path + return nil +} + +func (l *Lock) Unlock() error { + if l.lockPath == "" { + return ErrNotLocked + } + if err := l.c.Delete(l.lockPath, -1); err != nil { + return err + } + l.lockPath = "" + l.seq = 0 + return nil +} diff --git a/vendor/github.com/ngaut/go-zookeeper/zk/server_help.go b/vendor/github.com/ngaut/go-zookeeper/zk/server_help.go new file mode 100644 index 000000000..73678bad0 --- /dev/null +++ b/vendor/github.com/ngaut/go-zookeeper/zk/server_help.go @@ -0,0 +1,113 @@ +package zk + +import ( + "fmt" + "io/ioutil" + "math/rand" + "os" + "path/filepath" + "time" +) + +type TestServer struct { + Port int + Path string + Srv *Server +} + +type TestCluster struct { + Path string + Servers []TestServer +} + +func StartTestCluster(size int) (*TestCluster, error) { + tmpPath, err := ioutil.TempDir("", "gozk") + if err != nil { + return nil, err + } + success := false + startPort := int(rand.Int31n(6000) + 10000) + cluster := &TestCluster{Path: tmpPath} + defer func() { + if !success { + cluster.Stop() + } + }() + for serverN := 0; serverN < size; serverN++ { + srvPath := filepath.Join(tmpPath, fmt.Sprintf("srv%d", serverN)) + if err := os.Mkdir(srvPath, 0700); err != nil { + return nil, err + } + port := startPort + serverN*3 + cfg := ServerConfig{ + ClientPort: port, + DataDir: srvPath, + } + for i := 0; i < size; i++ { + cfg.Servers = append(cfg.Servers, ServerConfigServer{ + ID: i + 1, + Host: "127.0.0.1", + PeerPort: startPort + i*3 + 1, + LeaderElectionPort: startPort + i*3 + 2, + }) + } + cfgPath := filepath.Join(srvPath, "zoo.cfg") + fi, err := os.Create(cfgPath) + if err != nil { + return nil, err + } + err = cfg.Marshall(fi) + fi.Close() + if err != nil { + return nil, err + } + + fi, err = os.Create(filepath.Join(srvPath, "myid")) + if err != nil { + return nil, err + } + _, err = fmt.Fprintf(fi, "%d\n", serverN+1) + fi.Close() + if err != nil { + return nil, err + } + + srv := &Server{ + ConfigPath: cfgPath, + } + if err := srv.Start(); err != nil { + fmt.Println(err) + return nil, err + } + cluster.Servers = append(cluster.Servers, TestServer{ + Path: srvPath, + Port: cfg.ClientPort, + Srv: srv, + }) + } + success = true + time.Sleep(time.Second) // Give the server time to become active. Should probably actually attempt to connect to verify. + return cluster, nil +} + +func (ts *TestCluster) Connect(idx int) (*Conn, error) { + zk, _, err := Connect([]string{fmt.Sprintf("127.0.0.1:%d", ts.Servers[idx].Port)}, time.Second*15) + return zk, err +} + +func (ts *TestCluster) ConnectAll() (*Conn, error) { + hosts := make([]string, len(ts.Servers)) + for i, srv := range ts.Servers { + hosts[i] = fmt.Sprintf("127.0.0.1:%d", srv.Port) + } + zk, _, err := Connect(hosts, time.Second*15) + return zk, err +} + +func (ts *TestCluster) Stop() error { + for _, srv := range ts.Servers { + srv.Srv.Stop() + } + defer os.RemoveAll(ts.Path) + return nil +} diff --git a/vendor/github.com/ngaut/go-zookeeper/zk/server_java.go b/vendor/github.com/ngaut/go-zookeeper/zk/server_java.go new file mode 100644 index 000000000..6eaffaac1 --- /dev/null +++ b/vendor/github.com/ngaut/go-zookeeper/zk/server_java.go @@ -0,0 +1,142 @@ +package zk + +import ( + "fmt" + "io" + "os" + "os/exec" + "path/filepath" +) + +type ErrMissingServerConfigField string + +func (e ErrMissingServerConfigField) Error() string { + return fmt.Sprintf("zk: missing server config field '%s'", string(e)) +} + +const ( + DefaultServerTickTime = 2000 + DefaultServerInitLimit = 10 + DefaultServerSyncLimit = 5 + DefaultServerAutoPurgeSnapRetainCount = 3 + DefaultPeerPort = 2888 + DefaultLeaderElectionPort = 3888 +) + +type ServerConfigServer struct { + ID int + Host string + PeerPort int + LeaderElectionPort int +} + +type ServerConfig struct { + TickTime int // Number of milliseconds of each tick + InitLimit int // Number of ticks that the initial synchronization phase can take + SyncLimit int // Number of ticks that can pass between sending a request and getting an acknowledgement + DataDir string // Direcrory where the snapshot is stored + ClientPort int // Port at which clients will connect + AutoPurgeSnapRetainCount int // Number of snapshots to retain in dataDir + AutoPurgePurgeInterval int // Purge task internal in hours (0 to disable auto purge) + Servers []ServerConfigServer +} + +func (sc ServerConfig) Marshall(w io.Writer) error { + if sc.DataDir == "" { + return ErrMissingServerConfigField("dataDir") + } + fmt.Fprintf(w, "dataDir=%s\n", sc.DataDir) + if sc.TickTime <= 0 { + sc.TickTime = DefaultServerTickTime + } + fmt.Fprintf(w, "tickTime=%d\n", sc.TickTime) + if sc.InitLimit <= 0 { + sc.InitLimit = DefaultServerInitLimit + } + fmt.Fprintf(w, "initLimit=%d\n", sc.InitLimit) + if sc.SyncLimit <= 0 { + sc.SyncLimit = DefaultServerSyncLimit + } + fmt.Fprintf(w, "syncLimit=%d\n", sc.SyncLimit) + if sc.ClientPort <= 0 { + sc.ClientPort = DefaultPort + } + fmt.Fprintf(w, "clientPort=%d\n", sc.ClientPort) + if sc.AutoPurgePurgeInterval > 0 { + if sc.AutoPurgeSnapRetainCount <= 0 { + sc.AutoPurgeSnapRetainCount = DefaultServerAutoPurgeSnapRetainCount + } + fmt.Fprintf(w, "autopurge.snapRetainCount=%d\n", sc.AutoPurgeSnapRetainCount) + fmt.Fprintf(w, "autopurge.purgeInterval=%d\n", sc.AutoPurgePurgeInterval) + } + if len(sc.Servers) > 0 { + for _, srv := range sc.Servers { + if srv.PeerPort <= 0 { + srv.PeerPort = DefaultPeerPort + } + if srv.LeaderElectionPort <= 0 { + srv.LeaderElectionPort = DefaultLeaderElectionPort + } + fmt.Fprintf(w, "server.%d=%s:%d:%d\n", srv.ID, srv.Host, srv.PeerPort, srv.LeaderElectionPort) + } + } + return nil +} + +var jarSearchPaths = []string{ + "zookeeper-*/contrib/fatjar/zookeeper-*-fatjar.jar", + "../zookeeper-*/contrib/fatjar/zookeeper-*-fatjar.jar", + "/usr/share/java/zookeeper-*.jar", + "/usr/local/zookeeper-*/contrib/fatjar/zookeeper-*-fatjar.jar", + "/usr/local/Cellar/zookeeper/*/libexec/contrib/fatjar/zookeeper-*-fatjar.jar", +} + +func findZookeeperFatJar() string { + var paths []string + zkPath := os.Getenv("ZOOKEEPER_PATH") + if zkPath == "" { + paths = jarSearchPaths + } else { + paths = []string{filepath.Join(zkPath, "contrib/fatjar/zookeeper-*-fatjar.jar")} + } + for _, path := range paths { + matches, _ := filepath.Glob(path) + // TODO: could sort by version and pick latest + if len(matches) > 0 { + return matches[0] + } + } + return "" +} + +type Server struct { + JarPath string + ConfigPath string + + cmd *exec.Cmd +} + +func (srv *Server) Start() error { + if srv.JarPath == "" { + srv.JarPath = findZookeeperFatJar() + if srv.JarPath == "" { + return fmt.Errorf("zk: unable to find server jar") + } + } + srv.cmd = exec.Command("java", "-jar", srv.JarPath, "server", srv.ConfigPath) + // srv.cmd.Stdout = os.Stdout + // srv.cmd.Stderr = os.Stderr + err := srv.cmd.Start() + if err != nil { + fmt.Println("start failed", err) + } + + fmt.Println("start zookeeper ok") + + return err +} + +func (srv *Server) Stop() error { + srv.cmd.Process.Signal(os.Kill) + return srv.cmd.Wait() +} diff --git a/vendor/github.com/ngaut/go-zookeeper/zk/structs.go b/vendor/github.com/ngaut/go-zookeeper/zk/structs.go new file mode 100644 index 000000000..4b5ef36d4 --- /dev/null +++ b/vendor/github.com/ngaut/go-zookeeper/zk/structs.go @@ -0,0 +1,662 @@ +package zk + +import ( + "encoding/binary" + "errors" + "reflect" + "runtime" + "time" +) + +var ( + ErrUnhandledFieldType = errors.New("zk: unhandled field type") + ErrPtrExpected = errors.New("zk: encode/decode expect a non-nil pointer to struct") + ErrShortBuffer = errors.New("zk: buffer too small") +) + +type ACL struct { + Perms int32 + Scheme string + ID string +} + +type zkstat struct { + ZCzxid int64 // The zxid of the change that caused this znode to be created. + ZMzxid int64 // The zxid of the change that last modified this znode. + ZCtime int64 // The time in milliseconds from epoch when this znode was created. + ZMtime int64 // The time in milliseconds from epoch when this znode was last modified. + ZVersion int32 // The number of changes to the data of this znode. + ZCversion int32 // The number of changes to the children of this znode. + ZAversion int32 // The number of changes to the ACL of this znode. + ZEphemeralOwner int64 // The session id of the owner of this znode if the znode is an ephemeral node. If it is not an ephemeral node, it will be zero. + ZDataLength int32 // The length of the data field of this znode. + ZNumChildren int32 // The number of children of this znode. + ZPzxid int64 // last modified children +} + +type Stat interface { + Czxid() int64 + Mzxid() int64 + CTime() time.Time + MTime() time.Time + Version() int + CVersion() int + AVersion() int + EphemeralOwner() int64 + DataLength() int + NumChildren() int + Pzxid() int64 +} + +// Czxid returns the zxid of the change that caused the node to be created. +func (s *zkstat) Czxid() int64 { + return s.ZCzxid +} + +// Mzxid returns the zxid of the change that last modified the node. +func (s *zkstat) Mzxid() int64 { + return s.ZMzxid +} + +func millisec2time(ms int64) time.Time { + return time.Unix(ms/1e3, ms%1e3*1e6) +} + +// CTime returns the time (at millisecond resolution) when the node was +// created. +func (s *zkstat) CTime() time.Time { + return millisec2time(s.ZCtime) +} + +// MTime returns the time (at millisecond resolution) when the node was +// last modified. +func (s *zkstat) MTime() time.Time { + return millisec2time(int64(s.ZMtime)) +} + +// Version returns the number of changes to the data of the node. +func (s *zkstat) Version() int { + return int(s.ZVersion) +} + +// CVersion returns the number of changes to the children of the node. +// This only changes when children are created or removed. +func (s *zkstat) CVersion() int { + return int(s.ZCversion) +} + +// AVersion returns the number of changes to the ACL of the node. +func (s *zkstat) AVersion() int { + return int(s.ZAversion) +} + +// If the node is an ephemeral node, EphemeralOwner returns the session id +// of the owner of the node; otherwise it will return zero. +func (s *zkstat) EphemeralOwner() int64 { + return int64(s.ZEphemeralOwner) +} + +// DataLength returns the length of the data in the node in bytes. +func (s *zkstat) DataLength() int { + return int(s.ZDataLength) +} + +// NumChildren returns the number of children of the node. +func (s *zkstat) NumChildren() int { + return int(s.ZNumChildren) +} + +// Pzxid returns the Pzxid of the node, whatever that is. +func (s *zkstat) Pzxid() int64 { + return int64(s.ZPzxid) +} + +type requestHeader struct { + Xid int32 + Opcode int32 +} + +type responseHeader struct { + Xid int32 + Zxid int64 + Err ErrCode +} + +type multiHeader struct { + Type int32 + Done bool + Err ErrCode +} + +type auth struct { + Type int32 + Scheme string + Auth []byte +} + +// Generic request structs + +type pathRequest struct { + Path string +} + +type PathVersionRequest struct { + Path string + Version int32 +} + +type pathWatchRequest struct { + Path string + Watch bool +} + +type pathResponse struct { + Path string +} + +type statResponse struct { + Stat zkstat +} + +// + +type CheckVersionRequest PathVersionRequest +type closeRequest struct{} +type closeResponse struct{} + +type connectRequest struct { + ProtocolVersion int32 + LastZxidSeen int64 + TimeOut int32 + SessionID int64 + Passwd []byte +} + +type connectResponse struct { + ProtocolVersion int32 + TimeOut int32 + SessionID int64 + Passwd []byte +} + +type CreateRequest struct { + Path string + Data []byte + Acl []ACL + Flags int32 +} + +type createResponse pathResponse +type DeleteRequest PathVersionRequest +type deleteResponse struct{} + +type errorResponse struct { + Err int32 +} + +type existsRequest pathWatchRequest +type existsResponse statResponse +type getAclRequest pathRequest + +type getAclResponse struct { + Acl []ACL + Stat zkstat +} + +type getChildrenRequest pathRequest + +type getChildrenResponse struct { + Children []string +} + +type getChildren2Request pathWatchRequest + +type getChildren2Response struct { + Children []string + Stat zkstat +} + +type getDataRequest pathWatchRequest + +type getDataResponse struct { + Data []byte + Stat zkstat +} + +type getMaxChildrenRequest pathRequest + +type getMaxChildrenResponse struct { + Max int32 +} + +type getSaslRequest struct { + Token []byte +} + +type pingRequest struct{} +type pingResponse struct{} + +type setAclRequest struct { + Path string + Acl []ACL + Version int32 +} + +type setAclResponse statResponse + +type SetDataRequest struct { + Path string + Data []byte + Version int32 +} + +type setDataResponse statResponse + +type setMaxChildren struct { + Path string + Max int32 +} + +type setSaslRequest struct { + Token string +} + +type setSaslResponse struct { + Token string +} + +type setWatchesRequest struct { + RelativeZxid int64 + DataWatches []string + ExistWatches []string + ChildWatches []string +} + +type setWatchesResponse struct{} + +type syncRequest pathRequest +type syncResponse pathResponse + +type setAuthRequest auth +type setAuthResponse struct{} + +type multiRequestOp struct { + Header multiHeader + Op interface{} +} +type multiRequest struct { + Ops []multiRequestOp + DoneHeader multiHeader +} +type multiResponseOp struct { + Header multiHeader + String string + Stat *zkstat +} +type multiResponse struct { + Ops []multiResponseOp + DoneHeader multiHeader +} + +func (r *multiRequest) Encode(buf []byte) (int, error) { + total := 0 + for _, op := range r.Ops { + op.Header.Done = false + n, err := encodePacketValue(buf[total:], reflect.ValueOf(op)) + if err != nil { + return total, err + } + total += n + } + r.DoneHeader.Done = true + n, err := encodePacketValue(buf[total:], reflect.ValueOf(r.DoneHeader)) + if err != nil { + return total, err + } + total += n + + return total, nil +} + +func (r *multiRequest) Decode(buf []byte) (int, error) { + r.Ops = make([]multiRequestOp, 0) + r.DoneHeader = multiHeader{-1, true, -1} + total := 0 + for { + header := &multiHeader{} + n, err := decodePacketValue(buf[total:], reflect.ValueOf(header)) + if err != nil { + return total, err + } + total += n + if header.Done { + r.DoneHeader = *header + break + } + + req := requestStructForOp(header.Type) + if req == nil { + return total, ErrAPIError + } + n, err = decodePacketValue(buf[total:], reflect.ValueOf(req)) + if err != nil { + return total, err + } + total += n + r.Ops = append(r.Ops, multiRequestOp{*header, req}) + } + return total, nil +} + +func (r *multiResponse) Decode(buf []byte) (int, error) { + r.Ops = make([]multiResponseOp, 0) + r.DoneHeader = multiHeader{-1, true, -1} + total := 0 + for { + header := &multiHeader{} + n, err := decodePacketValue(buf[total:], reflect.ValueOf(header)) + if err != nil { + return total, err + } + total += n + if header.Done { + r.DoneHeader = *header + break + } + + res := multiResponseOp{Header: *header} + var w reflect.Value + switch header.Type { + default: + return total, ErrAPIError + case opCreate: + w = reflect.ValueOf(&res.String) + case opSetData: + res.Stat = new(zkstat) + w = reflect.ValueOf(res.Stat) + case opCheck, opDelete: + } + if w.IsValid() { + n, err := decodePacketValue(buf[total:], w) + if err != nil { + return total, err + } + total += n + } + r.Ops = append(r.Ops, res) + } + return total, nil +} + +type watcherEvent struct { + Type EventType + State State + Path string +} + +type decoder interface { + Decode(buf []byte) (int, error) +} + +type encoder interface { + Encode(buf []byte) (int, error) +} + +func decodePacket(buf []byte, st interface{}) (n int, err error) { + defer func() { + if r := recover(); r != nil { + if e, ok := r.(runtime.Error); ok && e.Error() == "runtime error: slice bounds out of range" { + err = ErrShortBuffer + } else { + panic(r) + } + } + }() + + v := reflect.ValueOf(st) + if v.Kind() != reflect.Ptr || v.IsNil() { + return 0, ErrPtrExpected + } + return decodePacketValue(buf, v) +} + +func decodePacketValue(buf []byte, v reflect.Value) (int, error) { + rv := v + kind := v.Kind() + if kind == reflect.Ptr { + if v.IsNil() { + v.Set(reflect.New(v.Type().Elem())) + } + v = v.Elem() + kind = v.Kind() + } + + n := 0 + switch kind { + default: + return n, ErrUnhandledFieldType + case reflect.Struct: + if de, ok := rv.Interface().(decoder); ok { + return de.Decode(buf) + } else if de, ok := v.Interface().(decoder); ok { + return de.Decode(buf) + } else { + for i := 0; i < v.NumField(); i++ { + field := v.Field(i) + n2, err := decodePacketValue(buf[n:], field) + n += n2 + if err != nil { + return n, err + } + } + } + case reflect.Bool: + v.SetBool(buf[n] != 0) + n++ + case reflect.Int32: + v.SetInt(int64(binary.BigEndian.Uint32(buf[n : n+4]))) + n += 4 + case reflect.Int64: + v.SetInt(int64(binary.BigEndian.Uint64(buf[n : n+8]))) + n += 8 + case reflect.String: + ln := int(binary.BigEndian.Uint32(buf[n : n+4])) + v.SetString(string(buf[n+4 : n+4+ln])) + n += 4 + ln + case reflect.Slice: + switch v.Type().Elem().Kind() { + default: + count := int(binary.BigEndian.Uint32(buf[n : n+4])) + n += 4 + values := reflect.MakeSlice(v.Type(), count, count) + v.Set(values) + for i := 0; i < count; i++ { + n2, err := decodePacketValue(buf[n:], values.Index(i)) + n += n2 + if err != nil { + return n, err + } + } + case reflect.Uint8: + ln := int(int32(binary.BigEndian.Uint32(buf[n : n+4]))) + if ln < 0 { + n += 4 + v.SetBytes(nil) + } else { + bytes := make([]byte, ln) + copy(bytes, buf[n+4:n+4+ln]) + v.SetBytes(bytes) + n += 4 + ln + } + } + } + return n, nil +} + +func encodePacket(buf []byte, st interface{}) (n int, err error) { + defer func() { + if r := recover(); r != nil { + if e, ok := r.(runtime.Error); ok && e.Error() == "runtime error: slice bounds out of range" { + err = ErrShortBuffer + } else { + panic(r) + } + } + }() + + v := reflect.ValueOf(st) + if v.Kind() != reflect.Ptr || v.IsNil() { + return 0, ErrPtrExpected + } + return encodePacketValue(buf, v) +} + +func encodePacketValue(buf []byte, v reflect.Value) (int, error) { + rv := v + for v.Kind() == reflect.Ptr || v.Kind() == reflect.Interface { + v = v.Elem() + } + + n := 0 + switch v.Kind() { + default: + return n, ErrUnhandledFieldType + case reflect.Struct: + if en, ok := rv.Interface().(encoder); ok { + return en.Encode(buf) + } else if en, ok := v.Interface().(encoder); ok { + return en.Encode(buf) + } else { + for i := 0; i < v.NumField(); i++ { + field := v.Field(i) + n2, err := encodePacketValue(buf[n:], field) + n += n2 + if err != nil { + return n, err + } + } + } + case reflect.Bool: + if v.Bool() { + buf[n] = 1 + } else { + buf[n] = 0 + } + n++ + case reflect.Int32: + binary.BigEndian.PutUint32(buf[n:n+4], uint32(v.Int())) + n += 4 + case reflect.Int64: + binary.BigEndian.PutUint64(buf[n:n+8], uint64(v.Int())) + n += 8 + case reflect.String: + str := v.String() + binary.BigEndian.PutUint32(buf[n:n+4], uint32(len(str))) + copy(buf[n+4:n+4+len(str)], []byte(str)) + n += 4 + len(str) + case reflect.Slice: + switch v.Type().Elem().Kind() { + default: + count := v.Len() + startN := n + n += 4 + for i := 0; i < count; i++ { + n2, err := encodePacketValue(buf[n:], v.Index(i)) + n += n2 + if err != nil { + return n, err + } + } + binary.BigEndian.PutUint32(buf[startN:startN+4], uint32(count)) + case reflect.Uint8: + if v.IsNil() { + binary.BigEndian.PutUint32(buf[n:n+4], uint32(0xffffffff)) + n += 4 + } else { + bytes := v.Bytes() + binary.BigEndian.PutUint32(buf[n:n+4], uint32(len(bytes))) + copy(buf[n+4:n+4+len(bytes)], bytes) + n += 4 + len(bytes) + } + } + } + return n, nil +} + +func requestStructForOp(op int32) interface{} { + switch op { + case opClose: + return &closeRequest{} + case opCreate: + return &CreateRequest{} + case opDelete: + return &DeleteRequest{} + case opExists: + return &existsRequest{} + case opGetAcl: + return &getAclRequest{} + case opGetChildren: + return &getChildrenRequest{} + case opGetChildren2: + return &getChildren2Request{} + case opGetData: + return &getDataRequest{} + case opPing: + return &pingRequest{} + case opSetAcl: + return &setAclRequest{} + case opSetData: + return &SetDataRequest{} + case opSetWatches: + return &setWatchesRequest{} + case opSync: + return &syncRequest{} + case opSetAuth: + return &setAuthRequest{} + case opCheck: + return &CheckVersionRequest{} + case opMulti: + return &multiRequest{} + } + return nil +} + +func responseStructForOp(op int32) interface{} { + switch op { + case opClose: + return &closeResponse{} + case opCreate: + return &createResponse{} + case opDelete: + return &deleteResponse{} + case opExists: + return &existsResponse{} + case opGetAcl: + return &getAclResponse{} + case opGetChildren: + return &getChildrenResponse{} + case opGetChildren2: + return &getChildren2Response{} + case opGetData: + return &getDataResponse{} + case opPing: + return &pingResponse{} + case opSetAcl: + return &setAclResponse{} + case opSetData: + return &setDataResponse{} + case opSetWatches: + return &setWatchesResponse{} + case opSync: + return &syncResponse{} + case opWatcherEvent: + return &watcherEvent{} + case opSetAuth: + return &setAuthResponse{} + // case opCheck: + // return &checkVersionResponse{} + case opMulti: + return &multiResponse{} + } + return nil +} diff --git a/vendor/github.com/ngaut/go-zookeeper/zk/tracer.go b/vendor/github.com/ngaut/go-zookeeper/zk/tracer.go new file mode 100644 index 000000000..ab7e14ecf --- /dev/null +++ b/vendor/github.com/ngaut/go-zookeeper/zk/tracer.go @@ -0,0 +1,149 @@ +package zk + +import ( + "encoding/binary" + "fmt" + "io" + "net" + "sync" +) + +var ( + requests = make(map[int32]int32) // Map of Xid -> Opcode + requestsLock = &sync.Mutex{} +) + +func trace(conn1, conn2 net.Conn, client bool) { + defer conn1.Close() + defer conn2.Close() + buf := make([]byte, 10*1024) + init := true + for { + _, err := io.ReadFull(conn1, buf[:4]) + if err != nil { + fmt.Println("1>", client, err) + return + } + + blen := int(binary.BigEndian.Uint32(buf[:4])) + + _, err = io.ReadFull(conn1, buf[4:4+blen]) + if err != nil { + fmt.Println("2>", client, err) + return + } + + var cr interface{} + opcode := int32(-1) + readHeader := true + if client { + if init { + cr = &connectRequest{} + readHeader = false + } else { + xid := int32(binary.BigEndian.Uint32(buf[4:8])) + opcode = int32(binary.BigEndian.Uint32(buf[8:12])) + requestsLock.Lock() + requests[xid] = opcode + requestsLock.Unlock() + cr = requestStructForOp(opcode) + if cr == nil { + fmt.Printf("Unknown opcode %d\n", opcode) + } + } + } else { + if init { + cr = &connectResponse{} + readHeader = false + } else { + xid := int32(binary.BigEndian.Uint32(buf[4:8])) + zxid := int64(binary.BigEndian.Uint64(buf[8:16])) + errnum := int32(binary.BigEndian.Uint32(buf[16:20])) + if xid != -1 || zxid != -1 { + requestsLock.Lock() + found := false + opcode, found = requests[xid] + if !found { + println("WEFWEFEW") + opcode = 0 + } + delete(requests, xid) + requestsLock.Unlock() + } else { + opcode = opWatcherEvent + } + cr = responseStructForOp(opcode) + if cr == nil { + fmt.Printf("Unknown opcode %d\n", opcode) + } + if errnum != 0 { + cr = &struct{}{} + } + } + } + opname := "." + if opcode != -1 { + opname = opNames[opcode] + } + if cr == nil { + fmt.Printf("%+v %s %+v\n", client, opname, buf[4:4+blen]) + } else { + n := 4 + hdrStr := "" + if readHeader { + var hdr interface{} + if client { + hdr = &requestHeader{} + } else { + hdr = &responseHeader{} + } + if n2, err := decodePacket(buf[n:n+blen], hdr); err != nil { + fmt.Println(err) + } else { + n += n2 + } + hdrStr = fmt.Sprintf(" %+v", hdr) + } + if _, err := decodePacket(buf[n:n+blen], cr); err != nil { + fmt.Println(err) + } + fmt.Printf("%+v %s%s %+v\n", client, opname, hdrStr, cr) + } + + init = false + + written, err := conn2.Write(buf[:4+blen]) + if err != nil { + fmt.Println("3>", client, err) + return + } else if written != 4+blen { + fmt.Printf("Written != read: %d != %d\n", written, blen) + return + } + } +} + +func handleConnection(addr string, conn net.Conn) { + zkConn, err := net.Dial("tcp", addr) + if err != nil { + fmt.Println(err) + return + } + go trace(conn, zkConn, true) + trace(zkConn, conn, false) +} + +func StartTracer(listenAddr, serverAddr string) { + ln, err := net.Listen("tcp", listenAddr) + if err != nil { + panic(err) + } + for { + conn, err := ln.Accept() + if err != nil { + fmt.Println(err) + continue + } + go handleConnection(serverAddr, conn) + } +} diff --git a/vendor/github.com/ngaut/go-zookeeper/zk/util.go b/vendor/github.com/ngaut/go-zookeeper/zk/util.go new file mode 100644 index 000000000..741095b42 --- /dev/null +++ b/vendor/github.com/ngaut/go-zookeeper/zk/util.go @@ -0,0 +1,40 @@ +package zk + +import ( + "crypto/sha1" + "encoding/base64" + "fmt" + "math/rand" +) + +// AuthACL produces an ACL list containing a single ACL which uses the +// provided permissions, with the scheme "auth", and ID "", which is used +// by ZooKeeper to represent any authenticated user. +func AuthACL(perms int32) []ACL { + return []ACL{{perms, "auth", ""}} +} + +// WorldACL produces an ACL list containing a single ACL which uses the +// provided permissions, with the scheme "world", and ID "anyone", which +// is used by ZooKeeper to represent any user at all. +func WorldACL(perms int32) []ACL { + return []ACL{{perms, "world", "anyone"}} +} + +func DigestACL(perms int32, user, password string) []ACL { + userPass := []byte(fmt.Sprintf("%s:%s", user, password)) + h := sha1.New() + if n, err := h.Write(userPass); err != nil || n != len(userPass) { + panic("SHA1 failed") + } + digest := base64.StdEncoding.EncodeToString(h.Sum(nil)) + return []ACL{{perms, "digest", fmt.Sprintf("%s:%s", user, digest)}} +} + +// stringShuffle performs a Fisher-Yates shuffle on a slice of strings +func stringShuffle(s []string) { + for i := len(s) - 1; i > 0; i-- { + j := rand.Intn(i + 1) + s[i], s[j] = s[j], s[i] + } +} diff --git a/vendor/github.com/ngaut/log/LICENSE b/vendor/github.com/ngaut/log/LICENSE new file mode 100644 index 000000000..6600f1c98 --- /dev/null +++ b/vendor/github.com/ngaut/log/LICENSE @@ -0,0 +1,165 @@ +GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/vendor/github.com/ngaut/log/README.md b/vendor/github.com/ngaut/log/README.md new file mode 100644 index 000000000..e0e857e7f --- /dev/null +++ b/vendor/github.com/ngaut/log/README.md @@ -0,0 +1,2 @@ +logging +======= diff --git a/vendor/github.com/ngaut/log/crash_unix.go b/vendor/github.com/ngaut/log/crash_unix.go new file mode 100644 index 000000000..37f407def --- /dev/null +++ b/vendor/github.com/ngaut/log/crash_unix.go @@ -0,0 +1,18 @@ +// +build freebsd openbsd netbsd dragonfly darwin linux + +package log + +import ( + "log" + "os" + "syscall" +) + +func CrashLog(file string) { + f, err := os.OpenFile(file, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666) + if err != nil { + log.Println(err.Error()) + } else { + syscall.Dup2(int(f.Fd()), 2) + } +} diff --git a/vendor/github.com/ngaut/log/crash_win.go b/vendor/github.com/ngaut/log/crash_win.go new file mode 100644 index 000000000..7d612eea6 --- /dev/null +++ b/vendor/github.com/ngaut/log/crash_win.go @@ -0,0 +1,37 @@ +// +build windows + +package log + +import ( + "log" + "os" + "syscall" +) + +var ( + kernel32 = syscall.MustLoadDLL("kernel32.dll") + procSetStdHandle = kernel32.MustFindProc("SetStdHandle") +) + +func setStdHandle(stdhandle int32, handle syscall.Handle) error { + r0, _, e1 := syscall.Syscall(procSetStdHandle.Addr(), 2, uintptr(stdhandle), uintptr(handle), 0) + if r0 == 0 { + if e1 != 0 { + return error(e1) + } + return syscall.EINVAL + } + return nil +} + +func CrashLog(file string) { + f, err := os.OpenFile(file, os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0666) + if err != nil { + log.Println(err.Error()) + } else { + err = setStdHandle(syscall.STD_ERROR_HANDLE, syscall.Handle(f.Fd())) + if err != nil { + log.Println(err.Error()) + } + } +} diff --git a/vendor/github.com/ngaut/log/log.go b/vendor/github.com/ngaut/log/log.go new file mode 100644 index 000000000..7e193715b --- /dev/null +++ b/vendor/github.com/ngaut/log/log.go @@ -0,0 +1,380 @@ +//high level log wrapper, so it can output different log based on level +package log + +import ( + "fmt" + "io" + "log" + "os" + "runtime" + "sync" + "time" +) + +const ( + Ldate = log.Ldate + Llongfile = log.Llongfile + Lmicroseconds = log.Lmicroseconds + Lshortfile = log.Lshortfile + LstdFlags = log.LstdFlags + Ltime = log.Ltime +) + +type ( + LogLevel int + LogType int +) + +const ( + LOG_FATAL = LogType(0x1) + LOG_ERROR = LogType(0x2) + LOG_WARNING = LogType(0x4) + LOG_INFO = LogType(0x8) + LOG_DEBUG = LogType(0x10) +) + +const ( + LOG_LEVEL_NONE = LogLevel(0x0) + LOG_LEVEL_FATAL = LOG_LEVEL_NONE | LogLevel(LOG_FATAL) + LOG_LEVEL_ERROR = LOG_LEVEL_FATAL | LogLevel(LOG_ERROR) + LOG_LEVEL_WARN = LOG_LEVEL_ERROR | LogLevel(LOG_WARNING) + LOG_LEVEL_INFO = LOG_LEVEL_WARN | LogLevel(LOG_INFO) + LOG_LEVEL_DEBUG = LOG_LEVEL_INFO | LogLevel(LOG_DEBUG) + LOG_LEVEL_ALL = LOG_LEVEL_DEBUG +) + +const FORMAT_TIME_DAY string = "20060102" +const FORMAT_TIME_HOUR string = "2006010215" + +var _log *logger = New() + +func init() { + SetFlags(Ldate | Ltime | Lshortfile) + SetHighlighting(runtime.GOOS != "windows") +} + +func Logger() *log.Logger { + return _log._log +} + +func SetLevel(level LogLevel) { + _log.SetLevel(level) +} +func GetLogLevel() LogLevel { + return _log.level +} + +func SetOutput(out io.Writer) { + _log.SetOutput(out) +} + +func SetOutputByName(path string) error { + return _log.SetOutputByName(path) +} + +func SetFlags(flags int) { + _log._log.SetFlags(flags) +} + +func Info(v ...interface{}) { + _log.Info(v...) +} + +func Infof(format string, v ...interface{}) { + _log.Infof(format, v...) +} + +func Debug(v ...interface{}) { + _log.Debug(v...) +} + +func Debugf(format string, v ...interface{}) { + _log.Debugf(format, v...) +} + +func Warn(v ...interface{}) { + _log.Warning(v...) +} + +func Warnf(format string, v ...interface{}) { + _log.Warningf(format, v...) +} + +func Warning(v ...interface{}) { + _log.Warning(v...) +} + +func Warningf(format string, v ...interface{}) { + _log.Warningf(format, v...) +} + +func Error(v ...interface{}) { + _log.Error(v...) +} + +func Errorf(format string, v ...interface{}) { + _log.Errorf(format, v...) +} + +func Fatal(v ...interface{}) { + _log.Fatal(v...) +} + +func Fatalf(format string, v ...interface{}) { + _log.Fatalf(format, v...) +} + +func SetLevelByString(level string) { + _log.SetLevelByString(level) +} + +func SetHighlighting(highlighting bool) { + _log.SetHighlighting(highlighting) +} + +func SetRotateByDay() { + _log.SetRotateByDay() +} + +func SetRotateByHour() { + _log.SetRotateByHour() +} + +type logger struct { + _log *log.Logger + level LogLevel + highlighting bool + + dailyRolling bool + hourRolling bool + + fileName string + logSuffix string + fd *os.File + + lock sync.Mutex +} + +func (l *logger) SetHighlighting(highlighting bool) { + l.highlighting = highlighting +} + +func (l *logger) SetLevel(level LogLevel) { + l.level = level +} + +func (l *logger) SetLevelByString(level string) { + l.level = StringToLogLevel(level) +} + +func (l *logger) SetRotateByDay() { + l.dailyRolling = true + l.logSuffix = genDayTime(time.Now()) +} + +func (l *logger) SetRotateByHour() { + l.hourRolling = true + l.logSuffix = genHourTime(time.Now()) +} + +func (l *logger) rotate() error { + l.lock.Lock() + defer l.lock.Unlock() + + var suffix string + if l.dailyRolling { + suffix = genDayTime(time.Now()) + } else if l.hourRolling { + suffix = genHourTime(time.Now()) + } else { + return nil + } + + // Notice: if suffix is not equal to l.LogSuffix, then rotate + if suffix != l.logSuffix { + err := l.doRotate(suffix) + if err != nil { + return err + } + } + + return nil +} + +func (l *logger) doRotate(suffix string) error { + // Notice: Not check error, is this ok? + l.fd.Close() + + lastFileName := l.fileName + "." + l.logSuffix + err := os.Rename(l.fileName, lastFileName) + if err != nil { + return err + } + + err = l.SetOutputByName(l.fileName) + if err != nil { + return err + } + + l.logSuffix = suffix + + return nil +} + +func (l *logger) SetOutput(out io.Writer) { + l._log = log.New(out, l._log.Prefix(), l._log.Flags()) +} + +func (l *logger) SetOutputByName(path string) error { + f, err := os.OpenFile(path, os.O_CREATE|os.O_APPEND|os.O_RDWR, 0666) + if err != nil { + log.Fatal(err) + } + + l.SetOutput(f) + + l.fileName = path + l.fd = f + + return err +} + +func (l *logger) log(t LogType, v ...interface{}) { + if l.level|LogLevel(t) != l.level { + return + } + + err := l.rotate() + if err != nil { + fmt.Fprintf(os.Stderr, "%s\n", err.Error()) + return + } + + v1 := make([]interface{}, len(v)+2) + logStr, logColor := LogTypeToString(t) + if l.highlighting { + v1[0] = "\033" + logColor + "m[" + logStr + "]" + copy(v1[1:], v) + v1[len(v)+1] = "\033[0m" + } else { + v1[0] = "[" + logStr + "]" + copy(v1[1:], v) + v1[len(v)+1] = "" + } + + s := fmt.Sprintln(v1...) + l._log.Output(4, s) +} + +func (l *logger) logf(t LogType, format string, v ...interface{}) { + if l.level|LogLevel(t) != l.level { + return + } + + err := l.rotate() + if err != nil { + fmt.Fprintf(os.Stderr, "%s\n", err.Error()) + return + } + + logStr, logColor := LogTypeToString(t) + var s string + if l.highlighting { + s = "\033" + logColor + "m[" + logStr + "] " + fmt.Sprintf(format, v...) + "\033[0m" + } else { + s = "[" + logStr + "] " + fmt.Sprintf(format, v...) + } + l._log.Output(4, s) +} + +func (l *logger) Fatal(v ...interface{}) { + l.log(LOG_FATAL, v...) + os.Exit(-1) +} + +func (l *logger) Fatalf(format string, v ...interface{}) { + l.logf(LOG_FATAL, format, v...) + os.Exit(-1) +} + +func (l *logger) Error(v ...interface{}) { + l.log(LOG_ERROR, v...) +} + +func (l *logger) Errorf(format string, v ...interface{}) { + l.logf(LOG_ERROR, format, v...) +} + +func (l *logger) Warning(v ...interface{}) { + l.log(LOG_WARNING, v...) +} + +func (l *logger) Warningf(format string, v ...interface{}) { + l.logf(LOG_WARNING, format, v...) +} + +func (l *logger) Debug(v ...interface{}) { + l.log(LOG_DEBUG, v...) +} + +func (l *logger) Debugf(format string, v ...interface{}) { + l.logf(LOG_DEBUG, format, v...) +} + +func (l *logger) Info(v ...interface{}) { + l.log(LOG_INFO, v...) +} + +func (l *logger) Infof(format string, v ...interface{}) { + l.logf(LOG_INFO, format, v...) +} + +func StringToLogLevel(level string) LogLevel { + switch level { + case "fatal": + return LOG_LEVEL_FATAL + case "error": + return LOG_LEVEL_ERROR + case "warn": + return LOG_LEVEL_WARN + case "warning": + return LOG_LEVEL_WARN + case "debug": + return LOG_LEVEL_DEBUG + case "info": + return LOG_LEVEL_INFO + } + return LOG_LEVEL_ALL +} + +func LogTypeToString(t LogType) (string, string) { + switch t { + case LOG_FATAL: + return "fatal", "[0;31" + case LOG_ERROR: + return "error", "[0;31" + case LOG_WARNING: + return "warning", "[0;33" + case LOG_DEBUG: + return "debug", "[0;36" + case LOG_INFO: + return "info", "[0;37" + } + return "unknown", "[0;37" +} + +func genDayTime(t time.Time) string { + return t.Format(FORMAT_TIME_DAY) +} + +func genHourTime(t time.Time) string { + return t.Format(FORMAT_TIME_HOUR) +} + +func New() *logger { + return Newlogger(os.Stdout, "") +} + +func Newlogger(w io.Writer, prefix string) *logger { + return &logger{_log: log.New(w, prefix, LstdFlags), level: LOG_LEVEL_ALL, highlighting: true} +} diff --git a/vendor/github.com/ngaut/pools/id_pool.go b/vendor/github.com/ngaut/pools/id_pool.go new file mode 100644 index 000000000..31db60665 --- /dev/null +++ b/vendor/github.com/ngaut/pools/id_pool.go @@ -0,0 +1,72 @@ +// Copyright 2014, Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pools + +import ( + "fmt" + "sync" +) + +// IDPool is used to ensure that the set of IDs in use concurrently never +// contains any duplicates. The IDs start at 1 and increase without bound, but +// will never be larger than the peak number of concurrent uses. +// +// IDPool's Get() and Set() methods can be used concurrently. +type IDPool struct { + sync.Mutex + + // used holds the set of values that have been returned to us with Put(). + used map[uint32]bool + // maxUsed remembers the largest value we've given out. + maxUsed uint32 +} + +// NewIDPool creates and initializes an IDPool. +func NewIDPool() *IDPool { + return &IDPool{ + used: make(map[uint32]bool), + } +} + +// Get returns an ID that is unique among currently active users of this pool. +func (pool *IDPool) Get() (id uint32) { + pool.Lock() + defer pool.Unlock() + + // Pick a value that's been returned, if any. + for key, _ := range pool.used { + delete(pool.used, key) + return key + } + + // No recycled IDs are available, so increase the pool size. + pool.maxUsed += 1 + return pool.maxUsed +} + +// Put recycles an ID back into the pool for others to use. Putting back a value +// or 0, or a value that is not currently "checked out", will result in a panic +// because that should never happen except in the case of a programming error. +func (pool *IDPool) Put(id uint32) { + pool.Lock() + defer pool.Unlock() + + if id < 1 || id > pool.maxUsed { + panic(fmt.Errorf("IDPool.Put(%v): invalid value, must be in the range [1,%v]", id, pool.maxUsed)) + } + + if pool.used[id] { + panic(fmt.Errorf("IDPool.Put(%v): can't put value that was already recycled", id)) + } + + // If we're recycling maxUsed, just shrink the pool. + if id == pool.maxUsed { + pool.maxUsed = id - 1 + return + } + + // Add it to the set of recycled IDs. + pool.used[id] = true +} diff --git a/vendor/github.com/ngaut/pools/numbered.go b/vendor/github.com/ngaut/pools/numbered.go new file mode 100644 index 000000000..e170e0366 --- /dev/null +++ b/vendor/github.com/ngaut/pools/numbered.go @@ -0,0 +1,149 @@ +// Copyright 2012, Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pools + +import ( + "fmt" + "sync" + "time" +) + +// Numbered allows you to manage resources by tracking them with numbers. +// There are no interface restrictions on what you can track. +type Numbered struct { + mu sync.Mutex + empty *sync.Cond // Broadcast when pool becomes empty + resources map[int64]*numberedWrapper +} + +type numberedWrapper struct { + val interface{} + inUse bool + purpose string + timeCreated time.Time + timeUsed time.Time +} + +func NewNumbered() *Numbered { + n := &Numbered{resources: make(map[int64]*numberedWrapper)} + n.empty = sync.NewCond(&n.mu) + return n +} + +// Register starts tracking a resource by the supplied id. +// It does not lock the object. +// It returns an error if the id already exists. +func (nu *Numbered) Register(id int64, val interface{}) error { + nu.mu.Lock() + defer nu.mu.Unlock() + if _, ok := nu.resources[id]; ok { + return fmt.Errorf("already present") + } + now := time.Now() + nu.resources[id] = &numberedWrapper{ + val: val, + timeCreated: now, + timeUsed: now, + } + return nil +} + +// Unregiester forgets the specified resource. +// If the resource is not present, it's ignored. +func (nu *Numbered) Unregister(id int64) { + nu.mu.Lock() + defer nu.mu.Unlock() + delete(nu.resources, id) + if len(nu.resources) == 0 { + nu.empty.Broadcast() + } +} + +// Get locks the resource for use. It accepts a purpose as a string. +// If it cannot be found, it returns a "not found" error. If in use, +// it returns a "in use: purpose" error. +func (nu *Numbered) Get(id int64, purpose string) (val interface{}, err error) { + nu.mu.Lock() + defer nu.mu.Unlock() + nw, ok := nu.resources[id] + if !ok { + return nil, fmt.Errorf("not found") + } + if nw.inUse { + return nil, fmt.Errorf("in use: %s", nw.purpose) + } + nw.inUse = true + nw.purpose = purpose + return nw.val, nil +} + +// Put unlocks a resource for someone else to use. +func (nu *Numbered) Put(id int64) { + nu.mu.Lock() + defer nu.mu.Unlock() + if nw, ok := nu.resources[id]; ok { + nw.inUse = false + nw.purpose = "" + nw.timeUsed = time.Now() + } +} + +// GetOutdated returns a list of resources that are older than age, and locks them. +// It does not return any resources that are already locked. +func (nu *Numbered) GetOutdated(age time.Duration, purpose string) (vals []interface{}) { + nu.mu.Lock() + defer nu.mu.Unlock() + now := time.Now() + for _, nw := range nu.resources { + if nw.inUse { + continue + } + if nw.timeCreated.Add(age).Sub(now) <= 0 { + nw.inUse = true + nw.purpose = purpose + vals = append(vals, nw.val) + } + } + return vals +} + +// GetIdle returns a list of resurces that have been idle for longer +// than timeout, and locks them. It does not return any resources that +// are already locked. +func (nu *Numbered) GetIdle(timeout time.Duration, purpose string) (vals []interface{}) { + nu.mu.Lock() + defer nu.mu.Unlock() + now := time.Now() + for _, nw := range nu.resources { + if nw.inUse { + continue + } + if nw.timeUsed.Add(timeout).Sub(now) <= 0 { + nw.inUse = true + nw.purpose = purpose + vals = append(vals, nw.val) + } + } + return vals +} + +// WaitForEmpty returns as soon as the pool becomes empty +func (nu *Numbered) WaitForEmpty() { + nu.mu.Lock() + defer nu.mu.Unlock() + for len(nu.resources) != 0 { + nu.empty.Wait() + } +} + +func (nu *Numbered) StatsJSON() string { + return fmt.Sprintf("{\"Size\": %v}", nu.Size()) +} + +func (nu *Numbered) Size() (size int64) { + nu.mu.Lock() + defer nu.mu.Unlock() + return int64(len(nu.resources)) +} diff --git a/vendor/github.com/ngaut/pools/resource_pool.go b/vendor/github.com/ngaut/pools/resource_pool.go new file mode 100644 index 000000000..b02cf043c --- /dev/null +++ b/vendor/github.com/ngaut/pools/resource_pool.go @@ -0,0 +1,228 @@ +// Copyright 2012, Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package pools provides functionality to manage and reuse resources +// like connections. +package pools + +import ( + "fmt" + "time" + + "github.com/ngaut/sync2" +) + +var ( + CLOSED_ERR = fmt.Errorf("ResourcePool is closed") +) + +// Factory is a function that can be used to create a resource. +type Factory func() (Resource, error) + +// Every resource needs to suport the Resource interface. +// Thread synchronization between Close() and IsClosed() +// is the responsibility the caller. +type Resource interface { + Close() +} + +// ResourcePool allows you to use a pool of resources. +type ResourcePool struct { + resources chan resourceWrapper + factory Factory + capacity sync2.AtomicInt64 + idleTimeout sync2.AtomicDuration + + // stats + waitCount sync2.AtomicInt64 + waitTime sync2.AtomicDuration +} + +type resourceWrapper struct { + resource Resource + timeUsed time.Time +} + +// NewResourcePool creates a new ResourcePool pool. +// capacity is the initial capacity of the pool. +// maxCap is the maximum capacity. +// If a resource is unused beyond idleTimeout, it's discarded. +// An idleTimeout of 0 means that there is no timeout. +func NewResourcePool(factory Factory, capacity, maxCap int, idleTimeout time.Duration) *ResourcePool { + if capacity <= 0 || maxCap <= 0 || capacity > maxCap { + panic(fmt.Errorf("Invalid/out of range capacity")) + } + rp := &ResourcePool{ + resources: make(chan resourceWrapper, maxCap), + factory: factory, + capacity: sync2.AtomicInt64(capacity), + idleTimeout: sync2.AtomicDuration(idleTimeout), + } + for i := 0; i < capacity; i++ { + rp.resources <- resourceWrapper{} + } + return rp +} + +// Close empties the pool calling Close on all its resources. +// You can call Close while there are outstanding resources. +// It waits for all resources to be returned (Put). +// After a Close, Get and TryGet are not allowed. +func (rp *ResourcePool) Close() { + rp.SetCapacity(0) +} + +func (rp *ResourcePool) IsClosed() (closed bool) { + return rp.capacity.Get() == 0 +} + +// Get will return the next available resource. If capacity +// has not been reached, it will create a new one using the factory. Otherwise, +// it will indefinitely wait till the next resource becomes available. +func (rp *ResourcePool) Get() (resource Resource, err error) { + return rp.get(true) +} + +// TryGet will return the next available resource. If none is available, and capacity +// has not been reached, it will create a new one using the factory. Otherwise, +// it will return nil with no error. +func (rp *ResourcePool) TryGet() (resource Resource, err error) { + return rp.get(false) +} + +func (rp *ResourcePool) get(wait bool) (resource Resource, err error) { + // Fetch + var wrapper resourceWrapper + var ok bool + select { + case wrapper, ok = <-rp.resources: + default: + if !wait { + return nil, nil + } + startTime := time.Now() + wrapper, ok = <-rp.resources + rp.recordWait(startTime) + } + if !ok { + return nil, CLOSED_ERR + } + + // Unwrap + timeout := rp.idleTimeout.Get() + if wrapper.resource != nil && timeout > 0 && wrapper.timeUsed.Add(timeout).Sub(time.Now()) < 0 { + wrapper.resource.Close() + wrapper.resource = nil + } + if wrapper.resource == nil { + wrapper.resource, err = rp.factory() + if err != nil { + rp.resources <- resourceWrapper{} + } + } + return wrapper.resource, err +} + +// Put will return a resource to the pool. For every successful Get, +// a corresponding Put is required. If you no longer need a resource, +// you will need to call Put(nil) instead of returning the closed resource. +// The will eventually cause a new resource to be created in its place. +func (rp *ResourcePool) Put(resource Resource) { + var wrapper resourceWrapper + if resource != nil { + wrapper = resourceWrapper{resource, time.Now()} + } + select { + case rp.resources <- wrapper: + default: + panic(fmt.Errorf("Attempt to Put into a full ResourcePool")) + } +} + +// SetCapacity changes the capacity of the pool. +// You can use it to shrink or expand, but not beyond +// the max capacity. If the change requires the pool +// to be shrunk, SetCapacity waits till the necessary +// number of resources are returned to the pool. +// A SetCapacity of 0 is equivalent to closing the ResourcePool. +func (rp *ResourcePool) SetCapacity(capacity int) error { + if capacity < 0 || capacity > cap(rp.resources) { + return fmt.Errorf("capacity %d is out of range", capacity) + } + + // Atomically swap new capacity with old, but only + // if old capacity is non-zero. + var oldcap int + for { + oldcap = int(rp.capacity.Get()) + if oldcap == 0 { + return CLOSED_ERR + } + if oldcap == capacity { + return nil + } + if rp.capacity.CompareAndSwap(int64(oldcap), int64(capacity)) { + break + } + } + + if capacity < oldcap { + for i := 0; i < oldcap-capacity; i++ { + wrapper := <-rp.resources + if wrapper.resource != nil { + wrapper.resource.Close() + } + } + } else { + for i := 0; i < capacity-oldcap; i++ { + rp.resources <- resourceWrapper{} + } + } + if capacity == 0 { + close(rp.resources) + } + return nil +} + +func (rp *ResourcePool) recordWait(start time.Time) { + rp.waitCount.Add(1) + rp.waitTime.Add(time.Now().Sub(start)) +} + +func (rp *ResourcePool) SetIdleTimeout(idleTimeout time.Duration) { + rp.idleTimeout.Set(idleTimeout) +} + +func (rp *ResourcePool) StatsJSON() string { + c, a, mx, wc, wt, it := rp.Stats() + return fmt.Sprintf(`{"Capacity": %v, "Available": %v, "MaxCapacity": %v, "WaitCount": %v, "WaitTime": %v, "IdleTimeout": %v}`, c, a, mx, wc, int64(wt), int64(it)) +} + +func (rp *ResourcePool) Stats() (capacity, available, maxCap, waitCount int64, waitTime, idleTimeout time.Duration) { + return rp.Capacity(), rp.Available(), rp.MaxCap(), rp.WaitCount(), rp.WaitTime(), rp.IdleTimeout() +} + +func (rp *ResourcePool) Capacity() int64 { + return rp.capacity.Get() +} + +func (rp *ResourcePool) Available() int64 { + return int64(len(rp.resources)) +} + +func (rp *ResourcePool) MaxCap() int64 { + return int64(cap(rp.resources)) +} + +func (rp *ResourcePool) WaitCount() int64 { + return rp.waitCount.Get() +} + +func (rp *ResourcePool) WaitTime() time.Duration { + return rp.waitTime.Get() +} + +func (rp *ResourcePool) IdleTimeout() time.Duration { + return rp.idleTimeout.Get() +} diff --git a/vendor/github.com/ngaut/pools/roundrobin.go b/vendor/github.com/ngaut/pools/roundrobin.go new file mode 100644 index 000000000..b06985ff0 --- /dev/null +++ b/vendor/github.com/ngaut/pools/roundrobin.go @@ -0,0 +1,214 @@ +// Copyright 2012, Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package pools + +import ( + "fmt" + "sync" + "time" +) + +// RoundRobin is deprecated. Use ResourcePool instead. +// RoundRobin allows you to use a pool of resources in a round robin fashion. +type RoundRobin struct { + mu sync.Mutex + available *sync.Cond + resources chan fifoWrapper + size int64 + factory Factory + idleTimeout time.Duration + + // stats + waitCount int64 + waitTime time.Duration +} + +type fifoWrapper struct { + resource Resource + timeUsed time.Time +} + +// NewRoundRobin creates a new RoundRobin pool. +// capacity is the maximum number of resources RoundRobin will create. +// factory will be the function used to create resources. +// If a resource is unused beyond idleTimeout, it's discarded. +func NewRoundRobin(capacity int, idleTimeout time.Duration) *RoundRobin { + r := &RoundRobin{ + resources: make(chan fifoWrapper, capacity), + size: 0, + idleTimeout: idleTimeout, + } + r.available = sync.NewCond(&r.mu) + return r +} + +// Open starts allowing the creation of resources +func (rr *RoundRobin) Open(factory Factory) { + rr.mu.Lock() + defer rr.mu.Unlock() + rr.factory = factory +} + +// Close empties the pool calling Close on all its resources. +// It waits for all resources to be returned (Put). +func (rr *RoundRobin) Close() { + rr.mu.Lock() + defer rr.mu.Unlock() + for rr.size > 0 { + select { + case fw := <-rr.resources: + go fw.resource.Close() + rr.size-- + default: + rr.available.Wait() + } + } + rr.factory = nil +} + +func (rr *RoundRobin) IsClosed() bool { + return rr.factory == nil +} + +// Get will return the next available resource. If none is available, and capacity +// has not been reached, it will create a new one using the factory. Otherwise, +// it will indefinitely wait till the next resource becomes available. +func (rr *RoundRobin) Get() (resource Resource, err error) { + return rr.get(true) +} + +// TryGet will return the next available resource. If none is available, and capacity +// has not been reached, it will create a new one using the factory. Otherwise, +// it will return nil with no error. +func (rr *RoundRobin) TryGet() (resource Resource, err error) { + return rr.get(false) +} + +func (rr *RoundRobin) get(wait bool) (resource Resource, err error) { + rr.mu.Lock() + defer rr.mu.Unlock() + // Any waits in this loop will release the lock, and it will be + // reacquired before the waits return. + for { + select { + case fw := <-rr.resources: + // Found a free resource in the channel + if rr.idleTimeout > 0 && fw.timeUsed.Add(rr.idleTimeout).Sub(time.Now()) < 0 { + // resource has been idle for too long. Discard & go for next. + go fw.resource.Close() + rr.size-- + // Nobody else should be waiting, but signal anyway. + rr.available.Signal() + continue + } + return fw.resource, nil + default: + // resource channel is empty + if rr.size >= int64(cap(rr.resources)) { + // The pool is full + if wait { + start := time.Now() + rr.available.Wait() + rr.recordWait(start) + continue + } + return nil, nil + } + // Pool is not full. Create a resource. + if resource, err = rr.waitForCreate(); err != nil { + // size was decremented, and somebody could be waiting. + rr.available.Signal() + return nil, err + } + // Creation successful. Account for this by incrementing size. + rr.size++ + return resource, err + } + } +} + +func (rr *RoundRobin) recordWait(start time.Time) { + rr.waitCount++ + rr.waitTime += time.Now().Sub(start) +} + +func (rr *RoundRobin) waitForCreate() (resource Resource, err error) { + // Prevent thundering herd: increment size before creating resource, and decrement after. + rr.size++ + rr.mu.Unlock() + defer func() { + rr.mu.Lock() + rr.size-- + }() + return rr.factory() +} + +// Put will return a resource to the pool. You MUST return every resource to the pool, +// even if it's closed. If a resource is closed, you should call Put(nil). +func (rr *RoundRobin) Put(resource Resource) { + rr.mu.Lock() + defer rr.available.Signal() + defer rr.mu.Unlock() + + if rr.size > int64(cap(rr.resources)) { + if resource != nil { + go resource.Close() + } + rr.size-- + } else if resource == nil { + rr.size-- + } else { + if len(rr.resources) == cap(rr.resources) { + panic("unexpected") + } + rr.resources <- fifoWrapper{resource, time.Now()} + } +} + +// Set capacity changes the capacity of the pool. +// You can use it to expand or shrink. +func (rr *RoundRobin) SetCapacity(capacity int) error { + rr.mu.Lock() + defer rr.available.Broadcast() + defer rr.mu.Unlock() + + nr := make(chan fifoWrapper, capacity) + // This loop transfers resources from the old channel + // to the new one, until it fills up or runs out. + // It discards extras, if any. + for { + select { + case fw := <-rr.resources: + if len(nr) < cap(nr) { + nr <- fw + } else { + go fw.resource.Close() + rr.size-- + } + continue + default: + } + break + } + rr.resources = nr + return nil +} + +func (rr *RoundRobin) SetIdleTimeout(idleTimeout time.Duration) { + rr.mu.Lock() + defer rr.mu.Unlock() + rr.idleTimeout = idleTimeout +} + +func (rr *RoundRobin) StatsJSON() string { + s, c, a, wc, wt, it := rr.Stats() + return fmt.Sprintf("{\"Size\": %v, \"Capacity\": %v, \"Available\": %v, \"WaitCount\": %v, \"WaitTime\": %v, \"IdleTimeout\": %v}", s, c, a, wc, int64(wt), int64(it)) +} + +func (rr *RoundRobin) Stats() (size, capacity, available, waitCount int64, waitTime, idleTimeout time.Duration) { + rr.mu.Lock() + defer rr.mu.Unlock() + return rr.size, int64(cap(rr.resources)), int64(len(rr.resources)), rr.waitCount, rr.waitTime, rr.idleTimeout +} diff --git a/vendor/github.com/ngaut/pools/vitess_license b/vendor/github.com/ngaut/pools/vitess_license new file mode 100644 index 000000000..989d02e4c --- /dev/null +++ b/vendor/github.com/ngaut/pools/vitess_license @@ -0,0 +1,28 @@ +Copyright 2012, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/ngaut/sync2/atomic.go b/vendor/github.com/ngaut/sync2/atomic.go new file mode 100644 index 000000000..909f3b10f --- /dev/null +++ b/vendor/github.com/ngaut/sync2/atomic.go @@ -0,0 +1,114 @@ +// Copyright 2013, Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package sync2 + +import ( + "sync" + "sync/atomic" + "time" +) + +type AtomicInt32 int32 + +func (i *AtomicInt32) Add(n int32) int32 { + return atomic.AddInt32((*int32)(i), n) +} + +func (i *AtomicInt32) Set(n int32) { + atomic.StoreInt32((*int32)(i), n) +} + +func (i *AtomicInt32) Get() int32 { + return atomic.LoadInt32((*int32)(i)) +} + +func (i *AtomicInt32) CompareAndSwap(oldval, newval int32) (swapped bool) { + return atomic.CompareAndSwapInt32((*int32)(i), oldval, newval) +} + +type AtomicUint32 uint32 + +func (i *AtomicUint32) Add(n uint32) uint32 { + return atomic.AddUint32((*uint32)(i), n) +} + +func (i *AtomicUint32) Set(n uint32) { + atomic.StoreUint32((*uint32)(i), n) +} + +func (i *AtomicUint32) Get() uint32 { + return atomic.LoadUint32((*uint32)(i)) +} + +func (i *AtomicUint32) CompareAndSwap(oldval, newval uint32) (swapped bool) { + return atomic.CompareAndSwapUint32((*uint32)(i), oldval, newval) +} + +type AtomicInt64 int64 + +func (i *AtomicInt64) Add(n int64) int64 { + return atomic.AddInt64((*int64)(i), n) +} + +func (i *AtomicInt64) Set(n int64) { + atomic.StoreInt64((*int64)(i), n) +} + +func (i *AtomicInt64) Get() int64 { + return atomic.LoadInt64((*int64)(i)) +} + +func (i *AtomicInt64) CompareAndSwap(oldval, newval int64) (swapped bool) { + return atomic.CompareAndSwapInt64((*int64)(i), oldval, newval) +} + +type AtomicDuration int64 + +func (d *AtomicDuration) Add(duration time.Duration) time.Duration { + return time.Duration(atomic.AddInt64((*int64)(d), int64(duration))) +} + +func (d *AtomicDuration) Set(duration time.Duration) { + atomic.StoreInt64((*int64)(d), int64(duration)) +} + +func (d *AtomicDuration) Get() time.Duration { + return time.Duration(atomic.LoadInt64((*int64)(d))) +} + +func (d *AtomicDuration) CompareAndSwap(oldval, newval time.Duration) (swapped bool) { + return atomic.CompareAndSwapInt64((*int64)(d), int64(oldval), int64(newval)) +} + +// AtomicString gives you atomic-style APIs for string, but +// it's only a convenience wrapper that uses a mutex. So, it's +// not as efficient as the rest of the atomic types. +type AtomicString struct { + mu sync.Mutex + str string +} + +func (s *AtomicString) Set(str string) { + s.mu.Lock() + s.str = str + s.mu.Unlock() +} + +func (s *AtomicString) Get() string { + s.mu.Lock() + str := s.str + s.mu.Unlock() + return str +} + +func (s *AtomicString) CompareAndSwap(oldval, newval string) (swqpped bool) { + s.mu.Lock() + defer s.mu.Unlock() + if s.str == oldval { + s.str = newval + return true + } + return false +} diff --git a/vendor/github.com/ngaut/sync2/cond.go b/vendor/github.com/ngaut/sync2/cond.go new file mode 100644 index 000000000..dea11ae6d --- /dev/null +++ b/vendor/github.com/ngaut/sync2/cond.go @@ -0,0 +1,56 @@ +// Copyright 2013, Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package sync2 + +import ( + "sync" +) + +// Cond is an alternate implementation of sync.Cond +type Cond struct { + L sync.Locker + sema chan struct{} + waiters AtomicInt64 +} + +func NewCond(l sync.Locker) *Cond { + return &Cond{L: l, sema: make(chan struct{})} +} + +func (c *Cond) Wait() { + c.waiters.Add(1) + c.L.Unlock() + <-c.sema + c.L.Lock() +} + +func (c *Cond) Signal() { + for { + w := c.waiters.Get() + if w == 0 { + return + } + if c.waiters.CompareAndSwap(w, w-1) { + break + } + } + c.sema <- struct{}{} +} + +func (c *Cond) Broadcast() { + var w int64 + for { + w = c.waiters.Get() + if w == 0 { + return + } + if c.waiters.CompareAndSwap(w, 0) { + break + } + } + for i := int64(0); i < w; i++ { + c.sema <- struct{}{} + } +} diff --git a/vendor/github.com/ngaut/sync2/semaphore.go b/vendor/github.com/ngaut/sync2/semaphore.go new file mode 100644 index 000000000..190a27d34 --- /dev/null +++ b/vendor/github.com/ngaut/sync2/semaphore.go @@ -0,0 +1,55 @@ +// Copyright 2012, Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package sync2 + +// What's in a name? Channels have all you need to emulate a counting +// semaphore with a boatload of extra functionality. However, in some +// cases, you just want a familiar API. + +import ( + "time" +) + +// Semaphore is a counting semaphore with the option to +// specify a timeout. +type Semaphore struct { + slots chan struct{} + timeout time.Duration +} + +// NewSemaphore creates a Semaphore. The count parameter must be a positive +// number. A timeout of zero means that there is no timeout. +func NewSemaphore(count int, timeout time.Duration) *Semaphore { + sem := &Semaphore{ + slots: make(chan struct{}, count), + timeout: timeout, + } + for i := 0; i < count; i++ { + sem.slots <- struct{}{} + } + return sem +} + +// Acquire returns true on successful acquisition, and +// false on a timeout. +func (sem *Semaphore) Acquire() bool { + if sem.timeout == 0 { + <-sem.slots + return true + } + select { + case <-sem.slots: + return true + case <-time.After(sem.timeout): + return false + } +} + +// Release releases the acquired semaphore. You must +// not release more than the number of semaphores you've +// acquired. +func (sem *Semaphore) Release() { + sem.slots <- struct{}{} +} diff --git a/vendor/github.com/ngaut/sync2/service_manager.go b/vendor/github.com/ngaut/sync2/service_manager.go new file mode 100644 index 000000000..4b85e01ad --- /dev/null +++ b/vendor/github.com/ngaut/sync2/service_manager.go @@ -0,0 +1,121 @@ +// Copyright 2013, Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package sync2 + +import ( + "sync" +) + +// These are the three predefined states of a service. +const ( + SERVICE_STOPPED = iota + SERVICE_RUNNING + SERVICE_SHUTTING_DOWN +) + +var stateNames = []string{ + "Stopped", + "Running", + "ShuttingDown", +} + +// ServiceManager manages the state of a service through its lifecycle. +type ServiceManager struct { + mu sync.Mutex + wg sync.WaitGroup + err error // err is the error returned from the service function. + state AtomicInt64 + // shutdown is created when the service starts and is closed when the service + // enters the SERVICE_SHUTTING_DOWN state. + shutdown chan struct{} +} + +// Go tries to change the state from SERVICE_STOPPED to SERVICE_RUNNING. +// +// If the current state is not SERVICE_STOPPED (already running), it returns +// false immediately. +// +// On successful transition, it launches the service as a goroutine and returns +// true. The service function is responsible for returning on its own when +// requested, either by regularly checking svc.IsRunning(), or by waiting for +// the svc.ShuttingDown channel to be closed. +// +// When the service func returns, the state is reverted to SERVICE_STOPPED. +func (svm *ServiceManager) Go(service func(svc *ServiceContext) error) bool { + svm.mu.Lock() + defer svm.mu.Unlock() + if !svm.state.CompareAndSwap(SERVICE_STOPPED, SERVICE_RUNNING) { + return false + } + svm.wg.Add(1) + svm.err = nil + svm.shutdown = make(chan struct{}) + go func() { + svm.err = service(&ServiceContext{ShuttingDown: svm.shutdown}) + svm.state.Set(SERVICE_STOPPED) + svm.wg.Done() + }() + return true +} + +// Stop tries to change the state from SERVICE_RUNNING to SERVICE_SHUTTING_DOWN. +// If the current state is not SERVICE_RUNNING, it returns false immediately. +// On successul transition, it waits for the service to finish, and returns true. +// You are allowed to Go() again after a Stop(). +func (svm *ServiceManager) Stop() bool { + svm.mu.Lock() + defer svm.mu.Unlock() + if !svm.state.CompareAndSwap(SERVICE_RUNNING, SERVICE_SHUTTING_DOWN) { + return false + } + // Signal the service that we've transitioned to SERVICE_SHUTTING_DOWN. + close(svm.shutdown) + svm.shutdown = nil + svm.wg.Wait() + return true +} + +// Wait waits for the service to terminate if it's currently running. +func (svm *ServiceManager) Wait() { + svm.wg.Wait() +} + +// Join waits for the service to terminate and returns the value returned by the +// service function. +func (svm *ServiceManager) Join() error { + svm.wg.Wait() + return svm.err +} + +// State returns the current state of the service. +// This should only be used to report the current state. +func (svm *ServiceManager) State() int64 { + return svm.state.Get() +} + +// StateName returns the name of the current state. +func (svm *ServiceManager) StateName() string { + return stateNames[svm.State()] +} + +// ServiceContext is passed into the service function to give it access to +// information about the running service. +type ServiceContext struct { + // ShuttingDown is a channel that the service can select on to be notified + // when it should shut down. The channel is closed when the state transitions + // from SERVICE_RUNNING to SERVICE_SHUTTING_DOWN. + ShuttingDown chan struct{} +} + +// IsRunning returns true if the ServiceContext.ShuttingDown channel has not +// been closed yet. +func (svc *ServiceContext) IsRunning() bool { + select { + case <-svc.ShuttingDown: + return false + default: + return true + } +} diff --git a/vendor/github.com/ngaut/sync2/vitess_license b/vendor/github.com/ngaut/sync2/vitess_license new file mode 100644 index 000000000..989d02e4c --- /dev/null +++ b/vendor/github.com/ngaut/sync2/vitess_license @@ -0,0 +1,28 @@ +Copyright 2012, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/ngaut/tso/LICENSE b/vendor/github.com/ngaut/tso/LICENSE new file mode 100644 index 000000000..8f71f43fe --- /dev/null +++ b/vendor/github.com/ngaut/tso/LICENSE @@ -0,0 +1,202 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/vendor/github.com/ngaut/tso/client/client.go b/vendor/github.com/ngaut/tso/client/client.go new file mode 100644 index 000000000..3f0ba71d2 --- /dev/null +++ b/vendor/github.com/ngaut/tso/client/client.go @@ -0,0 +1,243 @@ +package client + +import ( + "container/list" + "time" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/ngaut/tso/proto" + "github.com/ngaut/tso/util" + "github.com/ngaut/zkhelper" +) + +const ( + maxPipelineRequest = 100000 +) + +// Client is a timestamp oracle client. +type Client struct { + requests chan *PipelineRequest + + pending *list.List + conf *Conf + + addr string + + leaderCh chan string +} + +// Conf is the configuration. +type Conf struct { + // tso server address, it will be deprecated later. + ServerAddr string + + // ZKAddr is for zookeeper address, if set, client will ignore ServerAddr + // and find the leader tso server address in zookeeper. + // Later ServerAddr is just for simple test and backward compatibility. + ZKAddr string + + // root path is the tso server saving in zookeeper, like /zk/tso. + RootPath string +} + +// PipelineRequest let you get the timestamp with pipeline. +type PipelineRequest struct { + done chan error + reply *proto.Response +} + +func newPipelineRequest() *PipelineRequest { + return &PipelineRequest{ + done: make(chan error, 1), + } +} + +// MarkDone sets the repsone for current request. +func (pr *PipelineRequest) MarkDone(reply *proto.Response, err error) { + if err != nil { + pr.reply = nil + } + pr.reply = reply + pr.done <- errors.Trace(err) +} + +// GetTS gets the timestamp. +func (pr *PipelineRequest) GetTS() (*proto.Timestamp, error) { + err := <-pr.done + if err != nil { + return nil, errors.Trace(err) + } + + return &pr.reply.Timestamp, nil +} + +// NewClient creates a timestamp oracle client. +func NewClient(conf *Conf) *Client { + c := &Client{ + requests: make(chan *PipelineRequest, maxPipelineRequest), + pending: list.New(), + conf: conf, + leaderCh: make(chan string, 1), + } + + if len(conf.ZKAddr) == 0 { + c.leaderCh <- conf.ServerAddr + } else { + go c.watchLeader() + } + + go c.workerLoop() + + return c +} + +func (c *Client) cleanupPending(err error) { + log.Warn(err) + length := c.pending.Len() + for i := 0; i < length; i++ { + e := c.pending.Front() + c.pending.Remove(e) + e.Value.(*PipelineRequest).MarkDone(nil, err) + } + + // clear request in channel too + length = len(c.requests) + for i := 0; i < length; i++ { + req := <-c.requests + req.MarkDone(nil, err) + } +} + +func (c *Client) notifyOne(reply *proto.Response) { + e := c.pending.Front() + c.pending.Remove(e) + req := e.Value.(*PipelineRequest) + req.MarkDone(reply, nil) +} + +func (c *Client) writeRequests(session *Conn) error { + var protoHdr [1]byte + for i := 0; i < c.pending.Len(); i++ { + session.Write(protoHdr[:]) + } + return session.Flush() +} + +func (c *Client) handleResponse(session *Conn) error { + length := c.pending.Len() + for i := 0; i < length; i++ { + var resp proto.Response + err := resp.Decode(session) + if err != nil { + return errors.Trace(err) + } + c.notifyOne(&resp) + } + + return nil +} + +func (c *Client) do() error { + session, err := NewConnection(c.addr, time.Duration(1*time.Second)) + if err != nil { + return errors.Trace(err) + } + + log.Debugf("connect tso server %s ok", c.addr) + + defer session.Close() + for { + select { + case req := <-c.requests: + c.pending.PushBack(req) + length := len(c.requests) + for i := 0; i < length; i++ { + req = <-c.requests + c.pending.PushBack(req) + } + + err = c.writeRequests(session) + if err != nil { + return errors.Trace(err) + } + err = c.handleResponse(session) + if err != nil { + return errors.Trace(err) + } + case addr := <-c.leaderCh: + oldAddr := c.addr + c.addr = addr + return errors.Errorf("leader change %s -> %s", oldAddr, addr) + } + } +} + +func (c *Client) workerLoop() { + // first get tso leader + c.addr = <-c.leaderCh + log.Debugf("try to connect tso server %s", c.addr) + + for { + err := c.do() + if err != nil { + c.cleanupPending(err) + } + select { + case <-time.After(1 * time.Second): + case addr := <-c.leaderCh: + // If old tso server down, NewConnection will fail and return immediately in do function, + // so we must check leader change here. + log.Warnf("leader change %s -> %s", c.addr, addr) + c.addr = addr + // Wait some time to let tso server allow accepting connections. + time.Sleep(1 * time.Second) + } + } +} + +func (c *Client) watchLeader() { + var ( + conn zkhelper.Conn + err error + ) + + for { + conn, err = zkhelper.ConnectToZkWithTimeout(c.conf.ZKAddr, time.Second) + if err != nil { + log.Errorf("connect zk err %v, retry later", err) + time.Sleep(3 * time.Second) + continue + } + break + } + + defer conn.Close() + + var lastAddr string + + for { + addr, watcher, err := util.GetWatchLeader(conn, c.conf.RootPath) + if err != nil { + log.Errorf("get tso leader err %v, retry later", err) + time.Sleep(3 * time.Second) + continue + } + + if lastAddr != addr { + log.Warnf("leader change %s -> %s", lastAddr, addr) + lastAddr = addr + c.leaderCh <- addr + } + + // watch the leader changes. + <-watcher + } +} + +// GoGetTimestamp returns a PipelineRequest so you can get the timestamp later. +func (c *Client) GoGetTimestamp() *PipelineRequest { + pr := newPipelineRequest() + c.requests <- pr + return pr +} diff --git a/vendor/github.com/ngaut/tso/client/conn.go b/vendor/github.com/ngaut/tso/client/conn.go new file mode 100644 index 000000000..017e64f9e --- /dev/null +++ b/vendor/github.com/ngaut/tso/client/conn.go @@ -0,0 +1,50 @@ +package client + +import ( + "bufio" + "net" + "time" + + "github.com/ngaut/deadline" +) + +// Conn is the connection for timestamp oracle server, it is not thread safe. +type Conn struct { + addr string + net.Conn + closed bool + r *bufio.Reader + w *bufio.Writer + netTimeout time.Duration +} + +// NewConnection creates a conn. +func NewConnection(addr string, netTimeout time.Duration) (*Conn, error) { + conn, err := net.DialTimeout("tcp", addr, netTimeout) + if err != nil { + return nil, err + } + + return &Conn{ + addr: addr, + Conn: conn, + r: bufio.NewReaderSize(deadline.NewDeadlineReader(conn, netTimeout), 512*1024), + w: bufio.NewWriterSize(deadline.NewDeadlineWriter(conn, netTimeout), 512*1024), + netTimeout: netTimeout, + }, nil +} + +// Read reads data and stores it into p. +func (c *Conn) Read(p []byte) (int, error) { + return c.r.Read(p) +} + +// Flush flushs buffered data. +func (c *Conn) Flush() error { + return c.w.Flush() +} + +// Write writes p. +func (c *Conn) Write(p []byte) (int, error) { + return c.w.Write(p) +} diff --git a/vendor/github.com/ngaut/tso/proto/proto.go b/vendor/github.com/ngaut/tso/proto/proto.go new file mode 100644 index 000000000..fdc57b071 --- /dev/null +++ b/vendor/github.com/ngaut/tso/proto/proto.go @@ -0,0 +1,45 @@ +package proto + +import ( + "encoding/binary" + "io" + + "github.com/juju/errors" +) + +// RequestHeader is for tso request proto. +type RequestHeader struct { +} + +// Timestamp is for tso timestamp. +type Timestamp struct { + Physical int64 + Logical int64 +} + +// Response is for tso reponse proto. +type Response struct { + Timestamp +} + +// Encode encodes repsonse proto into w. +func (res *Response) Encode(w io.Writer) error { + var buf [16]byte + binary.BigEndian.PutUint64(buf[0:8], uint64(res.Physical)) + binary.BigEndian.PutUint64(buf[8:16], uint64(res.Logical)) + _, err := w.Write(buf[0:16]) + return errors.Trace(err) +} + +// Decode decodes reponse proto from r. +func (res *Response) Decode(r io.Reader) error { + var buf [16]byte + _, err := io.ReadFull(r, buf[0:16]) + if err != nil { + return errors.Trace(err) + } + + res.Physical = int64(binary.BigEndian.Uint64(buf[0:8])) + res.Logical = int64(binary.BigEndian.Uint64(buf[8:16])) + return nil +} diff --git a/vendor/github.com/ngaut/tso/util/util.go b/vendor/github.com/ngaut/tso/util/util.go new file mode 100644 index 000000000..aad0618f2 --- /dev/null +++ b/vendor/github.com/ngaut/tso/util/util.go @@ -0,0 +1,81 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package util + +import ( + "encoding/json" + "path" + + "github.com/juju/errors" + "github.com/ngaut/go-zookeeper/zk" + "github.com/ngaut/zkhelper" +) + +func getLeader(data []byte) (string, error) { + m := struct { + Addr string `json:"Addr"` + }{} + + err := json.Unmarshal(data, &m) + if err != nil { + return "", errors.Trace(err) + } + + return m.Addr, nil +} + +// getLeaderPath gets the leader path in zookeeper. +func getLeaderPath(rootPath string) string { + return path.Join(rootPath, "leader") +} + +// func checkLeaderExists(conn zkhelper.Conn) error { +// // the leader node is not ephemeral, so we may meet no any tso server but leader node +// // has the data for last closed tso server. +// // TODO: check children in /candidates, if no child, we will treat it as no leader too. + +// return nil +// } + +// GetLeaderAddr gets the leader tso address in zookeeper for outer use. +func GetLeader(conn zkhelper.Conn, rootPath string) (string, error) { + data, _, err := conn.Get(getLeaderPath(rootPath)) + if err != nil { + return "", errors.Trace(err) + } + + // if err != checkLeaderExists(conn); err != nil { + // return "", errors.Trace(err) + // } + + return getLeader(data) +} + +// GetWatchLeader gets the leader tso address in zookeeper and returns a watcher for leader change. +func GetWatchLeader(conn zkhelper.Conn, rootPath string) (string, <-chan zk.Event, error) { + data, _, watcher, err := conn.GetW(getLeaderPath(rootPath)) + if err != nil { + return "", nil, errors.Trace(err) + } + addr, err := getLeader(data) + if err != nil { + return "", nil, errors.Trace(err) + } + + // if err != checkLeaderExists(conn); err != nil { + // return "", errors.Trace(err) + // } + + return addr, watcher, nil +} diff --git a/vendor/github.com/ngaut/zkhelper/README.md b/vendor/github.com/ngaut/zkhelper/README.md new file mode 100644 index 000000000..3ce45069d --- /dev/null +++ b/vendor/github.com/ngaut/zkhelper/README.md @@ -0,0 +1,4 @@ +Coordinator +======== + +Support both zookeeper and etcd diff --git a/vendor/github.com/ngaut/zkhelper/conn.go b/vendor/github.com/ngaut/zkhelper/conn.go new file mode 100644 index 000000000..c8f29d767 --- /dev/null +++ b/vendor/github.com/ngaut/zkhelper/conn.go @@ -0,0 +1,53 @@ +package zkhelper + +import ( + zk "github.com/ngaut/go-zookeeper/zk" +) + +/* +type Stat interface { + Czxid() int64 + Mzxid() int64 + CTime() time.Time + MTime() time.Time + Version() int + CVersion() int + AVersion() int + EphemeralOwner() int64 + DataLength() int + NumChildren() int + Pzxid() int64 +} +*/ + +// This interface is really close to the zookeeper connection +// interface. It uses the Stat interface defined here instead of the +// zookeeper.Stat structure for stats. Everything else is the same as +// in zookeeper. So refer to the zookeeper docs for the conventions +// used here (for instance, using -1 as version to specify any +// version) +type Conn interface { + Get(path string) (data []byte, stat zk.Stat, err error) + GetW(path string) (data []byte, stat zk.Stat, watch <-chan zk.Event, err error) + + Children(path string) (children []string, stat zk.Stat, err error) + ChildrenW(path string) (children []string, stat zk.Stat, watch <-chan zk.Event, err error) + + Exists(path string) (exist bool, stat zk.Stat, err error) + ExistsW(path string) (exist bool, stat zk.Stat, watch <-chan zk.Event, err error) + + Create(path string, value []byte, flags int32, aclv []zk.ACL) (pathCreated string, err error) + + Set(path string, value []byte, version int32) (stat zk.Stat, err error) + + Delete(path string, version int32) (err error) + + Close() + + //RetryChange(path string, flags int, acl []ACL, changeFunc ChangeFunc) error + + GetACL(path string) ([]zk.ACL, zk.Stat, error) + SetACL(path string, aclv []zk.ACL, version int32) (zk.Stat, error) + + Seq2Str(seq int64) string +} diff --git a/vendor/github.com/ngaut/zkhelper/etcd.go b/vendor/github.com/ngaut/zkhelper/etcd.go new file mode 100644 index 000000000..d936a4a21 --- /dev/null +++ b/vendor/github.com/ngaut/zkhelper/etcd.go @@ -0,0 +1,472 @@ +package zkhelper + +import ( + "errors" + "fmt" + "path" + "strings" + "sync" + "time" + + etcderr "github.com/coreos/etcd/error" + "github.com/coreos/go-etcd/etcd" + zk "github.com/ngaut/go-zookeeper/zk" + "github.com/ngaut/log" + "github.com/ngaut/pools" +) + +var ( + singleInstanceLock sync.Mutex + etcdInstance *etcdImpl +) + +type PooledEtcdClient struct { + c *etcd.Client +} + +func (c *PooledEtcdClient) Close() { + +} + +func (e *etcdImpl) Seq2Str(seq int64) string { + return fmt.Sprintf("%d", seq) +} + +type etcdImpl struct { + sync.Mutex + cluster string + pool *pools.ResourcePool + indexMap map[string]uint64 +} + +func convertToZkError(err error) error { + //todo: convert other errors + if ec, ok := err.(*etcd.EtcdError); ok { + switch ec.ErrorCode { + case etcderr.EcodeKeyNotFound: + return zk.ErrNoNode + case etcderr.EcodeNotFile: + case etcderr.EcodeNotDir: + case etcderr.EcodeNodeExist: + return zk.ErrNodeExists + case etcderr.EcodeDirNotEmpty: + return zk.ErrNotEmpty + } + } + + return err +} + +func convertToZkEvent(watchPath string, resp *etcd.Response, err error) zk.Event { + //log.Infof("convert event from path:%s, %+v, %+v", watchPath, resp, resp.Node.Key) + var e zk.Event + + if err != nil { + e.Err = convertToZkError(err) + e.State = zk.StateDisconnected + return e + } + + e.State = zk.StateConnected + + e.Path = resp.Node.Key + if len(resp.Node.Key) > len(watchPath) { + e.Type = zk.EventNodeChildrenChanged + return e + } + + switch resp.Action { + case "set": + e.Type = zk.EventNodeDataChanged + case "delete": + e.Type = zk.EventNodeDeleted + case "update": + e.Type = zk.EventNodeDataChanged + case "create": + e.Type = zk.EventNodeCreated + case "expire": + e.Type = zk.EventNotWatching + } + + return e +} + +func NewEtcdConn(zkAddr string) (Conn, error) { + singleInstanceLock.Lock() + defer singleInstanceLock.Unlock() + if etcdInstance != nil { + return etcdInstance, nil + } + + p := pools.NewResourcePool(func() (pools.Resource, error) { + cluster := strings.Split(zkAddr, ",") + for i, addr := range cluster { + if !strings.HasPrefix(addr, "http://") { + cluster[i] = "http://" + addr + } + } + newClient := etcd.NewClient(cluster) + newClient.SetConsistency(etcd.STRONG_CONSISTENCY) + return &PooledEtcdClient{c: newClient}, nil + }, 10, 10, 0) + + etcdInstance = &etcdImpl{ + cluster: zkAddr, + pool: p, + indexMap: make(map[string]uint64), + } + + log.Infof("new etcd %s", zkAddr) + if etcdInstance == nil { + return nil, errors.New("unknown error") + } + + return etcdInstance, nil +} + +func (e *etcdImpl) Get(key string) (data []byte, stat zk.Stat, err error) { + conn, err := e.pool.Get() + if err != nil { + return nil, nil, err + } + + defer e.pool.Put(conn) + c := conn.(*PooledEtcdClient).c + + resp, err := c.Get(key, true, false) + if resp == nil { + return nil, nil, convertToZkError(err) + } + + return []byte(resp.Node.Value), nil, nil +} + +func (e *etcdImpl) setIndex(key string, index uint64) { + e.Lock() + defer e.Unlock() + + e.indexMap[key] = index +} + +func (e *etcdImpl) getIndex(key string) uint64 { + e.Lock() + defer e.Unlock() + + index := e.indexMap[key] + + return index +} + +func (e *etcdImpl) watch(key string, children bool) (resp *etcd.Response, stat zk.Stat, watch <-chan zk.Event, err error) { + conn, err := e.pool.Get() + if err != nil { + return nil, nil, nil, err + } + + defer e.pool.Put(conn) + c := conn.(*PooledEtcdClient).c + index := e.getIndex(key) + resp, err = c.Get(key, true, true) + if resp == nil { + return nil, nil, nil, convertToZkError(err) + } + + if index < resp.Node.ModifiedIndex { + index = resp.Node.ModifiedIndex + } + + for _, n := range resp.Node.Nodes { + if n.ModifiedIndex > index { + index = n.ModifiedIndex + } + } + + log.Info("try watch", key) + ch := make(chan zk.Event, 100) + originVal := resp.Node.Value + + go func() { + defer func() { + e.setIndex(key, index) + }() + + for { + conn, err := e.pool.Get() + if err != nil { + log.Error(err) + return + } + + c := conn.(*PooledEtcdClient).c + + resp, err := c.Watch(key, index, children, nil, nil) + e.pool.Put(conn) + + if err != nil { + if ec, ok := err.(*etcd.EtcdError); ok { + if ec.ErrorCode == etcderr.EcodeEventIndexCleared { + index++ + continue + } + } + + log.Warning("watch", err) + ch <- convertToZkEvent(key, resp, err) + return + } + + if key == resp.Node.Key && originVal == string(resp.Node.Value) { //keep alive event + index++ + continue + } + + ch <- convertToZkEvent(key, resp, err) + //update index + if index <= resp.Node.ModifiedIndex { + index = resp.Node.ModifiedIndex + 1 + } else { + index++ + } + return + } + }() + + return resp, nil, ch, nil +} + +func (e *etcdImpl) GetW(key string) (data []byte, stat zk.Stat, watch <-chan zk.Event, err error) { + resp, stat, watch, err := e.watch(key, false) + if err != nil { + return + } + + return []byte(resp.Node.Value), stat, watch, nil +} + +func (e *etcdImpl) Children(key string) (children []string, stat zk.Stat, err error) { + conn, err := e.pool.Get() + if err != nil { + return nil, nil, err + } + + defer e.pool.Put(conn) + c := conn.(*PooledEtcdClient).c + + resp, err := c.Get(key, true, false) + if resp == nil { + return nil, nil, convertToZkError(err) + } + + for _, c := range resp.Node.Nodes { + children = append(children, path.Base(c.Key)) + } + + return +} + +func (e *etcdImpl) ChildrenW(key string) (children []string, stat zk.Stat, watch <-chan zk.Event, err error) { + resp, stat, watch, err := e.watch(key, true) + if err != nil { + return nil, stat, nil, convertToZkError(err) + } + + for _, c := range resp.Node.Nodes { + children = append(children, path.Base(c.Key)) + } + + return children, stat, watch, nil +} + +func (e *etcdImpl) Exists(key string) (exist bool, stat zk.Stat, err error) { + conn, err := e.pool.Get() + if err != nil { + return false, nil, err + } + + defer e.pool.Put(conn) + c := conn.(*PooledEtcdClient).c + + _, err = c.Get(key, true, false) + if err == nil { + return true, nil, nil + } + + if ec, ok := err.(*etcd.EtcdError); ok { + if ec.ErrorCode == etcderr.EcodeKeyNotFound { + return false, nil, nil + } + } + + return false, nil, convertToZkError(err) +} + +func (e *etcdImpl) ExistsW(key string) (exist bool, stat zk.Stat, watch <-chan zk.Event, err error) { + _, stat, watch, err = e.watch(key, false) + if err != nil { + return false, nil, nil, convertToZkError(err) + } + + return true, nil, watch, nil +} + +const MAX_TTL = 365 * 24 * 60 * 60 + +func (e *etcdImpl) doKeepAlive(key string, ttl uint64) error { + conn, err := e.pool.Get() + if err != nil { + return err + } + + defer e.pool.Put(conn) + c := conn.(*PooledEtcdClient).c + + resp, err := c.Get(key, false, false) + if err != nil { + log.Error(err) + return err + } + + if resp.Node.Dir { + return fmt.Errorf("can not set ttl to directory", key) + } + + //log.Info("keep alive ", key) + resp, err = c.CompareAndSwap(key, resp.Node.Value, ttl, resp.Node.Value, resp.Node.ModifiedIndex) + if err == nil { + return nil + } + + if ec, ok := err.(*etcd.EtcdError); ok && ec.ErrorCode == etcderr.EcodeTestFailed { + return nil + } + + return err +} + +//todo:add test for keepAlive +func (e *etcdImpl) keepAlive(key string, ttl uint64) { + go func() { + for { + time.Sleep(1 * time.Second) + err := e.doKeepAlive(key, ttl) + if err != nil { + log.Error(err) + return + } + } + }() +} + +func (e *etcdImpl) Create(wholekey string, value []byte, flags int32, aclv []zk.ACL) (keyCreated string, err error) { + seq := (flags & zk.FlagSequence) != 0 + tmp := (flags & zk.FlagEphemeral) != 0 + ttl := uint64(MAX_TTL) + if tmp { + ttl = 5 + } + + var resp *etcd.Response + + conn, err := e.pool.Get() + if err != nil { + return "", err + } + + defer e.pool.Put(conn) + c := conn.(*PooledEtcdClient).c + + fn := c.Create + log.Info("create", wholekey) + + if seq { + wholekey = path.Dir(wholekey) + fn = c.CreateInOrder + } else { + for _, v := range aclv { + if v.Perms == PERM_DIRECTORY { + log.Info("etcdImpl:create directory", wholekey) + fn = nil + resp, err = c.CreateDir(wholekey, uint64(ttl)) + if err != nil { + return "", convertToZkError(err) + } + } + } + } + + if fn == nil { + if tmp { + e.keepAlive(wholekey, ttl) + } + return resp.Node.Key, nil + } + + resp, err = fn(wholekey, string(value), uint64(ttl)) + if err != nil { + return "", convertToZkError(err) + } + + if tmp { + e.keepAlive(resp.Node.Key, ttl) + } + + return resp.Node.Key, nil +} + +func (e *etcdImpl) Set(key string, value []byte, version int32) (stat zk.Stat, err error) { + if version == 0 { + return nil, errors.New("invalid version") + } + + conn, err := e.pool.Get() + if err != nil { + return nil, err + } + + defer e.pool.Put(conn) + c := conn.(*PooledEtcdClient).c + + resp, err := c.Get(key, true, false) + if resp == nil { + return nil, convertToZkError(err) + } + + _, err = c.Set(key, string(value), uint64(resp.Node.TTL)) + return nil, convertToZkError(err) +} + +func (e *etcdImpl) Delete(key string, version int32) (err error) { + //todo: handle version + conn, err := e.pool.Get() + if err != nil { + return err + } + + defer e.pool.Put(conn) + c := conn.(*PooledEtcdClient).c + + resp, err := c.Get(key, true, false) + if resp == nil { + return convertToZkError(err) + } + + if resp.Node.Dir { + _, err = c.DeleteDir(key) + } else { + _, err = c.Delete(key, false) + } + + return convertToZkError(err) +} + +func (e *etcdImpl) GetACL(key string) ([]zk.ACL, zk.Stat, error) { + return nil, nil, nil +} + +func (e *etcdImpl) SetACL(key string, aclv []zk.ACL, version int32) (zk.Stat, error) { + return nil, nil +} + +func (e *etcdImpl) Close() { + //how to implement this +} diff --git a/vendor/github.com/ngaut/zkhelper/fakezk.go b/vendor/github.com/ngaut/zkhelper/fakezk.go new file mode 100644 index 000000000..42aa5f8b0 --- /dev/null +++ b/vendor/github.com/ngaut/zkhelper/fakezk.go @@ -0,0 +1,519 @@ +// Copyright 2013, Google Inc. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package fakezk is a pretty complete mock implementation of a +// Zookeper connection (see go/zk/zk.Conn). All operations +// work as expected with the exceptions of zk.Conn.ACL and +// zk.Conn.SetACL. zk.Conn.SetACL will succeed, but it is a noop (and +// the ACLs won't be respected). zk.Conn.ACL will panic. It is OK to +// access the connection from multiple goroutines, but the locking is +// very naive (every operation locks the whole connection). +package zkhelper + +import ( + "bytes" + "encoding/json" + "fmt" + "io/ioutil" + "strings" + "sync" + "time" + + "github.com/ngaut/go-zookeeper/zk" +) + +type zconn struct { + mu sync.Mutex + root *stat + zxid int64 + existWatches map[string][]chan zk.Event +} + +func (conn *zconn) getZxid() int64 { + conn.zxid++ + return conn.zxid +} + +func (conn *zconn) Seq2Str(seq int64) string { + return fmt.Sprintf("%0.10d", seq) +} + +// NewConn returns a fake zk.Conn implementation. Data is stored in +// memory, and there's a global connection lock for concurrent access. +func NewConn() Conn { + return &zconn{ + root: &stat{ + name: "/", + children: make(map[string]*stat), + }, + existWatches: make(map[string][]chan zk.Event)} +} + +// NewConnFromFile returns a fake zk.Conn implementation, that is seeded +// with the json data extracted from the input file. +func NewConnFromFile(filename string) Conn { + result := &zconn{ + root: &stat{ + name: "/", + children: make(map[string]*stat), + }, + existWatches: make(map[string][]chan zk.Event)} + data, err := ioutil.ReadFile(filename) + if err != nil { + panic(fmt.Errorf("NewConnFromFile failed to read file %v: %v", filename, err)) + } + values := make(map[string]interface{}) + if err := json.Unmarshal(data, &values); err != nil { + panic(fmt.Errorf("NewConnFromFile failed to json.Unmarshal file %v: %v", filename, err)) + } + for k, v := range values { + jv, err := json.Marshal(v) + if err != nil { + panic(fmt.Errorf("NewConnFromFile failed to json.Marshal value %v: %v", k, err)) + } + + // CreateRecursive will work for a leaf node where the parent + // doesn't exist, but not for a node in the middle of a tree + // that already exists. So have to use 'Set' as a backup. + if _, err := CreateRecursive(result, k, string(jv), 0, nil); err != nil { + if ZkErrorEqual(err, zk.ErrNodeExists) { + _, err = result.Set(k, jv, -1) + } + if err != nil { + panic(fmt.Errorf("NewConnFromFile failed to zk.CreateRecursive value %v: %v", k, err)) + } + } + } + return result +} + +func (conn *zconn) GetACL(path string) ([]zk.ACL, zk.Stat, error) { + return nil, nil, nil +} + +func (conn *zconn) Get(zkPath string) (data []byte, stat zk.Stat, err error) { + conn.mu.Lock() + defer conn.mu.Unlock() + node, _, rest, err := conn.getNode(zkPath, "get") + if err != nil { + return nil, nil, err + } + if len(rest) != 0 { + return nil, nil, zkError(zk.ErrNoNode, "get", zkPath) + } + return []byte(node.content), node, nil +} + +func (conn *zconn) GetW(zkPath string) (data []byte, stat zk.Stat, watch <-chan zk.Event, err error) { + conn.mu.Lock() + defer conn.mu.Unlock() + node, _, rest, err := conn.getNode(zkPath, "getw") + if err != nil { + return nil, nil, nil, err + } + + if len(rest) != 0 { + return nil, nil, nil, zkError(zk.ErrNoNode, "getw", zkPath) + } + c := make(chan zk.Event, 1) + node.changeWatches = append(node.changeWatches, c) + return []byte(node.content), node, c, nil +} + +func (conn *zconn) Children(zkPath string) (children []string, stat zk.Stat, err error) { + conn.mu.Lock() + defer conn.mu.Unlock() + + //println("Children:", conn.String()) + + node, _, rest, err := conn.getNode(zkPath, "children") + if err != nil { + return nil, nil, err + } + + if len(rest) != 0 { + return nil, nil, zkError(zk.ErrNoNode, "children", zkPath) + } + for name := range node.children { + children = append(children, name) + } + return children, node, nil +} + +func (conn *zconn) ChildrenW(zkPath string) (children []string, stat zk.Stat, watch <-chan zk.Event, err error) { + conn.mu.Lock() + defer conn.mu.Unlock() + + //println("ChildrenW:", conn.String()) + + node, _, rest, err := conn.getNode(zkPath, "childrenw") + if err != nil { + return nil, nil, nil, err + } + + if len(rest) != 0 { + return nil, nil, nil, zkError(zk.ErrNoNode, "childrenw", zkPath) + } + c := make(chan zk.Event, 1) + node.childrenWatches = append(node.childrenWatches, c) + for name := range node.children { + children = append(children, name) + } + return children, node, c, nil +} + +func (conn *zconn) Exists(zkPath string) (exist bool, stat zk.Stat, err error) { + // FIXME(szopa): if the path is bad, Op will be "get." + exist = false + _, stat, err = conn.Get(zkPath) + if err != nil { + if ZkErrorEqual(err, zk.ErrNoNode) { + err = nil + } + } else { + exist = true + } + + return exist, stat, err +} + +func (conn *zconn) ExistsW(zkPath string) (exist bool, stat zk.Stat, watch <-chan zk.Event, err error) { + conn.mu.Lock() + defer conn.mu.Unlock() + exist = false + c := make(chan zk.Event, 1) + node, _, rest, err := conn.getNode(zkPath, "existsw") + if err != nil { + return exist, nil, nil, err + } + + if len(rest) != 0 { + watches, ok := conn.existWatches[zkPath] + if !ok { + watches = make([]chan zk.Event, 0) + conn.existWatches[zkPath] = watches + } + conn.existWatches[zkPath] = append(watches, c) + return exist, nil, c, nil + } + + exist = true + node.existWatches = append(node.existWatches, c) + return exist, node, c, nil +} + +func (conn *zconn) Create(zkPath string, value []byte, flags int32, aclv []zk.ACL) (zkPathCreated string, err error) { + conn.mu.Lock() + defer conn.mu.Unlock() + + node, _, rest, err := conn.getNode(zkPath, "create") + if err != nil { + return "", err + } + if len(rest) == 0 { + return "", zkError(zk.ErrNodeExists, "create", zkPath) + } + + if len(rest) > 1 { + return "", zkError(zk.ErrNoNode, "create", zkPath) + } + + zxid := conn.getZxid() + name := rest[0] + if (flags & zk.FlagSequence) != 0 { + sequence := node.nextSequence() + name += sequence + zkPath = zkPath + sequence + } + + stat := &stat{ + name: name, + content: string(value), + children: make(map[string]*stat), + acl: aclv, + mtime: time.Now(), + ctime: time.Now(), + czxid: zxid, + mzxid: zxid, + existWatches: make([]chan zk.Event, 0), + } + node.children[name] = stat + event := zk.Event{ + Type: zk.EventNodeCreated, + Path: zkPath, + State: zk.StateConnected, + } + if watches, ok := conn.existWatches[zkPath]; ok { + delete(conn.existWatches, zkPath) + for _, watch := range watches { + watch <- event + + } + } + childrenEvent := zk.Event{ + Type: zk.EventNodeChildrenChanged, + Path: zkPath, + State: zk.StateConnected, + } + for _, watch := range node.childrenWatches { + watch <- childrenEvent + close(watch) + } + node.childrenWatches = nil + + node.cversion++ + + return zkPath, nil +} + +func (conn *zconn) Set(zkPath string, value []byte, version int32) (stat zk.Stat, err error) { + conn.mu.Lock() + defer conn.mu.Unlock() + + node, _, rest, err := conn.getNode(zkPath, "set") + if err != nil { + return nil, err + } + + if len(rest) != 0 { + return nil, zkError(zk.ErrNoNode, "set", zkPath) + } + + if version != -1 && node.version != int(version) { + return nil, zkError(zk.ErrBadVersion, "set", zkPath) + } + node.content = string(value) + node.version++ + for _, watch := range node.changeWatches { + watch <- zk.Event{ + Type: zk.EventNodeDataChanged, + Path: zkPath, + State: zk.StateConnected, + } + } + node.changeWatches = nil + return node, nil +} + +func (conn *zconn) Delete(zkPath string, version int32) (err error) { + conn.mu.Lock() + defer conn.mu.Unlock() + + node, parent, rest, err := conn.getNode(zkPath, "delete") + if err != nil { + return err + } + + if len(rest) > 0 { + return zkError(zk.ErrNoNode, "delete", zkPath) + } + if len(node.children) > 0 { + return zkError(zk.ErrNotEmpty, "delete", zkPath) + } + delete(parent.children, node.name) + event := zk.Event{ + Type: zk.EventNodeDeleted, + Path: zkPath, + State: zk.StateConnected, + } + for _, watch := range node.existWatches { + watch <- event + } + for _, watch := range node.changeWatches { + watch <- event + } + node.existWatches = nil + node.changeWatches = nil + childrenEvent := zk.Event{ + Type: zk.EventNodeChildrenChanged, + Path: zkPath, + State: zk.StateConnected} + + for _, watch := range parent.childrenWatches { + watch <- childrenEvent + } + return nil +} + +func (conn *zconn) Close() { + conn.mu.Lock() + defer conn.mu.Unlock() + for _, watches := range conn.existWatches { + for _, c := range watches { + close(c) + } + } + conn.root.closeAllWatches() +} + +/* +func (conn *zconn) RetryChange(path string, flags int, acl []zk.ACL, changeFunc zk.ChangeFunc) error { + for { + oldValue, oldStat, err := conn.Get(path) + if err != nil && !ZkErrorEqual(err, zk.ErrNoNode) { + return err + } + newValue, err := changeFunc(oldValue, oldStat) + if err != nil { + return err + } + if oldStat == nil { + _, err := conn.Create(path, newValue, flags, acl) + if err == nil || !ZkErrorEqual(err, zk.ZNODEEXISTS) { + return err + } + continue + } + if newValue == oldValue { + return nil // Nothing to do. + } + _, err = conn.Set(path, newValue, oldStat.Version()) + if err == nil || !ZkErrorEqual(err, zk.ZBADVERSION) && !ZkErrorEqual(err, zk.ErrNoNode) { + return err + } + } +} +*/ + +func (conn *zconn) SetACL(zkPath string, aclv []zk.ACL, version int32) (zk.Stat, error) { + return nil, nil +} + +func (conn *zconn) getNode(zkPath string, op string) (node *stat, parent *stat, rest []string, err error) { + // FIXME(szopa): Make sure the path starts with /. + parts := strings.Split(zkPath, "/") + if parts[0] != "" { + //todo: fix this, error bad arguments + return nil, nil, nil, zkError(zk.ErrUnknown, op, zkPath) + } + elements := parts[1:] + parent = nil + current := conn.root + for i, el := range elements { + candidateParent := current + candidate, ok := current.children[el] + if !ok { + return current, parent, elements[i:], nil + } + current, parent = candidate, candidateParent + } + return current, parent, []string{}, nil +} + +type ZkError struct { + Code error + Op string + Path string +} + +func (ze *ZkError) Error() string { + return ze.Code.Error() +} + +// zkError creates an appropriate error return from +// a ZooKeeper status +func zkError(code error, op, path string) error { + return &ZkError{ + Op: op, + Code: code, + Path: path, + } +} + +type stat struct { + name string + content string + children map[string]*stat + acl []zk.ACL + mtime time.Time + ctime time.Time + czxid int64 + mzxid int64 + pzxid int64 + version int + cversion int + aversion int + + sequence int + + existWatches []chan zk.Event + changeWatches []chan zk.Event + childrenWatches []chan zk.Event +} + +func (st stat) closeAllWatches() { + for _, c := range st.existWatches { + close(c) + } + for _, c := range st.changeWatches { + close(c) + } + for _, c := range st.childrenWatches { + close(c) + } + for _, child := range st.children { + child.closeAllWatches() + } +} + +func (st stat) Czxid() int64 { + return st.czxid +} +func (st stat) Mzxid() int64 { + return st.mzxid +} +func (st stat) CTime() time.Time { + return st.ctime +} +func (st stat) MTime() time.Time { + return st.mtime +} +func (st stat) Version() int { + return st.version +} +func (st stat) CVersion() int { + return st.cversion +} +func (st stat) AVersion() int { + return st.aversion +} +func (st stat) EphemeralOwner() int64 { + return 0 +} + +func (st stat) DataLength() int { + return len(st.content) +} + +func (st stat) NumChildren() int { + return len(st.children) +} + +func (st stat) Pzxid() int64 { + return st.pzxid +} + +func (st *stat) nextSequence() string { + st.sequence++ + return fmt.Sprintf("%010d", st.sequence) +} + +func (st stat) fprintRecursive(level int, buf *bytes.Buffer) { + start := strings.Repeat(" ", level) + fmt.Fprintf(buf, "%v-%v:\n", start, st.name) + if st.content != "" { + fmt.Fprintf(buf, "%v content: %q\n\n", start, st.content) + } + if len(st.children) > 0 { + for _, child := range st.children { + child.fprintRecursive(level+1, buf) + } + } +} + +func (conn *zconn) String() string { + b := new(bytes.Buffer) + conn.root.fprintRecursive(0, b) + return b.String() +} diff --git a/vendor/github.com/ngaut/zkhelper/zk.go b/vendor/github.com/ngaut/zkhelper/zk.go new file mode 100644 index 000000000..c3d39ae10 --- /dev/null +++ b/vendor/github.com/ngaut/zkhelper/zk.go @@ -0,0 +1,899 @@ +// zk helper functions +// modified from Vitess project + +package zkhelper + +import ( + "encoding/json" + "errors" + "fmt" + "math/rand" + "os" + "path" + "sort" + "strings" + "sync" + "time" + + "github.com/ngaut/go-zookeeper/zk" + "github.com/ngaut/log" +) + +var ( + // This error is returned by functions that wait for a result + // when they are interrupted. + ErrInterrupted = errors.New("zkutil: obtaining lock was interrupted") + + // This error is returned by functions that wait for a result + // when the timeout value is reached. + ErrTimeout = errors.New("zkutil: obtaining lock timed out") +) + +const ( + // PERM_DIRECTORY are default permissions for a node. + PERM_DIRECTORY = zk.PermAdmin | zk.PermCreate | zk.PermDelete | zk.PermRead | zk.PermWrite + // PERM_FILE allows a zk node to emulate file behavior by disallowing child nodes. + PERM_FILE = zk.PermAdmin | zk.PermRead | zk.PermWrite + MagicPrefix = "zk" +) + +func init() { + rand.Seed(time.Now().UnixNano()) +} + +type MyZkConn struct { + *zk.Conn +} + +func (conn *MyZkConn) Seq2Str(seq int64) string { + return fmt.Sprintf("%0.10d", seq) +} + +func ConnectToZk(zkAddr string) (Conn, error) { + zkConn, _, err := zk.Connect(strings.Split(zkAddr, ","), 3*time.Second) + if err != nil { + return nil, err + } + + return &MyZkConn{Conn: zkConn}, nil +} + +func ConnectToZkWithTimeout(zkAddr string, recvTime time.Duration) (Conn, error) { + zkConn, _, err := zk.Connect(strings.Split(zkAddr, ","), recvTime) + if err != nil { + return nil, err + } + + return &MyZkConn{Conn: zkConn}, nil +} + +func DefaultACLs() []zk.ACL { + return zk.WorldACL(zk.PermAll) +} + +func DefaultDirACLs() []zk.ACL { + return zk.WorldACL(PERM_DIRECTORY) +} + +func DefaultFileACLs() []zk.ACL { + return zk.WorldACL(PERM_FILE) +} + +// IsDirectory returns if this node should be treated as a directory. +func IsDirectory(aclv []zk.ACL) bool { + for _, acl := range aclv { + if acl.Perms != PERM_DIRECTORY { + return false + } + } + return true +} + +func ZkErrorEqual(a, b error) bool { + if a != nil && b != nil { + return a.Error() == b.Error() + } + + return a == b +} + +// Create a path and any pieces required, think mkdir -p. +// Intermediate znodes are always created empty. +func CreateRecursive(zconn Conn, zkPath, value string, flags int, aclv []zk.ACL) (pathCreated string, err error) { + parts := strings.Split(zkPath, "/") + if parts[1] != MagicPrefix { + return "", fmt.Errorf("zkutil: non /%v path: %v", MagicPrefix, zkPath) + } + + pathCreated, err = zconn.Create(zkPath, []byte(value), int32(flags), aclv) + if ZkErrorEqual(err, zk.ErrNoNode) { + // Make sure that nodes are either "file" or "directory" to mirror file system + // semantics. + dirAclv := make([]zk.ACL, len(aclv)) + for i, acl := range aclv { + dirAclv[i] = acl + dirAclv[i].Perms = PERM_DIRECTORY + } + _, err = CreateRecursive(zconn, path.Dir(zkPath), "", flags, dirAclv) + if err != nil && !ZkErrorEqual(err, zk.ErrNodeExists) { + return "", err + } + pathCreated, err = zconn.Create(zkPath, []byte(value), int32(flags), aclv) + } + return +} + +func CreateOrUpdate(zconn Conn, zkPath, value string, flags int, aclv []zk.ACL, recursive bool) (pathCreated string, err error) { + if recursive { + pathCreated, err = CreateRecursive(zconn, zkPath, value, 0, aclv) + } else { + pathCreated, err = zconn.Create(zkPath, []byte(value), 0, aclv) + } + if err != nil && ZkErrorEqual(err, zk.ErrNodeExists) { + pathCreated = "" + _, err = zconn.Set(zkPath, []byte(value), -1) + } + return +} + +type pathItem struct { + path string + err error +} + +func ChildrenRecursive(zconn Conn, zkPath string) ([]string, error) { + var err error + mutex := sync.Mutex{} + wg := sync.WaitGroup{} + pathList := make([]string, 0, 32) + children, _, err := zconn.Children(zkPath) + if err != nil { + return nil, err + } + + for _, child := range children { + wg.Add(1) + go func(child string) { + childPath := path.Join(zkPath, child) + rChildren, zkErr := ChildrenRecursive(zconn, childPath) + if zkErr != nil { + // If other processes are deleting nodes, we need to ignore + // the missing nodes. + if !ZkErrorEqual(zkErr, zk.ErrNoNode) { + mutex.Lock() + err = zkErr + mutex.Unlock() + } + } else { + mutex.Lock() + pathList = append(pathList, child) + for _, rChild := range rChildren { + pathList = append(pathList, path.Join(child, rChild)) + } + mutex.Unlock() + } + wg.Done() + }(child) + } + + wg.Wait() + + mutex.Lock() + defer mutex.Unlock() + if err != nil { + return nil, err + } + return pathList, nil +} + +func HasWildcard(path string) bool { + for i := 0; i < len(path); i++ { + switch path[i] { + case '\\': + if i+1 >= len(path) { + return true + } else { + i++ + } + case '*', '?', '[': + return true + } + } + return false +} + +func resolveRecursive(zconn Conn, parts []string, toplevel bool) ([]string, error) { + for i, part := range parts { + if HasWildcard(part) { + var children []string + zkParentPath := strings.Join(parts[:i], "/") + var err error + children, _, err = zconn.Children(zkParentPath) + if err != nil { + // we asked for something like + // /zk/cell/aaa/* and + // /zk/cell/aaa doesn't exist + // -> return empty list, no error + // (note we check both a regular zk + // error and the error the test + // produces) + if ZkErrorEqual(err, zk.ErrNoNode) { + return nil, nil + } + // otherwise we return the error + return nil, err + } + sort.Strings(children) + + results := make([][]string, len(children)) + wg := &sync.WaitGroup{} + mu := &sync.Mutex{} + var firstError error + + for j, child := range children { + matched, err := path.Match(part, child) + if err != nil { + return nil, err + } + if matched { + // we have a match! + wg.Add(1) + newParts := make([]string, len(parts)) + copy(newParts, parts) + newParts[i] = child + go func(j int) { + defer wg.Done() + subResult, err := resolveRecursive(zconn, newParts, false) + if err != nil { + mu.Lock() + if firstError != nil { + log.Infof("Multiple error: %v", err) + } else { + firstError = err + } + mu.Unlock() + } else { + results[j] = subResult + } + }(j) + } + } + + wg.Wait() + if firstError != nil { + return nil, firstError + } + + result := make([]string, 0, 32) + for j := 0; j < len(children); j++ { + subResult := results[j] + if subResult != nil { + result = append(result, subResult...) + } + } + + // we found a part that is a wildcard, we + // added the children already, we're done + return result, nil + } + } + + // no part contains a wildcard, add the path if it exists, and done + path := strings.Join(parts, "/") + if toplevel { + // for whatever the user typed at the toplevel, we don't + // check it exists or not, we just return it + return []string{path}, nil + } + + // this is an expanded path, we need to check if it exists + _, stat, err := zconn.Exists(path) + if err != nil { + return nil, err + } + if stat != nil { + return []string{path}, nil + } + return nil, nil +} + +// resolve paths like: +// /zk/nyc/vt/tablets/*/action +// /zk/global/vt/keyspaces/*/shards/*/action +// /zk/*/vt/tablets/*/action +// into real existing paths +// +// If you send paths that don't contain any wildcard and +// don't exist, this function will return an empty array. +func ResolveWildcards(zconn Conn, zkPaths []string) ([]string, error) { + // check all the paths start with /zk/ before doing anything + // time consuming + // relax this in case we are not talking to a metaconn and + // just want to talk to a specified instance. + // for _, zkPath := range zkPaths { + // if _, err := ZkCellFromZkPath(zkPath); err != nil { + // return nil, err + // } + // } + + results := make([][]string, len(zkPaths)) + wg := &sync.WaitGroup{} + mu := &sync.Mutex{} + var firstError error + + for i, zkPath := range zkPaths { + wg.Add(1) + parts := strings.Split(zkPath, "/") + go func(i int) { + defer wg.Done() + subResult, err := resolveRecursive(zconn, parts, true) + if err != nil { + mu.Lock() + if firstError != nil { + log.Infof("Multiple error: %v", err) + } else { + firstError = err + } + mu.Unlock() + } else { + results[i] = subResult + } + }(i) + } + + wg.Wait() + if firstError != nil { + return nil, firstError + } + + result := make([]string, 0, 32) + for i := 0; i < len(zkPaths); i++ { + subResult := results[i] + if subResult != nil { + result = append(result, subResult...) + } + } + + return result, nil +} + +func DeleteRecursive(zconn Conn, zkPath string, version int) error { + // version: -1 delete any version of the node at path - only applies to the top node + err := zconn.Delete(zkPath, int32(version)) + if err == nil { + return nil + } + if !ZkErrorEqual(err, zk.ErrNotEmpty) { + return err + } + // Remove the ability for other nodes to get created while we are trying to delete. + // Otherwise, you can enter a race condition, or get starved out from deleting. + _, err = zconn.SetACL(zkPath, zk.WorldACL(zk.PermAdmin|zk.PermDelete|zk.PermRead), int32(version)) + if err != nil { + return err + } + children, _, err := zconn.Children(zkPath) + if err != nil { + return err + } + for _, child := range children { + err := DeleteRecursive(zconn, path.Join(zkPath, child), -1) + if err != nil && !ZkErrorEqual(err, zk.ErrNoNode) { + return fmt.Errorf("zkutil: recursive delete failed: %v", err) + } + } + + err = zconn.Delete(zkPath, int32(version)) + if err != nil && !ZkErrorEqual(err, zk.ErrNotEmpty) { + err = fmt.Errorf("zkutil: nodes getting recreated underneath delete (app race condition): %v", zkPath) + } + return err +} + +// The lexically lowest node is the lock holder - verify that this +// path holds the lock. Call this queue-lock because the semantics are +// a hybrid. Normal zk locks make assumptions about sequential +// numbering that don't hold when the data in a lock is modified. +// if the provided 'interrupted' chan is closed, we'll just stop waiting +// and return an interruption error +func ObtainQueueLock(zconn Conn, zkPath string, wait time.Duration, interrupted chan struct{}) error { + queueNode := path.Dir(zkPath) + lockNode := path.Base(zkPath) + + timer := time.NewTimer(wait) +trylock: + children, _, err := zconn.Children(queueNode) + if err != nil { + return fmt.Errorf("zkutil: trylock failed %v", err) + } + sort.Strings(children) + if len(children) > 0 { + if children[0] == lockNode { + return nil + } + if wait > 0 { + prevLock := "" + for i := 1; i < len(children); i++ { + if children[i] == lockNode { + prevLock = children[i-1] + break + } + } + if prevLock == "" { + return fmt.Errorf("zkutil: no previous queue node found: %v", zkPath) + } + + zkPrevLock := path.Join(queueNode, prevLock) + _, stat, watch, err := zconn.ExistsW(zkPrevLock) + if err != nil { + return fmt.Errorf("zkutil: unable to watch queued node %v %v", zkPrevLock, err) + } + if stat == nil { + goto trylock + } + select { + case <-timer.C: + break + case <-interrupted: + return ErrInterrupted + case <-watch: + // The precise event doesn't matter - try to read again regardless. + goto trylock + } + } + return ErrTimeout + } + return fmt.Errorf("zkutil: empty queue node: %v", queueNode) +} + +func ZkEventOk(e zk.Event) bool { + return e.State == zk.StateConnected +} + +func NodeExists(zconn Conn, zkPath string) (bool, error) { + b, _, err := zconn.Exists(zkPath) + return b, err +} + +// Close the release channel when you want to clean up nicely. +func CreatePidNode(zconn Conn, zkPath string, contents string, done chan struct{}) error { + // On the first try, assume the cluster is up and running, that will + // help hunt down any config issues present at startup + if _, err := zconn.Create(zkPath, []byte(contents), zk.FlagEphemeral, zk.WorldACL(PERM_FILE)); err != nil { + if ZkErrorEqual(err, zk.ErrNodeExists) { + err = zconn.Delete(zkPath, -1) + } + if err != nil { + return fmt.Errorf("zkutil: failed deleting pid node: %v: %v", zkPath, err) + } + _, err = zconn.Create(zkPath, []byte(contents), zk.FlagEphemeral, zk.WorldACL(PERM_FILE)) + if err != nil { + return fmt.Errorf("zkutil: failed creating pid node: %v: %v", zkPath, err) + } + } + + go func() { + for { + _, _, watch, err := zconn.GetW(zkPath) + if err != nil { + if ZkErrorEqual(err, zk.ErrNoNode) { + _, err = zconn.Create(zkPath, []byte(contents), zk.FlagEphemeral, zk.WorldACL(zk.PermAll)) + if err != nil { + log.Warningf("failed recreating pid node: %v: %v", zkPath, err) + } else { + log.Infof("recreated pid node: %v", zkPath) + continue + } + } else { + log.Warningf("failed reading pid node: %v", err) + } + } else { + select { + case event := <-watch: + if ZkEventOk(event) && event.Type == zk.EventNodeDeleted { + // Most likely another process has started up. However, + // there is a chance that an ephemeral node is deleted by + // the session expiring, yet that same session gets a watch + // notification. This seems like buggy behavior, but rather + // than race too hard on the node, just wait a bit and see + // if the situation resolves itself. + log.Warningf("pid deleted: %v", zkPath) + } else { + log.Infof("pid node event: %v", event) + } + // break here and wait for a bit before attempting + case <-done: + log.Infof("pid watcher stopped on done: %v", zkPath) + return + } + } + select { + // No one likes a thundering herd, least of all zk. + case <-time.After(5*time.Second + time.Duration(rand.Int63n(55e9))): + case <-done: + log.Infof("pid watcher stopped on done: %v", zkPath) + return + } + } + }() + + return nil +} + +// ZLocker is an interface for a lock that can fail. +type ZLocker interface { + Lock(desc string) error + LockWithTimeout(wait time.Duration, desc string) error + Unlock() error + Interrupt() +} + +// Experiment with a little bit of abstraction. +// FIMXE(msolo) This object may need a mutex to ensure it can be shared +// across goroutines. +type zMutex struct { + mu sync.Mutex + zconn Conn + path string // Path under which we try to create lock nodes. + contents string + interrupted chan struct{} + name string // The name of the specific lock node we created. + ephemeral bool +} + +// CreateMutex initializes an unaquired mutex. A mutex is released only +// by Unlock. You can clean up a mutex with delete, but you should be +// careful doing so. +func CreateMutex(zconn Conn, zkPath string) ZLocker { + zm, err := CreateMutexWithContents(zconn, zkPath, map[string]interface{}{}) + if err != nil { + panic(err) // should never happen + } + return zm +} + +// CreateMutex initializes an unaquired mutex with special content for this mutex. +// A mutex is released only by Unlock. You can clean up a mutex with delete, but you should be +// careful doing so. +func CreateMutexWithContents(zconn Conn, zkPath string, contents map[string]interface{}) (ZLocker, error) { + hostname, err := os.Hostname() + if err != nil { + return nil, err + } + pid := os.Getpid() + contents["hostname"] = hostname + contents["pid"] = pid + + data, err := json.Marshal(contents) + if err != nil { + return nil, err + } + + return &zMutex{zconn: zconn, path: zkPath, contents: string(data), interrupted: make(chan struct{})}, nil +} + +// Interrupt releases a lock that's held. +func (zm *zMutex) Interrupt() { + select { + case zm.interrupted <- struct{}{}: + default: + log.Warningf("zmutex interrupt blocked") + } +} + +// Lock returns nil when the lock is acquired. +func (zm *zMutex) Lock(desc string) error { + return zm.LockWithTimeout(365*24*time.Hour, desc) +} + +// LockWithTimeout returns nil when the lock is acquired. A lock is +// held if the file exists and you are the creator. Setting the wait +// to zero makes this a nonblocking lock check. +// +// FIXME(msolo) Disallow non-super users from removing the lock? +func (zm *zMutex) LockWithTimeout(wait time.Duration, desc string) (err error) { + timer := time.NewTimer(wait) + defer func() { + if panicErr := recover(); panicErr != nil || err != nil { + zm.deleteLock() + } + }() + // Ensure the rendezvous node is here. + // FIXME(msolo) Assuming locks are contended, it will be cheaper to assume this just + // exists. + _, err = CreateRecursive(zm.zconn, zm.path, "", 0, zk.WorldACL(PERM_DIRECTORY)) + if err != nil && !ZkErrorEqual(err, zk.ErrNodeExists) { + return err + } + + lockPrefix := path.Join(zm.path, "lock-") + zflags := zk.FlagSequence + if zm.ephemeral { + zflags = zflags | zk.FlagEphemeral + } + + // update node content + var lockContent map[string]interface{} + err = json.Unmarshal([]byte(zm.contents), &lockContent) + if err != nil { + return err + } + lockContent["desc"] = desc + newContent, err := json.Marshal(lockContent) + if err != nil { + return err + } + +createlock: + lockCreated, err := zm.zconn.Create(lockPrefix, newContent, int32(zflags), zk.WorldACL(PERM_FILE)) + if err != nil { + return err + } + name := path.Base(lockCreated) + zm.mu.Lock() + zm.name = name + zm.mu.Unlock() + +trylock: + children, _, err := zm.zconn.Children(zm.path) + if err != nil { + return fmt.Errorf("zkutil: trylock failed %v", err) + } + sort.Strings(children) + if len(children) == 0 { + return fmt.Errorf("zkutil: empty lock: %v", zm.path) + } + + if children[0] == name { + // We are the lock owner. + return nil + } + + // This is the degenerate case of a nonblocking lock check. It's not optimal, but + // also probably not worth optimizing. + if wait == 0 { + return ErrTimeout + } + prevLock := "" + for i := 1; i < len(children); i++ { + if children[i] == name { + prevLock = children[i-1] + break + } + } + if prevLock == "" { + // This is an interesting case. The node disappeared + // underneath us, probably due to a session loss. We can + // recreate the lock node (with a new sequence number) and + // keep trying. + log.Warningf("zkutil: no lock node found: %v/%v", zm.path, zm.name) + goto createlock + } + + zkPrevLock := path.Join(zm.path, prevLock) + exist, stat, watch, err := zm.zconn.ExistsW(zkPrevLock) + if err != nil { + // FIXME(msolo) Should this be a retry? + return fmt.Errorf("zkutil: unable to watch previous lock node %v %v", zkPrevLock, err) + } + if stat == nil || !exist { + goto trylock + } + select { + case <-timer.C: + return ErrTimeout + case <-zm.interrupted: + return ErrInterrupted + case event := <-watch: + log.Infof("zkutil: lock event: %v", event) + // The precise event doesn't matter - try to read again regardless. + goto trylock + } + panic("unexpected") +} + +// Unlock returns nil if the lock was successfully +// released. Otherwise, it is most likely a zk related error. +func (zm *zMutex) Unlock() error { + return zm.deleteLock() +} + +func (zm *zMutex) deleteLock() error { + zm.mu.Lock() + zpath := path.Join(zm.path, zm.name) + zm.mu.Unlock() + + err := zm.zconn.Delete(zpath, -1) + if err != nil && !ZkErrorEqual(err, zk.ErrNoNode) { + return err + } + return nil +} + +// ZElector stores basic state for running an election. +type ZElector struct { + *zMutex + path string + leader string +} + +func (ze *ZElector) isLeader() bool { + return ze.leader == ze.name +} + +type electionEvent struct { + Event int + Err error +} + +type backoffDelay struct { + min time.Duration + max time.Duration + delay time.Duration +} + +func newBackoffDelay(min, max time.Duration) *backoffDelay { + return &backoffDelay{min, max, min} +} + +func (bd *backoffDelay) NextDelay() time.Duration { + delay := bd.delay + bd.delay = 2 * bd.delay + if bd.delay > bd.max { + bd.delay = bd.max + } + return delay +} + +func (bd *backoffDelay) Reset() { + bd.delay = bd.min +} + +// ElectorTask is the interface for a task that runs essentially +// forever or until something bad happens. If a task must be stopped, +// it should be handled promptly - no second notification will be +// sent. +type ElectorTask interface { + Run() error + Stop() + // Return true if interrupted, false if it died of natural causes. + // An interrupted task indicates that the election should stop. + Interrupted() bool +} + +// CreateElection returns an initialized elector. An election is +// really a cycle of events. You are flip-flopping between leader and +// candidate. It's better to think of this as a stream of events that +// one needs to react to. +func CreateElection(zconn Conn, zkPath string) ZElector { + zm, err := CreateElectionWithContents(zconn, zkPath, map[string]interface{}{}) + if err != nil { + // should never happend + panic(err) + } + return zm +} + +// CreateElection returns an initialized elector with special contents. An election is +// really a cycle of events. You are flip-flopping between leader and +// candidate. It's better to think of this as a stream of events that +// one needs to react to. +func CreateElectionWithContents(zconn Conn, zkPath string, contents map[string]interface{}) (ZElector, error) { + l, err := CreateMutexWithContents(zconn, path.Join(zkPath, "candidates"), contents) + if err != nil { + return ZElector{}, err + } + zm := l.(*zMutex) + zm.ephemeral = true + return ZElector{zMutex: zm, path: zkPath}, nil +} + +// RunTask returns nil when the underlyingtask ends or the error it +// generated. +func (ze *ZElector) RunTask(task ElectorTask) error { + delay := newBackoffDelay(100*time.Millisecond, 1*time.Minute) + leaderPath := path.Join(ze.path, "leader") + for { + _, err := CreateRecursive(ze.zconn, leaderPath, "", 0, zk.WorldACL(PERM_FILE)) + if err == nil || ZkErrorEqual(err, zk.ErrNodeExists) { + break + } + log.Warningf("election leader create failed: %v", err) + time.Sleep(delay.NextDelay()) + } + + for { + err := ze.Lock("RunTask") + if err != nil { + log.Warningf("election lock failed: %v", err) + if err == ErrInterrupted { + return ErrInterrupted + } + continue + } + // Confirm your win and deliver acceptance speech. This notifies + // listeners who will have been watching the leader node for + // changes. + _, err = ze.zconn.Set(leaderPath, []byte(ze.contents), -1) + if err != nil { + log.Warningf("election promotion failed: %v", err) + continue + } + + log.Infof("election promote leader %v", leaderPath) + taskErrChan := make(chan error) + go func() { + taskErrChan <- task.Run() + }() + + watchLeader: + // Watch the leader so we can get notified if something goes wrong. + data, _, watch, err := ze.zconn.GetW(leaderPath) + if err != nil { + log.Warningf("election unable to watch leader node %v %v", leaderPath, err) + // FIXME(msolo) Add delay + goto watchLeader + } + + if string(data) != ze.contents { + log.Warningf("election unable to promote leader") + task.Stop() + // We won the election, but we didn't become the leader. How is that possible? + // (see Bush v. Gore for some inspiration) + // It means: + // 1. Someone isn't playing by the election rules (a bad actor). + // Hard to detect - let's assume we don't have this problem. :) + // 2. We lost our connection somehow and the ephemeral lock was cleared, + // allowing someone else to win the election. + continue + } + + // This is where we start our target process and watch for its failure. + waitForEvent: + select { + case <-ze.interrupted: + log.Warning("election interrupted - stop child process") + task.Stop() + // Once the process dies from the signal, this will all tear down. + goto waitForEvent + case taskErr := <-taskErrChan: + // If our code fails, unlock to trigger an election. + log.Infof("election child process ended: %v", taskErr) + ze.Unlock() + if task.Interrupted() { + log.Warningf("election child process interrupted - stepping down") + return ErrInterrupted + } + continue + case zevent := <-watch: + // We had a zk connection hiccup. We have a few choices, + // but it depends on the constraints and the events. + // + // If we get SESSION_EXPIRED our connection loss triggered an + // election that we won't have won and the thus the lock was + // automatically freed. We have no choice but to start over. + if zevent.State == zk.StateExpired { + log.Warningf("election leader watch expired") + task.Stop() + continue + } + + // Otherwise, we had an intermittent issue or something touched + // the node. Either we lost our position or someone broke + // protocol and touched the leader node. We just reconnect and + // revalidate. In the meantime, assume we are still the leader + // until we determine otherwise. + // + // On a reconnect we will be able to see the leader + // information. If we still hold the position, great. If not, we + // kill the associated process. + // + // On a leader node change, we need to perform the same + // validation. It's possible an election completes without the + // old leader realizing he is out of touch. + log.Warningf("election leader watch event %v", zevent) + goto watchLeader + } + } + panic("unreachable") +} diff --git a/vendor/github.com/petar/GoLLRB/LICENSE b/vendor/github.com/petar/GoLLRB/LICENSE new file mode 100644 index 000000000..b75312c78 --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2010, Petar Maymounkov +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +(*) Redistributions of source code must retain the above copyright notice, this list +of conditions and the following disclaimer. + +(*) Redistributions in binary form must reproduce the above copyright notice, this +list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +(*) Neither the name of Petar Maymounkov nor the names of its contributors may be +used to endorse or promote products derived from this software without specific +prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/petar/GoLLRB/llrb/avgvar.go b/vendor/github.com/petar/GoLLRB/llrb/avgvar.go new file mode 100644 index 000000000..2d7e2a326 --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/llrb/avgvar.go @@ -0,0 +1,39 @@ +// Copyright 2010 Petar Maymounkov. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package llrb + +import "math" + +// avgVar maintains the average and variance of a stream of numbers +// in a space-efficient manner. +type avgVar struct { + count int64 + sum, sumsq float64 +} + +func (av *avgVar) Init() { + av.count = 0 + av.sum = 0.0 + av.sumsq = 0.0 +} + +func (av *avgVar) Add(sample float64) { + av.count++ + av.sum += sample + av.sumsq += sample * sample +} + +func (av *avgVar) GetCount() int64 { return av.count } + +func (av *avgVar) GetAvg() float64 { return av.sum / float64(av.count) } + +func (av *avgVar) GetTotal() float64 { return av.sum } + +func (av *avgVar) GetVar() float64 { + a := av.GetAvg() + return av.sumsq/float64(av.count) - a*a +} + +func (av *avgVar) GetStdDev() float64 { return math.Sqrt(av.GetVar()) } diff --git a/vendor/github.com/petar/GoLLRB/llrb/iterator.go b/vendor/github.com/petar/GoLLRB/llrb/iterator.go new file mode 100644 index 000000000..ee7b27f44 --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/llrb/iterator.go @@ -0,0 +1,93 @@ +package llrb + +type ItemIterator func(i Item) bool + +//func (t *Tree) Ascend(iterator ItemIterator) { +// t.AscendGreaterOrEqual(Inf(-1), iterator) +//} + +func (t *LLRB) AscendRange(greaterOrEqual, lessThan Item, iterator ItemIterator) { + t.ascendRange(t.root, greaterOrEqual, lessThan, iterator) +} + +func (t *LLRB) ascendRange(h *Node, inf, sup Item, iterator ItemIterator) bool { + if h == nil { + return true + } + if !less(h.Item, sup) { + return t.ascendRange(h.Left, inf, sup, iterator) + } + if less(h.Item, inf) { + return t.ascendRange(h.Right, inf, sup, iterator) + } + + if !t.ascendRange(h.Left, inf, sup, iterator) { + return false + } + if !iterator(h.Item) { + return false + } + return t.ascendRange(h.Right, inf, sup, iterator) +} + +// AscendGreaterOrEqual will call iterator once for each element greater or equal to +// pivot in ascending order. It will stop whenever the iterator returns false. +func (t *LLRB) AscendGreaterOrEqual(pivot Item, iterator ItemIterator) { + t.ascendGreaterOrEqual(t.root, pivot, iterator) +} + +func (t *LLRB) ascendGreaterOrEqual(h *Node, pivot Item, iterator ItemIterator) bool { + if h == nil { + return true + } + if !less(h.Item, pivot) { + if !t.ascendGreaterOrEqual(h.Left, pivot, iterator) { + return false + } + if !iterator(h.Item) { + return false + } + } + return t.ascendGreaterOrEqual(h.Right, pivot, iterator) +} + +func (t *LLRB) AscendLessThan(pivot Item, iterator ItemIterator) { + t.ascendLessThan(t.root, pivot, iterator) +} + +func (t *LLRB) ascendLessThan(h *Node, pivot Item, iterator ItemIterator) bool { + if h == nil { + return true + } + if !t.ascendLessThan(h.Left, pivot, iterator) { + return false + } + if !iterator(h.Item) { + return false + } + if less(h.Item, pivot) { + return t.ascendLessThan(h.Left, pivot, iterator) + } + return true +} + +// DescendLessOrEqual will call iterator once for each element less than the +// pivot in descending order. It will stop whenever the iterator returns false. +func (t *LLRB) DescendLessOrEqual(pivot Item, iterator ItemIterator) { + t.descendLessOrEqual(t.root, pivot, iterator) +} + +func (t *LLRB) descendLessOrEqual(h *Node, pivot Item, iterator ItemIterator) bool { + if h == nil { + return true + } + if less(h.Item, pivot) || !less(pivot, h.Item) { + if !t.descendLessOrEqual(h.Right, pivot, iterator) { + return false + } + if !iterator(h.Item) { + return false + } + } + return t.descendLessOrEqual(h.Left, pivot, iterator) +} diff --git a/vendor/github.com/petar/GoLLRB/llrb/llrb-stats.go b/vendor/github.com/petar/GoLLRB/llrb/llrb-stats.go new file mode 100644 index 000000000..47126a3be --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/llrb/llrb-stats.go @@ -0,0 +1,46 @@ +// Copyright 2010 Petar Maymounkov. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package llrb + +// GetHeight() returns an item in the tree with key @key, and it's height in the tree +func (t *LLRB) GetHeight(key Item) (result Item, depth int) { + return t.getHeight(t.root, key) +} + +func (t *LLRB) getHeight(h *Node, item Item) (Item, int) { + if h == nil { + return nil, 0 + } + if less(item, h.Item) { + result, depth := t.getHeight(h.Left, item) + return result, depth + 1 + } + if less(h.Item, item) { + result, depth := t.getHeight(h.Right, item) + return result, depth + 1 + } + return h.Item, 0 +} + +// HeightStats() returns the average and standard deviation of the height +// of elements in the tree +func (t *LLRB) HeightStats() (avg, stddev float64) { + av := &avgVar{} + heightStats(t.root, 0, av) + return av.GetAvg(), av.GetStdDev() +} + +func heightStats(h *Node, d int, av *avgVar) { + if h == nil { + return + } + av.Add(float64(d)) + if h.Left != nil { + heightStats(h.Left, d+1, av) + } + if h.Right != nil { + heightStats(h.Right, d+1, av) + } +} diff --git a/vendor/github.com/petar/GoLLRB/llrb/llrb.go b/vendor/github.com/petar/GoLLRB/llrb/llrb.go new file mode 100644 index 000000000..81373fbfd --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/llrb/llrb.go @@ -0,0 +1,456 @@ +// Copyright 2010 Petar Maymounkov. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// A Left-Leaning Red-Black (LLRB) implementation of 2-3 balanced binary search trees, +// based on the following work: +// +// http://www.cs.princeton.edu/~rs/talks/LLRB/08Penn.pdf +// http://www.cs.princeton.edu/~rs/talks/LLRB/LLRB.pdf +// http://www.cs.princeton.edu/~rs/talks/LLRB/Java/RedBlackBST.java +// +// 2-3 trees (and the run-time equivalent 2-3-4 trees) are the de facto standard BST +// algoritms found in implementations of Python, Java, and other libraries. The LLRB +// implementation of 2-3 trees is a recent improvement on the traditional implementation, +// observed and documented by Robert Sedgewick. +// +package llrb + +// Tree is a Left-Leaning Red-Black (LLRB) implementation of 2-3 trees +type LLRB struct { + count int + root *Node +} + +type Node struct { + Item + Left, Right *Node // Pointers to left and right child nodes + Black bool // If set, the color of the link (incoming from the parent) is black + // In the LLRB, new nodes are always red, hence the zero-value for node +} + +type Item interface { + Less(than Item) bool +} + +// +func less(x, y Item) bool { + if x == pinf { + return false + } + if x == ninf { + return true + } + return x.Less(y) +} + +// Inf returns an Item that is "bigger than" any other item, if sign is positive. +// Otherwise it returns an Item that is "smaller than" any other item. +func Inf(sign int) Item { + if sign == 0 { + panic("sign") + } + if sign > 0 { + return pinf + } + return ninf +} + +var ( + ninf = nInf{} + pinf = pInf{} +) + +type nInf struct{} + +func (nInf) Less(Item) bool { + return true +} + +type pInf struct{} + +func (pInf) Less(Item) bool { + return false +} + +// New() allocates a new tree +func New() *LLRB { + return &LLRB{} +} + +// SetRoot sets the root node of the tree. +// It is intended to be used by functions that deserialize the tree. +func (t *LLRB) SetRoot(r *Node) { + t.root = r +} + +// Root returns the root node of the tree. +// It is intended to be used by functions that serialize the tree. +func (t *LLRB) Root() *Node { + return t.root +} + +// Len returns the number of nodes in the tree. +func (t *LLRB) Len() int { return t.count } + +// Has returns true if the tree contains an element whose order is the same as that of key. +func (t *LLRB) Has(key Item) bool { + return t.Get(key) != nil +} + +// Get retrieves an element from the tree whose order is the same as that of key. +func (t *LLRB) Get(key Item) Item { + h := t.root + for h != nil { + switch { + case less(key, h.Item): + h = h.Left + case less(h.Item, key): + h = h.Right + default: + return h.Item + } + } + return nil +} + +// Min returns the minimum element in the tree. +func (t *LLRB) Min() Item { + h := t.root + if h == nil { + return nil + } + for h.Left != nil { + h = h.Left + } + return h.Item +} + +// Max returns the maximum element in the tree. +func (t *LLRB) Max() Item { + h := t.root + if h == nil { + return nil + } + for h.Right != nil { + h = h.Right + } + return h.Item +} + +func (t *LLRB) ReplaceOrInsertBulk(items ...Item) { + for _, i := range items { + t.ReplaceOrInsert(i) + } +} + +func (t *LLRB) InsertNoReplaceBulk(items ...Item) { + for _, i := range items { + t.InsertNoReplace(i) + } +} + +// ReplaceOrInsert inserts item into the tree. If an existing +// element has the same order, it is removed from the tree and returned. +func (t *LLRB) ReplaceOrInsert(item Item) Item { + if item == nil { + panic("inserting nil item") + } + var replaced Item + t.root, replaced = t.replaceOrInsert(t.root, item) + t.root.Black = true + if replaced == nil { + t.count++ + } + return replaced +} + +func (t *LLRB) replaceOrInsert(h *Node, item Item) (*Node, Item) { + if h == nil { + return newNode(item), nil + } + + h = walkDownRot23(h) + + var replaced Item + if less(item, h.Item) { // BUG + h.Left, replaced = t.replaceOrInsert(h.Left, item) + } else if less(h.Item, item) { + h.Right, replaced = t.replaceOrInsert(h.Right, item) + } else { + replaced, h.Item = h.Item, item + } + + h = walkUpRot23(h) + + return h, replaced +} + +// InsertNoReplace inserts item into the tree. If an existing +// element has the same order, both elements remain in the tree. +func (t *LLRB) InsertNoReplace(item Item) { + if item == nil { + panic("inserting nil item") + } + t.root = t.insertNoReplace(t.root, item) + t.root.Black = true + t.count++ +} + +func (t *LLRB) insertNoReplace(h *Node, item Item) *Node { + if h == nil { + return newNode(item) + } + + h = walkDownRot23(h) + + if less(item, h.Item) { + h.Left = t.insertNoReplace(h.Left, item) + } else { + h.Right = t.insertNoReplace(h.Right, item) + } + + return walkUpRot23(h) +} + +// Rotation driver routines for 2-3 algorithm + +func walkDownRot23(h *Node) *Node { return h } + +func walkUpRot23(h *Node) *Node { + if isRed(h.Right) && !isRed(h.Left) { + h = rotateLeft(h) + } + + if isRed(h.Left) && isRed(h.Left.Left) { + h = rotateRight(h) + } + + if isRed(h.Left) && isRed(h.Right) { + flip(h) + } + + return h +} + +// Rotation driver routines for 2-3-4 algorithm + +func walkDownRot234(h *Node) *Node { + if isRed(h.Left) && isRed(h.Right) { + flip(h) + } + + return h +} + +func walkUpRot234(h *Node) *Node { + if isRed(h.Right) && !isRed(h.Left) { + h = rotateLeft(h) + } + + if isRed(h.Left) && isRed(h.Left.Left) { + h = rotateRight(h) + } + + return h +} + +// DeleteMin deletes the minimum element in the tree and returns the +// deleted item or nil otherwise. +func (t *LLRB) DeleteMin() Item { + var deleted Item + t.root, deleted = deleteMin(t.root) + if t.root != nil { + t.root.Black = true + } + if deleted != nil { + t.count-- + } + return deleted +} + +// deleteMin code for LLRB 2-3 trees +func deleteMin(h *Node) (*Node, Item) { + if h == nil { + return nil, nil + } + if h.Left == nil { + return nil, h.Item + } + + if !isRed(h.Left) && !isRed(h.Left.Left) { + h = moveRedLeft(h) + } + + var deleted Item + h.Left, deleted = deleteMin(h.Left) + + return fixUp(h), deleted +} + +// DeleteMax deletes the maximum element in the tree and returns +// the deleted item or nil otherwise +func (t *LLRB) DeleteMax() Item { + var deleted Item + t.root, deleted = deleteMax(t.root) + if t.root != nil { + t.root.Black = true + } + if deleted != nil { + t.count-- + } + return deleted +} + +func deleteMax(h *Node) (*Node, Item) { + if h == nil { + return nil, nil + } + if isRed(h.Left) { + h = rotateRight(h) + } + if h.Right == nil { + return nil, h.Item + } + if !isRed(h.Right) && !isRed(h.Right.Left) { + h = moveRedRight(h) + } + var deleted Item + h.Right, deleted = deleteMax(h.Right) + + return fixUp(h), deleted +} + +// Delete deletes an item from the tree whose key equals key. +// The deleted item is return, otherwise nil is returned. +func (t *LLRB) Delete(key Item) Item { + var deleted Item + t.root, deleted = t.delete(t.root, key) + if t.root != nil { + t.root.Black = true + } + if deleted != nil { + t.count-- + } + return deleted +} + +func (t *LLRB) delete(h *Node, item Item) (*Node, Item) { + var deleted Item + if h == nil { + return nil, nil + } + if less(item, h.Item) { + if h.Left == nil { // item not present. Nothing to delete + return h, nil + } + if !isRed(h.Left) && !isRed(h.Left.Left) { + h = moveRedLeft(h) + } + h.Left, deleted = t.delete(h.Left, item) + } else { + if isRed(h.Left) { + h = rotateRight(h) + } + // If @item equals @h.Item and no right children at @h + if !less(h.Item, item) && h.Right == nil { + return nil, h.Item + } + // PETAR: Added 'h.Right != nil' below + if h.Right != nil && !isRed(h.Right) && !isRed(h.Right.Left) { + h = moveRedRight(h) + } + // If @item equals @h.Item, and (from above) 'h.Right != nil' + if !less(h.Item, item) { + var subDeleted Item + h.Right, subDeleted = deleteMin(h.Right) + if subDeleted == nil { + panic("logic") + } + deleted, h.Item = h.Item, subDeleted + } else { // Else, @item is bigger than @h.Item + h.Right, deleted = t.delete(h.Right, item) + } + } + + return fixUp(h), deleted +} + +// Internal node manipulation routines + +func newNode(item Item) *Node { return &Node{Item: item} } + +func isRed(h *Node) bool { + if h == nil { + return false + } + return !h.Black +} + +func rotateLeft(h *Node) *Node { + x := h.Right + if x.Black { + panic("rotating a black link") + } + h.Right = x.Left + x.Left = h + x.Black = h.Black + h.Black = false + return x +} + +func rotateRight(h *Node) *Node { + x := h.Left + if x.Black { + panic("rotating a black link") + } + h.Left = x.Right + x.Right = h + x.Black = h.Black + h.Black = false + return x +} + +// REQUIRE: Left and Right children must be present +func flip(h *Node) { + h.Black = !h.Black + h.Left.Black = !h.Left.Black + h.Right.Black = !h.Right.Black +} + +// REQUIRE: Left and Right children must be present +func moveRedLeft(h *Node) *Node { + flip(h) + if isRed(h.Right.Left) { + h.Right = rotateRight(h.Right) + h = rotateLeft(h) + flip(h) + } + return h +} + +// REQUIRE: Left and Right children must be present +func moveRedRight(h *Node) *Node { + flip(h) + if isRed(h.Left.Left) { + h = rotateRight(h) + flip(h) + } + return h +} + +func fixUp(h *Node) *Node { + if isRed(h.Right) { + h = rotateLeft(h) + } + + if isRed(h.Left) && isRed(h.Left.Left) { + h = rotateRight(h) + } + + if isRed(h.Left) && isRed(h.Right) { + flip(h) + } + + return h +} diff --git a/vendor/github.com/petar/GoLLRB/llrb/util.go b/vendor/github.com/petar/GoLLRB/llrb/util.go new file mode 100644 index 000000000..63dbdb2df --- /dev/null +++ b/vendor/github.com/petar/GoLLRB/llrb/util.go @@ -0,0 +1,17 @@ +// Copyright 2010 Petar Maymounkov. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package llrb + +type Int int + +func (x Int) Less(than Item) bool { + return x < than.(Int) +} + +type String string + +func (x String) Less(than Item) bool { + return x < than.(String) +} diff --git a/vendor/github.com/pingcap/go-hbase/LICENSE b/vendor/github.com/pingcap/go-hbase/LICENSE new file mode 100644 index 000000000..c86be72a0 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/LICENSE @@ -0,0 +1,50 @@ +The MIT License (MIT) + +Copyright (c) 2015 dongxu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Copyright (c) 2014 Bryan Peterson. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/pingcap/go-hbase/README.md b/vendor/github.com/pingcap/go-hbase/README.md new file mode 100644 index 000000000..1cfc1837f --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/README.md @@ -0,0 +1,14 @@ +#go-hbase + +[![Build Status](https://travis-ci.org/pingcap/go-hbase.svg)](https://travis-ci.org/pingcap/go-hbase) + +Derived from [Lazyshot/go-hbase](https://github.com/Lazyshot/go-hbase). Add some new features and fix some bugs. + +## New Features + +1. Coprocessor EndPoint call. +2. Goroutine-safe. +3. Admin commands: Create/Disable/Drop table. +4. Pipelined RPC. + +Support HBase >= 0.98.5 diff --git a/vendor/github.com/pingcap/go-hbase/action.go b/vendor/github.com/pingcap/go-hbase/action.go new file mode 100644 index 000000000..52001bdad --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/action.go @@ -0,0 +1,101 @@ +package hbase + +import ( + pb "github.com/golang/protobuf/proto" + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/go-hbase/proto" +) + +type action interface { + ToProto() pb.Message +} + +func (c *client) innerCall(table, row []byte, action action, useCache bool) (*call, error) { + region, err := c.LocateRegion(table, row, useCache) + if err != nil { + return nil, errors.Trace(err) + } + + conn, err := c.getClientConn(region.Server) + if err != nil { + return nil, errors.Trace(err) + } + + regionSpecifier := &proto.RegionSpecifier{ + Type: proto.RegionSpecifier_REGION_NAME.Enum(), + Value: []byte(region.Name), + } + + var cl *call + switch a := action.(type) { + case *Get: + cl = newCall(&proto.GetRequest{ + Region: regionSpecifier, + Get: a.ToProto().(*proto.Get), + }) + case *Put, *Delete: + cl = newCall(&proto.MutateRequest{ + Region: regionSpecifier, + Mutation: a.ToProto().(*proto.MutationProto), + }) + + case *CoprocessorServiceCall: + cl = newCall(&proto.CoprocessorServiceRequest{ + Region: regionSpecifier, + Call: a.ToProto().(*proto.CoprocessorServiceCall), + }) + default: + return nil, errors.Errorf("Unknown action - %T - %v", action, action) + } + + err = conn.call(cl) + if err != nil { + // If failed, remove bad server conn cache. + cachedKey := cachedConnKey(region.Server, ClientService) + delete(c.cachedConns, cachedKey) + return nil, errors.Trace(err) + } + + return cl, nil +} + +func (c *client) innerDo(table, row []byte, action action, useCache bool) (pb.Message, error) { + // Try to create and send a new resuqest call. + cl, err := c.innerCall(table, row, action, useCache) + if err != nil { + log.Warnf("inner call failed - %v", errors.ErrorStack(err)) + return nil, errors.Trace(err) + } + + // Wait and receive the result. + return <-cl.responseCh, nil +} + +func (c *client) do(table, row []byte, action action, useCache bool) (pb.Message, error) { + var ( + result pb.Message + err error + ) + +LOOP: + for i := 0; i < c.maxRetries; i++ { + result, err = c.innerDo(table, row, action, useCache) + if err == nil { + switch r := result.(type) { + case *exception: + err = errors.New(r.msg) + // If get an execption response, clean old region cache. + c.CleanRegionCache(table) + default: + break LOOP + } + } + + useCache = false + log.Warnf("Retrying action for the %d time(s), error - %v", i+1, errors.ErrorStack(err)) + retrySleep(i + 1) + } + + return result, errors.Trace(err) +} diff --git a/vendor/github.com/pingcap/go-hbase/admin.go b/vendor/github.com/pingcap/go-hbase/admin.go new file mode 100644 index 000000000..d7c018d31 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/admin.go @@ -0,0 +1,340 @@ +package hbase + +import ( + "sort" + "strconv" + "strings" + "time" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/go-hbase/proto" +) + +const defaultNS = "default" + +type TableName struct { + namespace string + name string +} + +func newTableNameWithDefaultNS(tblName string) TableName { + return TableName{ + namespace: defaultNS, + name: tblName, + } +} + +type TableDescriptor struct { + name TableName + attrs map[string][]byte + cfs []*ColumnFamilyDescriptor +} + +func NewTableDesciptor(tblName string) *TableDescriptor { + ret := &TableDescriptor{ + name: newTableNameWithDefaultNS(tblName), + attrs: map[string][]byte{}, + } + ret.AddAddr("IS_META", "false") + return ret +} + +func (c *TableDescriptor) AddAddr(attrName string, val string) { + c.attrs[attrName] = []byte(val) +} + +func (t *TableDescriptor) AddColumnDesc(cf *ColumnFamilyDescriptor) { + for _, c := range t.cfs { + if c.name == cf.name { + return + } + } + t.cfs = append(t.cfs, cf) +} + +type ColumnFamilyDescriptor struct { + name string + attrs map[string][]byte +} + +func (c *ColumnFamilyDescriptor) AddAttr(attrName string, val string) { + c.attrs[attrName] = []byte(val) +} + +// Themis will use VERSIONS=1 for some hook. +func NewColumnFamilyDescriptor(name string) *ColumnFamilyDescriptor { + return newColumnFamilyDescriptor(name, 1) +} + +func newColumnFamilyDescriptor(name string, versionsNum int) *ColumnFamilyDescriptor { + versions := strconv.Itoa(versionsNum) + + ret := &ColumnFamilyDescriptor{ + name: name, + attrs: make(map[string][]byte), + } + + // add default attrs + ret.AddAttr("DATA_BLOCK_ENCODING", "NONE") + ret.AddAttr("BLOOMFILTER", "ROW") + ret.AddAttr("REPLICATION_SCOPE", "0") + ret.AddAttr("COMPRESSION", "NONE") + ret.AddAttr("VERSIONS", versions) + ret.AddAttr("TTL", "2147483647") // 1 << 31 + ret.AddAttr("MIN_VERSIONS", "0") + ret.AddAttr("KEEP_DELETED_CELLS", "false") + ret.AddAttr("BLOCKSIZE", "65536") + ret.AddAttr("IN_MEMORY", "false") + ret.AddAttr("BLOCKCACHE", "true") + return ret +} + +func getPauseTime(retry int) int64 { + if retry >= len(retryPauseTime) { + retry = len(retryPauseTime) - 1 + } + if retry < 0 { + retry = 0 + } + return retryPauseTime[retry] * defaultRetryWaitMs +} + +func (c *client) CreateTable(t *TableDescriptor, splits [][]byte) error { + req := &proto.CreateTableRequest{} + schema := &proto.TableSchema{} + + sort.Sort(BytesSlice(splits)) + + schema.TableName = &proto.TableName{ + Qualifier: []byte(t.name.name), + Namespace: []byte(t.name.namespace), + } + + for k, v := range t.attrs { + schema.Attributes = append(schema.Attributes, &proto.BytesBytesPair{ + First: []byte(k), + Second: []byte(v), + }) + } + + for _, c := range t.cfs { + cf := &proto.ColumnFamilySchema{ + Name: []byte(c.name), + } + for k, v := range c.attrs { + cf.Attributes = append(cf.Attributes, &proto.BytesBytesPair{ + First: []byte(k), + Second: []byte(v), + }) + } + schema.ColumnFamilies = append(schema.ColumnFamilies, cf) + } + + req.TableSchema = schema + req.SplitKeys = splits + + ch, err := c.adminAction(req) + if err != nil { + return errors.Trace(err) + } + + resp := <-ch + switch r := resp.(type) { + case *exception: + return errors.New(r.msg) + } + + // wait and check + for retry := 0; retry < defaultMaxActionRetries*retryLongerMultiplier; retry++ { + regCnt := 0 + numRegs := len(splits) + 1 + err = c.metaScan(t.name.name, func(r *RegionInfo) (bool, error) { + if !(r.Offline || r.Split) && len(r.Server) > 0 && r.TableName == t.name.name { + regCnt++ + } + return true, nil + }) + if err != nil { + return errors.Trace(err) + } + + if regCnt == numRegs { + return nil + } + log.Warnf("Retrying create table for the %d time(s)", retry+1) + time.Sleep(time.Duration(getPauseTime(retry)) * time.Millisecond) + } + return errors.New("create table timeout") +} + +func (c *client) DisableTable(tblName string) error { + req := &proto.DisableTableRequest{ + TableName: &proto.TableName{ + Qualifier: []byte(tblName), + Namespace: []byte(defaultNS), + }, + } + + ch, err := c.adminAction(req) + if err != nil { + return errors.Trace(err) + } + + resp := <-ch + switch r := resp.(type) { + case *exception: + return errors.New(r.msg) + } + + return nil +} + +func (c *client) EnableTable(tblName string) error { + req := &proto.EnableTableRequest{ + TableName: &proto.TableName{ + Qualifier: []byte(tblName), + Namespace: []byte(defaultNS), + }, + } + + ch, err := c.adminAction(req) + if err != nil { + return errors.Trace(err) + } + + resp := <-ch + switch r := resp.(type) { + case *exception: + return errors.New(r.msg) + } + + return nil +} + +func (c *client) DropTable(tblName string) error { + req := &proto.DeleteTableRequest{ + TableName: &proto.TableName{ + Qualifier: []byte(tblName), + Namespace: []byte(defaultNS), + }, + } + + ch, err := c.adminAction(req) + if err != nil { + return errors.Trace(err) + } + + resp := <-ch + switch r := resp.(type) { + case *exception: + return errors.New(r.msg) + } + + return nil +} + +func (c *client) metaScan(tbl string, fn func(r *RegionInfo) (bool, error)) error { + scan := NewScan(metaTableName, 0, c) + defer scan.Close() + + scan.StartRow = []byte(tbl) + scan.StopRow = nextKey([]byte(tbl)) + + for { + r := scan.Next() + if r == nil || scan.Closed() { + break + } + + region, err := c.parseRegion(r) + if err != nil { + return errors.Trace(err) + } + + if more, err := fn(region); !more || err != nil { + return errors.Trace(err) + } + } + + return nil +} + +func (c *client) TableExists(tbl string) (bool, error) { + found := false + err := c.metaScan(tbl, func(region *RegionInfo) (bool, error) { + if region.TableName == tbl { + found = true + return false, nil + } + return true, nil + }) + if err != nil { + return false, errors.Trace(err) + } + + return found, nil +} + +// Split splits region. +// tblOrRegion table name or region(,,.). +// splitPoint which is a key, leave "" if want to split each region automatically. +func (c *client) Split(tblOrRegion, splitPoint string) error { + // Extract table name from supposing regionName. + tbls := strings.SplitN(tblOrRegion, ",", 2) + tbl := tbls[0] + found := false + var foundRegion *RegionInfo + err := c.metaScan(tbl, func(region *RegionInfo) (bool, error) { + if region != nil && region.Name == tblOrRegion { + found = true + foundRegion = region + return false, nil + } + return true, nil + }) + if err != nil { + return errors.Trace(err) + } + + // This is a region name, split it directly. + if found { + return c.split(foundRegion, []byte(splitPoint)) + } + + // This is a table name. + tbl = tblOrRegion + regions, err := c.GetRegions([]byte(tbl), false) + if err != nil { + return errors.Trace(err) + } + // Split each region. + for _, region := range regions { + err := c.split(region, []byte(splitPoint)) + if err != nil { + return errors.Trace(err) + } + } + return nil +} + +func (c *client) split(region *RegionInfo, splitPoint []byte) error { + // Not in this region, skip it. + if len(splitPoint) > 0 && !findKey(region, splitPoint) { + return nil + } + c.CleanRegionCache([]byte(region.TableName)) + rs := NewRegionSpecifier(region.Name) + req := &proto.SplitRegionRequest{ + Region: rs, + } + if len(splitPoint) > 0 { + req.SplitPoint = splitPoint + } + // Empty response. + _, err := c.regionAction(region.Server, req) + if err != nil { + return errors.Trace(err) + } + return nil +} diff --git a/vendor/github.com/pingcap/go-hbase/call.go b/vendor/github.com/pingcap/go-hbase/call.go new file mode 100644 index 000000000..f04b1ee86 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/call.go @@ -0,0 +1,100 @@ +package hbase + +import ( + "strings" + + pb "github.com/golang/protobuf/proto" + "github.com/pingcap/go-hbase/proto" +) + +type call struct { + id uint32 + methodName string + request pb.Message + responseBuffer pb.Message + responseCh chan pb.Message +} + +type exception struct { + msg string +} + +func isNotInRegionError(err error) bool { + return strings.Contains(err.Error(), "org.apache.hadoop.hbase.NotServingRegionException") +} +func isUnknownScannerError(err error) bool { + return strings.Contains(err.Error(), "org.apache.hadoop.hbase.UnknownScannerException") +} + +func (m *exception) Reset() { *m = exception{} } +func (m *exception) String() string { return m.msg } +func (m *exception) ProtoMessage() {} + +func newCall(request pb.Message) *call { + var responseBuffer pb.Message + var methodName string + + switch request.(type) { + case *proto.GetRequest: + responseBuffer = &proto.GetResponse{} + methodName = "Get" + case *proto.MutateRequest: + responseBuffer = &proto.MutateResponse{} + methodName = "Mutate" + case *proto.ScanRequest: + responseBuffer = &proto.ScanResponse{} + methodName = "Scan" + case *proto.GetTableDescriptorsRequest: + responseBuffer = &proto.GetTableDescriptorsResponse{} + methodName = "GetTableDescriptors" + case *proto.CoprocessorServiceRequest: + responseBuffer = &proto.CoprocessorServiceResponse{} + methodName = "ExecService" + case *proto.CreateTableRequest: + responseBuffer = &proto.CreateTableResponse{} + methodName = "CreateTable" + case *proto.DisableTableRequest: + responseBuffer = &proto.DisableTableResponse{} + methodName = "DisableTable" + case *proto.EnableTableRequest: + responseBuffer = &proto.EnableTableResponse{} + methodName = "EnableTable" + case *proto.DeleteTableRequest: + responseBuffer = &proto.DeleteTableResponse{} + methodName = "DeleteTable" + case *proto.MultiRequest: + responseBuffer = &proto.MultiResponse{} + methodName = "Multi" + case *proto.SplitRegionRequest: + responseBuffer = &proto.SplitRegionResponse{} + methodName = "SplitRegion" + } + + return &call{ + methodName: methodName, + request: request, + responseBuffer: responseBuffer, + responseCh: make(chan pb.Message, 1), + } +} + +func (c *call) complete(err error, response []byte) { + defer close(c.responseCh) + + if err != nil { + c.responseCh <- &exception{ + msg: err.Error(), + } + return + } + + err = pb.Unmarshal(response, c.responseBuffer) + if err != nil { + c.responseCh <- &exception{ + msg: err.Error(), + } + return + } + + c.responseCh <- c.responseBuffer +} diff --git a/vendor/github.com/pingcap/go-hbase/client.go b/vendor/github.com/pingcap/go-hbase/client.go new file mode 100644 index 000000000..8aabf69ae --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/client.go @@ -0,0 +1,454 @@ +package hbase + +import ( + "bytes" + "crypto/md5" + "encoding/binary" + "encoding/hex" + "fmt" + "sync" + "time" + + pb "github.com/golang/protobuf/proto" + "github.com/juju/errors" + "github.com/ngaut/go-zookeeper/zk" + "github.com/ngaut/log" + "github.com/pingcap/go-hbase/proto" +) + +const ( + zkRootRegionPath = "/meta-region-server" + zkMasterAddrPath = "/master" + + magicHeadByte = 0xff + magicHeadSize = 1 + idLengthSize = 4 + md5HexSize = 32 + servernameSeparator = "," + rpcTimeout = 30000 + pingTimeout = 30000 + callTimeout = 5000 + defaultMaxActionRetries = 3 + // Some operations can take a long time such as disable of big table. + // numRetries is for 'normal' stuff... Multiply by this factor when + // want to wait a long time. + retryLongerMultiplier = 31 + socketDefaultRetryWaitMs = 200 + defaultRetryWaitMs = 100 + // always >= any unix timestamp(hbase version) + beyondMaxTimestamp = "99999999999999" +) + +var ( + hbaseHeaderBytes []byte = []byte("HBas") + metaTableName []byte = []byte("hbase:meta") + metaRegionName []byte = []byte("hbase:meta,,1") +) + +var retryPauseTime = []int64{1, 2, 3, 5, 10, 20, 40, 100, 100, 100, 100, 200, 200} + +type RegionInfo struct { + Server string + StartKey []byte + EndKey []byte + Name string + Ts string + TableNamespace string + TableName string + Offline bool + Split bool +} + +type tableInfo struct { + tableName string + families []string +} + +// export client interface +type HBaseClient interface { + Get(tbl string, g *Get) (*ResultRow, error) + Put(tbl string, p *Put) (bool, error) + Delete(tbl string, d *Delete) (bool, error) + TableExists(tbl string) (bool, error) + DropTable(t string) error + DisableTable(t string) error + EnableTable(t string) error + CreateTable(t *TableDescriptor, splits [][]byte) error + ServiceCall(table string, call *CoprocessorServiceCall) (*proto.CoprocessorServiceResponse, error) + LocateRegion(table, row []byte, useCache bool) (*RegionInfo, error) + GetRegions(table []byte, useCache bool) ([]*RegionInfo, error) + Split(tblOrRegion, splitPoint string) error + CleanRegionCache(table []byte) + CleanAllRegionCache() + Close() error +} + +// hbase client implemetation +var _ HBaseClient = (*client)(nil) + +type client struct { + mu sync.RWMutex // for read/update region info + zkClient *zk.Conn + zkHosts []string + zkRoot string + prefetched map[string]bool + cachedConns map[string]*connection + cachedRegionInfo map[string]map[string]*RegionInfo + maxRetries int + rootServerName *proto.ServerName + masterServerName *proto.ServerName +} + +func serverNameToAddr(server *proto.ServerName) string { + return fmt.Sprintf("%s:%d", server.GetHostName(), server.GetPort()) +} + +func cachedConnKey(addr string, srvType ServiceType) string { + return fmt.Sprintf("%s|%d", addr, srvType) +} + +func NewClient(zkHosts []string, zkRoot string) (HBaseClient, error) { + cl := &client{ + zkHosts: zkHosts, + zkRoot: zkRoot, + cachedConns: make(map[string]*connection), + cachedRegionInfo: make(map[string]map[string]*RegionInfo), + prefetched: make(map[string]bool), + maxRetries: defaultMaxActionRetries, + } + + err := cl.init() + if err != nil { + return nil, errors.Trace(err) + } + + return cl, nil +} + +func (c *client) decodeMeta(data []byte) (*proto.ServerName, error) { + if data[0] != magicHeadByte { + return nil, errors.New("unknown packet") + } + + var n int32 + err := binary.Read(bytes.NewBuffer(data[1:]), binary.BigEndian, &n) + if err != nil { + return nil, errors.Trace(err) + } + + dataOffset := magicHeadSize + idLengthSize + int(n) + data = data[(dataOffset + 4):] + + var mrs proto.MetaRegionServer + err = pb.Unmarshal(data, &mrs) + if err != nil { + return nil, errors.Trace(err) + } + + return mrs.GetServer(), nil +} + +// init and get root region server addr and master addr +func (c *client) init() error { + zkclient, _, err := zk.Connect(c.zkHosts, time.Second*30) + if err != nil { + return errors.Trace(err) + } + c.zkClient = zkclient + + res, _, _, err := c.zkClient.GetW(c.zkRoot + zkRootRegionPath) + if err != nil { + return errors.Trace(err) + } + + c.rootServerName, err = c.decodeMeta(res) + if err != nil { + return errors.Trace(err) + } + + log.Debug("connect root region server...", c.rootServerName) + serverAddr := serverNameToAddr(c.rootServerName) + conn, err := newConnection(serverAddr, ClientService) + if err != nil { + return errors.Trace(err) + } + + // Set buffered regionserver conn. + cachedKey := cachedConnKey(serverAddr, ClientService) + c.cachedConns[cachedKey] = conn + + res, _, _, err = c.zkClient.GetW(c.zkRoot + zkMasterAddrPath) + if err != nil { + return errors.Trace(err) + } + + c.masterServerName, err = c.decodeMeta(res) + if err != nil { + return errors.Trace(err) + } + + return nil +} + +// get connection +func (c *client) getConn(addr string, srvType ServiceType) (*connection, error) { + connKey := cachedConnKey(addr, srvType) + c.mu.RLock() + conn, ok := c.cachedConns[connKey] + c.mu.RUnlock() + + if ok { + return conn, nil + } + + var err error + conn, err = newConnection(addr, srvType) + if err != nil { + return nil, errors.Errorf("create new connection failed - %v", errors.ErrorStack(err)) + } + c.mu.Lock() + c.cachedConns[connKey] = conn + c.mu.Unlock() + return conn, nil +} + +func (c *client) getAdminConn(addr string) (*connection, error) { + return c.getConn(addr, AdminService) +} + +func (c *client) getClientConn(addr string) (*connection, error) { + return c.getConn(addr, ClientService) +} + +func (c *client) getMasterConn() (*connection, error) { + return c.getConn(serverNameToAddr(c.masterServerName), MasterService) +} + +func (c *client) doAction(conn *connection, req pb.Message) (chan pb.Message, error) { + cl := newCall(req) + err := conn.call(cl) + if err != nil { + return nil, errors.Trace(err) + } + + return cl.responseCh, nil +} + +func (c *client) adminAction(req pb.Message) (chan pb.Message, error) { + conn, err := c.getMasterConn() + if err != nil { + return nil, errors.Trace(err) + } + return c.doAction(conn, req) +} + +func (c *client) regionAction(addr string, req pb.Message) (chan pb.Message, error) { + conn, err := c.getAdminConn(addr) + if err != nil { + return nil, errors.Trace(err) + } + return c.doAction(conn, req) +} + +// http://stackoverflow.com/questions/27602013/correct-way-to-get-region-name-by-using-hbase-api +func (c *client) createRegionName(table, startKey []byte, id string, newFormat bool) []byte { + if len(startKey) == 0 { + startKey = make([]byte, 1) + } + + b := bytes.Join([][]byte{table, startKey, []byte(id)}, []byte{','}) + + if newFormat { + m := md5.Sum(b) + mhex := []byte(hex.EncodeToString(m[:])) + b = append(bytes.Join([][]byte{b, mhex}, []byte{'.'}), '.') + } + + return b +} + +func (c *client) parseRegion(rr *ResultRow) (*RegionInfo, error) { + regionInfoCol, ok := rr.Columns["info:regioninfo"] + if !ok { + return nil, errors.Errorf("Unable to parse region location (no regioninfo column): %#v", rr) + } + + offset := bytes.Index(regionInfoCol.Value, []byte("PBUF")) + 4 + regionInfoBytes := regionInfoCol.Value[offset:] + + var info proto.RegionInfo + err := pb.Unmarshal(regionInfoBytes, &info) + if err != nil { + return nil, errors.Errorf("Unable to parse region location: %#v", err) + } + + ri := &RegionInfo{ + StartKey: info.GetStartKey(), + EndKey: info.GetEndKey(), + Name: bytes.NewBuffer(rr.Row).String(), + TableNamespace: string(info.GetTableName().GetNamespace()), + TableName: string(info.GetTableName().GetQualifier()), + Offline: info.GetOffline(), + Split: info.GetSplit(), + } + + if v, ok := rr.Columns["info:server"]; ok { + ri.Server = string(v.Value) + } + + return ri, nil +} + +func (c *client) getMetaRegion() *RegionInfo { + return &RegionInfo{ + StartKey: []byte{}, + EndKey: []byte{}, + Name: string(metaRegionName), + Server: serverNameToAddr(c.rootServerName), + } +} + +func (c *client) getCachedLocation(table, row []byte) *RegionInfo { + c.mu.RLock() + defer c.mu.RUnlock() + + tableStr := string(table) + if regions, ok := c.cachedRegionInfo[tableStr]; ok { + for _, region := range regions { + if (len(region.EndKey) == 0 || + bytes.Compare(row, region.EndKey) < 0) && + (len(region.StartKey) == 0 || + bytes.Compare(row, region.StartKey) >= 0) { + return region + } + } + } + + return nil +} + +func (c *client) updateRegionCache(table []byte, region *RegionInfo) { + c.mu.Lock() + defer c.mu.Unlock() + + tableStr := string(table) + if _, ok := c.cachedRegionInfo[tableStr]; !ok { + c.cachedRegionInfo[tableStr] = make(map[string]*RegionInfo) + } + c.cachedRegionInfo[tableStr][region.Name] = region +} + +func (c *client) CleanRegionCache(table []byte) { + c.mu.Lock() + defer c.mu.Unlock() + delete(c.cachedRegionInfo, string(table)) +} + +func (c *client) CleanAllRegionCache() { + c.mu.Lock() + defer c.mu.Unlock() + c.cachedRegionInfo = map[string]map[string]*RegionInfo{} +} + +func (c *client) LocateRegion(table, row []byte, useCache bool) (*RegionInfo, error) { + // If user wants to locate metaregion, just return it. + if bytes.Equal(table, metaTableName) { + return c.getMetaRegion(), nil + } + + // Try to get location from cache. + if useCache { + if r := c.getCachedLocation(table, row); r != nil { + return r, nil + } + } + + // If cache missed or not using cache, try to get and update region info. + metaRegion := c.getMetaRegion() + conn, err := c.getClientConn(metaRegion.Server) + if err != nil { + return nil, errors.Trace(err) + } + + regionRow := c.createRegionName(table, row, beyondMaxTimestamp, true) + + call := newCall(&proto.GetRequest{ + Region: &proto.RegionSpecifier{ + Type: proto.RegionSpecifier_REGION_NAME.Enum(), + Value: metaRegionName, + }, + Get: &proto.Get{ + Row: regionRow, + Column: []*proto.Column{&proto.Column{ + Family: []byte("info"), + }}, + ClosestRowBefore: pb.Bool(true), + }, + }) + + err = conn.call(call) + if err != nil { + return nil, errors.Trace(err) + } + + response := <-call.responseCh + + switch r := response.(type) { + case *proto.GetResponse: + res := r.GetResult() + if res == nil { + return nil, errors.Errorf("Empty region: [table=%s] [row=%q] [region_row=%q]", table, row, regionRow) + } + + rr := NewResultRow(res) + region, err := c.parseRegion(rr) + if err != nil { + return nil, errors.Trace(err) + } + + c.updateRegionCache(table, region) + return region, nil + case *exception: + return nil, errors.New(r.msg) + default: + log.Warnf("Unknown response - %T - %v", r, r) + } + + return nil, errors.Errorf("Couldn't find the region: [table=%s] [row=%q] [region_row=%q]", table, row, regionRow) +} + +func (c *client) GetRegions(table []byte, useCache bool) ([]*RegionInfo, error) { + var regions []*RegionInfo + startKey := []byte("") + // Get first region. + region, err := c.LocateRegion(table, []byte(startKey), useCache) + if err != nil { + return nil, errors.Errorf("couldn't find any region: [table=%s] [useCache=%t]", table, useCache) + } + regions = append(regions, region) + startKey = region.EndKey + for len(startKey) > 0 { + region, err = c.LocateRegion(table, []byte(startKey), useCache) + if err != nil { + return nil, errors.Trace(err) + } + regions = append(regions, region) + startKey = region.EndKey + } + return regions, nil +} + +func (c *client) Close() error { + if c.zkClient != nil { + c.zkClient.Close() + } + + for _, conn := range c.cachedConns { + err := conn.close() + if err != nil { + return errors.Trace(err) + } + } + + return nil +} diff --git a/vendor/github.com/pingcap/go-hbase/client_ops.go b/vendor/github.com/pingcap/go-hbase/client_ops.go new file mode 100644 index 000000000..00371a24b --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/client_ops.go @@ -0,0 +1,67 @@ +package hbase + +import ( + "github.com/juju/errors" + "github.com/pingcap/go-hbase/proto" +) + +func (c *client) Delete(table string, del *Delete) (bool, error) { + response, err := c.do([]byte(table), del.GetRow(), del, true) + if err != nil { + return false, errors.Trace(err) + } + + switch r := response.(type) { + case *proto.MutateResponse: + return r.GetProcessed(), nil + } + return false, errors.Errorf("Invalid response seen [response: %#v]", response) +} + +func (c *client) Get(table string, get *Get) (*ResultRow, error) { + response, err := c.do([]byte(table), get.GetRow(), get, true) + if err != nil { + return nil, errors.Trace(err) + } + + switch r := response.(type) { + case *proto.GetResponse: + res := r.GetResult() + if res == nil { + return nil, errors.Errorf("Empty response: [table=%s] [row=%q]", table, get.GetRow()) + } + + return NewResultRow(res), nil + case *exception: + return nil, errors.New(r.msg) + } + return nil, errors.Errorf("Invalid response seen [response: %#v]", response) +} + +func (c *client) Put(table string, put *Put) (bool, error) { + response, err := c.do([]byte(table), put.GetRow(), put, true) + if err != nil { + return false, errors.Trace(err) + } + + switch r := response.(type) { + case *proto.MutateResponse: + return r.GetProcessed(), nil + } + return false, errors.Errorf("Invalid response seen [response: %#v]", response) +} + +func (c *client) ServiceCall(table string, call *CoprocessorServiceCall) (*proto.CoprocessorServiceResponse, error) { + response, err := c.do([]byte(table), call.Row, call, true) + if err != nil { + return nil, errors.Trace(err) + } + + switch r := response.(type) { + case *proto.CoprocessorServiceResponse: + return r, nil + case *exception: + return nil, errors.New(r.msg) + } + return nil, errors.Errorf("Invalid response seen [response: %#v]", response) +} diff --git a/vendor/github.com/pingcap/go-hbase/column.go b/vendor/github.com/pingcap/go-hbase/column.go new file mode 100644 index 000000000..afa6ffd25 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/column.go @@ -0,0 +1,177 @@ +package hbase + +import ( + "bytes" + "fmt" + "io" + + "github.com/juju/errors" + "github.com/pingcap/go-hbase/iohelper" +) + +type Column struct { + Family []byte + Qual []byte +} + +func NewColumn(family, qual []byte) *Column { + return &Column{ + Family: family, + Qual: qual, + } +} + +func encode(parts ...[]byte) ([]byte, error) { + buf := &bytes.Buffer{} + for _, p := range parts { + err := iohelper.WriteVarBytes(buf, p) + if err != nil { + return nil, errors.Trace(err) + } + } + return buf.Bytes(), nil +} + +func decode(encoded []byte) ([][]byte, error) { + var ret [][]byte + buf := bytes.NewBuffer(encoded) + for { + b, err := iohelper.ReadVarBytes(buf) + if len(b) == 0 || (err != nil && ErrorEqual(err, io.EOF)) { + break + } + ret = append(ret, b) + } + return ret, nil +} + +func (c *Column) Write(w io.Writer) error { + err := iohelper.WriteVarBytes(w, c.Family) + if err != nil { + return errors.Trace(err) + } + + err = iohelper.WriteVarBytes(w, c.Qual) + if err != nil { + return errors.Trace(err) + } + + return nil +} + +func (c *Column) String() string { + b, err := encode(c.Family, c.Qual) + if err != nil { + return fmt.Sprintf("invalid column - %v", err) + } + return string(b) +} + +func (c *Column) ParseFromString(s string) error { + pairs, err := decode([]byte(s)) + if err != nil { + return errors.Trace(err) + } + + c.Family = pairs[0] + c.Qual = pairs[1] + return nil +} + +type ColumnCoordinate struct { + Table []byte + Row []byte + Column +} + +func NewColumnCoordinate(table, row, family, qual []byte) *ColumnCoordinate { + return &ColumnCoordinate{ + Table: table, + Row: row, + Column: Column{ + Family: family, + Qual: qual, + }, + } +} + +func (c *ColumnCoordinate) Write(w io.Writer) error { + err := iohelper.WriteVarBytes(w, c.Table) + if err != nil { + return errors.Trace(err) + } + + err = iohelper.WriteVarBytes(w, c.Row) + if err != nil { + return errors.Trace(err) + } + + err = c.Column.Write(w) + if err != nil { + return errors.Trace(err) + } + + return nil +} + +func (c *ColumnCoordinate) Equal(a *ColumnCoordinate) bool { + return bytes.Compare(c.Table, a.Table) == 0 && + bytes.Compare(c.Row, a.Row) == 0 && + bytes.Compare(c.Family, a.Family) == 0 && + bytes.Compare(c.Qual, a.Qual) == 0 +} + +func (c *ColumnCoordinate) String() string { + b, err := encode(c.Table, c.Row, c.Family, c.Qual) + if err != nil { + return fmt.Sprintf("invalid column coordinate - %v", err) + } + return string(b) +} + +func (c *ColumnCoordinate) ParseFromString(s string) error { + pairs, err := decode([]byte(s)) + if err != nil { + return errors.Trace(err) + } + + c.Table = pairs[0] + c.Row = pairs[1] + c.Family = pairs[2] + c.Qual = pairs[3] + return nil +} + +func (c *ColumnCoordinate) ParseField(b iohelper.ByteMultiReader) error { + table, err := iohelper.ReadVarBytes(b) + if err != nil { + return errors.Trace(err) + } + c.Table = table + + row, err := iohelper.ReadVarBytes(b) + if err != nil { + return errors.Trace(err) + } + c.Row = row + + family, err := iohelper.ReadVarBytes(b) + if err != nil { + return errors.Trace(err) + } + c.Family = family + + qual, err := iohelper.ReadVarBytes(b) + if err != nil { + return errors.Trace(err) + } + c.Qual = qual + return nil +} + +func (c *ColumnCoordinate) GetColumn() *Column { + return &Column{ + Family: c.Family, + Qual: c.Qual, + } +} diff --git a/vendor/github.com/pingcap/go-hbase/conn.go b/vendor/github.com/pingcap/go-hbase/conn.go new file mode 100644 index 000000000..f3e03e11a --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/conn.go @@ -0,0 +1,291 @@ +package hbase + +import ( + "bufio" + "bytes" + "io" + "net" + "strings" + "sync" + + pb "github.com/golang/protobuf/proto" + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/go-hbase/iohelper" + "github.com/pingcap/go-hbase/proto" +) + +type ServiceType byte + +const ( + MasterMonitorService = iota + 1 + MasterService + MasterAdminService + AdminService + ClientService + RegionServerStatusService +) + +// convert above const to protobuf string +var ServiceString = map[ServiceType]string{ + MasterMonitorService: "MasterMonitorService", + MasterService: "MasterService", + MasterAdminService: "MasterAdminService", + AdminService: "AdminService", + ClientService: "ClientService", + RegionServerStatusService: "RegionServerStatusService", +} + +type idGenerator struct { + n int + mu *sync.RWMutex +} + +func newIdGenerator() *idGenerator { + return &idGenerator{ + n: 0, + mu: &sync.RWMutex{}, + } +} + +func (a *idGenerator) get() int { + a.mu.RLock() + v := a.n + a.mu.RUnlock() + return v +} + +func (a *idGenerator) incrAndGet() int { + a.mu.Lock() + a.n++ + v := a.n + a.mu.Unlock() + return v +} + +type connection struct { + mu sync.Mutex + addr string + conn net.Conn + bw *bufio.Writer + idGen *idGenerator + serviceType ServiceType + in chan *iohelper.PbBuffer + ongoingCalls map[int]*call +} + +func processMessage(msg []byte) ([][]byte, error) { + buf := pb.NewBuffer(msg) + payloads := make([][]byte, 0) + + // Question: why can we ignore this error? + for { + hbytes, err := buf.DecodeRawBytes(true) + if err != nil { + // Check whether error is `unexpected EOF`. + if strings.Contains(err.Error(), "unexpected EOF") { + break + } + + log.Errorf("Decode raw bytes error - %v", errors.ErrorStack(err)) + return nil, errors.Trace(err) + } + + payloads = append(payloads, hbytes) + } + + return payloads, nil +} + +func readPayloads(r io.Reader) ([][]byte, error) { + nBytesExpecting, err := iohelper.ReadInt32(r) + if err != nil { + return nil, errors.Trace(err) + } + + if nBytesExpecting > 0 { + buf, err := iohelper.ReadN(r, nBytesExpecting) + // Question: why should we return error only when we get an io.EOF error? + if err != nil && ErrorEqual(err, io.EOF) { + return nil, errors.Trace(err) + } + + payloads, err := processMessage(buf) + if err != nil { + return nil, errors.Trace(err) + } + + if len(payloads) > 0 { + return payloads, nil + } + } + return nil, errors.New("unexpected payload") +} + +func newConnection(addr string, srvType ServiceType) (*connection, error) { + conn, err := net.Dial("tcp", addr) + if err != nil { + return nil, errors.Trace(err) + } + if _, ok := ServiceString[srvType]; !ok { + return nil, errors.Errorf("unexpected service type [serviceType=%d]", srvType) + } + c := &connection{ + addr: addr, + bw: bufio.NewWriter(conn), + conn: conn, + in: make(chan *iohelper.PbBuffer, 20), + serviceType: srvType, + idGen: newIdGenerator(), + ongoingCalls: map[int]*call{}, + } + + err = c.init() + if err != nil { + return nil, errors.Trace(err) + } + + return c, nil +} + +func (c *connection) init() error { + err := c.writeHead() + if err != nil { + return errors.Trace(err) + } + + err = c.writeConnectionHeader() + if err != nil { + return errors.Trace(err) + } + + go func() { + err := c.processMessages() + if err != nil { + log.Warnf("process messages failed - %v", errors.ErrorStack(err)) + return + } + }() + go c.dispatch() + return nil +} + +func (c *connection) processMessages() error { + for { + msgs, err := readPayloads(c.conn) + if err != nil { + return errors.Trace(err) + } + + var rh proto.ResponseHeader + err = pb.Unmarshal(msgs[0], &rh) + if err != nil { + return errors.Trace(err) + } + + callId := rh.GetCallId() + c.mu.Lock() + call, ok := c.ongoingCalls[int(callId)] + if !ok { + c.mu.Unlock() + return errors.Errorf("Invalid call id: %d", callId) + } + delete(c.ongoingCalls, int(callId)) + c.mu.Unlock() + + exception := rh.GetException() + if exception != nil { + call.complete(errors.Errorf("Exception returned: %s\n%s", exception.GetExceptionClassName(), exception.GetStackTrace()), nil) + } else if len(msgs) == 2 { + call.complete(nil, msgs[1]) + } + } +} + +func (c *connection) writeHead() error { + buf := bytes.NewBuffer(nil) + buf.Write(hbaseHeaderBytes) + buf.WriteByte(0) + buf.WriteByte(80) + _, err := c.conn.Write(buf.Bytes()) + return errors.Trace(err) +} + +func (c *connection) writeConnectionHeader() error { + buf := iohelper.NewPbBuffer() + service := pb.String(ServiceString[c.serviceType]) + + err := buf.WritePBMessage(&proto.ConnectionHeader{ + UserInfo: &proto.UserInformation{ + EffectiveUser: pb.String("pingcap"), + }, + ServiceName: service, + }) + if err != nil { + return errors.Trace(err) + } + + err = buf.PrependSize() + if err != nil { + return errors.Trace(err) + } + + _, err = c.conn.Write(buf.Bytes()) + if err != nil { + return errors.Trace(err) + } + + return nil +} + +func (c *connection) dispatch() { + for { + select { + case buf := <-c.in: + // TODO: add error check. + c.bw.Write(buf.Bytes()) + if len(c.in) == 0 { + c.bw.Flush() + } + } + } +} + +func (c *connection) call(request *call) error { + id := c.idGen.incrAndGet() + rh := &proto.RequestHeader{ + CallId: pb.Uint32(uint32(id)), + MethodName: pb.String(request.methodName), + RequestParam: pb.Bool(true), + } + + request.id = uint32(id) + + bfrh := iohelper.NewPbBuffer() + err := bfrh.WritePBMessage(rh) + if err != nil { + return errors.Trace(err) + } + + bfr := iohelper.NewPbBuffer() + err = bfr.WritePBMessage(request.request) + if err != nil { + return errors.Trace(err) + } + + // Buf => + // | total size | pb1 size | pb1 | pb2 size | pb2 | ... + buf := iohelper.NewPbBuffer() + buf.WriteDelimitedBuffers(bfrh, bfr) + + c.mu.Lock() + c.ongoingCalls[id] = request + c.in <- buf + c.mu.Unlock() + + return nil +} + +func (c *connection) close() error { + return c.conn.Close() +} diff --git a/vendor/github.com/pingcap/go-hbase/del.go b/vendor/github.com/pingcap/go-hbase/del.go new file mode 100644 index 000000000..f5a16792d --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/del.go @@ -0,0 +1,113 @@ +package hbase + +import ( + pb "github.com/golang/protobuf/proto" + "github.com/pingcap/go-hbase/proto" + + "fmt" + "math" + "strings" +) + +type Delete struct { + Row []byte + Families set + FamilyQuals map[string]set + Ts map[string]uint64 +} + +func NewDelete(row []byte) *Delete { + return &Delete{ + Row: row, + Families: newSet(), + FamilyQuals: make(map[string]set), + Ts: make(map[string]uint64), + } +} + +func (d *Delete) AddString(famqual string) error { + parts := strings.Split(famqual, ":") + + if len(parts) > 2 { + return fmt.Errorf("Too many colons were found in the family:qualifier string. '%s'", famqual) + } else if len(parts) == 2 { + d.AddStringColumn(parts[0], parts[1]) + } else { + d.AddStringFamily(famqual) + } + + return nil +} + +func (d *Delete) GetRow() []byte { + return d.Row +} + +func (d *Delete) AddColumn(family, qual []byte) *Delete { + d.AddFamily(family) + d.FamilyQuals[string(family)].add(string(qual)) + return d +} + +func (d *Delete) AddStringColumn(family, qual string) *Delete { + return d.AddColumn([]byte(family), []byte(qual)) +} + +func (d *Delete) AddFamily(family []byte) *Delete { + d.Families.add(string(family)) + if _, ok := d.FamilyQuals[string(family)]; !ok { + d.FamilyQuals[string(family)] = newSet() + } + return d +} + +func (d *Delete) AddStringFamily(family string) *Delete { + return d.AddFamily([]byte(family)) +} + +func (d *Delete) AddColumnWithTimestamp(family, qual []byte, ts uint64) *Delete { + d.AddColumn(family, qual) + k := string(family) + ":" + string(qual) + d.Ts[k] = ts + return d +} + +func (d *Delete) ToProto() pb.Message { + del := &proto.MutationProto{ + Row: d.Row, + MutateType: proto.MutationProto_DELETE.Enum(), + } + + for family := range d.Families { + cv := &proto.MutationProto_ColumnValue{ + Family: []byte(family), + QualifierValue: make([]*proto.MutationProto_ColumnValue_QualifierValue, 0), + } + + if len(d.FamilyQuals[family]) == 0 { + cv.QualifierValue = append(cv.QualifierValue, &proto.MutationProto_ColumnValue_QualifierValue{ + Qualifier: nil, + Timestamp: pb.Uint64(uint64(math.MaxInt64)), + DeleteType: proto.MutationProto_DELETE_FAMILY.Enum(), + }) + } + + for qual := range d.FamilyQuals[family] { + v := &proto.MutationProto_ColumnValue_QualifierValue{ + Qualifier: []byte(qual), + Timestamp: pb.Uint64(uint64(math.MaxInt64)), + DeleteType: proto.MutationProto_DELETE_MULTIPLE_VERSIONS.Enum(), + } + tsKey := string(family) + ":" + string(qual) + if ts, ok := d.Ts[tsKey]; ok { + v.Timestamp = pb.Uint64(ts) + v.DeleteType = proto.MutationProto_DELETE_ONE_VERSION.Enum() + } + cv.QualifierValue = append(cv.QualifierValue, v) + } + + del.ColumnValue = append(del.ColumnValue, cv) + } + + return del +} diff --git a/vendor/github.com/pingcap/go-hbase/get.go b/vendor/github.com/pingcap/go-hbase/get.go new file mode 100644 index 000000000..6ea8c2c19 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/get.go @@ -0,0 +1,105 @@ +package hbase + +import ( + "strings" + + pb "github.com/golang/protobuf/proto" + "github.com/juju/errors" + "github.com/pingcap/go-hbase/proto" +) + +type Get struct { + Row []byte + Families set + FamilyQuals map[string]set + Versions int32 + TsRangeFrom uint64 + TsRangeTo uint64 +} + +func NewGet(row []byte) *Get { + return &Get{ + Row: append([]byte(nil), row...), + Families: newSet(), + FamilyQuals: make(map[string]set), + Versions: 1, + } +} + +func (g *Get) GetRow() []byte { + return g.Row +} + +func (g *Get) AddString(famqual string) error { + parts := strings.Split(famqual, ":") + + if len(parts) > 2 { + return errors.Errorf("Too many colons were found in the family:qualifier string. '%s'", famqual) + } else if len(parts) == 2 { + g.AddStringColumn(parts[0], parts[1]) + } else { + g.AddStringFamily(famqual) + } + + return nil +} + +func (g *Get) AddColumn(family, qual []byte) *Get { + g.AddFamily(family) + g.FamilyQuals[string(family)].add(string(qual)) + return g +} + +func (g *Get) AddStringColumn(family, qual string) *Get { + return g.AddColumn([]byte(family), []byte(qual)) +} + +func (g *Get) AddFamily(family []byte) *Get { + g.Families.add(string(family)) + if _, ok := g.FamilyQuals[string(family)]; !ok { + g.FamilyQuals[string(family)] = newSet() + } + return g +} + +func (g *Get) AddStringFamily(family string) *Get { + return g.AddFamily([]byte(family)) +} + +func (g *Get) AddTimeRange(from uint64, to uint64) *Get { + g.TsRangeFrom = from + g.TsRangeTo = to + return g +} + +func (g *Get) SetMaxVersion(maxVersion int32) *Get { + g.Versions = maxVersion + return g +} + +func (g *Get) ToProto() pb.Message { + get := &proto.Get{ + Row: g.Row, + } + + if g.TsRangeFrom != 0 && g.TsRangeTo != 0 && g.TsRangeFrom <= g.TsRangeTo { + get.TimeRange = &proto.TimeRange{ + From: pb.Uint64(g.TsRangeFrom), + To: pb.Uint64(g.TsRangeTo), + } + } + + for v := range g.Families { + col := &proto.Column{ + Family: []byte(v), + } + var quals [][]byte + for qual := range g.FamilyQuals[v] { + quals = append(quals, []byte(qual)) + } + col.Qualifier = quals + get.Column = append(get.Column, col) + } + get.MaxVersions = pb.Uint32(uint32(g.Versions)) + return get +} diff --git a/vendor/github.com/pingcap/go-hbase/iohelper/multireader.go b/vendor/github.com/pingcap/go-hbase/iohelper/multireader.go new file mode 100644 index 000000000..eaf7ae277 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/iohelper/multireader.go @@ -0,0 +1,8 @@ +package iohelper + +import "io" + +type ByteMultiReader interface { + io.ByteReader + io.Reader +} diff --git a/vendor/github.com/pingcap/go-hbase/iohelper/pbbuffer.go b/vendor/github.com/pingcap/go-hbase/iohelper/pbbuffer.go new file mode 100644 index 000000000..2f33f783b --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/iohelper/pbbuffer.go @@ -0,0 +1,111 @@ +package iohelper + +import ( + "encoding/binary" + + pb "github.com/golang/protobuf/proto" + "github.com/juju/errors" +) + +type PbBuffer struct { + b []byte +} + +func NewPbBuffer() *PbBuffer { + b := []byte{} + return &PbBuffer{ + b: b, + } +} + +func (b *PbBuffer) Bytes() []byte { + return b.b +} + +func (b *PbBuffer) Write(d []byte) (int, error) { + b.b = append(b.b, d...) + return len(d), nil +} + +func (b *PbBuffer) WriteByte(d byte) error { + return binary.Write(b, binary.BigEndian, d) +} + +func (b *PbBuffer) WriteString(d string) error { + return binary.Write(b, binary.BigEndian, d) +} + +func (b *PbBuffer) WriteInt32(d int32) error { + return binary.Write(b, binary.BigEndian, d) +} + +func (b *PbBuffer) WriteInt64(d int64) error { + return binary.Write(b, binary.BigEndian, d) +} + +func (b *PbBuffer) WriteFloat32(d float32) error { + return binary.Write(b, binary.BigEndian, d) +} + +func (b *PbBuffer) WriteFloat64(d float64) error { + return binary.Write(b, binary.BigEndian, d) +} + +func (b *PbBuffer) WritePBMessage(d pb.Message) error { + buf, err := pb.Marshal(d) + if err != nil { + return errors.Trace(err) + } + + _, err = b.Write(buf) + return errors.Trace(err) +} + +func (b *PbBuffer) WriteDelimitedBuffers(bufs ...*PbBuffer) error { + totalLength := 0 + lens := make([][]byte, len(bufs)) + for i, v := range bufs { + n := len(v.Bytes()) + lenb := pb.EncodeVarint(uint64(n)) + + totalLength += len(lenb) + n + lens[i] = lenb + } + + err := b.WriteInt32(int32(totalLength)) + if err != nil { + return errors.Trace(err) + } + + for i, v := range bufs { + _, err = b.Write(lens[i]) + if err != nil { + return errors.Trace(err) + } + + _, err = b.Write(v.Bytes()) + if err != nil { + return errors.Trace(err) + } + } + + return nil +} + +func (b *PbBuffer) PrependSize() error { + size := int32(len(b.b)) + newBuf := NewPbBuffer() + + err := newBuf.WriteInt32(size) + if err != nil { + return errors.Trace(err) + } + + _, err = newBuf.Write(b.b) + if err != nil { + return errors.Trace(err) + } + + *b = *newBuf + return nil +} diff --git a/vendor/github.com/pingcap/go-hbase/iohelper/utils.go b/vendor/github.com/pingcap/go-hbase/iohelper/utils.go new file mode 100644 index 000000000..23f57d40e --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/iohelper/utils.go @@ -0,0 +1,177 @@ +package iohelper + +import ( + "bytes" + "encoding/binary" + "io" + + "github.com/juju/errors" +) + +var ( + cachedItob [][]byte +) + +func init() { + cachedItob = make([][]byte, 1024) + for i := 0; i < len(cachedItob); i++ { + var b bytes.Buffer + writeVLong(&b, int64(i)) + cachedItob[i] = b.Bytes() + } +} + +func itob(i int) ([]byte, error) { + if i >= 0 && i < len(cachedItob) { + return cachedItob[i], nil + } + + var b bytes.Buffer + err := binary.Write(&b, binary.BigEndian, i) + if err != nil { + return nil, errors.Trace(err) + } + return b.Bytes(), nil +} + +func decodeVIntSize(value byte) int32 { + if int32(value) >= -112 { + return int32(1) + } + + if int32(value) < -120 { + return -119 - int32(value) + } + + return -111 - int32(value) +} + +func isNegativeVInt(value byte) bool { + return int32(value) < -120 || int32(value) >= -112 && int32(value) < 0 +} + +func readVLong(r io.Reader) (int64, error) { + var firstByte byte + err := binary.Read(r, binary.BigEndian, &firstByte) + if err != nil { + return 0, errors.Trace(err) + } + + l := decodeVIntSize(firstByte) + if l == 1 { + return int64(firstByte), nil + } + + var ( + i int64 + idx int32 + ) + + for idx = 0; idx < l-1; idx++ { + var b byte + err = binary.Read(r, binary.BigEndian, &b) + if err != nil { + return 0, errors.Trace(err) + } + + i <<= 8 + i |= int64(b & 255) + } + + if isNegativeVInt(firstByte) { + return ^i, nil + } + + return i, nil +} + +func writeVLong(w io.Writer, i int64) error { + var err error + if i >= -112 && i <= 127 { + err = binary.Write(w, binary.BigEndian, byte(i)) + if err != nil { + return errors.Trace(err) + } + } else { + var l int32 = -112 + if i < 0 { + i = ^i + l = -120 + } + var tmp int64 + for tmp = i; tmp != 0; l-- { + tmp >>= 8 + } + + err = binary.Write(w, binary.BigEndian, byte(l)) + if err != nil { + return errors.Trace(err) + } + + if l < -120 { + l = -(l + 120) + } else { + l = -(l + 112) + } + + for idx := l; idx != 0; idx-- { + var mask int64 + shiftbits := uint((idx - 1) * 8) + mask = int64(255) << shiftbits + err = binary.Write(w, binary.BigEndian, byte((i&mask)>>shiftbits)) + if err != nil { + return errors.Trace(err) + } + } + } + + return nil +} + +func ReadVarBytes(r ByteMultiReader) ([]byte, error) { + sz, err := readVLong(r) + if err != nil { + return nil, errors.Trace(err) + } + + b := make([]byte, sz) + _, err = r.Read(b) + if err != nil { + return nil, errors.Trace(err) + } + + return b, nil +} + +func WriteVarBytes(w io.Writer, b []byte) error { + lenb, err := itob(len(b)) + if err != nil { + return errors.Trace(err) + } + + _, err = w.Write(lenb) + if err != nil { + return errors.Trace(err) + } + + _, err = w.Write(b) + return errors.Trace(err) +} + +func ReadInt32(r io.Reader) (int32, error) { + var n int32 + err := binary.Read(r, binary.BigEndian, &n) + return n, errors.Trace(err) +} + +func ReadN(r io.Reader, n int32) ([]byte, error) { + b := make([]byte, n) + _, err := io.ReadFull(r, b) + return b, errors.Trace(err) +} + +func ReadUint64(r io.Reader) (uint64, error) { + var n uint64 + err := binary.Read(r, binary.BigEndian, &n) + return n, errors.Trace(err) +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/AccessControl.pb.go b/vendor/github.com/pingcap/go-hbase/proto/AccessControl.pb.go new file mode 100644 index 000000000..0b9f73cab --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/AccessControl.pb.go @@ -0,0 +1,451 @@ +// Code generated by protoc-gen-go. +// source: AccessControl.proto +// DO NOT EDIT! + +/* +Package proto is a generated protocol buffer package. + +It is generated from these files: + AccessControl.proto + Admin.proto + Aggregate.proto + Authentication.proto + Cell.proto + Client.proto + ClusterId.proto + ClusterStatus.proto + Comparator.proto + Encryption.proto + ErrorHandling.proto + FS.proto + Filter.proto + HBase.proto + HFile.proto + LoadBalancer.proto + MapReduce.proto + Master.proto + MultiRowMutation.proto + RPC.proto + RegionServerStatus.proto + RowProcessor.proto + SecureBulkLoad.proto + Snapshot.proto + Themis.proto + Tracing.proto + VisibilityLabels.proto + WAL.proto + ZooKeeper.proto + +It has these top-level messages: + Permission + TablePermission + NamespacePermission + GlobalPermission + UserPermission + UsersAndPermissions + GrantRequest + GrantResponse + RevokeRequest + RevokeResponse + GetUserPermissionsRequest + GetUserPermissionsResponse + CheckPermissionsRequest + CheckPermissionsResponse +*/ +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type Permission_Action int32 + +const ( + Permission_READ Permission_Action = 0 + Permission_WRITE Permission_Action = 1 + Permission_EXEC Permission_Action = 2 + Permission_CREATE Permission_Action = 3 + Permission_ADMIN Permission_Action = 4 +) + +var Permission_Action_name = map[int32]string{ + 0: "READ", + 1: "WRITE", + 2: "EXEC", + 3: "CREATE", + 4: "ADMIN", +} +var Permission_Action_value = map[string]int32{ + "READ": 0, + "WRITE": 1, + "EXEC": 2, + "CREATE": 3, + "ADMIN": 4, +} + +func (x Permission_Action) Enum() *Permission_Action { + p := new(Permission_Action) + *p = x + return p +} +func (x Permission_Action) String() string { + return proto1.EnumName(Permission_Action_name, int32(x)) +} +func (x *Permission_Action) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(Permission_Action_value, data, "Permission_Action") + if err != nil { + return err + } + *x = Permission_Action(value) + return nil +} + +type Permission_Type int32 + +const ( + Permission_Global Permission_Type = 1 + Permission_Namespace Permission_Type = 2 + Permission_Table Permission_Type = 3 +) + +var Permission_Type_name = map[int32]string{ + 1: "Global", + 2: "Namespace", + 3: "Table", +} +var Permission_Type_value = map[string]int32{ + "Global": 1, + "Namespace": 2, + "Table": 3, +} + +func (x Permission_Type) Enum() *Permission_Type { + p := new(Permission_Type) + *p = x + return p +} +func (x Permission_Type) String() string { + return proto1.EnumName(Permission_Type_name, int32(x)) +} +func (x *Permission_Type) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(Permission_Type_value, data, "Permission_Type") + if err != nil { + return err + } + *x = Permission_Type(value) + return nil +} + +type Permission struct { + Type *Permission_Type `protobuf:"varint,1,req,name=type,enum=proto.Permission_Type" json:"type,omitempty"` + GlobalPermission *GlobalPermission `protobuf:"bytes,2,opt,name=global_permission" json:"global_permission,omitempty"` + NamespacePermission *NamespacePermission `protobuf:"bytes,3,opt,name=namespace_permission" json:"namespace_permission,omitempty"` + TablePermission *TablePermission `protobuf:"bytes,4,opt,name=table_permission" json:"table_permission,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Permission) Reset() { *m = Permission{} } +func (m *Permission) String() string { return proto1.CompactTextString(m) } +func (*Permission) ProtoMessage() {} + +func (m *Permission) GetType() Permission_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return Permission_Global +} + +func (m *Permission) GetGlobalPermission() *GlobalPermission { + if m != nil { + return m.GlobalPermission + } + return nil +} + +func (m *Permission) GetNamespacePermission() *NamespacePermission { + if m != nil { + return m.NamespacePermission + } + return nil +} + +func (m *Permission) GetTablePermission() *TablePermission { + if m != nil { + return m.TablePermission + } + return nil +} + +type TablePermission struct { + TableName *TableName `protobuf:"bytes,1,opt,name=table_name" json:"table_name,omitempty"` + Family []byte `protobuf:"bytes,2,opt,name=family" json:"family,omitempty"` + Qualifier []byte `protobuf:"bytes,3,opt,name=qualifier" json:"qualifier,omitempty"` + Action []Permission_Action `protobuf:"varint,4,rep,name=action,enum=proto.Permission_Action" json:"action,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TablePermission) Reset() { *m = TablePermission{} } +func (m *TablePermission) String() string { return proto1.CompactTextString(m) } +func (*TablePermission) ProtoMessage() {} + +func (m *TablePermission) GetTableName() *TableName { + if m != nil { + return m.TableName + } + return nil +} + +func (m *TablePermission) GetFamily() []byte { + if m != nil { + return m.Family + } + return nil +} + +func (m *TablePermission) GetQualifier() []byte { + if m != nil { + return m.Qualifier + } + return nil +} + +func (m *TablePermission) GetAction() []Permission_Action { + if m != nil { + return m.Action + } + return nil +} + +type NamespacePermission struct { + NamespaceName []byte `protobuf:"bytes,1,opt,name=namespace_name" json:"namespace_name,omitempty"` + Action []Permission_Action `protobuf:"varint,2,rep,name=action,enum=proto.Permission_Action" json:"action,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NamespacePermission) Reset() { *m = NamespacePermission{} } +func (m *NamespacePermission) String() string { return proto1.CompactTextString(m) } +func (*NamespacePermission) ProtoMessage() {} + +func (m *NamespacePermission) GetNamespaceName() []byte { + if m != nil { + return m.NamespaceName + } + return nil +} + +func (m *NamespacePermission) GetAction() []Permission_Action { + if m != nil { + return m.Action + } + return nil +} + +type GlobalPermission struct { + Action []Permission_Action `protobuf:"varint,1,rep,name=action,enum=proto.Permission_Action" json:"action,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GlobalPermission) Reset() { *m = GlobalPermission{} } +func (m *GlobalPermission) String() string { return proto1.CompactTextString(m) } +func (*GlobalPermission) ProtoMessage() {} + +func (m *GlobalPermission) GetAction() []Permission_Action { + if m != nil { + return m.Action + } + return nil +} + +type UserPermission struct { + User []byte `protobuf:"bytes,1,req,name=user" json:"user,omitempty"` + Permission *Permission `protobuf:"bytes,3,req,name=permission" json:"permission,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UserPermission) Reset() { *m = UserPermission{} } +func (m *UserPermission) String() string { return proto1.CompactTextString(m) } +func (*UserPermission) ProtoMessage() {} + +func (m *UserPermission) GetUser() []byte { + if m != nil { + return m.User + } + return nil +} + +func (m *UserPermission) GetPermission() *Permission { + if m != nil { + return m.Permission + } + return nil +} + +// * +// Content of the /hbase/acl/ znode. +type UsersAndPermissions struct { + UserPermissions []*UsersAndPermissions_UserPermissions `protobuf:"bytes,1,rep,name=user_permissions" json:"user_permissions,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UsersAndPermissions) Reset() { *m = UsersAndPermissions{} } +func (m *UsersAndPermissions) String() string { return proto1.CompactTextString(m) } +func (*UsersAndPermissions) ProtoMessage() {} + +func (m *UsersAndPermissions) GetUserPermissions() []*UsersAndPermissions_UserPermissions { + if m != nil { + return m.UserPermissions + } + return nil +} + +type UsersAndPermissions_UserPermissions struct { + User []byte `protobuf:"bytes,1,req,name=user" json:"user,omitempty"` + Permissions []*Permission `protobuf:"bytes,2,rep,name=permissions" json:"permissions,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UsersAndPermissions_UserPermissions) Reset() { *m = UsersAndPermissions_UserPermissions{} } +func (m *UsersAndPermissions_UserPermissions) String() string { return proto1.CompactTextString(m) } +func (*UsersAndPermissions_UserPermissions) ProtoMessage() {} + +func (m *UsersAndPermissions_UserPermissions) GetUser() []byte { + if m != nil { + return m.User + } + return nil +} + +func (m *UsersAndPermissions_UserPermissions) GetPermissions() []*Permission { + if m != nil { + return m.Permissions + } + return nil +} + +type GrantRequest struct { + UserPermission *UserPermission `protobuf:"bytes,1,req,name=user_permission" json:"user_permission,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GrantRequest) Reset() { *m = GrantRequest{} } +func (m *GrantRequest) String() string { return proto1.CompactTextString(m) } +func (*GrantRequest) ProtoMessage() {} + +func (m *GrantRequest) GetUserPermission() *UserPermission { + if m != nil { + return m.UserPermission + } + return nil +} + +type GrantResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *GrantResponse) Reset() { *m = GrantResponse{} } +func (m *GrantResponse) String() string { return proto1.CompactTextString(m) } +func (*GrantResponse) ProtoMessage() {} + +type RevokeRequest struct { + UserPermission *UserPermission `protobuf:"bytes,1,req,name=user_permission" json:"user_permission,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RevokeRequest) Reset() { *m = RevokeRequest{} } +func (m *RevokeRequest) String() string { return proto1.CompactTextString(m) } +func (*RevokeRequest) ProtoMessage() {} + +func (m *RevokeRequest) GetUserPermission() *UserPermission { + if m != nil { + return m.UserPermission + } + return nil +} + +type RevokeResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *RevokeResponse) Reset() { *m = RevokeResponse{} } +func (m *RevokeResponse) String() string { return proto1.CompactTextString(m) } +func (*RevokeResponse) ProtoMessage() {} + +type GetUserPermissionsRequest struct { + Type *Permission_Type `protobuf:"varint,1,opt,name=type,enum=proto.Permission_Type" json:"type,omitempty"` + TableName *TableName `protobuf:"bytes,2,opt,name=table_name" json:"table_name,omitempty"` + NamespaceName []byte `protobuf:"bytes,3,opt,name=namespace_name" json:"namespace_name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetUserPermissionsRequest) Reset() { *m = GetUserPermissionsRequest{} } +func (m *GetUserPermissionsRequest) String() string { return proto1.CompactTextString(m) } +func (*GetUserPermissionsRequest) ProtoMessage() {} + +func (m *GetUserPermissionsRequest) GetType() Permission_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return Permission_Global +} + +func (m *GetUserPermissionsRequest) GetTableName() *TableName { + if m != nil { + return m.TableName + } + return nil +} + +func (m *GetUserPermissionsRequest) GetNamespaceName() []byte { + if m != nil { + return m.NamespaceName + } + return nil +} + +type GetUserPermissionsResponse struct { + UserPermission []*UserPermission `protobuf:"bytes,1,rep,name=user_permission" json:"user_permission,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetUserPermissionsResponse) Reset() { *m = GetUserPermissionsResponse{} } +func (m *GetUserPermissionsResponse) String() string { return proto1.CompactTextString(m) } +func (*GetUserPermissionsResponse) ProtoMessage() {} + +func (m *GetUserPermissionsResponse) GetUserPermission() []*UserPermission { + if m != nil { + return m.UserPermission + } + return nil +} + +type CheckPermissionsRequest struct { + Permission []*Permission `protobuf:"bytes,1,rep,name=permission" json:"permission,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CheckPermissionsRequest) Reset() { *m = CheckPermissionsRequest{} } +func (m *CheckPermissionsRequest) String() string { return proto1.CompactTextString(m) } +func (*CheckPermissionsRequest) ProtoMessage() {} + +func (m *CheckPermissionsRequest) GetPermission() []*Permission { + if m != nil { + return m.Permission + } + return nil +} + +type CheckPermissionsResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *CheckPermissionsResponse) Reset() { *m = CheckPermissionsResponse{} } +func (m *CheckPermissionsResponse) String() string { return proto1.CompactTextString(m) } +func (*CheckPermissionsResponse) ProtoMessage() {} + +func init() { + proto1.RegisterEnum("proto.Permission_Action", Permission_Action_name, Permission_Action_value) + proto1.RegisterEnum("proto.Permission_Type", Permission_Type_name, Permission_Type_value) +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/Admin.pb.go b/vendor/github.com/pingcap/go-hbase/proto/Admin.pb.go new file mode 100644 index 000000000..bea3ab53b --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/Admin.pb.go @@ -0,0 +1,769 @@ +// Code generated by protoc-gen-go. +// source: Admin.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type GetRegionInfoResponse_CompactionState int32 + +const ( + GetRegionInfoResponse_NONE GetRegionInfoResponse_CompactionState = 0 + GetRegionInfoResponse_MINOR GetRegionInfoResponse_CompactionState = 1 + GetRegionInfoResponse_MAJOR GetRegionInfoResponse_CompactionState = 2 + GetRegionInfoResponse_MAJOR_AND_MINOR GetRegionInfoResponse_CompactionState = 3 +) + +var GetRegionInfoResponse_CompactionState_name = map[int32]string{ + 0: "NONE", + 1: "MINOR", + 2: "MAJOR", + 3: "MAJOR_AND_MINOR", +} +var GetRegionInfoResponse_CompactionState_value = map[string]int32{ + "NONE": 0, + "MINOR": 1, + "MAJOR": 2, + "MAJOR_AND_MINOR": 3, +} + +func (x GetRegionInfoResponse_CompactionState) Enum() *GetRegionInfoResponse_CompactionState { + p := new(GetRegionInfoResponse_CompactionState) + *p = x + return p +} +func (x GetRegionInfoResponse_CompactionState) String() string { + return proto1.EnumName(GetRegionInfoResponse_CompactionState_name, int32(x)) +} +func (x *GetRegionInfoResponse_CompactionState) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(GetRegionInfoResponse_CompactionState_value, data, "GetRegionInfoResponse_CompactionState") + if err != nil { + return err + } + *x = GetRegionInfoResponse_CompactionState(value) + return nil +} + +type OpenRegionResponse_RegionOpeningState int32 + +const ( + OpenRegionResponse_OPENED OpenRegionResponse_RegionOpeningState = 0 + OpenRegionResponse_ALREADY_OPENED OpenRegionResponse_RegionOpeningState = 1 + OpenRegionResponse_FAILED_OPENING OpenRegionResponse_RegionOpeningState = 2 +) + +var OpenRegionResponse_RegionOpeningState_name = map[int32]string{ + 0: "OPENED", + 1: "ALREADY_OPENED", + 2: "FAILED_OPENING", +} +var OpenRegionResponse_RegionOpeningState_value = map[string]int32{ + "OPENED": 0, + "ALREADY_OPENED": 1, + "FAILED_OPENING": 2, +} + +func (x OpenRegionResponse_RegionOpeningState) Enum() *OpenRegionResponse_RegionOpeningState { + p := new(OpenRegionResponse_RegionOpeningState) + *p = x + return p +} +func (x OpenRegionResponse_RegionOpeningState) String() string { + return proto1.EnumName(OpenRegionResponse_RegionOpeningState_name, int32(x)) +} +func (x *OpenRegionResponse_RegionOpeningState) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(OpenRegionResponse_RegionOpeningState_value, data, "OpenRegionResponse_RegionOpeningState") + if err != nil { + return err + } + *x = OpenRegionResponse_RegionOpeningState(value) + return nil +} + +type GetRegionInfoRequest struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + CompactionState *bool `protobuf:"varint,2,opt,name=compaction_state" json:"compaction_state,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetRegionInfoRequest) Reset() { *m = GetRegionInfoRequest{} } +func (m *GetRegionInfoRequest) String() string { return proto1.CompactTextString(m) } +func (*GetRegionInfoRequest) ProtoMessage() {} + +func (m *GetRegionInfoRequest) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +func (m *GetRegionInfoRequest) GetCompactionState() bool { + if m != nil && m.CompactionState != nil { + return *m.CompactionState + } + return false +} + +type GetRegionInfoResponse struct { + RegionInfo *RegionInfo `protobuf:"bytes,1,req,name=region_info" json:"region_info,omitempty"` + CompactionState *GetRegionInfoResponse_CompactionState `protobuf:"varint,2,opt,name=compaction_state,enum=proto.GetRegionInfoResponse_CompactionState" json:"compaction_state,omitempty"` + IsRecovering *bool `protobuf:"varint,3,opt,name=isRecovering" json:"isRecovering,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetRegionInfoResponse) Reset() { *m = GetRegionInfoResponse{} } +func (m *GetRegionInfoResponse) String() string { return proto1.CompactTextString(m) } +func (*GetRegionInfoResponse) ProtoMessage() {} + +func (m *GetRegionInfoResponse) GetRegionInfo() *RegionInfo { + if m != nil { + return m.RegionInfo + } + return nil +} + +func (m *GetRegionInfoResponse) GetCompactionState() GetRegionInfoResponse_CompactionState { + if m != nil && m.CompactionState != nil { + return *m.CompactionState + } + return GetRegionInfoResponse_NONE +} + +func (m *GetRegionInfoResponse) GetIsRecovering() bool { + if m != nil && m.IsRecovering != nil { + return *m.IsRecovering + } + return false +} + +// * +// Get a list of store files for a set of column families in a particular region. +// If no column family is specified, get the store files for all column families. +type GetStoreFileRequest struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + Family [][]byte `protobuf:"bytes,2,rep,name=family" json:"family,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetStoreFileRequest) Reset() { *m = GetStoreFileRequest{} } +func (m *GetStoreFileRequest) String() string { return proto1.CompactTextString(m) } +func (*GetStoreFileRequest) ProtoMessage() {} + +func (m *GetStoreFileRequest) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +func (m *GetStoreFileRequest) GetFamily() [][]byte { + if m != nil { + return m.Family + } + return nil +} + +type GetStoreFileResponse struct { + StoreFile []string `protobuf:"bytes,1,rep,name=store_file" json:"store_file,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetStoreFileResponse) Reset() { *m = GetStoreFileResponse{} } +func (m *GetStoreFileResponse) String() string { return proto1.CompactTextString(m) } +func (*GetStoreFileResponse) ProtoMessage() {} + +func (m *GetStoreFileResponse) GetStoreFile() []string { + if m != nil { + return m.StoreFile + } + return nil +} + +type GetOnlineRegionRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetOnlineRegionRequest) Reset() { *m = GetOnlineRegionRequest{} } +func (m *GetOnlineRegionRequest) String() string { return proto1.CompactTextString(m) } +func (*GetOnlineRegionRequest) ProtoMessage() {} + +type GetOnlineRegionResponse struct { + RegionInfo []*RegionInfo `protobuf:"bytes,1,rep,name=region_info" json:"region_info,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetOnlineRegionResponse) Reset() { *m = GetOnlineRegionResponse{} } +func (m *GetOnlineRegionResponse) String() string { return proto1.CompactTextString(m) } +func (*GetOnlineRegionResponse) ProtoMessage() {} + +func (m *GetOnlineRegionResponse) GetRegionInfo() []*RegionInfo { + if m != nil { + return m.RegionInfo + } + return nil +} + +type OpenRegionRequest struct { + OpenInfo []*OpenRegionRequest_RegionOpenInfo `protobuf:"bytes,1,rep,name=open_info" json:"open_info,omitempty"` + // the intended server for this RPC. + ServerStartCode *uint64 `protobuf:"varint,2,opt,name=serverStartCode" json:"serverStartCode,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OpenRegionRequest) Reset() { *m = OpenRegionRequest{} } +func (m *OpenRegionRequest) String() string { return proto1.CompactTextString(m) } +func (*OpenRegionRequest) ProtoMessage() {} + +func (m *OpenRegionRequest) GetOpenInfo() []*OpenRegionRequest_RegionOpenInfo { + if m != nil { + return m.OpenInfo + } + return nil +} + +func (m *OpenRegionRequest) GetServerStartCode() uint64 { + if m != nil && m.ServerStartCode != nil { + return *m.ServerStartCode + } + return 0 +} + +type OpenRegionRequest_RegionOpenInfo struct { + Region *RegionInfo `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + VersionOfOfflineNode *uint32 `protobuf:"varint,2,opt,name=version_of_offline_node" json:"version_of_offline_node,omitempty"` + FavoredNodes []*ServerName `protobuf:"bytes,3,rep,name=favored_nodes" json:"favored_nodes,omitempty"` + // open region for distributedLogReplay + OpenForDistributedLogReplay *bool `protobuf:"varint,4,opt,name=openForDistributedLogReplay" json:"openForDistributedLogReplay,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OpenRegionRequest_RegionOpenInfo) Reset() { *m = OpenRegionRequest_RegionOpenInfo{} } +func (m *OpenRegionRequest_RegionOpenInfo) String() string { return proto1.CompactTextString(m) } +func (*OpenRegionRequest_RegionOpenInfo) ProtoMessage() {} + +func (m *OpenRegionRequest_RegionOpenInfo) GetRegion() *RegionInfo { + if m != nil { + return m.Region + } + return nil +} + +func (m *OpenRegionRequest_RegionOpenInfo) GetVersionOfOfflineNode() uint32 { + if m != nil && m.VersionOfOfflineNode != nil { + return *m.VersionOfOfflineNode + } + return 0 +} + +func (m *OpenRegionRequest_RegionOpenInfo) GetFavoredNodes() []*ServerName { + if m != nil { + return m.FavoredNodes + } + return nil +} + +func (m *OpenRegionRequest_RegionOpenInfo) GetOpenForDistributedLogReplay() bool { + if m != nil && m.OpenForDistributedLogReplay != nil { + return *m.OpenForDistributedLogReplay + } + return false +} + +type OpenRegionResponse struct { + OpeningState []OpenRegionResponse_RegionOpeningState `protobuf:"varint,1,rep,name=opening_state,enum=proto.OpenRegionResponse_RegionOpeningState" json:"opening_state,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OpenRegionResponse) Reset() { *m = OpenRegionResponse{} } +func (m *OpenRegionResponse) String() string { return proto1.CompactTextString(m) } +func (*OpenRegionResponse) ProtoMessage() {} + +func (m *OpenRegionResponse) GetOpeningState() []OpenRegionResponse_RegionOpeningState { + if m != nil { + return m.OpeningState + } + return nil +} + +// * +// Closes the specified region and will use or not use ZK during the close +// according to the specified flag. +type CloseRegionRequest struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + VersionOfClosingNode *uint32 `protobuf:"varint,2,opt,name=version_of_closing_node" json:"version_of_closing_node,omitempty"` + TransitionIn_ZK *bool `protobuf:"varint,3,opt,name=transition_in_ZK,def=1" json:"transition_in_ZK,omitempty"` + DestinationServer *ServerName `protobuf:"bytes,4,opt,name=destination_server" json:"destination_server,omitempty"` + // the intended server for this RPC. + ServerStartCode *uint64 `protobuf:"varint,5,opt,name=serverStartCode" json:"serverStartCode,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CloseRegionRequest) Reset() { *m = CloseRegionRequest{} } +func (m *CloseRegionRequest) String() string { return proto1.CompactTextString(m) } +func (*CloseRegionRequest) ProtoMessage() {} + +const Default_CloseRegionRequest_TransitionIn_ZK bool = true + +func (m *CloseRegionRequest) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +func (m *CloseRegionRequest) GetVersionOfClosingNode() uint32 { + if m != nil && m.VersionOfClosingNode != nil { + return *m.VersionOfClosingNode + } + return 0 +} + +func (m *CloseRegionRequest) GetTransitionIn_ZK() bool { + if m != nil && m.TransitionIn_ZK != nil { + return *m.TransitionIn_ZK + } + return Default_CloseRegionRequest_TransitionIn_ZK +} + +func (m *CloseRegionRequest) GetDestinationServer() *ServerName { + if m != nil { + return m.DestinationServer + } + return nil +} + +func (m *CloseRegionRequest) GetServerStartCode() uint64 { + if m != nil && m.ServerStartCode != nil { + return *m.ServerStartCode + } + return 0 +} + +type CloseRegionResponse struct { + Closed *bool `protobuf:"varint,1,req,name=closed" json:"closed,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CloseRegionResponse) Reset() { *m = CloseRegionResponse{} } +func (m *CloseRegionResponse) String() string { return proto1.CompactTextString(m) } +func (*CloseRegionResponse) ProtoMessage() {} + +func (m *CloseRegionResponse) GetClosed() bool { + if m != nil && m.Closed != nil { + return *m.Closed + } + return false +} + +// * +// Flushes the MemStore of the specified region. +//

+// This method is synchronous. +type FlushRegionRequest struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + IfOlderThanTs *uint64 `protobuf:"varint,2,opt,name=if_older_than_ts" json:"if_older_than_ts,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FlushRegionRequest) Reset() { *m = FlushRegionRequest{} } +func (m *FlushRegionRequest) String() string { return proto1.CompactTextString(m) } +func (*FlushRegionRequest) ProtoMessage() {} + +func (m *FlushRegionRequest) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +func (m *FlushRegionRequest) GetIfOlderThanTs() uint64 { + if m != nil && m.IfOlderThanTs != nil { + return *m.IfOlderThanTs + } + return 0 +} + +type FlushRegionResponse struct { + LastFlushTime *uint64 `protobuf:"varint,1,req,name=last_flush_time" json:"last_flush_time,omitempty"` + Flushed *bool `protobuf:"varint,2,opt,name=flushed" json:"flushed,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FlushRegionResponse) Reset() { *m = FlushRegionResponse{} } +func (m *FlushRegionResponse) String() string { return proto1.CompactTextString(m) } +func (*FlushRegionResponse) ProtoMessage() {} + +func (m *FlushRegionResponse) GetLastFlushTime() uint64 { + if m != nil && m.LastFlushTime != nil { + return *m.LastFlushTime + } + return 0 +} + +func (m *FlushRegionResponse) GetFlushed() bool { + if m != nil && m.Flushed != nil { + return *m.Flushed + } + return false +} + +// * +// Splits the specified region. +//

+// This method currently flushes the region and then forces a compaction which +// will then trigger a split. The flush is done synchronously but the +// compaction is asynchronous. +type SplitRegionRequest struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + SplitPoint []byte `protobuf:"bytes,2,opt,name=split_point" json:"split_point,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SplitRegionRequest) Reset() { *m = SplitRegionRequest{} } +func (m *SplitRegionRequest) String() string { return proto1.CompactTextString(m) } +func (*SplitRegionRequest) ProtoMessage() {} + +func (m *SplitRegionRequest) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +func (m *SplitRegionRequest) GetSplitPoint() []byte { + if m != nil { + return m.SplitPoint + } + return nil +} + +type SplitRegionResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *SplitRegionResponse) Reset() { *m = SplitRegionResponse{} } +func (m *SplitRegionResponse) String() string { return proto1.CompactTextString(m) } +func (*SplitRegionResponse) ProtoMessage() {} + +// * +// Compacts the specified region. Performs a major compaction if specified. +//

+// This method is asynchronous. +type CompactRegionRequest struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + Major *bool `protobuf:"varint,2,opt,name=major" json:"major,omitempty"` + Family []byte `protobuf:"bytes,3,opt,name=family" json:"family,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CompactRegionRequest) Reset() { *m = CompactRegionRequest{} } +func (m *CompactRegionRequest) String() string { return proto1.CompactTextString(m) } +func (*CompactRegionRequest) ProtoMessage() {} + +func (m *CompactRegionRequest) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +func (m *CompactRegionRequest) GetMajor() bool { + if m != nil && m.Major != nil { + return *m.Major + } + return false +} + +func (m *CompactRegionRequest) GetFamily() []byte { + if m != nil { + return m.Family + } + return nil +} + +type CompactRegionResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *CompactRegionResponse) Reset() { *m = CompactRegionResponse{} } +func (m *CompactRegionResponse) String() string { return proto1.CompactTextString(m) } +func (*CompactRegionResponse) ProtoMessage() {} + +type UpdateFavoredNodesRequest struct { + UpdateInfo []*UpdateFavoredNodesRequest_RegionUpdateInfo `protobuf:"bytes,1,rep,name=update_info" json:"update_info,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UpdateFavoredNodesRequest) Reset() { *m = UpdateFavoredNodesRequest{} } +func (m *UpdateFavoredNodesRequest) String() string { return proto1.CompactTextString(m) } +func (*UpdateFavoredNodesRequest) ProtoMessage() {} + +func (m *UpdateFavoredNodesRequest) GetUpdateInfo() []*UpdateFavoredNodesRequest_RegionUpdateInfo { + if m != nil { + return m.UpdateInfo + } + return nil +} + +type UpdateFavoredNodesRequest_RegionUpdateInfo struct { + Region *RegionInfo `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + FavoredNodes []*ServerName `protobuf:"bytes,2,rep,name=favored_nodes" json:"favored_nodes,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UpdateFavoredNodesRequest_RegionUpdateInfo) Reset() { + *m = UpdateFavoredNodesRequest_RegionUpdateInfo{} +} +func (m *UpdateFavoredNodesRequest_RegionUpdateInfo) String() string { + return proto1.CompactTextString(m) +} +func (*UpdateFavoredNodesRequest_RegionUpdateInfo) ProtoMessage() {} + +func (m *UpdateFavoredNodesRequest_RegionUpdateInfo) GetRegion() *RegionInfo { + if m != nil { + return m.Region + } + return nil +} + +func (m *UpdateFavoredNodesRequest_RegionUpdateInfo) GetFavoredNodes() []*ServerName { + if m != nil { + return m.FavoredNodes + } + return nil +} + +type UpdateFavoredNodesResponse struct { + Response *uint32 `protobuf:"varint,1,opt,name=response" json:"response,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UpdateFavoredNodesResponse) Reset() { *m = UpdateFavoredNodesResponse{} } +func (m *UpdateFavoredNodesResponse) String() string { return proto1.CompactTextString(m) } +func (*UpdateFavoredNodesResponse) ProtoMessage() {} + +func (m *UpdateFavoredNodesResponse) GetResponse() uint32 { + if m != nil && m.Response != nil { + return *m.Response + } + return 0 +} + +// * +// Merges the specified regions. +//

+// This method currently closes the regions and then merges them +type MergeRegionsRequest struct { + RegionA *RegionSpecifier `protobuf:"bytes,1,req,name=region_a" json:"region_a,omitempty"` + RegionB *RegionSpecifier `protobuf:"bytes,2,req,name=region_b" json:"region_b,omitempty"` + Forcible *bool `protobuf:"varint,3,opt,name=forcible,def=0" json:"forcible,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MergeRegionsRequest) Reset() { *m = MergeRegionsRequest{} } +func (m *MergeRegionsRequest) String() string { return proto1.CompactTextString(m) } +func (*MergeRegionsRequest) ProtoMessage() {} + +const Default_MergeRegionsRequest_Forcible bool = false + +func (m *MergeRegionsRequest) GetRegionA() *RegionSpecifier { + if m != nil { + return m.RegionA + } + return nil +} + +func (m *MergeRegionsRequest) GetRegionB() *RegionSpecifier { + if m != nil { + return m.RegionB + } + return nil +} + +func (m *MergeRegionsRequest) GetForcible() bool { + if m != nil && m.Forcible != nil { + return *m.Forcible + } + return Default_MergeRegionsRequest_Forcible +} + +type MergeRegionsResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *MergeRegionsResponse) Reset() { *m = MergeRegionsResponse{} } +func (m *MergeRegionsResponse) String() string { return proto1.CompactTextString(m) } +func (*MergeRegionsResponse) ProtoMessage() {} + +// Protocol buffer version of WAL for replication +type WALEntry struct { + Key *WALKey `protobuf:"bytes,1,req,name=key" json:"key,omitempty"` + // Following may be null if the KVs/Cells are carried along the side in a cellblock (See + // RPC for more on cellblocks). If Cells/KVs are in a cellblock, this next field is null + // and associated_cell_count has count of Cells associated w/ this WALEntry + KeyValueBytes [][]byte `protobuf:"bytes,2,rep,name=key_value_bytes" json:"key_value_bytes,omitempty"` + // If Cell data is carried alongside in a cellblock, this is count of Cells in the cellblock. + AssociatedCellCount *int32 `protobuf:"varint,3,opt,name=associated_cell_count" json:"associated_cell_count,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *WALEntry) Reset() { *m = WALEntry{} } +func (m *WALEntry) String() string { return proto1.CompactTextString(m) } +func (*WALEntry) ProtoMessage() {} + +func (m *WALEntry) GetKey() *WALKey { + if m != nil { + return m.Key + } + return nil +} + +func (m *WALEntry) GetKeyValueBytes() [][]byte { + if m != nil { + return m.KeyValueBytes + } + return nil +} + +func (m *WALEntry) GetAssociatedCellCount() int32 { + if m != nil && m.AssociatedCellCount != nil { + return *m.AssociatedCellCount + } + return 0 +} + +// * +// Replicates the given entries. The guarantee is that the given entries +// will be durable on the slave cluster if this method returns without +// any exception. hbase.replication has to be set to true for this to work. +type ReplicateWALEntryRequest struct { + Entry []*WALEntry `protobuf:"bytes,1,rep,name=entry" json:"entry,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ReplicateWALEntryRequest) Reset() { *m = ReplicateWALEntryRequest{} } +func (m *ReplicateWALEntryRequest) String() string { return proto1.CompactTextString(m) } +func (*ReplicateWALEntryRequest) ProtoMessage() {} + +func (m *ReplicateWALEntryRequest) GetEntry() []*WALEntry { + if m != nil { + return m.Entry + } + return nil +} + +type ReplicateWALEntryResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *ReplicateWALEntryResponse) Reset() { *m = ReplicateWALEntryResponse{} } +func (m *ReplicateWALEntryResponse) String() string { return proto1.CompactTextString(m) } +func (*ReplicateWALEntryResponse) ProtoMessage() {} + +type RollWALWriterRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *RollWALWriterRequest) Reset() { *m = RollWALWriterRequest{} } +func (m *RollWALWriterRequest) String() string { return proto1.CompactTextString(m) } +func (*RollWALWriterRequest) ProtoMessage() {} + +type RollWALWriterResponse struct { + // A list of encoded name of regions to flush + RegionToFlush [][]byte `protobuf:"bytes,1,rep,name=region_to_flush" json:"region_to_flush,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RollWALWriterResponse) Reset() { *m = RollWALWriterResponse{} } +func (m *RollWALWriterResponse) String() string { return proto1.CompactTextString(m) } +func (*RollWALWriterResponse) ProtoMessage() {} + +func (m *RollWALWriterResponse) GetRegionToFlush() [][]byte { + if m != nil { + return m.RegionToFlush + } + return nil +} + +type StopServerRequest struct { + Reason *string `protobuf:"bytes,1,req,name=reason" json:"reason,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *StopServerRequest) Reset() { *m = StopServerRequest{} } +func (m *StopServerRequest) String() string { return proto1.CompactTextString(m) } +func (*StopServerRequest) ProtoMessage() {} + +func (m *StopServerRequest) GetReason() string { + if m != nil && m.Reason != nil { + return *m.Reason + } + return "" +} + +type StopServerResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *StopServerResponse) Reset() { *m = StopServerResponse{} } +func (m *StopServerResponse) String() string { return proto1.CompactTextString(m) } +func (*StopServerResponse) ProtoMessage() {} + +type GetServerInfoRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetServerInfoRequest) Reset() { *m = GetServerInfoRequest{} } +func (m *GetServerInfoRequest) String() string { return proto1.CompactTextString(m) } +func (*GetServerInfoRequest) ProtoMessage() {} + +type ServerInfo struct { + ServerName *ServerName `protobuf:"bytes,1,req,name=server_name" json:"server_name,omitempty"` + WebuiPort *uint32 `protobuf:"varint,2,opt,name=webui_port" json:"webui_port,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ServerInfo) Reset() { *m = ServerInfo{} } +func (m *ServerInfo) String() string { return proto1.CompactTextString(m) } +func (*ServerInfo) ProtoMessage() {} + +func (m *ServerInfo) GetServerName() *ServerName { + if m != nil { + return m.ServerName + } + return nil +} + +func (m *ServerInfo) GetWebuiPort() uint32 { + if m != nil && m.WebuiPort != nil { + return *m.WebuiPort + } + return 0 +} + +type GetServerInfoResponse struct { + ServerInfo *ServerInfo `protobuf:"bytes,1,req,name=server_info" json:"server_info,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetServerInfoResponse) Reset() { *m = GetServerInfoResponse{} } +func (m *GetServerInfoResponse) String() string { return proto1.CompactTextString(m) } +func (*GetServerInfoResponse) ProtoMessage() {} + +func (m *GetServerInfoResponse) GetServerInfo() *ServerInfo { + if m != nil { + return m.ServerInfo + } + return nil +} + +func init() { + proto1.RegisterEnum("proto.GetRegionInfoResponse_CompactionState", GetRegionInfoResponse_CompactionState_name, GetRegionInfoResponse_CompactionState_value) + proto1.RegisterEnum("proto.OpenRegionResponse_RegionOpeningState", OpenRegionResponse_RegionOpeningState_name, OpenRegionResponse_RegionOpeningState_value) +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/Aggregate.pb.go b/vendor/github.com/pingcap/go-hbase/proto/Aggregate.pb.go new file mode 100644 index 000000000..1eb1ff8f2 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/Aggregate.pb.go @@ -0,0 +1,82 @@ +// Code generated by protoc-gen-go. +// source: Aggregate.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type AggregateRequest struct { + // * The request passed to the AggregateService consists of three parts + // (1) the (canonical) classname of the ColumnInterpreter implementation + // (2) the Scan query + // (3) any bytes required to construct the ColumnInterpreter object + // properly + InterpreterClassName *string `protobuf:"bytes,1,req,name=interpreter_class_name" json:"interpreter_class_name,omitempty"` + Scan *Scan `protobuf:"bytes,2,req,name=scan" json:"scan,omitempty"` + InterpreterSpecificBytes []byte `protobuf:"bytes,3,opt,name=interpreter_specific_bytes" json:"interpreter_specific_bytes,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AggregateRequest) Reset() { *m = AggregateRequest{} } +func (m *AggregateRequest) String() string { return proto1.CompactTextString(m) } +func (*AggregateRequest) ProtoMessage() {} + +func (m *AggregateRequest) GetInterpreterClassName() string { + if m != nil && m.InterpreterClassName != nil { + return *m.InterpreterClassName + } + return "" +} + +func (m *AggregateRequest) GetScan() *Scan { + if m != nil { + return m.Scan + } + return nil +} + +func (m *AggregateRequest) GetInterpreterSpecificBytes() []byte { + if m != nil { + return m.InterpreterSpecificBytes + } + return nil +} + +type AggregateResponse struct { + // * + // The AggregateService methods all have a response that either is a Pair + // or a simple object. When it is a Pair both first_part and second_part + // have defined values (and the second_part is not present in the response + // when the response is not a pair). Refer to the AggregateImplementation + // class for an overview of the AggregateResponse object constructions. + FirstPart [][]byte `protobuf:"bytes,1,rep,name=first_part" json:"first_part,omitempty"` + SecondPart []byte `protobuf:"bytes,2,opt,name=second_part" json:"second_part,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AggregateResponse) Reset() { *m = AggregateResponse{} } +func (m *AggregateResponse) String() string { return proto1.CompactTextString(m) } +func (*AggregateResponse) ProtoMessage() {} + +func (m *AggregateResponse) GetFirstPart() [][]byte { + if m != nil { + return m.FirstPart + } + return nil +} + +func (m *AggregateResponse) GetSecondPart() []byte { + if m != nil { + return m.SecondPart + } + return nil +} + +func init() { +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/Authentication.pb.go b/vendor/github.com/pingcap/go-hbase/proto/Authentication.pb.go new file mode 100644 index 000000000..c3ebb9d0b --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/Authentication.pb.go @@ -0,0 +1,228 @@ +// Code generated by protoc-gen-go. +// source: Authentication.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type TokenIdentifier_Kind int32 + +const ( + TokenIdentifier_HBASE_AUTH_TOKEN TokenIdentifier_Kind = 0 +) + +var TokenIdentifier_Kind_name = map[int32]string{ + 0: "HBASE_AUTH_TOKEN", +} +var TokenIdentifier_Kind_value = map[string]int32{ + "HBASE_AUTH_TOKEN": 0, +} + +func (x TokenIdentifier_Kind) Enum() *TokenIdentifier_Kind { + p := new(TokenIdentifier_Kind) + *p = x + return p +} +func (x TokenIdentifier_Kind) String() string { + return proto1.EnumName(TokenIdentifier_Kind_name, int32(x)) +} +func (x *TokenIdentifier_Kind) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(TokenIdentifier_Kind_value, data, "TokenIdentifier_Kind") + if err != nil { + return err + } + *x = TokenIdentifier_Kind(value) + return nil +} + +type AuthenticationKey struct { + Id *int32 `protobuf:"varint,1,req,name=id" json:"id,omitempty"` + ExpirationDate *int64 `protobuf:"varint,2,req,name=expiration_date" json:"expiration_date,omitempty"` + Key []byte `protobuf:"bytes,3,req,name=key" json:"key,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AuthenticationKey) Reset() { *m = AuthenticationKey{} } +func (m *AuthenticationKey) String() string { return proto1.CompactTextString(m) } +func (*AuthenticationKey) ProtoMessage() {} + +func (m *AuthenticationKey) GetId() int32 { + if m != nil && m.Id != nil { + return *m.Id + } + return 0 +} + +func (m *AuthenticationKey) GetExpirationDate() int64 { + if m != nil && m.ExpirationDate != nil { + return *m.ExpirationDate + } + return 0 +} + +func (m *AuthenticationKey) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +type TokenIdentifier struct { + Kind *TokenIdentifier_Kind `protobuf:"varint,1,req,name=kind,enum=proto.TokenIdentifier_Kind" json:"kind,omitempty"` + Username []byte `protobuf:"bytes,2,req,name=username" json:"username,omitempty"` + KeyId *int32 `protobuf:"varint,3,req,name=key_id" json:"key_id,omitempty"` + IssueDate *int64 `protobuf:"varint,4,opt,name=issue_date" json:"issue_date,omitempty"` + ExpirationDate *int64 `protobuf:"varint,5,opt,name=expiration_date" json:"expiration_date,omitempty"` + SequenceNumber *int64 `protobuf:"varint,6,opt,name=sequence_number" json:"sequence_number,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TokenIdentifier) Reset() { *m = TokenIdentifier{} } +func (m *TokenIdentifier) String() string { return proto1.CompactTextString(m) } +func (*TokenIdentifier) ProtoMessage() {} + +func (m *TokenIdentifier) GetKind() TokenIdentifier_Kind { + if m != nil && m.Kind != nil { + return *m.Kind + } + return TokenIdentifier_HBASE_AUTH_TOKEN +} + +func (m *TokenIdentifier) GetUsername() []byte { + if m != nil { + return m.Username + } + return nil +} + +func (m *TokenIdentifier) GetKeyId() int32 { + if m != nil && m.KeyId != nil { + return *m.KeyId + } + return 0 +} + +func (m *TokenIdentifier) GetIssueDate() int64 { + if m != nil && m.IssueDate != nil { + return *m.IssueDate + } + return 0 +} + +func (m *TokenIdentifier) GetExpirationDate() int64 { + if m != nil && m.ExpirationDate != nil { + return *m.ExpirationDate + } + return 0 +} + +func (m *TokenIdentifier) GetSequenceNumber() int64 { + if m != nil && m.SequenceNumber != nil { + return *m.SequenceNumber + } + return 0 +} + +// Serialization of the org.apache.hadoop.security.token.Token class +// Note that this is a Hadoop class, so fields may change! +type Token struct { + // the TokenIdentifier in serialized form + // Note: we can't use the protobuf directly because the Hadoop Token class + // only stores the serialized bytes + Identifier []byte `protobuf:"bytes,1,opt,name=identifier" json:"identifier,omitempty"` + Password []byte `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"` + Service []byte `protobuf:"bytes,3,opt,name=service" json:"service,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Token) Reset() { *m = Token{} } +func (m *Token) String() string { return proto1.CompactTextString(m) } +func (*Token) ProtoMessage() {} + +func (m *Token) GetIdentifier() []byte { + if m != nil { + return m.Identifier + } + return nil +} + +func (m *Token) GetPassword() []byte { + if m != nil { + return m.Password + } + return nil +} + +func (m *Token) GetService() []byte { + if m != nil { + return m.Service + } + return nil +} + +// RPC request & response messages +type GetAuthenticationTokenRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetAuthenticationTokenRequest) Reset() { *m = GetAuthenticationTokenRequest{} } +func (m *GetAuthenticationTokenRequest) String() string { return proto1.CompactTextString(m) } +func (*GetAuthenticationTokenRequest) ProtoMessage() {} + +type GetAuthenticationTokenResponse struct { + Token *Token `protobuf:"bytes,1,opt,name=token" json:"token,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetAuthenticationTokenResponse) Reset() { *m = GetAuthenticationTokenResponse{} } +func (m *GetAuthenticationTokenResponse) String() string { return proto1.CompactTextString(m) } +func (*GetAuthenticationTokenResponse) ProtoMessage() {} + +func (m *GetAuthenticationTokenResponse) GetToken() *Token { + if m != nil { + return m.Token + } + return nil +} + +type WhoAmIRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *WhoAmIRequest) Reset() { *m = WhoAmIRequest{} } +func (m *WhoAmIRequest) String() string { return proto1.CompactTextString(m) } +func (*WhoAmIRequest) ProtoMessage() {} + +type WhoAmIResponse struct { + Username *string `protobuf:"bytes,1,opt,name=username" json:"username,omitempty"` + AuthMethod *string `protobuf:"bytes,2,opt,name=auth_method" json:"auth_method,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *WhoAmIResponse) Reset() { *m = WhoAmIResponse{} } +func (m *WhoAmIResponse) String() string { return proto1.CompactTextString(m) } +func (*WhoAmIResponse) ProtoMessage() {} + +func (m *WhoAmIResponse) GetUsername() string { + if m != nil && m.Username != nil { + return *m.Username + } + return "" +} + +func (m *WhoAmIResponse) GetAuthMethod() string { + if m != nil && m.AuthMethod != nil { + return *m.AuthMethod + } + return "" +} + +func init() { + proto1.RegisterEnum("proto.TokenIdentifier_Kind", TokenIdentifier_Kind_name, TokenIdentifier_Kind_value) +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/Cell.pb.go b/vendor/github.com/pingcap/go-hbase/proto/Cell.pb.go new file mode 100644 index 000000000..33da228b8 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/Cell.pb.go @@ -0,0 +1,197 @@ +// Code generated by protoc-gen-go. +// source: Cell.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +// * +// The type of the key in a Cell +type CellType int32 + +const ( + CellType_MINIMUM CellType = 0 + CellType_PUT CellType = 4 + CellType_DELETE CellType = 8 + CellType_DELETE_COLUMN CellType = 12 + CellType_DELETE_FAMILY CellType = 14 + // MAXIMUM is used when searching; you look from maximum on down. + CellType_MAXIMUM CellType = 255 +) + +var CellType_name = map[int32]string{ + 0: "MINIMUM", + 4: "PUT", + 8: "DELETE", + 12: "DELETE_COLUMN", + 14: "DELETE_FAMILY", + 255: "MAXIMUM", +} +var CellType_value = map[string]int32{ + "MINIMUM": 0, + "PUT": 4, + "DELETE": 8, + "DELETE_COLUMN": 12, + "DELETE_FAMILY": 14, + "MAXIMUM": 255, +} + +func (x CellType) Enum() *CellType { + p := new(CellType) + *p = x + return p +} +func (x CellType) String() string { + return proto1.EnumName(CellType_name, int32(x)) +} +func (x *CellType) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(CellType_value, data, "CellType") + if err != nil { + return err + } + *x = CellType(value) + return nil +} + +// * +// Protocol buffer version of Cell. +type Cell struct { + Row []byte `protobuf:"bytes,1,opt,name=row" json:"row,omitempty"` + Family []byte `protobuf:"bytes,2,opt,name=family" json:"family,omitempty"` + Qualifier []byte `protobuf:"bytes,3,opt,name=qualifier" json:"qualifier,omitempty"` + Timestamp *uint64 `protobuf:"varint,4,opt,name=timestamp" json:"timestamp,omitempty"` + CellType *CellType `protobuf:"varint,5,opt,name=cell_type,enum=proto.CellType" json:"cell_type,omitempty"` + Value []byte `protobuf:"bytes,6,opt,name=value" json:"value,omitempty"` + Tags []byte `protobuf:"bytes,7,opt,name=tags" json:"tags,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Cell) Reset() { *m = Cell{} } +func (m *Cell) String() string { return proto1.CompactTextString(m) } +func (*Cell) ProtoMessage() {} + +func (m *Cell) GetRow() []byte { + if m != nil { + return m.Row + } + return nil +} + +func (m *Cell) GetFamily() []byte { + if m != nil { + return m.Family + } + return nil +} + +func (m *Cell) GetQualifier() []byte { + if m != nil { + return m.Qualifier + } + return nil +} + +func (m *Cell) GetTimestamp() uint64 { + if m != nil && m.Timestamp != nil { + return *m.Timestamp + } + return 0 +} + +func (m *Cell) GetCellType() CellType { + if m != nil && m.CellType != nil { + return *m.CellType + } + return CellType_MINIMUM +} + +func (m *Cell) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *Cell) GetTags() []byte { + if m != nil { + return m.Tags + } + return nil +} + +// * +// Protocol buffer version of KeyValue. +// It doesn't have those transient parameters +type KeyValue struct { + Row []byte `protobuf:"bytes,1,req,name=row" json:"row,omitempty"` + Family []byte `protobuf:"bytes,2,req,name=family" json:"family,omitempty"` + Qualifier []byte `protobuf:"bytes,3,req,name=qualifier" json:"qualifier,omitempty"` + Timestamp *uint64 `protobuf:"varint,4,opt,name=timestamp" json:"timestamp,omitempty"` + KeyType *CellType `protobuf:"varint,5,opt,name=key_type,enum=proto.CellType" json:"key_type,omitempty"` + Value []byte `protobuf:"bytes,6,opt,name=value" json:"value,omitempty"` + Tags []byte `protobuf:"bytes,7,opt,name=tags" json:"tags,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *KeyValue) Reset() { *m = KeyValue{} } +func (m *KeyValue) String() string { return proto1.CompactTextString(m) } +func (*KeyValue) ProtoMessage() {} + +func (m *KeyValue) GetRow() []byte { + if m != nil { + return m.Row + } + return nil +} + +func (m *KeyValue) GetFamily() []byte { + if m != nil { + return m.Family + } + return nil +} + +func (m *KeyValue) GetQualifier() []byte { + if m != nil { + return m.Qualifier + } + return nil +} + +func (m *KeyValue) GetTimestamp() uint64 { + if m != nil && m.Timestamp != nil { + return *m.Timestamp + } + return 0 +} + +func (m *KeyValue) GetKeyType() CellType { + if m != nil && m.KeyType != nil { + return *m.KeyType + } + return CellType_MINIMUM +} + +func (m *KeyValue) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *KeyValue) GetTags() []byte { + if m != nil { + return m.Tags + } + return nil +} + +func init() { + proto1.RegisterEnum("proto.CellType", CellType_name, CellType_value) +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/Client.pb.go b/vendor/github.com/pingcap/go-hbase/proto/Client.pb.go new file mode 100644 index 000000000..63a7bc807 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/Client.pb.go @@ -0,0 +1,1411 @@ +// Code generated by protoc-gen-go. +// source: Client.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type MutationProto_Durability int32 + +const ( + MutationProto_USE_DEFAULT MutationProto_Durability = 0 + MutationProto_SKIP_WAL MutationProto_Durability = 1 + MutationProto_ASYNC_WAL MutationProto_Durability = 2 + MutationProto_SYNC_WAL MutationProto_Durability = 3 + MutationProto_FSYNC_WAL MutationProto_Durability = 4 +) + +var MutationProto_Durability_name = map[int32]string{ + 0: "USE_DEFAULT", + 1: "SKIP_WAL", + 2: "ASYNC_WAL", + 3: "SYNC_WAL", + 4: "FSYNC_WAL", +} +var MutationProto_Durability_value = map[string]int32{ + "USE_DEFAULT": 0, + "SKIP_WAL": 1, + "ASYNC_WAL": 2, + "SYNC_WAL": 3, + "FSYNC_WAL": 4, +} + +func (x MutationProto_Durability) Enum() *MutationProto_Durability { + p := new(MutationProto_Durability) + *p = x + return p +} +func (x MutationProto_Durability) String() string { + return proto1.EnumName(MutationProto_Durability_name, int32(x)) +} +func (x *MutationProto_Durability) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(MutationProto_Durability_value, data, "MutationProto_Durability") + if err != nil { + return err + } + *x = MutationProto_Durability(value) + return nil +} + +type MutationProto_MutationType int32 + +const ( + MutationProto_APPEND MutationProto_MutationType = 0 + MutationProto_INCREMENT MutationProto_MutationType = 1 + MutationProto_PUT MutationProto_MutationType = 2 + MutationProto_DELETE MutationProto_MutationType = 3 +) + +var MutationProto_MutationType_name = map[int32]string{ + 0: "APPEND", + 1: "INCREMENT", + 2: "PUT", + 3: "DELETE", +} +var MutationProto_MutationType_value = map[string]int32{ + "APPEND": 0, + "INCREMENT": 1, + "PUT": 2, + "DELETE": 3, +} + +func (x MutationProto_MutationType) Enum() *MutationProto_MutationType { + p := new(MutationProto_MutationType) + *p = x + return p +} +func (x MutationProto_MutationType) String() string { + return proto1.EnumName(MutationProto_MutationType_name, int32(x)) +} +func (x *MutationProto_MutationType) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(MutationProto_MutationType_value, data, "MutationProto_MutationType") + if err != nil { + return err + } + *x = MutationProto_MutationType(value) + return nil +} + +type MutationProto_DeleteType int32 + +const ( + MutationProto_DELETE_ONE_VERSION MutationProto_DeleteType = 0 + MutationProto_DELETE_MULTIPLE_VERSIONS MutationProto_DeleteType = 1 + MutationProto_DELETE_FAMILY MutationProto_DeleteType = 2 + MutationProto_DELETE_FAMILY_VERSION MutationProto_DeleteType = 3 +) + +var MutationProto_DeleteType_name = map[int32]string{ + 0: "DELETE_ONE_VERSION", + 1: "DELETE_MULTIPLE_VERSIONS", + 2: "DELETE_FAMILY", + 3: "DELETE_FAMILY_VERSION", +} +var MutationProto_DeleteType_value = map[string]int32{ + "DELETE_ONE_VERSION": 0, + "DELETE_MULTIPLE_VERSIONS": 1, + "DELETE_FAMILY": 2, + "DELETE_FAMILY_VERSION": 3, +} + +func (x MutationProto_DeleteType) Enum() *MutationProto_DeleteType { + p := new(MutationProto_DeleteType) + *p = x + return p +} +func (x MutationProto_DeleteType) String() string { + return proto1.EnumName(MutationProto_DeleteType_name, int32(x)) +} +func (x *MutationProto_DeleteType) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(MutationProto_DeleteType_value, data, "MutationProto_DeleteType") + if err != nil { + return err + } + *x = MutationProto_DeleteType(value) + return nil +} + +// * +// The protocol buffer version of Authorizations. +type Authorizations struct { + Label []string `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Authorizations) Reset() { *m = Authorizations{} } +func (m *Authorizations) String() string { return proto1.CompactTextString(m) } +func (*Authorizations) ProtoMessage() {} + +func (m *Authorizations) GetLabel() []string { + if m != nil { + return m.Label + } + return nil +} + +// * +// The protocol buffer version of CellVisibility. +type CellVisibility struct { + Expression *string `protobuf:"bytes,1,req,name=expression" json:"expression,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CellVisibility) Reset() { *m = CellVisibility{} } +func (m *CellVisibility) String() string { return proto1.CompactTextString(m) } +func (*CellVisibility) ProtoMessage() {} + +func (m *CellVisibility) GetExpression() string { + if m != nil && m.Expression != nil { + return *m.Expression + } + return "" +} + +// * +// Container for a list of column qualifier names of a family. +type Column struct { + Family []byte `protobuf:"bytes,1,req,name=family" json:"family,omitempty"` + Qualifier [][]byte `protobuf:"bytes,2,rep,name=qualifier" json:"qualifier,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Column) Reset() { *m = Column{} } +func (m *Column) String() string { return proto1.CompactTextString(m) } +func (*Column) ProtoMessage() {} + +func (m *Column) GetFamily() []byte { + if m != nil { + return m.Family + } + return nil +} + +func (m *Column) GetQualifier() [][]byte { + if m != nil { + return m.Qualifier + } + return nil +} + +// * +// The protocol buffer version of Get. +// Unless existence_only is specified, return all the requested data +// for the row that matches exactly, or the one that immediately +// precedes it if closest_row_before is specified. +type Get struct { + Row []byte `protobuf:"bytes,1,req,name=row" json:"row,omitempty"` + Column []*Column `protobuf:"bytes,2,rep,name=column" json:"column,omitempty"` + Attribute []*NameBytesPair `protobuf:"bytes,3,rep,name=attribute" json:"attribute,omitempty"` + Filter *Filter `protobuf:"bytes,4,opt,name=filter" json:"filter,omitempty"` + TimeRange *TimeRange `protobuf:"bytes,5,opt,name=time_range" json:"time_range,omitempty"` + MaxVersions *uint32 `protobuf:"varint,6,opt,name=max_versions,def=1" json:"max_versions,omitempty"` + CacheBlocks *bool `protobuf:"varint,7,opt,name=cache_blocks,def=1" json:"cache_blocks,omitempty"` + StoreLimit *uint32 `protobuf:"varint,8,opt,name=store_limit" json:"store_limit,omitempty"` + StoreOffset *uint32 `protobuf:"varint,9,opt,name=store_offset" json:"store_offset,omitempty"` + // The result isn't asked for, just check for + // the existence. + ExistenceOnly *bool `protobuf:"varint,10,opt,name=existence_only,def=0" json:"existence_only,omitempty"` + // If the row to get doesn't exist, return the + // closest row before. + ClosestRowBefore *bool `protobuf:"varint,11,opt,name=closest_row_before,def=0" json:"closest_row_before,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Get) Reset() { *m = Get{} } +func (m *Get) String() string { return proto1.CompactTextString(m) } +func (*Get) ProtoMessage() {} + +const Default_Get_MaxVersions uint32 = 1 +const Default_Get_CacheBlocks bool = true +const Default_Get_ExistenceOnly bool = false +const Default_Get_ClosestRowBefore bool = false + +func (m *Get) GetRow() []byte { + if m != nil { + return m.Row + } + return nil +} + +func (m *Get) GetColumn() []*Column { + if m != nil { + return m.Column + } + return nil +} + +func (m *Get) GetAttribute() []*NameBytesPair { + if m != nil { + return m.Attribute + } + return nil +} + +func (m *Get) GetFilter() *Filter { + if m != nil { + return m.Filter + } + return nil +} + +func (m *Get) GetTimeRange() *TimeRange { + if m != nil { + return m.TimeRange + } + return nil +} + +func (m *Get) GetMaxVersions() uint32 { + if m != nil && m.MaxVersions != nil { + return *m.MaxVersions + } + return Default_Get_MaxVersions +} + +func (m *Get) GetCacheBlocks() bool { + if m != nil && m.CacheBlocks != nil { + return *m.CacheBlocks + } + return Default_Get_CacheBlocks +} + +func (m *Get) GetStoreLimit() uint32 { + if m != nil && m.StoreLimit != nil { + return *m.StoreLimit + } + return 0 +} + +func (m *Get) GetStoreOffset() uint32 { + if m != nil && m.StoreOffset != nil { + return *m.StoreOffset + } + return 0 +} + +func (m *Get) GetExistenceOnly() bool { + if m != nil && m.ExistenceOnly != nil { + return *m.ExistenceOnly + } + return Default_Get_ExistenceOnly +} + +func (m *Get) GetClosestRowBefore() bool { + if m != nil && m.ClosestRowBefore != nil { + return *m.ClosestRowBefore + } + return Default_Get_ClosestRowBefore +} + +type Result struct { + // Result includes the Cells or else it just has a count of Cells + // that are carried otherwise. + Cell []*Cell `protobuf:"bytes,1,rep,name=cell" json:"cell,omitempty"` + // The below count is set when the associated cells are + // not part of this protobuf message; they are passed alongside + // and then this Message is just a placeholder with metadata. + // The count is needed to know how many to peel off the block of Cells as + // ours. NOTE: This is different from the pb managed cell_count of the + // 'cell' field above which is non-null when the cells are pb'd. + AssociatedCellCount *int32 `protobuf:"varint,2,opt,name=associated_cell_count" json:"associated_cell_count,omitempty"` + // used for Get to check existence only. Not set if existence_only was not set to true + // in the query. + Exists *bool `protobuf:"varint,3,opt,name=exists" json:"exists,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Result) Reset() { *m = Result{} } +func (m *Result) String() string { return proto1.CompactTextString(m) } +func (*Result) ProtoMessage() {} + +func (m *Result) GetCell() []*Cell { + if m != nil { + return m.Cell + } + return nil +} + +func (m *Result) GetAssociatedCellCount() int32 { + if m != nil && m.AssociatedCellCount != nil { + return *m.AssociatedCellCount + } + return 0 +} + +func (m *Result) GetExists() bool { + if m != nil && m.Exists != nil { + return *m.Exists + } + return false +} + +// * +// The get request. Perform a single Get operation. +type GetRequest struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + Get *Get `protobuf:"bytes,2,req,name=get" json:"get,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetRequest) Reset() { *m = GetRequest{} } +func (m *GetRequest) String() string { return proto1.CompactTextString(m) } +func (*GetRequest) ProtoMessage() {} + +func (m *GetRequest) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +func (m *GetRequest) GetGet() *Get { + if m != nil { + return m.Get + } + return nil +} + +type GetResponse struct { + Result *Result `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetResponse) Reset() { *m = GetResponse{} } +func (m *GetResponse) String() string { return proto1.CompactTextString(m) } +func (*GetResponse) ProtoMessage() {} + +func (m *GetResponse) GetResult() *Result { + if m != nil { + return m.Result + } + return nil +} + +// * +// Condition to check if the value of a given cell (row, +// family, qualifier) matches a value via a given comparator. +// +// Condition is used in check and mutate operations. +type Condition struct { + Row []byte `protobuf:"bytes,1,req,name=row" json:"row,omitempty"` + Family []byte `protobuf:"bytes,2,req,name=family" json:"family,omitempty"` + Qualifier []byte `protobuf:"bytes,3,req,name=qualifier" json:"qualifier,omitempty"` + CompareType *CompareType `protobuf:"varint,4,req,name=compare_type,enum=proto.CompareType" json:"compare_type,omitempty"` + Comparator *Comparator `protobuf:"bytes,5,req,name=comparator" json:"comparator,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Condition) Reset() { *m = Condition{} } +func (m *Condition) String() string { return proto1.CompactTextString(m) } +func (*Condition) ProtoMessage() {} + +func (m *Condition) GetRow() []byte { + if m != nil { + return m.Row + } + return nil +} + +func (m *Condition) GetFamily() []byte { + if m != nil { + return m.Family + } + return nil +} + +func (m *Condition) GetQualifier() []byte { + if m != nil { + return m.Qualifier + } + return nil +} + +func (m *Condition) GetCompareType() CompareType { + if m != nil && m.CompareType != nil { + return *m.CompareType + } + return CompareType_LESS +} + +func (m *Condition) GetComparator() *Comparator { + if m != nil { + return m.Comparator + } + return nil +} + +// * +// A specific mutation inside a mutate request. +// It can be an append, increment, put or delete based +// on the mutation type. It can be fully filled in or +// only metadata present because data is being carried +// elsewhere outside of pb. +type MutationProto struct { + Row []byte `protobuf:"bytes,1,opt,name=row" json:"row,omitempty"` + MutateType *MutationProto_MutationType `protobuf:"varint,2,opt,name=mutate_type,enum=proto.MutationProto_MutationType" json:"mutate_type,omitempty"` + ColumnValue []*MutationProto_ColumnValue `protobuf:"bytes,3,rep,name=column_value" json:"column_value,omitempty"` + Timestamp *uint64 `protobuf:"varint,4,opt,name=timestamp" json:"timestamp,omitempty"` + Attribute []*NameBytesPair `protobuf:"bytes,5,rep,name=attribute" json:"attribute,omitempty"` + Durability *MutationProto_Durability `protobuf:"varint,6,opt,name=durability,enum=proto.MutationProto_Durability,def=0" json:"durability,omitempty"` + // For some mutations, a result may be returned, in which case, + // time range can be specified for potential performance gain + TimeRange *TimeRange `protobuf:"bytes,7,opt,name=time_range" json:"time_range,omitempty"` + // The below count is set when the associated cells are NOT + // part of this protobuf message; they are passed alongside + // and then this Message is a placeholder with metadata. The + // count is needed to know how many to peel off the block of Cells as + // ours. NOTE: This is different from the pb managed cell_count of the + // 'cell' field above which is non-null when the cells are pb'd. + AssociatedCellCount *int32 `protobuf:"varint,8,opt,name=associated_cell_count" json:"associated_cell_count,omitempty"` + Nonce *uint64 `protobuf:"varint,9,opt,name=nonce" json:"nonce,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MutationProto) Reset() { *m = MutationProto{} } +func (m *MutationProto) String() string { return proto1.CompactTextString(m) } +func (*MutationProto) ProtoMessage() {} + +const Default_MutationProto_Durability MutationProto_Durability = MutationProto_USE_DEFAULT + +func (m *MutationProto) GetRow() []byte { + if m != nil { + return m.Row + } + return nil +} + +func (m *MutationProto) GetMutateType() MutationProto_MutationType { + if m != nil && m.MutateType != nil { + return *m.MutateType + } + return MutationProto_APPEND +} + +func (m *MutationProto) GetColumnValue() []*MutationProto_ColumnValue { + if m != nil { + return m.ColumnValue + } + return nil +} + +func (m *MutationProto) GetTimestamp() uint64 { + if m != nil && m.Timestamp != nil { + return *m.Timestamp + } + return 0 +} + +func (m *MutationProto) GetAttribute() []*NameBytesPair { + if m != nil { + return m.Attribute + } + return nil +} + +func (m *MutationProto) GetDurability() MutationProto_Durability { + if m != nil && m.Durability != nil { + return *m.Durability + } + return Default_MutationProto_Durability +} + +func (m *MutationProto) GetTimeRange() *TimeRange { + if m != nil { + return m.TimeRange + } + return nil +} + +func (m *MutationProto) GetAssociatedCellCount() int32 { + if m != nil && m.AssociatedCellCount != nil { + return *m.AssociatedCellCount + } + return 0 +} + +func (m *MutationProto) GetNonce() uint64 { + if m != nil && m.Nonce != nil { + return *m.Nonce + } + return 0 +} + +type MutationProto_ColumnValue struct { + Family []byte `protobuf:"bytes,1,req,name=family" json:"family,omitempty"` + QualifierValue []*MutationProto_ColumnValue_QualifierValue `protobuf:"bytes,2,rep,name=qualifier_value" json:"qualifier_value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MutationProto_ColumnValue) Reset() { *m = MutationProto_ColumnValue{} } +func (m *MutationProto_ColumnValue) String() string { return proto1.CompactTextString(m) } +func (*MutationProto_ColumnValue) ProtoMessage() {} + +func (m *MutationProto_ColumnValue) GetFamily() []byte { + if m != nil { + return m.Family + } + return nil +} + +func (m *MutationProto_ColumnValue) GetQualifierValue() []*MutationProto_ColumnValue_QualifierValue { + if m != nil { + return m.QualifierValue + } + return nil +} + +type MutationProto_ColumnValue_QualifierValue struct { + Qualifier []byte `protobuf:"bytes,1,opt,name=qualifier" json:"qualifier,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` + Timestamp *uint64 `protobuf:"varint,3,opt,name=timestamp" json:"timestamp,omitempty"` + DeleteType *MutationProto_DeleteType `protobuf:"varint,4,opt,name=delete_type,enum=proto.MutationProto_DeleteType" json:"delete_type,omitempty"` + Tags []byte `protobuf:"bytes,5,opt,name=tags" json:"tags,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MutationProto_ColumnValue_QualifierValue) Reset() { + *m = MutationProto_ColumnValue_QualifierValue{} +} +func (m *MutationProto_ColumnValue_QualifierValue) String() string { return proto1.CompactTextString(m) } +func (*MutationProto_ColumnValue_QualifierValue) ProtoMessage() {} + +func (m *MutationProto_ColumnValue_QualifierValue) GetQualifier() []byte { + if m != nil { + return m.Qualifier + } + return nil +} + +func (m *MutationProto_ColumnValue_QualifierValue) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +func (m *MutationProto_ColumnValue_QualifierValue) GetTimestamp() uint64 { + if m != nil && m.Timestamp != nil { + return *m.Timestamp + } + return 0 +} + +func (m *MutationProto_ColumnValue_QualifierValue) GetDeleteType() MutationProto_DeleteType { + if m != nil && m.DeleteType != nil { + return *m.DeleteType + } + return MutationProto_DELETE_ONE_VERSION +} + +func (m *MutationProto_ColumnValue_QualifierValue) GetTags() []byte { + if m != nil { + return m.Tags + } + return nil +} + +// * +// The mutate request. Perform a single Mutate operation. +// +// Optionally, you can specify a condition. The mutate +// will take place only if the condition is met. Otherwise, +// the mutate will be ignored. In the response result, +// parameter processed is used to indicate if the mutate +// actually happened. +type MutateRequest struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + Mutation *MutationProto `protobuf:"bytes,2,req,name=mutation" json:"mutation,omitempty"` + Condition *Condition `protobuf:"bytes,3,opt,name=condition" json:"condition,omitempty"` + NonceGroup *uint64 `protobuf:"varint,4,opt,name=nonce_group" json:"nonce_group,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MutateRequest) Reset() { *m = MutateRequest{} } +func (m *MutateRequest) String() string { return proto1.CompactTextString(m) } +func (*MutateRequest) ProtoMessage() {} + +func (m *MutateRequest) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +func (m *MutateRequest) GetMutation() *MutationProto { + if m != nil { + return m.Mutation + } + return nil +} + +func (m *MutateRequest) GetCondition() *Condition { + if m != nil { + return m.Condition + } + return nil +} + +func (m *MutateRequest) GetNonceGroup() uint64 { + if m != nil && m.NonceGroup != nil { + return *m.NonceGroup + } + return 0 +} + +type MutateResponse struct { + Result *Result `protobuf:"bytes,1,opt,name=result" json:"result,omitempty"` + // used for mutate to indicate processed only + Processed *bool `protobuf:"varint,2,opt,name=processed" json:"processed,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MutateResponse) Reset() { *m = MutateResponse{} } +func (m *MutateResponse) String() string { return proto1.CompactTextString(m) } +func (*MutateResponse) ProtoMessage() {} + +func (m *MutateResponse) GetResult() *Result { + if m != nil { + return m.Result + } + return nil +} + +func (m *MutateResponse) GetProcessed() bool { + if m != nil && m.Processed != nil { + return *m.Processed + } + return false +} + +// * +// Instead of get from a table, you can scan it with optional filters. +// You can specify the row key range, time range, the columns/families +// to scan and so on. +// +// This scan is used the first time in a scan request. The response of +// the initial scan will return a scanner id, which should be used to +// fetch result batches later on before it is closed. +type Scan struct { + Column []*Column `protobuf:"bytes,1,rep,name=column" json:"column,omitempty"` + Attribute []*NameBytesPair `protobuf:"bytes,2,rep,name=attribute" json:"attribute,omitempty"` + StartRow []byte `protobuf:"bytes,3,opt,name=start_row" json:"start_row,omitempty"` + StopRow []byte `protobuf:"bytes,4,opt,name=stop_row" json:"stop_row,omitempty"` + Filter *Filter `protobuf:"bytes,5,opt,name=filter" json:"filter,omitempty"` + TimeRange *TimeRange `protobuf:"bytes,6,opt,name=time_range" json:"time_range,omitempty"` + MaxVersions *uint32 `protobuf:"varint,7,opt,name=max_versions,def=1" json:"max_versions,omitempty"` + CacheBlocks *bool `protobuf:"varint,8,opt,name=cache_blocks,def=1" json:"cache_blocks,omitempty"` + BatchSize *uint32 `protobuf:"varint,9,opt,name=batch_size" json:"batch_size,omitempty"` + MaxResultSize *uint64 `protobuf:"varint,10,opt,name=max_result_size" json:"max_result_size,omitempty"` + StoreLimit *uint32 `protobuf:"varint,11,opt,name=store_limit" json:"store_limit,omitempty"` + StoreOffset *uint32 `protobuf:"varint,12,opt,name=store_offset" json:"store_offset,omitempty"` + LoadColumnFamiliesOnDemand *bool `protobuf:"varint,13,opt,name=load_column_families_on_demand" json:"load_column_families_on_demand,omitempty"` + Small *bool `protobuf:"varint,14,opt,name=small" json:"small,omitempty"` + Reversed *bool `protobuf:"varint,15,opt,name=reversed,def=0" json:"reversed,omitempty"` + Caching *uint32 `protobuf:"varint,17,opt,name=caching" json:"caching,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Scan) Reset() { *m = Scan{} } +func (m *Scan) String() string { return proto1.CompactTextString(m) } +func (*Scan) ProtoMessage() {} + +const Default_Scan_MaxVersions uint32 = 1 +const Default_Scan_CacheBlocks bool = true +const Default_Scan_Reversed bool = false + +func (m *Scan) GetColumn() []*Column { + if m != nil { + return m.Column + } + return nil +} + +func (m *Scan) GetAttribute() []*NameBytesPair { + if m != nil { + return m.Attribute + } + return nil +} + +func (m *Scan) GetStartRow() []byte { + if m != nil { + return m.StartRow + } + return nil +} + +func (m *Scan) GetStopRow() []byte { + if m != nil { + return m.StopRow + } + return nil +} + +func (m *Scan) GetFilter() *Filter { + if m != nil { + return m.Filter + } + return nil +} + +func (m *Scan) GetTimeRange() *TimeRange { + if m != nil { + return m.TimeRange + } + return nil +} + +func (m *Scan) GetMaxVersions() uint32 { + if m != nil && m.MaxVersions != nil { + return *m.MaxVersions + } + return Default_Scan_MaxVersions +} + +func (m *Scan) GetCacheBlocks() bool { + if m != nil && m.CacheBlocks != nil { + return *m.CacheBlocks + } + return Default_Scan_CacheBlocks +} + +func (m *Scan) GetBatchSize() uint32 { + if m != nil && m.BatchSize != nil { + return *m.BatchSize + } + return 0 +} + +func (m *Scan) GetMaxResultSize() uint64 { + if m != nil && m.MaxResultSize != nil { + return *m.MaxResultSize + } + return 0 +} + +func (m *Scan) GetStoreLimit() uint32 { + if m != nil && m.StoreLimit != nil { + return *m.StoreLimit + } + return 0 +} + +func (m *Scan) GetStoreOffset() uint32 { + if m != nil && m.StoreOffset != nil { + return *m.StoreOffset + } + return 0 +} + +func (m *Scan) GetLoadColumnFamiliesOnDemand() bool { + if m != nil && m.LoadColumnFamiliesOnDemand != nil { + return *m.LoadColumnFamiliesOnDemand + } + return false +} + +func (m *Scan) GetSmall() bool { + if m != nil && m.Small != nil { + return *m.Small + } + return false +} + +func (m *Scan) GetReversed() bool { + if m != nil && m.Reversed != nil { + return *m.Reversed + } + return Default_Scan_Reversed +} + +func (m *Scan) GetCaching() uint32 { + if m != nil && m.Caching != nil { + return *m.Caching + } + return 0 +} + +// * +// A scan request. Initially, it should specify a scan. Later on, you +// can use the scanner id returned to fetch result batches with a different +// scan request. +// +// The scanner will remain open if there are more results, and it's not +// asked to be closed explicitly. +// +// You can fetch the results and ask the scanner to be closed to save +// a trip if you are not interested in remaining results. +type ScanRequest struct { + Region *RegionSpecifier `protobuf:"bytes,1,opt,name=region" json:"region,omitempty"` + Scan *Scan `protobuf:"bytes,2,opt,name=scan" json:"scan,omitempty"` + ScannerId *uint64 `protobuf:"varint,3,opt,name=scanner_id" json:"scanner_id,omitempty"` + NumberOfRows *uint32 `protobuf:"varint,4,opt,name=number_of_rows" json:"number_of_rows,omitempty"` + CloseScanner *bool `protobuf:"varint,5,opt,name=close_scanner" json:"close_scanner,omitempty"` + NextCallSeq *uint64 `protobuf:"varint,6,opt,name=next_call_seq" json:"next_call_seq,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ScanRequest) Reset() { *m = ScanRequest{} } +func (m *ScanRequest) String() string { return proto1.CompactTextString(m) } +func (*ScanRequest) ProtoMessage() {} + +func (m *ScanRequest) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +func (m *ScanRequest) GetScan() *Scan { + if m != nil { + return m.Scan + } + return nil +} + +func (m *ScanRequest) GetScannerId() uint64 { + if m != nil && m.ScannerId != nil { + return *m.ScannerId + } + return 0 +} + +func (m *ScanRequest) GetNumberOfRows() uint32 { + if m != nil && m.NumberOfRows != nil { + return *m.NumberOfRows + } + return 0 +} + +func (m *ScanRequest) GetCloseScanner() bool { + if m != nil && m.CloseScanner != nil { + return *m.CloseScanner + } + return false +} + +func (m *ScanRequest) GetNextCallSeq() uint64 { + if m != nil && m.NextCallSeq != nil { + return *m.NextCallSeq + } + return 0 +} + +// * +// The scan response. If there are no more results, more_results will +// be false. If it is not specified, it means there are more. +type ScanResponse struct { + // This field is filled in if we are doing cellblocks. A cellblock is made up + // of all Cells serialized out as one cellblock BUT responses from a server + // have their Cells grouped by Result. So we can reconstitute the + // Results on the client-side, this field is a list of counts of Cells + // in each Result that makes up the response. For example, if this field + // has 3, 3, 3 in it, then we know that on the client, we are to make + // three Results each of three Cells each. + CellsPerResult []uint32 `protobuf:"varint,1,rep,name=cells_per_result" json:"cells_per_result,omitempty"` + ScannerId *uint64 `protobuf:"varint,2,opt,name=scanner_id" json:"scanner_id,omitempty"` + MoreResults *bool `protobuf:"varint,3,opt,name=more_results" json:"more_results,omitempty"` + Ttl *uint32 `protobuf:"varint,4,opt,name=ttl" json:"ttl,omitempty"` + // If cells are not carried in an accompanying cellblock, then they are pb'd here. + // This field is mutually exclusive with cells_per_result (since the Cells will + // be inside the pb'd Result) + Results []*Result `protobuf:"bytes,5,rep,name=results" json:"results,omitempty"` + // A server may choose to limit the number of results returned to the client for + // reasons such as the size in bytes or quantity of results accumulated. This field + // will true when more results exist in the current region. + MoreResultsInRegion *bool `protobuf:"varint,8,opt,name=more_results_in_region" json:"more_results_in_region,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ScanResponse) Reset() { *m = ScanResponse{} } +func (m *ScanResponse) String() string { return proto1.CompactTextString(m) } +func (*ScanResponse) ProtoMessage() {} + +func (m *ScanResponse) GetCellsPerResult() []uint32 { + if m != nil { + return m.CellsPerResult + } + return nil +} + +func (m *ScanResponse) GetScannerId() uint64 { + if m != nil && m.ScannerId != nil { + return *m.ScannerId + } + return 0 +} + +func (m *ScanResponse) GetMoreResults() bool { + if m != nil && m.MoreResults != nil { + return *m.MoreResults + } + return false +} + +func (m *ScanResponse) GetTtl() uint32 { + if m != nil && m.Ttl != nil { + return *m.Ttl + } + return 0 +} + +func (m *ScanResponse) GetResults() []*Result { + if m != nil { + return m.Results + } + return nil +} + +func (m *ScanResponse) GetMoreResultsInRegion() bool { + if m != nil && m.MoreResultsInRegion != nil { + return *m.MoreResultsInRegion + } + return false +} + +// * +// Atomically bulk load multiple HFiles (say from different column families) +// into an open region. +type BulkLoadHFileRequest struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + FamilyPath []*BulkLoadHFileRequest_FamilyPath `protobuf:"bytes,2,rep,name=family_path" json:"family_path,omitempty"` + AssignSeqNum *bool `protobuf:"varint,3,opt,name=assign_seq_num" json:"assign_seq_num,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *BulkLoadHFileRequest) Reset() { *m = BulkLoadHFileRequest{} } +func (m *BulkLoadHFileRequest) String() string { return proto1.CompactTextString(m) } +func (*BulkLoadHFileRequest) ProtoMessage() {} + +func (m *BulkLoadHFileRequest) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +func (m *BulkLoadHFileRequest) GetFamilyPath() []*BulkLoadHFileRequest_FamilyPath { + if m != nil { + return m.FamilyPath + } + return nil +} + +func (m *BulkLoadHFileRequest) GetAssignSeqNum() bool { + if m != nil && m.AssignSeqNum != nil { + return *m.AssignSeqNum + } + return false +} + +type BulkLoadHFileRequest_FamilyPath struct { + Family []byte `protobuf:"bytes,1,req,name=family" json:"family,omitempty"` + Path *string `protobuf:"bytes,2,req,name=path" json:"path,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *BulkLoadHFileRequest_FamilyPath) Reset() { *m = BulkLoadHFileRequest_FamilyPath{} } +func (m *BulkLoadHFileRequest_FamilyPath) String() string { return proto1.CompactTextString(m) } +func (*BulkLoadHFileRequest_FamilyPath) ProtoMessage() {} + +func (m *BulkLoadHFileRequest_FamilyPath) GetFamily() []byte { + if m != nil { + return m.Family + } + return nil +} + +func (m *BulkLoadHFileRequest_FamilyPath) GetPath() string { + if m != nil && m.Path != nil { + return *m.Path + } + return "" +} + +type BulkLoadHFileResponse struct { + Loaded *bool `protobuf:"varint,1,req,name=loaded" json:"loaded,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *BulkLoadHFileResponse) Reset() { *m = BulkLoadHFileResponse{} } +func (m *BulkLoadHFileResponse) String() string { return proto1.CompactTextString(m) } +func (*BulkLoadHFileResponse) ProtoMessage() {} + +func (m *BulkLoadHFileResponse) GetLoaded() bool { + if m != nil && m.Loaded != nil { + return *m.Loaded + } + return false +} + +type CoprocessorServiceCall struct { + Row []byte `protobuf:"bytes,1,req,name=row" json:"row,omitempty"` + ServiceName *string `protobuf:"bytes,2,req,name=service_name" json:"service_name,omitempty"` + MethodName *string `protobuf:"bytes,3,req,name=method_name" json:"method_name,omitempty"` + Request []byte `protobuf:"bytes,4,req,name=request" json:"request,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CoprocessorServiceCall) Reset() { *m = CoprocessorServiceCall{} } +func (m *CoprocessorServiceCall) String() string { return proto1.CompactTextString(m) } +func (*CoprocessorServiceCall) ProtoMessage() {} + +func (m *CoprocessorServiceCall) GetRow() []byte { + if m != nil { + return m.Row + } + return nil +} + +func (m *CoprocessorServiceCall) GetServiceName() string { + if m != nil && m.ServiceName != nil { + return *m.ServiceName + } + return "" +} + +func (m *CoprocessorServiceCall) GetMethodName() string { + if m != nil && m.MethodName != nil { + return *m.MethodName + } + return "" +} + +func (m *CoprocessorServiceCall) GetRequest() []byte { + if m != nil { + return m.Request + } + return nil +} + +type CoprocessorServiceResult struct { + Value *NameBytesPair `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CoprocessorServiceResult) Reset() { *m = CoprocessorServiceResult{} } +func (m *CoprocessorServiceResult) String() string { return proto1.CompactTextString(m) } +func (*CoprocessorServiceResult) ProtoMessage() {} + +func (m *CoprocessorServiceResult) GetValue() *NameBytesPair { + if m != nil { + return m.Value + } + return nil +} + +type CoprocessorServiceRequest struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + Call *CoprocessorServiceCall `protobuf:"bytes,2,req,name=call" json:"call,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CoprocessorServiceRequest) Reset() { *m = CoprocessorServiceRequest{} } +func (m *CoprocessorServiceRequest) String() string { return proto1.CompactTextString(m) } +func (*CoprocessorServiceRequest) ProtoMessage() {} + +func (m *CoprocessorServiceRequest) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +func (m *CoprocessorServiceRequest) GetCall() *CoprocessorServiceCall { + if m != nil { + return m.Call + } + return nil +} + +type CoprocessorServiceResponse struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + Value *NameBytesPair `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CoprocessorServiceResponse) Reset() { *m = CoprocessorServiceResponse{} } +func (m *CoprocessorServiceResponse) String() string { return proto1.CompactTextString(m) } +func (*CoprocessorServiceResponse) ProtoMessage() {} + +func (m *CoprocessorServiceResponse) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +func (m *CoprocessorServiceResponse) GetValue() *NameBytesPair { + if m != nil { + return m.Value + } + return nil +} + +// Either a Get or a Mutation +type Action struct { + // If part of a multi action, useful aligning + // result with what was originally submitted. + Index *uint32 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"` + Mutation *MutationProto `protobuf:"bytes,2,opt,name=mutation" json:"mutation,omitempty"` + Get *Get `protobuf:"bytes,3,opt,name=get" json:"get,omitempty"` + ServiceCall *CoprocessorServiceCall `protobuf:"bytes,4,opt,name=service_call" json:"service_call,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Action) Reset() { *m = Action{} } +func (m *Action) String() string { return proto1.CompactTextString(m) } +func (*Action) ProtoMessage() {} + +func (m *Action) GetIndex() uint32 { + if m != nil && m.Index != nil { + return *m.Index + } + return 0 +} + +func (m *Action) GetMutation() *MutationProto { + if m != nil { + return m.Mutation + } + return nil +} + +func (m *Action) GetGet() *Get { + if m != nil { + return m.Get + } + return nil +} + +func (m *Action) GetServiceCall() *CoprocessorServiceCall { + if m != nil { + return m.ServiceCall + } + return nil +} + +// * +// Actions to run against a Region. +type RegionAction struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + // When set, run mutations as atomic unit. + Atomic *bool `protobuf:"varint,2,opt,name=atomic" json:"atomic,omitempty"` + Action []*Action `protobuf:"bytes,3,rep,name=action" json:"action,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionAction) Reset() { *m = RegionAction{} } +func (m *RegionAction) String() string { return proto1.CompactTextString(m) } +func (*RegionAction) ProtoMessage() {} + +func (m *RegionAction) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +func (m *RegionAction) GetAtomic() bool { + if m != nil && m.Atomic != nil { + return *m.Atomic + } + return false +} + +func (m *RegionAction) GetAction() []*Action { + if m != nil { + return m.Action + } + return nil +} + +// +// Statistics about the current load on the region +type RegionLoadStats struct { + // Percent load on the memstore. Guaranteed to be positive, between 0 and 100. + MemstoreLoad *int32 `protobuf:"varint,1,opt,name=memstoreLoad,def=0" json:"memstoreLoad,omitempty"` + // Percent JVM heap occupancy. Guaranteed to be positive, between 0 and 100. + // We can move this to "ServerLoadStats" should we develop them. + HeapOccupancy *int32 `protobuf:"varint,2,opt,name=heapOccupancy,def=0" json:"heapOccupancy,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionLoadStats) Reset() { *m = RegionLoadStats{} } +func (m *RegionLoadStats) String() string { return proto1.CompactTextString(m) } +func (*RegionLoadStats) ProtoMessage() {} + +const Default_RegionLoadStats_MemstoreLoad int32 = 0 +const Default_RegionLoadStats_HeapOccupancy int32 = 0 + +func (m *RegionLoadStats) GetMemstoreLoad() int32 { + if m != nil && m.MemstoreLoad != nil { + return *m.MemstoreLoad + } + return Default_RegionLoadStats_MemstoreLoad +} + +func (m *RegionLoadStats) GetHeapOccupancy() int32 { + if m != nil && m.HeapOccupancy != nil { + return *m.HeapOccupancy + } + return Default_RegionLoadStats_HeapOccupancy +} + +// * +// Either a Result or an Exception NameBytesPair (keyed by +// exception name whose value is the exception stringified) +// or maybe empty if no result and no exception. +type ResultOrException struct { + // If part of a multi call, save original index of the list of all + // passed so can align this response w/ original request. + Index *uint32 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"` + Result *Result `protobuf:"bytes,2,opt,name=result" json:"result,omitempty"` + Exception *NameBytesPair `protobuf:"bytes,3,opt,name=exception" json:"exception,omitempty"` + // result if this was a coprocessor service call + ServiceResult *CoprocessorServiceResult `protobuf:"bytes,4,opt,name=service_result" json:"service_result,omitempty"` + // current load on the region + LoadStats *RegionLoadStats `protobuf:"bytes,5,opt,name=loadStats" json:"loadStats,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ResultOrException) Reset() { *m = ResultOrException{} } +func (m *ResultOrException) String() string { return proto1.CompactTextString(m) } +func (*ResultOrException) ProtoMessage() {} + +func (m *ResultOrException) GetIndex() uint32 { + if m != nil && m.Index != nil { + return *m.Index + } + return 0 +} + +func (m *ResultOrException) GetResult() *Result { + if m != nil { + return m.Result + } + return nil +} + +func (m *ResultOrException) GetException() *NameBytesPair { + if m != nil { + return m.Exception + } + return nil +} + +func (m *ResultOrException) GetServiceResult() *CoprocessorServiceResult { + if m != nil { + return m.ServiceResult + } + return nil +} + +func (m *ResultOrException) GetLoadStats() *RegionLoadStats { + if m != nil { + return m.LoadStats + } + return nil +} + +// * +// The result of a RegionAction. +type RegionActionResult struct { + ResultOrException []*ResultOrException `protobuf:"bytes,1,rep,name=resultOrException" json:"resultOrException,omitempty"` + // If the operation failed globally for this region, this exception is set + Exception *NameBytesPair `protobuf:"bytes,2,opt,name=exception" json:"exception,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionActionResult) Reset() { *m = RegionActionResult{} } +func (m *RegionActionResult) String() string { return proto1.CompactTextString(m) } +func (*RegionActionResult) ProtoMessage() {} + +func (m *RegionActionResult) GetResultOrException() []*ResultOrException { + if m != nil { + return m.ResultOrException + } + return nil +} + +func (m *RegionActionResult) GetException() *NameBytesPair { + if m != nil { + return m.Exception + } + return nil +} + +// * +// Execute a list of actions on a given region in order. +// Nothing prevents a request to contains a set of RegionAction on the same region. +// For this reason, the matching between the MultiRequest and the MultiResponse is not +// done by the region specifier but by keeping the order of the RegionActionResult vs. +// the order of the RegionAction. +type MultiRequest struct { + RegionAction []*RegionAction `protobuf:"bytes,1,rep,name=regionAction" json:"regionAction,omitempty"` + NonceGroup *uint64 `protobuf:"varint,2,opt,name=nonceGroup" json:"nonceGroup,omitempty"` + Condition *Condition `protobuf:"bytes,3,opt,name=condition" json:"condition,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MultiRequest) Reset() { *m = MultiRequest{} } +func (m *MultiRequest) String() string { return proto1.CompactTextString(m) } +func (*MultiRequest) ProtoMessage() {} + +func (m *MultiRequest) GetRegionAction() []*RegionAction { + if m != nil { + return m.RegionAction + } + return nil +} + +func (m *MultiRequest) GetNonceGroup() uint64 { + if m != nil && m.NonceGroup != nil { + return *m.NonceGroup + } + return 0 +} + +func (m *MultiRequest) GetCondition() *Condition { + if m != nil { + return m.Condition + } + return nil +} + +type MultiResponse struct { + RegionActionResult []*RegionActionResult `protobuf:"bytes,1,rep,name=regionActionResult" json:"regionActionResult,omitempty"` + // used for mutate to indicate processed only + Processed *bool `protobuf:"varint,2,opt,name=processed" json:"processed,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MultiResponse) Reset() { *m = MultiResponse{} } +func (m *MultiResponse) String() string { return proto1.CompactTextString(m) } +func (*MultiResponse) ProtoMessage() {} + +func (m *MultiResponse) GetRegionActionResult() []*RegionActionResult { + if m != nil { + return m.RegionActionResult + } + return nil +} + +func (m *MultiResponse) GetProcessed() bool { + if m != nil && m.Processed != nil { + return *m.Processed + } + return false +} + +func init() { + proto1.RegisterEnum("proto.MutationProto_Durability", MutationProto_Durability_name, MutationProto_Durability_value) + proto1.RegisterEnum("proto.MutationProto_MutationType", MutationProto_MutationType_name, MutationProto_MutationType_value) + proto1.RegisterEnum("proto.MutationProto_DeleteType", MutationProto_DeleteType_name, MutationProto_DeleteType_value) +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/ClusterId.pb.go b/vendor/github.com/pingcap/go-hbase/proto/ClusterId.pb.go new file mode 100644 index 000000000..d21c7bdb3 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/ClusterId.pb.go @@ -0,0 +1,35 @@ +// Code generated by protoc-gen-go. +// source: ClusterId.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +// * +// Content of the '/hbase/hbaseid', cluster id, znode. +// Also cluster of the ${HBASE_ROOTDIR}/hbase.id file. +type ClusterId struct { + // This is the cluster id, a uuid as a String + ClusterId *string `protobuf:"bytes,1,req,name=cluster_id" json:"cluster_id,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ClusterId) Reset() { *m = ClusterId{} } +func (m *ClusterId) String() string { return proto1.CompactTextString(m) } +func (*ClusterId) ProtoMessage() {} + +func (m *ClusterId) GetClusterId() string { + if m != nil && m.ClusterId != nil { + return *m.ClusterId + } + return "" +} + +func init() { +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/ClusterStatus.pb.go b/vendor/github.com/pingcap/go-hbase/proto/ClusterStatus.pb.go new file mode 100644 index 000000000..78111fa5a --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/ClusterStatus.pb.go @@ -0,0 +1,597 @@ +// Code generated by protoc-gen-go. +// source: ClusterStatus.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type RegionState_State int32 + +const ( + RegionState_OFFLINE RegionState_State = 0 + RegionState_PENDING_OPEN RegionState_State = 1 + RegionState_OPENING RegionState_State = 2 + RegionState_OPEN RegionState_State = 3 + RegionState_PENDING_CLOSE RegionState_State = 4 + RegionState_CLOSING RegionState_State = 5 + RegionState_CLOSED RegionState_State = 6 + RegionState_SPLITTING RegionState_State = 7 + RegionState_SPLIT RegionState_State = 8 + RegionState_FAILED_OPEN RegionState_State = 9 + RegionState_FAILED_CLOSE RegionState_State = 10 + RegionState_MERGING RegionState_State = 11 + RegionState_MERGED RegionState_State = 12 + RegionState_SPLITTING_NEW RegionState_State = 13 + // region but hasn't be created yet, or master doesn't + // know it's already created + RegionState_MERGING_NEW RegionState_State = 14 +) + +var RegionState_State_name = map[int32]string{ + 0: "OFFLINE", + 1: "PENDING_OPEN", + 2: "OPENING", + 3: "OPEN", + 4: "PENDING_CLOSE", + 5: "CLOSING", + 6: "CLOSED", + 7: "SPLITTING", + 8: "SPLIT", + 9: "FAILED_OPEN", + 10: "FAILED_CLOSE", + 11: "MERGING", + 12: "MERGED", + 13: "SPLITTING_NEW", + 14: "MERGING_NEW", +} +var RegionState_State_value = map[string]int32{ + "OFFLINE": 0, + "PENDING_OPEN": 1, + "OPENING": 2, + "OPEN": 3, + "PENDING_CLOSE": 4, + "CLOSING": 5, + "CLOSED": 6, + "SPLITTING": 7, + "SPLIT": 8, + "FAILED_OPEN": 9, + "FAILED_CLOSE": 10, + "MERGING": 11, + "MERGED": 12, + "SPLITTING_NEW": 13, + "MERGING_NEW": 14, +} + +func (x RegionState_State) Enum() *RegionState_State { + p := new(RegionState_State) + *p = x + return p +} +func (x RegionState_State) String() string { + return proto1.EnumName(RegionState_State_name, int32(x)) +} +func (x *RegionState_State) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(RegionState_State_value, data, "RegionState_State") + if err != nil { + return err + } + *x = RegionState_State(value) + return nil +} + +type RegionState struct { + RegionInfo *RegionInfo `protobuf:"bytes,1,req,name=region_info" json:"region_info,omitempty"` + State *RegionState_State `protobuf:"varint,2,req,name=state,enum=proto.RegionState_State" json:"state,omitempty"` + Stamp *uint64 `protobuf:"varint,3,opt,name=stamp" json:"stamp,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionState) Reset() { *m = RegionState{} } +func (m *RegionState) String() string { return proto1.CompactTextString(m) } +func (*RegionState) ProtoMessage() {} + +func (m *RegionState) GetRegionInfo() *RegionInfo { + if m != nil { + return m.RegionInfo + } + return nil +} + +func (m *RegionState) GetState() RegionState_State { + if m != nil && m.State != nil { + return *m.State + } + return RegionState_OFFLINE +} + +func (m *RegionState) GetStamp() uint64 { + if m != nil && m.Stamp != nil { + return *m.Stamp + } + return 0 +} + +type RegionInTransition struct { + Spec *RegionSpecifier `protobuf:"bytes,1,req,name=spec" json:"spec,omitempty"` + RegionState *RegionState `protobuf:"bytes,2,req,name=region_state" json:"region_state,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionInTransition) Reset() { *m = RegionInTransition{} } +func (m *RegionInTransition) String() string { return proto1.CompactTextString(m) } +func (*RegionInTransition) ProtoMessage() {} + +func (m *RegionInTransition) GetSpec() *RegionSpecifier { + if m != nil { + return m.Spec + } + return nil +} + +func (m *RegionInTransition) GetRegionState() *RegionState { + if m != nil { + return m.RegionState + } + return nil +} + +type RegionLoad struct { + // * the region specifier + RegionSpecifier *RegionSpecifier `protobuf:"bytes,1,req,name=region_specifier" json:"region_specifier,omitempty"` + // * the number of stores for the region + Stores *uint32 `protobuf:"varint,2,opt,name=stores" json:"stores,omitempty"` + // * the number of storefiles for the region + Storefiles *uint32 `protobuf:"varint,3,opt,name=storefiles" json:"storefiles,omitempty"` + // * the total size of the store files for the region, uncompressed, in MB + StoreUncompressedSize_MB *uint32 `protobuf:"varint,4,opt,name=store_uncompressed_size_MB" json:"store_uncompressed_size_MB,omitempty"` + // * the current total size of the store files for the region, in MB + StorefileSize_MB *uint32 `protobuf:"varint,5,opt,name=storefile_size_MB" json:"storefile_size_MB,omitempty"` + // * the current size of the memstore for the region, in MB + MemstoreSize_MB *uint32 `protobuf:"varint,6,opt,name=memstore_size_MB" json:"memstore_size_MB,omitempty"` + // * + // The current total size of root-level store file indexes for the region, + // in MB. The same as {@link #rootIndexSizeKB} but in MB. + StorefileIndexSize_MB *uint32 `protobuf:"varint,7,opt,name=storefile_index_size_MB" json:"storefile_index_size_MB,omitempty"` + // * the current total read requests made to region + ReadRequestsCount *uint64 `protobuf:"varint,8,opt,name=read_requests_count" json:"read_requests_count,omitempty"` + // * the current total write requests made to region + WriteRequestsCount *uint64 `protobuf:"varint,9,opt,name=write_requests_count" json:"write_requests_count,omitempty"` + // * the total compacting key values in currently running compaction + TotalCompacting_KVs *uint64 `protobuf:"varint,10,opt,name=total_compacting_KVs" json:"total_compacting_KVs,omitempty"` + // * the completed count of key values in currently running compaction + CurrentCompacted_KVs *uint64 `protobuf:"varint,11,opt,name=current_compacted_KVs" json:"current_compacted_KVs,omitempty"` + // * The current total size of root-level indexes for the region, in KB. + RootIndexSize_KB *uint32 `protobuf:"varint,12,opt,name=root_index_size_KB" json:"root_index_size_KB,omitempty"` + // * The total size of all index blocks, not just the root level, in KB. + TotalStaticIndexSize_KB *uint32 `protobuf:"varint,13,opt,name=total_static_index_size_KB" json:"total_static_index_size_KB,omitempty"` + // * + // The total size of all Bloom filter blocks, not just loaded into the + // block cache, in KB. + TotalStaticBloomSize_KB *uint32 `protobuf:"varint,14,opt,name=total_static_bloom_size_KB" json:"total_static_bloom_size_KB,omitempty"` + // * the most recent sequence Id from cache flush + CompleteSequenceId *uint64 `protobuf:"varint,15,opt,name=complete_sequence_id" json:"complete_sequence_id,omitempty"` + // * The current data locality for region in the regionserver + DataLocality *float32 `protobuf:"fixed32,16,opt,name=data_locality" json:"data_locality,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionLoad) Reset() { *m = RegionLoad{} } +func (m *RegionLoad) String() string { return proto1.CompactTextString(m) } +func (*RegionLoad) ProtoMessage() {} + +func (m *RegionLoad) GetRegionSpecifier() *RegionSpecifier { + if m != nil { + return m.RegionSpecifier + } + return nil +} + +func (m *RegionLoad) GetStores() uint32 { + if m != nil && m.Stores != nil { + return *m.Stores + } + return 0 +} + +func (m *RegionLoad) GetStorefiles() uint32 { + if m != nil && m.Storefiles != nil { + return *m.Storefiles + } + return 0 +} + +func (m *RegionLoad) GetStoreUncompressedSize_MB() uint32 { + if m != nil && m.StoreUncompressedSize_MB != nil { + return *m.StoreUncompressedSize_MB + } + return 0 +} + +func (m *RegionLoad) GetStorefileSize_MB() uint32 { + if m != nil && m.StorefileSize_MB != nil { + return *m.StorefileSize_MB + } + return 0 +} + +func (m *RegionLoad) GetMemstoreSize_MB() uint32 { + if m != nil && m.MemstoreSize_MB != nil { + return *m.MemstoreSize_MB + } + return 0 +} + +func (m *RegionLoad) GetStorefileIndexSize_MB() uint32 { + if m != nil && m.StorefileIndexSize_MB != nil { + return *m.StorefileIndexSize_MB + } + return 0 +} + +func (m *RegionLoad) GetReadRequestsCount() uint64 { + if m != nil && m.ReadRequestsCount != nil { + return *m.ReadRequestsCount + } + return 0 +} + +func (m *RegionLoad) GetWriteRequestsCount() uint64 { + if m != nil && m.WriteRequestsCount != nil { + return *m.WriteRequestsCount + } + return 0 +} + +func (m *RegionLoad) GetTotalCompacting_KVs() uint64 { + if m != nil && m.TotalCompacting_KVs != nil { + return *m.TotalCompacting_KVs + } + return 0 +} + +func (m *RegionLoad) GetCurrentCompacted_KVs() uint64 { + if m != nil && m.CurrentCompacted_KVs != nil { + return *m.CurrentCompacted_KVs + } + return 0 +} + +func (m *RegionLoad) GetRootIndexSize_KB() uint32 { + if m != nil && m.RootIndexSize_KB != nil { + return *m.RootIndexSize_KB + } + return 0 +} + +func (m *RegionLoad) GetTotalStaticIndexSize_KB() uint32 { + if m != nil && m.TotalStaticIndexSize_KB != nil { + return *m.TotalStaticIndexSize_KB + } + return 0 +} + +func (m *RegionLoad) GetTotalStaticBloomSize_KB() uint32 { + if m != nil && m.TotalStaticBloomSize_KB != nil { + return *m.TotalStaticBloomSize_KB + } + return 0 +} + +func (m *RegionLoad) GetCompleteSequenceId() uint64 { + if m != nil && m.CompleteSequenceId != nil { + return *m.CompleteSequenceId + } + return 0 +} + +func (m *RegionLoad) GetDataLocality() float32 { + if m != nil && m.DataLocality != nil { + return *m.DataLocality + } + return 0 +} + +type ReplicationLoadSink struct { + AgeOfLastAppliedOp *uint64 `protobuf:"varint,1,req,name=ageOfLastAppliedOp" json:"ageOfLastAppliedOp,omitempty"` + TimeStampsOfLastAppliedOp *uint64 `protobuf:"varint,2,req,name=timeStampsOfLastAppliedOp" json:"timeStampsOfLastAppliedOp,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ReplicationLoadSink) Reset() { *m = ReplicationLoadSink{} } +func (m *ReplicationLoadSink) String() string { return proto1.CompactTextString(m) } +func (*ReplicationLoadSink) ProtoMessage() {} + +func (m *ReplicationLoadSink) GetAgeOfLastAppliedOp() uint64 { + if m != nil && m.AgeOfLastAppliedOp != nil { + return *m.AgeOfLastAppliedOp + } + return 0 +} + +func (m *ReplicationLoadSink) GetTimeStampsOfLastAppliedOp() uint64 { + if m != nil && m.TimeStampsOfLastAppliedOp != nil { + return *m.TimeStampsOfLastAppliedOp + } + return 0 +} + +type ReplicationLoadSource struct { + PeerID *string `protobuf:"bytes,1,req,name=peerID" json:"peerID,omitempty"` + AgeOfLastShippedOp *uint64 `protobuf:"varint,2,req,name=ageOfLastShippedOp" json:"ageOfLastShippedOp,omitempty"` + SizeOfLogQueue *uint32 `protobuf:"varint,3,req,name=sizeOfLogQueue" json:"sizeOfLogQueue,omitempty"` + TimeStampOfLastShippedOp *uint64 `protobuf:"varint,4,req,name=timeStampOfLastShippedOp" json:"timeStampOfLastShippedOp,omitempty"` + ReplicationLag *uint64 `protobuf:"varint,5,req,name=replicationLag" json:"replicationLag,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ReplicationLoadSource) Reset() { *m = ReplicationLoadSource{} } +func (m *ReplicationLoadSource) String() string { return proto1.CompactTextString(m) } +func (*ReplicationLoadSource) ProtoMessage() {} + +func (m *ReplicationLoadSource) GetPeerID() string { + if m != nil && m.PeerID != nil { + return *m.PeerID + } + return "" +} + +func (m *ReplicationLoadSource) GetAgeOfLastShippedOp() uint64 { + if m != nil && m.AgeOfLastShippedOp != nil { + return *m.AgeOfLastShippedOp + } + return 0 +} + +func (m *ReplicationLoadSource) GetSizeOfLogQueue() uint32 { + if m != nil && m.SizeOfLogQueue != nil { + return *m.SizeOfLogQueue + } + return 0 +} + +func (m *ReplicationLoadSource) GetTimeStampOfLastShippedOp() uint64 { + if m != nil && m.TimeStampOfLastShippedOp != nil { + return *m.TimeStampOfLastShippedOp + } + return 0 +} + +func (m *ReplicationLoadSource) GetReplicationLag() uint64 { + if m != nil && m.ReplicationLag != nil { + return *m.ReplicationLag + } + return 0 +} + +type ServerLoad struct { + // * Number of requests since last report. + NumberOfRequests *uint32 `protobuf:"varint,1,opt,name=number_of_requests" json:"number_of_requests,omitempty"` + // * Total Number of requests from the start of the region server. + TotalNumberOfRequests *uint32 `protobuf:"varint,2,opt,name=total_number_of_requests" json:"total_number_of_requests,omitempty"` + // * the amount of used heap, in MB. + UsedHeap_MB *uint32 `protobuf:"varint,3,opt,name=used_heap_MB" json:"used_heap_MB,omitempty"` + // * the maximum allowable size of the heap, in MB. + MaxHeap_MB *uint32 `protobuf:"varint,4,opt,name=max_heap_MB" json:"max_heap_MB,omitempty"` + // * Information on the load of individual regions. + RegionLoads []*RegionLoad `protobuf:"bytes,5,rep,name=region_loads" json:"region_loads,omitempty"` + // * + // Regionserver-level coprocessors, e.g., WALObserver implementations. + // Region-level coprocessors, on the other hand, are stored inside RegionLoad + // objects. + Coprocessors []*Coprocessor `protobuf:"bytes,6,rep,name=coprocessors" json:"coprocessors,omitempty"` + // * + // Time when incremental (non-total) counts began being calculated (e.g. number_of_requests) + // time is measured as the difference, measured in milliseconds, between the current time + // and midnight, January 1, 1970 UTC. + ReportStartTime *uint64 `protobuf:"varint,7,opt,name=report_start_time" json:"report_start_time,omitempty"` + // * + // Time when report was generated. + // time is measured as the difference, measured in milliseconds, between the current time + // and midnight, January 1, 1970 UTC. + ReportEndTime *uint64 `protobuf:"varint,8,opt,name=report_end_time" json:"report_end_time,omitempty"` + // * + // The port number that this region server is hosing an info server on. + InfoServerPort *uint32 `protobuf:"varint,9,opt,name=info_server_port" json:"info_server_port,omitempty"` + // * + // The replicationLoadSource for the replication Source status of this region server. + ReplLoadSource []*ReplicationLoadSource `protobuf:"bytes,10,rep,name=replLoadSource" json:"replLoadSource,omitempty"` + // * + // The replicationLoadSink for the replication Sink status of this region server. + ReplLoadSink *ReplicationLoadSink `protobuf:"bytes,11,opt,name=replLoadSink" json:"replLoadSink,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ServerLoad) Reset() { *m = ServerLoad{} } +func (m *ServerLoad) String() string { return proto1.CompactTextString(m) } +func (*ServerLoad) ProtoMessage() {} + +func (m *ServerLoad) GetNumberOfRequests() uint32 { + if m != nil && m.NumberOfRequests != nil { + return *m.NumberOfRequests + } + return 0 +} + +func (m *ServerLoad) GetTotalNumberOfRequests() uint32 { + if m != nil && m.TotalNumberOfRequests != nil { + return *m.TotalNumberOfRequests + } + return 0 +} + +func (m *ServerLoad) GetUsedHeap_MB() uint32 { + if m != nil && m.UsedHeap_MB != nil { + return *m.UsedHeap_MB + } + return 0 +} + +func (m *ServerLoad) GetMaxHeap_MB() uint32 { + if m != nil && m.MaxHeap_MB != nil { + return *m.MaxHeap_MB + } + return 0 +} + +func (m *ServerLoad) GetRegionLoads() []*RegionLoad { + if m != nil { + return m.RegionLoads + } + return nil +} + +func (m *ServerLoad) GetCoprocessors() []*Coprocessor { + if m != nil { + return m.Coprocessors + } + return nil +} + +func (m *ServerLoad) GetReportStartTime() uint64 { + if m != nil && m.ReportStartTime != nil { + return *m.ReportStartTime + } + return 0 +} + +func (m *ServerLoad) GetReportEndTime() uint64 { + if m != nil && m.ReportEndTime != nil { + return *m.ReportEndTime + } + return 0 +} + +func (m *ServerLoad) GetInfoServerPort() uint32 { + if m != nil && m.InfoServerPort != nil { + return *m.InfoServerPort + } + return 0 +} + +func (m *ServerLoad) GetReplLoadSource() []*ReplicationLoadSource { + if m != nil { + return m.ReplLoadSource + } + return nil +} + +func (m *ServerLoad) GetReplLoadSink() *ReplicationLoadSink { + if m != nil { + return m.ReplLoadSink + } + return nil +} + +type LiveServerInfo struct { + Server *ServerName `protobuf:"bytes,1,req,name=server" json:"server,omitempty"` + ServerLoad *ServerLoad `protobuf:"bytes,2,req,name=server_load" json:"server_load,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *LiveServerInfo) Reset() { *m = LiveServerInfo{} } +func (m *LiveServerInfo) String() string { return proto1.CompactTextString(m) } +func (*LiveServerInfo) ProtoMessage() {} + +func (m *LiveServerInfo) GetServer() *ServerName { + if m != nil { + return m.Server + } + return nil +} + +func (m *LiveServerInfo) GetServerLoad() *ServerLoad { + if m != nil { + return m.ServerLoad + } + return nil +} + +type ClusterStatus struct { + HbaseVersion *HBaseVersionFileContent `protobuf:"bytes,1,opt,name=hbase_version" json:"hbase_version,omitempty"` + LiveServers []*LiveServerInfo `protobuf:"bytes,2,rep,name=live_servers" json:"live_servers,omitempty"` + DeadServers []*ServerName `protobuf:"bytes,3,rep,name=dead_servers" json:"dead_servers,omitempty"` + RegionsInTransition []*RegionInTransition `protobuf:"bytes,4,rep,name=regions_in_transition" json:"regions_in_transition,omitempty"` + ClusterId *ClusterId `protobuf:"bytes,5,opt,name=cluster_id" json:"cluster_id,omitempty"` + MasterCoprocessors []*Coprocessor `protobuf:"bytes,6,rep,name=master_coprocessors" json:"master_coprocessors,omitempty"` + Master *ServerName `protobuf:"bytes,7,opt,name=master" json:"master,omitempty"` + BackupMasters []*ServerName `protobuf:"bytes,8,rep,name=backup_masters" json:"backup_masters,omitempty"` + BalancerOn *bool `protobuf:"varint,9,opt,name=balancer_on" json:"balancer_on,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ClusterStatus) Reset() { *m = ClusterStatus{} } +func (m *ClusterStatus) String() string { return proto1.CompactTextString(m) } +func (*ClusterStatus) ProtoMessage() {} + +func (m *ClusterStatus) GetHbaseVersion() *HBaseVersionFileContent { + if m != nil { + return m.HbaseVersion + } + return nil +} + +func (m *ClusterStatus) GetLiveServers() []*LiveServerInfo { + if m != nil { + return m.LiveServers + } + return nil +} + +func (m *ClusterStatus) GetDeadServers() []*ServerName { + if m != nil { + return m.DeadServers + } + return nil +} + +func (m *ClusterStatus) GetRegionsInTransition() []*RegionInTransition { + if m != nil { + return m.RegionsInTransition + } + return nil +} + +func (m *ClusterStatus) GetClusterId() *ClusterId { + if m != nil { + return m.ClusterId + } + return nil +} + +func (m *ClusterStatus) GetMasterCoprocessors() []*Coprocessor { + if m != nil { + return m.MasterCoprocessors + } + return nil +} + +func (m *ClusterStatus) GetMaster() *ServerName { + if m != nil { + return m.Master + } + return nil +} + +func (m *ClusterStatus) GetBackupMasters() []*ServerName { + if m != nil { + return m.BackupMasters + } + return nil +} + +func (m *ClusterStatus) GetBalancerOn() bool { + if m != nil && m.BalancerOn != nil { + return *m.BalancerOn + } + return false +} + +func init() { + proto1.RegisterEnum("proto.RegionState_State", RegionState_State_name, RegionState_State_value) +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/Comparator.pb.go b/vendor/github.com/pingcap/go-hbase/proto/Comparator.pb.go new file mode 100644 index 000000000..4257294a1 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/Comparator.pb.go @@ -0,0 +1,228 @@ +// Code generated by protoc-gen-go. +// source: Comparator.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type BitComparator_BitwiseOp int32 + +const ( + BitComparator_AND BitComparator_BitwiseOp = 1 + BitComparator_OR BitComparator_BitwiseOp = 2 + BitComparator_XOR BitComparator_BitwiseOp = 3 +) + +var BitComparator_BitwiseOp_name = map[int32]string{ + 1: "AND", + 2: "OR", + 3: "XOR", +} +var BitComparator_BitwiseOp_value = map[string]int32{ + "AND": 1, + "OR": 2, + "XOR": 3, +} + +func (x BitComparator_BitwiseOp) Enum() *BitComparator_BitwiseOp { + p := new(BitComparator_BitwiseOp) + *p = x + return p +} +func (x BitComparator_BitwiseOp) String() string { + return proto1.EnumName(BitComparator_BitwiseOp_name, int32(x)) +} +func (x *BitComparator_BitwiseOp) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(BitComparator_BitwiseOp_value, data, "BitComparator_BitwiseOp") + if err != nil { + return err + } + *x = BitComparator_BitwiseOp(value) + return nil +} + +type Comparator struct { + Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + SerializedComparator []byte `protobuf:"bytes,2,opt,name=serialized_comparator" json:"serialized_comparator,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Comparator) Reset() { *m = Comparator{} } +func (m *Comparator) String() string { return proto1.CompactTextString(m) } +func (*Comparator) ProtoMessage() {} + +func (m *Comparator) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *Comparator) GetSerializedComparator() []byte { + if m != nil { + return m.SerializedComparator + } + return nil +} + +type ByteArrayComparable struct { + Value []byte `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ByteArrayComparable) Reset() { *m = ByteArrayComparable{} } +func (m *ByteArrayComparable) String() string { return proto1.CompactTextString(m) } +func (*ByteArrayComparable) ProtoMessage() {} + +func (m *ByteArrayComparable) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +type BinaryComparator struct { + Comparable *ByteArrayComparable `protobuf:"bytes,1,req,name=comparable" json:"comparable,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *BinaryComparator) Reset() { *m = BinaryComparator{} } +func (m *BinaryComparator) String() string { return proto1.CompactTextString(m) } +func (*BinaryComparator) ProtoMessage() {} + +func (m *BinaryComparator) GetComparable() *ByteArrayComparable { + if m != nil { + return m.Comparable + } + return nil +} + +type LongComparator struct { + Comparable *ByteArrayComparable `protobuf:"bytes,1,req,name=comparable" json:"comparable,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *LongComparator) Reset() { *m = LongComparator{} } +func (m *LongComparator) String() string { return proto1.CompactTextString(m) } +func (*LongComparator) ProtoMessage() {} + +func (m *LongComparator) GetComparable() *ByteArrayComparable { + if m != nil { + return m.Comparable + } + return nil +} + +type BinaryPrefixComparator struct { + Comparable *ByteArrayComparable `protobuf:"bytes,1,req,name=comparable" json:"comparable,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *BinaryPrefixComparator) Reset() { *m = BinaryPrefixComparator{} } +func (m *BinaryPrefixComparator) String() string { return proto1.CompactTextString(m) } +func (*BinaryPrefixComparator) ProtoMessage() {} + +func (m *BinaryPrefixComparator) GetComparable() *ByteArrayComparable { + if m != nil { + return m.Comparable + } + return nil +} + +type BitComparator struct { + Comparable *ByteArrayComparable `protobuf:"bytes,1,req,name=comparable" json:"comparable,omitempty"` + BitwiseOp *BitComparator_BitwiseOp `protobuf:"varint,2,req,name=bitwise_op,enum=proto.BitComparator_BitwiseOp" json:"bitwise_op,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *BitComparator) Reset() { *m = BitComparator{} } +func (m *BitComparator) String() string { return proto1.CompactTextString(m) } +func (*BitComparator) ProtoMessage() {} + +func (m *BitComparator) GetComparable() *ByteArrayComparable { + if m != nil { + return m.Comparable + } + return nil +} + +func (m *BitComparator) GetBitwiseOp() BitComparator_BitwiseOp { + if m != nil && m.BitwiseOp != nil { + return *m.BitwiseOp + } + return BitComparator_AND +} + +type NullComparator struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *NullComparator) Reset() { *m = NullComparator{} } +func (m *NullComparator) String() string { return proto1.CompactTextString(m) } +func (*NullComparator) ProtoMessage() {} + +type RegexStringComparator struct { + Pattern *string `protobuf:"bytes,1,req,name=pattern" json:"pattern,omitempty"` + PatternFlags *int32 `protobuf:"varint,2,req,name=pattern_flags" json:"pattern_flags,omitempty"` + Charset *string `protobuf:"bytes,3,req,name=charset" json:"charset,omitempty"` + Engine *string `protobuf:"bytes,4,opt,name=engine" json:"engine,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegexStringComparator) Reset() { *m = RegexStringComparator{} } +func (m *RegexStringComparator) String() string { return proto1.CompactTextString(m) } +func (*RegexStringComparator) ProtoMessage() {} + +func (m *RegexStringComparator) GetPattern() string { + if m != nil && m.Pattern != nil { + return *m.Pattern + } + return "" +} + +func (m *RegexStringComparator) GetPatternFlags() int32 { + if m != nil && m.PatternFlags != nil { + return *m.PatternFlags + } + return 0 +} + +func (m *RegexStringComparator) GetCharset() string { + if m != nil && m.Charset != nil { + return *m.Charset + } + return "" +} + +func (m *RegexStringComparator) GetEngine() string { + if m != nil && m.Engine != nil { + return *m.Engine + } + return "" +} + +type SubstringComparator struct { + Substr *string `protobuf:"bytes,1,req,name=substr" json:"substr,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SubstringComparator) Reset() { *m = SubstringComparator{} } +func (m *SubstringComparator) String() string { return proto1.CompactTextString(m) } +func (*SubstringComparator) ProtoMessage() {} + +func (m *SubstringComparator) GetSubstr() string { + if m != nil && m.Substr != nil { + return *m.Substr + } + return "" +} + +func init() { + proto1.RegisterEnum("proto.BitComparator_BitwiseOp", BitComparator_BitwiseOp_name, BitComparator_BitwiseOp_value) +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/Encryption.pb.go b/vendor/github.com/pingcap/go-hbase/proto/Encryption.pb.go new file mode 100644 index 000000000..a0f848a9c --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/Encryption.pb.go @@ -0,0 +1,63 @@ +// Code generated by protoc-gen-go. +// source: Encryption.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type WrappedKey struct { + Algorithm *string `protobuf:"bytes,1,req,name=algorithm" json:"algorithm,omitempty"` + Length *uint32 `protobuf:"varint,2,req,name=length" json:"length,omitempty"` + Data []byte `protobuf:"bytes,3,req,name=data" json:"data,omitempty"` + Iv []byte `protobuf:"bytes,4,opt,name=iv" json:"iv,omitempty"` + Hash []byte `protobuf:"bytes,5,opt,name=hash" json:"hash,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *WrappedKey) Reset() { *m = WrappedKey{} } +func (m *WrappedKey) String() string { return proto1.CompactTextString(m) } +func (*WrappedKey) ProtoMessage() {} + +func (m *WrappedKey) GetAlgorithm() string { + if m != nil && m.Algorithm != nil { + return *m.Algorithm + } + return "" +} + +func (m *WrappedKey) GetLength() uint32 { + if m != nil && m.Length != nil { + return *m.Length + } + return 0 +} + +func (m *WrappedKey) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *WrappedKey) GetIv() []byte { + if m != nil { + return m.Iv + } + return nil +} + +func (m *WrappedKey) GetHash() []byte { + if m != nil { + return m.Hash + } + return nil +} + +func init() { +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/ErrorHandling.pb.go b/vendor/github.com/pingcap/go-hbase/proto/ErrorHandling.pb.go new file mode 100644 index 000000000..b10121f4b --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/ErrorHandling.pb.go @@ -0,0 +1,130 @@ +// Code generated by protoc-gen-go. +// source: ErrorHandling.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +// * +// Protobuf version of a java.lang.StackTraceElement +// so we can serialize exceptions. +type StackTraceElementMessage struct { + DeclaringClass *string `protobuf:"bytes,1,opt,name=declaring_class" json:"declaring_class,omitempty"` + MethodName *string `protobuf:"bytes,2,opt,name=method_name" json:"method_name,omitempty"` + FileName *string `protobuf:"bytes,3,opt,name=file_name" json:"file_name,omitempty"` + LineNumber *int32 `protobuf:"varint,4,opt,name=line_number" json:"line_number,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *StackTraceElementMessage) Reset() { *m = StackTraceElementMessage{} } +func (m *StackTraceElementMessage) String() string { return proto1.CompactTextString(m) } +func (*StackTraceElementMessage) ProtoMessage() {} + +func (m *StackTraceElementMessage) GetDeclaringClass() string { + if m != nil && m.DeclaringClass != nil { + return *m.DeclaringClass + } + return "" +} + +func (m *StackTraceElementMessage) GetMethodName() string { + if m != nil && m.MethodName != nil { + return *m.MethodName + } + return "" +} + +func (m *StackTraceElementMessage) GetFileName() string { + if m != nil && m.FileName != nil { + return *m.FileName + } + return "" +} + +func (m *StackTraceElementMessage) GetLineNumber() int32 { + if m != nil && m.LineNumber != nil { + return *m.LineNumber + } + return 0 +} + +// * +// Cause of a remote failure for a generic exception. Contains +// all the information for a generic exception as well as +// optional info about the error for generic info passing +// (which should be another protobuffed class). +type GenericExceptionMessage struct { + ClassName *string `protobuf:"bytes,1,opt,name=class_name" json:"class_name,omitempty"` + Message *string `protobuf:"bytes,2,opt,name=message" json:"message,omitempty"` + ErrorInfo []byte `protobuf:"bytes,3,opt,name=error_info" json:"error_info,omitempty"` + Trace []*StackTraceElementMessage `protobuf:"bytes,4,rep,name=trace" json:"trace,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GenericExceptionMessage) Reset() { *m = GenericExceptionMessage{} } +func (m *GenericExceptionMessage) String() string { return proto1.CompactTextString(m) } +func (*GenericExceptionMessage) ProtoMessage() {} + +func (m *GenericExceptionMessage) GetClassName() string { + if m != nil && m.ClassName != nil { + return *m.ClassName + } + return "" +} + +func (m *GenericExceptionMessage) GetMessage() string { + if m != nil && m.Message != nil { + return *m.Message + } + return "" +} + +func (m *GenericExceptionMessage) GetErrorInfo() []byte { + if m != nil { + return m.ErrorInfo + } + return nil +} + +func (m *GenericExceptionMessage) GetTrace() []*StackTraceElementMessage { + if m != nil { + return m.Trace + } + return nil +} + +// * +// Exception sent across the wire when a remote task needs +// to notify other tasks that it failed and why +type ForeignExceptionMessage struct { + Source *string `protobuf:"bytes,1,opt,name=source" json:"source,omitempty"` + GenericException *GenericExceptionMessage `protobuf:"bytes,2,opt,name=generic_exception" json:"generic_exception,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ForeignExceptionMessage) Reset() { *m = ForeignExceptionMessage{} } +func (m *ForeignExceptionMessage) String() string { return proto1.CompactTextString(m) } +func (*ForeignExceptionMessage) ProtoMessage() {} + +func (m *ForeignExceptionMessage) GetSource() string { + if m != nil && m.Source != nil { + return *m.Source + } + return "" +} + +func (m *ForeignExceptionMessage) GetGenericException() *GenericExceptionMessage { + if m != nil { + return m.GenericException + } + return nil +} + +func init() { +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/FS.pb.go b/vendor/github.com/pingcap/go-hbase/proto/FS.pb.go new file mode 100644 index 000000000..c3d1cddd0 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/FS.pb.go @@ -0,0 +1,93 @@ +// Code generated by protoc-gen-go. +// source: FS.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type Reference_Range int32 + +const ( + Reference_TOP Reference_Range = 0 + Reference_BOTTOM Reference_Range = 1 +) + +var Reference_Range_name = map[int32]string{ + 0: "TOP", + 1: "BOTTOM", +} +var Reference_Range_value = map[string]int32{ + "TOP": 0, + "BOTTOM": 1, +} + +func (x Reference_Range) Enum() *Reference_Range { + p := new(Reference_Range) + *p = x + return p +} +func (x Reference_Range) String() string { + return proto1.EnumName(Reference_Range_name, int32(x)) +} +func (x *Reference_Range) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(Reference_Range_value, data, "Reference_Range") + if err != nil { + return err + } + *x = Reference_Range(value) + return nil +} + +// * +// The ${HBASE_ROOTDIR}/hbase.version file content +type HBaseVersionFileContent struct { + Version *string `protobuf:"bytes,1,req,name=version" json:"version,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *HBaseVersionFileContent) Reset() { *m = HBaseVersionFileContent{} } +func (m *HBaseVersionFileContent) String() string { return proto1.CompactTextString(m) } +func (*HBaseVersionFileContent) ProtoMessage() {} + +func (m *HBaseVersionFileContent) GetVersion() string { + if m != nil && m.Version != nil { + return *m.Version + } + return "" +} + +// * +// Reference file content used when we split an hfile under a region. +type Reference struct { + Splitkey []byte `protobuf:"bytes,1,req,name=splitkey" json:"splitkey,omitempty"` + Range *Reference_Range `protobuf:"varint,2,req,name=range,enum=proto.Reference_Range" json:"range,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Reference) Reset() { *m = Reference{} } +func (m *Reference) String() string { return proto1.CompactTextString(m) } +func (*Reference) ProtoMessage() {} + +func (m *Reference) GetSplitkey() []byte { + if m != nil { + return m.Splitkey + } + return nil +} + +func (m *Reference) GetRange() Reference_Range { + if m != nil && m.Range != nil { + return *m.Range + } + return Reference_TOP +} + +func init() { + proto1.RegisterEnum("proto.Reference_Range", Reference_Range_name, Reference_Range_value) +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/Filter.pb.go b/vendor/github.com/pingcap/go-hbase/proto/Filter.pb.go new file mode 100644 index 000000000..0c8060932 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/Filter.pb.go @@ -0,0 +1,609 @@ +// Code generated by protoc-gen-go. +// source: Filter.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type FilterList_Operator int32 + +const ( + FilterList_MUST_PASS_ALL FilterList_Operator = 1 + FilterList_MUST_PASS_ONE FilterList_Operator = 2 +) + +var FilterList_Operator_name = map[int32]string{ + 1: "MUST_PASS_ALL", + 2: "MUST_PASS_ONE", +} +var FilterList_Operator_value = map[string]int32{ + "MUST_PASS_ALL": 1, + "MUST_PASS_ONE": 2, +} + +func (x FilterList_Operator) Enum() *FilterList_Operator { + p := new(FilterList_Operator) + *p = x + return p +} +func (x FilterList_Operator) String() string { + return proto1.EnumName(FilterList_Operator_name, int32(x)) +} +func (x *FilterList_Operator) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(FilterList_Operator_value, data, "FilterList_Operator") + if err != nil { + return err + } + *x = FilterList_Operator(value) + return nil +} + +type Filter struct { + Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + SerializedFilter []byte `protobuf:"bytes,2,opt,name=serialized_filter" json:"serialized_filter,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Filter) Reset() { *m = Filter{} } +func (m *Filter) String() string { return proto1.CompactTextString(m) } +func (*Filter) ProtoMessage() {} + +func (m *Filter) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *Filter) GetSerializedFilter() []byte { + if m != nil { + return m.SerializedFilter + } + return nil +} + +type ColumnCountGetFilter struct { + Limit *int32 `protobuf:"varint,1,req,name=limit" json:"limit,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ColumnCountGetFilter) Reset() { *m = ColumnCountGetFilter{} } +func (m *ColumnCountGetFilter) String() string { return proto1.CompactTextString(m) } +func (*ColumnCountGetFilter) ProtoMessage() {} + +func (m *ColumnCountGetFilter) GetLimit() int32 { + if m != nil && m.Limit != nil { + return *m.Limit + } + return 0 +} + +type ColumnPaginationFilter struct { + Limit *int32 `protobuf:"varint,1,req,name=limit" json:"limit,omitempty"` + Offset *int32 `protobuf:"varint,2,opt,name=offset" json:"offset,omitempty"` + ColumnOffset []byte `protobuf:"bytes,3,opt,name=column_offset" json:"column_offset,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ColumnPaginationFilter) Reset() { *m = ColumnPaginationFilter{} } +func (m *ColumnPaginationFilter) String() string { return proto1.CompactTextString(m) } +func (*ColumnPaginationFilter) ProtoMessage() {} + +func (m *ColumnPaginationFilter) GetLimit() int32 { + if m != nil && m.Limit != nil { + return *m.Limit + } + return 0 +} + +func (m *ColumnPaginationFilter) GetOffset() int32 { + if m != nil && m.Offset != nil { + return *m.Offset + } + return 0 +} + +func (m *ColumnPaginationFilter) GetColumnOffset() []byte { + if m != nil { + return m.ColumnOffset + } + return nil +} + +type ColumnPrefixFilter struct { + Prefix []byte `protobuf:"bytes,1,req,name=prefix" json:"prefix,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ColumnPrefixFilter) Reset() { *m = ColumnPrefixFilter{} } +func (m *ColumnPrefixFilter) String() string { return proto1.CompactTextString(m) } +func (*ColumnPrefixFilter) ProtoMessage() {} + +func (m *ColumnPrefixFilter) GetPrefix() []byte { + if m != nil { + return m.Prefix + } + return nil +} + +type ColumnRangeFilter struct { + MinColumn []byte `protobuf:"bytes,1,opt,name=min_column" json:"min_column,omitempty"` + MinColumnInclusive *bool `protobuf:"varint,2,opt,name=min_column_inclusive" json:"min_column_inclusive,omitempty"` + MaxColumn []byte `protobuf:"bytes,3,opt,name=max_column" json:"max_column,omitempty"` + MaxColumnInclusive *bool `protobuf:"varint,4,opt,name=max_column_inclusive" json:"max_column_inclusive,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ColumnRangeFilter) Reset() { *m = ColumnRangeFilter{} } +func (m *ColumnRangeFilter) String() string { return proto1.CompactTextString(m) } +func (*ColumnRangeFilter) ProtoMessage() {} + +func (m *ColumnRangeFilter) GetMinColumn() []byte { + if m != nil { + return m.MinColumn + } + return nil +} + +func (m *ColumnRangeFilter) GetMinColumnInclusive() bool { + if m != nil && m.MinColumnInclusive != nil { + return *m.MinColumnInclusive + } + return false +} + +func (m *ColumnRangeFilter) GetMaxColumn() []byte { + if m != nil { + return m.MaxColumn + } + return nil +} + +func (m *ColumnRangeFilter) GetMaxColumnInclusive() bool { + if m != nil && m.MaxColumnInclusive != nil { + return *m.MaxColumnInclusive + } + return false +} + +type CompareFilter struct { + CompareOp *CompareType `protobuf:"varint,1,req,name=compare_op,enum=proto.CompareType" json:"compare_op,omitempty"` + Comparator *Comparator `protobuf:"bytes,2,opt,name=comparator" json:"comparator,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CompareFilter) Reset() { *m = CompareFilter{} } +func (m *CompareFilter) String() string { return proto1.CompactTextString(m) } +func (*CompareFilter) ProtoMessage() {} + +func (m *CompareFilter) GetCompareOp() CompareType { + if m != nil && m.CompareOp != nil { + return *m.CompareOp + } + return CompareType_LESS +} + +func (m *CompareFilter) GetComparator() *Comparator { + if m != nil { + return m.Comparator + } + return nil +} + +type DependentColumnFilter struct { + CompareFilter *CompareFilter `protobuf:"bytes,1,req,name=compare_filter" json:"compare_filter,omitempty"` + ColumnFamily []byte `protobuf:"bytes,2,opt,name=column_family" json:"column_family,omitempty"` + ColumnQualifier []byte `protobuf:"bytes,3,opt,name=column_qualifier" json:"column_qualifier,omitempty"` + DropDependentColumn *bool `protobuf:"varint,4,opt,name=drop_dependent_column" json:"drop_dependent_column,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DependentColumnFilter) Reset() { *m = DependentColumnFilter{} } +func (m *DependentColumnFilter) String() string { return proto1.CompactTextString(m) } +func (*DependentColumnFilter) ProtoMessage() {} + +func (m *DependentColumnFilter) GetCompareFilter() *CompareFilter { + if m != nil { + return m.CompareFilter + } + return nil +} + +func (m *DependentColumnFilter) GetColumnFamily() []byte { + if m != nil { + return m.ColumnFamily + } + return nil +} + +func (m *DependentColumnFilter) GetColumnQualifier() []byte { + if m != nil { + return m.ColumnQualifier + } + return nil +} + +func (m *DependentColumnFilter) GetDropDependentColumn() bool { + if m != nil && m.DropDependentColumn != nil { + return *m.DropDependentColumn + } + return false +} + +type FamilyFilter struct { + CompareFilter *CompareFilter `protobuf:"bytes,1,req,name=compare_filter" json:"compare_filter,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FamilyFilter) Reset() { *m = FamilyFilter{} } +func (m *FamilyFilter) String() string { return proto1.CompactTextString(m) } +func (*FamilyFilter) ProtoMessage() {} + +func (m *FamilyFilter) GetCompareFilter() *CompareFilter { + if m != nil { + return m.CompareFilter + } + return nil +} + +type FilterList struct { + Operator *FilterList_Operator `protobuf:"varint,1,req,name=operator,enum=proto.FilterList_Operator" json:"operator,omitempty"` + Filters []*Filter `protobuf:"bytes,2,rep,name=filters" json:"filters,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FilterList) Reset() { *m = FilterList{} } +func (m *FilterList) String() string { return proto1.CompactTextString(m) } +func (*FilterList) ProtoMessage() {} + +func (m *FilterList) GetOperator() FilterList_Operator { + if m != nil && m.Operator != nil { + return *m.Operator + } + return FilterList_MUST_PASS_ALL +} + +func (m *FilterList) GetFilters() []*Filter { + if m != nil { + return m.Filters + } + return nil +} + +type FilterWrapper struct { + Filter *Filter `protobuf:"bytes,1,req,name=filter" json:"filter,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FilterWrapper) Reset() { *m = FilterWrapper{} } +func (m *FilterWrapper) String() string { return proto1.CompactTextString(m) } +func (*FilterWrapper) ProtoMessage() {} + +func (m *FilterWrapper) GetFilter() *Filter { + if m != nil { + return m.Filter + } + return nil +} + +type FirstKeyOnlyFilter struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *FirstKeyOnlyFilter) Reset() { *m = FirstKeyOnlyFilter{} } +func (m *FirstKeyOnlyFilter) String() string { return proto1.CompactTextString(m) } +func (*FirstKeyOnlyFilter) ProtoMessage() {} + +type FirstKeyValueMatchingQualifiersFilter struct { + Qualifiers [][]byte `protobuf:"bytes,1,rep,name=qualifiers" json:"qualifiers,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FirstKeyValueMatchingQualifiersFilter) Reset() { *m = FirstKeyValueMatchingQualifiersFilter{} } +func (m *FirstKeyValueMatchingQualifiersFilter) String() string { return proto1.CompactTextString(m) } +func (*FirstKeyValueMatchingQualifiersFilter) ProtoMessage() {} + +func (m *FirstKeyValueMatchingQualifiersFilter) GetQualifiers() [][]byte { + if m != nil { + return m.Qualifiers + } + return nil +} + +type FuzzyRowFilter struct { + FuzzyKeysData []*BytesBytesPair `protobuf:"bytes,1,rep,name=fuzzy_keys_data" json:"fuzzy_keys_data,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FuzzyRowFilter) Reset() { *m = FuzzyRowFilter{} } +func (m *FuzzyRowFilter) String() string { return proto1.CompactTextString(m) } +func (*FuzzyRowFilter) ProtoMessage() {} + +func (m *FuzzyRowFilter) GetFuzzyKeysData() []*BytesBytesPair { + if m != nil { + return m.FuzzyKeysData + } + return nil +} + +type InclusiveStopFilter struct { + StopRowKey []byte `protobuf:"bytes,1,opt,name=stop_row_key" json:"stop_row_key,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *InclusiveStopFilter) Reset() { *m = InclusiveStopFilter{} } +func (m *InclusiveStopFilter) String() string { return proto1.CompactTextString(m) } +func (*InclusiveStopFilter) ProtoMessage() {} + +func (m *InclusiveStopFilter) GetStopRowKey() []byte { + if m != nil { + return m.StopRowKey + } + return nil +} + +type KeyOnlyFilter struct { + LenAsVal *bool `protobuf:"varint,1,req,name=len_as_val" json:"len_as_val,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *KeyOnlyFilter) Reset() { *m = KeyOnlyFilter{} } +func (m *KeyOnlyFilter) String() string { return proto1.CompactTextString(m) } +func (*KeyOnlyFilter) ProtoMessage() {} + +func (m *KeyOnlyFilter) GetLenAsVal() bool { + if m != nil && m.LenAsVal != nil { + return *m.LenAsVal + } + return false +} + +type MultipleColumnPrefixFilter struct { + SortedPrefixes [][]byte `protobuf:"bytes,1,rep,name=sorted_prefixes" json:"sorted_prefixes,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MultipleColumnPrefixFilter) Reset() { *m = MultipleColumnPrefixFilter{} } +func (m *MultipleColumnPrefixFilter) String() string { return proto1.CompactTextString(m) } +func (*MultipleColumnPrefixFilter) ProtoMessage() {} + +func (m *MultipleColumnPrefixFilter) GetSortedPrefixes() [][]byte { + if m != nil { + return m.SortedPrefixes + } + return nil +} + +type PageFilter struct { + PageSize *int64 `protobuf:"varint,1,req,name=page_size" json:"page_size,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *PageFilter) Reset() { *m = PageFilter{} } +func (m *PageFilter) String() string { return proto1.CompactTextString(m) } +func (*PageFilter) ProtoMessage() {} + +func (m *PageFilter) GetPageSize() int64 { + if m != nil && m.PageSize != nil { + return *m.PageSize + } + return 0 +} + +type PrefixFilter struct { + Prefix []byte `protobuf:"bytes,1,opt,name=prefix" json:"prefix,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *PrefixFilter) Reset() { *m = PrefixFilter{} } +func (m *PrefixFilter) String() string { return proto1.CompactTextString(m) } +func (*PrefixFilter) ProtoMessage() {} + +func (m *PrefixFilter) GetPrefix() []byte { + if m != nil { + return m.Prefix + } + return nil +} + +type QualifierFilter struct { + CompareFilter *CompareFilter `protobuf:"bytes,1,req,name=compare_filter" json:"compare_filter,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *QualifierFilter) Reset() { *m = QualifierFilter{} } +func (m *QualifierFilter) String() string { return proto1.CompactTextString(m) } +func (*QualifierFilter) ProtoMessage() {} + +func (m *QualifierFilter) GetCompareFilter() *CompareFilter { + if m != nil { + return m.CompareFilter + } + return nil +} + +type RandomRowFilter struct { + Chance *float32 `protobuf:"fixed32,1,req,name=chance" json:"chance,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RandomRowFilter) Reset() { *m = RandomRowFilter{} } +func (m *RandomRowFilter) String() string { return proto1.CompactTextString(m) } +func (*RandomRowFilter) ProtoMessage() {} + +func (m *RandomRowFilter) GetChance() float32 { + if m != nil && m.Chance != nil { + return *m.Chance + } + return 0 +} + +type RowFilter struct { + CompareFilter *CompareFilter `protobuf:"bytes,1,req,name=compare_filter" json:"compare_filter,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RowFilter) Reset() { *m = RowFilter{} } +func (m *RowFilter) String() string { return proto1.CompactTextString(m) } +func (*RowFilter) ProtoMessage() {} + +func (m *RowFilter) GetCompareFilter() *CompareFilter { + if m != nil { + return m.CompareFilter + } + return nil +} + +type SingleColumnValueExcludeFilter struct { + SingleColumnValueFilter *SingleColumnValueFilter `protobuf:"bytes,1,req,name=single_column_value_filter" json:"single_column_value_filter,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SingleColumnValueExcludeFilter) Reset() { *m = SingleColumnValueExcludeFilter{} } +func (m *SingleColumnValueExcludeFilter) String() string { return proto1.CompactTextString(m) } +func (*SingleColumnValueExcludeFilter) ProtoMessage() {} + +func (m *SingleColumnValueExcludeFilter) GetSingleColumnValueFilter() *SingleColumnValueFilter { + if m != nil { + return m.SingleColumnValueFilter + } + return nil +} + +type SingleColumnValueFilter struct { + ColumnFamily []byte `protobuf:"bytes,1,opt,name=column_family" json:"column_family,omitempty"` + ColumnQualifier []byte `protobuf:"bytes,2,opt,name=column_qualifier" json:"column_qualifier,omitempty"` + CompareOp *CompareType `protobuf:"varint,3,req,name=compare_op,enum=proto.CompareType" json:"compare_op,omitempty"` + Comparator *Comparator `protobuf:"bytes,4,req,name=comparator" json:"comparator,omitempty"` + FilterIfMissing *bool `protobuf:"varint,5,opt,name=filter_if_missing" json:"filter_if_missing,omitempty"` + LatestVersionOnly *bool `protobuf:"varint,6,opt,name=latest_version_only" json:"latest_version_only,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SingleColumnValueFilter) Reset() { *m = SingleColumnValueFilter{} } +func (m *SingleColumnValueFilter) String() string { return proto1.CompactTextString(m) } +func (*SingleColumnValueFilter) ProtoMessage() {} + +func (m *SingleColumnValueFilter) GetColumnFamily() []byte { + if m != nil { + return m.ColumnFamily + } + return nil +} + +func (m *SingleColumnValueFilter) GetColumnQualifier() []byte { + if m != nil { + return m.ColumnQualifier + } + return nil +} + +func (m *SingleColumnValueFilter) GetCompareOp() CompareType { + if m != nil && m.CompareOp != nil { + return *m.CompareOp + } + return CompareType_LESS +} + +func (m *SingleColumnValueFilter) GetComparator() *Comparator { + if m != nil { + return m.Comparator + } + return nil +} + +func (m *SingleColumnValueFilter) GetFilterIfMissing() bool { + if m != nil && m.FilterIfMissing != nil { + return *m.FilterIfMissing + } + return false +} + +func (m *SingleColumnValueFilter) GetLatestVersionOnly() bool { + if m != nil && m.LatestVersionOnly != nil { + return *m.LatestVersionOnly + } + return false +} + +type SkipFilter struct { + Filter *Filter `protobuf:"bytes,1,req,name=filter" json:"filter,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SkipFilter) Reset() { *m = SkipFilter{} } +func (m *SkipFilter) String() string { return proto1.CompactTextString(m) } +func (*SkipFilter) ProtoMessage() {} + +func (m *SkipFilter) GetFilter() *Filter { + if m != nil { + return m.Filter + } + return nil +} + +type TimestampsFilter struct { + Timestamps []int64 `protobuf:"varint,1,rep,packed,name=timestamps" json:"timestamps,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TimestampsFilter) Reset() { *m = TimestampsFilter{} } +func (m *TimestampsFilter) String() string { return proto1.CompactTextString(m) } +func (*TimestampsFilter) ProtoMessage() {} + +func (m *TimestampsFilter) GetTimestamps() []int64 { + if m != nil { + return m.Timestamps + } + return nil +} + +type ValueFilter struct { + CompareFilter *CompareFilter `protobuf:"bytes,1,req,name=compare_filter" json:"compare_filter,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ValueFilter) Reset() { *m = ValueFilter{} } +func (m *ValueFilter) String() string { return proto1.CompactTextString(m) } +func (*ValueFilter) ProtoMessage() {} + +func (m *ValueFilter) GetCompareFilter() *CompareFilter { + if m != nil { + return m.CompareFilter + } + return nil +} + +type WhileMatchFilter struct { + Filter *Filter `protobuf:"bytes,1,req,name=filter" json:"filter,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *WhileMatchFilter) Reset() { *m = WhileMatchFilter{} } +func (m *WhileMatchFilter) String() string { return proto1.CompactTextString(m) } +func (*WhileMatchFilter) ProtoMessage() {} + +func (m *WhileMatchFilter) GetFilter() *Filter { + if m != nil { + return m.Filter + } + return nil +} + +type FilterAllFilter struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *FilterAllFilter) Reset() { *m = FilterAllFilter{} } +func (m *FilterAllFilter) String() string { return proto1.CompactTextString(m) } +func (*FilterAllFilter) ProtoMessage() {} + +func init() { + proto1.RegisterEnum("proto.FilterList_Operator", FilterList_Operator_name, FilterList_Operator_value) +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/HBase.pb.go b/vendor/github.com/pingcap/go-hbase/proto/HBase.pb.go new file mode 100644 index 000000000..b9723f158 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/HBase.pb.go @@ -0,0 +1,741 @@ +// Code generated by protoc-gen-go. +// source: HBase.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +// Comparison operators +type CompareType int32 + +const ( + CompareType_LESS CompareType = 0 + CompareType_LESS_OR_EQUAL CompareType = 1 + CompareType_EQUAL CompareType = 2 + CompareType_NOT_EQUAL CompareType = 3 + CompareType_GREATER_OR_EQUAL CompareType = 4 + CompareType_GREATER CompareType = 5 + CompareType_NO_OP CompareType = 6 +) + +var CompareType_name = map[int32]string{ + 0: "LESS", + 1: "LESS_OR_EQUAL", + 2: "EQUAL", + 3: "NOT_EQUAL", + 4: "GREATER_OR_EQUAL", + 5: "GREATER", + 6: "NO_OP", +} +var CompareType_value = map[string]int32{ + "LESS": 0, + "LESS_OR_EQUAL": 1, + "EQUAL": 2, + "NOT_EQUAL": 3, + "GREATER_OR_EQUAL": 4, + "GREATER": 5, + "NO_OP": 6, +} + +func (x CompareType) Enum() *CompareType { + p := new(CompareType) + *p = x + return p +} +func (x CompareType) String() string { + return proto1.EnumName(CompareType_name, int32(x)) +} +func (x *CompareType) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(CompareType_value, data, "CompareType") + if err != nil { + return err + } + *x = CompareType(value) + return nil +} + +type RegionSpecifier_RegionSpecifierType int32 + +const ( + // ,,. + RegionSpecifier_REGION_NAME RegionSpecifier_RegionSpecifierType = 1 + // hash of ,, + RegionSpecifier_ENCODED_REGION_NAME RegionSpecifier_RegionSpecifierType = 2 +) + +var RegionSpecifier_RegionSpecifierType_name = map[int32]string{ + 1: "REGION_NAME", + 2: "ENCODED_REGION_NAME", +} +var RegionSpecifier_RegionSpecifierType_value = map[string]int32{ + "REGION_NAME": 1, + "ENCODED_REGION_NAME": 2, +} + +func (x RegionSpecifier_RegionSpecifierType) Enum() *RegionSpecifier_RegionSpecifierType { + p := new(RegionSpecifier_RegionSpecifierType) + *p = x + return p +} +func (x RegionSpecifier_RegionSpecifierType) String() string { + return proto1.EnumName(RegionSpecifier_RegionSpecifierType_name, int32(x)) +} +func (x *RegionSpecifier_RegionSpecifierType) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(RegionSpecifier_RegionSpecifierType_value, data, "RegionSpecifier_RegionSpecifierType") + if err != nil { + return err + } + *x = RegionSpecifier_RegionSpecifierType(value) + return nil +} + +type SnapshotDescription_Type int32 + +const ( + SnapshotDescription_DISABLED SnapshotDescription_Type = 0 + SnapshotDescription_FLUSH SnapshotDescription_Type = 1 + SnapshotDescription_SKIPFLUSH SnapshotDescription_Type = 2 +) + +var SnapshotDescription_Type_name = map[int32]string{ + 0: "DISABLED", + 1: "FLUSH", + 2: "SKIPFLUSH", +} +var SnapshotDescription_Type_value = map[string]int32{ + "DISABLED": 0, + "FLUSH": 1, + "SKIPFLUSH": 2, +} + +func (x SnapshotDescription_Type) Enum() *SnapshotDescription_Type { + p := new(SnapshotDescription_Type) + *p = x + return p +} +func (x SnapshotDescription_Type) String() string { + return proto1.EnumName(SnapshotDescription_Type_name, int32(x)) +} +func (x *SnapshotDescription_Type) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(SnapshotDescription_Type_value, data, "SnapshotDescription_Type") + if err != nil { + return err + } + *x = SnapshotDescription_Type(value) + return nil +} + +// * +// Table Name +type TableName struct { + Namespace []byte `protobuf:"bytes,1,req,name=namespace" json:"namespace,omitempty"` + Qualifier []byte `protobuf:"bytes,2,req,name=qualifier" json:"qualifier,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TableName) Reset() { *m = TableName{} } +func (m *TableName) String() string { return proto1.CompactTextString(m) } +func (*TableName) ProtoMessage() {} + +func (m *TableName) GetNamespace() []byte { + if m != nil { + return m.Namespace + } + return nil +} + +func (m *TableName) GetQualifier() []byte { + if m != nil { + return m.Qualifier + } + return nil +} + +// * +// Table Schema +// Inspired by the rest TableSchema +type TableSchema struct { + TableName *TableName `protobuf:"bytes,1,opt,name=table_name" json:"table_name,omitempty"` + Attributes []*BytesBytesPair `protobuf:"bytes,2,rep,name=attributes" json:"attributes,omitempty"` + ColumnFamilies []*ColumnFamilySchema `protobuf:"bytes,3,rep,name=column_families" json:"column_families,omitempty"` + Configuration []*NameStringPair `protobuf:"bytes,4,rep,name=configuration" json:"configuration,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TableSchema) Reset() { *m = TableSchema{} } +func (m *TableSchema) String() string { return proto1.CompactTextString(m) } +func (*TableSchema) ProtoMessage() {} + +func (m *TableSchema) GetTableName() *TableName { + if m != nil { + return m.TableName + } + return nil +} + +func (m *TableSchema) GetAttributes() []*BytesBytesPair { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *TableSchema) GetColumnFamilies() []*ColumnFamilySchema { + if m != nil { + return m.ColumnFamilies + } + return nil +} + +func (m *TableSchema) GetConfiguration() []*NameStringPair { + if m != nil { + return m.Configuration + } + return nil +} + +// * +// Column Family Schema +// Inspired by the rest ColumSchemaMessage +type ColumnFamilySchema struct { + Name []byte `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + Attributes []*BytesBytesPair `protobuf:"bytes,2,rep,name=attributes" json:"attributes,omitempty"` + Configuration []*NameStringPair `protobuf:"bytes,3,rep,name=configuration" json:"configuration,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ColumnFamilySchema) Reset() { *m = ColumnFamilySchema{} } +func (m *ColumnFamilySchema) String() string { return proto1.CompactTextString(m) } +func (*ColumnFamilySchema) ProtoMessage() {} + +func (m *ColumnFamilySchema) GetName() []byte { + if m != nil { + return m.Name + } + return nil +} + +func (m *ColumnFamilySchema) GetAttributes() []*BytesBytesPair { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *ColumnFamilySchema) GetConfiguration() []*NameStringPair { + if m != nil { + return m.Configuration + } + return nil +} + +// * +// Protocol buffer version of HRegionInfo. +type RegionInfo struct { + RegionId *uint64 `protobuf:"varint,1,req,name=region_id" json:"region_id,omitempty"` + TableName *TableName `protobuf:"bytes,2,req,name=table_name" json:"table_name,omitempty"` + StartKey []byte `protobuf:"bytes,3,opt,name=start_key" json:"start_key,omitempty"` + EndKey []byte `protobuf:"bytes,4,opt,name=end_key" json:"end_key,omitempty"` + Offline *bool `protobuf:"varint,5,opt,name=offline" json:"offline,omitempty"` + Split *bool `protobuf:"varint,6,opt,name=split" json:"split,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionInfo) Reset() { *m = RegionInfo{} } +func (m *RegionInfo) String() string { return proto1.CompactTextString(m) } +func (*RegionInfo) ProtoMessage() {} + +func (m *RegionInfo) GetRegionId() uint64 { + if m != nil && m.RegionId != nil { + return *m.RegionId + } + return 0 +} + +func (m *RegionInfo) GetTableName() *TableName { + if m != nil { + return m.TableName + } + return nil +} + +func (m *RegionInfo) GetStartKey() []byte { + if m != nil { + return m.StartKey + } + return nil +} + +func (m *RegionInfo) GetEndKey() []byte { + if m != nil { + return m.EndKey + } + return nil +} + +func (m *RegionInfo) GetOffline() bool { + if m != nil && m.Offline != nil { + return *m.Offline + } + return false +} + +func (m *RegionInfo) GetSplit() bool { + if m != nil && m.Split != nil { + return *m.Split + } + return false +} + +// * +// Protocol buffer for favored nodes +type FavoredNodes struct { + FavoredNode []*ServerName `protobuf:"bytes,1,rep,name=favored_node" json:"favored_node,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FavoredNodes) Reset() { *m = FavoredNodes{} } +func (m *FavoredNodes) String() string { return proto1.CompactTextString(m) } +func (*FavoredNodes) ProtoMessage() {} + +func (m *FavoredNodes) GetFavoredNode() []*ServerName { + if m != nil { + return m.FavoredNode + } + return nil +} + +// * +// Container protocol buffer to specify a region. +// You can specify region by region name, or the hash +// of the region name, which is known as encoded +// region name. +type RegionSpecifier struct { + Type *RegionSpecifier_RegionSpecifierType `protobuf:"varint,1,req,name=type,enum=proto.RegionSpecifier_RegionSpecifierType" json:"type,omitempty"` + Value []byte `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionSpecifier) Reset() { *m = RegionSpecifier{} } +func (m *RegionSpecifier) String() string { return proto1.CompactTextString(m) } +func (*RegionSpecifier) ProtoMessage() {} + +func (m *RegionSpecifier) GetType() RegionSpecifier_RegionSpecifierType { + if m != nil && m.Type != nil { + return *m.Type + } + return RegionSpecifier_REGION_NAME +} + +func (m *RegionSpecifier) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +// * +// A range of time. Both from and to are Java time +// stamp in milliseconds. If you don't specify a time +// range, it means all time. By default, if not +// specified, from = 0, and to = Long.MAX_VALUE +type TimeRange struct { + From *uint64 `protobuf:"varint,1,opt,name=from" json:"from,omitempty"` + To *uint64 `protobuf:"varint,2,opt,name=to" json:"to,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TimeRange) Reset() { *m = TimeRange{} } +func (m *TimeRange) String() string { return proto1.CompactTextString(m) } +func (*TimeRange) ProtoMessage() {} + +func (m *TimeRange) GetFrom() uint64 { + if m != nil && m.From != nil { + return *m.From + } + return 0 +} + +func (m *TimeRange) GetTo() uint64 { + if m != nil && m.To != nil { + return *m.To + } + return 0 +} + +// * +// Protocol buffer version of ServerName +type ServerName struct { + HostName *string `protobuf:"bytes,1,req,name=host_name" json:"host_name,omitempty"` + Port *uint32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"` + StartCode *uint64 `protobuf:"varint,3,opt,name=start_code" json:"start_code,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ServerName) Reset() { *m = ServerName{} } +func (m *ServerName) String() string { return proto1.CompactTextString(m) } +func (*ServerName) ProtoMessage() {} + +func (m *ServerName) GetHostName() string { + if m != nil && m.HostName != nil { + return *m.HostName + } + return "" +} + +func (m *ServerName) GetPort() uint32 { + if m != nil && m.Port != nil { + return *m.Port + } + return 0 +} + +func (m *ServerName) GetStartCode() uint64 { + if m != nil && m.StartCode != nil { + return *m.StartCode + } + return 0 +} + +type Coprocessor struct { + Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Coprocessor) Reset() { *m = Coprocessor{} } +func (m *Coprocessor) String() string { return proto1.CompactTextString(m) } +func (*Coprocessor) ProtoMessage() {} + +func (m *Coprocessor) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +type NameStringPair struct { + Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + Value *string `protobuf:"bytes,2,req,name=value" json:"value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NameStringPair) Reset() { *m = NameStringPair{} } +func (m *NameStringPair) String() string { return proto1.CompactTextString(m) } +func (*NameStringPair) ProtoMessage() {} + +func (m *NameStringPair) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *NameStringPair) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +type NameBytesPair struct { + Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NameBytesPair) Reset() { *m = NameBytesPair{} } +func (m *NameBytesPair) String() string { return proto1.CompactTextString(m) } +func (*NameBytesPair) ProtoMessage() {} + +func (m *NameBytesPair) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *NameBytesPair) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +type BytesBytesPair struct { + First []byte `protobuf:"bytes,1,req,name=first" json:"first,omitempty"` + Second []byte `protobuf:"bytes,2,req,name=second" json:"second,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *BytesBytesPair) Reset() { *m = BytesBytesPair{} } +func (m *BytesBytesPair) String() string { return proto1.CompactTextString(m) } +func (*BytesBytesPair) ProtoMessage() {} + +func (m *BytesBytesPair) GetFirst() []byte { + if m != nil { + return m.First + } + return nil +} + +func (m *BytesBytesPair) GetSecond() []byte { + if m != nil { + return m.Second + } + return nil +} + +type NameInt64Pair struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Value *int64 `protobuf:"varint,2,opt,name=value" json:"value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NameInt64Pair) Reset() { *m = NameInt64Pair{} } +func (m *NameInt64Pair) String() string { return proto1.CompactTextString(m) } +func (*NameInt64Pair) ProtoMessage() {} + +func (m *NameInt64Pair) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *NameInt64Pair) GetValue() int64 { + if m != nil && m.Value != nil { + return *m.Value + } + return 0 +} + +// * +// Description of the snapshot to take +type SnapshotDescription struct { + Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + Table *string `protobuf:"bytes,2,opt,name=table" json:"table,omitempty"` + CreationTime *int64 `protobuf:"varint,3,opt,name=creation_time,def=0" json:"creation_time,omitempty"` + Type *SnapshotDescription_Type `protobuf:"varint,4,opt,name=type,enum=proto.SnapshotDescription_Type,def=1" json:"type,omitempty"` + Version *int32 `protobuf:"varint,5,opt,name=version" json:"version,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SnapshotDescription) Reset() { *m = SnapshotDescription{} } +func (m *SnapshotDescription) String() string { return proto1.CompactTextString(m) } +func (*SnapshotDescription) ProtoMessage() {} + +const Default_SnapshotDescription_CreationTime int64 = 0 +const Default_SnapshotDescription_Type SnapshotDescription_Type = SnapshotDescription_FLUSH + +func (m *SnapshotDescription) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *SnapshotDescription) GetTable() string { + if m != nil && m.Table != nil { + return *m.Table + } + return "" +} + +func (m *SnapshotDescription) GetCreationTime() int64 { + if m != nil && m.CreationTime != nil { + return *m.CreationTime + } + return Default_SnapshotDescription_CreationTime +} + +func (m *SnapshotDescription) GetType() SnapshotDescription_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return Default_SnapshotDescription_Type +} + +func (m *SnapshotDescription) GetVersion() int32 { + if m != nil && m.Version != nil { + return *m.Version + } + return 0 +} + +// * +// Description of the distributed procedure to take +type ProcedureDescription struct { + Signature *string `protobuf:"bytes,1,req,name=signature" json:"signature,omitempty"` + Instance *string `protobuf:"bytes,2,opt,name=instance" json:"instance,omitempty"` + CreationTime *int64 `protobuf:"varint,3,opt,name=creation_time,def=0" json:"creation_time,omitempty"` + Configuration []*NameStringPair `protobuf:"bytes,4,rep,name=configuration" json:"configuration,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ProcedureDescription) Reset() { *m = ProcedureDescription{} } +func (m *ProcedureDescription) String() string { return proto1.CompactTextString(m) } +func (*ProcedureDescription) ProtoMessage() {} + +const Default_ProcedureDescription_CreationTime int64 = 0 + +func (m *ProcedureDescription) GetSignature() string { + if m != nil && m.Signature != nil { + return *m.Signature + } + return "" +} + +func (m *ProcedureDescription) GetInstance() string { + if m != nil && m.Instance != nil { + return *m.Instance + } + return "" +} + +func (m *ProcedureDescription) GetCreationTime() int64 { + if m != nil && m.CreationTime != nil { + return *m.CreationTime + } + return Default_ProcedureDescription_CreationTime +} + +func (m *ProcedureDescription) GetConfiguration() []*NameStringPair { + if m != nil { + return m.Configuration + } + return nil +} + +type EmptyMsg struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *EmptyMsg) Reset() { *m = EmptyMsg{} } +func (m *EmptyMsg) String() string { return proto1.CompactTextString(m) } +func (*EmptyMsg) ProtoMessage() {} + +type LongMsg struct { + LongMsg *int64 `protobuf:"varint,1,req,name=long_msg" json:"long_msg,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *LongMsg) Reset() { *m = LongMsg{} } +func (m *LongMsg) String() string { return proto1.CompactTextString(m) } +func (*LongMsg) ProtoMessage() {} + +func (m *LongMsg) GetLongMsg() int64 { + if m != nil && m.LongMsg != nil { + return *m.LongMsg + } + return 0 +} + +type DoubleMsg struct { + DoubleMsg *float64 `protobuf:"fixed64,1,req,name=double_msg" json:"double_msg,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DoubleMsg) Reset() { *m = DoubleMsg{} } +func (m *DoubleMsg) String() string { return proto1.CompactTextString(m) } +func (*DoubleMsg) ProtoMessage() {} + +func (m *DoubleMsg) GetDoubleMsg() float64 { + if m != nil && m.DoubleMsg != nil { + return *m.DoubleMsg + } + return 0 +} + +type BigDecimalMsg struct { + BigdecimalMsg []byte `protobuf:"bytes,1,req,name=bigdecimal_msg" json:"bigdecimal_msg,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *BigDecimalMsg) Reset() { *m = BigDecimalMsg{} } +func (m *BigDecimalMsg) String() string { return proto1.CompactTextString(m) } +func (*BigDecimalMsg) ProtoMessage() {} + +func (m *BigDecimalMsg) GetBigdecimalMsg() []byte { + if m != nil { + return m.BigdecimalMsg + } + return nil +} + +type UUID struct { + LeastSigBits *uint64 `protobuf:"varint,1,req,name=least_sig_bits" json:"least_sig_bits,omitempty"` + MostSigBits *uint64 `protobuf:"varint,2,req,name=most_sig_bits" json:"most_sig_bits,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UUID) Reset() { *m = UUID{} } +func (m *UUID) String() string { return proto1.CompactTextString(m) } +func (*UUID) ProtoMessage() {} + +func (m *UUID) GetLeastSigBits() uint64 { + if m != nil && m.LeastSigBits != nil { + return *m.LeastSigBits + } + return 0 +} + +func (m *UUID) GetMostSigBits() uint64 { + if m != nil && m.MostSigBits != nil { + return *m.MostSigBits + } + return 0 +} + +type NamespaceDescriptor struct { + Name []byte `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + Configuration []*NameStringPair `protobuf:"bytes,2,rep,name=configuration" json:"configuration,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *NamespaceDescriptor) Reset() { *m = NamespaceDescriptor{} } +func (m *NamespaceDescriptor) String() string { return proto1.CompactTextString(m) } +func (*NamespaceDescriptor) ProtoMessage() {} + +func (m *NamespaceDescriptor) GetName() []byte { + if m != nil { + return m.Name + } + return nil +} + +func (m *NamespaceDescriptor) GetConfiguration() []*NameStringPair { + if m != nil { + return m.Configuration + } + return nil +} + +// * +// Description of the region server info +type RegionServerInfo struct { + InfoPort *int32 `protobuf:"varint,1,opt,name=infoPort" json:"infoPort,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionServerInfo) Reset() { *m = RegionServerInfo{} } +func (m *RegionServerInfo) String() string { return proto1.CompactTextString(m) } +func (*RegionServerInfo) ProtoMessage() {} + +func (m *RegionServerInfo) GetInfoPort() int32 { + if m != nil && m.InfoPort != nil { + return *m.InfoPort + } + return 0 +} + +func init() { + proto1.RegisterEnum("proto.CompareType", CompareType_name, CompareType_value) + proto1.RegisterEnum("proto.RegionSpecifier_RegionSpecifierType", RegionSpecifier_RegionSpecifierType_name, RegionSpecifier_RegionSpecifierType_value) + proto1.RegisterEnum("proto.SnapshotDescription_Type", SnapshotDescription_Type_name, SnapshotDescription_Type_value) +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/HFile.pb.go b/vendor/github.com/pingcap/go-hbase/proto/HFile.pb.go new file mode 100644 index 000000000..98d105d92 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/HFile.pb.go @@ -0,0 +1,145 @@ +// Code generated by protoc-gen-go. +// source: HFile.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +// Map of name/values +type FileInfoProto struct { + MapEntry []*BytesBytesPair `protobuf:"bytes,1,rep,name=map_entry" json:"map_entry,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FileInfoProto) Reset() { *m = FileInfoProto{} } +func (m *FileInfoProto) String() string { return proto1.CompactTextString(m) } +func (*FileInfoProto) ProtoMessage() {} + +func (m *FileInfoProto) GetMapEntry() []*BytesBytesPair { + if m != nil { + return m.MapEntry + } + return nil +} + +// HFile file trailer +type FileTrailerProto struct { + FileInfoOffset *uint64 `protobuf:"varint,1,opt,name=file_info_offset" json:"file_info_offset,omitempty"` + LoadOnOpenDataOffset *uint64 `protobuf:"varint,2,opt,name=load_on_open_data_offset" json:"load_on_open_data_offset,omitempty"` + UncompressedDataIndexSize *uint64 `protobuf:"varint,3,opt,name=uncompressed_data_index_size" json:"uncompressed_data_index_size,omitempty"` + TotalUncompressedBytes *uint64 `protobuf:"varint,4,opt,name=total_uncompressed_bytes" json:"total_uncompressed_bytes,omitempty"` + DataIndexCount *uint32 `protobuf:"varint,5,opt,name=data_index_count" json:"data_index_count,omitempty"` + MetaIndexCount *uint32 `protobuf:"varint,6,opt,name=meta_index_count" json:"meta_index_count,omitempty"` + EntryCount *uint64 `protobuf:"varint,7,opt,name=entry_count" json:"entry_count,omitempty"` + NumDataIndexLevels *uint32 `protobuf:"varint,8,opt,name=num_data_index_levels" json:"num_data_index_levels,omitempty"` + FirstDataBlockOffset *uint64 `protobuf:"varint,9,opt,name=first_data_block_offset" json:"first_data_block_offset,omitempty"` + LastDataBlockOffset *uint64 `protobuf:"varint,10,opt,name=last_data_block_offset" json:"last_data_block_offset,omitempty"` + ComparatorClassName *string `protobuf:"bytes,11,opt,name=comparator_class_name" json:"comparator_class_name,omitempty"` + CompressionCodec *uint32 `protobuf:"varint,12,opt,name=compression_codec" json:"compression_codec,omitempty"` + EncryptionKey []byte `protobuf:"bytes,13,opt,name=encryption_key" json:"encryption_key,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FileTrailerProto) Reset() { *m = FileTrailerProto{} } +func (m *FileTrailerProto) String() string { return proto1.CompactTextString(m) } +func (*FileTrailerProto) ProtoMessage() {} + +func (m *FileTrailerProto) GetFileInfoOffset() uint64 { + if m != nil && m.FileInfoOffset != nil { + return *m.FileInfoOffset + } + return 0 +} + +func (m *FileTrailerProto) GetLoadOnOpenDataOffset() uint64 { + if m != nil && m.LoadOnOpenDataOffset != nil { + return *m.LoadOnOpenDataOffset + } + return 0 +} + +func (m *FileTrailerProto) GetUncompressedDataIndexSize() uint64 { + if m != nil && m.UncompressedDataIndexSize != nil { + return *m.UncompressedDataIndexSize + } + return 0 +} + +func (m *FileTrailerProto) GetTotalUncompressedBytes() uint64 { + if m != nil && m.TotalUncompressedBytes != nil { + return *m.TotalUncompressedBytes + } + return 0 +} + +func (m *FileTrailerProto) GetDataIndexCount() uint32 { + if m != nil && m.DataIndexCount != nil { + return *m.DataIndexCount + } + return 0 +} + +func (m *FileTrailerProto) GetMetaIndexCount() uint32 { + if m != nil && m.MetaIndexCount != nil { + return *m.MetaIndexCount + } + return 0 +} + +func (m *FileTrailerProto) GetEntryCount() uint64 { + if m != nil && m.EntryCount != nil { + return *m.EntryCount + } + return 0 +} + +func (m *FileTrailerProto) GetNumDataIndexLevels() uint32 { + if m != nil && m.NumDataIndexLevels != nil { + return *m.NumDataIndexLevels + } + return 0 +} + +func (m *FileTrailerProto) GetFirstDataBlockOffset() uint64 { + if m != nil && m.FirstDataBlockOffset != nil { + return *m.FirstDataBlockOffset + } + return 0 +} + +func (m *FileTrailerProto) GetLastDataBlockOffset() uint64 { + if m != nil && m.LastDataBlockOffset != nil { + return *m.LastDataBlockOffset + } + return 0 +} + +func (m *FileTrailerProto) GetComparatorClassName() string { + if m != nil && m.ComparatorClassName != nil { + return *m.ComparatorClassName + } + return "" +} + +func (m *FileTrailerProto) GetCompressionCodec() uint32 { + if m != nil && m.CompressionCodec != nil { + return *m.CompressionCodec + } + return 0 +} + +func (m *FileTrailerProto) GetEncryptionKey() []byte { + if m != nil { + return m.EncryptionKey + } + return nil +} + +func init() { +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/LoadBalancer.pb.go b/vendor/github.com/pingcap/go-hbase/proto/LoadBalancer.pb.go new file mode 100644 index 000000000..edcf22b89 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/LoadBalancer.pb.go @@ -0,0 +1,31 @@ +// Code generated by protoc-gen-go. +// source: LoadBalancer.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type LoadBalancerState struct { + BalancerOn *bool `protobuf:"varint,1,opt,name=balancer_on" json:"balancer_on,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *LoadBalancerState) Reset() { *m = LoadBalancerState{} } +func (m *LoadBalancerState) String() string { return proto1.CompactTextString(m) } +func (*LoadBalancerState) ProtoMessage() {} + +func (m *LoadBalancerState) GetBalancerOn() bool { + if m != nil && m.BalancerOn != nil { + return *m.BalancerOn + } + return false +} + +func init() { +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/MapReduce.pb.go b/vendor/github.com/pingcap/go-hbase/proto/MapReduce.pb.go new file mode 100644 index 000000000..ab83f9223 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/MapReduce.pb.go @@ -0,0 +1,63 @@ +// Code generated by protoc-gen-go. +// source: MapReduce.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type ScanMetrics struct { + Metrics []*NameInt64Pair `protobuf:"bytes,1,rep,name=metrics" json:"metrics,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ScanMetrics) Reset() { *m = ScanMetrics{} } +func (m *ScanMetrics) String() string { return proto1.CompactTextString(m) } +func (*ScanMetrics) ProtoMessage() {} + +func (m *ScanMetrics) GetMetrics() []*NameInt64Pair { + if m != nil { + return m.Metrics + } + return nil +} + +type TableSnapshotRegionSplit struct { + Locations []string `protobuf:"bytes,2,rep,name=locations" json:"locations,omitempty"` + Table *TableSchema `protobuf:"bytes,3,opt,name=table" json:"table,omitempty"` + Region *RegionInfo `protobuf:"bytes,4,opt,name=region" json:"region,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TableSnapshotRegionSplit) Reset() { *m = TableSnapshotRegionSplit{} } +func (m *TableSnapshotRegionSplit) String() string { return proto1.CompactTextString(m) } +func (*TableSnapshotRegionSplit) ProtoMessage() {} + +func (m *TableSnapshotRegionSplit) GetLocations() []string { + if m != nil { + return m.Locations + } + return nil +} + +func (m *TableSnapshotRegionSplit) GetTable() *TableSchema { + if m != nil { + return m.Table + } + return nil +} + +func (m *TableSnapshotRegionSplit) GetRegion() *RegionInfo { + if m != nil { + return m.Region + } + return nil +} + +func init() { +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/Master.pb.go b/vendor/github.com/pingcap/go-hbase/proto/Master.pb.go new file mode 100644 index 000000000..9c6d5eed2 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/Master.pb.go @@ -0,0 +1,1235 @@ +// Code generated by protoc-gen-go. +// source: Master.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type AddColumnRequest struct { + TableName *TableName `protobuf:"bytes,1,req,name=table_name" json:"table_name,omitempty"` + ColumnFamilies *ColumnFamilySchema `protobuf:"bytes,2,req,name=column_families" json:"column_families,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AddColumnRequest) Reset() { *m = AddColumnRequest{} } +func (m *AddColumnRequest) String() string { return proto1.CompactTextString(m) } +func (*AddColumnRequest) ProtoMessage() {} + +func (m *AddColumnRequest) GetTableName() *TableName { + if m != nil { + return m.TableName + } + return nil +} + +func (m *AddColumnRequest) GetColumnFamilies() *ColumnFamilySchema { + if m != nil { + return m.ColumnFamilies + } + return nil +} + +type AddColumnResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *AddColumnResponse) Reset() { *m = AddColumnResponse{} } +func (m *AddColumnResponse) String() string { return proto1.CompactTextString(m) } +func (*AddColumnResponse) ProtoMessage() {} + +type DeleteColumnRequest struct { + TableName *TableName `protobuf:"bytes,1,req,name=table_name" json:"table_name,omitempty"` + ColumnName []byte `protobuf:"bytes,2,req,name=column_name" json:"column_name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeleteColumnRequest) Reset() { *m = DeleteColumnRequest{} } +func (m *DeleteColumnRequest) String() string { return proto1.CompactTextString(m) } +func (*DeleteColumnRequest) ProtoMessage() {} + +func (m *DeleteColumnRequest) GetTableName() *TableName { + if m != nil { + return m.TableName + } + return nil +} + +func (m *DeleteColumnRequest) GetColumnName() []byte { + if m != nil { + return m.ColumnName + } + return nil +} + +type DeleteColumnResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeleteColumnResponse) Reset() { *m = DeleteColumnResponse{} } +func (m *DeleteColumnResponse) String() string { return proto1.CompactTextString(m) } +func (*DeleteColumnResponse) ProtoMessage() {} + +type ModifyColumnRequest struct { + TableName *TableName `protobuf:"bytes,1,req,name=table_name" json:"table_name,omitempty"` + ColumnFamilies *ColumnFamilySchema `protobuf:"bytes,2,req,name=column_families" json:"column_families,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ModifyColumnRequest) Reset() { *m = ModifyColumnRequest{} } +func (m *ModifyColumnRequest) String() string { return proto1.CompactTextString(m) } +func (*ModifyColumnRequest) ProtoMessage() {} + +func (m *ModifyColumnRequest) GetTableName() *TableName { + if m != nil { + return m.TableName + } + return nil +} + +func (m *ModifyColumnRequest) GetColumnFamilies() *ColumnFamilySchema { + if m != nil { + return m.ColumnFamilies + } + return nil +} + +type ModifyColumnResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *ModifyColumnResponse) Reset() { *m = ModifyColumnResponse{} } +func (m *ModifyColumnResponse) String() string { return proto1.CompactTextString(m) } +func (*ModifyColumnResponse) ProtoMessage() {} + +type MoveRegionRequest struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + DestServerName *ServerName `protobuf:"bytes,2,opt,name=dest_server_name" json:"dest_server_name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MoveRegionRequest) Reset() { *m = MoveRegionRequest{} } +func (m *MoveRegionRequest) String() string { return proto1.CompactTextString(m) } +func (*MoveRegionRequest) ProtoMessage() {} + +func (m *MoveRegionRequest) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +func (m *MoveRegionRequest) GetDestServerName() *ServerName { + if m != nil { + return m.DestServerName + } + return nil +} + +type MoveRegionResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *MoveRegionResponse) Reset() { *m = MoveRegionResponse{} } +func (m *MoveRegionResponse) String() string { return proto1.CompactTextString(m) } +func (*MoveRegionResponse) ProtoMessage() {} + +// * +// Dispatch merging the specified regions. +type DispatchMergingRegionsRequest struct { + RegionA *RegionSpecifier `protobuf:"bytes,1,req,name=region_a" json:"region_a,omitempty"` + RegionB *RegionSpecifier `protobuf:"bytes,2,req,name=region_b" json:"region_b,omitempty"` + Forcible *bool `protobuf:"varint,3,opt,name=forcible,def=0" json:"forcible,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DispatchMergingRegionsRequest) Reset() { *m = DispatchMergingRegionsRequest{} } +func (m *DispatchMergingRegionsRequest) String() string { return proto1.CompactTextString(m) } +func (*DispatchMergingRegionsRequest) ProtoMessage() {} + +const Default_DispatchMergingRegionsRequest_Forcible bool = false + +func (m *DispatchMergingRegionsRequest) GetRegionA() *RegionSpecifier { + if m != nil { + return m.RegionA + } + return nil +} + +func (m *DispatchMergingRegionsRequest) GetRegionB() *RegionSpecifier { + if m != nil { + return m.RegionB + } + return nil +} + +func (m *DispatchMergingRegionsRequest) GetForcible() bool { + if m != nil && m.Forcible != nil { + return *m.Forcible + } + return Default_DispatchMergingRegionsRequest_Forcible +} + +type DispatchMergingRegionsResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *DispatchMergingRegionsResponse) Reset() { *m = DispatchMergingRegionsResponse{} } +func (m *DispatchMergingRegionsResponse) String() string { return proto1.CompactTextString(m) } +func (*DispatchMergingRegionsResponse) ProtoMessage() {} + +type AssignRegionRequest struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *AssignRegionRequest) Reset() { *m = AssignRegionRequest{} } +func (m *AssignRegionRequest) String() string { return proto1.CompactTextString(m) } +func (*AssignRegionRequest) ProtoMessage() {} + +func (m *AssignRegionRequest) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +type AssignRegionResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *AssignRegionResponse) Reset() { *m = AssignRegionResponse{} } +func (m *AssignRegionResponse) String() string { return proto1.CompactTextString(m) } +func (*AssignRegionResponse) ProtoMessage() {} + +type UnassignRegionRequest struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + Force *bool `protobuf:"varint,2,opt,name=force,def=0" json:"force,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnassignRegionRequest) Reset() { *m = UnassignRegionRequest{} } +func (m *UnassignRegionRequest) String() string { return proto1.CompactTextString(m) } +func (*UnassignRegionRequest) ProtoMessage() {} + +const Default_UnassignRegionRequest_Force bool = false + +func (m *UnassignRegionRequest) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +func (m *UnassignRegionRequest) GetForce() bool { + if m != nil && m.Force != nil { + return *m.Force + } + return Default_UnassignRegionRequest_Force +} + +type UnassignRegionResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *UnassignRegionResponse) Reset() { *m = UnassignRegionResponse{} } +func (m *UnassignRegionResponse) String() string { return proto1.CompactTextString(m) } +func (*UnassignRegionResponse) ProtoMessage() {} + +type OfflineRegionRequest struct { + Region *RegionSpecifier `protobuf:"bytes,1,req,name=region" json:"region,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OfflineRegionRequest) Reset() { *m = OfflineRegionRequest{} } +func (m *OfflineRegionRequest) String() string { return proto1.CompactTextString(m) } +func (*OfflineRegionRequest) ProtoMessage() {} + +func (m *OfflineRegionRequest) GetRegion() *RegionSpecifier { + if m != nil { + return m.Region + } + return nil +} + +type OfflineRegionResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *OfflineRegionResponse) Reset() { *m = OfflineRegionResponse{} } +func (m *OfflineRegionResponse) String() string { return proto1.CompactTextString(m) } +func (*OfflineRegionResponse) ProtoMessage() {} + +type CreateTableRequest struct { + TableSchema *TableSchema `protobuf:"bytes,1,req,name=table_schema" json:"table_schema,omitempty"` + SplitKeys [][]byte `protobuf:"bytes,2,rep,name=split_keys" json:"split_keys,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CreateTableRequest) Reset() { *m = CreateTableRequest{} } +func (m *CreateTableRequest) String() string { return proto1.CompactTextString(m) } +func (*CreateTableRequest) ProtoMessage() {} + +func (m *CreateTableRequest) GetTableSchema() *TableSchema { + if m != nil { + return m.TableSchema + } + return nil +} + +func (m *CreateTableRequest) GetSplitKeys() [][]byte { + if m != nil { + return m.SplitKeys + } + return nil +} + +type CreateTableResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *CreateTableResponse) Reset() { *m = CreateTableResponse{} } +func (m *CreateTableResponse) String() string { return proto1.CompactTextString(m) } +func (*CreateTableResponse) ProtoMessage() {} + +type DeleteTableRequest struct { + TableName *TableName `protobuf:"bytes,1,req,name=table_name" json:"table_name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeleteTableRequest) Reset() { *m = DeleteTableRequest{} } +func (m *DeleteTableRequest) String() string { return proto1.CompactTextString(m) } +func (*DeleteTableRequest) ProtoMessage() {} + +func (m *DeleteTableRequest) GetTableName() *TableName { + if m != nil { + return m.TableName + } + return nil +} + +type DeleteTableResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeleteTableResponse) Reset() { *m = DeleteTableResponse{} } +func (m *DeleteTableResponse) String() string { return proto1.CompactTextString(m) } +func (*DeleteTableResponse) ProtoMessage() {} + +type EnableTableRequest struct { + TableName *TableName `protobuf:"bytes,1,req,name=table_name" json:"table_name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *EnableTableRequest) Reset() { *m = EnableTableRequest{} } +func (m *EnableTableRequest) String() string { return proto1.CompactTextString(m) } +func (*EnableTableRequest) ProtoMessage() {} + +func (m *EnableTableRequest) GetTableName() *TableName { + if m != nil { + return m.TableName + } + return nil +} + +type EnableTableResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *EnableTableResponse) Reset() { *m = EnableTableResponse{} } +func (m *EnableTableResponse) String() string { return proto1.CompactTextString(m) } +func (*EnableTableResponse) ProtoMessage() {} + +type DisableTableRequest struct { + TableName *TableName `protobuf:"bytes,1,req,name=table_name" json:"table_name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DisableTableRequest) Reset() { *m = DisableTableRequest{} } +func (m *DisableTableRequest) String() string { return proto1.CompactTextString(m) } +func (*DisableTableRequest) ProtoMessage() {} + +func (m *DisableTableRequest) GetTableName() *TableName { + if m != nil { + return m.TableName + } + return nil +} + +type DisableTableResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *DisableTableResponse) Reset() { *m = DisableTableResponse{} } +func (m *DisableTableResponse) String() string { return proto1.CompactTextString(m) } +func (*DisableTableResponse) ProtoMessage() {} + +type ModifyTableRequest struct { + TableName *TableName `protobuf:"bytes,1,req,name=table_name" json:"table_name,omitempty"` + TableSchema *TableSchema `protobuf:"bytes,2,req,name=table_schema" json:"table_schema,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ModifyTableRequest) Reset() { *m = ModifyTableRequest{} } +func (m *ModifyTableRequest) String() string { return proto1.CompactTextString(m) } +func (*ModifyTableRequest) ProtoMessage() {} + +func (m *ModifyTableRequest) GetTableName() *TableName { + if m != nil { + return m.TableName + } + return nil +} + +func (m *ModifyTableRequest) GetTableSchema() *TableSchema { + if m != nil { + return m.TableSchema + } + return nil +} + +type ModifyTableResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *ModifyTableResponse) Reset() { *m = ModifyTableResponse{} } +func (m *ModifyTableResponse) String() string { return proto1.CompactTextString(m) } +func (*ModifyTableResponse) ProtoMessage() {} + +type CreateNamespaceRequest struct { + NamespaceDescriptor *NamespaceDescriptor `protobuf:"bytes,1,req,name=namespaceDescriptor" json:"namespaceDescriptor,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CreateNamespaceRequest) Reset() { *m = CreateNamespaceRequest{} } +func (m *CreateNamespaceRequest) String() string { return proto1.CompactTextString(m) } +func (*CreateNamespaceRequest) ProtoMessage() {} + +func (m *CreateNamespaceRequest) GetNamespaceDescriptor() *NamespaceDescriptor { + if m != nil { + return m.NamespaceDescriptor + } + return nil +} + +type CreateNamespaceResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *CreateNamespaceResponse) Reset() { *m = CreateNamespaceResponse{} } +func (m *CreateNamespaceResponse) String() string { return proto1.CompactTextString(m) } +func (*CreateNamespaceResponse) ProtoMessage() {} + +type DeleteNamespaceRequest struct { + NamespaceName *string `protobuf:"bytes,1,req,name=namespaceName" json:"namespaceName,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeleteNamespaceRequest) Reset() { *m = DeleteNamespaceRequest{} } +func (m *DeleteNamespaceRequest) String() string { return proto1.CompactTextString(m) } +func (*DeleteNamespaceRequest) ProtoMessage() {} + +func (m *DeleteNamespaceRequest) GetNamespaceName() string { + if m != nil && m.NamespaceName != nil { + return *m.NamespaceName + } + return "" +} + +type DeleteNamespaceResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeleteNamespaceResponse) Reset() { *m = DeleteNamespaceResponse{} } +func (m *DeleteNamespaceResponse) String() string { return proto1.CompactTextString(m) } +func (*DeleteNamespaceResponse) ProtoMessage() {} + +type ModifyNamespaceRequest struct { + NamespaceDescriptor *NamespaceDescriptor `protobuf:"bytes,1,req,name=namespaceDescriptor" json:"namespaceDescriptor,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ModifyNamespaceRequest) Reset() { *m = ModifyNamespaceRequest{} } +func (m *ModifyNamespaceRequest) String() string { return proto1.CompactTextString(m) } +func (*ModifyNamespaceRequest) ProtoMessage() {} + +func (m *ModifyNamespaceRequest) GetNamespaceDescriptor() *NamespaceDescriptor { + if m != nil { + return m.NamespaceDescriptor + } + return nil +} + +type ModifyNamespaceResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *ModifyNamespaceResponse) Reset() { *m = ModifyNamespaceResponse{} } +func (m *ModifyNamespaceResponse) String() string { return proto1.CompactTextString(m) } +func (*ModifyNamespaceResponse) ProtoMessage() {} + +type GetNamespaceDescriptorRequest struct { + NamespaceName *string `protobuf:"bytes,1,req,name=namespaceName" json:"namespaceName,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetNamespaceDescriptorRequest) Reset() { *m = GetNamespaceDescriptorRequest{} } +func (m *GetNamespaceDescriptorRequest) String() string { return proto1.CompactTextString(m) } +func (*GetNamespaceDescriptorRequest) ProtoMessage() {} + +func (m *GetNamespaceDescriptorRequest) GetNamespaceName() string { + if m != nil && m.NamespaceName != nil { + return *m.NamespaceName + } + return "" +} + +type GetNamespaceDescriptorResponse struct { + NamespaceDescriptor *NamespaceDescriptor `protobuf:"bytes,1,req,name=namespaceDescriptor" json:"namespaceDescriptor,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetNamespaceDescriptorResponse) Reset() { *m = GetNamespaceDescriptorResponse{} } +func (m *GetNamespaceDescriptorResponse) String() string { return proto1.CompactTextString(m) } +func (*GetNamespaceDescriptorResponse) ProtoMessage() {} + +func (m *GetNamespaceDescriptorResponse) GetNamespaceDescriptor() *NamespaceDescriptor { + if m != nil { + return m.NamespaceDescriptor + } + return nil +} + +type ListNamespaceDescriptorsRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *ListNamespaceDescriptorsRequest) Reset() { *m = ListNamespaceDescriptorsRequest{} } +func (m *ListNamespaceDescriptorsRequest) String() string { return proto1.CompactTextString(m) } +func (*ListNamespaceDescriptorsRequest) ProtoMessage() {} + +type ListNamespaceDescriptorsResponse struct { + NamespaceDescriptor []*NamespaceDescriptor `protobuf:"bytes,1,rep,name=namespaceDescriptor" json:"namespaceDescriptor,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ListNamespaceDescriptorsResponse) Reset() { *m = ListNamespaceDescriptorsResponse{} } +func (m *ListNamespaceDescriptorsResponse) String() string { return proto1.CompactTextString(m) } +func (*ListNamespaceDescriptorsResponse) ProtoMessage() {} + +func (m *ListNamespaceDescriptorsResponse) GetNamespaceDescriptor() []*NamespaceDescriptor { + if m != nil { + return m.NamespaceDescriptor + } + return nil +} + +type ListTableDescriptorsByNamespaceRequest struct { + NamespaceName *string `protobuf:"bytes,1,req,name=namespaceName" json:"namespaceName,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ListTableDescriptorsByNamespaceRequest) Reset() { + *m = ListTableDescriptorsByNamespaceRequest{} +} +func (m *ListTableDescriptorsByNamespaceRequest) String() string { return proto1.CompactTextString(m) } +func (*ListTableDescriptorsByNamespaceRequest) ProtoMessage() {} + +func (m *ListTableDescriptorsByNamespaceRequest) GetNamespaceName() string { + if m != nil && m.NamespaceName != nil { + return *m.NamespaceName + } + return "" +} + +type ListTableDescriptorsByNamespaceResponse struct { + TableSchema []*TableSchema `protobuf:"bytes,1,rep,name=tableSchema" json:"tableSchema,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ListTableDescriptorsByNamespaceResponse) Reset() { + *m = ListTableDescriptorsByNamespaceResponse{} +} +func (m *ListTableDescriptorsByNamespaceResponse) String() string { return proto1.CompactTextString(m) } +func (*ListTableDescriptorsByNamespaceResponse) ProtoMessage() {} + +func (m *ListTableDescriptorsByNamespaceResponse) GetTableSchema() []*TableSchema { + if m != nil { + return m.TableSchema + } + return nil +} + +type ListTableNamesByNamespaceRequest struct { + NamespaceName *string `protobuf:"bytes,1,req,name=namespaceName" json:"namespaceName,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ListTableNamesByNamespaceRequest) Reset() { *m = ListTableNamesByNamespaceRequest{} } +func (m *ListTableNamesByNamespaceRequest) String() string { return proto1.CompactTextString(m) } +func (*ListTableNamesByNamespaceRequest) ProtoMessage() {} + +func (m *ListTableNamesByNamespaceRequest) GetNamespaceName() string { + if m != nil && m.NamespaceName != nil { + return *m.NamespaceName + } + return "" +} + +type ListTableNamesByNamespaceResponse struct { + TableName []*TableName `protobuf:"bytes,1,rep,name=tableName" json:"tableName,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ListTableNamesByNamespaceResponse) Reset() { *m = ListTableNamesByNamespaceResponse{} } +func (m *ListTableNamesByNamespaceResponse) String() string { return proto1.CompactTextString(m) } +func (*ListTableNamesByNamespaceResponse) ProtoMessage() {} + +func (m *ListTableNamesByNamespaceResponse) GetTableName() []*TableName { + if m != nil { + return m.TableName + } + return nil +} + +type ShutdownRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *ShutdownRequest) Reset() { *m = ShutdownRequest{} } +func (m *ShutdownRequest) String() string { return proto1.CompactTextString(m) } +func (*ShutdownRequest) ProtoMessage() {} + +type ShutdownResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *ShutdownResponse) Reset() { *m = ShutdownResponse{} } +func (m *ShutdownResponse) String() string { return proto1.CompactTextString(m) } +func (*ShutdownResponse) ProtoMessage() {} + +type StopMasterRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *StopMasterRequest) Reset() { *m = StopMasterRequest{} } +func (m *StopMasterRequest) String() string { return proto1.CompactTextString(m) } +func (*StopMasterRequest) ProtoMessage() {} + +type StopMasterResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *StopMasterResponse) Reset() { *m = StopMasterResponse{} } +func (m *StopMasterResponse) String() string { return proto1.CompactTextString(m) } +func (*StopMasterResponse) ProtoMessage() {} + +type BalanceRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *BalanceRequest) Reset() { *m = BalanceRequest{} } +func (m *BalanceRequest) String() string { return proto1.CompactTextString(m) } +func (*BalanceRequest) ProtoMessage() {} + +type BalanceResponse struct { + BalancerRan *bool `protobuf:"varint,1,req,name=balancer_ran" json:"balancer_ran,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *BalanceResponse) Reset() { *m = BalanceResponse{} } +func (m *BalanceResponse) String() string { return proto1.CompactTextString(m) } +func (*BalanceResponse) ProtoMessage() {} + +func (m *BalanceResponse) GetBalancerRan() bool { + if m != nil && m.BalancerRan != nil { + return *m.BalancerRan + } + return false +} + +type SetBalancerRunningRequest struct { + On *bool `protobuf:"varint,1,req,name=on" json:"on,omitempty"` + Synchronous *bool `protobuf:"varint,2,opt,name=synchronous" json:"synchronous,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SetBalancerRunningRequest) Reset() { *m = SetBalancerRunningRequest{} } +func (m *SetBalancerRunningRequest) String() string { return proto1.CompactTextString(m) } +func (*SetBalancerRunningRequest) ProtoMessage() {} + +func (m *SetBalancerRunningRequest) GetOn() bool { + if m != nil && m.On != nil { + return *m.On + } + return false +} + +func (m *SetBalancerRunningRequest) GetSynchronous() bool { + if m != nil && m.Synchronous != nil { + return *m.Synchronous + } + return false +} + +type SetBalancerRunningResponse struct { + PrevBalanceValue *bool `protobuf:"varint,1,opt,name=prev_balance_value" json:"prev_balance_value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SetBalancerRunningResponse) Reset() { *m = SetBalancerRunningResponse{} } +func (m *SetBalancerRunningResponse) String() string { return proto1.CompactTextString(m) } +func (*SetBalancerRunningResponse) ProtoMessage() {} + +func (m *SetBalancerRunningResponse) GetPrevBalanceValue() bool { + if m != nil && m.PrevBalanceValue != nil { + return *m.PrevBalanceValue + } + return false +} + +type IsBalancerEnabledRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *IsBalancerEnabledRequest) Reset() { *m = IsBalancerEnabledRequest{} } +func (m *IsBalancerEnabledRequest) String() string { return proto1.CompactTextString(m) } +func (*IsBalancerEnabledRequest) ProtoMessage() {} + +type IsBalancerEnabledResponse struct { + Enabled *bool `protobuf:"varint,1,req,name=enabled" json:"enabled,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *IsBalancerEnabledResponse) Reset() { *m = IsBalancerEnabledResponse{} } +func (m *IsBalancerEnabledResponse) String() string { return proto1.CompactTextString(m) } +func (*IsBalancerEnabledResponse) ProtoMessage() {} + +func (m *IsBalancerEnabledResponse) GetEnabled() bool { + if m != nil && m.Enabled != nil { + return *m.Enabled + } + return false +} + +type RunCatalogScanRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *RunCatalogScanRequest) Reset() { *m = RunCatalogScanRequest{} } +func (m *RunCatalogScanRequest) String() string { return proto1.CompactTextString(m) } +func (*RunCatalogScanRequest) ProtoMessage() {} + +type RunCatalogScanResponse struct { + ScanResult *int32 `protobuf:"varint,1,opt,name=scan_result" json:"scan_result,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RunCatalogScanResponse) Reset() { *m = RunCatalogScanResponse{} } +func (m *RunCatalogScanResponse) String() string { return proto1.CompactTextString(m) } +func (*RunCatalogScanResponse) ProtoMessage() {} + +func (m *RunCatalogScanResponse) GetScanResult() int32 { + if m != nil && m.ScanResult != nil { + return *m.ScanResult + } + return 0 +} + +type EnableCatalogJanitorRequest struct { + Enable *bool `protobuf:"varint,1,req,name=enable" json:"enable,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *EnableCatalogJanitorRequest) Reset() { *m = EnableCatalogJanitorRequest{} } +func (m *EnableCatalogJanitorRequest) String() string { return proto1.CompactTextString(m) } +func (*EnableCatalogJanitorRequest) ProtoMessage() {} + +func (m *EnableCatalogJanitorRequest) GetEnable() bool { + if m != nil && m.Enable != nil { + return *m.Enable + } + return false +} + +type EnableCatalogJanitorResponse struct { + PrevValue *bool `protobuf:"varint,1,opt,name=prev_value" json:"prev_value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *EnableCatalogJanitorResponse) Reset() { *m = EnableCatalogJanitorResponse{} } +func (m *EnableCatalogJanitorResponse) String() string { return proto1.CompactTextString(m) } +func (*EnableCatalogJanitorResponse) ProtoMessage() {} + +func (m *EnableCatalogJanitorResponse) GetPrevValue() bool { + if m != nil && m.PrevValue != nil { + return *m.PrevValue + } + return false +} + +type IsCatalogJanitorEnabledRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *IsCatalogJanitorEnabledRequest) Reset() { *m = IsCatalogJanitorEnabledRequest{} } +func (m *IsCatalogJanitorEnabledRequest) String() string { return proto1.CompactTextString(m) } +func (*IsCatalogJanitorEnabledRequest) ProtoMessage() {} + +type IsCatalogJanitorEnabledResponse struct { + Value *bool `protobuf:"varint,1,req,name=value" json:"value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *IsCatalogJanitorEnabledResponse) Reset() { *m = IsCatalogJanitorEnabledResponse{} } +func (m *IsCatalogJanitorEnabledResponse) String() string { return proto1.CompactTextString(m) } +func (*IsCatalogJanitorEnabledResponse) ProtoMessage() {} + +func (m *IsCatalogJanitorEnabledResponse) GetValue() bool { + if m != nil && m.Value != nil { + return *m.Value + } + return false +} + +type SnapshotRequest struct { + Snapshot *SnapshotDescription `protobuf:"bytes,1,req,name=snapshot" json:"snapshot,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SnapshotRequest) Reset() { *m = SnapshotRequest{} } +func (m *SnapshotRequest) String() string { return proto1.CompactTextString(m) } +func (*SnapshotRequest) ProtoMessage() {} + +func (m *SnapshotRequest) GetSnapshot() *SnapshotDescription { + if m != nil { + return m.Snapshot + } + return nil +} + +type SnapshotResponse struct { + ExpectedTimeout *int64 `protobuf:"varint,1,req,name=expected_timeout" json:"expected_timeout,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SnapshotResponse) Reset() { *m = SnapshotResponse{} } +func (m *SnapshotResponse) String() string { return proto1.CompactTextString(m) } +func (*SnapshotResponse) ProtoMessage() {} + +func (m *SnapshotResponse) GetExpectedTimeout() int64 { + if m != nil && m.ExpectedTimeout != nil { + return *m.ExpectedTimeout + } + return 0 +} + +type GetCompletedSnapshotsRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetCompletedSnapshotsRequest) Reset() { *m = GetCompletedSnapshotsRequest{} } +func (m *GetCompletedSnapshotsRequest) String() string { return proto1.CompactTextString(m) } +func (*GetCompletedSnapshotsRequest) ProtoMessage() {} + +type GetCompletedSnapshotsResponse struct { + Snapshots []*SnapshotDescription `protobuf:"bytes,1,rep,name=snapshots" json:"snapshots,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetCompletedSnapshotsResponse) Reset() { *m = GetCompletedSnapshotsResponse{} } +func (m *GetCompletedSnapshotsResponse) String() string { return proto1.CompactTextString(m) } +func (*GetCompletedSnapshotsResponse) ProtoMessage() {} + +func (m *GetCompletedSnapshotsResponse) GetSnapshots() []*SnapshotDescription { + if m != nil { + return m.Snapshots + } + return nil +} + +type DeleteSnapshotRequest struct { + Snapshot *SnapshotDescription `protobuf:"bytes,1,req,name=snapshot" json:"snapshot,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeleteSnapshotRequest) Reset() { *m = DeleteSnapshotRequest{} } +func (m *DeleteSnapshotRequest) String() string { return proto1.CompactTextString(m) } +func (*DeleteSnapshotRequest) ProtoMessage() {} + +func (m *DeleteSnapshotRequest) GetSnapshot() *SnapshotDescription { + if m != nil { + return m.Snapshot + } + return nil +} + +type DeleteSnapshotResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *DeleteSnapshotResponse) Reset() { *m = DeleteSnapshotResponse{} } +func (m *DeleteSnapshotResponse) String() string { return proto1.CompactTextString(m) } +func (*DeleteSnapshotResponse) ProtoMessage() {} + +type RestoreSnapshotRequest struct { + Snapshot *SnapshotDescription `protobuf:"bytes,1,req,name=snapshot" json:"snapshot,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RestoreSnapshotRequest) Reset() { *m = RestoreSnapshotRequest{} } +func (m *RestoreSnapshotRequest) String() string { return proto1.CompactTextString(m) } +func (*RestoreSnapshotRequest) ProtoMessage() {} + +func (m *RestoreSnapshotRequest) GetSnapshot() *SnapshotDescription { + if m != nil { + return m.Snapshot + } + return nil +} + +type RestoreSnapshotResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *RestoreSnapshotResponse) Reset() { *m = RestoreSnapshotResponse{} } +func (m *RestoreSnapshotResponse) String() string { return proto1.CompactTextString(m) } +func (*RestoreSnapshotResponse) ProtoMessage() {} + +// if you don't send the snapshot, then you will get it back +// in the response (if the snapshot is done) so you can check the snapshot +type IsSnapshotDoneRequest struct { + Snapshot *SnapshotDescription `protobuf:"bytes,1,opt,name=snapshot" json:"snapshot,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *IsSnapshotDoneRequest) Reset() { *m = IsSnapshotDoneRequest{} } +func (m *IsSnapshotDoneRequest) String() string { return proto1.CompactTextString(m) } +func (*IsSnapshotDoneRequest) ProtoMessage() {} + +func (m *IsSnapshotDoneRequest) GetSnapshot() *SnapshotDescription { + if m != nil { + return m.Snapshot + } + return nil +} + +type IsSnapshotDoneResponse struct { + Done *bool `protobuf:"varint,1,opt,name=done,def=0" json:"done,omitempty"` + Snapshot *SnapshotDescription `protobuf:"bytes,2,opt,name=snapshot" json:"snapshot,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *IsSnapshotDoneResponse) Reset() { *m = IsSnapshotDoneResponse{} } +func (m *IsSnapshotDoneResponse) String() string { return proto1.CompactTextString(m) } +func (*IsSnapshotDoneResponse) ProtoMessage() {} + +const Default_IsSnapshotDoneResponse_Done bool = false + +func (m *IsSnapshotDoneResponse) GetDone() bool { + if m != nil && m.Done != nil { + return *m.Done + } + return Default_IsSnapshotDoneResponse_Done +} + +func (m *IsSnapshotDoneResponse) GetSnapshot() *SnapshotDescription { + if m != nil { + return m.Snapshot + } + return nil +} + +type IsRestoreSnapshotDoneRequest struct { + Snapshot *SnapshotDescription `protobuf:"bytes,1,opt,name=snapshot" json:"snapshot,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *IsRestoreSnapshotDoneRequest) Reset() { *m = IsRestoreSnapshotDoneRequest{} } +func (m *IsRestoreSnapshotDoneRequest) String() string { return proto1.CompactTextString(m) } +func (*IsRestoreSnapshotDoneRequest) ProtoMessage() {} + +func (m *IsRestoreSnapshotDoneRequest) GetSnapshot() *SnapshotDescription { + if m != nil { + return m.Snapshot + } + return nil +} + +type IsRestoreSnapshotDoneResponse struct { + Done *bool `protobuf:"varint,1,opt,name=done,def=0" json:"done,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *IsRestoreSnapshotDoneResponse) Reset() { *m = IsRestoreSnapshotDoneResponse{} } +func (m *IsRestoreSnapshotDoneResponse) String() string { return proto1.CompactTextString(m) } +func (*IsRestoreSnapshotDoneResponse) ProtoMessage() {} + +const Default_IsRestoreSnapshotDoneResponse_Done bool = false + +func (m *IsRestoreSnapshotDoneResponse) GetDone() bool { + if m != nil && m.Done != nil { + return *m.Done + } + return Default_IsRestoreSnapshotDoneResponse_Done +} + +type GetSchemaAlterStatusRequest struct { + TableName *TableName `protobuf:"bytes,1,req,name=table_name" json:"table_name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetSchemaAlterStatusRequest) Reset() { *m = GetSchemaAlterStatusRequest{} } +func (m *GetSchemaAlterStatusRequest) String() string { return proto1.CompactTextString(m) } +func (*GetSchemaAlterStatusRequest) ProtoMessage() {} + +func (m *GetSchemaAlterStatusRequest) GetTableName() *TableName { + if m != nil { + return m.TableName + } + return nil +} + +type GetSchemaAlterStatusResponse struct { + YetToUpdateRegions *uint32 `protobuf:"varint,1,opt,name=yet_to_update_regions" json:"yet_to_update_regions,omitempty"` + TotalRegions *uint32 `protobuf:"varint,2,opt,name=total_regions" json:"total_regions,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetSchemaAlterStatusResponse) Reset() { *m = GetSchemaAlterStatusResponse{} } +func (m *GetSchemaAlterStatusResponse) String() string { return proto1.CompactTextString(m) } +func (*GetSchemaAlterStatusResponse) ProtoMessage() {} + +func (m *GetSchemaAlterStatusResponse) GetYetToUpdateRegions() uint32 { + if m != nil && m.YetToUpdateRegions != nil { + return *m.YetToUpdateRegions + } + return 0 +} + +func (m *GetSchemaAlterStatusResponse) GetTotalRegions() uint32 { + if m != nil && m.TotalRegions != nil { + return *m.TotalRegions + } + return 0 +} + +type GetTableDescriptorsRequest struct { + TableNames []*TableName `protobuf:"bytes,1,rep,name=table_names" json:"table_names,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetTableDescriptorsRequest) Reset() { *m = GetTableDescriptorsRequest{} } +func (m *GetTableDescriptorsRequest) String() string { return proto1.CompactTextString(m) } +func (*GetTableDescriptorsRequest) ProtoMessage() {} + +func (m *GetTableDescriptorsRequest) GetTableNames() []*TableName { + if m != nil { + return m.TableNames + } + return nil +} + +type GetTableDescriptorsResponse struct { + TableSchema []*TableSchema `protobuf:"bytes,1,rep,name=table_schema" json:"table_schema,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetTableDescriptorsResponse) Reset() { *m = GetTableDescriptorsResponse{} } +func (m *GetTableDescriptorsResponse) String() string { return proto1.CompactTextString(m) } +func (*GetTableDescriptorsResponse) ProtoMessage() {} + +func (m *GetTableDescriptorsResponse) GetTableSchema() []*TableSchema { + if m != nil { + return m.TableSchema + } + return nil +} + +type GetTableNamesRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetTableNamesRequest) Reset() { *m = GetTableNamesRequest{} } +func (m *GetTableNamesRequest) String() string { return proto1.CompactTextString(m) } +func (*GetTableNamesRequest) ProtoMessage() {} + +type GetTableNamesResponse struct { + TableNames []*TableName `protobuf:"bytes,1,rep,name=table_names" json:"table_names,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetTableNamesResponse) Reset() { *m = GetTableNamesResponse{} } +func (m *GetTableNamesResponse) String() string { return proto1.CompactTextString(m) } +func (*GetTableNamesResponse) ProtoMessage() {} + +func (m *GetTableNamesResponse) GetTableNames() []*TableName { + if m != nil { + return m.TableNames + } + return nil +} + +type GetClusterStatusRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetClusterStatusRequest) Reset() { *m = GetClusterStatusRequest{} } +func (m *GetClusterStatusRequest) String() string { return proto1.CompactTextString(m) } +func (*GetClusterStatusRequest) ProtoMessage() {} + +type GetClusterStatusResponse struct { + ClusterStatus *ClusterStatus `protobuf:"bytes,1,req,name=cluster_status" json:"cluster_status,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetClusterStatusResponse) Reset() { *m = GetClusterStatusResponse{} } +func (m *GetClusterStatusResponse) String() string { return proto1.CompactTextString(m) } +func (*GetClusterStatusResponse) ProtoMessage() {} + +func (m *GetClusterStatusResponse) GetClusterStatus() *ClusterStatus { + if m != nil { + return m.ClusterStatus + } + return nil +} + +type IsMasterRunningRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *IsMasterRunningRequest) Reset() { *m = IsMasterRunningRequest{} } +func (m *IsMasterRunningRequest) String() string { return proto1.CompactTextString(m) } +func (*IsMasterRunningRequest) ProtoMessage() {} + +type IsMasterRunningResponse struct { + IsMasterRunning *bool `protobuf:"varint,1,req,name=is_master_running" json:"is_master_running,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *IsMasterRunningResponse) Reset() { *m = IsMasterRunningResponse{} } +func (m *IsMasterRunningResponse) String() string { return proto1.CompactTextString(m) } +func (*IsMasterRunningResponse) ProtoMessage() {} + +func (m *IsMasterRunningResponse) GetIsMasterRunning() bool { + if m != nil && m.IsMasterRunning != nil { + return *m.IsMasterRunning + } + return false +} + +type ExecProcedureRequest struct { + Procedure *ProcedureDescription `protobuf:"bytes,1,req,name=procedure" json:"procedure,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ExecProcedureRequest) Reset() { *m = ExecProcedureRequest{} } +func (m *ExecProcedureRequest) String() string { return proto1.CompactTextString(m) } +func (*ExecProcedureRequest) ProtoMessage() {} + +func (m *ExecProcedureRequest) GetProcedure() *ProcedureDescription { + if m != nil { + return m.Procedure + } + return nil +} + +type ExecProcedureResponse struct { + ExpectedTimeout *int64 `protobuf:"varint,1,req,name=expected_timeout" json:"expected_timeout,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ExecProcedureResponse) Reset() { *m = ExecProcedureResponse{} } +func (m *ExecProcedureResponse) String() string { return proto1.CompactTextString(m) } +func (*ExecProcedureResponse) ProtoMessage() {} + +func (m *ExecProcedureResponse) GetExpectedTimeout() int64 { + if m != nil && m.ExpectedTimeout != nil { + return *m.ExpectedTimeout + } + return 0 +} + +type IsProcedureDoneRequest struct { + Procedure *ProcedureDescription `protobuf:"bytes,1,opt,name=procedure" json:"procedure,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *IsProcedureDoneRequest) Reset() { *m = IsProcedureDoneRequest{} } +func (m *IsProcedureDoneRequest) String() string { return proto1.CompactTextString(m) } +func (*IsProcedureDoneRequest) ProtoMessage() {} + +func (m *IsProcedureDoneRequest) GetProcedure() *ProcedureDescription { + if m != nil { + return m.Procedure + } + return nil +} + +type IsProcedureDoneResponse struct { + Done *bool `protobuf:"varint,1,opt,name=done,def=0" json:"done,omitempty"` + Snapshot *ProcedureDescription `protobuf:"bytes,2,opt,name=snapshot" json:"snapshot,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *IsProcedureDoneResponse) Reset() { *m = IsProcedureDoneResponse{} } +func (m *IsProcedureDoneResponse) String() string { return proto1.CompactTextString(m) } +func (*IsProcedureDoneResponse) ProtoMessage() {} + +const Default_IsProcedureDoneResponse_Done bool = false + +func (m *IsProcedureDoneResponse) GetDone() bool { + if m != nil && m.Done != nil { + return *m.Done + } + return Default_IsProcedureDoneResponse_Done +} + +func (m *IsProcedureDoneResponse) GetSnapshot() *ProcedureDescription { + if m != nil { + return m.Snapshot + } + return nil +} + +type TruncateTableRequest struct { + TableName *TableName `protobuf:"bytes,1,req,name=tableName" json:"tableName,omitempty"` + PreserveSplits *bool `protobuf:"varint,2,opt,name=preserveSplits,def=0" json:"preserveSplits,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TruncateTableRequest) Reset() { *m = TruncateTableRequest{} } +func (m *TruncateTableRequest) String() string { return proto1.CompactTextString(m) } +func (*TruncateTableRequest) ProtoMessage() {} + +const Default_TruncateTableRequest_PreserveSplits bool = false + +func (m *TruncateTableRequest) GetTableName() *TableName { + if m != nil { + return m.TableName + } + return nil +} + +func (m *TruncateTableRequest) GetPreserveSplits() bool { + if m != nil && m.PreserveSplits != nil { + return *m.PreserveSplits + } + return Default_TruncateTableRequest_PreserveSplits +} + +type TruncateTableResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *TruncateTableResponse) Reset() { *m = TruncateTableResponse{} } +func (m *TruncateTableResponse) String() string { return proto1.CompactTextString(m) } +func (*TruncateTableResponse) ProtoMessage() {} + +func init() { +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/MultiRowMutation.pb.go b/vendor/github.com/pingcap/go-hbase/proto/MultiRowMutation.pb.go new file mode 100644 index 000000000..ee629949a --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/MultiRowMutation.pb.go @@ -0,0 +1,71 @@ +// Code generated by protoc-gen-go. +// source: MultiRowMutation.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type MultiRowMutationProcessorRequest struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *MultiRowMutationProcessorRequest) Reset() { *m = MultiRowMutationProcessorRequest{} } +func (m *MultiRowMutationProcessorRequest) String() string { return proto1.CompactTextString(m) } +func (*MultiRowMutationProcessorRequest) ProtoMessage() {} + +type MultiRowMutationProcessorResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *MultiRowMutationProcessorResponse) Reset() { *m = MultiRowMutationProcessorResponse{} } +func (m *MultiRowMutationProcessorResponse) String() string { return proto1.CompactTextString(m) } +func (*MultiRowMutationProcessorResponse) ProtoMessage() {} + +type MutateRowsRequest struct { + MutationRequest []*MutationProto `protobuf:"bytes,1,rep,name=mutation_request" json:"mutation_request,omitempty"` + NonceGroup *uint64 `protobuf:"varint,2,opt,name=nonce_group" json:"nonce_group,omitempty"` + Nonce *uint64 `protobuf:"varint,3,opt,name=nonce" json:"nonce,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MutateRowsRequest) Reset() { *m = MutateRowsRequest{} } +func (m *MutateRowsRequest) String() string { return proto1.CompactTextString(m) } +func (*MutateRowsRequest) ProtoMessage() {} + +func (m *MutateRowsRequest) GetMutationRequest() []*MutationProto { + if m != nil { + return m.MutationRequest + } + return nil +} + +func (m *MutateRowsRequest) GetNonceGroup() uint64 { + if m != nil && m.NonceGroup != nil { + return *m.NonceGroup + } + return 0 +} + +func (m *MutateRowsRequest) GetNonce() uint64 { + if m != nil && m.Nonce != nil { + return *m.Nonce + } + return 0 +} + +type MutateRowsResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *MutateRowsResponse) Reset() { *m = MutateRowsResponse{} } +func (m *MutateRowsResponse) String() string { return proto1.CompactTextString(m) } +func (*MutateRowsResponse) ProtoMessage() {} + +func init() { +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/RPC.pb.go b/vendor/github.com/pingcap/go-hbase/proto/RPC.pb.go new file mode 100644 index 000000000..146a836ce --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/RPC.pb.go @@ -0,0 +1,319 @@ +// Code generated by protoc-gen-go. +// source: RPC.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +// User Information proto. Included in ConnectionHeader on connection setup +type UserInformation struct { + EffectiveUser *string `protobuf:"bytes,1,req,name=effective_user" json:"effective_user,omitempty"` + RealUser *string `protobuf:"bytes,2,opt,name=real_user" json:"real_user,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UserInformation) Reset() { *m = UserInformation{} } +func (m *UserInformation) String() string { return proto1.CompactTextString(m) } +func (*UserInformation) ProtoMessage() {} + +func (m *UserInformation) GetEffectiveUser() string { + if m != nil && m.EffectiveUser != nil { + return *m.EffectiveUser + } + return "" +} + +func (m *UserInformation) GetRealUser() string { + if m != nil && m.RealUser != nil { + return *m.RealUser + } + return "" +} + +// Rpc client version info proto. Included in ConnectionHeader on connection setup +type VersionInfo struct { + Version *string `protobuf:"bytes,1,req,name=version" json:"version,omitempty"` + Url *string `protobuf:"bytes,2,req,name=url" json:"url,omitempty"` + Revision *string `protobuf:"bytes,3,req,name=revision" json:"revision,omitempty"` + User *string `protobuf:"bytes,4,req,name=user" json:"user,omitempty"` + Date *string `protobuf:"bytes,5,req,name=date" json:"date,omitempty"` + SrcChecksum *string `protobuf:"bytes,6,req,name=src_checksum" json:"src_checksum,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *VersionInfo) Reset() { *m = VersionInfo{} } +func (m *VersionInfo) String() string { return proto1.CompactTextString(m) } +func (*VersionInfo) ProtoMessage() {} + +func (m *VersionInfo) GetVersion() string { + if m != nil && m.Version != nil { + return *m.Version + } + return "" +} + +func (m *VersionInfo) GetUrl() string { + if m != nil && m.Url != nil { + return *m.Url + } + return "" +} + +func (m *VersionInfo) GetRevision() string { + if m != nil && m.Revision != nil { + return *m.Revision + } + return "" +} + +func (m *VersionInfo) GetUser() string { + if m != nil && m.User != nil { + return *m.User + } + return "" +} + +func (m *VersionInfo) GetDate() string { + if m != nil && m.Date != nil { + return *m.Date + } + return "" +} + +func (m *VersionInfo) GetSrcChecksum() string { + if m != nil && m.SrcChecksum != nil { + return *m.SrcChecksum + } + return "" +} + +// This is sent on connection setup after the connection preamble is sent. +type ConnectionHeader struct { + UserInfo *UserInformation `protobuf:"bytes,1,opt,name=user_info" json:"user_info,omitempty"` + ServiceName *string `protobuf:"bytes,2,opt,name=service_name" json:"service_name,omitempty"` + // Cell block codec we will use sending over optional cell blocks. Server throws exception + // if cannot deal. Null means no codec'ing going on so we are pb all the time (SLOW!!!) + CellBlockCodecClass *string `protobuf:"bytes,3,opt,name=cell_block_codec_class" json:"cell_block_codec_class,omitempty"` + // Compressor we will use if cell block is compressed. Server will throw exception if not supported. + // Class must implement hadoop's CompressionCodec Interface. Can't compress if no codec. + CellBlockCompressorClass *string `protobuf:"bytes,4,opt,name=cell_block_compressor_class" json:"cell_block_compressor_class,omitempty"` + VersionInfo *VersionInfo `protobuf:"bytes,5,opt,name=version_info" json:"version_info,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ConnectionHeader) Reset() { *m = ConnectionHeader{} } +func (m *ConnectionHeader) String() string { return proto1.CompactTextString(m) } +func (*ConnectionHeader) ProtoMessage() {} + +func (m *ConnectionHeader) GetUserInfo() *UserInformation { + if m != nil { + return m.UserInfo + } + return nil +} + +func (m *ConnectionHeader) GetServiceName() string { + if m != nil && m.ServiceName != nil { + return *m.ServiceName + } + return "" +} + +func (m *ConnectionHeader) GetCellBlockCodecClass() string { + if m != nil && m.CellBlockCodecClass != nil { + return *m.CellBlockCodecClass + } + return "" +} + +func (m *ConnectionHeader) GetCellBlockCompressorClass() string { + if m != nil && m.CellBlockCompressorClass != nil { + return *m.CellBlockCompressorClass + } + return "" +} + +func (m *ConnectionHeader) GetVersionInfo() *VersionInfo { + if m != nil { + return m.VersionInfo + } + return nil +} + +// Optional Cell block Message. Included in client RequestHeader +type CellBlockMeta struct { + // Length of the following cell block. Could calculate it but convenient having it too hand. + Length *uint32 `protobuf:"varint,1,opt,name=length" json:"length,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CellBlockMeta) Reset() { *m = CellBlockMeta{} } +func (m *CellBlockMeta) String() string { return proto1.CompactTextString(m) } +func (*CellBlockMeta) ProtoMessage() {} + +func (m *CellBlockMeta) GetLength() uint32 { + if m != nil && m.Length != nil { + return *m.Length + } + return 0 +} + +// At the RPC layer, this message is used to carry +// the server side exception to the RPC client. +type ExceptionResponse struct { + // Class name of the exception thrown from the server + ExceptionClassName *string `protobuf:"bytes,1,opt,name=exception_class_name" json:"exception_class_name,omitempty"` + // Exception stack trace from the server side + StackTrace *string `protobuf:"bytes,2,opt,name=stack_trace" json:"stack_trace,omitempty"` + // Optional hostname. Filled in for some exceptions such as region moved + // where exception gives clue on where the region may have moved. + Hostname *string `protobuf:"bytes,3,opt,name=hostname" json:"hostname,omitempty"` + Port *int32 `protobuf:"varint,4,opt,name=port" json:"port,omitempty"` + // Set if we are NOT to retry on receipt of this exception + DoNotRetry *bool `protobuf:"varint,5,opt,name=do_not_retry" json:"do_not_retry,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ExceptionResponse) Reset() { *m = ExceptionResponse{} } +func (m *ExceptionResponse) String() string { return proto1.CompactTextString(m) } +func (*ExceptionResponse) ProtoMessage() {} + +func (m *ExceptionResponse) GetExceptionClassName() string { + if m != nil && m.ExceptionClassName != nil { + return *m.ExceptionClassName + } + return "" +} + +func (m *ExceptionResponse) GetStackTrace() string { + if m != nil && m.StackTrace != nil { + return *m.StackTrace + } + return "" +} + +func (m *ExceptionResponse) GetHostname() string { + if m != nil && m.Hostname != nil { + return *m.Hostname + } + return "" +} + +func (m *ExceptionResponse) GetPort() int32 { + if m != nil && m.Port != nil { + return *m.Port + } + return 0 +} + +func (m *ExceptionResponse) GetDoNotRetry() bool { + if m != nil && m.DoNotRetry != nil { + return *m.DoNotRetry + } + return false +} + +// Header sent making a request. +type RequestHeader struct { + // Monotonically increasing call_id to keep track of RPC requests and their response + CallId *uint32 `protobuf:"varint,1,opt,name=call_id" json:"call_id,omitempty"` + TraceInfo *RPCTInfo `protobuf:"bytes,2,opt,name=trace_info" json:"trace_info,omitempty"` + MethodName *string `protobuf:"bytes,3,opt,name=method_name" json:"method_name,omitempty"` + // If true, then a pb Message param follows. + RequestParam *bool `protobuf:"varint,4,opt,name=request_param" json:"request_param,omitempty"` + // If present, then an encoded data block follows. + CellBlockMeta *CellBlockMeta `protobuf:"bytes,5,opt,name=cell_block_meta" json:"cell_block_meta,omitempty"` + // 0 is NORMAL priority. 100 is HIGH. If no priority, treat it as NORMAL. + // See HConstants. + Priority *uint32 `protobuf:"varint,6,opt,name=priority" json:"priority,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RequestHeader) Reset() { *m = RequestHeader{} } +func (m *RequestHeader) String() string { return proto1.CompactTextString(m) } +func (*RequestHeader) ProtoMessage() {} + +func (m *RequestHeader) GetCallId() uint32 { + if m != nil && m.CallId != nil { + return *m.CallId + } + return 0 +} + +func (m *RequestHeader) GetTraceInfo() *RPCTInfo { + if m != nil { + return m.TraceInfo + } + return nil +} + +func (m *RequestHeader) GetMethodName() string { + if m != nil && m.MethodName != nil { + return *m.MethodName + } + return "" +} + +func (m *RequestHeader) GetRequestParam() bool { + if m != nil && m.RequestParam != nil { + return *m.RequestParam + } + return false +} + +func (m *RequestHeader) GetCellBlockMeta() *CellBlockMeta { + if m != nil { + return m.CellBlockMeta + } + return nil +} + +func (m *RequestHeader) GetPriority() uint32 { + if m != nil && m.Priority != nil { + return *m.Priority + } + return 0 +} + +type ResponseHeader struct { + CallId *uint32 `protobuf:"varint,1,opt,name=call_id" json:"call_id,omitempty"` + // If present, then request threw an exception and no response message (else we presume one) + Exception *ExceptionResponse `protobuf:"bytes,2,opt,name=exception" json:"exception,omitempty"` + // If present, then an encoded data block follows. + CellBlockMeta *CellBlockMeta `protobuf:"bytes,3,opt,name=cell_block_meta" json:"cell_block_meta,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ResponseHeader) Reset() { *m = ResponseHeader{} } +func (m *ResponseHeader) String() string { return proto1.CompactTextString(m) } +func (*ResponseHeader) ProtoMessage() {} + +func (m *ResponseHeader) GetCallId() uint32 { + if m != nil && m.CallId != nil { + return *m.CallId + } + return 0 +} + +func (m *ResponseHeader) GetException() *ExceptionResponse { + if m != nil { + return m.Exception + } + return nil +} + +func (m *ResponseHeader) GetCellBlockMeta() *CellBlockMeta { + if m != nil { + return m.CellBlockMeta + } + return nil +} + +func init() { +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/RegionServerStatus.pb.go b/vendor/github.com/pingcap/go-hbase/proto/RegionServerStatus.pb.go new file mode 100644 index 000000000..12af5043b --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/RegionServerStatus.pb.go @@ -0,0 +1,310 @@ +// Code generated by protoc-gen-go. +// source: RegionServerStatus.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type RegionStateTransition_TransitionCode int32 + +const ( + RegionStateTransition_OPENED RegionStateTransition_TransitionCode = 0 + RegionStateTransition_FAILED_OPEN RegionStateTransition_TransitionCode = 1 + // * No failed_close, in which case region server will abort + RegionStateTransition_CLOSED RegionStateTransition_TransitionCode = 2 + // * Ask master for ok to split/merge region(s) + RegionStateTransition_READY_TO_SPLIT RegionStateTransition_TransitionCode = 3 + RegionStateTransition_READY_TO_MERGE RegionStateTransition_TransitionCode = 4 + RegionStateTransition_SPLIT_PONR RegionStateTransition_TransitionCode = 5 + RegionStateTransition_MERGE_PONR RegionStateTransition_TransitionCode = 6 + RegionStateTransition_SPLIT RegionStateTransition_TransitionCode = 7 + RegionStateTransition_MERGED RegionStateTransition_TransitionCode = 8 + RegionStateTransition_SPLIT_REVERTED RegionStateTransition_TransitionCode = 9 + RegionStateTransition_MERGE_REVERTED RegionStateTransition_TransitionCode = 10 +) + +var RegionStateTransition_TransitionCode_name = map[int32]string{ + 0: "OPENED", + 1: "FAILED_OPEN", + 2: "CLOSED", + 3: "READY_TO_SPLIT", + 4: "READY_TO_MERGE", + 5: "SPLIT_PONR", + 6: "MERGE_PONR", + 7: "SPLIT", + 8: "MERGED", + 9: "SPLIT_REVERTED", + 10: "MERGE_REVERTED", +} +var RegionStateTransition_TransitionCode_value = map[string]int32{ + "OPENED": 0, + "FAILED_OPEN": 1, + "CLOSED": 2, + "READY_TO_SPLIT": 3, + "READY_TO_MERGE": 4, + "SPLIT_PONR": 5, + "MERGE_PONR": 6, + "SPLIT": 7, + "MERGED": 8, + "SPLIT_REVERTED": 9, + "MERGE_REVERTED": 10, +} + +func (x RegionStateTransition_TransitionCode) Enum() *RegionStateTransition_TransitionCode { + p := new(RegionStateTransition_TransitionCode) + *p = x + return p +} +func (x RegionStateTransition_TransitionCode) String() string { + return proto1.EnumName(RegionStateTransition_TransitionCode_name, int32(x)) +} +func (x *RegionStateTransition_TransitionCode) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(RegionStateTransition_TransitionCode_value, data, "RegionStateTransition_TransitionCode") + if err != nil { + return err + } + *x = RegionStateTransition_TransitionCode(value) + return nil +} + +type RegionServerStartupRequest struct { + // * Port number this regionserver is up on + Port *uint32 `protobuf:"varint,1,req,name=port" json:"port,omitempty"` + // * This servers' startcode + ServerStartCode *uint64 `protobuf:"varint,2,req,name=server_start_code" json:"server_start_code,omitempty"` + // * Current time of the region server in ms + ServerCurrentTime *uint64 `protobuf:"varint,3,req,name=server_current_time" json:"server_current_time,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionServerStartupRequest) Reset() { *m = RegionServerStartupRequest{} } +func (m *RegionServerStartupRequest) String() string { return proto1.CompactTextString(m) } +func (*RegionServerStartupRequest) ProtoMessage() {} + +func (m *RegionServerStartupRequest) GetPort() uint32 { + if m != nil && m.Port != nil { + return *m.Port + } + return 0 +} + +func (m *RegionServerStartupRequest) GetServerStartCode() uint64 { + if m != nil && m.ServerStartCode != nil { + return *m.ServerStartCode + } + return 0 +} + +func (m *RegionServerStartupRequest) GetServerCurrentTime() uint64 { + if m != nil && m.ServerCurrentTime != nil { + return *m.ServerCurrentTime + } + return 0 +} + +type RegionServerStartupResponse struct { + // * + // Configuration for the regionserver to use: e.g. filesystem, + // hbase rootdir, the hostname to use creating the RegionServer ServerName, + // etc + MapEntries []*NameStringPair `protobuf:"bytes,1,rep,name=map_entries" json:"map_entries,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionServerStartupResponse) Reset() { *m = RegionServerStartupResponse{} } +func (m *RegionServerStartupResponse) String() string { return proto1.CompactTextString(m) } +func (*RegionServerStartupResponse) ProtoMessage() {} + +func (m *RegionServerStartupResponse) GetMapEntries() []*NameStringPair { + if m != nil { + return m.MapEntries + } + return nil +} + +type RegionServerReportRequest struct { + Server *ServerName `protobuf:"bytes,1,req,name=server" json:"server,omitempty"` + // * load the server is under + Load *ServerLoad `protobuf:"bytes,2,opt,name=load" json:"load,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionServerReportRequest) Reset() { *m = RegionServerReportRequest{} } +func (m *RegionServerReportRequest) String() string { return proto1.CompactTextString(m) } +func (*RegionServerReportRequest) ProtoMessage() {} + +func (m *RegionServerReportRequest) GetServer() *ServerName { + if m != nil { + return m.Server + } + return nil +} + +func (m *RegionServerReportRequest) GetLoad() *ServerLoad { + if m != nil { + return m.Load + } + return nil +} + +type RegionServerReportResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionServerReportResponse) Reset() { *m = RegionServerReportResponse{} } +func (m *RegionServerReportResponse) String() string { return proto1.CompactTextString(m) } +func (*RegionServerReportResponse) ProtoMessage() {} + +type ReportRSFatalErrorRequest struct { + // * name of the server experiencing the error + Server *ServerName `protobuf:"bytes,1,req,name=server" json:"server,omitempty"` + // * informative text to expose in the master logs and UI + ErrorMessage *string `protobuf:"bytes,2,req,name=error_message" json:"error_message,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ReportRSFatalErrorRequest) Reset() { *m = ReportRSFatalErrorRequest{} } +func (m *ReportRSFatalErrorRequest) String() string { return proto1.CompactTextString(m) } +func (*ReportRSFatalErrorRequest) ProtoMessage() {} + +func (m *ReportRSFatalErrorRequest) GetServer() *ServerName { + if m != nil { + return m.Server + } + return nil +} + +func (m *ReportRSFatalErrorRequest) GetErrorMessage() string { + if m != nil && m.ErrorMessage != nil { + return *m.ErrorMessage + } + return "" +} + +type ReportRSFatalErrorResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *ReportRSFatalErrorResponse) Reset() { *m = ReportRSFatalErrorResponse{} } +func (m *ReportRSFatalErrorResponse) String() string { return proto1.CompactTextString(m) } +func (*ReportRSFatalErrorResponse) ProtoMessage() {} + +type GetLastFlushedSequenceIdRequest struct { + // * region name + RegionName []byte `protobuf:"bytes,1,req,name=region_name" json:"region_name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetLastFlushedSequenceIdRequest) Reset() { *m = GetLastFlushedSequenceIdRequest{} } +func (m *GetLastFlushedSequenceIdRequest) String() string { return proto1.CompactTextString(m) } +func (*GetLastFlushedSequenceIdRequest) ProtoMessage() {} + +func (m *GetLastFlushedSequenceIdRequest) GetRegionName() []byte { + if m != nil { + return m.RegionName + } + return nil +} + +type GetLastFlushedSequenceIdResponse struct { + // * the last HLog sequence id flushed from MemStore to HFile for the region + LastFlushedSequenceId *uint64 `protobuf:"varint,1,req,name=last_flushed_sequence_id" json:"last_flushed_sequence_id,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetLastFlushedSequenceIdResponse) Reset() { *m = GetLastFlushedSequenceIdResponse{} } +func (m *GetLastFlushedSequenceIdResponse) String() string { return proto1.CompactTextString(m) } +func (*GetLastFlushedSequenceIdResponse) ProtoMessage() {} + +func (m *GetLastFlushedSequenceIdResponse) GetLastFlushedSequenceId() uint64 { + if m != nil && m.LastFlushedSequenceId != nil { + return *m.LastFlushedSequenceId + } + return 0 +} + +type RegionStateTransition struct { + TransitionCode *RegionStateTransition_TransitionCode `protobuf:"varint,1,req,name=transition_code,enum=proto.RegionStateTransition_TransitionCode" json:"transition_code,omitempty"` + // * Mutliple regions are involved during merging/splitting + RegionInfo []*RegionInfo `protobuf:"bytes,2,rep,name=region_info" json:"region_info,omitempty"` + // * For newly opened region, the open seq num is needed + OpenSeqNum *uint64 `protobuf:"varint,3,opt,name=open_seq_num" json:"open_seq_num,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionStateTransition) Reset() { *m = RegionStateTransition{} } +func (m *RegionStateTransition) String() string { return proto1.CompactTextString(m) } +func (*RegionStateTransition) ProtoMessage() {} + +func (m *RegionStateTransition) GetTransitionCode() RegionStateTransition_TransitionCode { + if m != nil && m.TransitionCode != nil { + return *m.TransitionCode + } + return RegionStateTransition_OPENED +} + +func (m *RegionStateTransition) GetRegionInfo() []*RegionInfo { + if m != nil { + return m.RegionInfo + } + return nil +} + +func (m *RegionStateTransition) GetOpenSeqNum() uint64 { + if m != nil && m.OpenSeqNum != nil { + return *m.OpenSeqNum + } + return 0 +} + +type ReportRegionStateTransitionRequest struct { + // * This region server's server name + Server *ServerName `protobuf:"bytes,1,req,name=server" json:"server,omitempty"` + Transition []*RegionStateTransition `protobuf:"bytes,2,rep,name=transition" json:"transition,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ReportRegionStateTransitionRequest) Reset() { *m = ReportRegionStateTransitionRequest{} } +func (m *ReportRegionStateTransitionRequest) String() string { return proto1.CompactTextString(m) } +func (*ReportRegionStateTransitionRequest) ProtoMessage() {} + +func (m *ReportRegionStateTransitionRequest) GetServer() *ServerName { + if m != nil { + return m.Server + } + return nil +} + +func (m *ReportRegionStateTransitionRequest) GetTransition() []*RegionStateTransition { + if m != nil { + return m.Transition + } + return nil +} + +type ReportRegionStateTransitionResponse struct { + // * Error message if failed to update the region state + ErrorMessage *string `protobuf:"bytes,1,opt,name=error_message" json:"error_message,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ReportRegionStateTransitionResponse) Reset() { *m = ReportRegionStateTransitionResponse{} } +func (m *ReportRegionStateTransitionResponse) String() string { return proto1.CompactTextString(m) } +func (*ReportRegionStateTransitionResponse) ProtoMessage() {} + +func (m *ReportRegionStateTransitionResponse) GetErrorMessage() string { + if m != nil && m.ErrorMessage != nil { + return *m.ErrorMessage + } + return "" +} + +func init() { + proto1.RegisterEnum("proto.RegionStateTransition_TransitionCode", RegionStateTransition_TransitionCode_name, RegionStateTransition_TransitionCode_value) +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/RowProcessor.pb.go b/vendor/github.com/pingcap/go-hbase/proto/RowProcessor.pb.go new file mode 100644 index 000000000..226b32b9e --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/RowProcessor.pb.go @@ -0,0 +1,79 @@ +// Code generated by protoc-gen-go. +// source: RowProcessor.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type ProcessRequest struct { + RowProcessorClassName *string `protobuf:"bytes,1,req,name=row_processor_class_name" json:"row_processor_class_name,omitempty"` + RowProcessorInitializerMessageName *string `protobuf:"bytes,2,opt,name=row_processor_initializer_message_name" json:"row_processor_initializer_message_name,omitempty"` + RowProcessorInitializerMessage []byte `protobuf:"bytes,3,opt,name=row_processor_initializer_message" json:"row_processor_initializer_message,omitempty"` + NonceGroup *uint64 `protobuf:"varint,4,opt,name=nonce_group" json:"nonce_group,omitempty"` + Nonce *uint64 `protobuf:"varint,5,opt,name=nonce" json:"nonce,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ProcessRequest) Reset() { *m = ProcessRequest{} } +func (m *ProcessRequest) String() string { return proto1.CompactTextString(m) } +func (*ProcessRequest) ProtoMessage() {} + +func (m *ProcessRequest) GetRowProcessorClassName() string { + if m != nil && m.RowProcessorClassName != nil { + return *m.RowProcessorClassName + } + return "" +} + +func (m *ProcessRequest) GetRowProcessorInitializerMessageName() string { + if m != nil && m.RowProcessorInitializerMessageName != nil { + return *m.RowProcessorInitializerMessageName + } + return "" +} + +func (m *ProcessRequest) GetRowProcessorInitializerMessage() []byte { + if m != nil { + return m.RowProcessorInitializerMessage + } + return nil +} + +func (m *ProcessRequest) GetNonceGroup() uint64 { + if m != nil && m.NonceGroup != nil { + return *m.NonceGroup + } + return 0 +} + +func (m *ProcessRequest) GetNonce() uint64 { + if m != nil && m.Nonce != nil { + return *m.Nonce + } + return 0 +} + +type ProcessResponse struct { + RowProcessorResult []byte `protobuf:"bytes,1,req,name=row_processor_result" json:"row_processor_result,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ProcessResponse) Reset() { *m = ProcessResponse{} } +func (m *ProcessResponse) String() string { return proto1.CompactTextString(m) } +func (*ProcessResponse) ProtoMessage() {} + +func (m *ProcessResponse) GetRowProcessorResult() []byte { + if m != nil { + return m.RowProcessorResult + } + return nil +} + +func init() { +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/SecureBulkLoad.pb.go b/vendor/github.com/pingcap/go-hbase/proto/SecureBulkLoad.pb.go new file mode 100644 index 000000000..bc755d7e7 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/SecureBulkLoad.pb.go @@ -0,0 +1,167 @@ +// Code generated by protoc-gen-go. +// source: SecureBulkLoad.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type SecureBulkLoadHFilesRequest struct { + FamilyPath []*BulkLoadHFileRequest_FamilyPath `protobuf:"bytes,1,rep,name=family_path" json:"family_path,omitempty"` + AssignSeqNum *bool `protobuf:"varint,2,opt,name=assign_seq_num" json:"assign_seq_num,omitempty"` + FsToken *DelegationToken `protobuf:"bytes,3,req,name=fs_token" json:"fs_token,omitempty"` + BulkToken *string `protobuf:"bytes,4,req,name=bulk_token" json:"bulk_token,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SecureBulkLoadHFilesRequest) Reset() { *m = SecureBulkLoadHFilesRequest{} } +func (m *SecureBulkLoadHFilesRequest) String() string { return proto1.CompactTextString(m) } +func (*SecureBulkLoadHFilesRequest) ProtoMessage() {} + +func (m *SecureBulkLoadHFilesRequest) GetFamilyPath() []*BulkLoadHFileRequest_FamilyPath { + if m != nil { + return m.FamilyPath + } + return nil +} + +func (m *SecureBulkLoadHFilesRequest) GetAssignSeqNum() bool { + if m != nil && m.AssignSeqNum != nil { + return *m.AssignSeqNum + } + return false +} + +func (m *SecureBulkLoadHFilesRequest) GetFsToken() *DelegationToken { + if m != nil { + return m.FsToken + } + return nil +} + +func (m *SecureBulkLoadHFilesRequest) GetBulkToken() string { + if m != nil && m.BulkToken != nil { + return *m.BulkToken + } + return "" +} + +type SecureBulkLoadHFilesResponse struct { + Loaded *bool `protobuf:"varint,1,req,name=loaded" json:"loaded,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SecureBulkLoadHFilesResponse) Reset() { *m = SecureBulkLoadHFilesResponse{} } +func (m *SecureBulkLoadHFilesResponse) String() string { return proto1.CompactTextString(m) } +func (*SecureBulkLoadHFilesResponse) ProtoMessage() {} + +func (m *SecureBulkLoadHFilesResponse) GetLoaded() bool { + if m != nil && m.Loaded != nil { + return *m.Loaded + } + return false +} + +type DelegationToken struct { + Identifier []byte `protobuf:"bytes,1,opt,name=identifier" json:"identifier,omitempty"` + Password []byte `protobuf:"bytes,2,opt,name=password" json:"password,omitempty"` + Kind *string `protobuf:"bytes,3,opt,name=kind" json:"kind,omitempty"` + Service *string `protobuf:"bytes,4,opt,name=service" json:"service,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DelegationToken) Reset() { *m = DelegationToken{} } +func (m *DelegationToken) String() string { return proto1.CompactTextString(m) } +func (*DelegationToken) ProtoMessage() {} + +func (m *DelegationToken) GetIdentifier() []byte { + if m != nil { + return m.Identifier + } + return nil +} + +func (m *DelegationToken) GetPassword() []byte { + if m != nil { + return m.Password + } + return nil +} + +func (m *DelegationToken) GetKind() string { + if m != nil && m.Kind != nil { + return *m.Kind + } + return "" +} + +func (m *DelegationToken) GetService() string { + if m != nil && m.Service != nil { + return *m.Service + } + return "" +} + +type PrepareBulkLoadRequest struct { + TableName *TableName `protobuf:"bytes,1,req,name=table_name" json:"table_name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *PrepareBulkLoadRequest) Reset() { *m = PrepareBulkLoadRequest{} } +func (m *PrepareBulkLoadRequest) String() string { return proto1.CompactTextString(m) } +func (*PrepareBulkLoadRequest) ProtoMessage() {} + +func (m *PrepareBulkLoadRequest) GetTableName() *TableName { + if m != nil { + return m.TableName + } + return nil +} + +type PrepareBulkLoadResponse struct { + BulkToken *string `protobuf:"bytes,1,req,name=bulk_token" json:"bulk_token,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *PrepareBulkLoadResponse) Reset() { *m = PrepareBulkLoadResponse{} } +func (m *PrepareBulkLoadResponse) String() string { return proto1.CompactTextString(m) } +func (*PrepareBulkLoadResponse) ProtoMessage() {} + +func (m *PrepareBulkLoadResponse) GetBulkToken() string { + if m != nil && m.BulkToken != nil { + return *m.BulkToken + } + return "" +} + +type CleanupBulkLoadRequest struct { + BulkToken *string `protobuf:"bytes,1,req,name=bulk_token" json:"bulk_token,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CleanupBulkLoadRequest) Reset() { *m = CleanupBulkLoadRequest{} } +func (m *CleanupBulkLoadRequest) String() string { return proto1.CompactTextString(m) } +func (*CleanupBulkLoadRequest) ProtoMessage() {} + +func (m *CleanupBulkLoadRequest) GetBulkToken() string { + if m != nil && m.BulkToken != nil { + return *m.BulkToken + } + return "" +} + +type CleanupBulkLoadResponse struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *CleanupBulkLoadResponse) Reset() { *m = CleanupBulkLoadResponse{} } +func (m *CleanupBulkLoadResponse) String() string { return proto1.CompactTextString(m) } +func (*CleanupBulkLoadResponse) ProtoMessage() {} + +func init() { +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/Snapshot.pb.go b/vendor/github.com/pingcap/go-hbase/proto/Snapshot.pb.go new file mode 100644 index 000000000..6dbc8321d --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/Snapshot.pb.go @@ -0,0 +1,202 @@ +// Code generated by protoc-gen-go. +// source: Snapshot.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type SnapshotFileInfo_Type int32 + +const ( + SnapshotFileInfo_HFILE SnapshotFileInfo_Type = 1 + SnapshotFileInfo_WAL SnapshotFileInfo_Type = 2 +) + +var SnapshotFileInfo_Type_name = map[int32]string{ + 1: "HFILE", + 2: "WAL", +} +var SnapshotFileInfo_Type_value = map[string]int32{ + "HFILE": 1, + "WAL": 2, +} + +func (x SnapshotFileInfo_Type) Enum() *SnapshotFileInfo_Type { + p := new(SnapshotFileInfo_Type) + *p = x + return p +} +func (x SnapshotFileInfo_Type) String() string { + return proto1.EnumName(SnapshotFileInfo_Type_name, int32(x)) +} +func (x *SnapshotFileInfo_Type) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(SnapshotFileInfo_Type_value, data, "SnapshotFileInfo_Type") + if err != nil { + return err + } + *x = SnapshotFileInfo_Type(value) + return nil +} + +type SnapshotFileInfo struct { + Type *SnapshotFileInfo_Type `protobuf:"varint,1,req,name=type,enum=proto.SnapshotFileInfo_Type" json:"type,omitempty"` + Hfile *string `protobuf:"bytes,3,opt,name=hfile" json:"hfile,omitempty"` + WalServer *string `protobuf:"bytes,4,opt,name=wal_server" json:"wal_server,omitempty"` + WalName *string `protobuf:"bytes,5,opt,name=wal_name" json:"wal_name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SnapshotFileInfo) Reset() { *m = SnapshotFileInfo{} } +func (m *SnapshotFileInfo) String() string { return proto1.CompactTextString(m) } +func (*SnapshotFileInfo) ProtoMessage() {} + +func (m *SnapshotFileInfo) GetType() SnapshotFileInfo_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return SnapshotFileInfo_HFILE +} + +func (m *SnapshotFileInfo) GetHfile() string { + if m != nil && m.Hfile != nil { + return *m.Hfile + } + return "" +} + +func (m *SnapshotFileInfo) GetWalServer() string { + if m != nil && m.WalServer != nil { + return *m.WalServer + } + return "" +} + +func (m *SnapshotFileInfo) GetWalName() string { + if m != nil && m.WalName != nil { + return *m.WalName + } + return "" +} + +type SnapshotRegionManifest struct { + Version *int32 `protobuf:"varint,1,opt,name=version" json:"version,omitempty"` + RegionInfo *RegionInfo `protobuf:"bytes,2,req,name=region_info" json:"region_info,omitempty"` + FamilyFiles []*SnapshotRegionManifest_FamilyFiles `protobuf:"bytes,3,rep,name=family_files" json:"family_files,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SnapshotRegionManifest) Reset() { *m = SnapshotRegionManifest{} } +func (m *SnapshotRegionManifest) String() string { return proto1.CompactTextString(m) } +func (*SnapshotRegionManifest) ProtoMessage() {} + +func (m *SnapshotRegionManifest) GetVersion() int32 { + if m != nil && m.Version != nil { + return *m.Version + } + return 0 +} + +func (m *SnapshotRegionManifest) GetRegionInfo() *RegionInfo { + if m != nil { + return m.RegionInfo + } + return nil +} + +func (m *SnapshotRegionManifest) GetFamilyFiles() []*SnapshotRegionManifest_FamilyFiles { + if m != nil { + return m.FamilyFiles + } + return nil +} + +type SnapshotRegionManifest_StoreFile struct { + Name *string `protobuf:"bytes,1,req,name=name" json:"name,omitempty"` + Reference *Reference `protobuf:"bytes,2,opt,name=reference" json:"reference,omitempty"` + // TODO: Add checksums or other fields to verify the file + FileSize *uint64 `protobuf:"varint,3,opt,name=file_size" json:"file_size,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SnapshotRegionManifest_StoreFile) Reset() { *m = SnapshotRegionManifest_StoreFile{} } +func (m *SnapshotRegionManifest_StoreFile) String() string { return proto1.CompactTextString(m) } +func (*SnapshotRegionManifest_StoreFile) ProtoMessage() {} + +func (m *SnapshotRegionManifest_StoreFile) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *SnapshotRegionManifest_StoreFile) GetReference() *Reference { + if m != nil { + return m.Reference + } + return nil +} + +func (m *SnapshotRegionManifest_StoreFile) GetFileSize() uint64 { + if m != nil && m.FileSize != nil { + return *m.FileSize + } + return 0 +} + +type SnapshotRegionManifest_FamilyFiles struct { + FamilyName []byte `protobuf:"bytes,1,req,name=family_name" json:"family_name,omitempty"` + StoreFiles []*SnapshotRegionManifest_StoreFile `protobuf:"bytes,2,rep,name=store_files" json:"store_files,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SnapshotRegionManifest_FamilyFiles) Reset() { *m = SnapshotRegionManifest_FamilyFiles{} } +func (m *SnapshotRegionManifest_FamilyFiles) String() string { return proto1.CompactTextString(m) } +func (*SnapshotRegionManifest_FamilyFiles) ProtoMessage() {} + +func (m *SnapshotRegionManifest_FamilyFiles) GetFamilyName() []byte { + if m != nil { + return m.FamilyName + } + return nil +} + +func (m *SnapshotRegionManifest_FamilyFiles) GetStoreFiles() []*SnapshotRegionManifest_StoreFile { + if m != nil { + return m.StoreFiles + } + return nil +} + +type SnapshotDataManifest struct { + TableSchema *TableSchema `protobuf:"bytes,1,req,name=table_schema" json:"table_schema,omitempty"` + RegionManifests []*SnapshotRegionManifest `protobuf:"bytes,2,rep,name=region_manifests" json:"region_manifests,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SnapshotDataManifest) Reset() { *m = SnapshotDataManifest{} } +func (m *SnapshotDataManifest) String() string { return proto1.CompactTextString(m) } +func (*SnapshotDataManifest) ProtoMessage() {} + +func (m *SnapshotDataManifest) GetTableSchema() *TableSchema { + if m != nil { + return m.TableSchema + } + return nil +} + +func (m *SnapshotDataManifest) GetRegionManifests() []*SnapshotRegionManifest { + if m != nil { + return m.RegionManifests + } + return nil +} + +func init() { + proto1.RegisterEnum("proto.SnapshotFileInfo_Type", SnapshotFileInfo_Type_name, SnapshotFileInfo_Type_value) +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/Tracing.pb.go b/vendor/github.com/pingcap/go-hbase/proto/Tracing.pb.go new file mode 100644 index 000000000..c4cb5bcc1 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/Tracing.pb.go @@ -0,0 +1,44 @@ +// Code generated by protoc-gen-go. +// source: Tracing.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +// Used to pass through the information necessary to continue +// a trace after an RPC is made. All we need is the traceid +// (so we know the overarching trace this message is a part of), and +// the id of the current span when this message was sent, so we know +// what span caused the new span we will create when this message is received. +type RPCTInfo struct { + TraceId *int64 `protobuf:"varint,1,opt,name=trace_id" json:"trace_id,omitempty"` + ParentId *int64 `protobuf:"varint,2,opt,name=parent_id" json:"parent_id,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RPCTInfo) Reset() { *m = RPCTInfo{} } +func (m *RPCTInfo) String() string { return proto1.CompactTextString(m) } +func (*RPCTInfo) ProtoMessage() {} + +func (m *RPCTInfo) GetTraceId() int64 { + if m != nil && m.TraceId != nil { + return *m.TraceId + } + return 0 +} + +func (m *RPCTInfo) GetParentId() int64 { + if m != nil && m.ParentId != nil { + return *m.ParentId + } + return 0 +} + +func init() { +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/VisibilityLabels.pb.go b/vendor/github.com/pingcap/go-hbase/proto/VisibilityLabels.pb.go new file mode 100644 index 000000000..1f4207132 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/VisibilityLabels.pb.go @@ -0,0 +1,207 @@ +// Code generated by protoc-gen-go. +// source: VisibilityLabels.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type VisibilityLabelsRequest struct { + VisLabel []*VisibilityLabel `protobuf:"bytes,1,rep,name=visLabel" json:"visLabel,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *VisibilityLabelsRequest) Reset() { *m = VisibilityLabelsRequest{} } +func (m *VisibilityLabelsRequest) String() string { return proto1.CompactTextString(m) } +func (*VisibilityLabelsRequest) ProtoMessage() {} + +func (m *VisibilityLabelsRequest) GetVisLabel() []*VisibilityLabel { + if m != nil { + return m.VisLabel + } + return nil +} + +type VisibilityLabel struct { + Label []byte `protobuf:"bytes,1,req,name=label" json:"label,omitempty"` + Ordinal *uint32 `protobuf:"varint,2,opt,name=ordinal" json:"ordinal,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *VisibilityLabel) Reset() { *m = VisibilityLabel{} } +func (m *VisibilityLabel) String() string { return proto1.CompactTextString(m) } +func (*VisibilityLabel) ProtoMessage() {} + +func (m *VisibilityLabel) GetLabel() []byte { + if m != nil { + return m.Label + } + return nil +} + +func (m *VisibilityLabel) GetOrdinal() uint32 { + if m != nil && m.Ordinal != nil { + return *m.Ordinal + } + return 0 +} + +type VisibilityLabelsResponse struct { + Result []*RegionActionResult `protobuf:"bytes,1,rep,name=result" json:"result,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *VisibilityLabelsResponse) Reset() { *m = VisibilityLabelsResponse{} } +func (m *VisibilityLabelsResponse) String() string { return proto1.CompactTextString(m) } +func (*VisibilityLabelsResponse) ProtoMessage() {} + +func (m *VisibilityLabelsResponse) GetResult() []*RegionActionResult { + if m != nil { + return m.Result + } + return nil +} + +type SetAuthsRequest struct { + User []byte `protobuf:"bytes,1,req,name=user" json:"user,omitempty"` + Auth [][]byte `protobuf:"bytes,2,rep,name=auth" json:"auth,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SetAuthsRequest) Reset() { *m = SetAuthsRequest{} } +func (m *SetAuthsRequest) String() string { return proto1.CompactTextString(m) } +func (*SetAuthsRequest) ProtoMessage() {} + +func (m *SetAuthsRequest) GetUser() []byte { + if m != nil { + return m.User + } + return nil +} + +func (m *SetAuthsRequest) GetAuth() [][]byte { + if m != nil { + return m.Auth + } + return nil +} + +type UserAuthorizations struct { + User []byte `protobuf:"bytes,1,req,name=user" json:"user,omitempty"` + Auth []uint32 `protobuf:"varint,2,rep,name=auth" json:"auth,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UserAuthorizations) Reset() { *m = UserAuthorizations{} } +func (m *UserAuthorizations) String() string { return proto1.CompactTextString(m) } +func (*UserAuthorizations) ProtoMessage() {} + +func (m *UserAuthorizations) GetUser() []byte { + if m != nil { + return m.User + } + return nil +} + +func (m *UserAuthorizations) GetAuth() []uint32 { + if m != nil { + return m.Auth + } + return nil +} + +type MultiUserAuthorizations struct { + UserAuths []*UserAuthorizations `protobuf:"bytes,1,rep,name=userAuths" json:"userAuths,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MultiUserAuthorizations) Reset() { *m = MultiUserAuthorizations{} } +func (m *MultiUserAuthorizations) String() string { return proto1.CompactTextString(m) } +func (*MultiUserAuthorizations) ProtoMessage() {} + +func (m *MultiUserAuthorizations) GetUserAuths() []*UserAuthorizations { + if m != nil { + return m.UserAuths + } + return nil +} + +type GetAuthsRequest struct { + User []byte `protobuf:"bytes,1,req,name=user" json:"user,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetAuthsRequest) Reset() { *m = GetAuthsRequest{} } +func (m *GetAuthsRequest) String() string { return proto1.CompactTextString(m) } +func (*GetAuthsRequest) ProtoMessage() {} + +func (m *GetAuthsRequest) GetUser() []byte { + if m != nil { + return m.User + } + return nil +} + +type GetAuthsResponse struct { + User []byte `protobuf:"bytes,1,req,name=user" json:"user,omitempty"` + Auth [][]byte `protobuf:"bytes,2,rep,name=auth" json:"auth,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GetAuthsResponse) Reset() { *m = GetAuthsResponse{} } +func (m *GetAuthsResponse) String() string { return proto1.CompactTextString(m) } +func (*GetAuthsResponse) ProtoMessage() {} + +func (m *GetAuthsResponse) GetUser() []byte { + if m != nil { + return m.User + } + return nil +} + +func (m *GetAuthsResponse) GetAuth() [][]byte { + if m != nil { + return m.Auth + } + return nil +} + +type ListLabelsRequest struct { + Regex *string `protobuf:"bytes,1,opt,name=regex" json:"regex,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ListLabelsRequest) Reset() { *m = ListLabelsRequest{} } +func (m *ListLabelsRequest) String() string { return proto1.CompactTextString(m) } +func (*ListLabelsRequest) ProtoMessage() {} + +func (m *ListLabelsRequest) GetRegex() string { + if m != nil && m.Regex != nil { + return *m.Regex + } + return "" +} + +type ListLabelsResponse struct { + Label [][]byte `protobuf:"bytes,1,rep,name=label" json:"label,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ListLabelsResponse) Reset() { *m = ListLabelsResponse{} } +func (m *ListLabelsResponse) String() string { return proto1.CompactTextString(m) } +func (*ListLabelsResponse) ProtoMessage() {} + +func (m *ListLabelsResponse) GetLabel() [][]byte { + if m != nil { + return m.Label + } + return nil +} + +func init() { +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/WAL.pb.go b/vendor/github.com/pingcap/go-hbase/proto/WAL.pb.go new file mode 100644 index 000000000..dfd4da40a --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/WAL.pb.go @@ -0,0 +1,298 @@ +// Code generated by protoc-gen-go. +// source: WAL.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type ScopeType int32 + +const ( + ScopeType_REPLICATION_SCOPE_LOCAL ScopeType = 0 + ScopeType_REPLICATION_SCOPE_GLOBAL ScopeType = 1 +) + +var ScopeType_name = map[int32]string{ + 0: "REPLICATION_SCOPE_LOCAL", + 1: "REPLICATION_SCOPE_GLOBAL", +} +var ScopeType_value = map[string]int32{ + "REPLICATION_SCOPE_LOCAL": 0, + "REPLICATION_SCOPE_GLOBAL": 1, +} + +func (x ScopeType) Enum() *ScopeType { + p := new(ScopeType) + *p = x + return p +} +func (x ScopeType) String() string { + return proto1.EnumName(ScopeType_name, int32(x)) +} +func (x *ScopeType) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(ScopeType_value, data, "ScopeType") + if err != nil { + return err + } + *x = ScopeType(value) + return nil +} + +type WALHeader struct { + HasCompression *bool `protobuf:"varint,1,opt,name=has_compression" json:"has_compression,omitempty"` + EncryptionKey []byte `protobuf:"bytes,2,opt,name=encryption_key" json:"encryption_key,omitempty"` + HasTagCompression *bool `protobuf:"varint,3,opt,name=has_tag_compression" json:"has_tag_compression,omitempty"` + WriterClsName *string `protobuf:"bytes,4,opt,name=writer_cls_name" json:"writer_cls_name,omitempty"` + CellCodecClsName *string `protobuf:"bytes,5,opt,name=cell_codec_cls_name" json:"cell_codec_cls_name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *WALHeader) Reset() { *m = WALHeader{} } +func (m *WALHeader) String() string { return proto1.CompactTextString(m) } +func (*WALHeader) ProtoMessage() {} + +func (m *WALHeader) GetHasCompression() bool { + if m != nil && m.HasCompression != nil { + return *m.HasCompression + } + return false +} + +func (m *WALHeader) GetEncryptionKey() []byte { + if m != nil { + return m.EncryptionKey + } + return nil +} + +func (m *WALHeader) GetHasTagCompression() bool { + if m != nil && m.HasTagCompression != nil { + return *m.HasTagCompression + } + return false +} + +func (m *WALHeader) GetWriterClsName() string { + if m != nil && m.WriterClsName != nil { + return *m.WriterClsName + } + return "" +} + +func (m *WALHeader) GetCellCodecClsName() string { + if m != nil && m.CellCodecClsName != nil { + return *m.CellCodecClsName + } + return "" +} + +// Protocol buffer version of HLogKey; see HLogKey comment, not really a key but WALEdit header for some KVs +type WALKey struct { + EncodedRegionName []byte `protobuf:"bytes,1,req,name=encoded_region_name" json:"encoded_region_name,omitempty"` + TableName []byte `protobuf:"bytes,2,req,name=table_name" json:"table_name,omitempty"` + LogSequenceNumber *uint64 `protobuf:"varint,3,req,name=log_sequence_number" json:"log_sequence_number,omitempty"` + WriteTime *uint64 `protobuf:"varint,4,req,name=write_time" json:"write_time,omitempty"` + // + // This parameter is deprecated in favor of clusters which + // contains the list of clusters that have consumed the change. + // It is retained so that the log created by earlier releases (0.94) + // can be read by the newer releases. + ClusterId *UUID `protobuf:"bytes,5,opt,name=cluster_id" json:"cluster_id,omitempty"` + Scopes []*FamilyScope `protobuf:"bytes,6,rep,name=scopes" json:"scopes,omitempty"` + FollowingKvCount *uint32 `protobuf:"varint,7,opt,name=following_kv_count" json:"following_kv_count,omitempty"` + // + // This field contains the list of clusters that have + // consumed the change + ClusterIds []*UUID `protobuf:"bytes,8,rep,name=cluster_ids" json:"cluster_ids,omitempty"` + NonceGroup *uint64 `protobuf:"varint,9,opt,name=nonceGroup" json:"nonceGroup,omitempty"` + Nonce *uint64 `protobuf:"varint,10,opt,name=nonce" json:"nonce,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *WALKey) Reset() { *m = WALKey{} } +func (m *WALKey) String() string { return proto1.CompactTextString(m) } +func (*WALKey) ProtoMessage() {} + +func (m *WALKey) GetEncodedRegionName() []byte { + if m != nil { + return m.EncodedRegionName + } + return nil +} + +func (m *WALKey) GetTableName() []byte { + if m != nil { + return m.TableName + } + return nil +} + +func (m *WALKey) GetLogSequenceNumber() uint64 { + if m != nil && m.LogSequenceNumber != nil { + return *m.LogSequenceNumber + } + return 0 +} + +func (m *WALKey) GetWriteTime() uint64 { + if m != nil && m.WriteTime != nil { + return *m.WriteTime + } + return 0 +} + +func (m *WALKey) GetClusterId() *UUID { + if m != nil { + return m.ClusterId + } + return nil +} + +func (m *WALKey) GetScopes() []*FamilyScope { + if m != nil { + return m.Scopes + } + return nil +} + +func (m *WALKey) GetFollowingKvCount() uint32 { + if m != nil && m.FollowingKvCount != nil { + return *m.FollowingKvCount + } + return 0 +} + +func (m *WALKey) GetClusterIds() []*UUID { + if m != nil { + return m.ClusterIds + } + return nil +} + +func (m *WALKey) GetNonceGroup() uint64 { + if m != nil && m.NonceGroup != nil { + return *m.NonceGroup + } + return 0 +} + +func (m *WALKey) GetNonce() uint64 { + if m != nil && m.Nonce != nil { + return *m.Nonce + } + return 0 +} + +type FamilyScope struct { + Family []byte `protobuf:"bytes,1,req,name=family" json:"family,omitempty"` + ScopeType *ScopeType `protobuf:"varint,2,req,name=scope_type,enum=proto.ScopeType" json:"scope_type,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FamilyScope) Reset() { *m = FamilyScope{} } +func (m *FamilyScope) String() string { return proto1.CompactTextString(m) } +func (*FamilyScope) ProtoMessage() {} + +func (m *FamilyScope) GetFamily() []byte { + if m != nil { + return m.Family + } + return nil +} + +func (m *FamilyScope) GetScopeType() ScopeType { + if m != nil && m.ScopeType != nil { + return *m.ScopeType + } + return ScopeType_REPLICATION_SCOPE_LOCAL +} + +// * +// Special WAL entry to hold all related to a compaction. +// Written to WAL before completing compaction. There is +// sufficient info in the below message to complete later +// the * compaction should we fail the WAL write. +type CompactionDescriptor struct { + TableName []byte `protobuf:"bytes,1,req,name=table_name" json:"table_name,omitempty"` + EncodedRegionName []byte `protobuf:"bytes,2,req,name=encoded_region_name" json:"encoded_region_name,omitempty"` + FamilyName []byte `protobuf:"bytes,3,req,name=family_name" json:"family_name,omitempty"` + CompactionInput []string `protobuf:"bytes,4,rep,name=compaction_input" json:"compaction_input,omitempty"` + CompactionOutput []string `protobuf:"bytes,5,rep,name=compaction_output" json:"compaction_output,omitempty"` + StoreHomeDir *string `protobuf:"bytes,6,req,name=store_home_dir" json:"store_home_dir,omitempty"` + RegionName []byte `protobuf:"bytes,7,opt,name=region_name" json:"region_name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *CompactionDescriptor) Reset() { *m = CompactionDescriptor{} } +func (m *CompactionDescriptor) String() string { return proto1.CompactTextString(m) } +func (*CompactionDescriptor) ProtoMessage() {} + +func (m *CompactionDescriptor) GetTableName() []byte { + if m != nil { + return m.TableName + } + return nil +} + +func (m *CompactionDescriptor) GetEncodedRegionName() []byte { + if m != nil { + return m.EncodedRegionName + } + return nil +} + +func (m *CompactionDescriptor) GetFamilyName() []byte { + if m != nil { + return m.FamilyName + } + return nil +} + +func (m *CompactionDescriptor) GetCompactionInput() []string { + if m != nil { + return m.CompactionInput + } + return nil +} + +func (m *CompactionDescriptor) GetCompactionOutput() []string { + if m != nil { + return m.CompactionOutput + } + return nil +} + +func (m *CompactionDescriptor) GetStoreHomeDir() string { + if m != nil && m.StoreHomeDir != nil { + return *m.StoreHomeDir + } + return "" +} + +func (m *CompactionDescriptor) GetRegionName() []byte { + if m != nil { + return m.RegionName + } + return nil +} + +// * +// A trailer that is appended to the end of a properly closed HLog WAL file. +// If missing, this is either a legacy or a corrupted WAL file. +type WALTrailer struct { + XXX_unrecognized []byte `json:"-"` +} + +func (m *WALTrailer) Reset() { *m = WALTrailer{} } +func (m *WALTrailer) String() string { return proto1.CompactTextString(m) } +func (*WALTrailer) ProtoMessage() {} + +func init() { + proto1.RegisterEnum("proto.ScopeType", ScopeType_name, ScopeType_value) +} diff --git a/vendor/github.com/pingcap/go-hbase/proto/ZooKeeper.pb.go b/vendor/github.com/pingcap/go-hbase/proto/ZooKeeper.pb.go new file mode 100644 index 000000000..2432fe5c8 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/proto/ZooKeeper.pb.go @@ -0,0 +1,580 @@ +// Code generated by protoc-gen-go. +// source: ZooKeeper.proto +// DO NOT EDIT! + +package proto + +import proto1 "github.com/golang/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto1.Marshal +var _ = math.Inf + +type SplitLogTask_State int32 + +const ( + SplitLogTask_UNASSIGNED SplitLogTask_State = 0 + SplitLogTask_OWNED SplitLogTask_State = 1 + SplitLogTask_RESIGNED SplitLogTask_State = 2 + SplitLogTask_DONE SplitLogTask_State = 3 + SplitLogTask_ERR SplitLogTask_State = 4 +) + +var SplitLogTask_State_name = map[int32]string{ + 0: "UNASSIGNED", + 1: "OWNED", + 2: "RESIGNED", + 3: "DONE", + 4: "ERR", +} +var SplitLogTask_State_value = map[string]int32{ + "UNASSIGNED": 0, + "OWNED": 1, + "RESIGNED": 2, + "DONE": 3, + "ERR": 4, +} + +func (x SplitLogTask_State) Enum() *SplitLogTask_State { + p := new(SplitLogTask_State) + *p = x + return p +} +func (x SplitLogTask_State) String() string { + return proto1.EnumName(SplitLogTask_State_name, int32(x)) +} +func (x *SplitLogTask_State) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(SplitLogTask_State_value, data, "SplitLogTask_State") + if err != nil { + return err + } + *x = SplitLogTask_State(value) + return nil +} + +type SplitLogTask_RecoveryMode int32 + +const ( + SplitLogTask_UNKNOWN SplitLogTask_RecoveryMode = 0 + SplitLogTask_LOG_SPLITTING SplitLogTask_RecoveryMode = 1 + SplitLogTask_LOG_REPLAY SplitLogTask_RecoveryMode = 2 +) + +var SplitLogTask_RecoveryMode_name = map[int32]string{ + 0: "UNKNOWN", + 1: "LOG_SPLITTING", + 2: "LOG_REPLAY", +} +var SplitLogTask_RecoveryMode_value = map[string]int32{ + "UNKNOWN": 0, + "LOG_SPLITTING": 1, + "LOG_REPLAY": 2, +} + +func (x SplitLogTask_RecoveryMode) Enum() *SplitLogTask_RecoveryMode { + p := new(SplitLogTask_RecoveryMode) + *p = x + return p +} +func (x SplitLogTask_RecoveryMode) String() string { + return proto1.EnumName(SplitLogTask_RecoveryMode_name, int32(x)) +} +func (x *SplitLogTask_RecoveryMode) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(SplitLogTask_RecoveryMode_value, data, "SplitLogTask_RecoveryMode") + if err != nil { + return err + } + *x = SplitLogTask_RecoveryMode(value) + return nil +} + +// Table's current state +type Table_State int32 + +const ( + Table_ENABLED Table_State = 0 + Table_DISABLED Table_State = 1 + Table_DISABLING Table_State = 2 + Table_ENABLING Table_State = 3 +) + +var Table_State_name = map[int32]string{ + 0: "ENABLED", + 1: "DISABLED", + 2: "DISABLING", + 3: "ENABLING", +} +var Table_State_value = map[string]int32{ + "ENABLED": 0, + "DISABLED": 1, + "DISABLING": 2, + "ENABLING": 3, +} + +func (x Table_State) Enum() *Table_State { + p := new(Table_State) + *p = x + return p +} +func (x Table_State) String() string { + return proto1.EnumName(Table_State_name, int32(x)) +} +func (x *Table_State) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(Table_State_value, data, "Table_State") + if err != nil { + return err + } + *x = Table_State(value) + return nil +} + +type ReplicationState_State int32 + +const ( + ReplicationState_ENABLED ReplicationState_State = 0 + ReplicationState_DISABLED ReplicationState_State = 1 +) + +var ReplicationState_State_name = map[int32]string{ + 0: "ENABLED", + 1: "DISABLED", +} +var ReplicationState_State_value = map[string]int32{ + "ENABLED": 0, + "DISABLED": 1, +} + +func (x ReplicationState_State) Enum() *ReplicationState_State { + p := new(ReplicationState_State) + *p = x + return p +} +func (x ReplicationState_State) String() string { + return proto1.EnumName(ReplicationState_State_name, int32(x)) +} +func (x *ReplicationState_State) UnmarshalJSON(data []byte) error { + value, err := proto1.UnmarshalJSONEnum(ReplicationState_State_value, data, "ReplicationState_State") + if err != nil { + return err + } + *x = ReplicationState_State(value) + return nil +} + +// * +// Content of the meta-region-server znode. +type MetaRegionServer struct { + // The ServerName hosting the meta region currently. + Server *ServerName `protobuf:"bytes,1,req,name=server" json:"server,omitempty"` + // The major version of the rpc the server speaks. This is used so that + // clients connecting to the cluster can have prior knowledge of what version + // to send to a RegionServer. AsyncHBase will use this to detect versions. + RpcVersion *uint32 `protobuf:"varint,2,opt,name=rpc_version" json:"rpc_version,omitempty"` + // State of the region transition. OPEN means fully operational 'hbase:meta' + State *RegionState_State `protobuf:"varint,3,opt,name=state,enum=proto.RegionState_State" json:"state,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MetaRegionServer) Reset() { *m = MetaRegionServer{} } +func (m *MetaRegionServer) String() string { return proto1.CompactTextString(m) } +func (*MetaRegionServer) ProtoMessage() {} + +func (m *MetaRegionServer) GetServer() *ServerName { + if m != nil { + return m.Server + } + return nil +} + +func (m *MetaRegionServer) GetRpcVersion() uint32 { + if m != nil && m.RpcVersion != nil { + return *m.RpcVersion + } + return 0 +} + +func (m *MetaRegionServer) GetState() RegionState_State { + if m != nil && m.State != nil { + return *m.State + } + return RegionState_OFFLINE +} + +// * +// Content of the master znode. +type Master struct { + // The ServerName of the current Master + Master *ServerName `protobuf:"bytes,1,req,name=master" json:"master,omitempty"` + // Major RPC version so that clients can know what version the master can accept. + RpcVersion *uint32 `protobuf:"varint,2,opt,name=rpc_version" json:"rpc_version,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Master) Reset() { *m = Master{} } +func (m *Master) String() string { return proto1.CompactTextString(m) } +func (*Master) ProtoMessage() {} + +func (m *Master) GetMaster() *ServerName { + if m != nil { + return m.Master + } + return nil +} + +func (m *Master) GetRpcVersion() uint32 { + if m != nil && m.RpcVersion != nil { + return *m.RpcVersion + } + return 0 +} + +// * +// Content of the '/hbase/running', cluster state, znode. +type ClusterUp struct { + // If this znode is present, cluster is up. Currently + // the data is cluster start_date. + StartDate *string `protobuf:"bytes,1,req,name=start_date" json:"start_date,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ClusterUp) Reset() { *m = ClusterUp{} } +func (m *ClusterUp) String() string { return proto1.CompactTextString(m) } +func (*ClusterUp) ProtoMessage() {} + +func (m *ClusterUp) GetStartDate() string { + if m != nil && m.StartDate != nil { + return *m.StartDate + } + return "" +} + +// * +// What we write under unassigned up in zookeeper as a region moves through +// open/close, etc., regions. Details a region in transition. +type RegionTransition struct { + // Code for EventType gotten by doing o.a.h.h.EventHandler.EventType.getCode() + EventTypeCode *uint32 `protobuf:"varint,1,req,name=event_type_code" json:"event_type_code,omitempty"` + // Full regionname in bytes + RegionName []byte `protobuf:"bytes,2,req,name=region_name" json:"region_name,omitempty"` + CreateTime *uint64 `protobuf:"varint,3,req,name=create_time" json:"create_time,omitempty"` + // The region server where the transition will happen or is happening + ServerName *ServerName `protobuf:"bytes,4,req,name=server_name" json:"server_name,omitempty"` + Payload []byte `protobuf:"bytes,5,opt,name=payload" json:"payload,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionTransition) Reset() { *m = RegionTransition{} } +func (m *RegionTransition) String() string { return proto1.CompactTextString(m) } +func (*RegionTransition) ProtoMessage() {} + +func (m *RegionTransition) GetEventTypeCode() uint32 { + if m != nil && m.EventTypeCode != nil { + return *m.EventTypeCode + } + return 0 +} + +func (m *RegionTransition) GetRegionName() []byte { + if m != nil { + return m.RegionName + } + return nil +} + +func (m *RegionTransition) GetCreateTime() uint64 { + if m != nil && m.CreateTime != nil { + return *m.CreateTime + } + return 0 +} + +func (m *RegionTransition) GetServerName() *ServerName { + if m != nil { + return m.ServerName + } + return nil +} + +func (m *RegionTransition) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +// * +// WAL SplitLog directory znodes have this for content. Used doing distributed +// WAL splitting. Holds current state and name of server that originated split. +type SplitLogTask struct { + State *SplitLogTask_State `protobuf:"varint,1,req,name=state,enum=proto.SplitLogTask_State" json:"state,omitempty"` + ServerName *ServerName `protobuf:"bytes,2,req,name=server_name" json:"server_name,omitempty"` + Mode *SplitLogTask_RecoveryMode `protobuf:"varint,3,opt,name=mode,enum=proto.SplitLogTask_RecoveryMode,def=0" json:"mode,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SplitLogTask) Reset() { *m = SplitLogTask{} } +func (m *SplitLogTask) String() string { return proto1.CompactTextString(m) } +func (*SplitLogTask) ProtoMessage() {} + +const Default_SplitLogTask_Mode SplitLogTask_RecoveryMode = SplitLogTask_UNKNOWN + +func (m *SplitLogTask) GetState() SplitLogTask_State { + if m != nil && m.State != nil { + return *m.State + } + return SplitLogTask_UNASSIGNED +} + +func (m *SplitLogTask) GetServerName() *ServerName { + if m != nil { + return m.ServerName + } + return nil +} + +func (m *SplitLogTask) GetMode() SplitLogTask_RecoveryMode { + if m != nil && m.Mode != nil { + return *m.Mode + } + return Default_SplitLogTask_Mode +} + +// * +// The znode that holds state of table. +type Table struct { + // This is the table's state. If no znode for a table, + // its state is presumed enabled. See o.a.h.h.zookeeper.ZKTable class + // for more. + State *Table_State `protobuf:"varint,1,req,name=state,enum=proto.Table_State,def=0" json:"state,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *Table) Reset() { *m = Table{} } +func (m *Table) String() string { return proto1.CompactTextString(m) } +func (*Table) ProtoMessage() {} + +const Default_Table_State Table_State = Table_ENABLED + +func (m *Table) GetState() Table_State { + if m != nil && m.State != nil { + return *m.State + } + return Default_Table_State +} + +// * +// Used by replication. Holds a replication peer key. +type ReplicationPeer struct { + // clusterkey is the concatenation of the slave cluster's + // hbase.zookeeper.quorum:hbase.zookeeper.property.clientPort:zookeeper.znode.parent + Clusterkey *string `protobuf:"bytes,1,req,name=clusterkey" json:"clusterkey,omitempty"` + ReplicationEndpointImpl *string `protobuf:"bytes,2,opt,name=replicationEndpointImpl" json:"replicationEndpointImpl,omitempty"` + Data []*BytesBytesPair `protobuf:"bytes,3,rep,name=data" json:"data,omitempty"` + Configuration []*NameStringPair `protobuf:"bytes,4,rep,name=configuration" json:"configuration,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ReplicationPeer) Reset() { *m = ReplicationPeer{} } +func (m *ReplicationPeer) String() string { return proto1.CompactTextString(m) } +func (*ReplicationPeer) ProtoMessage() {} + +func (m *ReplicationPeer) GetClusterkey() string { + if m != nil && m.Clusterkey != nil { + return *m.Clusterkey + } + return "" +} + +func (m *ReplicationPeer) GetReplicationEndpointImpl() string { + if m != nil && m.ReplicationEndpointImpl != nil { + return *m.ReplicationEndpointImpl + } + return "" +} + +func (m *ReplicationPeer) GetData() []*BytesBytesPair { + if m != nil { + return m.Data + } + return nil +} + +func (m *ReplicationPeer) GetConfiguration() []*NameStringPair { + if m != nil { + return m.Configuration + } + return nil +} + +// * +// Used by replication. Holds whether enabled or disabled +type ReplicationState struct { + State *ReplicationState_State `protobuf:"varint,1,req,name=state,enum=proto.ReplicationState_State" json:"state,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ReplicationState) Reset() { *m = ReplicationState{} } +func (m *ReplicationState) String() string { return proto1.CompactTextString(m) } +func (*ReplicationState) ProtoMessage() {} + +func (m *ReplicationState) GetState() ReplicationState_State { + if m != nil && m.State != nil { + return *m.State + } + return ReplicationState_ENABLED +} + +// * +// Used by replication. Holds the current position in an HLog file. +type ReplicationHLogPosition struct { + Position *int64 `protobuf:"varint,1,req,name=position" json:"position,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ReplicationHLogPosition) Reset() { *m = ReplicationHLogPosition{} } +func (m *ReplicationHLogPosition) String() string { return proto1.CompactTextString(m) } +func (*ReplicationHLogPosition) ProtoMessage() {} + +func (m *ReplicationHLogPosition) GetPosition() int64 { + if m != nil && m.Position != nil { + return *m.Position + } + return 0 +} + +// * +// Used by replication. Used to lock a region server during failover. +type ReplicationLock struct { + LockOwner *string `protobuf:"bytes,1,req,name=lock_owner" json:"lock_owner,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ReplicationLock) Reset() { *m = ReplicationLock{} } +func (m *ReplicationLock) String() string { return proto1.CompactTextString(m) } +func (*ReplicationLock) ProtoMessage() {} + +func (m *ReplicationLock) GetLockOwner() string { + if m != nil && m.LockOwner != nil { + return *m.LockOwner + } + return "" +} + +// * +// Metadata associated with a table lock in zookeeper +type TableLock struct { + TableName *TableName `protobuf:"bytes,1,opt,name=table_name" json:"table_name,omitempty"` + LockOwner *ServerName `protobuf:"bytes,2,opt,name=lock_owner" json:"lock_owner,omitempty"` + ThreadId *int64 `protobuf:"varint,3,opt,name=thread_id" json:"thread_id,omitempty"` + IsShared *bool `protobuf:"varint,4,opt,name=is_shared" json:"is_shared,omitempty"` + Purpose *string `protobuf:"bytes,5,opt,name=purpose" json:"purpose,omitempty"` + CreateTime *int64 `protobuf:"varint,6,opt,name=create_time" json:"create_time,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *TableLock) Reset() { *m = TableLock{} } +func (m *TableLock) String() string { return proto1.CompactTextString(m) } +func (*TableLock) ProtoMessage() {} + +func (m *TableLock) GetTableName() *TableName { + if m != nil { + return m.TableName + } + return nil +} + +func (m *TableLock) GetLockOwner() *ServerName { + if m != nil { + return m.LockOwner + } + return nil +} + +func (m *TableLock) GetThreadId() int64 { + if m != nil && m.ThreadId != nil { + return *m.ThreadId + } + return 0 +} + +func (m *TableLock) GetIsShared() bool { + if m != nil && m.IsShared != nil { + return *m.IsShared + } + return false +} + +func (m *TableLock) GetPurpose() string { + if m != nil && m.Purpose != nil { + return *m.Purpose + } + return "" +} + +func (m *TableLock) GetCreateTime() int64 { + if m != nil && m.CreateTime != nil { + return *m.CreateTime + } + return 0 +} + +// * +// sequence Id of a store +type StoreSequenceId struct { + FamilyName []byte `protobuf:"bytes,1,req,name=family_name" json:"family_name,omitempty"` + SequenceId *uint64 `protobuf:"varint,2,req,name=sequence_id" json:"sequence_id,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *StoreSequenceId) Reset() { *m = StoreSequenceId{} } +func (m *StoreSequenceId) String() string { return proto1.CompactTextString(m) } +func (*StoreSequenceId) ProtoMessage() {} + +func (m *StoreSequenceId) GetFamilyName() []byte { + if m != nil { + return m.FamilyName + } + return nil +} + +func (m *StoreSequenceId) GetSequenceId() uint64 { + if m != nil && m.SequenceId != nil { + return *m.SequenceId + } + return 0 +} + +// * +// contains a sequence id of a region which should be the minimum of its store sequence ids and +// list sequence ids of the region's stores +type RegionStoreSequenceIds struct { + LastFlushedSequenceId *uint64 `protobuf:"varint,1,req,name=last_flushed_sequence_id" json:"last_flushed_sequence_id,omitempty"` + StoreSequenceId []*StoreSequenceId `protobuf:"bytes,2,rep,name=store_sequence_id" json:"store_sequence_id,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *RegionStoreSequenceIds) Reset() { *m = RegionStoreSequenceIds{} } +func (m *RegionStoreSequenceIds) String() string { return proto1.CompactTextString(m) } +func (*RegionStoreSequenceIds) ProtoMessage() {} + +func (m *RegionStoreSequenceIds) GetLastFlushedSequenceId() uint64 { + if m != nil && m.LastFlushedSequenceId != nil { + return *m.LastFlushedSequenceId + } + return 0 +} + +func (m *RegionStoreSequenceIds) GetStoreSequenceId() []*StoreSequenceId { + if m != nil { + return m.StoreSequenceId + } + return nil +} + +func init() { + proto1.RegisterEnum("proto.SplitLogTask_State", SplitLogTask_State_name, SplitLogTask_State_value) + proto1.RegisterEnum("proto.SplitLogTask_RecoveryMode", SplitLogTask_RecoveryMode_name, SplitLogTask_RecoveryMode_value) + proto1.RegisterEnum("proto.Table_State", Table_State_name, Table_State_value) + proto1.RegisterEnum("proto.ReplicationState_State", ReplicationState_State_name, ReplicationState_State_value) +} diff --git a/vendor/github.com/pingcap/go-hbase/put.go b/vendor/github.com/pingcap/go-hbase/put.go new file mode 100644 index 000000000..80e867ec1 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/put.go @@ -0,0 +1,92 @@ +package hbase + +import ( + "bytes" + "math" + + pb "github.com/golang/protobuf/proto" + "github.com/pingcap/go-hbase/proto" +) + +type Put struct { + Row []byte + Families [][]byte + Qualifiers [][][]byte + Values [][][]byte + Timestamp uint64 +} + +func NewPut(row []byte) *Put { + return &Put{ + Row: row, + Families: make([][]byte, 0), + Qualifiers: make([][][]byte, 0), + Values: make([][][]byte, 0), + } +} + +func (p *Put) GetRow() []byte { + return p.Row +} + +func (p *Put) AddValue(family, qual, value []byte) *Put { + pos := p.posOfFamily(family) + if pos == -1 { + p.Families = append(p.Families, family) + p.Qualifiers = append(p.Qualifiers, make([][]byte, 0)) + p.Values = append(p.Values, make([][]byte, 0)) + + pos = p.posOfFamily(family) + } + + p.Qualifiers[pos] = append(p.Qualifiers[pos], qual) + p.Values[pos] = append(p.Values[pos], value) + return p +} + +func (p *Put) AddStringValue(family, column, value string) *Put { + return p.AddValue([]byte(family), []byte(column), []byte(value)) +} + +func (p *Put) AddTimestamp(ts uint64) *Put { + if ts == 0 { + p.Timestamp = math.MaxInt64 + } else { + p.Timestamp = ts + } + return p +} + +func (p *Put) posOfFamily(family []byte) int { + for p, v := range p.Families { + if bytes.Equal(family, v) { + return p + } + } + return -1 +} + +func (p *Put) ToProto() pb.Message { + put := &proto.MutationProto{ + Row: p.Row, + MutateType: proto.MutationProto_PUT.Enum(), + } + + for i, family := range p.Families { + cv := &proto.MutationProto_ColumnValue{ + Family: family, + } + + for j := range p.Qualifiers[i] { + cv.QualifierValue = append(cv.QualifierValue, &proto.MutationProto_ColumnValue_QualifierValue{ + Qualifier: p.Qualifiers[i][j], + Value: p.Values[i][j], + Timestamp: pb.Uint64(p.Timestamp), + }) + } + + put.ColumnValue = append(put.ColumnValue, cv) + } + + return put +} diff --git a/vendor/github.com/pingcap/go-hbase/result.go b/vendor/github.com/pingcap/go-hbase/result.go new file mode 100644 index 000000000..eda614358 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/result.go @@ -0,0 +1,76 @@ +package hbase + +import ( + "fmt" + + "github.com/pingcap/go-hbase/proto" +) + +type Kv struct { + Row []byte + Ts uint64 + Value []byte + // history results + Values map[uint64][]byte + Column +} + +func (kv *Kv) String() string { + if kv == nil { + return "" + } + return fmt.Sprintf("Kv(%+v)", *kv) +} + +type ResultRow struct { + Row []byte + Columns map[string]*Kv + SortedColumns []*Kv +} + +func (r *ResultRow) String() string { + if r == nil { + return "" + } + return fmt.Sprintf("ResultRow(%+v)", *r) +} + +func NewResultRow(result *proto.Result) *ResultRow { + // empty response + if len(result.GetCell()) == 0 { + return nil + } + res := &ResultRow{} + res.Columns = make(map[string]*Kv) + res.SortedColumns = make([]*Kv, 0) + + for _, cell := range result.GetCell() { + res.Row = cell.GetRow() + + col := &Kv{ + Row: res.Row, + Column: Column{ + Family: cell.GetFamily(), + Qual: cell.GetQualifier(), + }, + Value: cell.GetValue(), + Ts: cell.GetTimestamp(), + } + + colName := string(col.Column.Family) + ":" + string(col.Column.Qual) + + if v, exists := res.Columns[colName]; exists { + // renew the same cf result + if col.Ts > v.Ts { + v.Value = col.Value + v.Ts = col.Ts + } + v.Values[col.Ts] = col.Value + } else { + col.Values = map[uint64][]byte{col.Ts: col.Value} + res.Columns[colName] = col + res.SortedColumns = append(res.SortedColumns, col) + } + } + return res +} diff --git a/vendor/github.com/pingcap/go-hbase/scan.go b/vendor/github.com/pingcap/go-hbase/scan.go new file mode 100644 index 000000000..77ba47715 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/scan.go @@ -0,0 +1,397 @@ +package hbase + +import ( + "bytes" + + pb "github.com/golang/protobuf/proto" + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/go-hbase/proto" +) + +// nextKey returns the next key in byte-order. +// for example: +// nil -> [0] +// [] -> [0] +// [0] -> [1] +// [1, 2, 3] -> [1, 2, 4] +// [1, 255] -> [2, 0] +// [255] -> [0, 0] +func nextKey(data []byte) []byte { + // nil or []byte{} + dataLen := len(data) + if dataLen == 0 { + return []byte{0} + } + + // Check and process carry bit. + i := dataLen - 1 + data[i]++ + for i > 0 { + if data[i] == 0 { + i-- + data[i]++ + } else { + break + } + } + + // Check whether need to add another byte for carry bit, + // like [255] -> [0, 0] + if data[i] == 0 { + data = append([]byte{0}, data...) + } + + return data +} + +const ( + defaultScanMaxRetries = 3 +) + +type Scan struct { + client *client + id uint64 + table []byte + // row key + StartRow []byte + StopRow []byte + families [][]byte + qualifiers [][][]byte + nextStartKey []byte + numCached int + closed bool + location *RegionInfo + server *connection + cache []*ResultRow + attrs map[string][]byte + MaxVersions uint32 + TsRangeFrom uint64 + TsRangeTo uint64 + lastResult *ResultRow + // if region split, set startKey = lastResult.Row, but must skip the first + skipFirst bool + maxRetries int +} + +func NewScan(table []byte, batchSize int, c HBaseClient) *Scan { + if batchSize <= 0 { + batchSize = 100 + } + return &Scan{ + client: c.(*client), + table: table, + nextStartKey: nil, + families: make([][]byte, 0), + qualifiers: make([][][]byte, 0), + numCached: batchSize, + closed: false, + attrs: make(map[string][]byte), + maxRetries: defaultScanMaxRetries, + } +} + +func (s *Scan) Close() error { + if s.closed { + return nil + } + + err := s.closeScan(s.server, s.location, s.id) + if err != nil { + return errors.Trace(err) + } + + s.closed = true + return nil +} + +func (s *Scan) AddColumn(family, qual []byte) { + s.AddFamily(family) + pos := s.posOfFamily(family) + s.qualifiers[pos] = append(s.qualifiers[pos], qual) +} + +func (s *Scan) AddStringColumn(family, qual string) { + s.AddColumn([]byte(family), []byte(qual)) +} + +func (s *Scan) AddFamily(family []byte) { + pos := s.posOfFamily(family) + if pos == -1 { + s.families = append(s.families, family) + s.qualifiers = append(s.qualifiers, make([][]byte, 0)) + } +} + +func (s *Scan) AddStringFamily(family string) { + s.AddFamily([]byte(family)) +} + +func (s *Scan) posOfFamily(family []byte) int { + for p, v := range s.families { + if bytes.Equal(family, v) { + return p + } + } + return -1 +} + +func (s *Scan) AddAttr(name string, val []byte) { + s.attrs[name] = val +} + +func (s *Scan) AddTimeRange(from uint64, to uint64) { + s.TsRangeFrom = from + s.TsRangeTo = to +} + +func (s *Scan) Closed() bool { + return s.closed +} + +func (s *Scan) CreateGetFromScan(row []byte) *Get { + g := NewGet(row) + for i, family := range s.families { + if len(s.qualifiers[i]) > 0 { + for _, qual := range s.qualifiers[i] { + g.AddColumn(family, qual) + } + } else { + g.AddFamily(family) + } + } + return g +} + +func (s *Scan) getData(startKey []byte, retries int) ([]*ResultRow, error) { + server, location, err := s.getServerAndLocation(s.table, startKey) + if err != nil { + return nil, errors.Trace(err) + } + + req := &proto.ScanRequest{ + Region: &proto.RegionSpecifier{ + Type: proto.RegionSpecifier_REGION_NAME.Enum(), + Value: []byte(location.Name), + }, + NumberOfRows: pb.Uint32(uint32(s.numCached)), + Scan: &proto.Scan{}, + } + + // set attributes + var attrs []*proto.NameBytesPair + for k, v := range s.attrs { + p := &proto.NameBytesPair{ + Name: pb.String(k), + Value: v, + } + attrs = append(attrs, p) + } + if len(attrs) > 0 { + req.Scan.Attribute = attrs + } + + if s.id > 0 { + req.ScannerId = pb.Uint64(s.id) + } + req.Scan.StartRow = startKey + if s.StopRow != nil { + req.Scan.StopRow = s.StopRow + } + if s.MaxVersions > 0 { + req.Scan.MaxVersions = &s.MaxVersions + } + if s.TsRangeTo > s.TsRangeFrom { + req.Scan.TimeRange = &proto.TimeRange{ + From: pb.Uint64(s.TsRangeFrom), + To: pb.Uint64(s.TsRangeTo), + } + } + + for i, v := range s.families { + req.Scan.Column = append(req.Scan.Column, &proto.Column{ + Family: v, + Qualifier: s.qualifiers[i], + }) + } + + cl := newCall(req) + err = server.call(cl) + if err != nil { + return nil, errors.Trace(err) + } + + msg := <-cl.responseCh + rs, err := s.processResponse(msg) + if err != nil && (isNotInRegionError(err) || isUnknownScannerError(err)) { + if retries <= s.maxRetries { + // clean this table region cache and try again + s.client.CleanRegionCache(s.table) + // create new scanner and set startRow to lastResult + s.id = 0 + if s.lastResult != nil { + startKey = s.lastResult.Row + s.skipFirst = true + } + s.server = nil + s.location = nil + log.Warnf("Retryint get data for %d time(s)", retries+1) + retrySleep(retries + 1) + return s.getData(startKey, retries+1) + } + } + return rs, nil +} + +func (s *Scan) processResponse(response pb.Message) ([]*ResultRow, error) { + var res *proto.ScanResponse + switch r := response.(type) { + case *proto.ScanResponse: + res = r + case *exception: + return nil, errors.New(r.msg) + default: + return nil, errors.Errorf("Invalid response seen [response: %#v]", response) + } + + // Check whether response is nil. + if res == nil { + return nil, errors.Errorf("Empty response: [table=%s] [StartRow=%q] [StopRow=%q] ", s.table, s.StartRow, s.StopRow) + } + + nextRegion := true + s.nextStartKey = nil + s.id = res.GetScannerId() + + results := res.GetResults() + n := len(results) + + if (n == s.numCached) || + len(s.location.EndKey) == 0 || + (s.StopRow != nil && bytes.Compare(s.location.EndKey, s.StopRow) > 0 && n < s.numCached) || + res.GetMoreResultsInRegion() { + nextRegion = false + } + + var err error + if nextRegion { + s.nextStartKey = s.location.EndKey + err = s.closeScan(s.server, s.location, s.id) + if err != nil { + return nil, errors.Trace(err) + } + s.server = nil + s.location = nil + s.id = 0 + } + + if n == 0 && !nextRegion { + err = s.Close() + if err != nil { + return nil, errors.Trace(err) + } + } + + if s.skipFirst { + results = results[1:] + s.skipFirst = false + n = len(results) + } + + tbr := make([]*ResultRow, n) + for i, v := range results { + if v != nil { + tbr[i] = NewResultRow(v) + } + } + + return tbr, nil +} + +func (s *Scan) nextBatch() int { + startKey := s.nextStartKey + if startKey == nil { + startKey = s.StartRow + } + + // Notice: ignore error here. + // TODO: add error check, now only add a log. + rs, err := s.getData(startKey, 0) + if err != nil { + log.Errorf("scan next batch failed - [startKey=%q], %v", startKey, errors.ErrorStack(err)) + } + + // Current region get 0 data, try switch to next region. + if len(rs) == 0 && len(s.nextStartKey) > 0 { + // TODO: add error check, now only add a log. + rs, err = s.getData(s.nextStartKey, 0) + if err != nil { + log.Errorf("scan next batch failed - [startKey=%q], %v", s.nextStartKey, errors.ErrorStack(err)) + } + } + + s.cache = rs + return len(s.cache) +} + +func (s *Scan) Next() *ResultRow { + if s.closed { + return nil + } + var ret *ResultRow + if len(s.cache) == 0 { + n := s.nextBatch() + // no data returned + if n == 0 { + return nil + } + } + + ret = s.cache[0] + s.lastResult = ret + s.cache = s.cache[1:] + return ret +} + +func (s *Scan) closeScan(server *connection, location *RegionInfo, id uint64) error { + if server == nil || location == nil { + return nil + } + + req := &proto.ScanRequest{ + Region: &proto.RegionSpecifier{ + Type: proto.RegionSpecifier_REGION_NAME.Enum(), + Value: []byte(location.Name), + }, + ScannerId: pb.Uint64(id), + CloseScanner: pb.Bool(true), + } + + cl := newCall(req) + err := server.call(cl) + if err != nil { + return errors.Trace(err) + } + + // TODO: add exception check. + <-cl.responseCh + return nil +} + +func (s *Scan) getServerAndLocation(table, startRow []byte) (*connection, *RegionInfo, error) { + if s.server != nil && s.location != nil { + return s.server, s.location, nil + } + + var err error + s.location, err = s.client.LocateRegion(table, startRow, true) + if err != nil { + return nil, nil, errors.Trace(err) + } + + s.server, err = s.client.getClientConn(s.location.Server) + if err != nil { + return nil, nil, errors.Trace(err) + } + return s.server, s.location, nil +} diff --git a/vendor/github.com/pingcap/go-hbase/service_call.go b/vendor/github.com/pingcap/go-hbase/service_call.go new file mode 100644 index 000000000..b3ff44843 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/service_call.go @@ -0,0 +1,22 @@ +package hbase + +import ( + "github.com/pingcap/go-hbase/proto" + pb "github.com/golang/protobuf/proto" +) + +type CoprocessorServiceCall struct { + Row []byte + ServiceName string + MethodName string + RequestParam []byte +} + +func (c *CoprocessorServiceCall) ToProto() pb.Message { + return &proto.CoprocessorServiceCall{ + Row: c.Row, + ServiceName: pb.String(c.ServiceName), + MethodName: pb.String(c.MethodName), + Request: c.RequestParam, + } +} diff --git a/vendor/github.com/pingcap/go-hbase/types.go b/vendor/github.com/pingcap/go-hbase/types.go new file mode 100644 index 000000000..23fa36e67 --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/types.go @@ -0,0 +1,40 @@ +package hbase + +import "bytes" + +type Type byte + +const ( + TypeMinimum = Type(0) + TypePut = Type(4) + TypeDelete = Type(8) + TypeDeleteFamilyVersion = Type(10) + TypeDeleteColumn = Type(12) + TypeDeleteFamily = Type(14) + TypeMaximum = Type(0xff) +) + +type set map[string]struct{} + +func newSet() set { + return set(map[string]struct{}{}) +} + +func (s set) exists(k string) bool { + _, ok := s[k] + return ok +} + +func (s set) add(k string) { + s[k] = struct{}{} +} + +func (s set) remove(k string) { + delete(s, k) +} + +type BytesSlice [][]byte + +func (s BytesSlice) Len() int { return len(s) } +func (s BytesSlice) Less(i, j int) bool { return bytes.Compare(s[i], s[j]) < 0 } +func (s BytesSlice) Swap(i, j int) { s[i], s[j] = s[j], s[i] } diff --git a/vendor/github.com/pingcap/go-hbase/utils.go b/vendor/github.com/pingcap/go-hbase/utils.go new file mode 100644 index 000000000..b3e2a5f0b --- /dev/null +++ b/vendor/github.com/pingcap/go-hbase/utils.go @@ -0,0 +1,51 @@ +package hbase + +import ( + "bytes" + "time" + + "github.com/juju/errors" + "github.com/pingcap/go-hbase/proto" +) + +func retrySleep(retries int) { + time.Sleep(time.Duration(retries*500) * time.Millisecond) +} + +func findKey(region *RegionInfo, key []byte) bool { + if region == nil { + return false + } + // StartKey <= key < EndKey + return (len(region.StartKey) == 0 || bytes.Compare(region.StartKey, key) <= 0) && + (len(region.EndKey) == 0 || bytes.Compare(key, region.EndKey) < 0) +} + +func NewRegionSpecifier(regionName string) *proto.RegionSpecifier { + return &proto.RegionSpecifier{ + Type: proto.RegionSpecifier_REGION_NAME.Enum(), + Value: []byte(regionName), + } +} + +// TODO: The following functions can be moved later. +// ErrorEqual returns a boolean indicating whether err1 is equal to err2. +func ErrorEqual(err1, err2 error) bool { + e1 := errors.Cause(err1) + e2 := errors.Cause(err2) + + if e1 == e2 { + return true + } + + if e1 == nil || e2 == nil { + return e1 == e2 + } + + return e1.Error() == e2.Error() +} + +// ErrorNotEqual returns a boolean indicating whether err1 isn't equal to err2. +func ErrorNotEqual(err1, err2 error) bool { + return !ErrorEqual(err1, err2) +} diff --git a/vendor/github.com/pingcap/go-themis/LICENSE b/vendor/github.com/pingcap/go-themis/LICENSE new file mode 100644 index 000000000..5075665cb --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2015 PingCAP + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/vendor/github.com/pingcap/go-themis/README.md b/vendor/github.com/pingcap/go-themis/README.md new file mode 100644 index 000000000..e7e45684c --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/README.md @@ -0,0 +1,30 @@ +# go-themis +[![Build Status](https://travis-ci.org/pingcap/go-themis.svg?branch=master)](https://travis-ci.org/pingcap/go-themis) + +go-themis is a Go client for [pingcap/themis](https://github.com/pingcap/themis). + +Themis provides cross-row/cross-table transaction on HBase based on [google's Percolator](http://research.google.com/pubs/pub36726.html). + +go-themis is depends on [pingcap/go-hbase](https://github.com/pingcap/go-hbase). + +Install: + +``` +go get -u github.com/pingcap/go-themis +``` + +Example: + +``` +tx := themis.NewTxn(c, oracles.NewLocalOracle()) +put := hbase.NewPut([]byte("Row1")) +put.AddValue([]byte("cf"), []byte("q"), []byte("value")) + +put2 := hbase.NewPut([]byte("Row2")) +put2.AddValue([]byte("cf"), []byte("q"), []byte("value")) + +tx.Put(tblName, put) +tx.Put(tblName, put2) + +tx.Commit() +``` diff --git a/vendor/github.com/pingcap/go-themis/Themis.pb.go b/vendor/github.com/pingcap/go-themis/Themis.pb.go new file mode 100644 index 000000000..f67e531c2 --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/Themis.pb.go @@ -0,0 +1,547 @@ +// Code generated by protoc-gen-go. +// source: Themis.proto +// DO NOT EDIT! + +/* +Package Themis is a generated protocol buffer package. + +It is generated from these files: + Themis.proto + +It has these top-level messages: + ThemisGetRequest + ThemisBatchGetRequest + ThemisBatchGetResponse + ThemisPrewrite + ThemisPrewriteRequest + ThemisPrewriteResponse + ThemisBatchPrewriteSecondaryRequest + ThemisBatchPrewriteSecondaryResponse + ThemisPrewriteResult + ThemisCommitRequest + ThemisCommitResponse + ThemisBatchCommitSecondaryRequest + ThemisBatchCommitSecondaryResponse + ThemisBatchCommitSecondaryResult + ThemisCommit + EraseLockRequest + EraseLockResponse + LockExpiredRequest + LockExpiredResponse +*/ +package themis + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import Client "github.com/pingcap/go-hbase/proto" +import Cell "github.com/pingcap/go-hbase/proto" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +type ThemisGetRequest struct { + Get *Client.Get `protobuf:"bytes,1,req,name=get" json:"get,omitempty"` + StartTs *uint64 `protobuf:"varint,2,req,name=startTs" json:"startTs,omitempty"` + IgnoreLock *bool `protobuf:"varint,3,req,name=ignoreLock" json:"ignoreLock,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ThemisGetRequest) Reset() { *m = ThemisGetRequest{} } +func (m *ThemisGetRequest) String() string { return proto.CompactTextString(m) } +func (*ThemisGetRequest) ProtoMessage() {} + +func (m *ThemisGetRequest) GetGet() *Client.Get { + if m != nil { + return m.Get + } + return nil +} + +func (m *ThemisGetRequest) GetStartTs() uint64 { + if m != nil && m.StartTs != nil { + return *m.StartTs + } + return 0 +} + +func (m *ThemisGetRequest) GetIgnoreLock() bool { + if m != nil && m.IgnoreLock != nil { + return *m.IgnoreLock + } + return false +} + +type ThemisBatchGetRequest struct { + Gets []*Client.Get `protobuf:"bytes,1,rep,name=gets" json:"gets,omitempty"` + StartTs *uint64 `protobuf:"varint,2,req,name=startTs" json:"startTs,omitempty"` + IgnoreLock *bool `protobuf:"varint,3,req,name=ignoreLock" json:"ignoreLock,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ThemisBatchGetRequest) Reset() { *m = ThemisBatchGetRequest{} } +func (m *ThemisBatchGetRequest) String() string { return proto.CompactTextString(m) } +func (*ThemisBatchGetRequest) ProtoMessage() {} + +func (m *ThemisBatchGetRequest) GetGets() []*Client.Get { + if m != nil { + return m.Gets + } + return nil +} + +func (m *ThemisBatchGetRequest) GetStartTs() uint64 { + if m != nil && m.StartTs != nil { + return *m.StartTs + } + return 0 +} + +func (m *ThemisBatchGetRequest) GetIgnoreLock() bool { + if m != nil && m.IgnoreLock != nil { + return *m.IgnoreLock + } + return false +} + +type ThemisBatchGetResponse struct { + Rs []*Client.Result `protobuf:"bytes,1,rep,name=rs" json:"rs,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ThemisBatchGetResponse) Reset() { *m = ThemisBatchGetResponse{} } +func (m *ThemisBatchGetResponse) String() string { return proto.CompactTextString(m) } +func (*ThemisBatchGetResponse) ProtoMessage() {} + +func (m *ThemisBatchGetResponse) GetRs() []*Client.Result { + if m != nil { + return m.Rs + } + return nil +} + +type ThemisPrewrite struct { + Row []byte `protobuf:"bytes,1,req,name=row" json:"row,omitempty"` + Mutations []*Cell.Cell `protobuf:"bytes,2,rep,name=mutations" json:"mutations,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ThemisPrewrite) Reset() { *m = ThemisPrewrite{} } +func (m *ThemisPrewrite) String() string { return proto.CompactTextString(m) } +func (*ThemisPrewrite) ProtoMessage() {} + +func (m *ThemisPrewrite) GetRow() []byte { + if m != nil { + return m.Row + } + return nil +} + +func (m *ThemisPrewrite) GetMutations() []*Cell.Cell { + if m != nil { + return m.Mutations + } + return nil +} + +type ThemisPrewriteRequest struct { + ThemisPrewrite *ThemisPrewrite `protobuf:"bytes,1,req,name=themisPrewrite" json:"themisPrewrite,omitempty"` + PrewriteTs *uint64 `protobuf:"varint,2,req,name=prewriteTs" json:"prewriteTs,omitempty"` + SecondaryLock []byte `protobuf:"bytes,3,req,name=secondaryLock" json:"secondaryLock,omitempty"` + PrimaryLock []byte `protobuf:"bytes,4,req,name=primaryLock" json:"primaryLock,omitempty"` + PrimaryIndex *int32 `protobuf:"varint,5,req,name=primaryIndex" json:"primaryIndex,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ThemisPrewriteRequest) Reset() { *m = ThemisPrewriteRequest{} } +func (m *ThemisPrewriteRequest) String() string { return proto.CompactTextString(m) } +func (*ThemisPrewriteRequest) ProtoMessage() {} + +func (m *ThemisPrewriteRequest) GetThemisPrewrite() *ThemisPrewrite { + if m != nil { + return m.ThemisPrewrite + } + return nil +} + +func (m *ThemisPrewriteRequest) GetPrewriteTs() uint64 { + if m != nil && m.PrewriteTs != nil { + return *m.PrewriteTs + } + return 0 +} + +func (m *ThemisPrewriteRequest) GetSecondaryLock() []byte { + if m != nil { + return m.SecondaryLock + } + return nil +} + +func (m *ThemisPrewriteRequest) GetPrimaryLock() []byte { + if m != nil { + return m.PrimaryLock + } + return nil +} + +func (m *ThemisPrewriteRequest) GetPrimaryIndex() int32 { + if m != nil && m.PrimaryIndex != nil { + return *m.PrimaryIndex + } + return 0 +} + +type ThemisPrewriteResponse struct { + ThemisPrewriteResult *ThemisPrewriteResult `protobuf:"bytes,1,opt,name=themisPrewriteResult" json:"themisPrewriteResult,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ThemisPrewriteResponse) Reset() { *m = ThemisPrewriteResponse{} } +func (m *ThemisPrewriteResponse) String() string { return proto.CompactTextString(m) } +func (*ThemisPrewriteResponse) ProtoMessage() {} + +func (m *ThemisPrewriteResponse) GetThemisPrewriteResult() *ThemisPrewriteResult { + if m != nil { + return m.ThemisPrewriteResult + } + return nil +} + +type ThemisBatchPrewriteSecondaryRequest struct { + ThemisPrewrite []*ThemisPrewrite `protobuf:"bytes,1,rep,name=themisPrewrite" json:"themisPrewrite,omitempty"` + PrewriteTs *uint64 `protobuf:"varint,2,req,name=prewriteTs" json:"prewriteTs,omitempty"` + SecondaryLock []byte `protobuf:"bytes,3,req,name=secondaryLock" json:"secondaryLock,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ThemisBatchPrewriteSecondaryRequest) Reset() { *m = ThemisBatchPrewriteSecondaryRequest{} } +func (m *ThemisBatchPrewriteSecondaryRequest) String() string { return proto.CompactTextString(m) } +func (*ThemisBatchPrewriteSecondaryRequest) ProtoMessage() {} + +func (m *ThemisBatchPrewriteSecondaryRequest) GetThemisPrewrite() []*ThemisPrewrite { + if m != nil { + return m.ThemisPrewrite + } + return nil +} + +func (m *ThemisBatchPrewriteSecondaryRequest) GetPrewriteTs() uint64 { + if m != nil && m.PrewriteTs != nil { + return *m.PrewriteTs + } + return 0 +} + +func (m *ThemisBatchPrewriteSecondaryRequest) GetSecondaryLock() []byte { + if m != nil { + return m.SecondaryLock + } + return nil +} + +type ThemisBatchPrewriteSecondaryResponse struct { + ThemisPrewriteResult []*ThemisPrewriteResult `protobuf:"bytes,1,rep,name=themisPrewriteResult" json:"themisPrewriteResult,omitempty"` + RowsNotInRegion [][]byte `protobuf:"bytes,2,rep,name=rowsNotInRegion" json:"rowsNotInRegion,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ThemisBatchPrewriteSecondaryResponse) Reset() { *m = ThemisBatchPrewriteSecondaryResponse{} } +func (m *ThemisBatchPrewriteSecondaryResponse) String() string { return proto.CompactTextString(m) } +func (*ThemisBatchPrewriteSecondaryResponse) ProtoMessage() {} + +func (m *ThemisBatchPrewriteSecondaryResponse) GetThemisPrewriteResult() []*ThemisPrewriteResult { + if m != nil { + return m.ThemisPrewriteResult + } + return nil +} + +func (m *ThemisBatchPrewriteSecondaryResponse) GetRowsNotInRegion() [][]byte { + if m != nil { + return m.RowsNotInRegion + } + return nil +} + +type ThemisPrewriteResult struct { + NewerWriteTs *int64 `protobuf:"varint,1,req,name=newerWriteTs" json:"newerWriteTs,omitempty"` + ExistLock []byte `protobuf:"bytes,2,req,name=existLock" json:"existLock,omitempty"` + Family []byte `protobuf:"bytes,3,req,name=family" json:"family,omitempty"` + Qualifier []byte `protobuf:"bytes,4,req,name=qualifier" json:"qualifier,omitempty"` + LockExpired *bool `protobuf:"varint,5,req,name=lockExpired" json:"lockExpired,omitempty"` + Row []byte `protobuf:"bytes,6,req,name=row" json:"row,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ThemisPrewriteResult) Reset() { *m = ThemisPrewriteResult{} } +func (m *ThemisPrewriteResult) String() string { return proto.CompactTextString(m) } +func (*ThemisPrewriteResult) ProtoMessage() {} + +func (m *ThemisPrewriteResult) GetNewerWriteTs() int64 { + if m != nil && m.NewerWriteTs != nil { + return *m.NewerWriteTs + } + return 0 +} + +func (m *ThemisPrewriteResult) GetExistLock() []byte { + if m != nil { + return m.ExistLock + } + return nil +} + +func (m *ThemisPrewriteResult) GetFamily() []byte { + if m != nil { + return m.Family + } + return nil +} + +func (m *ThemisPrewriteResult) GetQualifier() []byte { + if m != nil { + return m.Qualifier + } + return nil +} + +func (m *ThemisPrewriteResult) GetLockExpired() bool { + if m != nil && m.LockExpired != nil { + return *m.LockExpired + } + return false +} + +func (m *ThemisPrewriteResult) GetRow() []byte { + if m != nil { + return m.Row + } + return nil +} + +type ThemisCommitRequest struct { + ThemisCommit *ThemisCommit `protobuf:"bytes,1,req,name=themisCommit" json:"themisCommit,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ThemisCommitRequest) Reset() { *m = ThemisCommitRequest{} } +func (m *ThemisCommitRequest) String() string { return proto.CompactTextString(m) } +func (*ThemisCommitRequest) ProtoMessage() {} + +func (m *ThemisCommitRequest) GetThemisCommit() *ThemisCommit { + if m != nil { + return m.ThemisCommit + } + return nil +} + +type ThemisCommitResponse struct { + Result *bool `protobuf:"varint,1,req,name=result" json:"result,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ThemisCommitResponse) Reset() { *m = ThemisCommitResponse{} } +func (m *ThemisCommitResponse) String() string { return proto.CompactTextString(m) } +func (*ThemisCommitResponse) ProtoMessage() {} + +func (m *ThemisCommitResponse) GetResult() bool { + if m != nil && m.Result != nil { + return *m.Result + } + return false +} + +type ThemisBatchCommitSecondaryRequest struct { + ThemisCommit []*ThemisCommit `protobuf:"bytes,1,rep,name=themisCommit" json:"themisCommit,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ThemisBatchCommitSecondaryRequest) Reset() { *m = ThemisBatchCommitSecondaryRequest{} } +func (m *ThemisBatchCommitSecondaryRequest) String() string { return proto.CompactTextString(m) } +func (*ThemisBatchCommitSecondaryRequest) ProtoMessage() {} + +func (m *ThemisBatchCommitSecondaryRequest) GetThemisCommit() []*ThemisCommit { + if m != nil { + return m.ThemisCommit + } + return nil +} + +type ThemisBatchCommitSecondaryResponse struct { + BatchCommitSecondaryResult []*ThemisBatchCommitSecondaryResult `protobuf:"bytes,1,rep,name=batchCommitSecondaryResult" json:"batchCommitSecondaryResult,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ThemisBatchCommitSecondaryResponse) Reset() { *m = ThemisBatchCommitSecondaryResponse{} } +func (m *ThemisBatchCommitSecondaryResponse) String() string { return proto.CompactTextString(m) } +func (*ThemisBatchCommitSecondaryResponse) ProtoMessage() {} + +func (m *ThemisBatchCommitSecondaryResponse) GetBatchCommitSecondaryResult() []*ThemisBatchCommitSecondaryResult { + if m != nil { + return m.BatchCommitSecondaryResult + } + return nil +} + +type ThemisBatchCommitSecondaryResult struct { + Row []byte `protobuf:"bytes,1,req,name=row" json:"row,omitempty"` + Success *bool `protobuf:"varint,2,req,name=success" json:"success,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ThemisBatchCommitSecondaryResult) Reset() { *m = ThemisBatchCommitSecondaryResult{} } +func (m *ThemisBatchCommitSecondaryResult) String() string { return proto.CompactTextString(m) } +func (*ThemisBatchCommitSecondaryResult) ProtoMessage() {} + +func (m *ThemisBatchCommitSecondaryResult) GetRow() []byte { + if m != nil { + return m.Row + } + return nil +} + +func (m *ThemisBatchCommitSecondaryResult) GetSuccess() bool { + if m != nil && m.Success != nil { + return *m.Success + } + return false +} + +type ThemisCommit struct { + Row []byte `protobuf:"bytes,1,req,name=row" json:"row,omitempty"` + Mutations []*Cell.Cell `protobuf:"bytes,2,rep,name=mutations" json:"mutations,omitempty"` + PrewriteTs *uint64 `protobuf:"varint,3,req,name=prewriteTs" json:"prewriteTs,omitempty"` + CommitTs *uint64 `protobuf:"varint,4,req,name=commitTs" json:"commitTs,omitempty"` + PrimaryIndex *int32 `protobuf:"varint,5,req,name=primaryIndex" json:"primaryIndex,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ThemisCommit) Reset() { *m = ThemisCommit{} } +func (m *ThemisCommit) String() string { return proto.CompactTextString(m) } +func (*ThemisCommit) ProtoMessage() {} + +func (m *ThemisCommit) GetRow() []byte { + if m != nil { + return m.Row + } + return nil +} + +func (m *ThemisCommit) GetMutations() []*Cell.Cell { + if m != nil { + return m.Mutations + } + return nil +} + +func (m *ThemisCommit) GetPrewriteTs() uint64 { + if m != nil && m.PrewriteTs != nil { + return *m.PrewriteTs + } + return 0 +} + +func (m *ThemisCommit) GetCommitTs() uint64 { + if m != nil && m.CommitTs != nil { + return *m.CommitTs + } + return 0 +} + +func (m *ThemisCommit) GetPrimaryIndex() int32 { + if m != nil && m.PrimaryIndex != nil { + return *m.PrimaryIndex + } + return 0 +} + +type EraseLockRequest struct { + Row []byte `protobuf:"bytes,1,req,name=row" json:"row,omitempty"` + Family []byte `protobuf:"bytes,2,req,name=family" json:"family,omitempty"` + Qualifier []byte `protobuf:"bytes,3,req,name=qualifier" json:"qualifier,omitempty"` + PrewriteTs *uint64 `protobuf:"varint,4,req,name=prewriteTs" json:"prewriteTs,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *EraseLockRequest) Reset() { *m = EraseLockRequest{} } +func (m *EraseLockRequest) String() string { return proto.CompactTextString(m) } +func (*EraseLockRequest) ProtoMessage() {} + +func (m *EraseLockRequest) GetRow() []byte { + if m != nil { + return m.Row + } + return nil +} + +func (m *EraseLockRequest) GetFamily() []byte { + if m != nil { + return m.Family + } + return nil +} + +func (m *EraseLockRequest) GetQualifier() []byte { + if m != nil { + return m.Qualifier + } + return nil +} + +func (m *EraseLockRequest) GetPrewriteTs() uint64 { + if m != nil && m.PrewriteTs != nil { + return *m.PrewriteTs + } + return 0 +} + +type EraseLockResponse struct { + Lock []byte `protobuf:"bytes,1,opt,name=lock" json:"lock,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *EraseLockResponse) Reset() { *m = EraseLockResponse{} } +func (m *EraseLockResponse) String() string { return proto.CompactTextString(m) } +func (*EraseLockResponse) ProtoMessage() {} + +func (m *EraseLockResponse) GetLock() []byte { + if m != nil { + return m.Lock + } + return nil +} + +type LockExpiredRequest struct { + Timestamp *uint64 `protobuf:"varint,1,req,name=timestamp" json:"timestamp,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *LockExpiredRequest) Reset() { *m = LockExpiredRequest{} } +func (m *LockExpiredRequest) String() string { return proto.CompactTextString(m) } +func (*LockExpiredRequest) ProtoMessage() {} + +func (m *LockExpiredRequest) GetTimestamp() uint64 { + if m != nil && m.Timestamp != nil { + return *m.Timestamp + } + return 0 +} + +type LockExpiredResponse struct { + Expired *bool `protobuf:"varint,1,req,name=expired" json:"expired,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *LockExpiredResponse) Reset() { *m = LockExpiredResponse{} } +func (m *LockExpiredResponse) String() string { return proto.CompactTextString(m) } +func (*LockExpiredResponse) ProtoMessage() {} + +func (m *LockExpiredResponse) GetExpired() bool { + if m != nil && m.Expired != nil { + return *m.Expired + } + return false +} diff --git a/vendor/github.com/pingcap/go-themis/consts.go b/vendor/github.com/pingcap/go-themis/consts.go new file mode 100644 index 000000000..118714df9 --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/consts.go @@ -0,0 +1,20 @@ +package themis + +import "strings" + +var ( + PutFamilyName = []byte("#p") + DelFamilyName = []byte("#d") + LockFamilyName = []byte("L") +) + +const ( + ThemisServiceName string = "ThemisService" +) + +func isWrongRegionErr(err error) bool { + if err != nil { + return strings.Contains(err.Error(), "org.apache.hadoop.hbase.regionserver.WrongRegionException") + } + return false +} diff --git a/vendor/github.com/pingcap/go-themis/lock.go b/vendor/github.com/pingcap/go-themis/lock.go new file mode 100644 index 000000000..96a9f4e11 --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/lock.go @@ -0,0 +1,58 @@ +package themis + +import "github.com/pingcap/go-hbase" + +// LockRole is the role of lock +type LockRole int + +func (l LockRole) String() string { + if l == RolePrimary { + return "primary" + } + return "secondary" +} + +const ( + // RolePrimary means this row is primary + RolePrimary LockRole = iota + // RoleSecondary means this row is secondary + RoleSecondary +) + +type Lock interface { + // SetCoordinate sets lock's coordinate + SetCoordinate(c *hbase.ColumnCoordinate) + // Coordinate returns the lock's coordinate + Coordinate() *hbase.ColumnCoordinate + // Timestamp returns startTs of the transction which owned this lock + Timestamp() uint64 + // SetExpired sets the lock's expired status. + SetExpired(b bool) + // IsExpired returns if lock is expired. + IsExpired() bool + // Type returns the lock's type, Put or Delete + Type() hbase.Type + // Role returns LockRole, primary or secondary + Role() LockRole + // not used now + Context() interface{} + // valid only Role == Primary + Secondaries() []Lock + // Primary returns the primary lock of this lock + Primary() Lock + // Encode encodes the lock to byte slice + Encode() []byte +} + +type LockManager interface { + // CleanLock if clean lock success, first return value is transction's commit + // timestamp, otherwise, the second return value is transction's primary + // lock. + CleanLock(c *hbase.ColumnCoordinate, prewriteTs uint64) (uint64, Lock, error) + // EraseLockAndData removes lock and data. + EraseLockAndData(c *hbase.ColumnCoordinate, prewriteTs uint64) error + // GetCommitTimestamp returns a committed transction's commit timestamp. + GetCommitTimestamp(c *hbase.ColumnCoordinate, prewriteTs uint64) (uint64, error) + // [startTs, endTs] + IsLockExists(c *hbase.ColumnCoordinate, startTs, endTs uint64) (bool, error) +} diff --git a/vendor/github.com/pingcap/go-themis/mutation_cache.go b/vendor/github.com/pingcap/go-themis/mutation_cache.go new file mode 100644 index 000000000..a67f22b2a --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/mutation_cache.go @@ -0,0 +1,233 @@ +package themis + +import ( + "fmt" + "sort" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/go-hbase" + "github.com/pingcap/go-hbase/proto" +) + +type mutationValuePair struct { + typ hbase.Type + value []byte +} + +func (mp *mutationValuePair) String() string { + return fmt.Sprintf("type: %d value: %s", mp.typ, mp.value) +} + +type columnMutation struct { + *hbase.Column + *mutationValuePair +} + +func getEntriesFromDel(p *hbase.Delete) ([]*columnMutation, error) { + errMsg := "must set at least one column for themis delete" + if len(p.FamilyQuals) == 0 { + return nil, errors.New(errMsg) + } + + var ret []*columnMutation + for f, _ := range p.Families { + quilifiers := p.FamilyQuals[f] + if len(quilifiers) == 0 { + return nil, errors.New(errMsg) + } + for q, _ := range quilifiers { + mutation := &columnMutation{ + Column: &hbase.Column{ + Family: []byte(f), + Qual: []byte(q), + }, + mutationValuePair: &mutationValuePair{ + typ: hbase.TypeDeleteColumn, + }, + } + ret = append(ret, mutation) + } + } + return ret, nil +} + +func getEntriesFromPut(p *hbase.Put) []*columnMutation { + var ret []*columnMutation + for i, f := range p.Families { + qualifiers := p.Qualifiers[i] + for j, q := range qualifiers { + mutation := &columnMutation{ + Column: &hbase.Column{ + Family: f, + Qual: q, + }, + mutationValuePair: &mutationValuePair{ + typ: hbase.TypePut, + value: p.Values[i][j], + }, + } + ret = append(ret, mutation) + } + } + return ret +} + +func (cm *columnMutation) toCell() *proto.Cell { + ret := &proto.Cell{ + Family: cm.Family, + Qualifier: cm.Qual, + Value: cm.value, + } + if cm.typ == hbase.TypePut { // put + ret.CellType = proto.CellType_PUT.Enum() + } else if cm.typ == hbase.TypeMinimum { // onlyLock + ret.CellType = proto.CellType_MINIMUM.Enum() + } else { // delete, themis delete API only support delete column + ret.CellType = proto.CellType_DELETE_COLUMN.Enum() + } + return ret +} + +type rowMutation struct { + tbl []byte + row []byte + // mutations := { 'cf:col' => mutationValuePair } + mutations map[string]*mutationValuePair +} + +func (r *rowMutation) getColumns() []hbase.Column { + var ret []hbase.Column + for k, _ := range r.mutations { + c := &hbase.Column{} + // TODO: handle error, now just ignore + if err := c.ParseFromString(k); err != nil { + log.Warnf("parse from string error, column: %s, mutation: %s, error: %v", c, k, err) + } + ret = append(ret, *c) + } + return ret +} + +func (r *rowMutation) getSize() int { + return len(r.mutations) +} + +func (r *rowMutation) getType(c hbase.Column) hbase.Type { + p, ok := r.mutations[c.String()] + if !ok { + return hbase.TypeMinimum + } + return p.typ +} + +func newRowMutation(tbl, row []byte) *rowMutation { + return &rowMutation{ + tbl: tbl, + row: row, + mutations: map[string]*mutationValuePair{}, + } +} + +func (r *rowMutation) addMutation(c *hbase.Column, typ hbase.Type, val []byte, onlyLock bool) { + // 3 scene: put, delete, onlyLock + // if it is onlyLock scene, then has not data modify, when has contained the qualifier, can't replace exist value, + // becuase put or delete operation has add mutation + if onlyLock && r.mutations[c.String()] != nil { + return + } + + r.mutations[c.String()] = &mutationValuePair{ + typ: typ, + value: val, + } +} + +func (r *rowMutation) mutationList(withValue bool) []*columnMutation { + var ret []*columnMutation + var keys []string + for k, _ := range r.mutations { + keys = append(keys, k) + } + sort.Strings(keys) + for _, k := range keys { + v := &mutationValuePair{ + typ: r.mutations[k].typ, + } + if withValue { + v.value = r.mutations[k].value + } + c := &hbase.Column{} + // TODO: handle error, now just ignore + if err := c.ParseFromString(k); err != nil { + log.Warnf("parse from string error, column: %s, mutation: %s, error: %v", c, k, err) + } + ret = append(ret, &columnMutation{ + Column: c, + mutationValuePair: v, + }) + } + return ret +} + +type columnMutationCache struct { + // mutations => {table => { rowKey => row mutations } } + mutations map[string]map[string]*rowMutation +} + +func newColumnMutationCache() *columnMutationCache { + return &columnMutationCache{ + mutations: map[string]map[string]*rowMutation{}, + } +} + +func (c *columnMutationCache) addMutation(tbl []byte, row []byte, col *hbase.Column, t hbase.Type, v []byte, onlyLock bool) { + tblRowMutations, ok := c.mutations[string(tbl)] + if !ok { + // create table mutation map + tblRowMutations = map[string]*rowMutation{} + c.mutations[string(tbl)] = tblRowMutations + } + + rowMutations, ok := tblRowMutations[string(row)] + if !ok { + // create row mutation map + rowMutations = newRowMutation(tbl, row) + tblRowMutations[string(row)] = rowMutations + } + rowMutations.addMutation(col, t, v, onlyLock) +} + +func (c *columnMutationCache) getMutation(cc *hbase.ColumnCoordinate) *mutationValuePair { + t, ok := c.mutations[string(cc.Table)] + if !ok { + return nil + } + rowMutation, ok := t[string(cc.Row)] + if !ok { + return nil + } + p, ok := rowMutation.mutations[cc.GetColumn().String()] + if !ok { + return nil + } + return p +} + +func (c *columnMutationCache) getRowCount() int { + ret := 0 + for _, v := range c.mutations { + ret += len(v) + } + return ret +} + +func (c *columnMutationCache) getMutationCount() int { + ret := 0 + for _, v := range c.mutations { + for _, vv := range v { + ret += len(vv.mutationList(false)) + } + } + return ret +} diff --git a/vendor/github.com/pingcap/go-themis/oracle/oracle.go b/vendor/github.com/pingcap/go-themis/oracle/oracle.go new file mode 100644 index 000000000..204d4fd42 --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/oracle/oracle.go @@ -0,0 +1,6 @@ +package oracle + +type Oracle interface { + GetTimestamp() (uint64, error) + IsExpired(lockTimestamp uint64, TTL uint64) bool +} diff --git a/vendor/github.com/pingcap/go-themis/oracle/oracles/local.go b/vendor/github.com/pingcap/go-themis/oracle/oracles/local.go new file mode 100644 index 000000000..437608731 --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/oracle/oracles/local.go @@ -0,0 +1,42 @@ +package oracles + +import ( + "sync" + "time" + + "github.com/pingcap/go-themis/oracle" +) + +const epochShiftBits = 18 + +var _ oracle.Oracle = &localOracle{} + +type localOracle struct { + mu sync.Mutex + lastTimeStampTs int64 + n int64 +} + +// NewLocalOracle creates an Oracle that use local time as data source. +func NewLocalOracle() oracle.Oracle { + return &localOracle{} +} + +func (l *localOracle) IsExpired(lockTs uint64, TTL uint64) bool { + beginMs := lockTs >> epochShiftBits + return uint64(time.Now().UnixNano()/int64(time.Millisecond)) >= (beginMs + TTL) +} + +func (l *localOracle) GetTimestamp() (uint64, error) { + l.mu.Lock() + defer l.mu.Unlock() + ts := (time.Now().UnixNano() / int64(time.Millisecond)) << epochShiftBits + if l.lastTimeStampTs == ts { + l.n++ + return uint64(ts + l.n), nil + } else { + l.lastTimeStampTs = ts + l.n = 0 + } + return uint64(ts), nil +} diff --git a/vendor/github.com/pingcap/go-themis/oracle/oracles/remote.go b/vendor/github.com/pingcap/go-themis/oracle/oracles/remote.go new file mode 100644 index 000000000..ea12a8b35 --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/oracle/oracles/remote.go @@ -0,0 +1,48 @@ +package oracles + +import ( + "time" + + "github.com/juju/errors" + "github.com/ngaut/tso/client" + "github.com/pingcap/go-themis/oracle" +) + +const maxRetryCnt = 3 + +var _ oracle.Oracle = &remoteOracle{} + +// remoteOracle is an oracle that use a remote data source. +type remoteOracle struct { + c *client.Client +} + +// NewRemoteOracle creates an oracle that use a remote data source. +// Refer https://github.com/ngaut/tso for more details. +func NewRemoteOracle(zks, path string) oracle.Oracle { + return &remoteOracle{ + c: client.NewClient(&client.Conf{ + ZKAddr: zks, + RootPath: path, + }), + } +} + +func (t *remoteOracle) IsExpired(lockTs uint64, TTL uint64) bool { + beginMs := lockTs >> epochShiftBits + // TODO records the local wall time when getting beginMs from TSO + return uint64(time.Now().UnixNano()/int64(time.Millisecond)) >= (beginMs + TTL) +} + +// GetTimestamp gets timestamp from remote data source. +func (t *remoteOracle) GetTimestamp() (uint64, error) { + var err error + for i := 0; i < maxRetryCnt; i++ { + ts, e := t.c.GoGetTimestamp().GetTS() + if e == nil { + return uint64((ts.Physical << epochShiftBits) + ts.Logical), nil + } + err = errors.Trace(e) + } + return 0, err +} diff --git a/vendor/github.com/pingcap/go-themis/themis_lock.go b/vendor/github.com/pingcap/go-themis/themis_lock.go new file mode 100644 index 000000000..06dbc5427 --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/themis_lock.go @@ -0,0 +1,133 @@ +package themis + +import ( + "bytes" + "encoding/binary" + "io" + + "github.com/juju/errors" + "github.com/pingcap/go-hbase" + "github.com/pingcap/go-hbase/iohelper" +) + +var ( + _ Lock = (*themisPrimaryLock)(nil) + _ Lock = (*themisSecondaryLock)(nil) +) + +type themisLock struct { + // lock coordinate, table, row, cf, q + coordinate *hbase.ColumnCoordinate + // lock type: put/delete/minimal(lock only) + typ hbase.Type + // prewrite ts + ts uint64 + // not used, for alignment + wallTs uint64 + // not used, for alignment + clientAddr string + expired bool +} + +func (l *themisLock) Timestamp() uint64 { + return l.ts +} + +func (l *themisLock) IsExpired() bool { + return l.expired +} + +func (l *themisLock) SetExpired(b bool) { + l.expired = b +} + +func (l *themisLock) SetCoordinate(c *hbase.ColumnCoordinate) { + l.coordinate = c +} + +func (l *themisLock) Coordinate() *hbase.ColumnCoordinate { + return l.coordinate +} + +func (l *themisLock) Context() interface{} { + return nil +} + +func (l *themisLock) Type() hbase.Type { + return l.typ +} + +func (l *themisLock) write(w io.Writer) { + binary.Write(w, binary.BigEndian, byte(l.typ)) + binary.Write(w, binary.BigEndian, int64(l.ts)) + // write client addr + iohelper.WriteVarBytes(w, []byte(l.clientAddr)) + binary.Write(w, binary.BigEndian, int64(l.wallTs)) +} + +func (l *themisLock) parse(r iohelper.ByteMultiReader) error { + // read type + var typ uint8 + err := binary.Read(r, binary.BigEndian, &typ) + if err != nil { + return errors.Trace(err) + } + l.typ = hbase.Type(typ) + + // read ts + var ts int64 + err = binary.Read(r, binary.BigEndian, &ts) + if err != nil { + return errors.Trace(err) + } + l.ts = uint64(ts) + + // read client addr + sz, err := binary.ReadUvarint(r) + if err != nil { + return errors.Trace(err) + } + addr := make([]byte, sz) + r.Read(addr) + l.clientAddr = string(addr) + + // read wall time + var wallTs int64 + err = binary.Read(r, binary.BigEndian, &wallTs) + if err != nil { + return errors.Trace(err) + } + l.wallTs = uint64(wallTs) + return nil +} + +func parseLockFromBytes(b []byte) (Lock, error) { + buf := bytes.NewBuffer(b) + var isPrimary uint8 + err := binary.Read(buf, binary.BigEndian, &isPrimary) + if err != nil { + return nil, errors.Trace(err) + } + var ret Lock + if isPrimary == 1 { + l := newThemisPrimaryLock() + err = l.parse(buf) + ret = l + } else { + l := newThemisSecondaryLock() + err = l.parse(buf) + ret = l + } + if err != nil { + return nil, errors.Trace(err) + } + return ret, nil +} + +func isLockResult(r *hbase.ResultRow) bool { + return len(r.SortedColumns) > 0 && isLockColumn(r.SortedColumns[0].Column) +} + +func isLockColumn(c hbase.Column) bool { + return bytes.Compare(c.Family, LockFamilyName) == 0 +} diff --git a/vendor/github.com/pingcap/go-themis/themis_lock_manager.go b/vendor/github.com/pingcap/go-themis/themis_lock_manager.go new file mode 100644 index 000000000..06dbb2b5f --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/themis_lock_manager.go @@ -0,0 +1,147 @@ +package themis + +import ( + "bytes" + "encoding/binary" + "math" + "strings" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/go-hbase" +) + +var _ LockManager = (*themisLockManager)(nil) + +type themisLockManager struct { + rpc *themisRPC + hbaseClient hbase.HBaseClient +} + +func newThemisLockManager(rpc *themisRPC, hbaseCli hbase.HBaseClient) LockManager { + return &themisLockManager{ + rpc: rpc, + hbaseClient: hbaseCli, + } +} + +func getDataColFromMetaCol(lockOrWriteCol hbase.Column) hbase.Column { + // get data column from lock column + // key is like => L:family#qual, #p:family#qual + parts := strings.Split(string(lockOrWriteCol.Qual), "#") + if len(parts) != 2 { + return lockOrWriteCol + } + c := hbase.Column{ + Family: []byte(parts[0]), + Qual: []byte(parts[1]), + } + return c +} + +func getLocksFromResults(tbl []byte, lockKvs []*hbase.Kv, client *themisRPC) ([]Lock, error) { + var locks []Lock + for _, kv := range lockKvs { + col := &hbase.ColumnCoordinate{ + Table: tbl, + Row: kv.Row, + Column: hbase.Column{ + Family: kv.Family, + Qual: kv.Qual, + }, + } + if !isLockColumn(col.Column) { + return nil, errors.New("invalid lock") + } + l, err := parseLockFromBytes(kv.Value) + if err != nil { + return nil, errors.Trace(err) + } + cc := &hbase.ColumnCoordinate{ + Table: tbl, + Row: kv.Row, + Column: getDataColFromMetaCol(col.Column), + } + l.SetCoordinate(cc) + client.checkAndSetLockIsExpired(l) + locks = append(locks, l) + } + return locks, nil +} + +func (m *themisLockManager) IsLockExists(cc *hbase.ColumnCoordinate, startTs, endTs uint64) (bool, error) { + get := hbase.NewGet(cc.Row) + get.AddTimeRange(startTs, endTs+1) + get.AddStringColumn(string(LockFamilyName), string(cc.Family)+"#"+string(cc.Qual)) + // check if lock exists + rs, err := m.hbaseClient.Get(string(cc.Table), get) + if err != nil { + return false, errors.Trace(err) + } + // primary lock has been released + if rs == nil { + return false, nil + } + return true, nil +} + +func (m *themisLockManager) GetCommitTimestamp(cc *hbase.ColumnCoordinate, prewriteTs uint64) (uint64, error) { + g := hbase.NewGet(cc.Row) + // add put write column + qual := string(cc.Family) + "#" + string(cc.Qual) + g.AddStringColumn("#p", qual) + // add del write column + g.AddStringColumn("#d", qual) + // time range => [ours startTs, +Inf) + g.AddTimeRange(prewriteTs, math.MaxInt64) + g.SetMaxVersion(math.MaxInt32) + r, err := m.hbaseClient.Get(string(cc.Table), g) + if err != nil { + return 0, errors.Trace(err) + } + // may delete by other client + if r == nil { + return 0, nil + } + for _, kv := range r.SortedColumns { + for commitTs, val := range kv.Values { + var ts uint64 + binary.Read(bytes.NewBuffer(val), binary.BigEndian, &ts) + if ts == prewriteTs { + // get this commit's commitTs + return commitTs, nil + } + } + } + // no such transction + return 0, nil +} + +func (m *themisLockManager) CleanLock(cc *hbase.ColumnCoordinate, prewriteTs uint64) (uint64, Lock, error) { + l, err := m.rpc.getLockAndErase(cc, prewriteTs) + if err != nil { + return 0, nil, errors.Trace(err) + } + pl, _ := l.(*themisPrimaryLock) + // if primary lock is nil, means someothers have already committed + if pl == nil { + commitTs, err := m.GetCommitTimestamp(cc, prewriteTs) + if err != nil { + return 0, nil, errors.Trace(err) + } + return commitTs, nil, nil + } + return 0, pl, nil +} + +func (m *themisLockManager) EraseLockAndData(cc *hbase.ColumnCoordinate, prewriteTs uint64) error { + log.Debugf("erase row=%q txn=%d", cc.Row, prewriteTs) + d := hbase.NewDelete(cc.Row) + d.AddColumnWithTimestamp(LockFamilyName, []byte(string(cc.Family)+"#"+string(cc.Qual)), prewriteTs) + d.AddColumnWithTimestamp(cc.Family, cc.Qual, prewriteTs) + ok, err := m.hbaseClient.Delete(string(cc.Table), d) + if !ok { + log.Error(err) + } + return errors.Trace(err) +} diff --git a/vendor/github.com/pingcap/go-themis/themis_primary_lock.go b/vendor/github.com/pingcap/go-themis/themis_primary_lock.go new file mode 100644 index 000000000..88ad1b0e3 --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/themis_primary_lock.go @@ -0,0 +1,112 @@ +package themis + +import ( + "bytes" + "encoding/binary" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/go-hbase" + "github.com/pingcap/go-hbase/iohelper" +) + +type themisPrimaryLock struct { + *themisLock + // {coordinate => type} + secondaries map[string]hbase.Type +} + +func newThemisPrimaryLock() *themisPrimaryLock { + return &themisPrimaryLock{ + themisLock: &themisLock{ + clientAddr: "null", + }, + secondaries: map[string]hbase.Type{}, + } +} + +func (l *themisPrimaryLock) Primary() Lock { + return l +} + +func (l *themisPrimaryLock) Secondaries() []Lock { + var slocks []Lock + for k, v := range l.secondaries { + c := &hbase.ColumnCoordinate{} + // TODO: handle error, now just ignore + if err := c.ParseFromString(k); err != nil { + log.Warnf("parse from string error, column coordinate: %s, secondary: %s, error: %v", c, k, err) + continue + } + slock := newThemisSecondaryLock() + slock.primaryCoordinate = l.coordinate + slock.coordinate = c + slock.ts = l.ts + slock.typ = v + slocks = append(slocks, slock) + } + return slocks +} + +func (l *themisPrimaryLock) Encode() []byte { + buf := bytes.NewBuffer(nil) + // set is primary + binary.Write(buf, binary.BigEndian, uint8(1)) + l.themisLock.write(buf) + + // write secondaries + binary.Write(buf, binary.BigEndian, int32(len(l.secondaries))) + for k, v := range l.secondaries { + c := &hbase.ColumnCoordinate{} + // TODO: handle error, now just log + if err := c.ParseFromString(k); err != nil { + log.Warnf("parse from string error, column coordinate: %s, secondary: %s, error: %v", c, k, err) + } + // TODO: handle error, now just log + if err := c.Write(buf); err != nil { + log.Warnf("write error, column coordinate: %s, buf: %s, error: %v", c, buf, err) + } + buf.WriteByte(uint8(v)) + } + return buf.Bytes() +} + +func (l *themisPrimaryLock) IsExpired() bool { + return l.themisLock.expired +} + +func (l *themisPrimaryLock) getSecondaryColumnType(c *hbase.ColumnCoordinate) hbase.Type { + v, ok := l.secondaries[c.String()] + if !ok { + return hbase.TypeMinimum + } + return v +} + +func (l *themisPrimaryLock) Role() LockRole { + return RolePrimary +} + +func (l *themisPrimaryLock) addSecondary(col *hbase.ColumnCoordinate, t hbase.Type) { + l.secondaries[col.String()] = t +} + +func (l *themisPrimaryLock) parse(buf iohelper.ByteMultiReader) error { + l.themisLock.parse(buf) + var sz int32 + err := binary.Read(buf, binary.BigEndian, &sz) + if err != nil { + return errors.Trace(err) + } + for i := 0; i < int(sz); i++ { + c := &hbase.ColumnCoordinate{} + c.ParseField(buf) + b, err := buf.ReadByte() + if err != nil { + return errors.Trace(err) + } + t := hbase.Type(b) + l.addSecondary(c, t) + } + return nil +} diff --git a/vendor/github.com/pingcap/go-themis/themis_rpc.go b/vendor/github.com/pingcap/go-themis/themis_rpc.go new file mode 100644 index 000000000..caba6ed73 --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/themis_rpc.go @@ -0,0 +1,368 @@ +package themis + +import ( + "fmt" + "runtime/debug" + + pb "github.com/golang/protobuf/proto" + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/go-hbase" + "github.com/pingcap/go-hbase/proto" + "github.com/pingcap/go-themis/oracle" +) + +func newThemisRPC(client hbase.HBaseClient, oracle oracle.Oracle, conf TxnConfig) *themisRPC { + return &themisRPC{ + client: client, + conf: conf, + oracle: oracle, + } +} + +type themisRPC struct { + client hbase.HBaseClient + conf TxnConfig + oracle oracle.Oracle +} + +func (rpc *themisRPC) call(methodName string, tbl, row []byte, req pb.Message, resp pb.Message) error { + param, _ := pb.Marshal(req) + + call := &hbase.CoprocessorServiceCall{ + Row: row, + ServiceName: ThemisServiceName, + MethodName: methodName, + RequestParam: param, + } + r, err := rpc.client.ServiceCall(string(tbl), call) + if err != nil { + return errors.Trace(err) + } + err = pb.Unmarshal(r.GetValue().GetValue(), resp) + if err != nil { + return errors.Trace(err) + } + return nil +} + +func (rpc *themisRPC) checkAndSetLockIsExpired(lock Lock) (bool, error) { + expired := rpc.oracle.IsExpired(lock.Timestamp(), rpc.conf.TTLInMs) + lock.SetExpired(expired) + return expired, nil +} + +func (rpc *themisRPC) themisGet(tbl []byte, g *hbase.Get, startTs uint64, ignoreLock bool) (*hbase.ResultRow, error) { + req := &ThemisGetRequest{ + Get: g.ToProto().(*proto.Get), + StartTs: pb.Uint64(startTs), + IgnoreLock: pb.Bool(ignoreLock), + } + var resp proto.Result + err := rpc.call("themisGet", tbl, g.Row, req, &resp) + if err != nil { + return nil, errors.Trace(err) + } + return hbase.NewResultRow(&resp), nil +} + +func (rpc *themisRPC) themisBatchGet(tbl []byte, gets []*hbase.Get, startTs uint64, ignoreLock bool) ([]*hbase.ResultRow, error) { + var protoGets []*proto.Get + for _, g := range gets { + protoGets = append(protoGets, g.ToProto().(*proto.Get)) + } + req := &ThemisBatchGetRequest{ + Gets: protoGets, + StartTs: pb.Uint64(startTs), + IgnoreLock: pb.Bool(ignoreLock), + } + var resp ThemisBatchGetResponse + err := rpc.call("themisBatchGet", tbl, gets[0].Row, req, &resp) + if err != nil { + return nil, errors.Trace(err) + } + var results []*hbase.ResultRow + for _, rs := range resp.GetRs() { + results = append(results, hbase.NewResultRow(rs)) + } + return results, nil +} + +func (rpc *themisRPC) prewriteRow(tbl []byte, row []byte, mutations []*columnMutation, prewriteTs uint64, primaryLockBytes []byte, secondaryLockBytes []byte, primaryOffset int) (Lock, error) { + var cells []*proto.Cell + request := &ThemisPrewriteRequest{ + PrewriteTs: pb.Uint64(prewriteTs), + PrimaryLock: primaryLockBytes, + SecondaryLock: secondaryLockBytes, + PrimaryIndex: pb.Int(primaryOffset), + } + request.ThemisPrewrite = &ThemisPrewrite{ + Row: row, + } + if primaryLockBytes == nil { + request.PrimaryLock = []byte("") + } + if secondaryLockBytes == nil { + request.SecondaryLock = []byte("") + } + for _, m := range mutations { + cells = append(cells, m.toCell()) + } + request.ThemisPrewrite.Mutations = cells + + var res ThemisPrewriteResponse + err := rpc.call("prewriteRow", tbl, row, request, &res) + if err != nil { + return nil, errors.Trace(err) + } + b := res.ThemisPrewriteResult + if b == nil { + // if lock is empty, means we got the lock, otherwise some one else had + // locked this row, and the lock should return in rpc result + return nil, nil + } + // Oops, someone else have already locked this row. + + commitTs := b.GetNewerWriteTs() + if commitTs != 0 { + log.Errorf("write conflict, encounter write with larger timestamp than prewriteTs=%d, commitTs=%d, row=%s", prewriteTs, commitTs, string(row)) + return nil, ErrRetryable + } + + l, err := parseLockFromBytes(b.ExistLock) + if err != nil { + return nil, errors.Trace(err) + } + + col := &hbase.ColumnCoordinate{ + Table: tbl, + Row: row, + Column: hbase.Column{ + Family: b.Family, + Qual: b.Qualifier, + }, + } + l.SetCoordinate(col) + return l, nil +} + +func (rpc *themisRPC) isLockExpired(tbl, row []byte, ts uint64) (bool, error) { + req := &LockExpiredRequest{ + Timestamp: pb.Uint64(ts), + } + var res LockExpiredResponse + if row == nil { + debug.PrintStack() + } + err := rpc.call("isLockExpired", tbl, row, req, &res) + if err != nil { + return false, errors.Trace(err) + } + return res.GetExpired(), nil +} + +func (rpc *themisRPC) getLockAndErase(cc *hbase.ColumnCoordinate, prewriteTs uint64) (Lock, error) { + req := &EraseLockRequest{ + Row: cc.Row, + Family: cc.Column.Family, + Qualifier: cc.Column.Qual, + PrewriteTs: pb.Uint64(prewriteTs), + } + var res EraseLockResponse + err := rpc.call("getLockAndErase", cc.Table, cc.Row, req, &res) + if err != nil { + return nil, errors.Trace(err) + } + b := res.GetLock() + if len(b) == 0 { + return nil, nil + } + return parseLockFromBytes(b) +} + +func (rpc *themisRPC) commitRow(tbl, row []byte, mutations []*columnMutation, + prewriteTs, commitTs uint64, primaryOffset int) error { + req := &ThemisCommitRequest{} + req.ThemisCommit = &ThemisCommit{ + Row: row, + PrewriteTs: pb.Uint64(prewriteTs), + CommitTs: pb.Uint64(commitTs), + PrimaryIndex: pb.Int(primaryOffset), + } + + for _, m := range mutations { + req.ThemisCommit.Mutations = append(req.ThemisCommit.Mutations, m.toCell()) + } + var res ThemisCommitResponse + err := rpc.call("commitRow", tbl, row, req, &res) + if err != nil { + return errors.Trace(err) + } + ok := res.GetResult() + if !ok { + if primaryOffset == -1 { + return errors.Errorf("commit secondary failed, tbl: %s row: %q ts: %d", tbl, row, commitTs) + } + return errors.Errorf("commit primary failed, tbl: %s row: %q ts: %d", tbl, row, commitTs) + } + return nil +} + +func (rpc *themisRPC) batchCommitSecondaryRows(tbl []byte, rowMs map[string]*rowMutation, prewriteTs, commitTs uint64) error { + req := &ThemisBatchCommitSecondaryRequest{} + + i := 0 + var lastRow []byte + req.ThemisCommit = make([]*ThemisCommit, len(rowMs)) + for row, rowM := range rowMs { + var cells []*proto.Cell + for col, m := range rowM.mutations { + cells = append(cells, toCellFromRowM(col, m)) + } + + req.ThemisCommit[i] = &ThemisCommit{ + Row: []byte(row), + Mutations: cells, + PrewriteTs: pb.Uint64(prewriteTs), + CommitTs: pb.Uint64(commitTs), + PrimaryIndex: pb.Int(-1), + } + i++ + lastRow = []byte(row) + } + + var res ThemisBatchCommitSecondaryResponse + err := rpc.call("batchCommitSecondaryRows", tbl, lastRow, req, &res) + if err != nil { + return errors.Trace(err) + } + log.Info("call batch commit secondary rows", len(req.ThemisCommit)) + + cResult := res.BatchCommitSecondaryResult + if cResult != nil && len(cResult) > 0 { + errorInfo := "commit failed, tbl:" + string(tbl) + for _, r := range cResult { + errorInfo += (" row:" + string(r.Row)) + } + return errors.New(fmt.Sprintf("%s, commitTs:%d", errorInfo, commitTs)) + } + return nil +} + +func (rpc *themisRPC) commitSecondaryRow(tbl, row []byte, mutations []*columnMutation, + prewriteTs, commitTs uint64) error { + return rpc.commitRow(tbl, row, mutations, prewriteTs, commitTs, -1) +} + +func (rpc *themisRPC) prewriteSecondaryRow(tbl, row []byte, + mutations []*columnMutation, prewriteTs uint64, + secondaryLockBytes []byte) (Lock, error) { + return rpc.prewriteRow(tbl, row, mutations, prewriteTs, nil, secondaryLockBytes, -1) +} + +func (rpc *themisRPC) batchPrewriteSecondaryRows(tbl []byte, rowMs map[string]*rowMutation, prewriteTs uint64, secondaryLockBytes []byte) (map[string]Lock, error) { + request := &ThemisBatchPrewriteSecondaryRequest{ + PrewriteTs: pb.Uint64(prewriteTs), + SecondaryLock: secondaryLockBytes, + } + request.ThemisPrewrite = make([]*ThemisPrewrite, len(rowMs)) + + if secondaryLockBytes == nil { + secondaryLockBytes = []byte("") + } + i := 0 + var lastRow []byte + for row, rowM := range rowMs { + var cells []*proto.Cell + for col, m := range rowM.mutations { + cells = append(cells, toCellFromRowM(col, m)) + } + request.ThemisPrewrite[i] = &ThemisPrewrite{ + Row: []byte(row), + Mutations: cells, + } + i++ + lastRow = []byte(row) + } + + var res ThemisBatchPrewriteSecondaryResponse + err := rpc.call("batchPrewriteSecondaryRows", tbl, lastRow, request, &res) + if err != nil { + return nil, errors.Trace(err) + } + + //Perhaps, part row has not in a region, sample : when region split, then need try + lockMap := make(map[string]Lock) + if res.RowsNotInRegion != nil && len(res.RowsNotInRegion) > 0 { + for _, r := range res.RowsNotInRegion { + tl, err := rpc.prewriteSecondaryRow(tbl, r, rowMs[string(r)].mutationList(true), prewriteTs, secondaryLockBytes) + if err != nil { + return nil, errors.Trace(err) + } + + if tl != nil { + lockMap[string(r)] = tl + } + } + } + + b := res.ThemisPrewriteResult + if b != nil && len(b) > 0 { + for _, pResult := range b { + lock, err := judgePerwriteResultRow(pResult, tbl, prewriteTs, pResult.Row) + if err != nil { + return nil, errors.Trace(err) + } + + if lock != nil { + lockMap[string(pResult.Row)] = lock + } + } + } + + return lockMap, nil +} + +func judgePerwriteResultRow(pResult *ThemisPrewriteResult, tbl []byte, prewriteTs uint64, row []byte) (Lock, error) { + // Oops, someone else have already locked this row. + newerTs := pResult.GetNewerWriteTs() + if newerTs != 0 { + return nil, ErrRetryable + } + + l, err := parseLockFromBytes(pResult.ExistLock) + if err != nil { + return nil, errors.Trace(err) + } + col := &hbase.ColumnCoordinate{ + Table: tbl, + Row: row, + Column: hbase.Column{ + Family: pResult.Family, + Qual: pResult.Qualifier, + }, + } + l.SetCoordinate(col) + return l, nil +} + +func toCellFromRowM(col string, cvPair *mutationValuePair) *proto.Cell { + c := &hbase.Column{} + // TODO: handle error, now just log + if err := c.ParseFromString(col); err != nil { + log.Warnf("parse from string error, column: %s, col: %s, error: %v", c, col, err) + } + ret := &proto.Cell{ + Family: c.Family, + Qualifier: c.Qual, + Value: cvPair.value, + } + if cvPair.typ == hbase.TypePut { // put + ret.CellType = proto.CellType_PUT.Enum() + } else if cvPair.typ == hbase.TypeMinimum { // onlyLock + ret.CellType = proto.CellType_MINIMUM.Enum() + } else { // delete, themis delete API only support delete column + ret.CellType = proto.CellType_DELETE_COLUMN.Enum() + } + return ret +} diff --git a/vendor/github.com/pingcap/go-themis/themis_scan.go b/vendor/github.com/pingcap/go-themis/themis_scan.go new file mode 100644 index 000000000..2b68c805c --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/themis_scan.go @@ -0,0 +1,85 @@ +package themis + +import ( + "bytes" + "encoding/binary" + + "github.com/ngaut/log" + "github.com/pingcap/go-hbase" +) + +type ThemisScanner struct { + scan *hbase.Scan + txn *themisTxn + tbl []byte +} + +func newThemisScanner(tbl []byte, txn *themisTxn, batchSize int, c hbase.HBaseClient) *ThemisScanner { + s := hbase.NewScan(tbl, batchSize, c) + // add start ts + b := bytes.NewBuffer(nil) + binary.Write(b, binary.BigEndian, txn.startTs) + s.AddAttr("_themisTransationStartTs_", b.Bytes()) + return &ThemisScanner{ + scan: s, + txn: txn, + tbl: tbl, + } +} + +func (s *ThemisScanner) setStartRow(start []byte) { + s.scan.StartRow = start +} + +func (s *ThemisScanner) setStopRow(stop []byte) { + s.scan.StopRow = stop +} + +func (s *ThemisScanner) SetTimeRange(tsRangeFrom uint64, tsRangeTo uint64) { + s.scan.TsRangeFrom = tsRangeFrom + s.scan.TsRangeTo = tsRangeTo +} + +func (s *ThemisScanner) SetMaxVersions(maxVersions uint32) { + s.scan.MaxVersions = maxVersions +} + +func (s *ThemisScanner) createGetFromScan(row []byte) *hbase.Get { + return s.scan.CreateGetFromScan(row) +} + +func (s *ThemisScanner) Next() *hbase.ResultRow { + r := s.scan.Next() + if r == nil { + return nil + } + // if we encounter conflict locks, we need to clean lock for this row and read again + if isLockResult(r) { + g := s.createGetFromScan(r.Row) + r, err := s.txn.tryToCleanLockAndGetAgain(s.tbl, g, r.SortedColumns) + if err != nil { + log.Error(err) + return nil + } + // empty result indicates the current row has been erased, we should get next row + if r == nil { + return s.Next() + } else { + return r + } + } + return r +} + +func (s *ThemisScanner) Closed() bool { + return s.scan.Closed() +} + +func (s *ThemisScanner) Close() { + if !s.scan.Closed() { + // TODO: handle error, now just log + if err := s.scan.Close(); err != nil { + log.Warnf("scanner close error, scan: %s, error: %v", s.scan, err) + } + } +} diff --git a/vendor/github.com/pingcap/go-themis/themis_secondary_lock.go b/vendor/github.com/pingcap/go-themis/themis_secondary_lock.go new file mode 100644 index 000000000..dc226cef5 --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/themis_secondary_lock.go @@ -0,0 +1,64 @@ +package themis + +import ( + "bytes" + "encoding/binary" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/go-hbase" + "github.com/pingcap/go-hbase/iohelper" +) + +type themisSecondaryLock struct { + *themisLock + primaryCoordinate *hbase.ColumnCoordinate +} + +func newThemisSecondaryLock() *themisSecondaryLock { + return &themisSecondaryLock{ + themisLock: &themisLock{ + clientAddr: "null", + }, + primaryCoordinate: &hbase.ColumnCoordinate{}, + } +} + +func (l *themisSecondaryLock) Primary() Lock { + pl := newThemisPrimaryLock() + pl.coordinate = l.primaryCoordinate + pl.ts = l.ts + pl.clientAddr = l.clientAddr + pl.addSecondary(l.coordinate, l.typ) + return pl +} + +func (l *themisSecondaryLock) Secondaries() []Lock { + return nil +} + +func (l *themisSecondaryLock) Role() LockRole { + return RoleSecondary +} + +func (l *themisSecondaryLock) Encode() []byte { + buf := bytes.NewBuffer(nil) + binary.Write(buf, binary.BigEndian, uint8(0)) + l.themisLock.write(buf) + // TODO: handle error, now just log + if err := l.primaryCoordinate.Write(buf); err != nil { + log.Warnf("write error, primary coordinate: %s, buf: %s, err: %v", l, buf, err) + } + return buf.Bytes() +} + +func (l *themisSecondaryLock) parse(r iohelper.ByteMultiReader) error { + l.themisLock.parse(r) + primary := &hbase.ColumnCoordinate{} + err := primary.ParseField(r) + if err != nil { + return errors.Trace(err) + } + l.primaryCoordinate = primary + return nil +} diff --git a/vendor/github.com/pingcap/go-themis/themis_txn.go b/vendor/github.com/pingcap/go-themis/themis_txn.go new file mode 100644 index 000000000..ec0022aae --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/themis_txn.go @@ -0,0 +1,796 @@ +package themis + +import ( + "fmt" + "sync" + "time" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/go-hbase" + "github.com/pingcap/go-themis/oracle" +) + +type TxnConfig struct { + ConcurrentPrewriteAndCommit bool + WaitSecondaryCommit bool + TTLInMs uint64 + MaxRowsInOneTxn int + // options below is for debugging and testing + brokenPrewriteSecondaryTest bool + brokenPrewriteSecondaryAndRollbackTest bool + brokenCommitPrimaryTest bool + brokenCommitSecondaryTest bool +} + +var defaultTxnConf = TxnConfig{ + ConcurrentPrewriteAndCommit: true, + WaitSecondaryCommit: false, + MaxRowsInOneTxn: 50000, + TTLInMs: 5 * 1000, // default txn TTL: 5s + brokenPrewriteSecondaryTest: false, + brokenPrewriteSecondaryAndRollbackTest: false, + brokenCommitPrimaryTest: false, + brokenCommitSecondaryTest: false, +} + +type themisTxn struct { + client hbase.HBaseClient + rpc *themisRPC + lockCleaner LockManager + oracle oracle.Oracle + mutationCache *columnMutationCache + startTs uint64 + commitTs uint64 + primaryRow *rowMutation + primary *hbase.ColumnCoordinate + secondaryRows []*rowMutation + secondary []*hbase.ColumnCoordinate + primaryRowOffset int + singleRowTxn bool + secondaryLockBytes []byte + conf TxnConfig + hooks *txnHook +} + +var _ Txn = (*themisTxn)(nil) + +var ( + // ErrSimulated is used when maybe rollback occurs error too. + ErrSimulated = errors.New("simulated error") + maxCleanLockRetryCount = 30 + pauseTime = 300 * time.Millisecond +) + +func NewTxn(c hbase.HBaseClient, oracle oracle.Oracle) (Txn, error) { + return NewTxnWithConf(c, defaultTxnConf, oracle) +} + +func NewTxnWithConf(c hbase.HBaseClient, conf TxnConfig, oracle oracle.Oracle) (Txn, error) { + var err error + txn := &themisTxn{ + client: c, + mutationCache: newColumnMutationCache(), + oracle: oracle, + primaryRowOffset: -1, + conf: conf, + rpc: newThemisRPC(c, oracle, conf), + hooks: newHook(), + } + txn.startTs, err = txn.oracle.GetTimestamp() + if err != nil { + return nil, errors.Trace(err) + } + txn.lockCleaner = newThemisLockManager(txn.rpc, c) + return txn, nil +} + +func (txn *themisTxn) setHook(hooks *txnHook) { + txn.hooks = hooks +} + +func (txn *themisTxn) Gets(tbl string, gets []*hbase.Get) ([]*hbase.ResultRow, error) { + results, err := txn.rpc.themisBatchGet([]byte(tbl), gets, txn.startTs, false) + if err != nil { + return nil, errors.Trace(err) + } + var ret []*hbase.ResultRow + hasLock := false + for _, r := range results { + // if this row is locked, try clean lock and get again + if isLockResult(r) { + hasLock = true + err = txn.constructLockAndClean([]byte(tbl), r.SortedColumns) + if err != nil { + // TODO if it's a conflict error, it means this lock + // isn't expired, maybe we can retry or return partial results. + return nil, errors.Trace(err) + } + } + // it's OK, because themisBatchGet doesn't return nil value. + ret = append(ret, r) + } + if hasLock { + // after we cleaned locks, try to get again. + ret, err = txn.rpc.themisBatchGet([]byte(tbl), gets, txn.startTs, true) + if err != nil { + return nil, errors.Trace(err) + } + } + return ret, nil +} + +func (txn *themisTxn) Get(tbl string, g *hbase.Get) (*hbase.ResultRow, error) { + r, err := txn.rpc.themisGet([]byte(tbl), g, txn.startTs, false) + if err != nil { + return nil, errors.Trace(err) + } + // contain locks, try to clean and get again + if r != nil && isLockResult(r) { + r, err = txn.tryToCleanLockAndGetAgain([]byte(tbl), g, r.SortedColumns) + if err != nil { + return nil, errors.Trace(err) + } + } + return r, nil +} + +func (txn *themisTxn) Put(tbl string, p *hbase.Put) { + // add mutation to buffer + for _, e := range getEntriesFromPut(p) { + txn.mutationCache.addMutation([]byte(tbl), p.Row, e.Column, e.typ, e.value, false) + } +} + +func (txn *themisTxn) Delete(tbl string, p *hbase.Delete) error { + entries, err := getEntriesFromDel(p) + if err != nil { + return errors.Trace(err) + } + for _, e := range entries { + txn.mutationCache.addMutation([]byte(tbl), p.Row, e.Column, e.typ, e.value, false) + } + return nil +} + +func (txn *themisTxn) Commit() error { + if txn.mutationCache.getMutationCount() == 0 { + return nil + } + if txn.mutationCache.getRowCount() > txn.conf.MaxRowsInOneTxn { + return ErrTooManyRows + } + + txn.selectPrimaryAndSecondaries() + err := txn.prewritePrimary() + if err != nil { + // no need to check wrong region here, hbase client will retry when + // occurs single row NotInRegion error. + log.Error(errors.ErrorStack(err)) + // it's safe to retry, because this transaction is not committed. + return ErrRetryable + } + + err = txn.prewriteSecondary() + if err != nil { + if isWrongRegionErr(err) { + log.Warn("region info outdated") + // reset hbase client buffered region info + txn.client.CleanAllRegionCache() + } + return ErrRetryable + } + + txn.commitTs, err = txn.oracle.GetTimestamp() + if err != nil { + log.Error(errors.ErrorStack(err)) + return ErrRetryable + } + err = txn.commitPrimary() + if err != nil { + // commit primary error, rollback + log.Error("commit primary row failed", txn.startTs, err) + txn.rollbackRow(txn.primaryRow.tbl, txn.primaryRow) + txn.rollbackSecondaryRow(len(txn.secondaryRows) - 1) + return ErrRetryable + } + txn.commitSecondary() + log.Debug("themis txn commit successfully", txn.startTs, txn.commitTs) + return nil +} + +func (txn *themisTxn) commitSecondary() { + if bypass, _, _ := txn.hooks.beforeCommitSecondary(txn, nil); !bypass { + return + } + if txn.conf.brokenCommitSecondaryTest { + txn.brokenCommitSecondary() + return + } + if txn.conf.ConcurrentPrewriteAndCommit { + txn.batchCommitSecondary(txn.conf.WaitSecondaryCommit) + } else { + txn.commitSecondarySync() + } +} + +func (txn *themisTxn) commitSecondarySync() { + for _, r := range txn.secondaryRows { + err := txn.rpc.commitSecondaryRow(r.tbl, r.row, r.mutationList(false), txn.startTs, txn.commitTs) + if err != nil { + // fail of secondary commit will not stop the commits of next + // secondaries + log.Warning(err) + } + } +} + +func (txn *themisTxn) batchCommitSecondary(wait bool) error { + //will batch commit all rows in a region + rsRowMap, err := txn.groupByRegion() + if err != nil { + return errors.Trace(err) + } + + wg := sync.WaitGroup{} + for _, regionRowMap := range rsRowMap { + wg.Add(1) + _, firstRowM := getFirstEntity(regionRowMap) + go func(cli *themisRPC, tbl string, rMap map[string]*rowMutation, startTs, commitTs uint64) { + defer wg.Done() + err := cli.batchCommitSecondaryRows([]byte(tbl), rMap, startTs, commitTs) + if err != nil { + // fail of secondary commit will not stop the commits of next + // secondaries + if isWrongRegionErr(err) { + txn.client.CleanAllRegionCache() + log.Warn("region info outdated when committing secondary rows, don't panic") + } + } + }(txn.rpc, string(firstRowM.tbl), regionRowMap, txn.startTs, txn.commitTs) + } + if wait { + wg.Wait() + } + return nil +} + +func (txn *themisTxn) groupByRegion() (map[string]map[string]*rowMutation, error) { + rsRowMap := make(map[string]map[string]*rowMutation) + for _, rm := range txn.secondaryRows { + region, err := txn.client.LocateRegion(rm.tbl, rm.row, true) + if err != nil { + return nil, errors.Trace(err) + } + key := getBatchGroupKey(region, string(rm.tbl)) + if _, exists := rsRowMap[key]; !exists { + rsRowMap[key] = map[string]*rowMutation{} + } + rsRowMap[key][string(rm.row)] = rm + } + return rsRowMap, nil +} + +func (txn *themisTxn) commitPrimary() error { + if txn.conf.brokenCommitPrimaryTest { + return txn.brokenCommitPrimary() + } + return txn.rpc.commitRow(txn.primary.Table, txn.primary.Row, + txn.primaryRow.mutationList(false), + txn.startTs, txn.commitTs, txn.primaryRowOffset) +} + +func (txn *themisTxn) selectPrimaryAndSecondaries() { + txn.secondary = nil + for tblName, rowMutations := range txn.mutationCache.mutations { + for _, rowMutation := range rowMutations { + row := rowMutation.row + findPrimaryInRow := false + for i, mutation := range rowMutation.mutationList(true) { + colcord := hbase.NewColumnCoordinate([]byte(tblName), row, mutation.Family, mutation.Qual) + // set the first column as primary if primary is not set by user + if txn.primaryRowOffset == -1 && + (txn.primary == nil || txn.primary.Equal(colcord)) { + txn.primary = colcord + txn.primaryRowOffset = i + txn.primaryRow = rowMutation + findPrimaryInRow = true + } else { + txn.secondary = append(txn.secondary, colcord) + } + } + if !findPrimaryInRow { + txn.secondaryRows = append(txn.secondaryRows, rowMutation) + } + } + } + + // hook for test + if bypass, _, _ := txn.hooks.afterChoosePrimaryAndSecondary(txn, nil); !bypass { + return + } + + if len(txn.secondaryRows) == 0 { + txn.singleRowTxn = true + } + // construct secondary lock + secondaryLock := txn.constructSecondaryLock(hbase.TypePut) + if secondaryLock != nil { + txn.secondaryLockBytes = secondaryLock.Encode() + } else { + txn.secondaryLockBytes = nil + } +} + +func (txn *themisTxn) constructSecondaryLock(typ hbase.Type) *themisSecondaryLock { + if txn.primaryRow.getSize() <= 1 && len(txn.secondaryRows) == 0 { + return nil + } + l := newThemisSecondaryLock() + l.primaryCoordinate = txn.primary + l.ts = txn.startTs + // TODO set client addr + return l +} + +func (txn *themisTxn) constructPrimaryLock() *themisPrimaryLock { + l := newThemisPrimaryLock() + l.typ = txn.primaryRow.getType(txn.primary.Column) + l.ts = txn.startTs + for _, c := range txn.secondary { + l.addSecondary(c, txn.mutationCache.getMutation(c).typ) + } + return l +} + +func (txn *themisTxn) constructLockAndClean(tbl []byte, lockKvs []*hbase.Kv) error { + locks, err := getLocksFromResults([]byte(tbl), lockKvs, txn.rpc) + if err != nil { + return errors.Trace(err) + } + for _, lock := range locks { + err := txn.cleanLockWithRetry(lock) + if err != nil { + return errors.Trace(err) + } + } + return nil +} + +func (txn *themisTxn) tryToCleanLockAndGetAgain(tbl []byte, g *hbase.Get, lockKvs []*hbase.Kv) (*hbase.ResultRow, error) { + // try to clean locks + err := txn.constructLockAndClean(tbl, lockKvs) + if err != nil { + return nil, errors.Trace(err) + } + // get again, ignore lock + r, err := txn.rpc.themisGet([]byte(tbl), g, txn.startTs, true) + if err != nil { + return nil, errors.Trace(err) + } + return r, nil +} + +func (txn *themisTxn) commitSecondaryAndCleanLock(lock *themisSecondaryLock, commitTs uint64) error { + cc := lock.Coordinate() + mutation := &columnMutation{ + Column: &cc.Column, + mutationValuePair: &mutationValuePair{ + typ: lock.typ, + }, + } + err := txn.rpc.commitSecondaryRow(cc.Table, cc.Row, + []*columnMutation{mutation}, lock.Timestamp(), commitTs) + if err != nil { + return errors.Trace(err) + } + return nil +} + +func (txn *themisTxn) cleanLockWithRetry(lock Lock) error { + for i := 0; i < maxCleanLockRetryCount; i++ { + if exists, err := txn.lockCleaner.IsLockExists(lock.Coordinate(), 0, lock.Timestamp()); err != nil || !exists { + return errors.Trace(err) + } + log.Warnf("lock exists txn: %v lock-txn: %v row: %q", txn.startTs, lock.Timestamp(), lock.Coordinate().Row) + // try clean lock + err := txn.tryToCleanLock(lock) + if errorEqual(err, ErrLockNotExpired) { + log.Warn("sleep a while, and retry clean lock", txn.startTs) + // TODO(dongxu) use cleverer retry sleep time interval + time.Sleep(pauseTime) + continue + } else if err != nil { + return errors.Trace(err) + } + // lock cleaned successfully + return nil + } + return ErrCleanLockFailed +} + +func (txn *themisTxn) tryToCleanLock(lock Lock) error { + // if it's secondary lock, first we'll check if its primary lock has been released. + if lock.Role() == RoleSecondary { + // get primary lock + pl := lock.Primary() + // check primary lock is exists + exists, err := txn.lockCleaner.IsLockExists(pl.Coordinate(), 0, pl.Timestamp()) + if err != nil { + return errors.Trace(err) + } + if !exists { + // primary row is committed, commit this row + cc := pl.Coordinate() + commitTs, err := txn.lockCleaner.GetCommitTimestamp(cc, pl.Timestamp()) + if err != nil { + return errors.Trace(err) + } + if commitTs > 0 { + // if this transction has been committed + log.Info("txn has been committed, ts:", commitTs, "prewriteTs:", pl.Timestamp()) + // commit secondary rows + err := txn.commitSecondaryAndCleanLock(lock.(*themisSecondaryLock), commitTs) + if err != nil { + return errors.Trace(err) + } + return nil + } + } + } + expired, err := txn.rpc.checkAndSetLockIsExpired(lock) + if err != nil { + return errors.Trace(err) + } + // only clean expired lock + if expired { + // try to clean primary lock + pl := lock.Primary() + commitTs, cleanedLock, err := txn.lockCleaner.CleanLock(pl.Coordinate(), pl.Timestamp()) + if err != nil { + return errors.Trace(err) + } + if cleanedLock != nil { + pl = cleanedLock + } + log.Info("try clean secondary locks", pl.Timestamp()) + // clean secondary locks + // erase lock and data if commitTs is 0; otherwise, commit it. + for k, v := range pl.(*themisPrimaryLock).secondaries { + cc := &hbase.ColumnCoordinate{} + if err = cc.ParseFromString(k); err != nil { + return errors.Trace(err) + } + if commitTs == 0 { + // commitTs == 0, means clean primary lock successfully + // expire trx havn't committed yet, we must delete lock and + // dirty data + err = txn.lockCleaner.EraseLockAndData(cc, pl.Timestamp()) + if err != nil { + return errors.Trace(err) + } + } else { + // primary row is committed, so we must commit other + // secondary rows + mutation := &columnMutation{ + Column: &cc.Column, + mutationValuePair: &mutationValuePair{ + typ: v, + }, + } + err = txn.rpc.commitSecondaryRow(cc.Table, cc.Row, + []*columnMutation{mutation}, pl.Timestamp(), commitTs) + if err != nil { + return errors.Trace(err) + } + } + } + } else { + return ErrLockNotExpired + } + return nil +} + +func (txn *themisTxn) batchPrewriteSecondaryRowsWithLockClean(tbl []byte, rowMs map[string]*rowMutation) error { + locks, err := txn.batchPrewriteSecondaryRows(tbl, rowMs) + if err != nil { + return errors.Trace(err) + } + + // lock clean + if locks != nil && len(locks) > 0 { + // hook for test + if bypass, _, err := txn.hooks.onSecondaryOccursLock(txn, locks); !bypass { + return errors.Trace(err) + } + // try one more time after clean lock successfully + for _, lock := range locks { + err = txn.cleanLockWithRetry(lock) + if err != nil { + return errors.Trace(err) + } + + // prewrite all secondary rows + locks, err = txn.batchPrewriteSecondaryRows(tbl, rowMs) + if err != nil { + return errors.Trace(err) + } + if len(locks) > 0 { + for _, l := range locks { + log.Errorf("can't clean lock, column:%q; conflict lock: %+v, lock ts: %d", l.Coordinate(), l, l.Timestamp()) + } + return ErrRetryable + } + } + } + return nil +} + +func (txn *themisTxn) prewriteRowWithLockClean(tbl []byte, mutation *rowMutation, containPrimary bool) error { + lock, err := txn.prewriteRow(tbl, mutation, containPrimary) + if err != nil { + return errors.Trace(err) + } + // lock clean + if lock != nil { + // hook for test + if bypass, _, err := txn.hooks.beforePrewriteLockClean(txn, lock); !bypass { + return errors.Trace(err) + } + err = txn.cleanLockWithRetry(lock) + if err != nil { + return errors.Trace(err) + } + // try one more time after clean lock successfully + lock, err = txn.prewriteRow(tbl, mutation, containPrimary) + if err != nil { + return errors.Trace(err) + } + if lock != nil { + log.Errorf("can't clean lock, column:%q; conflict lock: %+v, lock ts: %d", lock.Coordinate(), lock, lock.Timestamp()) + return ErrRetryable + } + } + return nil +} + +func (txn *themisTxn) batchPrewriteSecondaryRows(tbl []byte, rowMs map[string]*rowMutation) (map[string]Lock, error) { + return txn.rpc.batchPrewriteSecondaryRows(tbl, rowMs, txn.startTs, txn.secondaryLockBytes) +} + +func (txn *themisTxn) prewriteRow(tbl []byte, mutation *rowMutation, containPrimary bool) (Lock, error) { + // hook for test + if bypass, ret, err := txn.hooks.onPrewriteRow(txn, []interface{}{mutation, containPrimary}); !bypass { + return ret.(Lock), errors.Trace(err) + } + if containPrimary { + // try to get lock + return txn.rpc.prewriteRow(tbl, mutation.row, + mutation.mutationList(true), + txn.startTs, + txn.constructPrimaryLock().Encode(), + txn.secondaryLockBytes, txn.primaryRowOffset) + } + return txn.rpc.prewriteSecondaryRow(tbl, mutation.row, + mutation.mutationList(true), + txn.startTs, + txn.secondaryLockBytes) +} + +func (txn *themisTxn) prewritePrimary() error { + // hook for test + if bypass, _, err := txn.hooks.beforePrewritePrimary(txn, nil); !bypass { + return err + } + err := txn.prewriteRowWithLockClean(txn.primary.Table, txn.primaryRow, true) + if err != nil { + log.Debugf("prewrite primary %v %q failed: %v", txn.startTs, txn.primaryRow.row, err.Error()) + return errors.Trace(err) + } + log.Debugf("prewrite primary %v %q successfully", txn.startTs, txn.primaryRow.row) + return nil +} + +func (txn *themisTxn) prewriteSecondary() error { + // hook for test + if bypass, _, err := txn.hooks.beforePrewriteSecondary(txn, nil); !bypass { + return err + } + if txn.conf.brokenPrewriteSecondaryTest { + return txn.brokenPrewriteSecondary() + } + if txn.conf.ConcurrentPrewriteAndCommit { + return txn.batchPrewriteSecondaries() + } + return txn.prewriteSecondarySync() +} + +func (txn *themisTxn) prewriteSecondarySync() error { + for i, mu := range txn.secondaryRows { + err := txn.prewriteRowWithLockClean(mu.tbl, mu, false) + if err != nil { + // rollback + txn.rollbackRow(txn.primaryRow.tbl, txn.primaryRow) + txn.rollbackSecondaryRow(i) + return errors.Trace(err) + } + } + return nil +} + +// just for test +func (txn *themisTxn) brokenCommitPrimary() error { + // do nothing + log.Warn("Simulating primary commit failed") + return nil +} + +// just for test +func (txn *themisTxn) brokenCommitSecondary() { + // do nothing + log.Warn("Simulating secondary commit failed") +} + +func (txn *themisTxn) brokenPrewriteSecondary() error { + log.Warn("Simulating prewrite secondary failed") + for i, rm := range txn.secondaryRows { + if i == len(txn.secondary)-1 { + if !txn.conf.brokenPrewriteSecondaryAndRollbackTest { + // simulating prewrite failed, need rollback + txn.rollbackRow(txn.primaryRow.tbl, txn.primaryRow) + txn.rollbackSecondaryRow(i) + } + // maybe rollback occurs error too + return ErrSimulated + } + txn.prewriteRowWithLockClean(rm.tbl, rm, false) + } + return nil +} + +func (txn *themisTxn) batchPrewriteSecondaries() error { + wg := sync.WaitGroup{} + //will batch prewrite all rows in a region + rsRowMap, err := txn.groupByRegion() + if err != nil { + return errors.Trace(err) + } + + errChan := make(chan error, len(rsRowMap)) + defer close(errChan) + successChan := make(chan map[string]*rowMutation, len(rsRowMap)) + defer close(successChan) + + for _, regionRowMap := range rsRowMap { + wg.Add(1) + _, firstRowM := getFirstEntity(regionRowMap) + go func(tbl []byte, rMap map[string]*rowMutation) { + defer wg.Done() + err := txn.batchPrewriteSecondaryRowsWithLockClean(tbl, rMap) + if err != nil { + errChan <- err + } else { + successChan <- rMap + } + }(firstRowM.tbl, regionRowMap) + } + wg.Wait() + + if len(errChan) != 0 { + // occur error, clean success prewrite mutations + log.Warnf("batch prewrite secondary rows error, rolling back %d %d", len(successChan), txn.startTs) + txn.rollbackRow(txn.primaryRow.tbl, txn.primaryRow) + L: + for { + select { + case succMutMap := <-successChan: + { + for _, rowMut := range succMutMap { + txn.rollbackRow(rowMut.tbl, rowMut) + } + } + default: + break L + } + } + + err := <-errChan + if err != nil { + log.Error("batch prewrite secondary rows error, txn:", txn.startTs, err) + } + return errors.Trace(err) + } + return nil +} + +func getFirstEntity(rowMap map[string]*rowMutation) (string, *rowMutation) { + for row, rowM := range rowMap { + return row, rowM + } + return "", nil +} + +func getBatchGroupKey(rInfo *hbase.RegionInfo, tblName string) string { + return rInfo.Server + "_" + rInfo.Name +} + +func (txn *themisTxn) rollbackRow(tbl []byte, mutation *rowMutation) error { + l := fmt.Sprintf("\nrolling back %q %d {\n", mutation.row, txn.startTs) + for _, v := range mutation.getColumns() { + l += fmt.Sprintf("\t%s:%s\n", string(v.Family), string(v.Qual)) + } + l += "}\n" + log.Warn(l) + for _, col := range mutation.getColumns() { + cc := &hbase.ColumnCoordinate{ + Table: tbl, + Row: mutation.row, + Column: col, + } + err := txn.lockCleaner.EraseLockAndData(cc, txn.startTs) + if err != nil { + return errors.Trace(err) + } + } + return nil +} + +func (txn *themisTxn) rollbackSecondaryRow(successIndex int) error { + for i := successIndex; i >= 0; i-- { + r := txn.secondaryRows[i] + err := txn.rollbackRow(r.tbl, r) + if err != nil { + return errors.Trace(err) + } + } + return nil +} + +func (txn *themisTxn) GetScanner(tbl []byte, startKey, endKey []byte, batchSize int) *ThemisScanner { + scanner := newThemisScanner(tbl, txn, batchSize, txn.client) + if startKey != nil { + scanner.setStartRow(startKey) + } + if endKey != nil { + scanner.setStopRow(endKey) + } + return scanner +} + +func (txn *themisTxn) Release() { + txn.primary = nil + txn.primaryRow = nil + txn.secondary = nil + txn.secondaryRows = nil + txn.startTs = 0 + txn.commitTs = 0 +} + +func (txn *themisTxn) String() string { + return fmt.Sprintf("%d", txn.startTs) +} + +func (txn *themisTxn) GetCommitTS() uint64 { + return txn.commitTs +} + +func (txn *themisTxn) GetStartTS() uint64 { + return txn.startTs +} + +func (txn *themisTxn) LockRow(tbl string, rowkey []byte) error { + g := hbase.NewGet(rowkey) + r, err := txn.Get(tbl, g) + if err != nil { + log.Warnf("get row error, table:%s, row:%q, error:%v", tbl, rowkey, err) + return errors.Trace(err) + } + if r == nil { + log.Warnf("has not data to lock, table:%s, row:%q", tbl, rowkey) + return nil + } + for _, v := range r.Columns { + txn.mutationCache.addMutation([]byte(tbl), rowkey, &v.Column, hbase.TypeMinimum, nil, true) + } + return nil +} diff --git a/vendor/github.com/pingcap/go-themis/txn.go b/vendor/github.com/pingcap/go-themis/txn.go new file mode 100644 index 000000000..4bb92e7d5 --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/txn.go @@ -0,0 +1,28 @@ +package themis + +import ( + "errors" + + "github.com/pingcap/go-hbase" +) + +var ( + ErrLockNotExpired = errors.New("lock not expired") + ErrCleanLockFailed = errors.New("clean lock failed") + ErrWrongRegion = errors.New("wrong region, please retry") + ErrTooManyRows = errors.New("too many rows in one transaction") + ErrRetryable = errors.New("try again later") +) + +type Txn interface { + Get(t string, get *hbase.Get) (*hbase.ResultRow, error) + Gets(t string, gets []*hbase.Get) ([]*hbase.ResultRow, error) + LockRow(t string, row []byte) error + Put(t string, put *hbase.Put) + Delete(t string, del *hbase.Delete) error + GetScanner(tbl []byte, startKey, endKey []byte, batchSize int) *ThemisScanner + Release() + Commit() error + GetStartTS() uint64 + GetCommitTS() uint64 +} diff --git a/vendor/github.com/pingcap/go-themis/txn_hook.go b/vendor/github.com/pingcap/go-themis/txn_hook.go new file mode 100644 index 000000000..4d1e0cb4e --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/txn_hook.go @@ -0,0 +1,36 @@ +package themis + +// Hooks for debugging and testing +type fnHook func(txn *themisTxn, ctx interface{}) (bypass bool, ret interface{}, err error) + +var emptyHookFn = func(txn *themisTxn, ctx interface{}) (bypass bool, ret interface{}, err error) { + return true, nil, nil +} + +type txnHook struct { + afterChoosePrimaryAndSecondary fnHook + beforePrewritePrimary fnHook + beforePrewriteLockClean fnHook + beforePrewriteSecondary fnHook + beforeCommitPrimary fnHook + beforeCommitSecondary fnHook + onSecondaryOccursLock fnHook + onPrewriteRow fnHook + onTxnSuccess fnHook + onTxnFailed fnHook +} + +func newHook() *txnHook { + return &txnHook{ + afterChoosePrimaryAndSecondary: emptyHookFn, + beforePrewritePrimary: emptyHookFn, + beforePrewriteLockClean: emptyHookFn, + beforePrewriteSecondary: emptyHookFn, + beforeCommitPrimary: emptyHookFn, + beforeCommitSecondary: emptyHookFn, + onSecondaryOccursLock: emptyHookFn, + onPrewriteRow: emptyHookFn, + onTxnSuccess: emptyHookFn, + onTxnFailed: emptyHookFn, + } +} diff --git a/vendor/github.com/pingcap/go-themis/util.go b/vendor/github.com/pingcap/go-themis/util.go new file mode 100644 index 000000000..1a9ae1307 --- /dev/null +++ b/vendor/github.com/pingcap/go-themis/util.go @@ -0,0 +1,22 @@ +package themis + +import "github.com/juju/errors" + +func errorEqual(err1, err2 error) bool { + if err1 == err2 { + return true + } + + e1 := errors.Cause(err1) + e2 := errors.Cause(err2) + + if e1 == e2 { + return true + } + + if e1 == nil || e2 == nil { + return e1 == e2 + } + + return e1.Error() == e2.Error() +} diff --git a/vendor/github.com/pingcap/tidb/CONTRIBUTING.md b/vendor/github.com/pingcap/tidb/CONTRIBUTING.md new file mode 100644 index 000000000..d8d3b60ec --- /dev/null +++ b/vendor/github.com/pingcap/tidb/CONTRIBUTING.md @@ -0,0 +1,65 @@ +# How to contribute + +This document outlines some of the conventions on development workflow, commit message formatting, contact points and other +resources to make it easier to get your contribution accepted. + +## Getting started + +- Fork the repository on GitHub. +- Read the README.md for build instructions. +- Play with the project, submit bugs, submit patches! + +## Contribution flow + +This is a rough outline of what a contributor's workflow looks like: + +- Create a topic branch from where you want to base your work. This is usually master. +- Make commits of logical units and add test case if the change fixes a bug or adds new functionality. +- Run tests and make sure all the tests are passed. +- Make sure your commit messages are in the proper format (see below). +- Push your changes to a topic branch in your fork of the repository. +- Submit a pull request to pingcap/tidb. +- Your PR must receive LGTMs from two maintainers found in the [MAINTAINERS](./docs/MAINTAINERS.md) file. + +Thanks for your contributions! + +### Code style + +The coding style suggested by the Golang community is used in TiDB. See the [style doc](https://github.com/golang/go/wiki/CodeReviewComments) for details. + +Please follow this style to make TiDB easy to review, maintain and develop. + +### Format of the Commit Message + +We follow a rough convention for commit messages that is designed to answer two +questions: what changed and why. The subject line should feature the what and +the body of the commit should describe the why. + +``` +store/localstore: add comment for variable declaration. + +Improve documentation. +``` + +The format can be described more formally as follows: + +``` +: + + + +

(optional) +``` + +The first line is the subject and should be no longer than 70 characters, the +second line is always blank, and other lines should be wrapped at 80 characters. +This allows the message to be easier to read on GitHub as well as in various +git tools. + +If the change affects more than one subsystem, you can use comma to separate them like `util/codec,util/types:`. + +If the change affects many subsystems, you can use ```*``` instead, like ```*:```. + +For the why part, if no specific reason for the change, +you can use one of some generic reasons like "Improve documentation.", +"Improve performance.", "Improve robustness.", "Improve test coverage." diff --git a/vendor/github.com/pingcap/tidb/Dockerfile b/vendor/github.com/pingcap/tidb/Dockerfile new file mode 100644 index 000000000..110acb168 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/Dockerfile @@ -0,0 +1,15 @@ +FROM golang + +VOLUME /opt + +RUN apt-get update && apt-get install -y wget git make ; \ + cd /opt ; \ + export PATH=$GOROOT/bin:$GOPATH/bin:$PATH ; \ + go get -d github.com/pingcap/tidb ; \ + cd $GOPATH/src/github.com/pingcap/tidb ; \ + make ; make server ; cp tidb-server/tidb-server /usr/bin/ + +EXPOSE 4000 + +CMD ["/usr/bin/tidb-server"] + diff --git a/vendor/github.com/pingcap/tidb/Makefile b/vendor/github.com/pingcap/tidb/Makefile new file mode 100644 index 000000000..ec3254274 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/Makefile @@ -0,0 +1,138 @@ +### Makefile for tidb + +# Ensure GOPATH is set before running build process. +ifeq "$(GOPATH)" "" + $(error Please set the environment variable GOPATH before running `make`) +endif + +path_to_add := $(addsuffix /bin,$(subst :,/bin:,$(GOPATH))) +export PATH := $(path_to_add):$(PATH) + +# Check the version of make and set env varirables/commands accordingly. +version_list := $(subst ., ,$(MAKE_VERSION)) +major_version := $(firstword $(version_list)) +old_versions := 0 1 2 3 +ifeq "$(major_version)" "$(filter $(major_version),$(old_versions))" + # Old version of `make` installed. It fails to search golex/goyacc + # by using the modified `PATH`, so we specify these commands with full path. + GODEP = $$(which godep) + GOLEX = $$(which golex) + GOYACC = $$(which goyacc) + GOLINT = $$(which golint) +else + # After version 4, `make` could follow modified `PATH` to find + # golex/goyacc correctly. + GODEP := godep + GOLEX := golex + GOYACC := goyacc + GOLINT := golint +endif + +GO := $(GODEP) go +ARCH := "`uname -s`" +LINUX := "Linux" +MAC := "Darwin" + +LDFLAGS += -X "github.com/pingcap/tidb/util/printer.TiDBBuildTS=$(shell date -u '+%Y-%m-%d %I:%M:%S')" +LDFLAGS += -X "github.com/pingcap/tidb/util/printer.TiDBGitHash=$(shell git rev-parse HEAD)" + +TARGET = "" + +.PHONY: godep deps all build install update parser clean todo test gotest interpreter server + +all: godep build test check + +godep: + go get github.com/tools/godep + go get github.com/pingcap/go-hbase + go get github.com/pingcap/go-themis + go get github.com/pingcap/tso/client + +build: + $(GO) build + +install: + $(GO) install ./... + +update: + go get -u github.com/pingcap/go-hbase + go get -u github.com/pingcap/go-themis + go get -u github.com/pingcap/tso/client + +TEMP_FILE = temp_parser_file + +parser: + go get github.com/qiuyesuifeng/goyacc + go get github.com/qiuyesuifeng/golex + $(GOYACC) -o /dev/null -xegen $(TEMP_FILE) parser/parser.y + $(GOYACC) -o parser/parser.go -xe $(TEMP_FILE) parser/parser.y 2>&1 | egrep "(shift|reduce)/reduce" | awk '{print} END {if (NR > 0) {print "Find conflict in parser.y. Please check y.output for more information."; system("rm -f $(TEMP_FILE)"); exit 1;}}' + rm -f $(TEMP_FILE) + rm -f y.output + + @if [ $(ARCH) = $(LINUX) ]; \ + then \ + sed -i -e 's|//line.*||' -e 's/yyEofCode/yyEOFCode/' parser/parser.go; \ + elif [ $(ARCH) = $(MAC) ]; \ + then \ + /usr/bin/sed -i "" 's|//line.*||' parser/parser.go; \ + /usr/bin/sed -i "" 's/yyEofCode/yyEOFCode/' parser/parser.go; \ + fi + + $(GOLEX) -o parser/scanner.go parser/scanner.l + @awk 'BEGIN{print "// Code generated by goyacc"} {print $0}' parser/parser.go > tmp_parser.go && mv tmp_parser.go parser/parser.go; + @awk 'BEGIN{print "// Code generated by goyacc"} {print $0}' parser/scanner.go > tmp_scanner.go && mv tmp_scanner.go parser/scanner.go; + +check: + bash gitcookie.sh + go get github.com/golang/lint/golint + + @echo "vet" + @ go tool vet . 2>&1 | grep -vE 'Godeps|parser/scanner.*unreachable code' | awk '{print} END{if(NR>0) {exit 1}}' + @echo "vet --shadow" + @ go tool vet --shadow . 2>&1 | grep -vE 'Godeps' | awk '{print} END{if(NR>0) {exit 1}}' + @echo "golint" + @ $(GOLINT) ./... 2>&1 | grep -vE 'LastInsertId|NewLexer|\.pb\.go' | awk '{print} END{if(NR>0) {exit 1}}' + @echo "gofmt (simplify)" + @ gofmt -s -l . 2>&1 | grep -vE 'Godeps|parser/parser.go|parser/scanner.go' | awk '{print} END{if(NR>0) {exit 1}}' + +deps: + go list -f '{{range .Deps}}{{printf "%s\n" .}}{{end}}{{range .TestImports}}{{printf "%s\n" .}}{{end}}' ./... | \ + sort | uniq | grep -E '[^/]+\.[^/]+/' |grep -v "pingcap/tidb" | \ + awk 'BEGIN{ print "#!/bin/bash" }{ printf("go get -u %s\n", $$1) }' > deps.sh + chmod +x deps.sh + bash deps.sh + +clean: + $(GO) clean -i ./... + rm -rf *.out + rm -f deps.sh + +todo: + @grep -n ^[[:space:]]*_[[:space:]]*=[[:space:]][[:alpha:]][[:alnum:]]* */*.go parser/scanner.l parser/parser.y || true + @grep -n TODO */*.go parser/scanner.l parser/parser.y || true + @grep -n BUG */*.go parser/scanner.l parser/parser.y || true + @grep -n println */*.go parser/scanner.l parser/parser.y || true + +test: gotest + +gotest: + $(GO) test -cover ./... + +race: + $(GO) test --race -cover ./... + +ddl_test: + $(GO) test ./ddl/... -skip_ddl=false + +ddl_race_test: + $(GO) test --race ./ddl/... -skip_ddl=false + +interpreter: + @cd interpreter && $(GO) build -ldflags '$(LDFLAGS)' + +server: +ifeq ($(TARGET), "") + @cd tidb-server && $(GO) build -ldflags '$(LDFLAGS)' +else + @cd tidb-server && $(GO) build -ldflags '$(LDFLAGS)' -o '$(TARGET)' +endif diff --git a/vendor/github.com/pingcap/tidb/README.md b/vendor/github.com/pingcap/tidb/README.md new file mode 100644 index 000000000..494d3198f --- /dev/null +++ b/vendor/github.com/pingcap/tidb/README.md @@ -0,0 +1,62 @@ +![logo](./docs/logo_with_text.png) +[![Build Status](https://travis-ci.org/pingcap/tidb.svg?branch=master)](https://travis-ci.org/pingcap/tidb) +## What is TiDB? + +TiDB is a distributed SQL database. +Inspired by the design of Google [F1](http://research.google.com/pubs/pub41344.html), TiDB supports the best features of both traditional RDBMS and NoSQL. + +- __Horizontal scalability__ +Grow TiDB as your business grows. You can increase the capacity simply by adding more machines. + +- __Asynchronous schema changes__ +Evolve TiDB schemas as your requirement evolves. You can add new columns and indices without stopping or affecting the on-going operations. + +- __Consistent distributed transactions__ +Think TiDB as a single-machine RDBMS. You can start a transaction that crosses multiple machines without worrying about consistency. TiDB makes your application code simple and robust. + +- __Compatible with MySQL protocol__ +Use TiDB as MySQL. You can replace MySQL with TiDB to power your application without changing a single line of code in most cases. + +- __Written in Go__ +Enjoy TiDB as much as we love Go. We believe Go code is both easy and enjoyable to work with. Go makes us improve TiDB fast and makes it easy to dive into the codebase. + + +- __NewSQL over HBase__ +Turn HBase into NewSQL database + +- __Multiple storage engine support__ +Power TiDB with your most favorite engines. TiDB supports many popular storage engines in single-machine mode. You can choose from GolevelDB, LevelDB, RocksDB, LMDB, BoltDB and even more to come. + +## Status + +TiDB is at its early age and under heavy development, all of the features mentioned above are fully implemented. + +__Please do not use it in production.__ + +## Roadmap + +Read the [Roadmap](./docs/ROADMAP.md). + +## Quick start + +Read the [Quick Start](./docs/QUICKSTART.md) + +## Architecture + +![architecture](./docs/architecture.png) + +## Contributing +Contributions are welcomed and greatly appreciated. See [CONTRIBUTING.md](CONTRIBUTING.md) +for details on submitting patches and the contribution workflow. + +## Follow us + +Twitter: [@PingCAP](https://twitter.com/PingCAP) + +## License +TiDB is under the Apache 2.0 license. See the [LICENSE](./LICENSES/LICENSE) file for details. + +## Acknowledgments +- Thanks [cznic](https://github.com/cznic) for providing some great open source tools. +- Thanks [Xiaomi](https://github.com/XiaoMi/themis) for providing the great open source project. +- Thanks [HBase](https://hbase.apache.org), [GolevelDB](https://github.com/syndtr/goleveldb), [LMDB](https://github.com/LMDB/lmdb), [BoltDB](https://github.com/boltdb/bolt) and [RocksDB](https://github.com/facebook/rocksdb) for their powerful storage engines. diff --git a/vendor/github.com/pingcap/tidb/ast/ast.go b/vendor/github.com/pingcap/tidb/ast/ast.go new file mode 100644 index 000000000..c726e4b6b --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ast/ast.go @@ -0,0 +1,189 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package ast is the abstract syntax tree parsed from a SQL statement by parser. +// It can be analysed and transformed by optimizer. +package ast + +import ( + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/util/types" +) + +// Node is the basic element of the AST. +// Interfaces embed Node should have 'Node' name suffix. +type Node interface { + // Accept accepts Visitor to visit itself. + // The returned node should replace original node. + // ok returns false to stop visiting. + // + // Implementation of this method should first call visitor.Enter, + // assign the returned node to its method receiver, if skipChildren returns true, + // children should be skipped. Otherwise, call its children in particular order that + // later elements depends on former elements. Finally, return visitor.Leave. + Accept(v Visitor) (node Node, ok bool) + // Text returns the original text of the element. + Text() string + // SetText sets original text to the Node. + SetText(text string) +} + +// Flags indicates whether an expression contains certain types of expression. +const ( + FlagConstant uint64 = 0 + FlagHasParamMarker uint64 = 1 << iota + FlagHasFunc + FlagHasReference + FlagHasAggregateFunc + FlagHasSubquery + FlagHasVariable + FlagHasDefault +) + +// ExprNode is a node that can be evaluated. +// Name of implementations should have 'Expr' suffix. +type ExprNode interface { + // Node is embeded in ExprNode. + Node + // SetType sets evaluation type to the expression. + SetType(tp *types.FieldType) + // GetType gets the evaluation type of the expression. + GetType() *types.FieldType + // SetValue sets value to the expression. + SetValue(val interface{}) + // GetValue gets value of the expression. + GetValue() interface{} + // SetDatum sets datum to the expression. + SetDatum(datum types.Datum) + // GetDatum gets datum of the expression. + GetDatum() *types.Datum + // SetFlag sets flag to the expression. + // Flag indicates whether the expression contains + // parameter marker, reference, aggregate function... + SetFlag(flag uint64) + // GetFlag returns the flag of the expression. + GetFlag() uint64 +} + +// FuncNode represents function call expression node. +type FuncNode interface { + ExprNode + functionExpression() +} + +// StmtNode represents statement node. +// Name of implementations should have 'Stmt' suffix. +type StmtNode interface { + Node + statement() +} + +// DDLNode represents DDL statement node. +type DDLNode interface { + StmtNode + ddlStatement() +} + +// DMLNode represents DML statement node. +type DMLNode interface { + StmtNode + dmlStatement() +} + +// ResultField represents a result field which can be a column from a table, +// or an expression in select field. It is a generated property during +// binding process. ResultField is the key element to evaluate a ColumnNameExpr. +// After resolving process, every ColumnNameExpr will be resolved to a ResultField. +// During execution, every row retrieved from table will set the row value to +// ResultFields of that table, so ColumnNameExpr resolved to that ResultField can be +// easily evaluated. +type ResultField struct { + Column *model.ColumnInfo + ColumnAsName model.CIStr + Table *model.TableInfo + TableAsName model.CIStr + DBName model.CIStr + + // The expression for the result field. If it is generated from a select field, it would + // be the expression of that select field, otherwise the type would be ValueExpr and value + // will be set for every retrieved row. + Expr ExprNode + TableName *TableName +} + +// Row represents a single row from Recordset. +type Row struct { + Data []types.Datum +} + +// RecordSet is an abstract result set interface to help get data from Plan. +type RecordSet interface { + + // Fields gets result fields. + Fields() (fields []*ResultField, err error) + + // Next returns the next row, nil row means there is no more to return. + Next() (row *Row, err error) + + // Close closes the underlying iterator, call Next after Close will + // restart the iteration. + Close() error +} + +// ResultSetNode interface has ResultFields property which is computed and set by +// optimizer.InfoBinder during binding process. Implementations include SelectStmt, +// SubqueryExpr, TableSource, TableName and Join. +type ResultSetNode interface { + Node + // GetResultFields gets result fields of the result set node. + GetResultFields() []*ResultField + // SetResultFields sets result fields of the result set node. + SetResultFields(fields []*ResultField) +} + +// Statement is an interface for SQL execution. +// NOTE: all Statement implementations must be safe for +// concurrent using by multiple goroutines. +// If the Exec method requires any Execution domain local data, +// they must be held out of the implementing instance. +type Statement interface { + // Explain gets the execution plans. + //Explain(ctx context.Context, w format.Formatter) + + // IsDDL shows whether the statement is an DDL operation. + IsDDL() bool + + // OriginText gets the origin SQL text. + OriginText() string + + // SetText sets the executive SQL text. + SetText(text string) + + // Exec executes SQL and gets a Recordset. + Exec(ctx context.Context) (RecordSet, error) +} + +// Visitor visits a Node. +type Visitor interface { + // Enter is called before children nodes are visited. + // The returned node must be the same type as the input node n. + // skipChildren returns true means children nodes should be skipped, + // this is useful when work is done in Enter and there is no need to visit children. + Enter(n Node) (node Node, skipChildren bool) + // Leave is called after children nodes have been visited. + // The returned node's type can be different from the input node if it is a ExprNode, + // Non-expression node must be the same type as the input node n. + // ok returns false to stop visiting. + Leave(n Node) (node Node, ok bool) +} diff --git a/vendor/github.com/pingcap/tidb/ast/base.go b/vendor/github.com/pingcap/tidb/ast/base.go new file mode 100644 index 000000000..1415f64df --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ast/base.go @@ -0,0 +1,119 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ast + +import "github.com/pingcap/tidb/util/types" + +// node is the struct implements node interface except for Accept method. +// Node implementations should embed it in. +type node struct { + text string +} + +// SetText implements Node interface. +func (n *node) SetText(text string) { + n.text = text +} + +// Text implements Node interface. +func (n *node) Text() string { + return n.text +} + +// stmtNode implements StmtNode interface. +// Statement implementations should embed it in. +type stmtNode struct { + node +} + +// statement implements StmtNode interface. +func (sn *stmtNode) statement() {} + +// ddlNode implements DDLNode interface. +// DDL implementations should embed it in. +type ddlNode struct { + stmtNode +} + +// ddlStatement implements DDLNode interface. +func (dn *ddlNode) ddlStatement() {} + +// dmlNode is the struct implements DMLNode interface. +// DML implementations should embed it in. +type dmlNode struct { + stmtNode +} + +// dmlStatement implements DMLNode interface. +func (dn *dmlNode) dmlStatement() {} + +// expressionNode is the struct implements Expression interface. +// Expression implementations should embed it in. +type exprNode struct { + node + types.Datum + Type *types.FieldType + flag uint64 +} + +// SetDatum implements Expression interface. +func (en *exprNode) SetDatum(datum types.Datum) { + en.Datum = datum +} + +// GetDatum implements Expression interface. +func (en *exprNode) GetDatum() *types.Datum { + return &en.Datum +} + +// SetType implements Expression interface. +func (en *exprNode) SetType(tp *types.FieldType) { + en.Type = tp +} + +// GetType implements Expression interface. +func (en *exprNode) GetType() *types.FieldType { + return en.Type +} + +// SetFlag implements Expression interface. +func (en *exprNode) SetFlag(flag uint64) { + en.flag = flag +} + +// GetFlag implements Expression interface. +func (en *exprNode) GetFlag() uint64 { + return en.flag +} + +type funcNode struct { + exprNode +} + +// FunctionExpression implements FounctionNode interface. +func (fn *funcNode) functionExpression() {} + +type resultSetNode struct { + resultFields []*ResultField +} + +// GetResultFields implements ResultSetNode interface. +func (rs *resultSetNode) GetResultFields() []*ResultField { + return rs.resultFields +} + +// GetResultFields implements ResultSetNode interface. +func (rs *resultSetNode) SetResultFields(rfs []*ResultField) { + rs.resultFields = rfs +} diff --git a/vendor/github.com/pingcap/tidb/ast/cloner.go b/vendor/github.com/pingcap/tidb/ast/cloner.go new file mode 100644 index 000000000..e1089a37c --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ast/cloner.go @@ -0,0 +1,170 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ast + +import "fmt" + +// Cloner is an ast visitor that clones a node. +type Cloner struct { +} + +// Enter implements Visitor Enter interface. +func (c *Cloner) Enter(node Node) (Node, bool) { + return copyStruct(node), false +} + +// Leave implements Visitor Leave interface. +func (c *Cloner) Leave(in Node) (out Node, ok bool) { + return in, true +} + +// copyStruct copies a node's struct value, if the struct has slice member, +// make a new slice and copy old slice value to new slice. +func copyStruct(in Node) (out Node) { + switch v := in.(type) { + case *ValueExpr: + nv := *v + out = &nv + case *BetweenExpr: + nv := *v + out = &nv + case *BinaryOperationExpr: + nv := *v + out = &nv + case *WhenClause: + nv := *v + out = &nv + case *CaseExpr: + nv := *v + nv.WhenClauses = make([]*WhenClause, len(v.WhenClauses)) + copy(nv.WhenClauses, v.WhenClauses) + out = &nv + case *SubqueryExpr: + nv := *v + out = &nv + case *CompareSubqueryExpr: + nv := *v + out = &nv + case *ColumnName: + nv := *v + out = &nv + case *ColumnNameExpr: + nv := *v + out = &nv + case *DefaultExpr: + nv := *v + out = &nv + case *ExistsSubqueryExpr: + nv := *v + out = &nv + case *PatternInExpr: + nv := *v + nv.List = make([]ExprNode, len(v.List)) + copy(nv.List, v.List) + out = &nv + case *IsNullExpr: + nv := *v + out = &nv + case *IsTruthExpr: + nv := *v + out = &nv + case *PatternLikeExpr: + nv := *v + out = &nv + case *ParamMarkerExpr: + nv := *v + out = &nv + case *ParenthesesExpr: + nv := *v + out = &nv + case *PositionExpr: + nv := *v + out = &nv + case *PatternRegexpExpr: + nv := *v + out = &nv + case *RowExpr: + nv := *v + nv.Values = make([]ExprNode, len(v.Values)) + copy(nv.Values, v.Values) + out = &nv + case *UnaryOperationExpr: + nv := *v + out = &nv + case *ValuesExpr: + nv := *v + out = &nv + case *VariableExpr: + nv := *v + out = &nv + case *Join: + nv := *v + out = &nv + case *TableName: + nv := *v + out = &nv + case *TableSource: + nv := *v + out = &nv + case *OnCondition: + nv := *v + out = &nv + case *WildCardField: + nv := *v + out = &nv + case *SelectField: + nv := *v + out = &nv + case *FieldList: + nv := *v + nv.Fields = make([]*SelectField, len(v.Fields)) + copy(nv.Fields, v.Fields) + out = &nv + case *TableRefsClause: + nv := *v + out = &nv + case *ByItem: + nv := *v + out = &nv + case *GroupByClause: + nv := *v + nv.Items = make([]*ByItem, len(v.Items)) + copy(nv.Items, v.Items) + out = &nv + case *HavingClause: + nv := *v + out = &nv + case *OrderByClause: + nv := *v + nv.Items = make([]*ByItem, len(v.Items)) + copy(nv.Items, v.Items) + out = &nv + case *SelectStmt: + nv := *v + out = &nv + case *UnionSelectList: + nv := *v + nv.Selects = make([]*SelectStmt, len(v.Selects)) + copy(nv.Selects, v.Selects) + out = &nv + case *UnionStmt: + nv := *v + out = &nv + default: + // We currently only handle expression and select statement. + // Will add more when we need to. + panic("unknown ast Node type " + fmt.Sprintf("%T", v)) + } + return +} diff --git a/vendor/github.com/pingcap/tidb/ast/ddl.go b/vendor/github.com/pingcap/tidb/ast/ddl.go new file mode 100644 index 000000000..2be6e1a95 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ast/ddl.go @@ -0,0 +1,641 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ast + +import ( + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/util/types" +) + +var ( + _ DDLNode = &AlterTableStmt{} + _ DDLNode = &CreateDatabaseStmt{} + _ DDLNode = &CreateIndexStmt{} + _ DDLNode = &CreateTableStmt{} + _ DDLNode = &DropDatabaseStmt{} + _ DDLNode = &DropIndexStmt{} + _ DDLNode = &DropTableStmt{} + _ DDLNode = &TruncateTableStmt{} + + _ Node = &AlterTableSpec{} + _ Node = &ColumnDef{} + _ Node = &ColumnOption{} + _ Node = &ColumnPosition{} + _ Node = &Constraint{} + _ Node = &IndexColName{} + _ Node = &ReferenceDef{} +) + +// CharsetOpt is used for parsing charset option from SQL. +type CharsetOpt struct { + Chs string + Col string +} + +// DatabaseOptionType is the type for database options. +type DatabaseOptionType int + +// Database option types. +const ( + DatabaseOptionNone DatabaseOptionType = iota + DatabaseOptionCharset + DatabaseOptionCollate +) + +// DatabaseOption represents database option. +type DatabaseOption struct { + Tp DatabaseOptionType + Value string +} + +// CreateDatabaseStmt is a statement to create a database. +// See: https://dev.mysql.com/doc/refman/5.7/en/create-database.html +type CreateDatabaseStmt struct { + ddlNode + + IfNotExists bool + Name string + Options []*DatabaseOption +} + +// Accept implements Node Accept interface. +func (n *CreateDatabaseStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*CreateDatabaseStmt) + return v.Leave(n) +} + +// DropDatabaseStmt is a statement to drop a database and all tables in the database. +// See: https://dev.mysql.com/doc/refman/5.7/en/drop-database.html +type DropDatabaseStmt struct { + ddlNode + + IfExists bool + Name string +} + +// Accept implements Node Accept interface. +func (n *DropDatabaseStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*DropDatabaseStmt) + return v.Leave(n) +} + +// IndexColName is used for parsing index column name from SQL. +type IndexColName struct { + node + + Column *ColumnName + Length int +} + +// Accept implements Node Accept interface. +func (n *IndexColName) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*IndexColName) + node, ok := n.Column.Accept(v) + if !ok { + return n, false + } + n.Column = node.(*ColumnName) + return v.Leave(n) +} + +// ReferenceDef is used for parsing foreign key reference option from SQL. +// See: http://dev.mysql.com/doc/refman/5.7/en/create-table-foreign-keys.html +type ReferenceDef struct { + node + + Table *TableName + IndexColNames []*IndexColName +} + +// Accept implements Node Accept interface. +func (n *ReferenceDef) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*ReferenceDef) + node, ok := n.Table.Accept(v) + if !ok { + return n, false + } + n.Table = node.(*TableName) + for i, val := range n.IndexColNames { + node, ok = val.Accept(v) + if !ok { + return n, false + } + n.IndexColNames[i] = node.(*IndexColName) + } + return v.Leave(n) +} + +// ColumnOptionType is the type for ColumnOption. +type ColumnOptionType int + +// ColumnOption types. +const ( + ColumnOptionNoOption ColumnOptionType = iota + ColumnOptionPrimaryKey + ColumnOptionNotNull + ColumnOptionAutoIncrement + ColumnOptionDefaultValue + ColumnOptionUniq + ColumnOptionIndex + ColumnOptionUniqIndex + ColumnOptionKey + ColumnOptionUniqKey + ColumnOptionNull + ColumnOptionOnUpdate // For Timestamp and Datetime only. + ColumnOptionFulltext + ColumnOptionComment +) + +// ColumnOption is used for parsing column constraint info from SQL. +type ColumnOption struct { + node + + Tp ColumnOptionType + // The value For Default or On Update. + Expr ExprNode +} + +// Accept implements Node Accept interface. +func (n *ColumnOption) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*ColumnOption) + if n.Expr != nil { + node, ok := n.Expr.Accept(v) + if !ok { + return n, false + } + n.Expr = node.(ExprNode) + } + return v.Leave(n) +} + +// IndexOption is the index options. +// KEY_BLOCK_SIZE [=] value +// | index_type +// | WITH PARSER parser_name +// | COMMENT 'string' +// See: http://dev.mysql.com/doc/refman/5.7/en/create-table.html +type IndexOption struct { + node + + KeyBlockSize uint64 + Tp model.IndexType + Comment string +} + +// Accept implements Node Accept interface. +func (n *IndexOption) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*IndexOption) + return v.Leave(n) +} + +// ConstraintType is the type for Constraint. +type ConstraintType int + +// ConstraintTypes +const ( + ConstraintNoConstraint ConstraintType = iota + ConstraintPrimaryKey + ConstraintKey + ConstraintIndex + ConstraintUniq + ConstraintUniqKey + ConstraintUniqIndex + ConstraintForeignKey + ConstraintFulltext +) + +// Constraint is constraint for table definition. +type Constraint struct { + node + + Tp ConstraintType + Name string + + // Used for PRIMARY KEY, UNIQUE, ...... + Keys []*IndexColName + + // Used for foreign key. + Refer *ReferenceDef + + // Index Options + Option *IndexOption +} + +// Accept implements Node Accept interface. +func (n *Constraint) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*Constraint) + for i, val := range n.Keys { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Keys[i] = node.(*IndexColName) + } + if n.Refer != nil { + node, ok := n.Refer.Accept(v) + if !ok { + return n, false + } + n.Refer = node.(*ReferenceDef) + } + if n.Option != nil { + node, ok := n.Option.Accept(v) + if !ok { + return n, false + } + n.Option = node.(*IndexOption) + } + return v.Leave(n) +} + +// ColumnDef is used for parsing column definition from SQL. +type ColumnDef struct { + node + + Name *ColumnName + Tp *types.FieldType + Options []*ColumnOption +} + +// Accept implements Node Accept interface. +func (n *ColumnDef) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*ColumnDef) + node, ok := n.Name.Accept(v) + if !ok { + return n, false + } + n.Name = node.(*ColumnName) + for i, val := range n.Options { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Options[i] = node.(*ColumnOption) + } + return v.Leave(n) +} + +// CreateTableStmt is a statement to create a table. +// See: https://dev.mysql.com/doc/refman/5.7/en/create-table.html +type CreateTableStmt struct { + ddlNode + + IfNotExists bool + Table *TableName + Cols []*ColumnDef + Constraints []*Constraint + Options []*TableOption +} + +// Accept implements Node Accept interface. +func (n *CreateTableStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*CreateTableStmt) + node, ok := n.Table.Accept(v) + if !ok { + return n, false + } + n.Table = node.(*TableName) + for i, val := range n.Cols { + node, ok = val.Accept(v) + if !ok { + return n, false + } + n.Cols[i] = node.(*ColumnDef) + } + for i, val := range n.Constraints { + node, ok = val.Accept(v) + if !ok { + return n, false + } + n.Constraints[i] = node.(*Constraint) + } + return v.Leave(n) +} + +// DropTableStmt is a statement to drop one or more tables. +// See: https://dev.mysql.com/doc/refman/5.7/en/drop-table.html +type DropTableStmt struct { + ddlNode + + IfExists bool + Tables []*TableName +} + +// Accept implements Node Accept interface. +func (n *DropTableStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*DropTableStmt) + for i, val := range n.Tables { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Tables[i] = node.(*TableName) + } + return v.Leave(n) +} + +// CreateIndexStmt is a statement to create an index. +// See: https://dev.mysql.com/doc/refman/5.7/en/create-index.html +type CreateIndexStmt struct { + ddlNode + + IndexName string + Table *TableName + Unique bool + IndexColNames []*IndexColName +} + +// Accept implements Node Accept interface. +func (n *CreateIndexStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*CreateIndexStmt) + node, ok := n.Table.Accept(v) + if !ok { + return n, false + } + n.Table = node.(*TableName) + for i, val := range n.IndexColNames { + node, ok = val.Accept(v) + if !ok { + return n, false + } + n.IndexColNames[i] = node.(*IndexColName) + } + return v.Leave(n) +} + +// DropIndexStmt is a statement to drop the index. +// See: https://dev.mysql.com/doc/refman/5.7/en/drop-index.html +type DropIndexStmt struct { + ddlNode + + IfExists bool + IndexName string + Table *TableName +} + +// Accept implements Node Accept interface. +func (n *DropIndexStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*DropIndexStmt) + node, ok := n.Table.Accept(v) + if !ok { + return n, false + } + n.Table = node.(*TableName) + return v.Leave(n) +} + +// TableOptionType is the type for TableOption +type TableOptionType int + +// TableOption types. +const ( + TableOptionNone TableOptionType = iota + TableOptionEngine + TableOptionCharset + TableOptionCollate + TableOptionAutoIncrement + TableOptionComment + TableOptionAvgRowLength + TableOptionCheckSum + TableOptionCompression + TableOptionConnection + TableOptionPassword + TableOptionKeyBlockSize + TableOptionMaxRows + TableOptionMinRows + TableOptionDelayKeyWrite + TableOptionRowFormat +) + +// RowFormat types +const ( + RowFormatDefault uint64 = iota + 1 + RowFormatDynamic + RowFormatFixed + RowFormatCompressed + RowFormatRedundant + RowFormatCompact +) + +// TableOption is used for parsing table option from SQL. +type TableOption struct { + Tp TableOptionType + StrValue string + UintValue uint64 +} + +// ColumnPositionType is the type for ColumnPosition. +type ColumnPositionType int + +// ColumnPosition Types +const ( + ColumnPositionNone ColumnPositionType = iota + ColumnPositionFirst + ColumnPositionAfter +) + +// ColumnPosition represent the position of the newly added column +type ColumnPosition struct { + node + // ColumnPositionNone | ColumnPositionFirst | ColumnPositionAfter + Tp ColumnPositionType + // RelativeColumn is the column the newly added column after if type is ColumnPositionAfter + RelativeColumn *ColumnName +} + +// Accept implements Node Accept interface. +func (n *ColumnPosition) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*ColumnPosition) + if n.RelativeColumn != nil { + node, ok := n.RelativeColumn.Accept(v) + if !ok { + return n, false + } + n.RelativeColumn = node.(*ColumnName) + } + return v.Leave(n) +} + +// AlterTableType is the type for AlterTableSpec. +type AlterTableType int + +// AlterTable types. +const ( + AlterTableOption AlterTableType = iota + 1 + AlterTableAddColumn + AlterTableAddConstraint + AlterTableDropColumn + AlterTableDropPrimaryKey + AlterTableDropIndex + AlterTableDropForeignKey + +// TODO: Add more actions +) + +// AlterTableSpec represents alter table specification. +type AlterTableSpec struct { + node + + Tp AlterTableType + Name string + Constraint *Constraint + Options []*TableOption + Column *ColumnDef + DropColumn *ColumnName + Position *ColumnPosition +} + +// Accept implements Node Accept interface. +func (n *AlterTableSpec) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*AlterTableSpec) + if n.Constraint != nil { + node, ok := n.Constraint.Accept(v) + if !ok { + return n, false + } + n.Constraint = node.(*Constraint) + } + if n.Column != nil { + node, ok := n.Column.Accept(v) + if !ok { + return n, false + } + n.Column = node.(*ColumnDef) + } + if n.DropColumn != nil { + node, ok := n.DropColumn.Accept(v) + if !ok { + return n, false + } + n.DropColumn = node.(*ColumnName) + } + if n.Position != nil { + node, ok := n.Position.Accept(v) + if !ok { + return n, false + } + n.Position = node.(*ColumnPosition) + } + return v.Leave(n) +} + +// AlterTableStmt is a statement to change the structure of a table. +// See: https://dev.mysql.com/doc/refman/5.7/en/alter-table.html +type AlterTableStmt struct { + ddlNode + + Table *TableName + Specs []*AlterTableSpec +} + +// Accept implements Node Accept interface. +func (n *AlterTableStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*AlterTableStmt) + node, ok := n.Table.Accept(v) + if !ok { + return n, false + } + n.Table = node.(*TableName) + for i, val := range n.Specs { + node, ok = val.Accept(v) + if !ok { + return n, false + } + n.Specs[i] = node.(*AlterTableSpec) + } + return v.Leave(n) +} + +// TruncateTableStmt is a statement to empty a table completely. +// See: https://dev.mysql.com/doc/refman/5.7/en/truncate-table.html +type TruncateTableStmt struct { + ddlNode + + Table *TableName +} + +// Accept implements Node Accept interface. +func (n *TruncateTableStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*TruncateTableStmt) + node, ok := n.Table.Accept(v) + if !ok { + return n, false + } + n.Table = node.(*TableName) + return v.Leave(n) +} diff --git a/vendor/github.com/pingcap/tidb/ast/dml.go b/vendor/github.com/pingcap/tidb/ast/dml.go new file mode 100644 index 000000000..3ed580d13 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ast/dml.go @@ -0,0 +1,891 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ast + +import ( + "github.com/pingcap/tidb/model" +) + +var ( + _ DMLNode = &DeleteStmt{} + _ DMLNode = &InsertStmt{} + _ DMLNode = &UnionStmt{} + _ DMLNode = &UpdateStmt{} + _ DMLNode = &SelectStmt{} + _ DMLNode = &ShowStmt{} + + _ Node = &Assignment{} + _ Node = &ByItem{} + _ Node = &FieldList{} + _ Node = &GroupByClause{} + _ Node = &HavingClause{} + _ Node = &Join{} + _ Node = &Limit{} + _ Node = &OnCondition{} + _ Node = &OrderByClause{} + _ Node = &SelectField{} + _ Node = &TableName{} + _ Node = &TableRefsClause{} + _ Node = &TableSource{} + _ Node = &UnionSelectList{} + _ Node = &WildCardField{} +) + +// JoinType is join type, including cross/left/right/full. +type JoinType int + +const ( + // CrossJoin is cross join type. + CrossJoin JoinType = iota + 1 + // LeftJoin is left Join type. + LeftJoin + // RightJoin is right Join type. + RightJoin +) + +// Join represents table join. +type Join struct { + node + resultSetNode + + // Left table can be TableSource or JoinNode. + Left ResultSetNode + // Right table can be TableSource or JoinNode or nil. + Right ResultSetNode + // Tp represents join type. + Tp JoinType + // On represents join on condition. + On *OnCondition +} + +// Accept implements Node Accept interface. +func (n *Join) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*Join) + node, ok := n.Left.Accept(v) + if !ok { + return n, false + } + n.Left = node.(ResultSetNode) + if n.Right != nil { + node, ok = n.Right.Accept(v) + if !ok { + return n, false + } + n.Right = node.(ResultSetNode) + } + if n.On != nil { + node, ok = n.On.Accept(v) + if !ok { + return n, false + } + n.On = node.(*OnCondition) + } + return v.Leave(n) +} + +// TableName represents a table name. +type TableName struct { + node + resultSetNode + + Schema model.CIStr + Name model.CIStr + + DBInfo *model.DBInfo + TableInfo *model.TableInfo +} + +// Accept implements Node Accept interface. +func (n *TableName) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*TableName) + return v.Leave(n) +} + +// DeleteTableList is the tablelist used in delete statement multi-table mode. +type DeleteTableList struct { + node + Tables []*TableName +} + +// Accept implements Node Accept interface. +func (n *DeleteTableList) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*DeleteTableList) + if n != nil { + for i, t := range n.Tables { + node, ok := t.Accept(v) + if !ok { + return n, false + } + n.Tables[i] = node.(*TableName) + } + } + return v.Leave(n) +} + +// OnCondition represetns JOIN on condition. +type OnCondition struct { + node + + Expr ExprNode +} + +// Accept implements Node Accept interface. +func (n *OnCondition) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*OnCondition) + node, ok := n.Expr.Accept(v) + if !ok { + return n, false + } + n.Expr = node.(ExprNode) + return v.Leave(n) +} + +// TableSource represents table source with a name. +type TableSource struct { + node + + // Source is the source of the data, can be a TableName, + // a SelectStmt, a UnionStmt, or a JoinNode. + Source ResultSetNode + + // AsName is the alias name of the table source. + AsName model.CIStr +} + +// Accept implements Node Accept interface. +func (n *TableSource) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*TableSource) + node, ok := n.Source.Accept(v) + if !ok { + return n, false + } + n.Source = node.(ResultSetNode) + return v.Leave(n) +} + +// SetResultFields implements ResultSetNode interface. +func (n *TableSource) SetResultFields(rfs []*ResultField) { + n.Source.SetResultFields(rfs) +} + +// GetResultFields implements ResultSetNode interface. +func (n *TableSource) GetResultFields() []*ResultField { + return n.Source.GetResultFields() +} + +// SelectLockType is the lock type for SelectStmt. +type SelectLockType int + +// Select lock types. +const ( + SelectLockNone SelectLockType = iota + SelectLockForUpdate + SelectLockInShareMode +) + +// WildCardField is a special type of select field content. +type WildCardField struct { + node + + Table model.CIStr + Schema model.CIStr +} + +// Accept implements Node Accept interface. +func (n *WildCardField) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*WildCardField) + return v.Leave(n) +} + +// SelectField represents fields in select statement. +// There are two type of select field: wildcard +// and expression with optional alias name. +type SelectField struct { + node + + // Offset is used to get original text. + Offset int + // If WildCard is not nil, Expr will be nil. + WildCard *WildCardField + // If Expr is not nil, WildCard will be nil. + Expr ExprNode + // Alias name for Expr. + AsName model.CIStr +} + +// Accept implements Node Accept interface. +func (n *SelectField) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*SelectField) + if n.Expr != nil { + node, ok := n.Expr.Accept(v) + if !ok { + return n, false + } + n.Expr = node.(ExprNode) + } + return v.Leave(n) +} + +// FieldList represents field list in select statement. +type FieldList struct { + node + + Fields []*SelectField +} + +// Accept implements Node Accept interface. +func (n *FieldList) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*FieldList) + for i, val := range n.Fields { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Fields[i] = node.(*SelectField) + } + return v.Leave(n) +} + +// TableRefsClause represents table references clause in dml statement. +type TableRefsClause struct { + node + + TableRefs *Join +} + +// Accept implements Node Accept interface. +func (n *TableRefsClause) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*TableRefsClause) + node, ok := n.TableRefs.Accept(v) + if !ok { + return n, false + } + n.TableRefs = node.(*Join) + return v.Leave(n) +} + +// ByItem represents an item in order by or group by. +type ByItem struct { + node + + Expr ExprNode + Desc bool +} + +// Accept implements Node Accept interface. +func (n *ByItem) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*ByItem) + node, ok := n.Expr.Accept(v) + if !ok { + return n, false + } + n.Expr = node.(ExprNode) + return v.Leave(n) +} + +// GroupByClause represents group by clause. +type GroupByClause struct { + node + Items []*ByItem +} + +// Accept implements Node Accept interface. +func (n *GroupByClause) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*GroupByClause) + for i, val := range n.Items { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Items[i] = node.(*ByItem) + } + return v.Leave(n) +} + +// HavingClause represents having clause. +type HavingClause struct { + node + Expr ExprNode +} + +// Accept implements Node Accept interface. +func (n *HavingClause) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*HavingClause) + node, ok := n.Expr.Accept(v) + if !ok { + return n, false + } + n.Expr = node.(ExprNode) + return v.Leave(n) +} + +// OrderByClause represents order by clause. +type OrderByClause struct { + node + Items []*ByItem + ForUnion bool +} + +// Accept implements Node Accept interface. +func (n *OrderByClause) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*OrderByClause) + for i, val := range n.Items { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Items[i] = node.(*ByItem) + } + return v.Leave(n) +} + +// SelectStmt represents the select query node. +// See: https://dev.mysql.com/doc/refman/5.7/en/select.html +type SelectStmt struct { + dmlNode + resultSetNode + + // Distinct represents if the select has distinct option. + Distinct bool + // From is the from clause of the query. + From *TableRefsClause + // Where is the where clause in select statement. + Where ExprNode + // Fields is the select expression list. + Fields *FieldList + // GroupBy is the group by expression list. + GroupBy *GroupByClause + // Having is the having condition. + Having *HavingClause + // OrderBy is the ordering expression list. + OrderBy *OrderByClause + // Limit is the limit clause. + Limit *Limit + // Lock is the lock type + LockTp SelectLockType +} + +// Accept implements Node Accept interface. +func (n *SelectStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + + n = newNode.(*SelectStmt) + if n.From != nil { + node, ok := n.From.Accept(v) + if !ok { + return n, false + } + n.From = node.(*TableRefsClause) + } + + if n.Where != nil { + node, ok := n.Where.Accept(v) + if !ok { + return n, false + } + n.Where = node.(ExprNode) + } + + if n.Fields != nil { + node, ok := n.Fields.Accept(v) + if !ok { + return n, false + } + n.Fields = node.(*FieldList) + } + + if n.GroupBy != nil { + node, ok := n.GroupBy.Accept(v) + if !ok { + return n, false + } + n.GroupBy = node.(*GroupByClause) + } + + if n.Having != nil { + node, ok := n.Having.Accept(v) + if !ok { + return n, false + } + n.Having = node.(*HavingClause) + } + + if n.OrderBy != nil { + node, ok := n.OrderBy.Accept(v) + if !ok { + return n, false + } + n.OrderBy = node.(*OrderByClause) + } + + if n.Limit != nil { + node, ok := n.Limit.Accept(v) + if !ok { + return n, false + } + n.Limit = node.(*Limit) + } + + return v.Leave(n) +} + +// UnionSelectList represents the select list in a union statement. +type UnionSelectList struct { + node + + Selects []*SelectStmt +} + +// Accept implements Node Accept interface. +func (n *UnionSelectList) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*UnionSelectList) + for i, sel := range n.Selects { + node, ok := sel.Accept(v) + if !ok { + return n, false + } + n.Selects[i] = node.(*SelectStmt) + } + return v.Leave(n) +} + +// UnionStmt represents "union statement" +// See: https://dev.mysql.com/doc/refman/5.7/en/union.html +type UnionStmt struct { + dmlNode + resultSetNode + + Distinct bool + SelectList *UnionSelectList + OrderBy *OrderByClause + Limit *Limit +} + +// Accept implements Node Accept interface. +func (n *UnionStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*UnionStmt) + if n.SelectList != nil { + node, ok := n.SelectList.Accept(v) + if !ok { + return n, false + } + n.SelectList = node.(*UnionSelectList) + } + if n.OrderBy != nil { + node, ok := n.OrderBy.Accept(v) + if !ok { + return n, false + } + n.OrderBy = node.(*OrderByClause) + } + if n.Limit != nil { + node, ok := n.Limit.Accept(v) + if !ok { + return n, false + } + n.Limit = node.(*Limit) + } + return v.Leave(n) +} + +// Assignment is the expression for assignment, like a = 1. +type Assignment struct { + node + // Column is the column name to be assigned. + Column *ColumnName + // Expr is the expression assigning to ColName. + Expr ExprNode +} + +// Accept implements Node Accept interface. +func (n *Assignment) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*Assignment) + node, ok := n.Column.Accept(v) + if !ok { + return n, false + } + n.Column = node.(*ColumnName) + node, ok = n.Expr.Accept(v) + if !ok { + return n, false + } + n.Expr = node.(ExprNode) + return v.Leave(n) +} + +// Priority const values. +// See: https://dev.mysql.com/doc/refman/5.7/en/insert.html +const ( + NoPriority = iota + LowPriority + HighPriority + DelayedPriority +) + +// InsertStmt is a statement to insert new rows into an existing table. +// See: https://dev.mysql.com/doc/refman/5.7/en/insert.html +type InsertStmt struct { + dmlNode + + IsReplace bool + Table *TableRefsClause + Columns []*ColumnName + Lists [][]ExprNode + Setlist []*Assignment + Priority int + OnDuplicate []*Assignment + Select ResultSetNode +} + +// Accept implements Node Accept interface. +func (n *InsertStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + + n = newNode.(*InsertStmt) + if n.Select != nil { + node, ok := n.Select.Accept(v) + if !ok { + return n, false + } + n.Select = node.(ResultSetNode) + } + + node, ok := n.Table.Accept(v) + if !ok { + return n, false + } + n.Table = node.(*TableRefsClause) + + for i, val := range n.Columns { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Columns[i] = node.(*ColumnName) + } + for i, list := range n.Lists { + for j, val := range list { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Lists[i][j] = node.(ExprNode) + } + } + for i, val := range n.Setlist { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Setlist[i] = node.(*Assignment) + } + for i, val := range n.OnDuplicate { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.OnDuplicate[i] = node.(*Assignment) + } + return v.Leave(n) +} + +// DeleteStmt is a statement to delete rows from table. +// See: https://dev.mysql.com/doc/refman/5.7/en/delete.html +type DeleteStmt struct { + dmlNode + + // Used in both single table and multiple table delete statement. + TableRefs *TableRefsClause + // Only used in multiple table delete statement. + Tables *DeleteTableList + Where ExprNode + Order *OrderByClause + Limit *Limit + LowPriority bool + Ignore bool + Quick bool + IsMultiTable bool + BeforeFrom bool +} + +// Accept implements Node Accept interface. +func (n *DeleteStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + + n = newNode.(*DeleteStmt) + node, ok := n.TableRefs.Accept(v) + if !ok { + return n, false + } + n.TableRefs = node.(*TableRefsClause) + + node, ok = n.Tables.Accept(v) + if !ok { + return n, false + } + n.Tables = node.(*DeleteTableList) + + if n.Where != nil { + node, ok = n.Where.Accept(v) + if !ok { + return n, false + } + n.Where = node.(ExprNode) + } + if n.Order != nil { + node, ok = n.Order.Accept(v) + if !ok { + return n, false + } + n.Order = node.(*OrderByClause) + } + if n.Limit != nil { + node, ok = n.Limit.Accept(v) + if !ok { + return n, false + } + n.Limit = node.(*Limit) + } + return v.Leave(n) +} + +// UpdateStmt is a statement to update columns of existing rows in tables with new values. +// See: https://dev.mysql.com/doc/refman/5.7/en/update.html +type UpdateStmt struct { + dmlNode + + TableRefs *TableRefsClause + List []*Assignment + Where ExprNode + Order *OrderByClause + Limit *Limit + LowPriority bool + Ignore bool + MultipleTable bool +} + +// Accept implements Node Accept interface. +func (n *UpdateStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*UpdateStmt) + node, ok := n.TableRefs.Accept(v) + if !ok { + return n, false + } + n.TableRefs = node.(*TableRefsClause) + for i, val := range n.List { + node, ok = val.Accept(v) + if !ok { + return n, false + } + n.List[i] = node.(*Assignment) + } + if n.Where != nil { + node, ok = n.Where.Accept(v) + if !ok { + return n, false + } + n.Where = node.(ExprNode) + } + if n.Order != nil { + node, ok = n.Order.Accept(v) + if !ok { + return n, false + } + n.Order = node.(*OrderByClause) + } + if n.Limit != nil { + node, ok = n.Limit.Accept(v) + if !ok { + return n, false + } + n.Limit = node.(*Limit) + } + return v.Leave(n) +} + +// Limit is the limit clause. +type Limit struct { + node + + Offset uint64 + Count uint64 +} + +// Accept implements Node Accept interface. +func (n *Limit) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*Limit) + return v.Leave(n) +} + +// ShowStmtType is the type for SHOW statement. +type ShowStmtType int + +// Show statement types. +const ( + ShowNone = iota + ShowEngines + ShowDatabases + ShowTables + ShowTableStatus + ShowColumns + ShowWarnings + ShowCharset + ShowVariables + ShowStatus + ShowCollation + ShowCreateTable + ShowGrants + ShowTriggers + ShowProcedureStatus + ShowIndex +) + +// ShowStmt is a statement to provide information about databases, tables, columns and so on. +// See: https://dev.mysql.com/doc/refman/5.7/en/show.html +type ShowStmt struct { + dmlNode + resultSetNode + + Tp ShowStmtType // Databases/Tables/Columns/.... + DBName string + Table *TableName // Used for showing columns. + Column *ColumnName // Used for `desc table column`. + Flag int // Some flag parsed from sql, such as FULL. + Full bool + User string // Used for show grants. + + // Used by show variables + GlobalScope bool + Pattern *PatternLikeExpr + Where ExprNode +} + +// Accept implements Node Accept interface. +func (n *ShowStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*ShowStmt) + if n.Table != nil { + node, ok := n.Table.Accept(v) + if !ok { + return n, false + } + n.Table = node.(*TableName) + } + if n.Column != nil { + node, ok := n.Column.Accept(v) + if !ok { + return n, false + } + n.Column = node.(*ColumnName) + } + if n.Pattern != nil { + node, ok := n.Pattern.Accept(v) + if !ok { + return n, false + } + n.Pattern = node.(*PatternLikeExpr) + } + if n.Where != nil { + node, ok := n.Where.Accept(v) + if !ok { + return n, false + } + n.Where = node.(ExprNode) + } + return v.Leave(n) +} diff --git a/vendor/github.com/pingcap/tidb/ast/expressions.go b/vendor/github.com/pingcap/tidb/ast/expressions.go new file mode 100644 index 000000000..4a679eae9 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ast/expressions.go @@ -0,0 +1,749 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ast + +import ( + "regexp" + + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/parser/opcode" + "github.com/pingcap/tidb/util/types" +) + +var ( + _ ExprNode = &BetweenExpr{} + _ ExprNode = &BinaryOperationExpr{} + _ ExprNode = &CaseExpr{} + _ ExprNode = &ColumnNameExpr{} + _ ExprNode = &CompareSubqueryExpr{} + _ ExprNode = &DefaultExpr{} + _ ExprNode = &ExistsSubqueryExpr{} + _ ExprNode = &IsNullExpr{} + _ ExprNode = &IsTruthExpr{} + _ ExprNode = &ParamMarkerExpr{} + _ ExprNode = &ParenthesesExpr{} + _ ExprNode = &PatternInExpr{} + _ ExprNode = &PatternLikeExpr{} + _ ExprNode = &PatternRegexpExpr{} + _ ExprNode = &PositionExpr{} + _ ExprNode = &RowExpr{} + _ ExprNode = &SubqueryExpr{} + _ ExprNode = &UnaryOperationExpr{} + _ ExprNode = &ValueExpr{} + _ ExprNode = &ValuesExpr{} + _ ExprNode = &VariableExpr{} + + _ Node = &ColumnName{} + _ Node = &WhenClause{} +) + +// ValueExpr is the simple value expression. +type ValueExpr struct { + exprNode +} + +// NewValueExpr creates a ValueExpr with value, and sets default field type. +func NewValueExpr(value interface{}) *ValueExpr { + if ve, ok := value.(*ValueExpr); ok { + return ve + } + ve := &ValueExpr{} + ve.SetValue(value) + if _, ok := value.(UnquoteString); ok { + ve.Type = types.NewFieldType(mysql.TypeVarchar) + ve.Type.Charset = mysql.DefaultCharset + ve.Type.Collate = mysql.DefaultCollationName + return ve + } + ve.Type = types.DefaultTypeForValue(value) + return ve +} + +// Accept implements Node interface. +func (n *ValueExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*ValueExpr) + return v.Leave(n) +} + +// BetweenExpr is for "between and" or "not between and" expression. +type BetweenExpr struct { + exprNode + // Expr is the expression to be checked. + Expr ExprNode + // Left is the expression for minimal value in the range. + Left ExprNode + // Right is the expression for maximum value in the range. + Right ExprNode + // Not is true, the expression is "not between and". + Not bool +} + +// Accept implements Node interface. +func (n *BetweenExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + + n = newNode.(*BetweenExpr) + node, ok := n.Expr.Accept(v) + if !ok { + return n, false + } + n.Expr = node.(ExprNode) + + node, ok = n.Left.Accept(v) + if !ok { + return n, false + } + n.Left = node.(ExprNode) + + node, ok = n.Right.Accept(v) + if !ok { + return n, false + } + n.Right = node.(ExprNode) + + return v.Leave(n) +} + +// BinaryOperationExpr is for binary operation like `1 + 1`, `1 - 1`, etc. +type BinaryOperationExpr struct { + exprNode + // Op is the operator code for BinaryOperation. + Op opcode.Op + // L is the left expression in BinaryOperation. + L ExprNode + // R is the right expression in BinaryOperation. + R ExprNode +} + +// Accept implements Node interface. +func (n *BinaryOperationExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + + n = newNode.(*BinaryOperationExpr) + node, ok := n.L.Accept(v) + if !ok { + return n, false + } + n.L = node.(ExprNode) + + node, ok = n.R.Accept(v) + if !ok { + return n, false + } + n.R = node.(ExprNode) + + return v.Leave(n) +} + +// WhenClause is the when clause in Case expression for "when condition then result". +type WhenClause struct { + node + // Expr is the condition expression in WhenClause. + Expr ExprNode + // Result is the result expression in WhenClause. + Result ExprNode +} + +// Accept implements Node Accept interface. +func (n *WhenClause) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + + n = newNode.(*WhenClause) + node, ok := n.Expr.Accept(v) + if !ok { + return n, false + } + n.Expr = node.(ExprNode) + + node, ok = n.Result.Accept(v) + if !ok { + return n, false + } + n.Result = node.(ExprNode) + return v.Leave(n) +} + +// CaseExpr is the case expression. +type CaseExpr struct { + exprNode + // Value is the compare value expression. + Value ExprNode + // WhenClauses is the condition check expression. + WhenClauses []*WhenClause + // ElseClause is the else result expression. + ElseClause ExprNode +} + +// Accept implements Node Accept interface. +func (n *CaseExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + + n = newNode.(*CaseExpr) + if n.Value != nil { + node, ok := n.Value.Accept(v) + if !ok { + return n, false + } + n.Value = node.(ExprNode) + } + for i, val := range n.WhenClauses { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.WhenClauses[i] = node.(*WhenClause) + } + if n.ElseClause != nil { + node, ok := n.ElseClause.Accept(v) + if !ok { + return n, false + } + n.ElseClause = node.(ExprNode) + } + return v.Leave(n) +} + +// SubqueryExec represents a subquery executor interface. +// This interface is implemented in executor and used in plan/evaluator. +// It will execute the subselect and get the result. +type SubqueryExec interface { + ExprNode + + // EvalRows executes the subquery and returns the multi rows with rowCount. + // rowCount < 0 means no limit. + // If the ColumnCount is 1, we will return a column result like {1, 2, 3}, + // otherwise, we will return a table result like {{1, 1}, {2, 2}}. + EvalRows(ctx context.Context, rowCount int) ([]interface{}, error) + + // ColumnCount returns column count for the sub query. + ColumnCount() (int, error) +} + +// SubqueryExpr represents a subquery. +type SubqueryExpr struct { + exprNode + // Query is the query SelectNode. + Query ResultSetNode + SubqueryExec SubqueryExec + Evaluated bool + UseOuterContext bool +} + +// Accept implements Node Accept interface. +func (n *SubqueryExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*SubqueryExpr) + + if n.SubqueryExec != nil { + t, ok := n.SubqueryExec.Accept(v) + if !ok { + return n, false + } + sq, ok := t.(SubqueryExec) + if !ok { + return n, false + } + n.SubqueryExec = sq + return v.Leave(n) + } + + node, ok := n.Query.Accept(v) + if !ok { + return n, false + } + n.Query = node.(ResultSetNode) + + return v.Leave(n) +} + +// SetResultFields implements ResultSetNode interface. +func (n *SubqueryExpr) SetResultFields(rfs []*ResultField) { + n.Query.SetResultFields(rfs) +} + +// GetResultFields implements ResultSetNode interface. +func (n *SubqueryExpr) GetResultFields() []*ResultField { + return n.Query.GetResultFields() +} + +// CompareSubqueryExpr is the expression for "expr cmp (select ...)". +// See: https://dev.mysql.com/doc/refman/5.7/en/comparisons-using-subqueries.html +// See: https://dev.mysql.com/doc/refman/5.7/en/any-in-some-subqueries.html +// See: https://dev.mysql.com/doc/refman/5.7/en/all-subqueries.html +type CompareSubqueryExpr struct { + exprNode + // L is the left expression + L ExprNode + // Op is the comparison opcode. + Op opcode.Op + // R is the subquery for right expression, may be rewritten to other type of expression. + R ExprNode + // All is true, we should compare all records in subquery. + All bool +} + +// Accept implements Node Accept interface. +func (n *CompareSubqueryExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*CompareSubqueryExpr) + node, ok := n.L.Accept(v) + if !ok { + return n, false + } + n.L = node.(ExprNode) + node, ok = n.R.Accept(v) + if !ok { + return n, false + } + n.R = node.(ExprNode) + return v.Leave(n) +} + +// ColumnName represents column name. +type ColumnName struct { + node + Schema model.CIStr + Table model.CIStr + Name model.CIStr +} + +// Accept implements Node Accept interface. +func (n *ColumnName) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*ColumnName) + return v.Leave(n) +} + +// ColumnNameExpr represents a column name expression. +type ColumnNameExpr struct { + exprNode + + // Name is the referenced column name. + Name *ColumnName + + // Refer is the result field the column name refers to. + // The value of Refer.Expr is used as the value of the expression. + Refer *ResultField +} + +// Accept implements Node Accept interface. +func (n *ColumnNameExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*ColumnNameExpr) + node, ok := n.Name.Accept(v) + if !ok { + return n, false + } + n.Name = node.(*ColumnName) + return v.Leave(n) +} + +// DefaultExpr is the default expression using default value for a column. +type DefaultExpr struct { + exprNode + // Name is the column name. + Name *ColumnName +} + +// Accept implements Node Accept interface. +func (n *DefaultExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*DefaultExpr) + if n.Name != nil { + node, ok := n.Name.Accept(v) + if !ok { + return n, false + } + n.Name = node.(*ColumnName) + } + return v.Leave(n) +} + +// ExistsSubqueryExpr is the expression for "exists (select ...)". +// https://dev.mysql.com/doc/refman/5.7/en/exists-and-not-exists-subqueries.html +type ExistsSubqueryExpr struct { + exprNode + // Sel is the subquery, may be rewritten to other type of expression. + Sel ExprNode +} + +// Accept implements Node Accept interface. +func (n *ExistsSubqueryExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*ExistsSubqueryExpr) + node, ok := n.Sel.Accept(v) + if !ok { + return n, false + } + n.Sel = node.(ExprNode) + return v.Leave(n) +} + +// PatternInExpr is the expression for in operator, like "expr in (1, 2, 3)" or "expr in (select c from t)". +type PatternInExpr struct { + exprNode + // Expr is the value expression to be compared. + Expr ExprNode + // List is the list expression in compare list. + List []ExprNode + // Not is true, the expression is "not in". + Not bool + // Sel is the subquery, may be rewritten to other type of expression. + Sel ExprNode +} + +// Accept implements Node Accept interface. +func (n *PatternInExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*PatternInExpr) + node, ok := n.Expr.Accept(v) + if !ok { + return n, false + } + n.Expr = node.(ExprNode) + for i, val := range n.List { + node, ok = val.Accept(v) + if !ok { + return n, false + } + n.List[i] = node.(ExprNode) + } + if n.Sel != nil { + node, ok = n.Sel.Accept(v) + if !ok { + return n, false + } + n.Sel = node.(ExprNode) + } + return v.Leave(n) +} + +// IsNullExpr is the expression for null check. +type IsNullExpr struct { + exprNode + // Expr is the expression to be checked. + Expr ExprNode + // Not is true, the expression is "is not null". + Not bool +} + +// Accept implements Node Accept interface. +func (n *IsNullExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*IsNullExpr) + node, ok := n.Expr.Accept(v) + if !ok { + return n, false + } + n.Expr = node.(ExprNode) + return v.Leave(n) +} + +// IsTruthExpr is the expression for true/false check. +type IsTruthExpr struct { + exprNode + // Expr is the expression to be checked. + Expr ExprNode + // Not is true, the expression is "is not true/false". + Not bool + // True indicates checking true or false. + True int64 +} + +// Accept implements Node Accept interface. +func (n *IsTruthExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*IsTruthExpr) + node, ok := n.Expr.Accept(v) + if !ok { + return n, false + } + n.Expr = node.(ExprNode) + return v.Leave(n) +} + +// PatternLikeExpr is the expression for like operator, e.g, expr like "%123%" +type PatternLikeExpr struct { + exprNode + // Expr is the expression to be checked. + Expr ExprNode + // Pattern is the like expression. + Pattern ExprNode + // Not is true, the expression is "not like". + Not bool + + Escape byte + + PatChars []byte + PatTypes []byte +} + +// Accept implements Node Accept interface. +func (n *PatternLikeExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*PatternLikeExpr) + if n.Expr != nil { + node, ok := n.Expr.Accept(v) + if !ok { + return n, false + } + n.Expr = node.(ExprNode) + } + if n.Pattern != nil { + node, ok := n.Pattern.Accept(v) + if !ok { + return n, false + } + n.Pattern = node.(ExprNode) + } + return v.Leave(n) +} + +// ParamMarkerExpr expression holds a place for another expression. +// Used in parsing prepare statement. +type ParamMarkerExpr struct { + exprNode + Offset int +} + +// Accept implements Node Accept interface. +func (n *ParamMarkerExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*ParamMarkerExpr) + return v.Leave(n) +} + +// ParenthesesExpr is the parentheses expression. +type ParenthesesExpr struct { + exprNode + // Expr is the expression in parentheses. + Expr ExprNode +} + +// Accept implements Node Accept interface. +func (n *ParenthesesExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*ParenthesesExpr) + if n.Expr != nil { + node, ok := n.Expr.Accept(v) + if !ok { + return n, false + } + n.Expr = node.(ExprNode) + } + return v.Leave(n) +} + +// PositionExpr is the expression for order by and group by position. +// MySQL use position expression started from 1, it looks a little confused inner. +// maybe later we will use 0 at first. +type PositionExpr struct { + exprNode + // N is the position, started from 1 now. + N int + // Refer is the result field the position refers to. + Refer *ResultField +} + +// Accept implements Node Accept interface. +func (n *PositionExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*PositionExpr) + return v.Leave(n) +} + +// PatternRegexpExpr is the pattern expression for pattern match. +type PatternRegexpExpr struct { + exprNode + // Expr is the expression to be checked. + Expr ExprNode + // Pattern is the expression for pattern. + Pattern ExprNode + // Not is true, the expression is "not rlike", + Not bool + + // Re is the compiled regexp. + Re *regexp.Regexp + // Sexpr is the string for Expr expression. + Sexpr *string +} + +// Accept implements Node Accept interface. +func (n *PatternRegexpExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*PatternRegexpExpr) + node, ok := n.Expr.Accept(v) + if !ok { + return n, false + } + n.Expr = node.(ExprNode) + node, ok = n.Pattern.Accept(v) + if !ok { + return n, false + } + n.Pattern = node.(ExprNode) + return v.Leave(n) +} + +// RowExpr is the expression for row constructor. +// See https://dev.mysql.com/doc/refman/5.7/en/row-subqueries.html +type RowExpr struct { + exprNode + + Values []ExprNode +} + +// Accept implements Node Accept interface. +func (n *RowExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*RowExpr) + for i, val := range n.Values { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Values[i] = node.(ExprNode) + } + return v.Leave(n) +} + +// UnaryOperationExpr is the expression for unary operator. +type UnaryOperationExpr struct { + exprNode + // Op is the operator opcode. + Op opcode.Op + // V is the unary expression. + V ExprNode +} + +// Accept implements Node Accept interface. +func (n *UnaryOperationExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*UnaryOperationExpr) + node, ok := n.V.Accept(v) + if !ok { + return n, false + } + n.V = node.(ExprNode) + return v.Leave(n) +} + +// ValuesExpr is the expression used in INSERT VALUES +type ValuesExpr struct { + exprNode + // model.CIStr is column name. + Column *ColumnNameExpr +} + +// Accept implements Node Accept interface. +func (n *ValuesExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*ValuesExpr) + node, ok := n.Column.Accept(v) + if !ok { + return n, false + } + n.Column = node.(*ColumnNameExpr) + return v.Leave(n) +} + +// VariableExpr is the expression for variable. +type VariableExpr struct { + exprNode + // Name is the variable name. + Name string + // IsGlobal indicates whether this variable is global. + IsGlobal bool + // IsSystem indicates whether this variable is a system variable in current session. + IsSystem bool +} + +// Accept implements Node Accept interface. +func (n *VariableExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*VariableExpr) + return v.Leave(n) +} diff --git a/vendor/github.com/pingcap/tidb/ast/flag.go b/vendor/github.com/pingcap/tidb/ast/flag.go new file mode 100644 index 000000000..cf121f86d --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ast/flag.go @@ -0,0 +1,165 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ast + +const preEvaluable = FlagHasParamMarker | FlagHasFunc | FlagHasVariable | FlagHasDefault + +// IsPreEvaluable checks if the expression can be evaluated before execution. +func IsPreEvaluable(expr ExprNode) bool { + return expr.GetFlag()|preEvaluable == preEvaluable +} + +// IsConstant checks if the expression is constant. +// A constant expression is safe to be rewritten to value expression. +func IsConstant(expr ExprNode) bool { + return expr.GetFlag() == FlagConstant +} + +// HasAggFlag checks if the expr contains FlagHasAggregateFunc. +func HasAggFlag(expr ExprNode) bool { + return expr.GetFlag()&FlagHasAggregateFunc > 0 +} + +// SetFlag sets flag for expression. +func SetFlag(n Node) { + var setter flagSetter + n.Accept(&setter) +} + +type flagSetter struct { +} + +func (f *flagSetter) Enter(in Node) (Node, bool) { + return in, false +} + +func (f *flagSetter) Leave(in Node) (Node, bool) { + switch x := in.(type) { + case *AggregateFuncExpr: + f.aggregateFunc(x) + case *BetweenExpr: + x.SetFlag(x.Expr.GetFlag() | x.Left.GetFlag() | x.Right.GetFlag()) + case *BinaryOperationExpr: + x.SetFlag(x.L.GetFlag() | x.R.GetFlag()) + case *CaseExpr: + f.caseExpr(x) + case *ColumnNameExpr: + x.SetFlag(FlagHasReference) + case *CompareSubqueryExpr: + x.SetFlag(x.L.GetFlag() | x.R.GetFlag()) + case *DefaultExpr: + x.SetFlag(FlagHasDefault) + case *ExistsSubqueryExpr: + x.SetFlag(x.Sel.GetFlag()) + case *FuncCallExpr: + f.funcCall(x) + case *FuncCastExpr: + x.SetFlag(FlagHasFunc | x.Expr.GetFlag()) + case *IsNullExpr: + x.SetFlag(x.Expr.GetFlag()) + case *IsTruthExpr: + x.SetFlag(x.Expr.GetFlag()) + case *ParamMarkerExpr: + x.SetFlag(FlagHasParamMarker) + case *ParenthesesExpr: + x.SetFlag(x.Expr.GetFlag()) + case *PatternInExpr: + f.patternIn(x) + case *PatternLikeExpr: + f.patternLike(x) + case *PatternRegexpExpr: + f.patternRegexp(x) + case *PositionExpr: + x.SetFlag(FlagHasReference) + case *RowExpr: + f.row(x) + case *SubqueryExpr: + x.SetFlag(FlagHasSubquery) + case *UnaryOperationExpr: + x.SetFlag(x.V.GetFlag()) + case *ValueExpr: + case *ValuesExpr: + x.SetFlag(FlagHasReference) + case *VariableExpr: + x.SetFlag(FlagHasVariable) + } + + return in, true +} + +func (f *flagSetter) caseExpr(x *CaseExpr) { + var flag uint64 + if x.Value != nil { + flag |= x.Value.GetFlag() + } + for _, val := range x.WhenClauses { + flag |= val.Expr.GetFlag() + flag |= val.Result.GetFlag() + } + if x.ElseClause != nil { + flag |= x.ElseClause.GetFlag() + } + x.SetFlag(flag) +} + +func (f *flagSetter) patternIn(x *PatternInExpr) { + flag := x.Expr.GetFlag() + for _, val := range x.List { + flag |= val.GetFlag() + } + if x.Sel != nil { + flag |= x.Sel.GetFlag() + } + x.SetFlag(flag) +} + +func (f *flagSetter) patternLike(x *PatternLikeExpr) { + flag := x.Pattern.GetFlag() + if x.Expr != nil { + flag |= x.Expr.GetFlag() + } + x.SetFlag(flag) +} + +func (f *flagSetter) patternRegexp(x *PatternRegexpExpr) { + flag := x.Pattern.GetFlag() + if x.Expr != nil { + flag |= x.Expr.GetFlag() + } + x.SetFlag(flag) +} + +func (f *flagSetter) row(x *RowExpr) { + var flag uint64 + for _, val := range x.Values { + flag |= val.GetFlag() + } + x.SetFlag(flag) +} + +func (f *flagSetter) funcCall(x *FuncCallExpr) { + flag := FlagHasFunc + for _, val := range x.Args { + flag |= val.GetFlag() + } + x.SetFlag(flag) +} + +func (f *flagSetter) aggregateFunc(x *AggregateFuncExpr) { + flag := FlagHasAggregateFunc + for _, val := range x.Args { + flag |= val.GetFlag() + } + x.SetFlag(flag) +} diff --git a/vendor/github.com/pingcap/tidb/ast/functions.go b/vendor/github.com/pingcap/tidb/ast/functions.go new file mode 100644 index 000000000..3bbcc3a18 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ast/functions.go @@ -0,0 +1,403 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ast + +import ( + "bytes" + "fmt" + "strings" + + "github.com/juju/errors" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/util/distinct" + "github.com/pingcap/tidb/util/types" +) + +var ( + _ FuncNode = &AggregateFuncExpr{} + _ FuncNode = &FuncCallExpr{} + _ FuncNode = &FuncCastExpr{} +) + +// UnquoteString is not quoted when printed. +type UnquoteString string + +// FuncCallExpr is for function expression. +type FuncCallExpr struct { + funcNode + // FnName is the function name. + FnName model.CIStr + // Args is the function args. + Args []ExprNode +} + +// Accept implements Node interface. +func (n *FuncCallExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*FuncCallExpr) + for i, val := range n.Args { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Args[i] = node.(ExprNode) + } + return v.Leave(n) +} + +// CastFunctionType is the type for cast function. +type CastFunctionType int + +// CastFunction types +const ( + CastFunction CastFunctionType = iota + 1 + CastConvertFunction + CastBinaryOperator +) + +// FuncCastExpr is the cast function converting value to another type, e.g, cast(expr AS signed). +// See https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html +type FuncCastExpr struct { + funcNode + // Expr is the expression to be converted. + Expr ExprNode + // Tp is the conversion type. + Tp *types.FieldType + // Cast, Convert and Binary share this struct. + FunctionType CastFunctionType +} + +// Accept implements Node Accept interface. +func (n *FuncCastExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*FuncCastExpr) + node, ok := n.Expr.Accept(v) + if !ok { + return n, false + } + n.Expr = node.(ExprNode) + return v.Leave(n) +} + +// TrimDirectionType is the type for trim direction. +type TrimDirectionType int + +const ( + // TrimBothDefault trims from both direction by default. + TrimBothDefault TrimDirectionType = iota + // TrimBoth trims from both direction with explicit notation. + TrimBoth + // TrimLeading trims from left. + TrimLeading + // TrimTrailing trims from right. + TrimTrailing +) + +// DateArithType is type for DateArith type. +type DateArithType byte + +const ( + // DateAdd is to run adddate or date_add function option. + // See: https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_adddate + // See: https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_date-add + DateAdd DateArithType = iota + 1 + // DateSub is to run subdate or date_sub function option. + // See: https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_subdate + // See: https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_date-sub + DateSub +) + +// DateArithInterval is the struct of DateArith interval part. +type DateArithInterval struct { + Unit string + Interval ExprNode +} + +const ( + // AggFuncCount is the name of Count function. + AggFuncCount = "count" + // AggFuncSum is the name of Sum function. + AggFuncSum = "sum" + // AggFuncAvg is the name of Avg function. + AggFuncAvg = "avg" + // AggFuncFirstRow is the name of FirstRowColumn function. + AggFuncFirstRow = "firstrow" + // AggFuncMax is the name of max function. + AggFuncMax = "max" + // AggFuncMin is the name of min function. + AggFuncMin = "min" + // AggFuncGroupConcat is the name of group_concat function. + AggFuncGroupConcat = "group_concat" +) + +// AggregateFuncExpr represents aggregate function expression. +type AggregateFuncExpr struct { + funcNode + // F is the function name. + F string + // Args is the function args. + Args []ExprNode + // If distinct is true, the function only aggregate distinct values. + // For example, column c1 values are "1", "2", "2", "sum(c1)" is "5", + // but "sum(distinct c1)" is "3". + Distinct bool + + CurrentGroup string + // contextPerGroupMap is used to store aggregate evaluation context. + // Each entry for a group. + contextPerGroupMap map[string](*AggEvaluateContext) +} + +// Accept implements Node Accept interface. +func (n *AggregateFuncExpr) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*AggregateFuncExpr) + for i, val := range n.Args { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Args[i] = node.(ExprNode) + } + return v.Leave(n) +} + +// Clear clears aggregate computing context. +func (n *AggregateFuncExpr) Clear() { + n.CurrentGroup = "" + n.contextPerGroupMap = nil +} + +// Update is used for update aggregate context. +func (n *AggregateFuncExpr) Update() error { + name := strings.ToLower(n.F) + switch name { + case AggFuncCount: + return n.updateCount() + case AggFuncFirstRow: + return n.updateFirstRow() + case AggFuncGroupConcat: + return n.updateGroupConcat() + case AggFuncMax: + return n.updateMaxMin(true) + case AggFuncMin: + return n.updateMaxMin(false) + case AggFuncSum, AggFuncAvg: + return n.updateSum() + } + return nil +} + +// GetContext gets aggregate evaluation context for the current group. +// If it is nil, add a new context into contextPerGroupMap. +func (n *AggregateFuncExpr) GetContext() *AggEvaluateContext { + if n.contextPerGroupMap == nil { + n.contextPerGroupMap = make(map[string](*AggEvaluateContext)) + } + if _, ok := n.contextPerGroupMap[n.CurrentGroup]; !ok { + c := &AggEvaluateContext{} + if n.Distinct { + c.distinctChecker = distinct.CreateDistinctChecker() + } + n.contextPerGroupMap[n.CurrentGroup] = c + } + return n.contextPerGroupMap[n.CurrentGroup] +} + +func (n *AggregateFuncExpr) updateCount() error { + ctx := n.GetContext() + vals := make([]interface{}, 0, len(n.Args)) + for _, a := range n.Args { + value := a.GetValue() + if value == nil { + return nil + } + vals = append(vals, value) + } + if n.Distinct { + d, err := ctx.distinctChecker.Check(vals) + if err != nil { + return errors.Trace(err) + } + if !d { + return nil + } + } + ctx.Count++ + return nil +} + +func (n *AggregateFuncExpr) updateFirstRow() error { + ctx := n.GetContext() + if ctx.evaluated { + return nil + } + if len(n.Args) != 1 { + return errors.New("Wrong number of args for AggFuncFirstRow") + } + ctx.Value = n.Args[0].GetValue() + ctx.evaluated = true + return nil +} + +func (n *AggregateFuncExpr) updateMaxMin(max bool) error { + ctx := n.GetContext() + if len(n.Args) != 1 { + return errors.New("Wrong number of args for AggFuncFirstRow") + } + v := n.Args[0].GetValue() + if !ctx.evaluated { + ctx.Value = v + ctx.evaluated = true + return nil + } + c, err := types.Compare(ctx.Value, v) + if err != nil { + return errors.Trace(err) + } + if max { + if c == -1 { + ctx.Value = v + } + } else { + if c == 1 { + ctx.Value = v + } + + } + return nil +} + +func (n *AggregateFuncExpr) updateSum() error { + ctx := n.GetContext() + a := n.Args[0] + value := a.GetValue() + if value == nil { + return nil + } + if n.Distinct { + d, err := ctx.distinctChecker.Check([]interface{}{value}) + if err != nil { + return errors.Trace(err) + } + if !d { + return nil + } + } + var err error + ctx.Value, err = types.CalculateSum(ctx.Value, value) + if err != nil { + return errors.Trace(err) + } + ctx.Count++ + return nil +} + +func (n *AggregateFuncExpr) updateGroupConcat() error { + ctx := n.GetContext() + vals := make([]interface{}, 0, len(n.Args)) + for _, a := range n.Args { + value := a.GetValue() + if value == nil { + return nil + } + vals = append(vals, value) + } + if n.Distinct { + d, err := ctx.distinctChecker.Check(vals) + if err != nil { + return errors.Trace(err) + } + if !d { + return nil + } + } + if ctx.Buffer == nil { + ctx.Buffer = &bytes.Buffer{} + } else { + // now use comma separator + ctx.Buffer.WriteString(",") + } + for _, val := range vals { + ctx.Buffer.WriteString(fmt.Sprintf("%v", val)) + } + // TODO: if total length is greater than global var group_concat_max_len, truncate it. + return nil +} + +// AggregateFuncExtractor visits Expr tree. +// It converts ColunmNameExpr to AggregateFuncExpr and collects AggregateFuncExpr. +type AggregateFuncExtractor struct { + inAggregateFuncExpr bool + // AggFuncs is the collected AggregateFuncExprs. + AggFuncs []*AggregateFuncExpr + extracting bool +} + +// Enter implements Visitor interface. +func (a *AggregateFuncExtractor) Enter(n Node) (node Node, skipChildren bool) { + switch n.(type) { + case *AggregateFuncExpr: + a.inAggregateFuncExpr = true + case *SelectStmt, *InsertStmt, *DeleteStmt, *UpdateStmt: + // Enter a new context, skip it. + // For example: select sum(c) + c + exists(select c from t) from t; + if a.extracting { + return n, true + } + } + a.extracting = true + return n, false +} + +// Leave implements Visitor interface. +func (a *AggregateFuncExtractor) Leave(n Node) (node Node, ok bool) { + switch v := n.(type) { + case *AggregateFuncExpr: + a.inAggregateFuncExpr = false + a.AggFuncs = append(a.AggFuncs, v) + case *ColumnNameExpr: + // compose new AggregateFuncExpr + if !a.inAggregateFuncExpr { + // For example: select sum(c) + c from t; + // The c in sum() should be evaluated for each row. + // The c after plus should be evaluated only once. + agg := &AggregateFuncExpr{ + F: AggFuncFirstRow, + Args: []ExprNode{v}, + } + a.AggFuncs = append(a.AggFuncs, agg) + return agg, true + } + } + return n, true +} + +// AggEvaluateContext is used to store intermediate result when caculation aggregate functions. +type AggEvaluateContext struct { + distinctChecker *distinct.Checker + Count int64 + Value interface{} + Buffer *bytes.Buffer // Buffer is used for group_concat. + evaluated bool +} diff --git a/vendor/github.com/pingcap/tidb/ast/misc.go b/vendor/github.com/pingcap/tidb/ast/misc.go new file mode 100644 index 000000000..27ec5e923 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ast/misc.go @@ -0,0 +1,507 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ast + +import ( + "fmt" + + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/sessionctx/db" +) + +var ( + _ StmtNode = &AdminStmt{} + _ StmtNode = &BeginStmt{} + _ StmtNode = &CommitStmt{} + _ StmtNode = &CreateUserStmt{} + _ StmtNode = &DeallocateStmt{} + _ StmtNode = &DoStmt{} + _ StmtNode = &ExecuteStmt{} + _ StmtNode = &ExplainStmt{} + _ StmtNode = &GrantStmt{} + _ StmtNode = &PrepareStmt{} + _ StmtNode = &RollbackStmt{} + _ StmtNode = &SetCharsetStmt{} + _ StmtNode = &SetPwdStmt{} + _ StmtNode = &SetStmt{} + _ StmtNode = &UseStmt{} + + _ Node = &PrivElem{} + _ Node = &VariableAssignment{} +) + +// TypeOpt is used for parsing data type option from SQL. +type TypeOpt struct { + IsUnsigned bool + IsZerofill bool +} + +// FloatOpt is used for parsing floating-point type option from SQL. +// See: http://dev.mysql.com/doc/refman/5.7/en/floating-point-types.html +type FloatOpt struct { + Flen int + Decimal int +} + +// AuthOption is used for parsing create use statement. +type AuthOption struct { + // AuthString/HashString can be empty, so we need to decide which one to use. + ByAuthString bool + AuthString string + HashString string + // TODO: support auth_plugin +} + +// ExplainStmt is a statement to provide information about how is SQL statement executed +// or get columns information in a table. +// See: https://dev.mysql.com/doc/refman/5.7/en/explain.html +type ExplainStmt struct { + stmtNode + + Stmt StmtNode +} + +// Accept implements Node Accept interface. +func (n *ExplainStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*ExplainStmt) + node, ok := n.Stmt.Accept(v) + if !ok { + return n, false + } + n.Stmt = node.(DMLNode) + return v.Leave(n) +} + +// PrepareStmt is a statement to prepares a SQL statement which contains placeholders, +// and it is executed with ExecuteStmt and released with DeallocateStmt. +// See: https://dev.mysql.com/doc/refman/5.7/en/prepare.html +type PrepareStmt struct { + stmtNode + + Name string + SQLText string + SQLVar *VariableExpr +} + +// Accept implements Node Accept interface. +func (n *PrepareStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*PrepareStmt) + if n.SQLVar != nil { + node, ok := n.SQLVar.Accept(v) + if !ok { + return n, false + } + n.SQLVar = node.(*VariableExpr) + } + return v.Leave(n) +} + +// DeallocateStmt is a statement to release PreparedStmt. +// See: https://dev.mysql.com/doc/refman/5.7/en/deallocate-prepare.html +type DeallocateStmt struct { + stmtNode + + Name string +} + +// Accept implements Node Accept interface. +func (n *DeallocateStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*DeallocateStmt) + return v.Leave(n) +} + +// ExecuteStmt is a statement to execute PreparedStmt. +// See: https://dev.mysql.com/doc/refman/5.7/en/execute.html +type ExecuteStmt struct { + stmtNode + + Name string + UsingVars []ExprNode +} + +// Accept implements Node Accept interface. +func (n *ExecuteStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*ExecuteStmt) + for i, val := range n.UsingVars { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.UsingVars[i] = node.(ExprNode) + } + return v.Leave(n) +} + +// BeginStmt is a statement to start a new transaction. +// See: https://dev.mysql.com/doc/refman/5.7/en/commit.html +type BeginStmt struct { + stmtNode +} + +// Accept implements Node Accept interface. +func (n *BeginStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*BeginStmt) + return v.Leave(n) +} + +// CommitStmt is a statement to commit the current transaction. +// See: https://dev.mysql.com/doc/refman/5.7/en/commit.html +type CommitStmt struct { + stmtNode +} + +// Accept implements Node Accept interface. +func (n *CommitStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*CommitStmt) + return v.Leave(n) +} + +// RollbackStmt is a statement to roll back the current transaction. +// See: https://dev.mysql.com/doc/refman/5.7/en/commit.html +type RollbackStmt struct { + stmtNode +} + +// Accept implements Node Accept interface. +func (n *RollbackStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*RollbackStmt) + return v.Leave(n) +} + +// UseStmt is a statement to use the DBName database as the current database. +// See: https://dev.mysql.com/doc/refman/5.7/en/use.html +type UseStmt struct { + stmtNode + + DBName string +} + +// Accept implements Node Accept interface. +func (n *UseStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*UseStmt) + return v.Leave(n) +} + +// VariableAssignment is a variable assignment struct. +type VariableAssignment struct { + node + Name string + Value ExprNode + IsGlobal bool + IsSystem bool +} + +// Accept implements Node interface. +func (n *VariableAssignment) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*VariableAssignment) + node, ok := n.Value.Accept(v) + if !ok { + return n, false + } + n.Value = node.(ExprNode) + return v.Leave(n) +} + +// SetStmt is the statement to set variables. +type SetStmt struct { + stmtNode + // Variables is the list of variable assignment. + Variables []*VariableAssignment +} + +// Accept implements Node Accept interface. +func (n *SetStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*SetStmt) + for i, val := range n.Variables { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Variables[i] = node.(*VariableAssignment) + } + return v.Leave(n) +} + +// SetCharsetStmt is a statement to assign values to character and collation variables. +// See: https://dev.mysql.com/doc/refman/5.7/en/set-statement.html +type SetCharsetStmt struct { + stmtNode + + Charset string + Collate string +} + +// Accept implements Node Accept interface. +func (n *SetCharsetStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*SetCharsetStmt) + return v.Leave(n) +} + +// SetPwdStmt is a statement to assign a password to user account. +// See: https://dev.mysql.com/doc/refman/5.7/en/set-password.html +type SetPwdStmt struct { + stmtNode + + User string + Password string +} + +// Accept implements Node Accept interface. +func (n *SetPwdStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*SetPwdStmt) + return v.Leave(n) +} + +// UserSpec is used for parsing create user statement. +type UserSpec struct { + User string + AuthOpt *AuthOption +} + +// CreateUserStmt creates user account. +// See: https://dev.mysql.com/doc/refman/5.7/en/create-user.html +type CreateUserStmt struct { + stmtNode + + IfNotExists bool + Specs []*UserSpec +} + +// Accept implements Node Accept interface. +func (n *CreateUserStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*CreateUserStmt) + return v.Leave(n) +} + +// DoStmt is the struct for DO statement. +type DoStmt struct { + stmtNode + + Exprs []ExprNode +} + +// Accept implements Node Accept interface. +func (n *DoStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*DoStmt) + for i, val := range n.Exprs { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Exprs[i] = node.(ExprNode) + } + return v.Leave(n) +} + +// AdminStmtType is the type for admin statement. +type AdminStmtType int + +// Admin statement types. +const ( + AdminShowDDL = iota + 1 + AdminCheckTable +) + +// AdminStmt is the struct for Admin statement. +type AdminStmt struct { + stmtNode + + Tp AdminStmtType + Tables []*TableName +} + +// Accept implements Node Accpet interface. +func (n *AdminStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + + n = newNode.(*AdminStmt) + for i, val := range n.Tables { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Tables[i] = node.(*TableName) + } + + return v.Leave(n) +} + +// PrivElem is the privilege type and optional column list. +type PrivElem struct { + node + + Priv mysql.PrivilegeType + Cols []*ColumnName +} + +// Accept implements Node Accept interface. +func (n *PrivElem) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*PrivElem) + for i, val := range n.Cols { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Cols[i] = node.(*ColumnName) + } + return v.Leave(n) +} + +// ObjectTypeType is the type for object type. +type ObjectTypeType int + +const ( + // ObjectTypeNone is for empty object type. + ObjectTypeNone ObjectTypeType = iota + 1 + // ObjectTypeTable means the following object is a table. + ObjectTypeTable +) + +// GrantLevelType is the type for grant level. +type GrantLevelType int + +const ( + // GrantLevelNone is the dummy const for default value. + GrantLevelNone GrantLevelType = iota + 1 + // GrantLevelGlobal means the privileges are administrative or apply to all databases on a given server. + GrantLevelGlobal + // GrantLevelDB means the privileges apply to all objects in a given database. + GrantLevelDB + // GrantLevelTable means the privileges apply to all columns in a given table. + GrantLevelTable +) + +// GrantLevel is used for store the privilege scope. +type GrantLevel struct { + Level GrantLevelType + DBName string + TableName string +} + +// GrantStmt is the struct for GRANT statement. +type GrantStmt struct { + stmtNode + + Privs []*PrivElem + ObjectType ObjectTypeType + Level *GrantLevel + Users []*UserSpec +} + +// Accept implements Node Accept interface. +func (n *GrantStmt) Accept(v Visitor) (Node, bool) { + newNode, skipChildren := v.Enter(n) + if skipChildren { + return v.Leave(newNode) + } + n = newNode.(*GrantStmt) + for i, val := range n.Privs { + node, ok := val.Accept(v) + if !ok { + return n, false + } + n.Privs[i] = node.(*PrivElem) + } + return v.Leave(n) +} + +// Ident is the table identifier composed of schema name and table name. +type Ident struct { + Schema model.CIStr + Name model.CIStr +} + +// Full returns an Ident which set schema to the current schema if it is empty. +func (i Ident) Full(ctx context.Context) (full Ident) { + full.Name = i.Name + if i.Schema.O != "" { + full.Schema = i.Schema + } else { + full.Schema = model.NewCIStr(db.GetCurrentSchema(ctx)) + } + return +} + +// String implements fmt.Stringer interface +func (i Ident) String() string { + if i.Schema.O == "" { + return i.Name.O + } + return fmt.Sprintf("%s.%s", i.Schema, i.Name) +} diff --git a/vendor/github.com/pingcap/tidb/ast/stringer.go b/vendor/github.com/pingcap/tidb/ast/stringer.go new file mode 100644 index 000000000..c984fe09d --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ast/stringer.go @@ -0,0 +1,57 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ast + +import ( + "fmt" + "github.com/pingcap/tidb/util/types" +) + +// ToString converts a node to a string for debugging purpose. +func ToString(node Node) string { + s := &stringer{strMap: map[Node]string{}} + node.Accept(s) + return s.strMap[node] +} + +type stringer struct { + strMap map[Node]string +} + +// Enter implements Visitor Enter interface. +func (c *stringer) Enter(node Node) (Node, bool) { + return node, false +} + +// Leave implements Visitor Leave interface. +func (c *stringer) Leave(in Node) (out Node, ok bool) { + switch x := in.(type) { + case *BinaryOperationExpr: + left := c.strMap[x.L] + right := c.strMap[x.R] + c.strMap[x] = left + " " + x.Op.String() + " " + right + case *ValueExpr: + str, _ := types.ToString(x.GetValue()) + c.strMap[x] = str + case *ParenthesesExpr: + c.strMap[x] = "(" + c.strMap[x.Expr] + ")" + case *ColumnNameExpr: + c.strMap[x] = x.Name.Table.O + "." + x.Name.Name.O + case *BetweenExpr: + c.strMap[x] = c.strMap[x.Expr] + " BETWWEN " + c.strMap[x.Left] + " AND " + c.strMap[x.Right] + default: + c.strMap[in] = fmt.Sprintf("%T", in) + } + return in, true +} diff --git a/vendor/github.com/pingcap/tidb/bootstrap.go b/vendor/github.com/pingcap/tidb/bootstrap.go new file mode 100644 index 000000000..4753a2f0d --- /dev/null +++ b/vendor/github.com/pingcap/tidb/bootstrap.go @@ -0,0 +1,218 @@ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package tidb + +import ( + "fmt" + "runtime/debug" + "strings" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/sessionctx/variable" +) + +const ( + // CreateUserTable is the SQL statement creates User table in system db. + CreateUserTable = `CREATE TABLE if not exists mysql.user ( + Host CHAR(64), + User CHAR(16), + Password CHAR(41), + Select_priv ENUM('N','Y') NOT NULL DEFAULT 'N', + Insert_priv ENUM('N','Y') NOT NULL DEFAULT 'N', + Update_priv ENUM('N','Y') NOT NULL DEFAULT 'N', + Delete_priv ENUM('N','Y') NOT NULL DEFAULT 'N', + Create_priv ENUM('N','Y') NOT NULL DEFAULT 'N', + Drop_priv ENUM('N','Y') NOT NULL DEFAULT 'N', + Grant_priv ENUM('N','Y') NOT NULL DEFAULT 'N', + Alter_priv ENUM('N','Y') NOT NULL DEFAULT 'N', + Show_db_priv ENUM('N','Y') NOT NULL DEFAULT 'N', + Execute_priv ENUM('N','Y') NOT NULL DEFAULT 'N', + Index_priv ENUM('N','Y') NOT NULL DEFAULT 'N', + Create_user_priv ENUM('N','Y') NOT NULL DEFAULT 'N', + PRIMARY KEY (Host, User));` + // CreateDBPrivTable is the SQL statement creates DB scope privilege table in system db. + CreateDBPrivTable = `CREATE TABLE if not exists mysql.db ( + Host CHAR(60), + DB CHAR(64), + User CHAR(16), + Select_priv ENUM('N','Y') Not Null DEFAULT 'N', + Insert_priv ENUM('N','Y') Not Null DEFAULT 'N', + Update_priv ENUM('N','Y') Not Null DEFAULT 'N', + Delete_priv ENUM('N','Y') Not Null DEFAULT 'N', + Create_priv ENUM('N','Y') Not Null DEFAULT 'N', + Drop_priv ENUM('N','Y') Not Null DEFAULT 'N', + Grant_priv ENUM('N','Y') Not Null DEFAULT 'N', + Index_priv ENUM('N','Y') Not Null DEFAULT 'N', + Alter_priv ENUM('N','Y') Not Null DEFAULT 'N', + Execute_priv ENUM('N','Y') Not Null DEFAULT 'N', + PRIMARY KEY (Host, DB, User));` + // CreateTablePrivTable is the SQL statement creates table scope privilege table in system db. + CreateTablePrivTable = `CREATE TABLE if not exists mysql.tables_priv ( + Host CHAR(60), + DB CHAR(64), + User CHAR(16), + Table_name CHAR(64), + Grantor CHAR(77), + Timestamp Timestamp DEFAULT CURRENT_TIMESTAMP, + Table_priv SET('Select','Insert','Update','Delete','Create','Drop','Grant', 'Index','Alter'), + Column_priv SET('Select','Insert','Update'), + PRIMARY KEY (Host, DB, User, Table_name));` + // CreateColumnPrivTable is the SQL statement creates column scope privilege table in system db. + CreateColumnPrivTable = `CREATE TABLE if not exists mysql.columns_priv( + Host CHAR(60), + DB CHAR(64), + User CHAR(16), + Table_name CHAR(64), + Column_name CHAR(64), + Timestamp Timestamp DEFAULT CURRENT_TIMESTAMP, + Column_priv SET('Select','Insert','Update'), + PRIMARY KEY (Host, DB, User, Table_name, Column_name));` + // CreateGloablVariablesTable is the SQL statement creates global variable table in system db. + // TODO: MySQL puts GLOBAL_VARIABLES table in INFORMATION_SCHEMA db. + // INFORMATION_SCHEMA is a virtual db in TiDB. So we put this table in system db. + // Maybe we will put it back to INFORMATION_SCHEMA. + CreateGloablVariablesTable = `CREATE TABLE if not exists mysql.GLOBAL_VARIABLES( + VARIABLE_NAME VARCHAR(64) Not Null PRIMARY KEY, + VARIABLE_VALUE VARCHAR(1024) DEFAULT Null);` + // CreateTiDBTable is the SQL statement creates a table in system db. + // This table is a key-value struct contains some information used by TiDB. + // Currently we only put bootstrapped in it which indicates if the system is already bootstrapped. + CreateTiDBTable = `CREATE TABLE if not exists mysql.tidb( + VARIABLE_NAME VARCHAR(64) Not Null PRIMARY KEY, + VARIABLE_VALUE VARCHAR(1024) DEFAULT Null, + COMMENT VARCHAR(1024));` +) + +// Bootstrap initiates system DB for a store. +func bootstrap(s Session) { + b, err := checkBootstrapped(s) + if err != nil { + log.Fatal(err) + } + if b { + return + } + doDDLWorks(s) + doDMLWorks(s) +} + +const ( + bootstrappedVar = "bootstrapped" + bootstrappedVarTrue = "True" +) + +func checkBootstrapped(s Session) (bool, error) { + // Check if system db exists. + _, err := s.Execute(fmt.Sprintf("USE %s;", mysql.SystemDB)) + if err != nil && infoschema.DatabaseNotExists.NotEqual(err) { + log.Fatal(err) + } + // Check bootstrapped variable value in TiDB table. + v, err := checkBootstrappedVar(s) + if err != nil { + return false, errors.Trace(err) + } + return v, nil +} + +func checkBootstrappedVar(s Session) (bool, error) { + sql := fmt.Sprintf(`SELECT VARIABLE_VALUE FROM %s.%s WHERE VARIABLE_NAME="%s"`, + mysql.SystemDB, mysql.TiDBTable, bootstrappedVar) + rs, err := s.Execute(sql) + if err != nil { + if infoschema.TableNotExists.Equal(err) { + return false, nil + } + return false, errors.Trace(err) + } + + if len(rs) != 1 { + return false, errors.New("Wrong number of Recordset") + } + r := rs[0] + row, err := r.Next() + if err != nil || row == nil { + return false, errors.Trace(err) + } + + isBootstrapped := row.Data[0].GetString() == bootstrappedVarTrue + if isBootstrapped { + // Make sure that doesn't affect the following operations. + + if err = s.FinishTxn(false); err != nil { + return false, errors.Trace(err) + } + } + + return isBootstrapped, nil +} + +// Execute DDL statements in bootstrap stage. +func doDDLWorks(s Session) { + // Create a test database. + mustExecute(s, "CREATE DATABASE IF NOT EXISTS test") + // Create system db. + mustExecute(s, fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s;", mysql.SystemDB)) + // Create user table. + mustExecute(s, CreateUserTable) + // Create privilege tables. + mustExecute(s, CreateDBPrivTable) + mustExecute(s, CreateTablePrivTable) + mustExecute(s, CreateColumnPrivTable) + // Create global systemt variable table. + mustExecute(s, CreateGloablVariablesTable) + // Create TiDB table. + mustExecute(s, CreateTiDBTable) +} + +// Execute DML statements in bootstrap stage. +// All the statements run in a single transaction. +func doDMLWorks(s Session) { + mustExecute(s, "BEGIN") + + // Insert a default user with empty password. + mustExecute(s, `INSERT INTO mysql.user VALUES + ("%", "root", "", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y", "Y")`) + + // Init global system variables table. + values := make([]string, 0, len(variable.SysVars)) + for k, v := range variable.SysVars { + value := fmt.Sprintf(`("%s", "%s")`, strings.ToLower(k), v.Value) + values = append(values, value) + } + sql := fmt.Sprintf("INSERT INTO %s.%s VALUES %s;", mysql.SystemDB, mysql.GlobalVariablesTable, + strings.Join(values, ", ")) + mustExecute(s, sql) + + sql = fmt.Sprintf(`INSERT INTO %s.%s VALUES("%s", "%s", "Bootstrap flag. Do not delete.") + ON DUPLICATE KEY UPDATE VARIABLE_VALUE="%s"`, + mysql.SystemDB, mysql.TiDBTable, bootstrappedVar, bootstrappedVarTrue, bootstrappedVarTrue) + mustExecute(s, sql) + mustExecute(s, "COMMIT") +} + +func mustExecute(s Session, sql string) { + _, err := s.Execute(sql) + if err != nil { + debug.PrintStack() + log.Fatal(err) + } +} diff --git a/vendor/github.com/pingcap/tidb/column/column.go b/vendor/github.com/pingcap/tidb/column/column.go new file mode 100644 index 000000000..a15568039 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/column/column.go @@ -0,0 +1,232 @@ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package column + +import ( + "strings" + + "github.com/juju/errors" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/util/types" +) + +// Col provides meta data describing a table column. +type Col struct { + model.ColumnInfo +} + +// PrimaryKeyName defines primary key name. +const PrimaryKeyName = "PRIMARY" + +// IndexedCol defines an index with info. +type IndexedCol struct { + model.IndexInfo + X kv.Index +} + +// String implements fmt.Stringer interface. +func (c *Col) String() string { + ans := []string{c.Name.O, types.TypeToStr(c.Tp, c.Charset)} + if mysql.HasAutoIncrementFlag(c.Flag) { + ans = append(ans, "AUTO_INCREMENT") + } + if mysql.HasNotNullFlag(c.Flag) { + ans = append(ans, "NOT NULL") + } + return strings.Join(ans, " ") +} + +// FindCol finds column in cols by name. +func FindCol(cols []*Col, name string) *Col { + for _, col := range cols { + if strings.EqualFold(col.Name.O, name) { + return col + } + } + return nil +} + +// FindCols finds columns in cols by names. +func FindCols(cols []*Col, names []string) ([]*Col, error) { + var rcols []*Col + for _, name := range names { + col := FindCol(cols, name) + if col != nil { + rcols = append(rcols, col) + } else { + return nil, errors.Errorf("unknown column %s", name) + } + } + + return rcols, nil +} + +// FindOnUpdateCols finds columns which have OnUpdateNow flag. +func FindOnUpdateCols(cols []*Col) []*Col { + var rcols []*Col + for _, col := range cols { + if mysql.HasOnUpdateNowFlag(col.Flag) { + rcols = append(rcols, col) + } + } + + return rcols +} + +// CastValues casts values based on columns type. +func CastValues(ctx context.Context, rec []types.Datum, cols []*Col) (err error) { + for _, c := range cols { + var converted types.Datum + converted, err = rec[c.Offset].ConvertTo(&c.FieldType) + if err != nil { + return errors.Trace(err) + } + rec[c.Offset] = converted + } + return nil +} + +// ColDesc describes column information like MySQL desc and show columns do. +type ColDesc struct { + Field string + Type string + Collation string + Null string + Key string + DefaultValue interface{} + Extra string + Privileges string + Comment string +} + +const defaultPrivileges string = "select,insert,update,references" + +// GetTypeDesc gets the description for column type. +func (c *Col) GetTypeDesc() string { + desc := c.FieldType.CompactStr() + if mysql.HasUnsignedFlag(c.Flag) { + desc += " UNSIGNED" + } + return desc +} + +// NewColDesc returns a new ColDesc for a column. +func NewColDesc(col *Col) *ColDesc { + // TODO: if we have no primary key and a unique index which's columns are all not null + // we will set these columns' flag as PriKeyFlag + // see https://dev.mysql.com/doc/refman/5.7/en/show-columns.html + // create table + name := col.Name + nullFlag := "YES" + if mysql.HasNotNullFlag(col.Flag) { + nullFlag = "NO" + } + keyFlag := "" + if mysql.HasPriKeyFlag(col.Flag) { + keyFlag = "PRI" + } else if mysql.HasUniKeyFlag(col.Flag) { + keyFlag = "UNI" + } else if mysql.HasMultipleKeyFlag(col.Flag) { + keyFlag = "MUL" + } + var defaultValue interface{} + if !mysql.HasNoDefaultValueFlag(col.Flag) { + defaultValue = col.DefaultValue + } + + extra := "" + if mysql.HasAutoIncrementFlag(col.Flag) { + extra = "auto_increment" + } else if mysql.HasOnUpdateNowFlag(col.Flag) { + extra = "on update CURRENT_TIMESTAMP" + } + + return &ColDesc{ + Field: name.O, + Type: col.GetTypeDesc(), + Collation: col.Collate, + Null: nullFlag, + Key: keyFlag, + DefaultValue: defaultValue, + Extra: extra, + Privileges: defaultPrivileges, + Comment: "", + } +} + +// ColDescFieldNames returns the fields name in result set for desc and show columns. +func ColDescFieldNames(full bool) []string { + if full { + return []string{"Field", "Type", "Collation", "Null", "Key", "Default", "Extra", "Privileges", "Comment"} + } + return []string{"Field", "Type", "Null", "Key", "Default", "Extra"} +} + +// CheckOnce checks if there are duplicated column names in cols. +func CheckOnce(cols []*Col) error { + m := map[string]struct{}{} + for _, col := range cols { + name := col.Name + _, ok := m[name.L] + if ok { + return errors.Errorf("column specified twice - %s", name) + } + + m[name.L] = struct{}{} + } + + return nil +} + +// CheckNotNull checks if nil value set to a column with NotNull flag is set. +func (c *Col) CheckNotNull(data types.Datum) error { + if mysql.HasNotNullFlag(c.Flag) && data.Kind() == types.KindNull { + return errors.Errorf("Column %s can't be null.", c.Name) + } + return nil +} + +// IsPKHandleColumn checks if the column is primary key handle column. +func (c *Col) IsPKHandleColumn(tbInfo *model.TableInfo) bool { + return mysql.HasPriKeyFlag(c.Flag) && tbInfo.PKIsHandle +} + +// CheckNotNull checks if row has nil value set to a column with NotNull flag set. +func CheckNotNull(cols []*Col, row []types.Datum) error { + for _, c := range cols { + if err := c.CheckNotNull(row[c.Offset]); err != nil { + return errors.Trace(err) + } + } + return nil +} + +// FetchValues fetches indexed values from a row. +func (idx *IndexedCol) FetchValues(r []types.Datum) ([]types.Datum, error) { + vals := make([]types.Datum, len(idx.Columns)) + for i, ic := range idx.Columns { + if ic.Offset < 0 || ic.Offset > len(r) { + return nil, errors.New("Index column offset out of bound") + } + vals[i] = r[ic.Offset] + } + return vals, nil +} diff --git a/vendor/github.com/pingcap/tidb/context/context.go b/vendor/github.com/pingcap/tidb/context/context.go new file mode 100644 index 000000000..502c80cb9 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/context/context.go @@ -0,0 +1,38 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package context + +import ( + "fmt" + + "github.com/pingcap/tidb/kv" +) + +// Context is an interface for transaction and executive args environment. +type Context interface { + // GetTxn gets a transaction for futher execution. + GetTxn(forceNew bool) (kv.Transaction, error) + + // FinishTxn commits or rolls back the current transaction. + FinishTxn(rollback bool) error + + // SetValue saves a value associated with this context for key. + SetValue(key fmt.Stringer, value interface{}) + + // Value returns the value associated with this context for key. + Value(key fmt.Stringer) interface{} + + // ClearValue clears the value associated with this context for key. + ClearValue(key fmt.Stringer) +} diff --git a/vendor/github.com/pingcap/tidb/ddl/bg_worker.go b/vendor/github.com/pingcap/tidb/ddl/bg_worker.go new file mode 100644 index 000000000..281d467eb --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ddl/bg_worker.go @@ -0,0 +1,178 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ddl + +import ( + "time" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/meta" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/terror" +) + +// handleBgJobQueue handles the background job queue. +func (d *ddl) handleBgJobQueue() error { + if d.isClosed() { + return nil + } + + job := &model.Job{} + err := kv.RunInNewTxn(d.store, false, func(txn kv.Transaction) error { + t := meta.NewMeta(txn) + owner, err := d.checkOwner(t, bgJobFlag) + if terror.ErrorEqual(err, ErrNotOwner) { + return nil + } + if err != nil { + return errors.Trace(err) + } + + // get the first background job and run + job, err = d.getFirstBgJob(t) + if err != nil { + return errors.Trace(err) + } + if job == nil { + return nil + } + + d.runBgJob(t, job) + if job.IsFinished() { + err = d.finishBgJob(t, job) + } else { + err = d.updateBgJob(t, job) + } + if err != nil { + return errors.Trace(err) + } + + owner.LastUpdateTS = time.Now().UnixNano() + err = t.SetBgJobOwner(owner) + + return errors.Trace(err) + }) + + if err != nil { + return errors.Trace(err) + } + + return nil +} + +// runBgJob runs a background job. +func (d *ddl) runBgJob(t *meta.Meta, job *model.Job) { + job.State = model.JobRunning + + var err error + switch job.Type { + case model.ActionDropSchema: + err = d.delReorgSchema(t, job) + case model.ActionDropTable: + err = d.delReorgTable(t, job) + default: + job.State = model.JobCancelled + err = errors.Errorf("invalid background job %v", job) + + } + + if err != nil { + if job.State != model.JobCancelled { + log.Errorf("run background job err %v", errors.ErrorStack(err)) + } + + job.Error = err.Error() + job.ErrorCount++ + } +} + +// prepareBgJob prepares a background job. +func (d *ddl) prepareBgJob(ddlJob *model.Job) error { + job := &model.Job{ + ID: ddlJob.ID, + SchemaID: ddlJob.SchemaID, + TableID: ddlJob.TableID, + Type: ddlJob.Type, + Args: ddlJob.Args, + } + + err := kv.RunInNewTxn(d.store, true, func(txn kv.Transaction) error { + t := meta.NewMeta(txn) + err1 := t.EnQueueBgJob(job) + + return errors.Trace(err1) + }) + + return errors.Trace(err) +} + +// startBgJob starts a background job. +func (d *ddl) startBgJob(tp model.ActionType) { + switch tp { + case model.ActionDropSchema, model.ActionDropTable: + asyncNotify(d.bgJobCh) + } +} + +// getFirstBgJob gets the first background job. +func (d *ddl) getFirstBgJob(t *meta.Meta) (*model.Job, error) { + job, err := t.GetBgJob(0) + return job, errors.Trace(err) +} + +// updateBgJob updates a background job. +func (d *ddl) updateBgJob(t *meta.Meta, job *model.Job) error { + err := t.UpdateBgJob(0, job) + return errors.Trace(err) +} + +// finishBgJob finishs a background job. +func (d *ddl) finishBgJob(t *meta.Meta, job *model.Job) error { + log.Warnf("[ddl] finish background job %v", job) + if _, err := t.DeQueueBgJob(); err != nil { + return errors.Trace(err) + } + + err := t.AddHistoryBgJob(job) + + return errors.Trace(err) +} + +func (d *ddl) onBackgroundWorker() { + defer d.wait.Done() + + // we use 4 * lease time to check owner's timeout, so here, we will update owner's status + // every 2 * lease time, if lease is 0, we will use default 10s. + checkTime := chooseLeaseTime(2*d.lease, 10*time.Second) + + ticker := time.NewTicker(checkTime) + defer ticker.Stop() + + for { + select { + case <-ticker.C: + log.Debugf("[ddl] wait %s to check background job status again", checkTime) + case <-d.bgJobCh: + case <-d.quitCh: + return + } + + err := d.handleBgJobQueue() + if err != nil { + log.Errorf("[ddl] handle background job err %v", errors.ErrorStack(err)) + } + } +} diff --git a/vendor/github.com/pingcap/tidb/ddl/callback.go b/vendor/github.com/pingcap/tidb/ddl/callback.go new file mode 100644 index 000000000..4c064de2f --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ddl/callback.go @@ -0,0 +1,45 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ddl + +import "github.com/pingcap/tidb/model" + +// Callback is the interface supporting callback function when DDL changed. +type Callback interface { + // OnChanged is called after schema is changed. + OnChanged(err error) error + // OnJobRunBefore is called before running job. + OnJobRunBefore(job *model.Job) + // OnJobUpdated is called after the running job is updated. + OnJobUpdated(job *model.Job) +} + +// BaseCallback implements Callback.OnChanged interface. +type BaseCallback struct { +} + +// OnChanged implements Callback interface. +func (c *BaseCallback) OnChanged(err error) error { + return err +} + +// OnJobRunBefore implements Callback.OnJobRunBefore interface. +func (c *BaseCallback) OnJobRunBefore(job *model.Job) { + // Nothing to do. +} + +// OnJobUpdated implements Callback.OnJobUpdated interface. +func (c *BaseCallback) OnJobUpdated(job *model.Job) { + // Nothing to do. +} diff --git a/vendor/github.com/pingcap/tidb/ddl/column.go b/vendor/github.com/pingcap/tidb/ddl/column.go new file mode 100644 index 000000000..c298c130b --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ddl/column.go @@ -0,0 +1,430 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ddl + +import ( + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/column" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/meta" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/table" + "github.com/pingcap/tidb/table/tables" + "github.com/pingcap/tidb/terror" +) + +func (d *ddl) adjustColumnOffset(columns []*model.ColumnInfo, indices []*model.IndexInfo, offset int, added bool) { + offsetChanged := make(map[int]int) + if added { + for i := offset + 1; i < len(columns); i++ { + offsetChanged[columns[i].Offset] = i + columns[i].Offset = i + } + columns[offset].Offset = offset + } else { + for i := offset + 1; i < len(columns); i++ { + offsetChanged[columns[i].Offset] = i - 1 + columns[i].Offset = i - 1 + } + columns[offset].Offset = len(columns) - 1 + } + + // TODO: index can't cover the add/remove column with offset now, we may check this later. + + // Update index column offset info. + for _, idx := range indices { + for _, col := range idx.Columns { + newOffset, ok := offsetChanged[col.Offset] + if ok { + col.Offset = newOffset + } + } + } +} + +func (d *ddl) addColumn(tblInfo *model.TableInfo, colInfo *model.ColumnInfo, pos *ast.ColumnPosition) (*model.ColumnInfo, int, error) { + // Check column name duplicate. + cols := tblInfo.Columns + position := len(cols) + + // Get column position. + if pos.Tp == ast.ColumnPositionFirst { + position = 0 + } else if pos.Tp == ast.ColumnPositionAfter { + c := findCol(cols, pos.RelativeColumn.Name.L) + if c == nil { + return nil, 0, errors.Errorf("No such column: %v", pos.RelativeColumn) + } + + // Insert position is after the mentioned column. + position = c.Offset + 1 + } + + colInfo.State = model.StateNone + // To support add column asynchronous, we should mark its offset as the last column. + // So that we can use origin column offset to get value from row. + colInfo.Offset = len(cols) + + // Insert col into the right place of the column list. + newCols := make([]*model.ColumnInfo, 0, len(cols)+1) + newCols = append(newCols, cols[:position]...) + newCols = append(newCols, colInfo) + newCols = append(newCols, cols[position:]...) + + tblInfo.Columns = newCols + return colInfo, position, nil +} + +func (d *ddl) onAddColumn(t *meta.Meta, job *model.Job) error { + schemaID := job.SchemaID + tblInfo, err := d.getTableInfo(t, job) + if err != nil { + return errors.Trace(err) + } + + col := &model.ColumnInfo{} + pos := &ast.ColumnPosition{} + offset := 0 + err = job.DecodeArgs(col, pos, &offset) + if err != nil { + job.State = model.JobCancelled + return errors.Trace(err) + } + + columnInfo := findCol(tblInfo.Columns, col.Name.L) + if columnInfo != nil { + if columnInfo.State == model.StatePublic { + // we already have a column with same column name + job.State = model.JobCancelled + return errors.Errorf("ADD COLUMN: column already exist %s", col.Name.L) + } + } else { + columnInfo, offset, err = d.addColumn(tblInfo, col, pos) + if err != nil { + job.State = model.JobCancelled + return errors.Trace(err) + } + + // Set offset arg to job. + if offset != 0 { + job.Args = []interface{}{columnInfo, pos, offset} + } + } + + _, err = t.GenSchemaVersion() + if err != nil { + return errors.Trace(err) + } + + switch columnInfo.State { + case model.StateNone: + // none -> delete only + job.SchemaState = model.StateDeleteOnly + columnInfo.State = model.StateDeleteOnly + err = t.UpdateTable(schemaID, tblInfo) + return errors.Trace(err) + case model.StateDeleteOnly: + // delete only -> write only + job.SchemaState = model.StateWriteOnly + columnInfo.State = model.StateWriteOnly + err = t.UpdateTable(schemaID, tblInfo) + return errors.Trace(err) + case model.StateWriteOnly: + // write only -> reorganization + job.SchemaState = model.StateWriteReorganization + columnInfo.State = model.StateWriteReorganization + // initialize SnapshotVer to 0 for later reorganization check. + job.SnapshotVer = 0 + err = t.UpdateTable(schemaID, tblInfo) + return errors.Trace(err) + case model.StateWriteReorganization: + // reorganization -> public + // get the current version for reorganization if we don't have + reorgInfo, err := d.getReorgInfo(t, job) + if err != nil || reorgInfo.first { + // if we run reorg firstly, we should update the job snapshot version + // and then run the reorg next time. + return errors.Trace(err) + } + + tbl, err := d.getTable(schemaID, tblInfo) + if err != nil { + return errors.Trace(err) + } + + err = d.runReorgJob(func() error { + return d.backfillColumn(tbl, columnInfo, reorgInfo) + }) + + if terror.ErrorEqual(err, errWaitReorgTimeout) { + // if timeout, we should return, check for the owner and re-wait job done. + return nil + } + if err != nil { + return errors.Trace(err) + } + + // Adjust column offset. + d.adjustColumnOffset(tblInfo.Columns, tblInfo.Indices, offset, true) + + columnInfo.State = model.StatePublic + + if err = t.UpdateTable(schemaID, tblInfo); err != nil { + return errors.Trace(err) + } + + // finish this job + job.SchemaState = model.StatePublic + job.State = model.JobDone + return nil + default: + return errors.Errorf("invalid column state %v", columnInfo.State) + } +} + +func (d *ddl) onDropColumn(t *meta.Meta, job *model.Job) error { + schemaID := job.SchemaID + tblInfo, err := d.getTableInfo(t, job) + if err != nil { + return errors.Trace(err) + } + + var colName model.CIStr + err = job.DecodeArgs(&colName) + if err != nil { + job.State = model.JobCancelled + return errors.Trace(err) + } + + colInfo := findCol(tblInfo.Columns, colName.L) + if colInfo == nil { + job.State = model.JobCancelled + return errors.Errorf("column %s doesn't exist", colName) + } + + if len(tblInfo.Columns) == 1 { + job.State = model.JobCancelled + return errors.Errorf("can't drop only column %s in table %s", colName, tblInfo.Name) + } + + // we don't support drop column with index covered now. + // we must drop the index first, then drop the column. + for _, indexInfo := range tblInfo.Indices { + for _, col := range indexInfo.Columns { + if col.Name.L == colName.L { + job.State = model.JobCancelled + return errors.Errorf("can't drop column %s with index %s covered now", colName, indexInfo.Name) + } + } + } + + _, err = t.GenSchemaVersion() + if err != nil { + return errors.Trace(err) + } + + switch colInfo.State { + case model.StatePublic: + // public -> write only + job.SchemaState = model.StateWriteOnly + colInfo.State = model.StateWriteOnly + + // set this column's offset to the last and reset all following columns' offset + d.adjustColumnOffset(tblInfo.Columns, tblInfo.Indices, colInfo.Offset, false) + + err = t.UpdateTable(schemaID, tblInfo) + return errors.Trace(err) + case model.StateWriteOnly: + // write only -> delete only + job.SchemaState = model.StateDeleteOnly + colInfo.State = model.StateDeleteOnly + err = t.UpdateTable(schemaID, tblInfo) + return errors.Trace(err) + case model.StateDeleteOnly: + // delete only -> reorganization + job.SchemaState = model.StateDeleteReorganization + colInfo.State = model.StateDeleteReorganization + // initialize SnapshotVer to 0 for later reorganization check. + job.SnapshotVer = 0 + err = t.UpdateTable(schemaID, tblInfo) + return errors.Trace(err) + case model.StateDeleteReorganization: + // reorganization -> absent + reorgInfo, err := d.getReorgInfo(t, job) + if err != nil || reorgInfo.first { + // if we run reorg firstly, we should update the job snapshot version + // and then run the reorg next time. + return errors.Trace(err) + } + + tbl, err := d.getTable(schemaID, tblInfo) + if err != nil { + return errors.Trace(err) + } + + err = d.runReorgJob(func() error { + return d.dropTableColumn(tbl, colInfo, reorgInfo) + }) + + if terror.ErrorEqual(err, errWaitReorgTimeout) { + // if timeout, we should return, check for the owner and re-wait job done. + return nil + } + if err != nil { + return errors.Trace(err) + } + + // all reorganization jobs done, drop this column + newColumns := make([]*model.ColumnInfo, 0, len(tblInfo.Columns)) + for _, col := range tblInfo.Columns { + if col.Name.L != colName.L { + newColumns = append(newColumns, col) + } + } + tblInfo.Columns = newColumns + if err = t.UpdateTable(schemaID, tblInfo); err != nil { + return errors.Trace(err) + } + + // finish this job + job.SchemaState = model.StateNone + job.State = model.JobDone + return nil + default: + return errors.Errorf("invalid table state %v", tblInfo.State) + } +} + +// How to backfill column data in reorganization state? +// 1. Generate a snapshot with special version. +// 2. Traverse the snapshot, get every row in the table. +// 3. For one row, if the row has been already deleted, skip to next row. +// 4. If not deleted, check whether column data has existed, if existed, skip to next row. +// 5. If column data doesn't exist, backfill the column with default value and then continue to handle next row. +func (d *ddl) backfillColumn(t table.Table, columnInfo *model.ColumnInfo, reorgInfo *reorgInfo) error { + seekHandle := reorgInfo.Handle + version := reorgInfo.SnapshotVer + + for { + handles, err := d.getSnapshotRows(t, version, seekHandle) + if err != nil { + return errors.Trace(err) + } else if len(handles) == 0 { + return nil + } + + seekHandle = handles[len(handles)-1] + 1 + err = d.backfillColumnData(t, columnInfo, handles, reorgInfo) + if err != nil { + return errors.Trace(err) + } + } +} + +func (d *ddl) backfillColumnData(t table.Table, columnInfo *model.ColumnInfo, handles []int64, reorgInfo *reorgInfo) error { + for _, handle := range handles { + log.Info("[ddl] backfill column...", handle) + + err := kv.RunInNewTxn(d.store, true, func(txn kv.Transaction) error { + if err := d.isReorgRunnable(txn); err != nil { + return errors.Trace(err) + } + + // First check if row exists. + exist, err := checkRowExist(txn, t, handle) + if err != nil { + return errors.Trace(err) + } else if !exist { + // If row doesn't exist, skip it. + return nil + } + + backfillKey := t.RecordKey(handle, &column.Col{ColumnInfo: *columnInfo}) + backfillValue, err := txn.Get(backfillKey) + if err != nil && !kv.IsErrNotFound(err) { + return errors.Trace(err) + } + if backfillValue != nil { + return nil + } + + value, _, err := table.GetColDefaultValue(nil, columnInfo) + if err != nil { + return errors.Trace(err) + } + + // must convert to the column field type. + v, err := value.ConvertTo(&columnInfo.FieldType) + if err != nil { + return errors.Trace(err) + } + + err = lockRow(txn, t, handle) + if err != nil { + return errors.Trace(err) + } + + err = tables.SetColValue(txn, backfillKey, v) + if err != nil { + return errors.Trace(err) + } + + return errors.Trace(reorgInfo.UpdateHandle(txn, handle)) + }) + + if err != nil { + return errors.Trace(err) + } + } + + return nil +} + +func (d *ddl) dropTableColumn(t table.Table, colInfo *model.ColumnInfo, reorgInfo *reorgInfo) error { + version := reorgInfo.SnapshotVer + seekHandle := reorgInfo.Handle + + col := &column.Col{ColumnInfo: *colInfo} + for { + handles, err := d.getSnapshotRows(t, version, seekHandle) + if err != nil { + return errors.Trace(err) + } else if len(handles) == 0 { + return nil + } + + seekHandle = handles[len(handles)-1] + 1 + + err = kv.RunInNewTxn(d.store, true, func(txn kv.Transaction) error { + if err1 := d.isReorgRunnable(txn); err1 != nil { + return errors.Trace(err1) + } + + var h int64 + for _, h = range handles { + key := t.RecordKey(h, col) + err1 := txn.Delete(key) + if err1 != nil && !terror.ErrorEqual(err1, kv.ErrNotExist) { + return errors.Trace(err1) + } + } + return errors.Trace(reorgInfo.UpdateHandle(txn, h)) + }) + if err != nil { + return errors.Trace(err) + } + } +} diff --git a/vendor/github.com/pingcap/tidb/ddl/ddl.go b/vendor/github.com/pingcap/tidb/ddl/ddl.go new file mode 100644 index 000000000..4ee291002 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ddl/ddl.go @@ -0,0 +1,978 @@ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ddl + +import ( + "fmt" + "strings" + "sync" + "time" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/column" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/evaluator" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/meta" + "github.com/pingcap/tidb/meta/autoid" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/sessionctx/variable" + "github.com/pingcap/tidb/table" + "github.com/pingcap/tidb/util/charset" + "github.com/pingcap/tidb/util/types" + "github.com/twinj/uuid" +) + +// DDL is responsible for updating schema in data store and maintaining in-memory InfoSchema cache. +type DDL interface { + CreateSchema(ctx context.Context, name model.CIStr, charsetInfo *ast.CharsetOpt) error + DropSchema(ctx context.Context, schema model.CIStr) error + CreateTable(ctx context.Context, ident ast.Ident, cols []*ast.ColumnDef, + constrs []*ast.Constraint, options []*ast.TableOption) error + DropTable(ctx context.Context, tableIdent ast.Ident) (err error) + CreateIndex(ctx context.Context, tableIdent ast.Ident, unique bool, indexName model.CIStr, + columnNames []*ast.IndexColName) error + DropIndex(ctx context.Context, tableIdent ast.Ident, indexName model.CIStr) error + GetInformationSchema() infoschema.InfoSchema + AlterTable(ctx context.Context, tableIdent ast.Ident, spec []*ast.AlterTableSpec) error + // SetLease will reset the lease time for online DDL change, + // it's a very dangerous function and you must guarantee that all servers have the same lease time. + SetLease(lease time.Duration) + // GetLease returns current schema lease time. + GetLease() time.Duration + // Stats returns the DDL statistics. + Stats() (map[string]interface{}, error) + // GetScope gets the status variables scope. + GetScope(status string) variable.ScopeFlag + // Stop stops DDL worker. + Stop() error + // Start starts DDL worker. + Start() error +} + +type ddl struct { + m sync.RWMutex + + infoHandle *infoschema.Handle + hook Callback + store kv.Storage + // schema lease seconds. + lease time.Duration + uuid string + ddlJobCh chan struct{} + ddlJobDoneCh chan struct{} + // drop database/table job runs in the background. + bgJobCh chan struct{} + // reorgDoneCh is for reorganization, if the reorganization job is done, + // we will use this channel to notify outer. + // TODO: now we use goroutine to simulate reorganization jobs, later we may + // use a persistent job list. + reorgDoneCh chan error + + quitCh chan struct{} + wait sync.WaitGroup +} + +// NewDDL creates a new DDL. +func NewDDL(store kv.Storage, infoHandle *infoschema.Handle, hook Callback, lease time.Duration) DDL { + return newDDL(store, infoHandle, hook, lease) +} + +func newDDL(store kv.Storage, infoHandle *infoschema.Handle, hook Callback, lease time.Duration) *ddl { + if hook == nil { + hook = &BaseCallback{} + } + + d := &ddl{ + infoHandle: infoHandle, + hook: hook, + store: store, + lease: lease, + uuid: uuid.NewV4().String(), + ddlJobCh: make(chan struct{}, 1), + ddlJobDoneCh: make(chan struct{}, 1), + bgJobCh: make(chan struct{}, 1), + } + + d.start() + + variable.RegisterStatistics(d) + + return d +} + +func (d *ddl) Stop() error { + d.m.Lock() + defer d.m.Unlock() + + d.close() + + err := kv.RunInNewTxn(d.store, true, func(txn kv.Transaction) error { + t := meta.NewMeta(txn) + owner, err1 := t.GetDDLJobOwner() + if err1 != nil { + return errors.Trace(err1) + } + if owner == nil || owner.OwnerID != d.uuid { + return nil + } + + // ddl job's owner is me, clean it so other servers can compete for it quickly. + return t.SetDDLJobOwner(&model.Owner{}) + }) + if err != nil { + return errors.Trace(err) + } + + err = kv.RunInNewTxn(d.store, true, func(txn kv.Transaction) error { + t := meta.NewMeta(txn) + owner, err1 := t.GetBgJobOwner() + if err1 != nil { + return errors.Trace(err1) + } + if owner == nil || owner.OwnerID != d.uuid { + return nil + } + + // background job's owner is me, clean it so other servers can compete for it quickly. + return t.SetBgJobOwner(&model.Owner{}) + }) + + return errors.Trace(err) +} + +func (d *ddl) Start() error { + d.m.Lock() + defer d.m.Unlock() + + if !d.isClosed() { + return nil + } + + d.start() + + return nil +} + +func (d *ddl) start() { + d.quitCh = make(chan struct{}) + d.wait.Add(2) + go d.onBackgroundWorker() + go d.onDDLWorker() + // for every start, we will send a fake job to let worker + // check owner first and try to find whether a job exists and run. + asyncNotify(d.ddlJobCh) + asyncNotify(d.bgJobCh) +} + +func (d *ddl) close() { + if d.isClosed() { + return + } + + close(d.quitCh) + + d.wait.Wait() +} + +func (d *ddl) isClosed() bool { + select { + case <-d.quitCh: + return true + default: + return false + } +} + +func (d *ddl) SetLease(lease time.Duration) { + d.m.Lock() + defer d.m.Unlock() + + if lease == d.lease { + return + } + + log.Warnf("[ddl] change schema lease %s -> %s", d.lease, lease) + + if d.isClosed() { + // if already closed, just set lease and return + d.lease = lease + return + } + + // close the running worker and start again + d.close() + d.lease = lease + d.start() +} + +func (d *ddl) GetLease() time.Duration { + d.m.RLock() + lease := d.lease + d.m.RUnlock() + return lease +} + +func (d *ddl) GetInformationSchema() infoschema.InfoSchema { + return d.infoHandle.Get() +} + +func (d *ddl) genGlobalID() (int64, error) { + var globalID int64 + err := kv.RunInNewTxn(d.store, true, func(txn kv.Transaction) error { + var err error + globalID, err = meta.NewMeta(txn).GenGlobalID() + return errors.Trace(err) + }) + + return globalID, errors.Trace(err) +} + +func (d *ddl) CreateSchema(ctx context.Context, schema model.CIStr, charsetInfo *ast.CharsetOpt) (err error) { + is := d.GetInformationSchema() + _, ok := is.SchemaByName(schema) + if ok { + return errors.Trace(infoschema.DatabaseExists) + } + + schemaID, err := d.genGlobalID() + if err != nil { + return errors.Trace(err) + } + dbInfo := &model.DBInfo{ + Name: schema, + } + if charsetInfo != nil { + dbInfo.Charset = charsetInfo.Chs + dbInfo.Collate = charsetInfo.Col + } else { + dbInfo.Charset, dbInfo.Collate = getDefaultCharsetAndCollate() + } + + job := &model.Job{ + SchemaID: schemaID, + Type: model.ActionCreateSchema, + Args: []interface{}{dbInfo}, + } + + err = d.startDDLJob(ctx, job) + err = d.hook.OnChanged(err) + return errors.Trace(err) +} + +func (d *ddl) DropSchema(ctx context.Context, schema model.CIStr) (err error) { + is := d.GetInformationSchema() + old, ok := is.SchemaByName(schema) + if !ok { + return errors.Trace(infoschema.DatabaseNotExists) + } + + job := &model.Job{ + SchemaID: old.ID, + Type: model.ActionDropSchema, + } + + err = d.startDDLJob(ctx, job) + err = d.hook.OnChanged(err) + return errors.Trace(err) +} + +func getDefaultCharsetAndCollate() (string, string) { + // TODO: TableDefaultCharset-->DatabaseDefaultCharset-->SystemDefaultCharset. + // TODO: change TableOption parser to parse collate. + // This is a tmp solution. + return "utf8", "utf8_unicode_ci" +} + +func setColumnFlagWithConstraint(colMap map[string]*column.Col, v *ast.Constraint) { + switch v.Tp { + case ast.ConstraintPrimaryKey: + for _, key := range v.Keys { + c, ok := colMap[key.Column.Name.L] + if !ok { + // TODO: table constraint on unknown column. + continue + } + c.Flag |= mysql.PriKeyFlag + // Primary key can not be NULL. + c.Flag |= mysql.NotNullFlag + } + case ast.ConstraintUniq, ast.ConstraintUniqIndex, ast.ConstraintUniqKey: + for i, key := range v.Keys { + c, ok := colMap[key.Column.Name.L] + if !ok { + // TODO: table constraint on unknown column. + continue + } + if i == 0 { + // Only the first column can be set + // if unique index has multi columns, + // the flag should be MultipleKeyFlag. + // See: https://dev.mysql.com/doc/refman/5.7/en/show-columns.html + if len(v.Keys) > 1 { + c.Flag |= mysql.MultipleKeyFlag + } else { + c.Flag |= mysql.UniqueKeyFlag + } + } + } + case ast.ConstraintKey, ast.ConstraintIndex: + for i, key := range v.Keys { + c, ok := colMap[key.Column.Name.L] + if !ok { + // TODO: table constraint on unknown column. + continue + } + if i == 0 { + // Only the first column can be set. + c.Flag |= mysql.MultipleKeyFlag + } + } + } +} + +func (d *ddl) buildColumnsAndConstraints(ctx context.Context, colDefs []*ast.ColumnDef, + constraints []*ast.Constraint) ([]*column.Col, []*ast.Constraint, error) { + var cols []*column.Col + colMap := map[string]*column.Col{} + for i, colDef := range colDefs { + col, cts, err := d.buildColumnAndConstraint(ctx, i, colDef) + if err != nil { + return nil, nil, errors.Trace(err) + } + col.State = model.StatePublic + constraints = append(constraints, cts...) + cols = append(cols, col) + colMap[colDef.Name.Name.L] = col + } + // traverse table Constraints and set col.flag + for _, v := range constraints { + setColumnFlagWithConstraint(colMap, v) + } + return cols, constraints, nil +} + +func (d *ddl) buildColumnAndConstraint(ctx context.Context, offset int, + colDef *ast.ColumnDef) (*column.Col, []*ast.Constraint, error) { + // Set charset. + if len(colDef.Tp.Charset) == 0 { + switch colDef.Tp.Tp { + case mysql.TypeString, mysql.TypeVarchar, mysql.TypeVarString, mysql.TypeBlob, mysql.TypeTinyBlob, mysql.TypeMediumBlob, mysql.TypeLongBlob: + colDef.Tp.Charset, colDef.Tp.Collate = getDefaultCharsetAndCollate() + default: + colDef.Tp.Charset = charset.CharsetBin + colDef.Tp.Collate = charset.CharsetBin + } + } + + col, cts, err := columnDefToCol(ctx, offset, colDef) + if err != nil { + return nil, nil, errors.Trace(err) + } + + col.ID, err = d.genGlobalID() + if err != nil { + return nil, nil, errors.Trace(err) + } + + return col, cts, nil +} + +// columnDefToCol converts ColumnDef to Col and TableConstraints. +func columnDefToCol(ctx context.Context, offset int, colDef *ast.ColumnDef) (*column.Col, []*ast.Constraint, error) { + constraints := []*ast.Constraint{} + col := &column.Col{ + ColumnInfo: model.ColumnInfo{ + Offset: offset, + Name: colDef.Name.Name, + FieldType: *colDef.Tp, + }, + } + + // Check and set TimestampFlag and OnUpdateNowFlag. + if col.Tp == mysql.TypeTimestamp { + col.Flag |= mysql.TimestampFlag + col.Flag |= mysql.OnUpdateNowFlag + col.Flag |= mysql.NotNullFlag + } + + // If flen is not assigned, assigned it by type. + if col.Flen == types.UnspecifiedLength { + col.Flen = mysql.GetDefaultFieldLength(col.Tp) + } + if col.Decimal == types.UnspecifiedLength { + col.Decimal = mysql.GetDefaultDecimal(col.Tp) + } + + setOnUpdateNow := false + hasDefaultValue := false + if colDef.Options != nil { + keys := []*ast.IndexColName{ + { + Column: colDef.Name, + Length: colDef.Tp.Flen, + }, + } + for _, v := range colDef.Options { + switch v.Tp { + case ast.ColumnOptionNotNull: + col.Flag |= mysql.NotNullFlag + case ast.ColumnOptionNull: + col.Flag &= ^uint(mysql.NotNullFlag) + removeOnUpdateNowFlag(col) + case ast.ColumnOptionAutoIncrement: + col.Flag |= mysql.AutoIncrementFlag + case ast.ColumnOptionPrimaryKey: + constraint := &ast.Constraint{Tp: ast.ConstraintPrimaryKey, Keys: keys} + constraints = append(constraints, constraint) + col.Flag |= mysql.PriKeyFlag + case ast.ColumnOptionUniq: + constraint := &ast.Constraint{Tp: ast.ConstraintUniq, Name: colDef.Name.Name.O, Keys: keys} + constraints = append(constraints, constraint) + col.Flag |= mysql.UniqueKeyFlag + case ast.ColumnOptionIndex: + constraint := &ast.Constraint{Tp: ast.ConstraintIndex, Name: colDef.Name.Name.O, Keys: keys} + constraints = append(constraints, constraint) + case ast.ColumnOptionUniqIndex: + constraint := &ast.Constraint{Tp: ast.ConstraintUniqIndex, Name: colDef.Name.Name.O, Keys: keys} + constraints = append(constraints, constraint) + col.Flag |= mysql.UniqueKeyFlag + case ast.ColumnOptionKey: + constraint := &ast.Constraint{Tp: ast.ConstraintKey, Name: colDef.Name.Name.O, Keys: keys} + constraints = append(constraints, constraint) + case ast.ColumnOptionUniqKey: + constraint := &ast.Constraint{Tp: ast.ConstraintUniqKey, Name: colDef.Name.Name.O, Keys: keys} + constraints = append(constraints, constraint) + col.Flag |= mysql.UniqueKeyFlag + case ast.ColumnOptionDefaultValue: + value, err := getDefaultValue(ctx, v, colDef.Tp.Tp, colDef.Tp.Decimal) + if err != nil { + return nil, nil, errors.Errorf("invalid default value - %s", errors.Trace(err)) + } + col.DefaultValue = value + hasDefaultValue = true + removeOnUpdateNowFlag(col) + case ast.ColumnOptionOnUpdate: + if !evaluator.IsCurrentTimeExpr(v.Expr) { + return nil, nil, errors.Errorf("invalid ON UPDATE for - %s", col.Name) + } + + col.Flag |= mysql.OnUpdateNowFlag + setOnUpdateNow = true + case ast.ColumnOptionFulltext, ast.ColumnOptionComment: + // Do nothing. + } + } + } + + setTimestampDefaultValue(col, hasDefaultValue, setOnUpdateNow) + + // Set `NoDefaultValueFlag` if this field doesn't have a default value and + // it is `not null` and not an `AUTO_INCREMENT` field or `TIMESTAMP` field. + setNoDefaultValueFlag(col, hasDefaultValue) + + err := checkDefaultValue(col, hasDefaultValue) + if err != nil { + return nil, nil, errors.Trace(err) + } + if col.Charset == charset.CharsetBin { + col.Flag |= mysql.BinaryFlag + } + return col, constraints, nil +} + +func getDefaultValue(ctx context.Context, c *ast.ColumnOption, tp byte, fsp int) (interface{}, error) { + if tp == mysql.TypeTimestamp || tp == mysql.TypeDatetime { + value, err := evaluator.GetTimeValue(ctx, c.Expr, tp, fsp) + if err != nil { + return nil, errors.Trace(err) + } + + // Value is nil means `default null`. + if value == nil { + return nil, nil + } + + // If value is mysql.Time, convert it to string. + if vv, ok := value.(mysql.Time); ok { + return vv.String(), nil + } + + return value, nil + } + v, err := evaluator.Eval(ctx, c.Expr) + if err != nil { + return nil, errors.Trace(err) + } + return v, nil +} + +func removeOnUpdateNowFlag(c *column.Col) { + // For timestamp Col, if it is set null or default value, + // OnUpdateNowFlag should be removed. + if mysql.HasTimestampFlag(c.Flag) { + c.Flag &= ^uint(mysql.OnUpdateNowFlag) + } +} + +func setTimestampDefaultValue(c *column.Col, hasDefaultValue bool, setOnUpdateNow bool) { + if hasDefaultValue { + return + } + + // For timestamp Col, if is not set default value or not set null, use current timestamp. + if mysql.HasTimestampFlag(c.Flag) && mysql.HasNotNullFlag(c.Flag) { + if setOnUpdateNow { + c.DefaultValue = evaluator.ZeroTimestamp + } else { + c.DefaultValue = evaluator.CurrentTimestamp + } + } +} + +func setNoDefaultValueFlag(c *column.Col, hasDefaultValue bool) { + if hasDefaultValue { + return + } + + if !mysql.HasNotNullFlag(c.Flag) { + return + } + + // Check if it is an `AUTO_INCREMENT` field or `TIMESTAMP` field. + if !mysql.HasAutoIncrementFlag(c.Flag) && !mysql.HasTimestampFlag(c.Flag) { + c.Flag |= mysql.NoDefaultValueFlag + } +} + +func checkDefaultValue(c *column.Col, hasDefaultValue bool) error { + if !hasDefaultValue { + return nil + } + + if c.DefaultValue != nil { + return nil + } + + // Set not null but default null is invalid. + if mysql.HasNotNullFlag(c.Flag) { + return errors.Errorf("invalid default value for %s", c.Name) + } + + return nil +} + +func checkDuplicateColumn(colDefs []*ast.ColumnDef) error { + colNames := map[string]bool{} + for _, colDef := range colDefs { + nameLower := colDef.Name.Name.O + if colNames[nameLower] { + return errors.Errorf("CREATE TABLE: duplicate column %s", colDef.Name) + } + colNames[nameLower] = true + } + return nil +} + +func checkConstraintNames(constraints []*ast.Constraint) error { + constrNames := map[string]bool{} + + // Check not empty constraint name whether is duplicated. + for _, constr := range constraints { + if constr.Tp == ast.ConstraintForeignKey { + // Ignore foreign key. + continue + } + if constr.Name != "" { + nameLower := strings.ToLower(constr.Name) + if constrNames[nameLower] { + return errors.Errorf("CREATE TABLE: duplicate key %s", constr.Name) + } + constrNames[nameLower] = true + } + } + + // Set empty constraint names. + for _, constr := range constraints { + if constr.Name == "" && len(constr.Keys) > 0 { + colName := constr.Keys[0].Column.Name.O + constrName := colName + i := 2 + for constrNames[strings.ToLower(constrName)] { + // We loop forever until we find constrName that haven't been used. + constrName = fmt.Sprintf("%s_%d", colName, i) + i++ + } + constr.Name = constrName + constrNames[constrName] = true + } + } + return nil +} + +func (d *ddl) buildTableInfo(tableName model.CIStr, cols []*column.Col, constraints []*ast.Constraint) (tbInfo *model.TableInfo, err error) { + tbInfo = &model.TableInfo{ + Name: tableName, + } + tbInfo.ID, err = d.genGlobalID() + if err != nil { + return nil, errors.Trace(err) + } + for _, v := range cols { + tbInfo.Columns = append(tbInfo.Columns, &v.ColumnInfo) + } + for _, constr := range constraints { + if constr.Tp == ast.ConstraintPrimaryKey { + if len(constr.Keys) == 1 { + key := constr.Keys[0] + col := column.FindCol(cols, key.Column.Name.O) + if col == nil { + return nil, errors.Errorf("No such column: %v", key) + } + switch col.Tp { + case mysql.TypeLong, mysql.TypeLonglong: + tbInfo.PKIsHandle = true + // Avoid creating index for PK handle column. + continue + } + } + } + + // 1. check if the column is exists + // 2. add index + indexColumns := make([]*model.IndexColumn, 0, len(constr.Keys)) + for _, key := range constr.Keys { + col := column.FindCol(cols, key.Column.Name.O) + if col == nil { + return nil, errors.Errorf("No such column: %v", key) + } + indexColumns = append(indexColumns, &model.IndexColumn{ + Name: key.Column.Name, + Offset: col.Offset, + Length: key.Length, + }) + } + idxInfo := &model.IndexInfo{ + Name: model.NewCIStr(constr.Name), + Columns: indexColumns, + State: model.StatePublic, + } + switch constr.Tp { + case ast.ConstraintPrimaryKey: + idxInfo.Unique = true + idxInfo.Primary = true + idxInfo.Name = model.NewCIStr(column.PrimaryKeyName) + case ast.ConstraintUniq, ast.ConstraintUniqKey, ast.ConstraintUniqIndex: + idxInfo.Unique = true + } + if constr.Option != nil { + idxInfo.Comment = constr.Option.Comment + idxInfo.Tp = constr.Option.Tp + } else { + // Use btree as default index type. + idxInfo.Tp = model.IndexTypeBtree + } + idxInfo.ID, err = d.genGlobalID() + if err != nil { + return nil, errors.Trace(err) + } + tbInfo.Indices = append(tbInfo.Indices, idxInfo) + } + return +} + +func (d *ddl) CreateTable(ctx context.Context, ident ast.Ident, colDefs []*ast.ColumnDef, + constraints []*ast.Constraint, options []*ast.TableOption) (err error) { + is := d.GetInformationSchema() + schema, ok := is.SchemaByName(ident.Schema) + if !ok { + return infoschema.DatabaseNotExists.Gen("database %s not exists", ident.Schema) + } + if is.TableExists(ident.Schema, ident.Name) { + return errors.Trace(infoschema.TableExists) + } + if err = checkDuplicateColumn(colDefs); err != nil { + return errors.Trace(err) + } + + cols, newConstraints, err := d.buildColumnsAndConstraints(ctx, colDefs, constraints) + if err != nil { + return errors.Trace(err) + } + + err = checkConstraintNames(newConstraints) + if err != nil { + return errors.Trace(err) + } + + tbInfo, err := d.buildTableInfo(ident.Name, cols, newConstraints) + if err != nil { + return errors.Trace(err) + } + + job := &model.Job{ + SchemaID: schema.ID, + TableID: tbInfo.ID, + Type: model.ActionCreateTable, + Args: []interface{}{tbInfo}, + } + + err = d.startDDLJob(ctx, job) + if err == nil { + err = d.handleTableOptions(options, tbInfo, schema.ID) + } + err = d.hook.OnChanged(err) + return errors.Trace(err) +} + +func (d *ddl) handleTableOptions(options []*ast.TableOption, tbInfo *model.TableInfo, schemaID int64) error { + for _, op := range options { + if op.Tp == ast.TableOptionAutoIncrement { + alloc := autoid.NewAllocator(d.store, schemaID) + tbInfo.State = model.StatePublic + tb, err := table.TableFromMeta(alloc, tbInfo) + if err != nil { + return errors.Trace(err) + } + // The operation of the minus 1 to make sure that the current value doesn't be used, + // the next Alloc operation will get this value. + // Its behavior is consistent with MySQL. + if err = tb.RebaseAutoID(int64(op.UintValue-1), false); err != nil { + return errors.Trace(err) + } + } + } + + return nil +} + +func (d *ddl) AlterTable(ctx context.Context, ident ast.Ident, specs []*ast.AlterTableSpec) (err error) { + // now we only allow one schema changes at the same time. + if len(specs) != 1 { + return errors.New("can't run multi schema changes in one DDL") + } + + for _, spec := range specs { + switch spec.Tp { + case ast.AlterTableAddColumn: + err = d.AddColumn(ctx, ident, spec) + case ast.AlterTableDropColumn: + err = d.DropColumn(ctx, ident, spec.DropColumn.Name) + case ast.AlterTableDropIndex: + err = d.DropIndex(ctx, ident, model.NewCIStr(spec.Name)) + case ast.AlterTableAddConstraint: + constr := spec.Constraint + switch spec.Constraint.Tp { + case ast.ConstraintKey, ast.ConstraintIndex: + err = d.CreateIndex(ctx, ident, false, model.NewCIStr(constr.Name), spec.Constraint.Keys) + case ast.ConstraintUniq, ast.ConstraintUniqIndex, ast.ConstraintUniqKey: + err = d.CreateIndex(ctx, ident, true, model.NewCIStr(constr.Name), spec.Constraint.Keys) + default: + // nothing to do now. + } + default: + // nothing to do now. + } + + if err != nil { + return errors.Trace(err) + } + } + + return nil +} + +func checkColumnConstraint(constraints []*ast.ColumnOption) error { + for _, constraint := range constraints { + switch constraint.Tp { + case ast.ColumnOptionAutoIncrement, ast.ColumnOptionPrimaryKey, ast.ColumnOptionUniq, ast.ColumnOptionUniqKey: + return errors.Errorf("unsupported add column constraint - %v", constraint.Tp) + } + } + + return nil +} + +// AddColumn will add a new column to the table. +func (d *ddl) AddColumn(ctx context.Context, ti ast.Ident, spec *ast.AlterTableSpec) error { + // Check whether the added column constraints are supported. + err := checkColumnConstraint(spec.Column.Options) + if err != nil { + return errors.Trace(err) + } + + is := d.infoHandle.Get() + schema, ok := is.SchemaByName(ti.Schema) + if !ok { + return errors.Trace(infoschema.DatabaseNotExists) + } + + t, err := is.TableByName(ti.Schema, ti.Name) + if err != nil { + return errors.Trace(infoschema.TableNotExists) + } + + // Check whether added column has existed. + colName := spec.Column.Name.Name.O + col := column.FindCol(t.Cols(), colName) + if col != nil { + return errors.Errorf("column %s already exists", colName) + } + + // ingore table constraints now, maybe return error later + // we use length(t.Cols()) as the default offset first, later we will change the + // column's offset later. + col, _, err = d.buildColumnAndConstraint(ctx, len(t.Cols()), spec.Column) + if err != nil { + return errors.Trace(err) + } + + job := &model.Job{ + SchemaID: schema.ID, + TableID: t.Meta().ID, + Type: model.ActionAddColumn, + Args: []interface{}{&col.ColumnInfo, spec.Position, 0}, + } + + err = d.startDDLJob(ctx, job) + err = d.hook.OnChanged(err) + return errors.Trace(err) +} + +// DropColumn will drop a column from the table, now we don't support drop the column with index covered. +func (d *ddl) DropColumn(ctx context.Context, ti ast.Ident, colName model.CIStr) error { + is := d.infoHandle.Get() + schema, ok := is.SchemaByName(ti.Schema) + if !ok { + return errors.Trace(infoschema.DatabaseNotExists) + } + + t, err := is.TableByName(ti.Schema, ti.Name) + if err != nil { + return errors.Trace(infoschema.TableNotExists) + } + + // Check whether dropped column has existed. + col := column.FindCol(t.Cols(), colName.L) + if col == nil { + return errors.Errorf("column %s doesn’t exist", colName.L) + } + + job := &model.Job{ + SchemaID: schema.ID, + TableID: t.Meta().ID, + Type: model.ActionDropColumn, + Args: []interface{}{colName}, + } + + err = d.startDDLJob(ctx, job) + err = d.hook.OnChanged(err) + return errors.Trace(err) +} + +// DropTable will proceed even if some table in the list does not exists. +func (d *ddl) DropTable(ctx context.Context, ti ast.Ident) (err error) { + is := d.GetInformationSchema() + schema, ok := is.SchemaByName(ti.Schema) + if !ok { + return infoschema.DatabaseNotExists.Gen("database %s not exists", ti.Schema) + } + + tb, err := is.TableByName(ti.Schema, ti.Name) + if err != nil { + return errors.Trace(infoschema.TableNotExists) + } + + job := &model.Job{ + SchemaID: schema.ID, + TableID: tb.Meta().ID, + Type: model.ActionDropTable, + } + + err = d.startDDLJob(ctx, job) + err = d.hook.OnChanged(err) + return errors.Trace(err) +} + +func (d *ddl) CreateIndex(ctx context.Context, ti ast.Ident, unique bool, indexName model.CIStr, idxColNames []*ast.IndexColName) error { + is := d.infoHandle.Get() + schema, ok := is.SchemaByName(ti.Schema) + if !ok { + return infoschema.DatabaseNotExists.Gen("database %s not exists", ti.Schema) + } + + t, err := is.TableByName(ti.Schema, ti.Name) + if err != nil { + return errors.Trace(infoschema.TableNotExists) + } + indexID, err := d.genGlobalID() + if err != nil { + return errors.Trace(err) + } + + job := &model.Job{ + SchemaID: schema.ID, + TableID: t.Meta().ID, + Type: model.ActionAddIndex, + Args: []interface{}{unique, indexName, indexID, idxColNames}, + } + + err = d.startDDLJob(ctx, job) + err = d.hook.OnChanged(err) + return errors.Trace(err) +} + +func (d *ddl) DropIndex(ctx context.Context, ti ast.Ident, indexName model.CIStr) error { + is := d.infoHandle.Get() + schema, ok := is.SchemaByName(ti.Schema) + if !ok { + return errors.Trace(infoschema.DatabaseNotExists) + } + + t, err := is.TableByName(ti.Schema, ti.Name) + if err != nil { + return errors.Trace(infoschema.TableNotExists) + } + + job := &model.Job{ + SchemaID: schema.ID, + TableID: t.Meta().ID, + Type: model.ActionDropIndex, + Args: []interface{}{indexName}, + } + + err = d.startDDLJob(ctx, job) + err = d.hook.OnChanged(err) + return errors.Trace(err) +} + +// findCol finds column in cols by name. +func findCol(cols []*model.ColumnInfo, name string) *model.ColumnInfo { + name = strings.ToLower(name) + for _, col := range cols { + if col.Name.L == name { + return col + } + } + + return nil +} diff --git a/vendor/github.com/pingcap/tidb/ddl/ddl_worker.go b/vendor/github.com/pingcap/tidb/ddl/ddl_worker.go new file mode 100644 index 000000000..e8bd97024 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ddl/ddl_worker.go @@ -0,0 +1,392 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ddl + +import ( + "time" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/meta" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/terror" +) + +func (d *ddl) startDDLJob(ctx context.Context, job *model.Job) error { + // for every DDL, we must commit current transaction. + if err := ctx.FinishTxn(false); err != nil { + return errors.Trace(err) + } + + // Create a new job and queue it. + err := kv.RunInNewTxn(d.store, true, func(txn kv.Transaction) error { + t := meta.NewMeta(txn) + var err error + job.ID, err = t.GenGlobalID() + if err != nil { + return errors.Trace(err) + } + + err = t.EnQueueDDLJob(job) + return errors.Trace(err) + }) + + if err != nil { + return errors.Trace(err) + } + + // notice worker that we push a new job and wait the job done. + asyncNotify(d.ddlJobCh) + + log.Warnf("[ddl] start DDL job %v", job) + + jobID := job.ID + + var historyJob *model.Job + + // for a job from start to end, the state of it will be none -> delete only -> write only -> reorganization -> public + // for every state changes, we will wait as lease 2 * lease time, so here the ticker check is 10 * lease. + ticker := time.NewTicker(chooseLeaseTime(10*d.lease, 10*time.Second)) + defer ticker.Stop() + for { + select { + case <-d.ddlJobDoneCh: + case <-ticker.C: + } + + historyJob, err = d.getHistoryDDLJob(jobID) + if err != nil { + log.Errorf("[ddl] get history DDL job err %v, check again", err) + continue + } else if historyJob == nil { + log.Warnf("[ddl] DDL job %d is not in history, maybe not run", jobID) + continue + } + + // if a job is a history table, the state must be JobDone or JobCancel. + if historyJob.State == model.JobDone { + return nil + } + + return errors.Errorf(historyJob.Error) + } +} + +func (d *ddl) getHistoryDDLJob(id int64) (*model.Job, error) { + var job *model.Job + + err := kv.RunInNewTxn(d.store, false, func(txn kv.Transaction) error { + t := meta.NewMeta(txn) + var err1 error + job, err1 = t.GetHistoryDDLJob(id) + return errors.Trace(err1) + }) + + return job, errors.Trace(err) +} + +func asyncNotify(ch chan struct{}) { + select { + case ch <- struct{}{}: + default: + } +} + +func (d *ddl) checkOwner(t *meta.Meta, flag JobType) (*model.Owner, error) { + var owner *model.Owner + var err error + + switch flag { + case ddlJobFlag: + owner, err = t.GetDDLJobOwner() + case bgJobFlag: + owner, err = t.GetBgJobOwner() + default: + err = errInvalidJobFlag + } + if err != nil { + return nil, errors.Trace(err) + } + + if owner == nil { + owner = &model.Owner{} + // try to set onwer + owner.OwnerID = d.uuid + } + + now := time.Now().UnixNano() + // we must wait 2 * lease time to guarantee other servers update the schema, + // the owner will update its owner status every 2 * lease time, so here we use + // 4 * lease to check its timeout. + maxTimeout := int64(4 * d.lease) + if owner.OwnerID == d.uuid || now-owner.LastUpdateTS > maxTimeout { + owner.OwnerID = d.uuid + owner.LastUpdateTS = now + // update status. + switch flag { + case ddlJobFlag: + err = t.SetDDLJobOwner(owner) + case bgJobFlag: + err = t.SetBgJobOwner(owner) + } + if err != nil { + return nil, errors.Trace(err) + } + log.Debugf("[ddl] become %s job owner %s", flag, owner.OwnerID) + } + + if owner.OwnerID != d.uuid { + log.Debugf("[ddl] not %s job owner, owner is %s", flag, owner.OwnerID) + return nil, errors.Trace(ErrNotOwner) + } + + return owner, nil +} + +func (d *ddl) getFirstDDLJob(t *meta.Meta) (*model.Job, error) { + job, err := t.GetDDLJob(0) + return job, errors.Trace(err) +} + +// every time we enter another state except final state, we must call this function. +func (d *ddl) updateDDLJob(t *meta.Meta, job *model.Job) error { + err := t.UpdateDDLJob(0, job) + return errors.Trace(err) +} + +func (d *ddl) finishDDLJob(t *meta.Meta, job *model.Job) error { + log.Warnf("[ddl] finish DDL job %v", job) + // done, notice and run next job. + _, err := t.DeQueueDDLJob() + if err != nil { + return errors.Trace(err) + } + switch job.Type { + case model.ActionDropSchema, model.ActionDropTable: + if err = d.prepareBgJob(job); err != nil { + return errors.Trace(err) + } + } + + err = t.AddHistoryDDLJob(job) + return errors.Trace(err) +} + +// ErrNotOwner means we are not owner and can't handle DDL jobs. +var ErrNotOwner = errors.New("DDL: not owner") + +// ErrWorkerClosed means we have already closed the DDL worker. +var ErrWorkerClosed = errors.New("DDL: worker is closed") + +var errInvalidJobFlag = errors.New("DDL: invalid job flag") + +// JobType is job type, including ddl/background. +type JobType int + +const ( + ddlJobFlag = iota + 1 + bgJobFlag +) + +func (j JobType) String() string { + switch j { + case ddlJobFlag: + return "ddl" + case bgJobFlag: + return "background" + } + + return "unknown" +} + +func (d *ddl) handleDDLJobQueue() error { + for { + if d.isClosed() { + return nil + } + + waitTime := 2 * d.lease + + var job *model.Job + err := kv.RunInNewTxn(d.store, false, func(txn kv.Transaction) error { + t := meta.NewMeta(txn) + owner, err := d.checkOwner(t, ddlJobFlag) + if terror.ErrorEqual(err, ErrNotOwner) { + // we are not owner, return and retry checking later. + return nil + } else if err != nil { + return errors.Trace(err) + } + + // become the owner + // get the first job and run + job, err = d.getFirstDDLJob(t) + if job == nil || err != nil { + return errors.Trace(err) + } + + if job.IsRunning() { + // if we enter a new state, crash when waiting 2 * lease time, and restart quickly, + // we may run the job immediately again, but we don't wait enough 2 * lease time to + // let other servers update the schema. + // so here we must check the elapsed time from last update, if < 2 * lease, we must + // wait again. + elapsed := time.Duration(time.Now().UnixNano() - job.LastUpdateTS) + if elapsed > 0 && elapsed < waitTime { + log.Warnf("[ddl] the elapsed time from last update is %s < %s, wait again", elapsed, waitTime) + waitTime -= elapsed + return nil + } + } + + log.Warnf("[ddl] run DDL job %v", job) + + d.hook.OnJobRunBefore(job) + + // if run job meets error, we will save this error in job Error + // and retry later if the job is not cancelled. + d.runDDLJob(t, job) + + if job.IsFinished() { + err = d.finishDDLJob(t, job) + } else { + err = d.updateDDLJob(t, job) + } + if err != nil { + return errors.Trace(err) + } + + // running job may cost some time, so here we must update owner status to + // prevent other become the owner. + owner.LastUpdateTS = time.Now().UnixNano() + err = t.SetDDLJobOwner(owner) + + return errors.Trace(err) + }) + if err != nil { + return errors.Trace(err) + } else if job == nil { + // no job now, return and retry get later. + return nil + } + + d.hook.OnJobUpdated(job) + + // here means the job enters another state (delete only, write only, public, etc...) or is cancelled. + // if the job is done or still running, we will wait 2 * lease time to guarantee other servers to update + // the newest schema. + if job.State == model.JobRunning || job.State == model.JobDone { + d.waitSchemaChanged(waitTime) + } + + if job.IsFinished() { + d.startBgJob(job.Type) + asyncNotify(d.ddlJobDoneCh) + } + } +} + +func chooseLeaseTime(n1 time.Duration, n2 time.Duration) time.Duration { + if n1 > 0 { + return n1 + } + + return n2 +} + +// onDDLWorker is for async online schema change, it will try to become the owner first, +// then wait or pull the job queue to handle a schema change job. +func (d *ddl) onDDLWorker() { + defer d.wait.Done() + + // we use 4 * lease time to check owner's timeout, so here, we will update owner's status + // every 2 * lease time, if lease is 0, we will use default 10s. + checkTime := chooseLeaseTime(2*d.lease, 10*time.Second) + + ticker := time.NewTicker(checkTime) + defer ticker.Stop() + + for { + select { + case <-ticker.C: + log.Debugf("[ddl] wait %s to check DDL status again", checkTime) + case <-d.ddlJobCh: + case <-d.quitCh: + return + } + + err := d.handleDDLJobQueue() + if err != nil { + log.Errorf("[ddl] handle ddl job err %v", errors.ErrorStack(err)) + } + } +} + +func (d *ddl) runDDLJob(t *meta.Meta, job *model.Job) { + if job.IsFinished() { + return + } + + job.State = model.JobRunning + + var err error + switch job.Type { + case model.ActionCreateSchema: + err = d.onCreateSchema(t, job) + case model.ActionDropSchema: + err = d.onDropSchema(t, job) + case model.ActionCreateTable: + err = d.onCreateTable(t, job) + case model.ActionDropTable: + err = d.onDropTable(t, job) + case model.ActionAddColumn: + err = d.onAddColumn(t, job) + case model.ActionDropColumn: + err = d.onDropColumn(t, job) + case model.ActionAddIndex: + err = d.onCreateIndex(t, job) + case model.ActionDropIndex: + err = d.onDropIndex(t, job) + default: + // invalid job, cancel it. + job.State = model.JobCancelled + err = errors.Errorf("invalid ddl job %v", job) + } + + // saves error in job, so that others can know error happens. + if err != nil { + // if job is not cancelled, we should log this error. + if job.State != model.JobCancelled { + log.Errorf("run ddl job err %v", errors.ErrorStack(err)) + } + + job.Error = err.Error() + job.ErrorCount++ + } +} + +// for every lease seconds, we will re-update the whole schema, so we will wait 2 * lease time +// to guarantee that all servers have already updated schema. +func (d *ddl) waitSchemaChanged(waitTime time.Duration) { + if waitTime == 0 { + return + } + + select { + case <-time.After(waitTime): + case <-d.quitCh: + } +} diff --git a/vendor/github.com/pingcap/tidb/ddl/index.go b/vendor/github.com/pingcap/tidb/ddl/index.go new file mode 100644 index 000000000..d4f5fc499 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ddl/index.go @@ -0,0 +1,473 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ddl + +import ( + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/meta" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/table" + "github.com/pingcap/tidb/table/tables" + "github.com/pingcap/tidb/terror" + "github.com/pingcap/tidb/util" + "github.com/pingcap/tidb/util/types" +) + +func buildIndexInfo(tblInfo *model.TableInfo, unique bool, indexName model.CIStr, indexID int64, idxColNames []*ast.IndexColName) (*model.IndexInfo, error) { + // build offsets + idxColumns := make([]*model.IndexColumn, 0, len(idxColNames)) + for _, ic := range idxColNames { + col := findCol(tblInfo.Columns, ic.Column.Name.O) + if col == nil { + return nil, errors.Errorf("CREATE INDEX: column does not exist: %s", ic.Column.Name.O) + } + + idxColumns = append(idxColumns, &model.IndexColumn{ + Name: col.Name, + Offset: col.Offset, + Length: ic.Length, + }) + } + // create index info + idxInfo := &model.IndexInfo{ + ID: indexID, + Name: indexName, + Columns: idxColumns, + Unique: unique, + State: model.StateNone, + } + return idxInfo, nil +} + +func addIndexColumnFlag(tblInfo *model.TableInfo, indexInfo *model.IndexInfo) { + col := indexInfo.Columns[0] + + if indexInfo.Unique && len(indexInfo.Columns) == 1 { + tblInfo.Columns[col.Offset].Flag |= mysql.UniqueKeyFlag + } else { + tblInfo.Columns[col.Offset].Flag |= mysql.MultipleKeyFlag + } +} + +func dropIndexColumnFlag(tblInfo *model.TableInfo, indexInfo *model.IndexInfo) { + col := indexInfo.Columns[0] + + if indexInfo.Unique && len(indexInfo.Columns) == 1 { + tblInfo.Columns[col.Offset].Flag &= ^uint(mysql.UniqueKeyFlag) + } else { + tblInfo.Columns[col.Offset].Flag &= ^uint(mysql.MultipleKeyFlag) + } + + // other index may still cover this col + for _, index := range tblInfo.Indices { + if index.Name.L == indexInfo.Name.L { + continue + } + + if index.Columns[0].Name.L != col.Name.L { + continue + } + + addIndexColumnFlag(tblInfo, index) + } +} + +func (d *ddl) onCreateIndex(t *meta.Meta, job *model.Job) error { + schemaID := job.SchemaID + tblInfo, err := d.getTableInfo(t, job) + if err != nil { + return errors.Trace(err) + } + + var ( + unique bool + indexName model.CIStr + indexID int64 + idxColNames []*ast.IndexColName + ) + + err = job.DecodeArgs(&unique, &indexName, &indexID, &idxColNames) + if err != nil { + job.State = model.JobCancelled + return errors.Trace(err) + } + + var indexInfo *model.IndexInfo + for _, idx := range tblInfo.Indices { + if idx.Name.L == indexName.L { + if idx.State == model.StatePublic { + // we already have a index with same index name + job.State = model.JobCancelled + return errors.Errorf("CREATE INDEX: index already exist %s", indexName) + } + + indexInfo = idx + } + } + + if indexInfo == nil { + indexInfo, err = buildIndexInfo(tblInfo, unique, indexName, indexID, idxColNames) + if err != nil { + job.State = model.JobCancelled + return errors.Trace(err) + } + tblInfo.Indices = append(tblInfo.Indices, indexInfo) + } + + _, err = t.GenSchemaVersion() + if err != nil { + return errors.Trace(err) + } + + switch indexInfo.State { + case model.StateNone: + // none -> delete only + job.SchemaState = model.StateDeleteOnly + indexInfo.State = model.StateDeleteOnly + err = t.UpdateTable(schemaID, tblInfo) + return errors.Trace(err) + case model.StateDeleteOnly: + // delete only -> write only + job.SchemaState = model.StateWriteOnly + indexInfo.State = model.StateWriteOnly + err = t.UpdateTable(schemaID, tblInfo) + return errors.Trace(err) + case model.StateWriteOnly: + // write only -> reorganization + job.SchemaState = model.StateWriteReorganization + indexInfo.State = model.StateWriteReorganization + // initialize SnapshotVer to 0 for later reorganization check. + job.SnapshotVer = 0 + err = t.UpdateTable(schemaID, tblInfo) + return errors.Trace(err) + case model.StateWriteReorganization: + // reorganization -> public + reorgInfo, err := d.getReorgInfo(t, job) + if err != nil || reorgInfo.first { + // if we run reorg firstly, we should update the job snapshot version + // and then run the reorg next time. + return errors.Trace(err) + } + + var tbl table.Table + tbl, err = d.getTable(schemaID, tblInfo) + if err != nil { + return errors.Trace(err) + } + + err = d.runReorgJob(func() error { + return d.addTableIndex(tbl, indexInfo, reorgInfo) + }) + + if terror.ErrorEqual(err, errWaitReorgTimeout) { + // if timeout, we should return, check for the owner and re-wait job done. + return nil + } + if err != nil { + return errors.Trace(err) + } + + indexInfo.State = model.StatePublic + // set column index flag. + addIndexColumnFlag(tblInfo, indexInfo) + if err = t.UpdateTable(schemaID, tblInfo); err != nil { + return errors.Trace(err) + } + + // finish this job + job.SchemaState = model.StatePublic + job.State = model.JobDone + return nil + default: + return errors.Errorf("invalid index state %v", tblInfo.State) + } +} + +func (d *ddl) onDropIndex(t *meta.Meta, job *model.Job) error { + schemaID := job.SchemaID + tblInfo, err := d.getTableInfo(t, job) + if err != nil { + return errors.Trace(err) + } + + var indexName model.CIStr + if err = job.DecodeArgs(&indexName); err != nil { + job.State = model.JobCancelled + return errors.Trace(err) + } + + var indexInfo *model.IndexInfo + for _, idx := range tblInfo.Indices { + if idx.Name.L == indexName.L { + indexInfo = idx + } + } + + if indexInfo == nil { + job.State = model.JobCancelled + return errors.Errorf("index %s doesn't exist", indexName) + } + + _, err = t.GenSchemaVersion() + if err != nil { + return errors.Trace(err) + } + + switch indexInfo.State { + case model.StatePublic: + // public -> write only + job.SchemaState = model.StateWriteOnly + indexInfo.State = model.StateWriteOnly + err = t.UpdateTable(schemaID, tblInfo) + return errors.Trace(err) + case model.StateWriteOnly: + // write only -> delete only + job.SchemaState = model.StateDeleteOnly + indexInfo.State = model.StateDeleteOnly + err = t.UpdateTable(schemaID, tblInfo) + return errors.Trace(err) + case model.StateDeleteOnly: + // delete only -> reorganization + job.SchemaState = model.StateDeleteReorganization + indexInfo.State = model.StateDeleteReorganization + err = t.UpdateTable(schemaID, tblInfo) + return errors.Trace(err) + case model.StateDeleteReorganization: + // reorganization -> absent + tbl, err := d.getTable(schemaID, tblInfo) + if err != nil { + return errors.Trace(err) + } + + err = d.runReorgJob(func() error { + return d.dropTableIndex(tbl, indexInfo) + }) + + if terror.ErrorEqual(err, errWaitReorgTimeout) { + // if timeout, we should return, check for the owner and re-wait job done. + return nil + } + if err != nil { + return errors.Trace(err) + } + + // all reorganization jobs done, drop this index + newIndices := make([]*model.IndexInfo, 0, len(tblInfo.Indices)) + for _, idx := range tblInfo.Indices { + if idx.Name.L != indexName.L { + newIndices = append(newIndices, idx) + } + } + tblInfo.Indices = newIndices + // set column index flag. + dropIndexColumnFlag(tblInfo, indexInfo) + if err = t.UpdateTable(schemaID, tblInfo); err != nil { + return errors.Trace(err) + } + + // finish this job + job.SchemaState = model.StateNone + job.State = model.JobDone + return nil + default: + return errors.Errorf("invalid table state %v", tblInfo.State) + } +} + +func checkRowExist(txn kv.Transaction, t table.Table, handle int64) (bool, error) { + _, err := txn.Get(t.RecordKey(handle, nil)) + if terror.ErrorEqual(err, kv.ErrNotExist) { + // If row doesn't exist, we may have deleted the row already, + // no need to add index again. + return false, nil + } else if err != nil { + return false, errors.Trace(err) + } + + return true, nil +} + +func fetchRowColVals(txn kv.Transaction, t table.Table, handle int64, indexInfo *model.IndexInfo) ([]types.Datum, error) { + // fetch datas + cols := t.Cols() + vals := make([]types.Datum, 0, len(indexInfo.Columns)) + for _, v := range indexInfo.Columns { + col := cols[v.Offset] + k := t.RecordKey(handle, col) + data, err := txn.Get(k) + if err != nil { + return nil, errors.Trace(err) + } + val, err := tables.DecodeValue(data, &col.FieldType) + if err != nil { + return nil, errors.Trace(err) + } + vals = append(vals, val) + } + + return vals, nil +} + +const maxBatchSize = 1024 + +// How to add index in reorganization state? +// 1. Generate a snapshot with special version. +// 2. Traverse the snapshot, get every row in the table. +// 3. For one row, if the row has been already deleted, skip to next row. +// 4. If not deleted, check whether index has existed, if existed, skip to next row. +// 5. If index doesn't exist, create the index and then continue to handle next row. +func (d *ddl) addTableIndex(t table.Table, indexInfo *model.IndexInfo, reorgInfo *reorgInfo) error { + seekHandle := reorgInfo.Handle + version := reorgInfo.SnapshotVer + for { + handles, err := d.getSnapshotRows(t, version, seekHandle) + if err != nil { + return errors.Trace(err) + } else if len(handles) == 0 { + return nil + } + + seekHandle = handles[len(handles)-1] + 1 + + err = d.backfillTableIndex(t, indexInfo, handles, reorgInfo) + if err != nil { + return errors.Trace(err) + } + } +} + +func (d *ddl) getSnapshotRows(t table.Table, version uint64, seekHandle int64) ([]int64, error) { + ver := kv.Version{Ver: version} + + snap, err := d.store.GetSnapshot(ver) + if err != nil { + return nil, errors.Trace(err) + } + + defer snap.Release() + + firstKey := t.RecordKey(seekHandle, nil) + + it, err := snap.Seek(firstKey) + if err != nil { + return nil, errors.Trace(err) + } + defer it.Close() + + handles := make([]int64, 0, maxBatchSize) + + for it.Valid() { + if !it.Key().HasPrefix(t.RecordPrefix()) { + break + } + + var handle int64 + handle, err = tables.DecodeRecordKeyHandle(it.Key()) + if err != nil { + return nil, errors.Trace(err) + } + + rk := t.RecordKey(handle, nil) + + handles = append(handles, handle) + if len(handles) == maxBatchSize { + break + } + + err = kv.NextUntil(it, util.RowKeyPrefixFilter(rk)) + if terror.ErrorEqual(err, kv.ErrNotExist) { + break + } else if err != nil { + return nil, errors.Trace(err) + } + } + + return handles, nil +} + +func lockRow(txn kv.Transaction, t table.Table, h int64) error { + // Get row lock key + lockKey := t.RecordKey(h, nil) + // set row lock key to current txn + err := txn.Set(lockKey, []byte(txn.String())) + return errors.Trace(err) +} + +func (d *ddl) backfillTableIndex(t table.Table, indexInfo *model.IndexInfo, handles []int64, reorgInfo *reorgInfo) error { + kvX := kv.NewKVIndex(t.IndexPrefix(), indexInfo.Name.L, indexInfo.ID, indexInfo.Unique) + + for _, handle := range handles { + log.Debug("[ddl] building index...", handle) + + err := kv.RunInNewTxn(d.store, true, func(txn kv.Transaction) error { + if err := d.isReorgRunnable(txn); err != nil { + return errors.Trace(err) + } + + // first check row exists + exist, err := checkRowExist(txn, t, handle) + if err != nil { + return errors.Trace(err) + } else if !exist { + // row doesn't exist, skip it. + return nil + } + + var vals []types.Datum + vals, err = fetchRowColVals(txn, t, handle, indexInfo) + if err != nil { + return errors.Trace(err) + } + + exist, _, err = kvX.Exist(txn, vals, handle) + if err != nil { + return errors.Trace(err) + } else if exist { + // index already exists, skip it. + return nil + } + + err = lockRow(txn, t, handle) + if err != nil { + return errors.Trace(err) + } + + // create the index. + err = kvX.Create(txn, vals, handle) + if err != nil { + return errors.Trace(err) + } + + // update reorg next handle + return errors.Trace(reorgInfo.UpdateHandle(txn, handle)) + }) + + if err != nil { + return errors.Trace(err) + } + } + + return nil +} + +func (d *ddl) dropTableIndex(t table.Table, indexInfo *model.IndexInfo) error { + prefix := kv.GenIndexPrefix(t.IndexPrefix(), indexInfo.ID) + err := d.delKeysWithPrefix(prefix) + + return errors.Trace(err) +} diff --git a/vendor/github.com/pingcap/tidb/ddl/reorg.go b/vendor/github.com/pingcap/tidb/ddl/reorg.go new file mode 100644 index 000000000..a00c07297 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ddl/reorg.go @@ -0,0 +1,250 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ddl + +import ( + "fmt" + "time" + + "github.com/juju/errors" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/meta" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/terror" +) + +var _ context.Context = &reorgContext{} + +// reorgContext implements context.Context interface for reorganization use. +type reorgContext struct { + store kv.Storage + m map[fmt.Stringer]interface{} + txn kv.Transaction +} + +func (c *reorgContext) GetTxn(forceNew bool) (kv.Transaction, error) { + if forceNew { + if c.txn != nil { + if err := c.txn.Commit(); err != nil { + return nil, errors.Trace(err) + } + c.txn = nil + } + } + + if c.txn != nil { + return c.txn, nil + } + + txn, err := c.store.Begin() + if err != nil { + return nil, errors.Trace(err) + } + + c.txn = txn + return c.txn, nil +} + +func (c *reorgContext) FinishTxn(rollback bool) error { + if c.txn == nil { + return nil + } + + var err error + if rollback { + err = c.txn.Rollback() + } else { + err = c.txn.Commit() + } + + c.txn = nil + + return errors.Trace(err) +} + +func (c *reorgContext) SetValue(key fmt.Stringer, value interface{}) { + c.m[key] = value +} + +func (c *reorgContext) Value(key fmt.Stringer) interface{} { + return c.m[key] +} + +func (c *reorgContext) ClearValue(key fmt.Stringer) { + delete(c.m, key) +} + +func (d *ddl) newReorgContext() context.Context { + c := &reorgContext{ + store: d.store, + m: make(map[fmt.Stringer]interface{}), + } + + return c +} + +const waitReorgTimeout = 10 * time.Second + +var errWaitReorgTimeout = errors.New("wait for reorganization timeout") + +func (d *ddl) runReorgJob(f func() error) error { + if d.reorgDoneCh == nil { + // start a reorganization job + d.wait.Add(1) + d.reorgDoneCh = make(chan error, 1) + go func() { + defer d.wait.Done() + d.reorgDoneCh <- f() + }() + } + + waitTimeout := waitReorgTimeout + // if d.lease is 0, we are using a local storage, + // and we can wait the reorganization to be done here. + // if d.lease > 0, we don't need to wait here because + // we will wait 2 * lease outer and try checking again, + // so we use a very little timeout here. + if d.lease > 0 { + waitTimeout = 1 * time.Millisecond + } + + // wait reorganization job done or timeout + select { + case err := <-d.reorgDoneCh: + d.reorgDoneCh = nil + return errors.Trace(err) + case <-d.quitCh: + // we return errWaitReorgTimeout here too, so that outer loop will break. + return errWaitReorgTimeout + case <-time.After(waitTimeout): + // if timeout, we will return, check the owner and retry to wait job done again. + return errWaitReorgTimeout + } +} + +func (d *ddl) isReorgRunnable(txn kv.Transaction) error { + if d.isClosed() { + // worker is closed, can't run reorganization. + return errors.Trace(ErrWorkerClosed) + } + + t := meta.NewMeta(txn) + owner, err := t.GetDDLJobOwner() + if err != nil { + return errors.Trace(err) + } else if owner == nil || owner.OwnerID != d.uuid { + // if no owner, we will try later, so here just return error. + // or another server is owner, return error too. + return errors.Trace(ErrNotOwner) + } + + return nil +} + +func (d *ddl) delKeysWithPrefix(prefix kv.Key) error { + for { + keys := make([]kv.Key, 0, maxBatchSize) + err := kv.RunInNewTxn(d.store, true, func(txn kv.Transaction) error { + if err1 := d.isReorgRunnable(txn); err1 != nil { + return errors.Trace(err1) + } + + iter, err := txn.Seek(prefix) + if err != nil { + return errors.Trace(err) + } + + defer iter.Close() + for i := 0; i < maxBatchSize; i++ { + if iter.Valid() && iter.Key().HasPrefix(prefix) { + keys = append(keys, iter.Key().Clone()) + err = iter.Next() + if err != nil { + return errors.Trace(err) + } + } else { + break + } + } + + for _, key := range keys { + err := txn.Delete(key) + // must skip ErrNotExist + // if key doesn't exist, skip this error. + if err != nil && !terror.ErrorEqual(err, kv.ErrNotExist) { + return errors.Trace(err) + } + } + + return nil + }) + + if err != nil { + return errors.Trace(err) + } + + // delete no keys, return. + if len(keys) == 0 { + return nil + } + } +} + +type reorgInfo struct { + *model.Job + Handle int64 + d *ddl + first bool +} + +func (d *ddl) getReorgInfo(t *meta.Meta, job *model.Job) (*reorgInfo, error) { + var err error + + info := &reorgInfo{ + Job: job, + d: d, + first: job.SnapshotVer == 0, + } + + if info.first { + // get the current version for reorganization if we don't have + var ver kv.Version + ver, err = d.store.CurrentVersion() + if err != nil { + return nil, errors.Trace(err) + } else if ver.Ver <= 0 { + return nil, errors.Errorf("invalid storage current version %d", ver.Ver) + } + + job.SnapshotVer = ver.Ver + } else { + info.Handle, err = t.GetDDLReorgHandle(job) + if err != nil { + return nil, errors.Trace(err) + } + } + + if info.Handle > 0 { + // we have already handled this handle, so use next + info.Handle++ + } + + return info, errors.Trace(err) +} + +func (r *reorgInfo) UpdateHandle(txn kv.Transaction, handle int64) error { + t := meta.NewMeta(txn) + return errors.Trace(t.UpdateDDLReorgHandle(r.Job, handle)) +} diff --git a/vendor/github.com/pingcap/tidb/ddl/schema.go b/vendor/github.com/pingcap/tidb/ddl/schema.go new file mode 100644 index 000000000..ad411a8c9 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ddl/schema.go @@ -0,0 +1,163 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ddl + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/meta" + "github.com/pingcap/tidb/meta/autoid" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/table" + "github.com/pingcap/tidb/terror" +) + +func (d *ddl) onCreateSchema(t *meta.Meta, job *model.Job) error { + schemaID := job.SchemaID + dbInfo := &model.DBInfo{} + if err := job.DecodeArgs(dbInfo); err != nil { + // arg error, cancel this job. + job.State = model.JobCancelled + return errors.Trace(err) + } + + dbInfo.ID = schemaID + dbInfo.State = model.StateNone + + dbs, err := t.ListDatabases() + if err != nil { + return errors.Trace(err) + } + + for _, db := range dbs { + if db.Name.L == dbInfo.Name.L { + if db.ID != schemaID { + // database exists, can't create, we should cancel this job now. + job.State = model.JobCancelled + return errors.Trace(infoschema.DatabaseExists) + } + dbInfo = db + } + } + + _, err = t.GenSchemaVersion() + if err != nil { + return errors.Trace(err) + } + + switch dbInfo.State { + case model.StateNone: + // none -> public + job.SchemaState = model.StatePublic + dbInfo.State = model.StatePublic + err = t.CreateDatabase(dbInfo) + if err != nil { + return errors.Trace(err) + } + // finish this job + job.State = model.JobDone + return nil + default: + // we can't enter here. + return errors.Errorf("invalid db state %v", dbInfo.State) + } +} + +func (d *ddl) delReorgSchema(t *meta.Meta, job *model.Job) error { + dbInfo := &model.DBInfo{} + if err := job.DecodeArgs(dbInfo); err != nil { + // arg error, cancel this job. + job.State = model.JobCancelled + return errors.Trace(err) + } + + tables, err := t.ListTables(dbInfo.ID) + if terror.ErrorEqual(meta.ErrDBNotExists, err) { + job.State = model.JobDone + return nil + } + if err != nil { + return errors.Trace(err) + } + + if err = d.dropSchemaData(dbInfo, tables); err != nil { + return errors.Trace(err) + } + + // finish this background job + job.SchemaState = model.StateNone + job.State = model.JobDone + + return nil +} + +func (d *ddl) onDropSchema(t *meta.Meta, job *model.Job) error { + dbInfo, err := t.GetDatabase(job.SchemaID) + if err != nil { + return errors.Trace(err) + } + if dbInfo == nil { + job.State = model.JobCancelled + return errors.Trace(infoschema.DatabaseNotExists) + } + + _, err = t.GenSchemaVersion() + if err != nil { + return errors.Trace(err) + } + + switch dbInfo.State { + case model.StatePublic: + // public -> write only + job.SchemaState = model.StateWriteOnly + dbInfo.State = model.StateWriteOnly + err = t.UpdateDatabase(dbInfo) + case model.StateWriteOnly: + // write only -> delete only + job.SchemaState = model.StateDeleteOnly + dbInfo.State = model.StateDeleteOnly + err = t.UpdateDatabase(dbInfo) + case model.StateDeleteOnly: + dbInfo.State = model.StateDeleteReorganization + err = t.UpdateDatabase(dbInfo) + if err = t.DropDatabase(dbInfo.ID); err != nil { + break + } + // finish this job + job.Args = []interface{}{dbInfo} + job.State = model.JobDone + job.SchemaState = model.StateNone + default: + // we can't enter here. + err = errors.Errorf("invalid db state %v", dbInfo.State) + } + + return errors.Trace(err) +} + +func (d *ddl) dropSchemaData(dbInfo *model.DBInfo, tables []*model.TableInfo) error { + for _, tblInfo := range tables { + alloc := autoid.NewAllocator(d.store, dbInfo.ID) + t, err := table.TableFromMeta(alloc, tblInfo) + if err != nil { + return errors.Trace(err) + } + + err = d.dropTableData(t) + if err != nil { + return errors.Trace(err) + } + } + return nil +} diff --git a/vendor/github.com/pingcap/tidb/ddl/stat.go b/vendor/github.com/pingcap/tidb/ddl/stat.go new file mode 100644 index 000000000..a39fa5717 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ddl/stat.go @@ -0,0 +1,123 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ddl + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/inspectkv" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/sessionctx/variable" +) + +var ( + serverID = "server_id" + ddlSchemaVersion = "ddl_schema_version" + ddlOwnerID = "ddl_owner_id" + ddlOwnerLastUpdateTS = "ddl_owner_last_update_ts" + ddlJobID = "ddl_job_id" + ddlJobAction = "ddl_job_action" + ddlJobLastUpdateTS = "ddl_job_last_update_ts" + ddlJobState = "ddl_job_state" + ddlJobError = "ddl_job_error" + ddlJobSchemaState = "ddl_job_schema_state" + ddlJobSchemaID = "ddl_job_schema_id" + ddlJobTableID = "ddl_job_table_id" + ddlJobSnapshotVer = "ddl_job_snapshot_ver" + ddlJobReorgHandle = "ddl_job_reorg_handle" + ddlJobArgs = "ddl_job_args" + bgSchemaVersion = "bg_schema_version" + bgOwnerID = "bg_owner_id" + bgOwnerLastUpdateTS = "bg_owner_last_update_ts" + bgJobID = "bg_job_id" + bgJobAction = "bg_job_action" + bgJobLastUpdateTS = "bg_job_last_update_ts" + bgJobState = "bg_job_state" + bgJobError = "bg_job_error" + bgJobSchemaState = "bg_job_schema_state" + bgJobSchemaID = "bg_job_schema_id" + bgJobTableID = "bg_job_table_id" + bgJobSnapshotVer = "bg_job_snapshot_ver" + bgJobReorgHandle = "bg_job_reorg_handle" + bgJobArgs = "bg_job_args" +) + +// GetScope gets the status variables scope. +func (d *ddl) GetScope(status string) variable.ScopeFlag { + // Now ddl status variables scope are all default scope. + return variable.DefaultScopeFlag +} + +// Stat returns the DDL statistics. +func (d *ddl) Stats() (map[string]interface{}, error) { + m := make(map[string]interface{}) + m[serverID] = d.uuid + var ddlInfo, bgInfo *inspectkv.DDLInfo + + err := kv.RunInNewTxn(d.store, false, func(txn kv.Transaction) error { + var err1 error + ddlInfo, err1 = inspectkv.GetDDLInfo(txn) + if err1 != nil { + return errors.Trace(err1) + } + bgInfo, err1 = inspectkv.GetBgDDLInfo(txn) + + return errors.Trace(err1) + }) + if err != nil { + return nil, errors.Trace(err) + } + + m[ddlSchemaVersion] = ddlInfo.SchemaVer + if ddlInfo.Owner != nil { + m[ddlOwnerID] = ddlInfo.Owner.OwnerID + // LastUpdateTS uses nanosecond. + m[ddlOwnerLastUpdateTS] = ddlInfo.Owner.LastUpdateTS / 1e9 + } + if ddlInfo.Job != nil { + m[ddlJobID] = ddlInfo.Job.ID + m[ddlJobAction] = ddlInfo.Job.Type.String() + m[ddlJobLastUpdateTS] = ddlInfo.Job.LastUpdateTS / 1e9 + m[ddlJobState] = ddlInfo.Job.State.String() + m[ddlJobError] = ddlInfo.Job.Error + m[ddlJobSchemaState] = ddlInfo.Job.SchemaState.String() + m[ddlJobSchemaID] = ddlInfo.Job.SchemaID + m[ddlJobTableID] = ddlInfo.Job.TableID + m[ddlJobSnapshotVer] = ddlInfo.Job.SnapshotVer + m[ddlJobReorgHandle] = ddlInfo.ReorgHandle + m[ddlJobArgs] = ddlInfo.Job.Args + } + + // background DDL info + m[bgSchemaVersion] = bgInfo.SchemaVer + if bgInfo.Owner != nil { + m[bgOwnerID] = bgInfo.Owner.OwnerID + // LastUpdateTS uses nanosecond. + m[bgOwnerLastUpdateTS] = bgInfo.Owner.LastUpdateTS / 1e9 + } + if bgInfo.Job != nil { + m[bgJobID] = bgInfo.Job.ID + m[bgJobAction] = bgInfo.Job.Type.String() + m[bgJobLastUpdateTS] = bgInfo.Job.LastUpdateTS / 1e9 + m[bgJobState] = bgInfo.Job.State.String() + m[bgJobError] = bgInfo.Job.Error + m[bgJobSchemaState] = bgInfo.Job.SchemaState.String() + m[bgJobSchemaID] = bgInfo.Job.SchemaID + m[bgJobTableID] = bgInfo.Job.TableID + m[bgJobSnapshotVer] = bgInfo.Job.SnapshotVer + m[bgJobReorgHandle] = bgInfo.ReorgHandle + m[bgJobArgs] = bgInfo.Job.Args + } + + return m, nil +} diff --git a/vendor/github.com/pingcap/tidb/ddl/table.go b/vendor/github.com/pingcap/tidb/ddl/table.go new file mode 100644 index 000000000..ef9708a75 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/ddl/table.go @@ -0,0 +1,194 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package ddl + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/meta" + "github.com/pingcap/tidb/meta/autoid" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/table" + "github.com/pingcap/tidb/terror" +) + +func (d *ddl) onCreateTable(t *meta.Meta, job *model.Job) error { + schemaID := job.SchemaID + tbInfo := &model.TableInfo{} + if err := job.DecodeArgs(tbInfo); err != nil { + // arg error, cancel this job. + job.State = model.JobCancelled + return errors.Trace(err) + } + + tbInfo.State = model.StateNone + + tables, err := t.ListTables(schemaID) + if terror.ErrorEqual(err, meta.ErrDBNotExists) { + job.State = model.JobCancelled + return errors.Trace(infoschema.DatabaseNotExists) + } else if err != nil { + return errors.Trace(err) + } + + for _, tbl := range tables { + if tbl.Name.L == tbInfo.Name.L { + if tbl.ID != tbInfo.ID { + // table exists, can't create, we should cancel this job now. + job.State = model.JobCancelled + return errors.Trace(infoschema.TableExists) + } + + tbInfo = tbl + } + } + + _, err = t.GenSchemaVersion() + if err != nil { + return errors.Trace(err) + } + + switch tbInfo.State { + case model.StateNone: + // none -> public + job.SchemaState = model.StatePublic + tbInfo.State = model.StatePublic + err = t.CreateTable(schemaID, tbInfo) + if err != nil { + return errors.Trace(err) + } + // finish this job + job.State = model.JobDone + return nil + default: + return errors.Errorf("invalid table state %v", tbInfo.State) + } +} + +func (d *ddl) delReorgTable(t *meta.Meta, job *model.Job) error { + tblInfo := &model.TableInfo{} + err := job.DecodeArgs(tblInfo) + if err != nil { + // arg error, cancel this job. + job.State = model.JobCancelled + return errors.Trace(err) + } + tblInfo.State = model.StateDeleteReorganization + tbl, err := d.getTable(job.SchemaID, tblInfo) + if err != nil { + return errors.Trace(err) + } + + err = d.dropTableData(tbl) + if err != nil { + return errors.Trace(err) + } + + // finish this background job + job.SchemaState = model.StateNone + job.State = model.JobDone + + return nil +} + +func (d *ddl) onDropTable(t *meta.Meta, job *model.Job) error { + schemaID := job.SchemaID + tableID := job.TableID + + tblInfo, err := t.GetTable(schemaID, tableID) + if terror.ErrorEqual(err, meta.ErrDBNotExists) { + job.State = model.JobCancelled + return errors.Trace(infoschema.DatabaseNotExists) + } else if err != nil { + return errors.Trace(err) + } + + if tblInfo == nil { + job.State = model.JobCancelled + return errors.Trace(infoschema.TableNotExists) + } + + _, err = t.GenSchemaVersion() + if err != nil { + return errors.Trace(err) + } + + switch tblInfo.State { + case model.StatePublic: + // public -> write only + job.SchemaState = model.StateWriteOnly + tblInfo.State = model.StateWriteOnly + err = t.UpdateTable(schemaID, tblInfo) + case model.StateWriteOnly: + // write only -> delete only + job.SchemaState = model.StateDeleteOnly + tblInfo.State = model.StateDeleteOnly + err = t.UpdateTable(schemaID, tblInfo) + case model.StateDeleteOnly: + tblInfo.State = model.StateNone + err = t.UpdateTable(schemaID, tblInfo) + if err = t.DropTable(job.SchemaID, job.TableID); err != nil { + break + } + // finish this job + job.Args = []interface{}{tblInfo} + job.State = model.JobDone + job.SchemaState = model.StateNone + default: + err = errors.Errorf("invalid table state %v", tblInfo.State) + } + + return errors.Trace(err) +} + +func (d *ddl) getTable(schemaID int64, tblInfo *model.TableInfo) (table.Table, error) { + alloc := autoid.NewAllocator(d.store, schemaID) + tbl, err := table.TableFromMeta(alloc, tblInfo) + return tbl, errors.Trace(err) +} + +func (d *ddl) getTableInfo(t *meta.Meta, job *model.Job) (*model.TableInfo, error) { + schemaID := job.SchemaID + tableID := job.TableID + tblInfo, err := t.GetTable(schemaID, tableID) + if terror.ErrorEqual(err, meta.ErrDBNotExists) { + job.State = model.JobCancelled + return nil, errors.Trace(infoschema.DatabaseNotExists) + } else if err != nil { + return nil, errors.Trace(err) + } else if tblInfo == nil { + job.State = model.JobCancelled + return nil, errors.Trace(infoschema.TableNotExists) + } + + if tblInfo.State != model.StatePublic { + job.State = model.JobCancelled + return nil, errors.Errorf("table %s is not in public, but %s", tblInfo.Name.L, tblInfo.State) + } + + return tblInfo, nil +} + +func (d *ddl) dropTableData(t table.Table) error { + // delete table data + err := d.delKeysWithPrefix(t.RecordPrefix()) + if err != nil { + return errors.Trace(err) + } + + // delete table index + err = d.delKeysWithPrefix(t.IndexPrefix()) + + return errors.Trace(err) +} diff --git a/vendor/github.com/pingcap/tidb/domain/domain.go b/vendor/github.com/pingcap/tidb/domain/domain.go new file mode 100644 index 000000000..1ac14b6fa --- /dev/null +++ b/vendor/github.com/pingcap/tidb/domain/domain.go @@ -0,0 +1,270 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package domain + +import ( + "sync" + "sync/atomic" + "time" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/ddl" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/meta" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/sessionctx/variable" + "github.com/pingcap/tidb/store/localstore" + "github.com/pingcap/tidb/terror" +) + +var ddlLastReloadSchemaTS = "ddl_last_reload_schema_ts" + +// Domain represents a storage space. Different domains can use the same database name. +// Multiple domains can be used in parallel without synchronization. +type Domain struct { + store kv.Storage + infoHandle *infoschema.Handle + ddl ddl.DDL + leaseCh chan time.Duration + // nano seconds + lastLeaseTS int64 + m sync.Mutex +} + +func (do *Domain) loadInfoSchema(txn kv.Transaction) (err error) { + m := meta.NewMeta(txn) + schemaMetaVersion, err := m.GetSchemaVersion() + if err != nil { + return errors.Trace(err) + } + + info := do.infoHandle.Get() + if info != nil && schemaMetaVersion <= info.SchemaMetaVersion() { + // info may be changed by other txn, so here its version may be bigger than schema version, + // so we don't need to reload. + log.Debugf("[ddl] schema version is still %d, no need reload", schemaMetaVersion) + return nil + } + + schemas, err := m.ListDatabases() + if err != nil { + return errors.Trace(err) + } + + for _, di := range schemas { + if di.State != model.StatePublic { + // schema is not public, can't be used outside. + continue + } + + tables, err1 := m.ListTables(di.ID) + if err1 != nil { + return errors.Trace(err1) + } + + di.Tables = make([]*model.TableInfo, 0, len(tables)) + for _, tbl := range tables { + if tbl.State != model.StatePublic { + // schema is not public, can't be used outsiee. + continue + } + di.Tables = append(di.Tables, tbl) + } + } + + log.Infof("[ddl] loadInfoSchema %d", schemaMetaVersion) + err = do.infoHandle.Set(schemas, schemaMetaVersion) + return errors.Trace(err) +} + +// InfoSchema gets information schema from domain. +func (do *Domain) InfoSchema() infoschema.InfoSchema { + // try reload if possible. + do.tryReload() + return do.infoHandle.Get() +} + +// DDL gets DDL from domain. +func (do *Domain) DDL() ddl.DDL { + return do.ddl +} + +// Store gets KV store from domain. +func (do *Domain) Store() kv.Storage { + return do.store +} + +// SetLease will reset the lease time for online DDL change. +func (do *Domain) SetLease(lease time.Duration) { + do.leaseCh <- lease + + // let ddl to reset lease too. + do.ddl.SetLease(lease) +} + +// Stats returns the domain statistic. +func (do *Domain) Stats() (map[string]interface{}, error) { + m := make(map[string]interface{}) + m[ddlLastReloadSchemaTS] = atomic.LoadInt64(&do.lastLeaseTS) / 1e9 + + return m, nil +} + +// GetScope gets the status variables scope. +func (do *Domain) GetScope(status string) variable.ScopeFlag { + // Now domain status variables scope are all default scope. + return variable.DefaultScopeFlag +} + +func (do *Domain) tryReload() { + // if we don't have update the schema for a long time > lease, we must force reloading it. + // Although we try to reload schema every lease time in a goroutine, sometimes it may not + // run accurately, e.g, the machine has a very high load, running the ticker is delayed. + last := atomic.LoadInt64(&do.lastLeaseTS) + lease := do.ddl.GetLease() + + // if lease is 0, we use the local store, so no need to reload. + if lease > 0 && time.Now().UnixNano()-last > lease.Nanoseconds() { + do.mustReload() + } +} + +const minReloadTimeout = 20 * time.Second + +func (do *Domain) reload() error { + // lock here for only once at same time. + do.m.Lock() + defer do.m.Unlock() + + timeout := do.ddl.GetLease() / 2 + if timeout < minReloadTimeout { + timeout = minReloadTimeout + } + + done := make(chan error, 1) + go func() { + var err error + + for { + err = kv.RunInNewTxn(do.store, false, do.loadInfoSchema) + // if err is db closed, we will return it directly, otherwise, we will + // check reloading again. + if terror.ErrorEqual(err, localstore.ErrDBClosed) { + break + } + + if err != nil { + log.Errorf("[ddl] load schema err %v, retry again", errors.ErrorStack(err)) + // TODO: use a backoff algorithm. + time.Sleep(500 * time.Millisecond) + continue + } + + atomic.StoreInt64(&do.lastLeaseTS, time.Now().UnixNano()) + break + } + + done <- err + }() + + select { + case err := <-done: + return errors.Trace(err) + case <-time.After(timeout): + return errors.New("reload schema timeout") + } +} + +func (do *Domain) mustReload() { + // if reload error, we will terminate whole program to guarantee data safe. + err := do.reload() + if err != nil { + log.Fatalf("[ddl] reload schema err %v", errors.ErrorStack(err)) + } +} + +// check schema every 300 seconds default. +const defaultLoadTime = 300 * time.Second + +func (do *Domain) loadSchemaInLoop(lease time.Duration) { + if lease <= 0 { + lease = defaultLoadTime + } + + ticker := time.NewTicker(lease) + defer ticker.Stop() + + for { + select { + case <-ticker.C: + err := do.reload() + // we may close store in test, but the domain load schema loop is still checking, + // so we can't panic for ErrDBClosed and just return here. + if terror.ErrorEqual(err, localstore.ErrDBClosed) { + return + } else if err != nil { + log.Fatalf("[ddl] reload schema err %v", errors.ErrorStack(err)) + } + case newLease := <-do.leaseCh: + if newLease <= 0 { + newLease = defaultLoadTime + } + + if lease == newLease { + // nothing to do + continue + } + + lease = newLease + // reset ticker too. + ticker.Stop() + ticker = time.NewTicker(lease) + } + } +} + +type ddlCallback struct { + ddl.BaseCallback + do *Domain +} + +func (c *ddlCallback) OnChanged(err error) error { + if err != nil { + return err + } + log.Warnf("[ddl] on DDL change") + + c.do.mustReload() + return nil +} + +// NewDomain creates a new domain. +func NewDomain(store kv.Storage, lease time.Duration) (d *Domain, err error) { + d = &Domain{ + store: store, + leaseCh: make(chan time.Duration, 1), + } + + d.infoHandle = infoschema.NewHandle(d.store) + d.ddl = ddl.NewDDL(d.store, d.infoHandle, &ddlCallback{do: d}, lease) + d.mustReload() + + variable.RegisterStatistics(d) + + go d.loadSchemaInLoop(lease) + + return d, nil +} diff --git a/vendor/github.com/pingcap/tidb/driver.go b/vendor/github.com/pingcap/tidb/driver.go new file mode 100644 index 000000000..f8b95421a --- /dev/null +++ b/vendor/github.com/pingcap/tidb/driver.go @@ -0,0 +1,560 @@ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +// database/sql/driver + +package tidb + +import ( + "database/sql" + "database/sql/driver" + "io" + "net/url" + "path/filepath" + "strings" + "sync" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/sessionctx" + "github.com/pingcap/tidb/terror" + "github.com/pingcap/tidb/util/types" +) + +const ( + // DriverName is name of TiDB driver. + DriverName = "tidb" +) + +var ( + _ driver.Conn = (*driverConn)(nil) + _ driver.Execer = (*driverConn)(nil) + _ driver.Queryer = (*driverConn)(nil) + _ driver.Tx = (*driverConn)(nil) + + _ driver.Result = (*driverResult)(nil) + _ driver.Rows = (*driverRows)(nil) + _ driver.Stmt = (*driverStmt)(nil) + _ driver.Driver = (*sqlDriver)(nil) + + txBeginSQL = "BEGIN;" + txCommitSQL = "COMMIT;" + txRollbackSQL = "ROLLBACK;" + + errNoResult = errors.New("query statement does not produce a result set (no top level SELECT)") +) + +type errList []error + +type driverParams struct { + storePath string + dbName string + // when set to true `mysql.Time` isn't encoded as string but passed as `time.Time` + // this option is named for compatibility the same as in the mysql driver + // while we actually do not have additional parsing to do + parseTime bool +} + +func (e *errList) append(err error) { + if err != nil { + *e = append(*e, err) + } +} + +func (e errList) error() error { + if len(e) == 0 { + return nil + } + + return e +} + +func (e errList) Error() string { + a := make([]string, len(e)) + for i, v := range e { + a[i] = v.Error() + } + return strings.Join(a, "\n") +} + +func params(args []driver.Value) []interface{} { + r := make([]interface{}, len(args)) + for i, v := range args { + r[i] = interface{}(v) + } + return r +} + +var ( + tidbDriver = &sqlDriver{} + driverOnce sync.Once +) + +// RegisterDriver registers TiDB driver. +// The name argument can be optionally prefixed by "engine://". In that case the +// prefix is recognized as a storage engine name. +// +// The name argument can be optionally prefixed by "memory://". In that case +// the prefix is stripped before interpreting it as a name of a memory-only, +// volatile DB. +// +// [0]: http://golang.org/pkg/database/sql/driver/ +func RegisterDriver() { + driverOnce.Do(func() { sql.Register(DriverName, tidbDriver) }) +} + +// sqlDriver implements the interface required by database/sql/driver. +type sqlDriver struct { + mu sync.Mutex +} + +func (d *sqlDriver) lock() { + d.mu.Lock() +} + +func (d *sqlDriver) unlock() { + d.mu.Unlock() +} + +// parseDriverDSN cuts off DB name from dsn. It returns error if the dsn is not +// valid. +func parseDriverDSN(dsn string) (params *driverParams, err error) { + u, err := url.Parse(dsn) + if err != nil { + return nil, errors.Trace(err) + } + path := filepath.Join(u.Host, u.Path) + dbName := filepath.Clean(filepath.Base(path)) + if dbName == "" || dbName == "." || dbName == string(filepath.Separator) { + return nil, errors.Errorf("invalid DB name %q", dbName) + } + // cut off dbName + path = filepath.Clean(filepath.Dir(path)) + if path == "" || path == "." || path == string(filepath.Separator) { + return nil, errors.Errorf("invalid dsn %q", dsn) + } + u.Path, u.Host = path, "" + params = &driverParams{ + storePath: u.String(), + dbName: dbName, + } + // parse additional driver params + query := u.Query() + if parseTime := query.Get("parseTime"); parseTime == "true" { + params.parseTime = true + } + + return params, nil +} + +// Open returns a new connection to the database. +// +// The dsn must be a URL format 'engine://path/dbname?params'. +// Engine is the storage name registered with RegisterStore. +// Path is the storage specific format. +// Params is key-value pairs split by '&', optional params are storage specific. +// Examples: +// goleveldb://relative/path/test +// boltdb:///absolute/path/test +// hbase://zk1,zk2,zk3/hbasetbl/test?tso=zk +// +// Open may return a cached connection (one previously closed), but doing so is +// unnecessary; the sql package maintains a pool of idle connections for +// efficient re-use. +// +// The behavior of the mysql driver regarding time parsing can also be imitated +// by passing ?parseTime +// +// The returned connection is only used by one goroutine at a time. +func (d *sqlDriver) Open(dsn string) (driver.Conn, error) { + params, err := parseDriverDSN(dsn) + if err != nil { + return nil, errors.Trace(err) + } + store, err := NewStore(params.storePath) + if err != nil { + return nil, errors.Trace(err) + } + + sess, err := CreateSession(store) + if err != nil { + return nil, errors.Trace(err) + } + s := sess.(*session) + + d.lock() + defer d.unlock() + + DBName := model.NewCIStr(params.dbName) + domain := sessionctx.GetDomain(s) + cs := &ast.CharsetOpt{ + Chs: "utf8", + Col: "utf8_bin", + } + if !domain.InfoSchema().SchemaExists(DBName) { + err = domain.DDL().CreateSchema(s, DBName, cs) + if err != nil { + return nil, errors.Trace(err) + } + } + driver := &sqlDriver{} + return newDriverConn(s, driver, DBName.O, params) +} + +// driverConn is a connection to a database. It is not used concurrently by +// multiple goroutines. +// +// Conn is assumed to be stateful. +type driverConn struct { + s Session + driver *sqlDriver + stmts map[string]driver.Stmt + params *driverParams +} + +func newDriverConn(sess *session, d *sqlDriver, schema string, params *driverParams) (driver.Conn, error) { + r := &driverConn{ + driver: d, + stmts: map[string]driver.Stmt{}, + s: sess, + params: params, + } + + _, err := r.s.Execute("use " + schema) + if err != nil { + return nil, errors.Trace(err) + } + return r, nil +} + +// Prepare returns a prepared statement, bound to this connection. +func (c *driverConn) Prepare(query string) (driver.Stmt, error) { + stmtID, paramCount, fields, err := c.s.PrepareStmt(query) + if err != nil { + return nil, err + } + s := &driverStmt{ + conn: c, + query: query, + stmtID: stmtID, + paramCount: paramCount, + isQuery: fields != nil, + } + c.stmts[query] = s + return s, nil +} + +// Close invalidates and potentially stops any current prepared statements and +// transactions, marking this connection as no longer in use. +// +// Because the sql package maintains a free pool of connections and only calls +// Close when there's a surplus of idle connections, it shouldn't be necessary +// for drivers to do their own connection caching. +func (c *driverConn) Close() error { + var err errList + for _, s := range c.stmts { + stmt := s.(*driverStmt) + err.append(stmt.conn.s.DropPreparedStmt(stmt.stmtID)) + } + + c.driver.lock() + defer c.driver.unlock() + + return err.error() +} + +// Begin starts and returns a new transaction. +func (c *driverConn) Begin() (driver.Tx, error) { + if c.s == nil { + return nil, errors.Errorf("Need init first") + } + + if _, err := c.s.Execute(txBeginSQL); err != nil { + return nil, errors.Trace(err) + } + + return c, nil +} + +func (c *driverConn) Commit() error { + if c.s == nil { + return terror.CommitNotInTransaction + } + _, err := c.s.Execute(txCommitSQL) + + if err != nil { + return errors.Trace(err) + } + + err = c.s.FinishTxn(false) + return errors.Trace(err) +} + +func (c *driverConn) Rollback() error { + if c.s == nil { + return terror.RollbackNotInTransaction + } + + if _, err := c.s.Execute(txRollbackSQL); err != nil { + return errors.Trace(err) + } + + return nil +} + +// Execer is an optional interface that may be implemented by a Conn. +// +// If a Conn does not implement Execer, the sql package's DB.Exec will first +// prepare a query, execute the statement, and then close the statement. +// +// Exec may return driver.ErrSkip. +func (c *driverConn) Exec(query string, args []driver.Value) (driver.Result, error) { + return c.driverExec(query, args) + +} + +func (c *driverConn) getStmt(query string) (stmt driver.Stmt, err error) { + stmt, ok := c.stmts[query] + if !ok { + stmt, err = c.Prepare(query) + if err != nil { + return nil, errors.Trace(err) + } + } + return +} + +func (c *driverConn) driverExec(query string, args []driver.Value) (driver.Result, error) { + if len(args) == 0 { + if _, err := c.s.Execute(query); err != nil { + return nil, errors.Trace(err) + } + r := &driverResult{} + r.lastInsertID, r.rowsAffected = int64(c.s.LastInsertID()), int64(c.s.AffectedRows()) + return r, nil + } + stmt, err := c.getStmt(query) + if err != nil { + return nil, errors.Trace(err) + } + return stmt.Exec(args) +} + +// Queryer is an optional interface that may be implemented by a Conn. +// +// If a Conn does not implement Queryer, the sql package's DB.Query will first +// prepare a query, execute the statement, and then close the statement. +// +// Query may return driver.ErrSkip. +func (c *driverConn) Query(query string, args []driver.Value) (driver.Rows, error) { + return c.driverQuery(query, args) +} + +func (c *driverConn) driverQuery(query string, args []driver.Value) (driver.Rows, error) { + if len(args) == 0 { + rss, err := c.s.Execute(query) + if err != nil { + return nil, errors.Trace(err) + } + if len(rss) == 0 { + return nil, errors.Trace(errNoResult) + } + return &driverRows{params: c.params, rs: rss[0]}, nil + } + stmt, err := c.getStmt(query) + if err != nil { + return nil, errors.Trace(err) + } + return stmt.Query(args) +} + +// driverResult is the result of a query execution. +type driverResult struct { + lastInsertID int64 + rowsAffected int64 +} + +// LastInsertID returns the database's auto-generated ID after, for example, an +// INSERT into a table with primary key. +func (r *driverResult) LastInsertId() (int64, error) { // -golint + return r.lastInsertID, nil +} + +// RowsAffected returns the number of rows affected by the query. +func (r *driverResult) RowsAffected() (int64, error) { + return r.rowsAffected, nil +} + +// driverRows is an iterator over an executed query's results. +type driverRows struct { + rs ast.RecordSet + params *driverParams +} + +// Columns returns the names of the columns. The number of columns of the +// result is inferred from the length of the slice. If a particular column +// name isn't known, an empty string should be returned for that entry. +func (r *driverRows) Columns() []string { + if r.rs == nil { + return []string{} + } + fs, _ := r.rs.Fields() + names := make([]string, len(fs)) + for i, f := range fs { + names[i] = f.ColumnAsName.O + } + return names +} + +// Close closes the rows iterator. +func (r *driverRows) Close() error { + if r.rs != nil { + return r.rs.Close() + } + return nil +} + +// Next is called to populate the next row of data into the provided slice. The +// provided slice will be the same size as the Columns() are wide. +// +// The dest slice may be populated only with a driver Value type, but excluding +// string. All string values must be converted to []byte. +// +// Next should return io.EOF when there are no more rows. +func (r *driverRows) Next(dest []driver.Value) error { + if r.rs == nil { + return io.EOF + } + row, err := r.rs.Next() + if err != nil { + return errors.Trace(err) + } + if row == nil { + return io.EOF + } + if len(row.Data) != len(dest) { + return errors.Errorf("field count mismatch: got %d, need %d", len(row.Data), len(dest)) + } + for i, xi := range row.Data { + switch xi.Kind() { + case types.KindNull: + dest[i] = nil + case types.KindInt64: + dest[i] = xi.GetInt64() + case types.KindUint64: + dest[i] = xi.GetUint64() + case types.KindFloat32: + dest[i] = xi.GetFloat32() + case types.KindFloat64: + dest[i] = xi.GetFloat64() + case types.KindString: + dest[i] = xi.GetString() + case types.KindBytes: + dest[i] = xi.GetBytes() + case types.KindMysqlBit: + dest[i] = xi.GetMysqlBit().ToString() + case types.KindMysqlDecimal: + dest[i] = xi.GetMysqlDecimal().String() + case types.KindMysqlDuration: + dest[i] = xi.GetMysqlDuration().String() + case types.KindMysqlEnum: + dest[i] = xi.GetMysqlEnum().String() + case types.KindMysqlHex: + dest[i] = xi.GetMysqlHex().ToString() + case types.KindMysqlSet: + dest[i] = xi.GetMysqlSet().String() + case types.KindMysqlTime: + t := xi.GetMysqlTime() + if !r.params.parseTime { + dest[i] = t.String() + } else { + dest[i] = t.Time + } + default: + return errors.Errorf("unable to handle type %T", xi.GetValue()) + } + } + return nil +} + +// driverStmt is a prepared statement. It is bound to a driverConn and not used +// by multiple goroutines concurrently. +type driverStmt struct { + conn *driverConn + query string + stmtID uint32 + paramCount int + isQuery bool +} + +// Close closes the statement. +// +// As of Go 1.1, a Stmt will not be closed if it's in use by any queries. +func (s *driverStmt) Close() error { + s.conn.s.DropPreparedStmt(s.stmtID) + delete(s.conn.stmts, s.query) + return nil +} + +// NumInput returns the number of placeholder parameters. +// +// If NumInput returns >= 0, the sql package will sanity check argument counts +// from callers and return errors to the caller before the statement's Exec or +// Query methods are called. +// +// NumInput may also return -1, if the driver doesn't know its number of +// placeholders. In that case, the sql package will not sanity check Exec or +// Query argument counts. +func (s *driverStmt) NumInput() int { + return s.paramCount +} + +// Exec executes a query that doesn't return rows, such as an INSERT or UPDATE. +func (s *driverStmt) Exec(args []driver.Value) (driver.Result, error) { + c := s.conn + _, err := c.s.ExecutePreparedStmt(s.stmtID, params(args)...) + if err != nil { + return nil, errors.Trace(err) + } + r := &driverResult{} + if s != nil { + r.lastInsertID, r.rowsAffected = int64(c.s.LastInsertID()), int64(c.s.AffectedRows()) + } + return r, nil +} + +// Exec executes a query that may return rows, such as a SELECT. +func (s *driverStmt) Query(args []driver.Value) (driver.Rows, error) { + c := s.conn + rs, err := c.s.ExecutePreparedStmt(s.stmtID, params(args)...) + if err != nil { + return nil, errors.Trace(err) + } + if rs == nil { + if s.isQuery { + return nil, errors.Trace(errNoResult) + } + // The statement is not a query. + return &driverRows{}, nil + } + return &driverRows{params: s.conn.params, rs: rs}, nil +} + +func init() { + RegisterDriver() +} diff --git a/vendor/github.com/pingcap/tidb/evaluator/builtin.go b/vendor/github.com/pingcap/tidb/evaluator/builtin.go new file mode 100644 index 000000000..5d44b616c --- /dev/null +++ b/vendor/github.com/pingcap/tidb/evaluator/builtin.go @@ -0,0 +1,130 @@ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package evaluator + +import ( + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/util/types" +) + +// OldFunc is for a old builtin function. +type OldFunc struct { + // F is the specific calling function. + F func([]interface{}, context.Context) (interface{}, error) + // MinArgs is the minimal arguments needed, + MinArgs int + // MaxArgs is the maximal arguments needed, -1 for infinity. + MaxArgs int + // IsStatic shows whether this function can be called statically. + IsStatic bool + // IsAggregate represents whether this function is an aggregate function or not. + IsAggregate bool +} + +// Func is for a builtin function. +type Func struct { + // F is the specific calling function. + F func([]types.Datum, context.Context) (types.Datum, error) + // MinArgs is the minimal arguments needed, + MinArgs int + // MaxArgs is the maximal arguments needed, -1 for infinity. + MaxArgs int +} + +// OldFuncs holds all has old registered builtin functions. +var OldFuncs = map[string]OldFunc{ + // control functions + "if": {builtinIf, 3, 3, true, false}, + "ifnull": {builtinIfNull, 2, 2, true, false}, + "nullif": {builtinNullIf, 2, 2, true, false}, + + // string functions + "replace": {builtinReplace, 3, 3, true, false}, + "strcmp": {builtinStrcmp, 2, 2, true, false}, + "convert": {builtinConvert, 2, 2, true, false}, + "substring": {builtinSubstring, 2, 3, true, false}, + "substring_index": {builtinSubstringIndex, 3, 3, true, false}, + "locate": {builtinLocate, 2, 3, true, false}, + "trim": {builtinTrim, 1, 3, true, false}, + + // information functions + "current_user": {builtinCurrentUser, 0, 0, false, false}, + "database": {builtinDatabase, 0, 0, false, false}, + "found_rows": {builtinFoundRows, 0, 0, false, false}, + "user": {builtinUser, 0, 0, false, false}, + "connection_id": {builtinConnectionID, 0, 0, true, false}, + "version": {builtinVersion, 0, 0, true, false}, +} + +// Funcs holds all registered builtin functions. +var Funcs = map[string]Func{ + // common functions + "coalesce": {builtinCoalesce, 1, -1}, + + // math functions + "abs": {builtinAbs, 1, 1}, + "pow": {builtinPow, 2, 2}, + "power": {builtinPow, 2, 2}, + "rand": {builtinRand, 0, 1}, + + // time functions + "curdate": {builtinCurrentDate, 0, 0}, + "current_date": {builtinCurrentDate, 0, 0}, + "current_time": {builtinCurrentTime, 0, 1}, + "current_timestamp": {builtinNow, 0, 1}, + "curtime": {builtinCurrentTime, 0, 1}, + "date": {builtinDate, 1, 1}, + "day": {builtinDay, 1, 1}, + "dayname": {builtinDayName, 1, 1}, + "dayofmonth": {builtinDayOfMonth, 1, 1}, + "dayofweek": {builtinDayOfWeek, 1, 1}, + "dayofyear": {builtinDayOfYear, 1, 1}, + "hour": {builtinHour, 1, 1}, + "microsecond": {builtinMicroSecond, 1, 1}, + "minute": {builtinMinute, 1, 1}, + "month": {builtinMonth, 1, 1}, + "now": {builtinNow, 0, 1}, + "second": {builtinSecond, 1, 1}, + "sysdate": {builtinSysDate, 0, 1}, + "week": {builtinWeek, 1, 2}, + "weekday": {builtinWeekDay, 1, 1}, + "weekofyear": {builtinWeekOfYear, 1, 1}, + "year": {builtinYear, 1, 1}, + "yearweek": {builtinYearWeek, 1, 2}, + "extract": {builtinExtract, 2, 2}, + "date_arith": {builtinDateArith, 3, 3}, + + // string functions + "concat": {builtinConcat, 1, -1}, + "concat_ws": {builtinConcatWS, 2, -1}, + "left": {builtinLeft, 2, 2}, + "length": {builtinLength, 1, 1}, + "lower": {builtinLower, 1, 1}, + "repeat": {builtinRepeat, 2, 2}, + "upper": {builtinUpper, 1, 1}, +} + +// See: http://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#function_coalesce +func builtinCoalesce(args []types.Datum, ctx context.Context) (d types.Datum, err error) { + for _, d = range args { + if d.Kind() != types.KindNull { + return d, nil + } + } + return d, nil +} diff --git a/vendor/github.com/pingcap/tidb/evaluator/builtin_control.go b/vendor/github.com/pingcap/tidb/evaluator/builtin_control.go new file mode 100644 index 000000000..c310f3fab --- /dev/null +++ b/vendor/github.com/pingcap/tidb/evaluator/builtin_control.go @@ -0,0 +1,76 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package evaluator + +import ( + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/util/types" +) + +// See https://dev.mysql.com/doc/refman/5.7/en/control-flow-functions.html#function_if +func builtinIf(args []interface{}, _ context.Context) (interface{}, error) { + // if(expr1, expr2, expr3) + // if expr1 is true, return expr2, otherwise, return expr3 + v1 := args[0] + v2 := args[1] + v3 := args[2] + + if v1 == nil { + return v3, nil + } + + b, err := types.ToBool(v1) + if err != nil { + return nil, err + } + + // TODO: check return type, must be numeric or string + if b == 1 { + return v2, nil + } + + return v3, nil +} + +// See https://dev.mysql.com/doc/refman/5.7/en/control-flow-functions.html#function_ifnull +func builtinIfNull(args []interface{}, _ context.Context) (interface{}, error) { + // ifnull(expr1, expr2) + // if expr1 is not null, return expr1, otherwise, return expr2 + v1 := args[0] + v2 := args[1] + + if v1 != nil { + return v1, nil + } + + return v2, nil +} + +// See https://dev.mysql.com/doc/refman/5.7/en/control-flow-functions.html#function_nullif +func builtinNullIf(args []interface{}, _ context.Context) (interface{}, error) { + // nullif(expr1, expr2) + // returns null if expr1 = expr2 is true, otherwise returns expr1 + v1 := args[0] + v2 := args[1] + + if v1 == nil || v2 == nil { + return v1, nil + } + + if n, err := types.Compare(v1, v2); err != nil || n == 0 { + return nil, err + } + + return v1, nil +} diff --git a/vendor/github.com/pingcap/tidb/evaluator/builtin_info.go b/vendor/github.com/pingcap/tidb/evaluator/builtin_info.go new file mode 100644 index 000000000..2004c0d13 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/evaluator/builtin_info.go @@ -0,0 +1,78 @@ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package evaluator + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/sessionctx/db" + "github.com/pingcap/tidb/sessionctx/variable" +) + +// See: https://dev.mysql.com/doc/refman/5.7/en/information-functions.html + +func builtinDatabase(args []interface{}, ctx context.Context) (v interface{}, err error) { + d := db.GetCurrentSchema(ctx) + if d == "" { + return nil, nil + } + return d, nil +} + +func builtinFoundRows(arg []interface{}, ctx context.Context) (interface{}, error) { + data := variable.GetSessionVars(ctx) + if data == nil { + return nil, errors.Errorf("Missing session variable when evalue builtin") + } + + return data.FoundRows, nil +} + +// See: https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_current-user +// TODO: The value of CURRENT_USER() can differ from the value of USER(). We will finish this after we support grant tables. +func builtinCurrentUser(args []interface{}, ctx context.Context) (v interface{}, err error) { + data := variable.GetSessionVars(ctx) + if data == nil { + return nil, errors.Errorf("Missing session variable when evalue builtin") + } + + return data.User, nil +} + +func builtinUser(args []interface{}, ctx context.Context) (v interface{}, err error) { + data := variable.GetSessionVars(ctx) + if data == nil { + return nil, errors.Errorf("Missing session variable when evalue builtin") + } + + return data.User, nil +} + +func builtinConnectionID(args []interface{}, ctx context.Context) (v interface{}, err error) { + data := variable.GetSessionVars(ctx) + if data == nil { + return nil, errors.Errorf("Missing session variable when evalue builtin") + } + + return data.ConnectionID, nil +} + +func builtinVersion(args []interface{}, ctx context.Context) (v interface{}, err error) { + return mysql.ServerVersion, nil +} diff --git a/vendor/github.com/pingcap/tidb/evaluator/builtin_math.go b/vendor/github.com/pingcap/tidb/evaluator/builtin_math.go new file mode 100644 index 000000000..d01289426 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/evaluator/builtin_math.go @@ -0,0 +1,83 @@ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package evaluator + +import ( + "math" + "math/rand" + + "github.com/juju/errors" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/util/types" +) + +// see https://dev.mysql.com/doc/refman/5.7/en/mathematical-functions.html + +func builtinAbs(args []types.Datum, _ context.Context) (d types.Datum, err error) { + d = args[0] + switch d.Kind() { + case types.KindNull: + return d, nil + case types.KindUint64: + return d, nil + case types.KindInt64: + iv := d.GetInt64() + if iv >= 0 { + d.SetInt64(iv) + return d, nil + } + d.SetInt64(-iv) + return d, nil + default: + // we will try to convert other types to float + // TODO: if time has no precision, it will be a integer + f, err := d.ToFloat64() + d.SetFloat64(math.Abs(f)) + return d, errors.Trace(err) + } +} + +func builtinRand(args []types.Datum, _ context.Context) (d types.Datum, err error) { + if len(args) == 1 && args[0].Kind() != types.KindNull { + seed, err := args[0].ToInt64() + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + + rand.Seed(seed) + } + d.SetFloat64(rand.Float64()) + return d, nil +} + +func builtinPow(args []types.Datum, _ context.Context) (d types.Datum, err error) { + x, err := args[0].ToFloat64() + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + + y, err := args[1].ToFloat64() + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + d.SetFloat64(math.Pow(x, y)) + return d, nil +} diff --git a/vendor/github.com/pingcap/tidb/evaluator/builtin_string.go b/vendor/github.com/pingcap/tidb/evaluator/builtin_string.go new file mode 100644 index 000000000..1751c83f9 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/evaluator/builtin_string.go @@ -0,0 +1,476 @@ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package evaluator + +import ( + "fmt" + "strings" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/util/charset" + "github.com/pingcap/tidb/util/types" + "golang.org/x/text/transform" +) + +// https://dev.mysql.com/doc/refman/5.7/en/string-functions.html + +func builtinLength(args []types.Datum, _ context.Context) (d types.Datum, err error) { + switch args[0].Kind() { + case types.KindNull: + d.SetNull() + return d, nil + default: + s, err := args[0].ToString() + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + d.SetInt64(int64(len(s))) + return d, nil + } +} + +// See: https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_concat +func builtinConcat(args []types.Datum, _ context.Context) (d types.Datum, err error) { + var s []byte + for _, a := range args { + if a.Kind() == types.KindNull { + d.SetNull() + return d, nil + } + var ss string + ss, err = a.ToString() + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + s = append(s, []byte(ss)...) + } + d.SetBytesAsString(s) + return d, nil +} + +// See: https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_concat-ws +func builtinConcatWS(args []types.Datum, _ context.Context) (d types.Datum, err error) { + var sep string + s := make([]string, 0, len(args)) + for i, a := range args { + if a.Kind() == types.KindNull { + if i == 0 { + d.SetNull() + return d, nil + } + continue + } + ss, err := a.ToString() + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + + if i == 0 { + sep = ss + continue + } + s = append(s, ss) + } + + d.SetString(strings.Join(s, sep)) + return d, nil +} + +// See: https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_left +func builtinLeft(args []types.Datum, _ context.Context) (d types.Datum, err error) { + str, err := args[0].ToString() + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + length, err := args[1].ToInt64() + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + l := int(length) + if l < 0 { + l = 0 + } else if l > len(str) { + l = len(str) + } + d.SetString(str[:l]) + return d, nil +} + +// See: https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_repeat +func builtinRepeat(args []types.Datum, _ context.Context) (d types.Datum, err error) { + str, err := args[0].ToString() + if err != nil { + d.SetNull() + return d, err + } + ch := fmt.Sprintf("%v", str) + num := 0 + x := args[1] + switch x.Kind() { + case types.KindInt64: + num = int(x.GetInt64()) + case types.KindUint64: + num = int(x.GetUint64()) + } + if num < 1 { + d.SetString("") + return d, nil + } + d.SetString(strings.Repeat(ch, num)) + return d, nil +} + +// See: https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_lower +func builtinLower(args []types.Datum, _ context.Context) (d types.Datum, err error) { + x := args[0] + switch x.Kind() { + case types.KindNull: + d.SetNull() + return d, nil + default: + s, err := x.ToString() + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + d.SetString(strings.ToLower(s)) + return d, nil + } +} + +// See: https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_upper +func builtinUpper(args []types.Datum, _ context.Context) (d types.Datum, err error) { + x := args[0] + switch x.Kind() { + case types.KindNull: + d.SetNull() + return d, nil + default: + s, err := x.ToString() + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + d.SetString(strings.ToUpper(s)) + return d, nil + } +} + +// See: https://dev.mysql.com/doc/refman/5.7/en/string-comparison-functions.html +func builtinStrcmp(args []interface{}, _ context.Context) (interface{}, error) { + if args[0] == nil || args[1] == nil { + return nil, nil + } + left, err := types.ToString(args[0]) + if err != nil { + return nil, errors.Trace(err) + } + right, err := types.ToString(args[1]) + if err != nil { + return nil, errors.Trace(err) + } + res := types.CompareString(left, right) + return res, nil +} + +// See: https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_replace +func builtinReplace(args []interface{}, _ context.Context) (interface{}, error) { + for _, arg := range args { + if arg == nil { + return nil, nil + } + } + + str, err := types.ToString(args[0]) + if err != nil { + return nil, errors.Trace(err) + } + oldStr, err := types.ToString(args[1]) + if err != nil { + return nil, errors.Trace(err) + } + newStr, err := types.ToString(args[2]) + if err != nil { + return nil, errors.Trace(err) + } + + return strings.Replace(str, oldStr, newStr, -1), nil +} + +// See: https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#function_convert +func builtinConvert(args []interface{}, _ context.Context) (interface{}, error) { + value := args[0] + Charset := args[1].(string) + + // Casting nil to any type returns nil + if value == nil { + return nil, nil + } + str, ok := value.(string) + if !ok { + return nil, nil + } + if strings.ToLower(Charset) == "ascii" { + return value, nil + } else if strings.ToLower(Charset) == "utf8mb4" { + return value, nil + } + + encoding, _ := charset.Lookup(Charset) + if encoding == nil { + return nil, errors.Errorf("unknown encoding: %s", Charset) + } + + target, _, err := transform.String(encoding.NewDecoder(), str) + if err != nil { + log.Errorf("Convert %s to %s with error: %v", str, Charset, err) + return nil, errors.Trace(err) + } + return target, nil +} + +func builtinSubstring(args []interface{}, _ context.Context) (interface{}, error) { + // The meaning of the elements of args. + // arg[0] -> StrExpr + // arg[1] -> Pos + // arg[2] -> Len (Optional) + str, err := types.ToString(args[0]) + if err != nil { + return nil, errors.Errorf("Substring invalid args, need string but get %T", args[0]) + } + + t := args[1] + p, ok := t.(int64) + if !ok { + return nil, errors.Errorf("Substring invalid pos args, need int but get %T", t) + } + pos := int(p) + + length := -1 + if len(args) == 3 { + t = args[2] + p, ok = t.(int64) + if !ok { + return nil, errors.Errorf("Substring invalid pos args, need int but get %T", t) + } + length = int(p) + } + // The forms without a len argument return a substring from string str starting at position pos. + // The forms with a len argument return a substring len characters long from string str, starting at position pos. + // The forms that use FROM are standard SQL syntax. It is also possible to use a negative value for pos. + // In this case, the beginning of the substring is pos characters from the end of the string, rather than the beginning. + // A negative value may be used for pos in any of the forms of this function. + if pos < 0 { + pos = len(str) + pos + } else { + pos-- + } + if pos > len(str) || pos <= 0 { + pos = len(str) + } + end := len(str) + if length != -1 { + end = pos + length + } + if end > len(str) { + end = len(str) + } + return str[pos:end], nil +} + +// See: https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_substring-index +func builtinSubstringIndex(args []interface{}, _ context.Context) (interface{}, error) { + // The meaning of the elements of args. + // args[0] -> StrExpr + // args[1] -> Delim + // args[2] -> Count + fs := args[0] + str, err := types.ToString(fs) + if err != nil { + return nil, errors.Errorf("Substring_Index invalid args, need string but get %T", fs) + } + + t := args[1] + delim, err := types.ToString(t) + if err != nil { + return nil, errors.Errorf("Substring_Index invalid delim, need string but get %T", t) + } + if len(delim) == 0 { + return "", nil + } + + t = args[2] + c, err := types.ToInt64(t) + if err != nil { + return nil, errors.Trace(err) + } + count := int(c) + strs := strings.Split(str, delim) + var ( + start = 0 + end = len(strs) + ) + if count > 0 { + // If count is positive, everything to the left of the final delimiter (counting from the left) is returned. + if count < end { + end = count + } + } else { + // If count is negative, everything to the right of the final delimiter (counting from the right) is returned. + count = -count + if count < end { + start = end - count + } + } + substrs := strs[start:end] + return strings.Join(substrs, delim), nil +} + +// See: https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_locate +func builtinLocate(args []interface{}, _ context.Context) (interface{}, error) { + // The meaning of the elements of args. + // args[0] -> SubStr + // args[1] -> Str + // args[2] -> Pos + // eval str + fs := args[1] + if fs == nil { + return nil, nil + } + str, err := types.ToString(fs) + if err != nil { + return nil, errors.Trace(err) + } + // eval substr + fs = args[0] + if fs == nil { + return nil, nil + } + subStr, err := types.ToString(fs) + if err != nil { + return nil, errors.Trace(err) + } + // eval pos + pos := int64(0) + if len(args) == 3 { + t := args[2] + p, err := types.ToInt64(t) + if err != nil { + return nil, errors.Trace(err) + } + pos = p - 1 + if pos < 0 || pos > int64(len(str)) { + return 0, nil + } + if pos > int64(len(str)-len(subStr)) { + return 0, nil + } + } + if len(subStr) == 0 { + return pos + 1, nil + } + i := strings.Index(str[pos:], subStr) + if i == -1 { + return 0, nil + } + return int64(i) + pos + 1, nil +} + +const spaceChars = "\n\t\r " + +// See: https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_trim +func builtinTrim(args []interface{}, _ context.Context) (interface{}, error) { + // args[0] -> Str + // args[1] -> RemStr + // args[2] -> Direction + // eval str + fs := args[0] + if fs == nil { + return nil, nil + } + str, err := types.ToString(fs) + if err != nil { + return nil, errors.Trace(err) + } + remstr := "" + // eval remstr + if len(args) > 1 { + fs = args[1] + if fs != nil { + remstr, err = types.ToString(fs) + if err != nil { + return nil, errors.Trace(err) + } + } + } + // do trim + var result string + var direction ast.TrimDirectionType + if len(args) > 2 { + direction = args[2].(ast.TrimDirectionType) + } else { + direction = ast.TrimBothDefault + } + if direction == ast.TrimLeading { + if len(remstr) > 0 { + result = trimLeft(str, remstr) + } else { + result = strings.TrimLeft(str, spaceChars) + } + } else if direction == ast.TrimTrailing { + if len(remstr) > 0 { + result = trimRight(str, remstr) + } else { + result = strings.TrimRight(str, spaceChars) + } + } else if len(remstr) > 0 { + x := trimLeft(str, remstr) + result = trimRight(x, remstr) + } else { + result = strings.Trim(str, spaceChars) + } + return result, nil +} + +func trimLeft(str, remstr string) string { + for { + x := strings.TrimPrefix(str, remstr) + if len(x) == len(str) { + return x + } + str = x + } +} + +func trimRight(str, remstr string) string { + for { + x := strings.TrimSuffix(str, remstr) + if len(x) == len(str) { + return x + } + str = x + } +} diff --git a/vendor/github.com/pingcap/tidb/evaluator/builtin_time.go b/vendor/github.com/pingcap/tidb/evaluator/builtin_time.go new file mode 100644 index 000000000..084ae1337 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/evaluator/builtin_time.go @@ -0,0 +1,555 @@ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package evaluator + +import ( + "fmt" + "regexp" + "strings" + "time" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/util/types" +) + +func convertToTime(arg types.Datum, tp byte) (d types.Datum, err error) { + f := types.NewFieldType(tp) + f.Decimal = mysql.MaxFsp + + d, err = arg.ConvertTo(f) + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + + if d.Kind() == types.KindNull { + return d, nil + } + + if d.Kind() != types.KindMysqlTime { + err = errors.Errorf("need time type, but got %T", d.GetValue()) + d.SetNull() + return d, err + } + return d, nil +} + +func convertToDuration(arg types.Datum, fsp int) (d types.Datum, err error) { + f := types.NewFieldType(mysql.TypeDuration) + f.Decimal = fsp + + d, err = arg.ConvertTo(f) + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + + if d.Kind() == types.KindNull { + d.SetNull() + return d, nil + } + + if d.Kind() != types.KindMysqlDuration { + err = errors.Errorf("need duration type, but got %T", d.GetValue()) + d.SetNull() + return d, err + } + return d, nil +} + +func builtinDate(args []types.Datum, _ context.Context) (types.Datum, error) { + return convertToTime(args[0], mysql.TypeDate) +} + +// See http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_day +// day is a synonym for DayOfMonth +func builtinDay(args []types.Datum, ctx context.Context) (types.Datum, error) { + return builtinDayOfMonth(args, ctx) +} + +// See http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_hour +func builtinHour(args []types.Datum, _ context.Context) (types.Datum, error) { + d, err := convertToDuration(args[0], mysql.MaxFsp) + if err != nil || d.Kind() == types.KindNull { + d.SetNull() + return d, errors.Trace(err) + } + + // No need to check type here. + h := int64(d.GetMysqlDuration().Hour()) + d.SetInt64(h) + return d, nil +} + +// See http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_minute +func builtinMinute(args []types.Datum, _ context.Context) (types.Datum, error) { + d, err := convertToDuration(args[0], mysql.MaxFsp) + if err != nil || d.Kind() == types.KindNull { + d.SetNull() + return d, errors.Trace(err) + } + + // No need to check type here. + m := int64(d.GetMysqlDuration().Minute()) + d.SetInt64(m) + return d, nil +} + +// See http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_second +func builtinSecond(args []types.Datum, _ context.Context) (types.Datum, error) { + d, err := convertToDuration(args[0], mysql.MaxFsp) + if err != nil || d.Kind() == types.KindNull { + d.SetNull() + return d, errors.Trace(err) + } + + // No need to check type here. + s := int64(d.GetMysqlDuration().Second()) + d.SetInt64(s) + return d, nil +} + +// See http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_microsecond +func builtinMicroSecond(args []types.Datum, _ context.Context) (types.Datum, error) { + d, err := convertToDuration(args[0], mysql.MaxFsp) + if err != nil || d.Kind() == types.KindNull { + d.SetNull() + return d, errors.Trace(err) + } + + // No need to check type here. + m := int64(d.GetMysqlDuration().MicroSecond()) + d.SetInt64(m) + return d, nil +} + +// See http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_month +func builtinMonth(args []types.Datum, _ context.Context) (types.Datum, error) { + d, err := convertToTime(args[0], mysql.TypeDate) + if err != nil || d.Kind() == types.KindNull { + d.SetNull() + return d, errors.Trace(err) + } + + // No need to check type here. + t := d.GetMysqlTime() + i := int64(0) + if t.IsZero() { + d.SetInt64(i) + return d, nil + } + i = int64(t.Month()) + d.SetInt64(i) + return d, nil +} + +func builtinNow(args []types.Datum, _ context.Context) (d types.Datum, err error) { + // TODO: if NOW is used in stored function or trigger, NOW will return the beginning time + // of the execution. + fsp := 0 + if len(args) == 1 && args[0].Kind() != types.KindNull { + if fsp, err = checkFsp(args[0]); err != nil { + d.SetNull() + return d, errors.Trace(err) + } + } + + t := mysql.Time{ + Time: time.Now(), + Type: mysql.TypeDatetime, + // set unspecified for later round + Fsp: mysql.UnspecifiedFsp, + } + + tr, err := t.RoundFrac(int(fsp)) + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + d.SetMysqlTime(tr) + return d, nil +} + +// See http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_dayname +func builtinDayName(args []types.Datum, ctx context.Context) (types.Datum, error) { + d, err := builtinWeekDay(args, ctx) + if err != nil || d.Kind() == types.KindNull { + d.SetNull() + return d, errors.Trace(err) + } + weekday := d.GetInt64() + if (weekday < 0) || (weekday >= int64(len(mysql.WeekdayNames))) { + d.SetNull() + return d, errors.Errorf("no name for invalid weekday: %d.", weekday) + } + d.SetString(mysql.WeekdayNames[weekday]) + return d, nil +} + +// See http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_dayofmonth +func builtinDayOfMonth(args []types.Datum, _ context.Context) (d types.Datum, err error) { + // TODO: some invalid format like 2000-00-00 will return 0 too. + d, err = convertToTime(args[0], mysql.TypeDate) + if err != nil || d.Kind() == types.KindNull { + d.SetNull() + return d, errors.Trace(err) + } + + // No need to check type here. + t := d.GetMysqlTime() + if t.IsZero() { + d.SetInt64(int64(0)) + return d, nil + } + + d.SetInt64(int64(t.Day())) + return d, nil +} + +// See http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_dayofweek +func builtinDayOfWeek(args []types.Datum, _ context.Context) (d types.Datum, err error) { + d, err = convertToTime(args[0], mysql.TypeDate) + if err != nil || d.Kind() == types.KindNull { + d.SetNull() + return d, errors.Trace(err) + } + + // No need to check type here. + t := d.GetMysqlTime() + if t.IsZero() { + d.SetNull() + // TODO: log warning or return error? + return d, nil + } + + // 1 is Sunday, 2 is Monday, .... 7 is Saturday + d.SetInt64(int64(t.Weekday()) + 1) + return d, nil +} + +// See http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_dayofyear +func builtinDayOfYear(args []types.Datum, _ context.Context) (types.Datum, error) { + d, err := convertToTime(args[0], mysql.TypeDate) + if err != nil || d.Kind() == types.KindNull { + d.SetNull() + return d, errors.Trace(err) + } + + t := d.GetMysqlTime() + if t.IsZero() { + // TODO: log warning or return error? + d.SetNull() + return d, nil + } + + yd := int64(t.YearDay()) + d.SetInt64(yd) + return d, nil +} + +// See http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_week +func builtinWeek(args []types.Datum, _ context.Context) (types.Datum, error) { + d, err := convertToTime(args[0], mysql.TypeDate) + if err != nil || d.Kind() == types.KindNull { + d.SetNull() + return d, errors.Trace(err) + } + + // No need to check type here. + t := d.GetMysqlTime() + if t.IsZero() { + // TODO: log warning or return error? + d.SetNull() + return d, nil + } + + // TODO: support multi mode for week + _, week := t.ISOWeek() + wi := int64(week) + d.SetInt64(wi) + return d, nil +} + +// See http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_weekday +func builtinWeekDay(args []types.Datum, _ context.Context) (types.Datum, error) { + d, err := convertToTime(args[0], mysql.TypeDate) + if err != nil || d.Kind() == types.KindNull { + d.SetNull() + return d, errors.Trace(err) + } + + // No need to check type here. + t := d.GetMysqlTime() + if t.IsZero() { + // TODO: log warning or return error? + d.SetNull() + return d, nil + } + + // Monday is 0, ... Sunday = 6 in MySQL + // but in go, Sunday is 0, ... Saturday is 6 + // w will do a conversion. + w := (int64(t.Weekday()) + 6) % 7 + d.SetInt64(w) + return d, nil +} + +// See http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_weekofyear +func builtinWeekOfYear(args []types.Datum, ctx context.Context) (types.Datum, error) { + // WeekOfYear is equivalent to to Week(date, 3) + d := types.Datum{} + d.SetInt64(3) + return builtinWeek([]types.Datum{args[0], d}, ctx) +} + +// See http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_year +func builtinYear(args []types.Datum, _ context.Context) (types.Datum, error) { + d, err := convertToTime(args[0], mysql.TypeDate) + if err != nil || d.Kind() == types.KindNull { + return d, errors.Trace(err) + } + + // No need to check type here. + t := d.GetMysqlTime() + if t.IsZero() { + d.SetInt64(0) + return d, nil + } + + d.SetInt64(int64(t.Year())) + return d, nil +} + +// See http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_yearweek +func builtinYearWeek(args []types.Datum, _ context.Context) (types.Datum, error) { + d, err := convertToTime(args[0], mysql.TypeDate) + if err != nil || d.Kind() == types.KindNull { + d.SetNull() + return d, errors.Trace(err) + } + + // No need to check type here. + t := d.GetMysqlTime() + if t.IsZero() { + d.SetNull() + // TODO: log warning or return error? + return d, nil + } + + // TODO: support multi mode for week + year, week := t.ISOWeek() + d.SetInt64(int64(year*100 + week)) + return d, nil +} + +func builtinSysDate(args []types.Datum, ctx context.Context) (types.Datum, error) { + // SYSDATE is not the same as NOW if NOW is used in a stored function or trigger. + // But here we can just think they are the same because we don't support stored function + // and trigger now. + return builtinNow(args, ctx) +} + +// See https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_curdate +func builtinCurrentDate(args []types.Datum, _ context.Context) (d types.Datum, err error) { + year, month, day := time.Now().Date() + t := mysql.Time{ + Time: time.Date(year, month, day, 0, 0, 0, 0, time.Local), + Type: mysql.TypeDate, Fsp: 0} + d.SetMysqlTime(t) + return d, nil +} + +// See https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_curtime +func builtinCurrentTime(args []types.Datum, _ context.Context) (d types.Datum, err error) { + fsp := 0 + if len(args) == 1 && args[0].Kind() != types.KindNull { + if fsp, err = checkFsp(args[0]); err != nil { + d.SetNull() + return d, errors.Trace(err) + } + } + d.SetString(time.Now().Format("15:04:05.000000")) + return convertToDuration(d, fsp) +} + +// See https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_extract +func builtinExtract(args []types.Datum, _ context.Context) (d types.Datum, err error) { + unit := args[0].GetString() + vd := args[1] + + if vd.Kind() == types.KindNull { + d.SetNull() + return d, nil + } + + f := types.NewFieldType(mysql.TypeDatetime) + f.Decimal = mysql.MaxFsp + val, err := vd.ConvertTo(f) + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + if val.Kind() == types.KindNull { + d.SetNull() + return d, nil + } + + if val.Kind() != types.KindMysqlTime { + err = errors.Errorf("need time type, but got %T", val) + d.SetNull() + return d, err + } + t := val.GetMysqlTime() + n, err1 := mysql.ExtractTimeNum(unit, t) + if err1 != nil { + d.SetNull() + return d, errors.Trace(err1) + } + d.SetInt64(n) + return d, nil +} + +func checkFsp(arg types.Datum) (int, error) { + fsp, err := arg.ToInt64() + if err != nil { + return 0, errors.Trace(err) + } + if int(fsp) > mysql.MaxFsp { + return 0, errors.Errorf("Too big precision %d specified. Maximum is 6.", fsp) + } else if fsp < 0 { + return 0, errors.Errorf("Invalid negative %d specified, must in [0, 6].", fsp) + } + return int(fsp), nil +} + +func builtinDateArith(args []types.Datum, ctx context.Context) (d types.Datum, err error) { + // Op is used for distinguishing date_add and date_sub. + // args[0] -> Op + // args[1] -> Date + // args[2] -> DateArithInterval + // health check for date and interval + if args[1].Kind() == types.KindNull { + d.SetNull() + return d, nil + } + nodeDate := args[1] + nodeInterval := args[2].GetInterface().(ast.DateArithInterval) + nodeIntervalIntervalDatum := nodeInterval.Interval.GetDatum() + if nodeIntervalIntervalDatum.Kind() == types.KindNull { + d.SetNull() + return d, nil + } + // parse date + fieldType := mysql.TypeDate + var resultField *types.FieldType + switch nodeDate.Kind() { + case types.KindMysqlTime: + x := nodeDate.GetMysqlTime() + if (x.Type == mysql.TypeDatetime) || (x.Type == mysql.TypeTimestamp) { + fieldType = mysql.TypeDatetime + } + case types.KindString: + x := nodeDate.GetString() + if !mysql.IsDateFormat(x) { + fieldType = mysql.TypeDatetime + } + case types.KindInt64: + x := nodeDate.GetInt64() + if t, err1 := mysql.ParseTimeFromInt64(x); err1 == nil { + if (t.Type == mysql.TypeDatetime) || (t.Type == mysql.TypeTimestamp) { + fieldType = mysql.TypeDatetime + } + } + } + if mysql.IsClockUnit(nodeInterval.Unit) { + fieldType = mysql.TypeDatetime + } + resultField = types.NewFieldType(fieldType) + resultField.Decimal = mysql.MaxFsp + value, err := nodeDate.ConvertTo(resultField) + if err != nil { + d.SetNull() + return d, ErrInvalidOperation.Gen("DateArith invalid args, need date but get %T", nodeDate) + } + if value.Kind() == types.KindNull { + d.SetNull() + return d, ErrInvalidOperation.Gen("DateArith invalid args, need date but get %v", value.GetValue()) + } + if value.Kind() != types.KindMysqlTime { + d.SetNull() + return d, ErrInvalidOperation.Gen("DateArith need time type, but got %T", value.GetValue()) + } + result := value.GetMysqlTime() + // parse interval + var interval string + if strings.ToLower(nodeInterval.Unit) == "day" { + day, err2 := parseDayInterval(*nodeIntervalIntervalDatum) + if err2 != nil { + d.SetNull() + return d, ErrInvalidOperation.Gen("DateArith invalid day interval, need int but got %T", nodeIntervalIntervalDatum.GetString()) + } + interval = fmt.Sprintf("%d", day) + } else { + if nodeIntervalIntervalDatum.Kind() == types.KindString { + interval = fmt.Sprintf("%v", nodeIntervalIntervalDatum.GetString()) + } else { + ii, err := nodeIntervalIntervalDatum.ToInt64() + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + interval = fmt.Sprintf("%v", ii) + } + } + year, month, day, duration, err := mysql.ExtractTimeValue(nodeInterval.Unit, interval) + if err != nil { + d.SetNull() + return d, errors.Trace(err) + } + op := args[0].GetInterface().(ast.DateArithType) + if op == ast.DateSub { + year, month, day, duration = -year, -month, -day, -duration + } + result.Time = result.Time.Add(duration) + result.Time = result.Time.AddDate(int(year), int(month), int(day)) + if result.Time.Nanosecond() == 0 { + result.Fsp = 0 + } + d.SetMysqlTime(result) + return d, nil +} + +var reg = regexp.MustCompile(`[\d]+`) + +func parseDayInterval(value types.Datum) (int64, error) { + switch value.Kind() { + case types.KindString: + vs := value.GetString() + s := strings.ToLower(vs) + if s == "false" { + return 0, nil + } else if s == "true" { + return 1, nil + } + value.SetString(reg.FindString(vs)) + } + return value.ToInt64() +} diff --git a/vendor/github.com/pingcap/tidb/evaluator/evaluator.go b/vendor/github.com/pingcap/tidb/evaluator/evaluator.go new file mode 100644 index 000000000..5531a8777 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/evaluator/evaluator.go @@ -0,0 +1,717 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package evaluator + +import ( + "strings" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/parser/opcode" + "github.com/pingcap/tidb/sessionctx/variable" + "github.com/pingcap/tidb/terror" + "github.com/pingcap/tidb/util/types" +) + +// Error instances. +var ( + ErrInvalidOperation = terror.ClassEvaluator.New(CodeInvalidOperation, "invalid operation") +) + +// Error codes. +const ( + CodeInvalidOperation terror.ErrCode = 1 +) + +// Eval evaluates an expression to a value. +func Eval(ctx context.Context, expr ast.ExprNode) (interface{}, error) { + e := &Evaluator{ctx: ctx} + expr.Accept(e) + if e.err != nil { + return nil, errors.Trace(e.err) + } + return expr.GetValue(), nil +} + +// EvalBool evalueates an expression to a boolean value. +func EvalBool(ctx context.Context, expr ast.ExprNode) (bool, error) { + val, err := Eval(ctx, expr) + if err != nil { + return false, errors.Trace(err) + } + if val == nil { + return false, nil + } + + i, err := types.ToBool(val) + if err != nil { + return false, errors.Trace(err) + } + return i != 0, nil +} + +func boolToInt64(v bool) int64 { + if v { + return int64(1) + } + return int64(0) +} + +// Evaluator is an ast Visitor that evaluates an expression. +type Evaluator struct { + ctx context.Context + err error + multipleRows bool + existRow bool +} + +// Enter implements ast.Visitor interface. +func (e *Evaluator) Enter(in ast.Node) (out ast.Node, skipChildren bool) { + switch v := in.(type) { + case *ast.SubqueryExpr: + if v.Evaluated && !v.UseOuterContext { + return in, true + } + case *ast.PatternInExpr, *ast.CompareSubqueryExpr: + e.multipleRows = true + case *ast.ExistsSubqueryExpr: + e.existRow = true + } + return in, false +} + +// Leave implements ast.Visitor interface. +func (e *Evaluator) Leave(in ast.Node) (out ast.Node, ok bool) { + switch v := in.(type) { + case *ast.AggregateFuncExpr: + ok = e.aggregateFunc(v) + case *ast.BetweenExpr: + ok = e.between(v) + case *ast.BinaryOperationExpr: + ok = e.binaryOperation(v) + case *ast.CaseExpr: + ok = e.caseExpr(v) + case *ast.ColumnName: + ok = true + case *ast.ColumnNameExpr: + ok = e.columnName(v) + case *ast.CompareSubqueryExpr: + e.multipleRows = false + ok = e.compareSubquery(v) + case *ast.DefaultExpr: + ok = e.defaultExpr(v) + case *ast.ExistsSubqueryExpr: + e.existRow = false + ok = e.existsSubquery(v) + case *ast.FuncCallExpr: + ok = e.funcCall(v) + case *ast.FuncCastExpr: + ok = e.funcCast(v) + case *ast.IsNullExpr: + ok = e.isNull(v) + case *ast.IsTruthExpr: + ok = e.isTruth(v) + case *ast.ParamMarkerExpr: + ok = e.paramMarker(v) + case *ast.ParenthesesExpr: + ok = e.parentheses(v) + case *ast.PatternInExpr: + e.multipleRows = false + ok = e.patternIn(v) + case *ast.PatternLikeExpr: + ok = e.patternLike(v) + case *ast.PatternRegexpExpr: + ok = e.patternRegexp(v) + case *ast.PositionExpr: + ok = e.position(v) + case *ast.RowExpr: + ok = e.row(v) + case *ast.SubqueryExpr: + ok = e.subqueryExpr(v) + case ast.SubqueryExec: + ok = e.subqueryExec(v) + case *ast.UnaryOperationExpr: + ok = e.unaryOperation(v) + case *ast.ValueExpr: + ok = true + case *ast.ValuesExpr: + ok = e.values(v) + case *ast.VariableExpr: + ok = e.variable(v) + case *ast.WhenClause: + ok = true + } + out = in + return +} + +func (e *Evaluator) between(v *ast.BetweenExpr) bool { + var l, r ast.ExprNode + op := opcode.AndAnd + + if v.Not { + // v < lv || v > rv + op = opcode.OrOr + l = &ast.BinaryOperationExpr{Op: opcode.LT, L: v.Expr, R: v.Left} + r = &ast.BinaryOperationExpr{Op: opcode.GT, L: v.Expr, R: v.Right} + } else { + // v >= lv && v <= rv + l = &ast.BinaryOperationExpr{Op: opcode.GE, L: v.Expr, R: v.Left} + r = &ast.BinaryOperationExpr{Op: opcode.LE, L: v.Expr, R: v.Right} + } + + ret := &ast.BinaryOperationExpr{Op: op, L: l, R: r} + ret.Accept(e) + if e.err != nil { + return false + } + v.SetDatum(*ret.GetDatum()) + return true +} + +func (e *Evaluator) caseExpr(v *ast.CaseExpr) bool { + tmp := types.NewDatum(boolToInt64(true)) + target := &tmp + if v.Value != nil { + target = v.Value.GetDatum() + } + if target.Kind() != types.KindNull { + for _, val := range v.WhenClauses { + cmp, err := target.CompareDatum(*val.Expr.GetDatum()) + if err != nil { + e.err = errors.Trace(err) + return false + } + if cmp == 0 { + v.SetDatum(*val.Result.GetDatum()) + return true + } + } + } + if v.ElseClause != nil { + v.SetDatum(*v.ElseClause.GetDatum()) + } else { + v.SetNull() + } + return true +} + +func (e *Evaluator) columnName(v *ast.ColumnNameExpr) bool { + v.SetDatum(*v.Refer.Expr.GetDatum()) + return true +} + +func (e *Evaluator) defaultExpr(v *ast.DefaultExpr) bool { + return true +} + +func (e *Evaluator) compareSubquery(cs *ast.CompareSubqueryExpr) bool { + lvDatum := cs.L.GetDatum() + if lvDatum.Kind() == types.KindNull { + cs.SetNull() + return true + } + lv := lvDatum.GetValue() + x, err := e.checkResult(cs, lv, cs.R.GetValue().([]interface{})) + if err != nil { + e.err = errors.Trace(err) + return false + } + cs.SetValue(x) + return true +} + +func (e *Evaluator) checkResult(cs *ast.CompareSubqueryExpr, lv interface{}, result []interface{}) (interface{}, error) { + if cs.All { + return e.checkAllResult(cs, lv, result) + } + return e.checkAnyResult(cs, lv, result) +} + +func (e *Evaluator) checkAllResult(cs *ast.CompareSubqueryExpr, lv interface{}, result []interface{}) (interface{}, error) { + hasNull := false + for _, v := range result { + if v == nil { + hasNull = true + continue + } + + comRes, err := types.Compare(lv, v) + if err != nil { + return nil, errors.Trace(err) + } + + res, err := getCompResult(cs.Op, comRes) + if err != nil { + return nil, errors.Trace(err) + } + if !res { + return false, nil + } + } + if hasNull { + // If no matched but we get null, return null. + // Like `insert t (c) values (1),(2),(null)`, then + // `select 3 > all (select c from t)`, returns null. + return nil, nil + } + return true, nil +} + +func (e *Evaluator) checkAnyResult(cs *ast.CompareSubqueryExpr, lv interface{}, result []interface{}) (interface{}, error) { + hasNull := false + for _, v := range result { + if v == nil { + hasNull = true + continue + } + + comRes, err := types.Compare(lv, v) + if err != nil { + return nil, errors.Trace(err) + } + + res, err := getCompResult(cs.Op, comRes) + if err != nil { + return nil, errors.Trace(err) + } + if res { + return true, nil + } + } + + if hasNull { + // If no matched but we get null, return null. + // Like `insert t (c) values (1),(2),(null)`, then + // `select 0 > any (select c from t)`, returns null. + return nil, nil + } + + return false, nil +} + +func (e *Evaluator) existsSubquery(v *ast.ExistsSubqueryExpr) bool { + datum := v.Sel.GetDatum() + if datum.Kind() == types.KindNull { + v.SetInt64(0) + return true + } + r := datum.GetValue() + rows, _ := r.([]interface{}) + if len(rows) > 0 { + v.SetInt64(1) + } else { + v.SetInt64(0) + } + return true +} + +// Evaluate SubqueryExpr. +// Get the value from v.SubQuery and set it to v. +func (e *Evaluator) subqueryExpr(v *ast.SubqueryExpr) bool { + if v.SubqueryExec != nil { + v.SetDatum(*v.SubqueryExec.GetDatum()) + } + v.Evaluated = true + return true +} + +// Do the real work to evaluate subquery. +func (e *Evaluator) subqueryExec(v ast.SubqueryExec) bool { + rowCount := 2 + if e.multipleRows { + rowCount = -1 + } else if e.existRow { + rowCount = 1 + } + rows, err := v.EvalRows(e.ctx, rowCount) + if err != nil { + e.err = errors.Trace(err) + return false + } + if e.multipleRows || e.existRow { + v.SetValue(rows) + return true + } + switch len(rows) { + case 0: + v.GetDatum().SetNull() + case 1: + v.SetValue(rows[0]) + default: + e.err = errors.New("Subquery returns more than 1 row") + return false + } + return true +} + +func (e *Evaluator) checkInList(not bool, in interface{}, list []interface{}) interface{} { + hasNull := false + for _, v := range list { + if v == nil { + hasNull = true + continue + } + + r, err := types.Compare(types.Coerce(in, v)) + if err != nil { + e.err = errors.Trace(err) + return nil + } + if r == 0 { + if !not { + return 1 + } + return 0 + } + } + + if hasNull { + // if no matched but we got null in In, return null + // e.g 1 in (null, 2, 3) returns null + return nil + } + if not { + return 1 + } + return 0 +} + +func (e *Evaluator) patternIn(n *ast.PatternInExpr) bool { + lhs := n.Expr.GetDatum() + if lhs.Kind() == types.KindNull { + n.SetNull() + return true + } + if n.Sel == nil { + values := make([]interface{}, 0, len(n.List)) + for _, ei := range n.List { + values = append(values, ei.GetValue()) + } + x := e.checkInList(n.Not, lhs.GetValue(), values) + if e.err != nil { + return false + } + n.SetValue(x) + return true + } + se := n.Sel.(*ast.SubqueryExpr) + sel := se.SubqueryExec + + res := sel.GetValue().([]interface{}) + x := e.checkInList(n.Not, lhs.GetValue(), res) + if e.err != nil { + return false + } + n.SetValue(x) + return true +} + +func (e *Evaluator) isNull(v *ast.IsNullExpr) bool { + var boolVal bool + if v.Expr.GetDatum().Kind() == types.KindNull { + boolVal = true + } + if v.Not { + boolVal = !boolVal + } + v.SetInt64(boolToInt64(boolVal)) + return true +} + +func (e *Evaluator) isTruth(v *ast.IsTruthExpr) bool { + var boolVal bool + datum := v.Expr.GetDatum() + if datum.Kind() != types.KindNull { + ival, err := datum.ToBool() + if err != nil { + e.err = errors.Trace(err) + return false + } + if ival == v.True { + boolVal = true + } + } + if v.Not { + boolVal = !boolVal + } + v.GetDatum().SetInt64(boolToInt64(boolVal)) + return true +} + +func (e *Evaluator) paramMarker(v *ast.ParamMarkerExpr) bool { + return true +} + +func (e *Evaluator) parentheses(v *ast.ParenthesesExpr) bool { + v.SetDatum(*v.Expr.GetDatum()) + return true +} + +func (e *Evaluator) position(v *ast.PositionExpr) bool { + v.SetDatum(*v.Refer.Expr.GetDatum()) + return true +} + +func (e *Evaluator) row(v *ast.RowExpr) bool { + row := make([]interface{}, 0, len(v.Values)) + for _, val := range v.Values { + row = append(row, val.GetValue()) + } + v.SetValue(row) + return true +} + +func (e *Evaluator) unaryOperation(u *ast.UnaryOperationExpr) bool { + defer func() { + if er := recover(); er != nil { + e.err = errors.Errorf("%v", er) + } + }() + aDatum := u.V.GetDatum() + if aDatum.Kind() == types.KindNull { + u.SetNull() + return true + } + switch op := u.Op; op { + case opcode.Not: + n, err := aDatum.ToBool() + if err != nil { + e.err = errors.Trace(err) + } else if n == 0 { + u.SetInt64(1) + } else { + u.SetInt64(0) + } + case opcode.BitNeg: + // for bit operation, we will use int64 first, then return uint64 + n, err := aDatum.ToInt64() + if err != nil { + e.err = errors.Trace(err) + return false + } + u.SetUint64(uint64(^n)) + case opcode.Plus: + switch aDatum.Kind() { + case types.KindInt64, + types.KindUint64, + types.KindFloat64, + types.KindFloat32, + types.KindMysqlDuration, + types.KindMysqlTime, + types.KindString, + types.KindMysqlDecimal, + types.KindBytes, + types.KindMysqlHex, + types.KindMysqlBit, + types.KindMysqlEnum, + types.KindMysqlSet: + u.SetDatum(*aDatum) + default: + e.err = ErrInvalidOperation + return false + } + case opcode.Minus: + switch aDatum.Kind() { + case types.KindInt64: + u.SetInt64(-aDatum.GetInt64()) + case types.KindUint64: + u.SetInt64(-int64(aDatum.GetUint64())) + case types.KindFloat64: + u.SetFloat64(-aDatum.GetFloat64()) + case types.KindFloat32: + u.SetFloat32(-aDatum.GetFloat32()) + case types.KindMysqlDuration: + u.SetValue(mysql.ZeroDecimal.Sub(aDatum.GetMysqlDuration().ToNumber())) + case types.KindMysqlTime: + u.SetValue(mysql.ZeroDecimal.Sub(aDatum.GetMysqlTime().ToNumber())) + case types.KindString: + f, err := types.StrToFloat(aDatum.GetString()) + e.err = errors.Trace(err) + u.SetFloat64(-f) + case types.KindMysqlDecimal: + f, _ := aDatum.GetMysqlDecimal().Float64() + u.SetValue(mysql.NewDecimalFromFloat(-f)) + case types.KindBytes: + f, err := types.StrToFloat(string(aDatum.GetBytes())) + e.err = errors.Trace(err) + u.SetFloat64(-f) + case types.KindMysqlHex: + u.SetFloat64(-aDatum.GetMysqlHex().ToNumber()) + case types.KindMysqlBit: + u.SetFloat64(-aDatum.GetMysqlBit().ToNumber()) + case types.KindMysqlEnum: + u.SetFloat64(-aDatum.GetMysqlEnum().ToNumber()) + case types.KindMysqlSet: + u.SetFloat64(-aDatum.GetMysqlSet().ToNumber()) + default: + e.err = ErrInvalidOperation + return false + } + default: + e.err = ErrInvalidOperation + return false + } + + return true +} + +func (e *Evaluator) values(v *ast.ValuesExpr) bool { + v.SetDatum(*v.Column.GetDatum()) + return true +} + +func (e *Evaluator) variable(v *ast.VariableExpr) bool { + name := strings.ToLower(v.Name) + sessionVars := variable.GetSessionVars(e.ctx) + globalVars := variable.GetGlobalVarAccessor(e.ctx) + if !v.IsSystem { + // user vars + if value, ok := sessionVars.Users[name]; ok { + v.SetString(value) + return true + } + // select null user vars is permitted. + v.SetNull() + return true + } + + _, ok := variable.SysVars[name] + if !ok { + // select null sys vars is not permitted + e.err = variable.UnknownSystemVar.Gen("Unknown system variable '%s'", name) + return false + } + + if !v.IsGlobal { + if value, ok := sessionVars.Systems[name]; ok { + v.SetString(value) + return true + } + } + + value, err := globalVars.GetGlobalSysVar(e.ctx, name) + if err != nil { + e.err = errors.Trace(err) + return false + } + + v.SetString(value) + return true +} + +func (e *Evaluator) funcCall(v *ast.FuncCallExpr) bool { + of, ok := OldFuncs[v.FnName.L] + if ok { + if len(v.Args) < of.MinArgs || (of.MaxArgs != -1 && len(v.Args) > of.MaxArgs) { + e.err = ErrInvalidOperation.Gen("number of function arguments must in [%d, %d].", of.MinArgs, of.MaxArgs) + return false + } + a := make([]interface{}, len(v.Args)) + for i, arg := range v.Args { + a[i] = arg.GetValue() + } + val, err := of.F(a, e.ctx) + if err != nil { + e.err = errors.Trace(err) + return false + } + v.SetValue(val) + return true + } + f, ok := Funcs[v.FnName.L] + if !ok { + e.err = ErrInvalidOperation.Gen("unknown function %s", v.FnName.O) + return false + } + if len(v.Args) < f.MinArgs || (f.MaxArgs != -1 && len(v.Args) > f.MaxArgs) { + e.err = ErrInvalidOperation.Gen("number of function arguments must in [%d, %d].", f.MinArgs, f.MaxArgs) + return false + } + a := make([]types.Datum, len(v.Args)) + for i, arg := range v.Args { + a[i] = *arg.GetDatum() + } + val, err := f.F(a, e.ctx) + if err != nil { + e.err = errors.Trace(err) + return false + } + v.SetDatum(val) + return true +} + +func (e *Evaluator) funcCast(v *ast.FuncCastExpr) bool { + value := v.Expr.GetValue() + // Casting nil to any type returns null + if value == nil { + v.SetNull() + return true + } + var err error + value, err = types.Cast(value, v.Tp) + if err != nil { + e.err = errors.Trace(err) + return false + } + v.SetValue(value) + return true +} + +func (e *Evaluator) aggregateFunc(v *ast.AggregateFuncExpr) bool { + name := strings.ToLower(v.F) + switch name { + case ast.AggFuncAvg: + e.evalAggAvg(v) + case ast.AggFuncCount: + e.evalAggCount(v) + case ast.AggFuncFirstRow, ast.AggFuncMax, ast.AggFuncMin, ast.AggFuncSum: + e.evalAggSetValue(v) + case ast.AggFuncGroupConcat: + e.evalAggGroupConcat(v) + } + return e.err == nil +} + +func (e *Evaluator) evalAggCount(v *ast.AggregateFuncExpr) { + ctx := v.GetContext() + v.SetInt64(ctx.Count) +} + +func (e *Evaluator) evalAggSetValue(v *ast.AggregateFuncExpr) { + ctx := v.GetContext() + v.SetValue(ctx.Value) +} + +func (e *Evaluator) evalAggAvg(v *ast.AggregateFuncExpr) { + ctx := v.GetContext() + switch x := ctx.Value.(type) { + case float64: + ctx.Value = x / float64(ctx.Count) + case mysql.Decimal: + ctx.Value = x.Div(mysql.NewDecimalFromUint(uint64(ctx.Count), 0)) + } + v.SetValue(ctx.Value) +} + +func (e *Evaluator) evalAggGroupConcat(v *ast.AggregateFuncExpr) { + ctx := v.GetContext() + if ctx.Buffer != nil { + v.SetValue(ctx.Buffer.String()) + } else { + v.SetValue(nil) + } +} diff --git a/vendor/github.com/pingcap/tidb/evaluator/evaluator_binop.go b/vendor/github.com/pingcap/tidb/evaluator/evaluator_binop.go new file mode 100644 index 000000000..bec6a1f8d --- /dev/null +++ b/vendor/github.com/pingcap/tidb/evaluator/evaluator_binop.go @@ -0,0 +1,564 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package evaluator + +import ( + "math" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/parser/opcode" + "github.com/pingcap/tidb/util/types" +) + +const ( + zeroI64 int64 = 0 + oneI64 int64 = 1 +) + +func (e *Evaluator) binaryOperation(o *ast.BinaryOperationExpr) bool { + switch o.Op { + case opcode.AndAnd, opcode.OrOr, opcode.LogicXor: + return e.handleLogicOperation(o) + case opcode.LT, opcode.LE, opcode.GE, opcode.GT, opcode.EQ, opcode.NE, opcode.NullEQ: + return e.handleComparisonOp(o) + case opcode.RightShift, opcode.LeftShift, opcode.And, opcode.Or, opcode.Xor: + return e.handleBitOp(o) + case opcode.Plus, opcode.Minus, opcode.Mod, opcode.Div, opcode.Mul, opcode.IntDiv: + return e.handleArithmeticOp(o) + default: + e.err = ErrInvalidOperation + return false + } +} + +func (e *Evaluator) handleLogicOperation(o *ast.BinaryOperationExpr) bool { + switch o.Op { + case opcode.AndAnd: + return e.handleAndAnd(o) + case opcode.OrOr: + return e.handleOrOr(o) + case opcode.LogicXor: + return e.handleXor(o) + default: + e.err = ErrInvalidOperation.Gen("unkown operator %s", o.Op) + return false + } +} + +func (e *Evaluator) handleAndAnd(o *ast.BinaryOperationExpr) bool { + leftVal := o.L.GetValue() + righVal := o.R.GetValue() + if leftVal != nil { + x, err := types.ToBool(leftVal) + if err != nil { + e.err = errors.Trace(err) + return false + } else if x == 0 { + // false && any other types is false + o.SetValue(x) + return true + } + } + if righVal != nil { + y, err := types.ToBool(righVal) + if err != nil { + e.err = errors.Trace(err) + return false + } else if y == 0 { + o.SetValue(y) + return true + } + } + if leftVal == nil || righVal == nil { + o.SetValue(nil) + return true + } + o.SetValue(int64(1)) + return true +} + +func (e *Evaluator) handleOrOr(o *ast.BinaryOperationExpr) bool { + leftVal := o.L.GetValue() + righVal := o.R.GetValue() + if leftVal != nil { + x, err := types.ToBool(leftVal) + if err != nil { + e.err = errors.Trace(err) + return false + } else if x == 1 { + // true || any other types is true. + o.SetValue(x) + return true + } + } + if righVal != nil { + y, err := types.ToBool(righVal) + if err != nil { + e.err = errors.Trace(err) + return false + } else if y == 1 { + o.SetValue(y) + return true + } + } + if leftVal == nil || righVal == nil { + o.SetValue(nil) + return true + } + o.SetValue(int64(0)) + return true +} + +func (e *Evaluator) handleXor(o *ast.BinaryOperationExpr) bool { + leftVal := o.L.GetValue() + righVal := o.R.GetValue() + if leftVal == nil || righVal == nil { + o.SetValue(nil) + return true + } + x, err := types.ToBool(leftVal) + if err != nil { + e.err = errors.Trace(err) + return false + } + + y, err := types.ToBool(righVal) + if err != nil { + e.err = errors.Trace(err) + return false + } + if x == y { + o.SetValue(int64(0)) + } else { + o.SetValue(int64(1)) + } + return true +} + +func (e *Evaluator) handleComparisonOp(o *ast.BinaryOperationExpr) bool { + a, b := types.Coerce(o.L.GetValue(), o.R.GetValue()) + if a == nil || b == nil { + // for <=>, if a and b are both nil, return true. + // if a or b is nil, return false. + if o.Op == opcode.NullEQ { + if a == nil && b == nil { + o.SetValue(oneI64) + } else { + o.SetValue(zeroI64) + } + } else { + o.SetValue(nil) + } + return true + } + + n, err := types.Compare(a, b) + if err != nil { + e.err = errors.Trace(err) + return false + } + + r, err := getCompResult(o.Op, n) + if err != nil { + e.err = errors.Trace(err) + return false + } + if r { + o.SetValue(oneI64) + } else { + o.SetValue(zeroI64) + } + return true +} + +func getCompResult(op opcode.Op, value int) (bool, error) { + switch op { + case opcode.LT: + return value < 0, nil + case opcode.LE: + return value <= 0, nil + case opcode.GE: + return value >= 0, nil + case opcode.GT: + return value > 0, nil + case opcode.EQ: + return value == 0, nil + case opcode.NE: + return value != 0, nil + case opcode.NullEQ: + return value == 0, nil + default: + return false, ErrInvalidOperation.Gen("invalid op %v in comparision operation", op) + } +} + +func (e *Evaluator) handleBitOp(o *ast.BinaryOperationExpr) bool { + a, b := types.Coerce(o.L.GetValue(), o.R.GetValue()) + + if a == nil || b == nil { + o.SetValue(nil) + return true + } + + x, err := types.ToInt64(a) + if err != nil { + e.err = errors.Trace(err) + return false + } + + y, err := types.ToInt64(b) + if err != nil { + e.err = errors.Trace(err) + return false + } + + // use a int64 for bit operator, return uint64 + switch o.Op { + case opcode.And: + o.SetValue(uint64(x & y)) + case opcode.Or: + o.SetValue(uint64(x | y)) + case opcode.Xor: + o.SetValue(uint64(x ^ y)) + case opcode.RightShift: + o.SetValue(uint64(x) >> uint64(y)) + case opcode.LeftShift: + o.SetValue(uint64(x) << uint64(y)) + default: + e.err = ErrInvalidOperation.Gen("invalid op %v in bit operation", o.Op) + return false + } + return true +} + +func (e *Evaluator) handleArithmeticOp(o *ast.BinaryOperationExpr) bool { + a, err := coerceArithmetic(o.L.GetValue()) + if err != nil { + e.err = errors.Trace(err) + return false + } + + b, err := coerceArithmetic(o.R.GetValue()) + if err != nil { + e.err = errors.Trace(err) + return false + } + + a, b = types.Coerce(a, b) + if a == nil || b == nil { + o.SetValue(nil) + return true + } + + var result interface{} + switch o.Op { + case opcode.Plus: + result, e.err = computePlus(a, b) + case opcode.Minus: + result, e.err = computeMinus(a, b) + case opcode.Mul: + result, e.err = computeMul(a, b) + case opcode.Div: + result, e.err = computeDiv(a, b) + case opcode.Mod: + result, e.err = computeMod(a, b) + case opcode.IntDiv: + result, e.err = computeIntDiv(a, b) + default: + e.err = ErrInvalidOperation.Gen("invalid op %v in arithmetic operation", o.Op) + return false + } + o.SetValue(result) + return e.err == nil +} + +func computePlus(a, b interface{}) (interface{}, error) { + switch x := a.(type) { + case int64: + switch y := b.(type) { + case int64: + return types.AddInt64(x, y) + case uint64: + return types.AddInteger(y, x) + } + case uint64: + switch y := b.(type) { + case int64: + return types.AddInteger(x, y) + case uint64: + return types.AddUint64(x, y) + } + case float64: + switch y := b.(type) { + case float64: + return x + y, nil + } + case mysql.Decimal: + switch y := b.(type) { + case mysql.Decimal: + return x.Add(y), nil + } + } + return types.InvOp2(a, b, opcode.Plus) +} + +func computeMinus(a, b interface{}) (interface{}, error) { + switch x := a.(type) { + case int64: + switch y := b.(type) { + case int64: + return types.SubInt64(x, y) + case uint64: + return types.SubIntWithUint(x, y) + } + case uint64: + switch y := b.(type) { + case int64: + return types.SubUintWithInt(x, y) + case uint64: + return types.SubUint64(x, y) + } + case float64: + switch y := b.(type) { + case float64: + return x - y, nil + } + case mysql.Decimal: + switch y := b.(type) { + case mysql.Decimal: + return x.Sub(y), nil + } + } + + return types.InvOp2(a, b, opcode.Minus) +} + +func computeMul(a, b interface{}) (interface{}, error) { + switch x := a.(type) { + case int64: + switch y := b.(type) { + case int64: + return types.MulInt64(x, y) + case uint64: + return types.MulInteger(y, x) + } + case uint64: + switch y := b.(type) { + case int64: + return types.MulInteger(x, y) + case uint64: + return types.MulUint64(x, y) + } + case float64: + switch y := b.(type) { + case float64: + return x * y, nil + } + case mysql.Decimal: + switch y := b.(type) { + case mysql.Decimal: + return x.Mul(y), nil + } + } + + return types.InvOp2(a, b, opcode.Mul) +} + +func computeDiv(a, b interface{}) (interface{}, error) { + // MySQL support integer divison Div and division operator / + // we use opcode.Div for division operator and will use another for integer division later. + // for division operator, we will use float64 for calculation. + switch x := a.(type) { + case float64: + y, err := types.ToFloat64(b) + if err != nil { + return nil, errors.Trace(err) + } + + if y == 0 { + return nil, nil + } + + return x / y, nil + default: + // the scale of the result is the scale of the first operand plus + // the value of the div_precision_increment system variable (which is 4 by default) + // we will use 4 here + xa, err := types.ToDecimal(a) + if err != nil { + return nil, errors.Trace(err) + } + + xb, err := types.ToDecimal(b) + if err != nil { + return nil, errors.Trace(err) + } + if f, _ := xb.Float64(); f == 0 { + // division by zero return null + return nil, nil + } + + return xa.Div(xb), nil + } +} + +func computeMod(a, b interface{}) (interface{}, error) { + switch x := a.(type) { + case int64: + switch y := b.(type) { + case int64: + if y == 0 { + return nil, nil + } + return x % y, nil + case uint64: + if y == 0 { + return nil, nil + } else if x < 0 { + // first is int64, return int64. + return -int64(uint64(-x) % y), nil + } + return int64(uint64(x) % y), nil + } + case uint64: + switch y := b.(type) { + case int64: + if y == 0 { + return nil, nil + } else if y < 0 { + // first is uint64, return uint64. + return uint64(x % uint64(-y)), nil + } + return x % uint64(y), nil + case uint64: + if y == 0 { + return nil, nil + } + return x % y, nil + } + case float64: + switch y := b.(type) { + case float64: + if y == 0 { + return nil, nil + } + return math.Mod(x, y), nil + } + case mysql.Decimal: + switch y := b.(type) { + case mysql.Decimal: + xf, _ := x.Float64() + yf, _ := y.Float64() + if yf == 0 { + return nil, nil + } + return math.Mod(xf, yf), nil + } + } + + return types.InvOp2(a, b, opcode.Mod) +} + +func computeIntDiv(a, b interface{}) (interface{}, error) { + switch x := a.(type) { + case int64: + switch y := b.(type) { + case int64: + if y == 0 { + return nil, nil + } + return types.DivInt64(x, y) + case uint64: + if y == 0 { + return nil, nil + } + return types.DivIntWithUint(x, y) + } + case uint64: + switch y := b.(type) { + case int64: + if y == 0 { + return nil, nil + } + return types.DivUintWithInt(x, y) + case uint64: + if y == 0 { + return nil, nil + } + return x / y, nil + } + } + + // if any is none integer, use decimal to calculate + x, err := types.ToDecimal(a) + if err != nil { + return nil, errors.Trace(err) + } + + y, err := types.ToDecimal(b) + if err != nil { + return nil, errors.Trace(err) + } + + if f, _ := y.Float64(); f == 0 { + return nil, nil + } + + return x.Div(y).IntPart(), nil +} + +func coerceArithmetic(a interface{}) (interface{}, error) { + switch x := a.(type) { + case string: + // MySQL will convert string to float for arithmetic operation + f, err := types.StrToFloat(x) + if err != nil { + return nil, errors.Trace(err) + } + return f, errors.Trace(err) + case mysql.Time: + // if time has no precision, return int64 + v := x.ToNumber() + if x.Fsp == 0 { + return v.IntPart(), nil + } + return v, nil + case mysql.Duration: + // if duration has no precision, return int64 + v := x.ToNumber() + if x.Fsp == 0 { + return v.IntPart(), nil + } + return v, nil + case []byte: + // []byte is the same as string, converted to float for arithmetic operator. + f, err := types.StrToFloat(string(x)) + if err != nil { + return nil, errors.Trace(err) + } + return f, errors.Trace(err) + case mysql.Hex: + return x.ToNumber(), nil + case mysql.Bit: + return x.ToNumber(), nil + case mysql.Enum: + return x.ToNumber(), nil + case mysql.Set: + return x.ToNumber(), nil + default: + return x, nil + } +} diff --git a/vendor/github.com/pingcap/tidb/evaluator/evaluator_like.go b/vendor/github.com/pingcap/tidb/evaluator/evaluator_like.go new file mode 100644 index 000000000..2870fa782 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/evaluator/evaluator_like.go @@ -0,0 +1,217 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package evaluator + +import ( + "regexp" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/util/types" +) + +const ( + patMatch = iota + 1 + patOne + patAny +) + +// handle escapes and wild cards convert pattern characters and pattern types, +func compilePattern(pattern string, escape byte) (patChars, patTypes []byte) { + var lastAny bool + patChars = make([]byte, len(pattern)) + patTypes = make([]byte, len(pattern)) + patLen := 0 + for i := 0; i < len(pattern); i++ { + var tp byte + var c = pattern[i] + switch c { + case escape: + lastAny = false + tp = patMatch + if i < len(pattern)-1 { + i++ + c = pattern[i] + if c == escape || c == '_' || c == '%' { + // valid escape. + } else { + // invalid escape, fall back to escape byte + // mysql will treat escape character as the origin value even + // the escape sequence is invalid in Go or C. + // e.g, \m is invalid in Go, but in MySQL we will get "m" for select '\m'. + // Following case is correct just for escape \, not for others like +. + // TODO: add more checks for other escapes. + i-- + c = escape + } + } + case '_': + lastAny = false + tp = patOne + case '%': + if lastAny { + continue + } + lastAny = true + tp = patAny + default: + lastAny = false + tp = patMatch + } + patChars[patLen] = c + patTypes[patLen] = tp + patLen++ + } + for i := 0; i < patLen-1; i++ { + if (patTypes[i] == patAny) && (patTypes[i+1] == patOne) { + patTypes[i] = patOne + patTypes[i+1] = patAny + } + } + patChars = patChars[:patLen] + patTypes = patTypes[:patLen] + return +} + +const caseDiff = 'a' - 'A' + +func matchByteCI(a, b byte) bool { + if a == b { + return true + } + if a >= 'a' && a <= 'z' && a-caseDiff == b { + return true + } + return a >= 'A' && a <= 'Z' && a+caseDiff == b +} + +func doMatch(str string, patChars, patTypes []byte) bool { + var sIdx int + for i := 0; i < len(patChars); i++ { + switch patTypes[i] { + case patMatch: + if sIdx >= len(str) || !matchByteCI(str[sIdx], patChars[i]) { + return false + } + sIdx++ + case patOne: + sIdx++ + if sIdx > len(str) { + return false + } + case patAny: + i++ + if i == len(patChars) { + return true + } + for sIdx < len(str) { + if matchByteCI(patChars[i], str[sIdx]) && doMatch(str[sIdx:], patChars[i:], patTypes[i:]) { + return true + } + sIdx++ + } + return false + } + } + return sIdx == len(str) +} + +func (e *Evaluator) patternLike(p *ast.PatternLikeExpr) bool { + expr := p.Expr.GetValue() + if expr == nil { + p.SetValue(nil) + return true + } + + sexpr, err := types.ToString(expr) + if err != nil { + e.err = errors.Trace(err) + return false + } + + // We need to compile pattern if it has not been compiled or it is not static. + var needCompile = len(p.PatChars) == 0 || !ast.IsConstant(p.Pattern) + if needCompile { + pattern := p.Pattern.GetValue() + if pattern == nil { + p.SetValue(nil) + return true + } + spattern, err := types.ToString(pattern) + if err != nil { + e.err = errors.Trace(err) + return false + } + p.PatChars, p.PatTypes = compilePattern(spattern, p.Escape) + } + match := doMatch(sexpr, p.PatChars, p.PatTypes) + if p.Not { + match = !match + } + p.SetValue(boolToInt64(match)) + return true +} + +func (e *Evaluator) patternRegexp(p *ast.PatternRegexpExpr) bool { + var sexpr string + if p.Sexpr != nil { + sexpr = *p.Sexpr + } else { + expr := p.Expr.GetValue() + if expr == nil { + p.SetValue(nil) + return true + } + var err error + sexpr, err = types.ToString(expr) + if err != nil { + e.err = errors.Errorf("non-string Expression in LIKE: %v (Value of type %T)", expr, expr) + return false + } + + if ast.IsConstant(p.Expr) { + p.Sexpr = new(string) + *p.Sexpr = sexpr + } + } + + re := p.Re + if re == nil { + pattern := p.Pattern.GetValue() + if pattern == nil { + p.SetValue(nil) + return true + } + spattern, err := types.ToString(pattern) + if err != nil { + e.err = errors.Errorf("non-string pattern in LIKE: %v (Value of type %T)", pattern, pattern) + return false + } + + if re, err = regexp.Compile(spattern); err != nil { + e.err = errors.Trace(err) + return false + } + + if ast.IsConstant(p.Pattern) { + p.Re = re + } + } + match := re.MatchString(sexpr) + if p.Not { + match = !match + } + p.SetValue(boolToInt64(match)) + return true +} diff --git a/vendor/github.com/pingcap/tidb/evaluator/helper.go b/vendor/github.com/pingcap/tidb/evaluator/helper.go new file mode 100644 index 000000000..eaa759e71 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/evaluator/helper.go @@ -0,0 +1,136 @@ +package evaluator + +import ( + "strconv" + "strings" + "time" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/sessionctx/variable" + "github.com/pingcap/tidb/util/types" +) + +var ( + // CurrentTimestamp is the keyword getting default value for datetime and timestamp type. + CurrentTimestamp = "CURRENT_TIMESTAMP" + currentTimestampL = "current_timestamp" + // ZeroTimestamp shows the zero datetime and timestamp. + ZeroTimestamp = "0000-00-00 00:00:00" +) + +var ( + errDefaultValue = errors.New("invalid default value") +) + +// GetTimeValue gets the time value with type tp. +func GetTimeValue(ctx context.Context, v interface{}, tp byte, fsp int) (interface{}, error) { + return getTimeValue(ctx, v, tp, fsp) +} + +func getTimeValue(ctx context.Context, v interface{}, tp byte, fsp int) (interface{}, error) { + value := mysql.Time{ + Type: tp, + Fsp: fsp, + } + + defaultTime, err := getSystemTimestamp(ctx) + if err != nil { + return nil, errors.Trace(err) + } + + switch x := v.(type) { + case string: + upperX := strings.ToUpper(x) + if upperX == CurrentTimestamp { + value.Time = defaultTime + } else if upperX == ZeroTimestamp { + value, _ = mysql.ParseTimeFromNum(0, tp, fsp) + } else { + value, err = mysql.ParseTime(x, tp, fsp) + if err != nil { + return nil, errors.Trace(err) + } + } + case *ast.ValueExpr: + switch x.Kind() { + case types.KindString: + value, err = mysql.ParseTime(x.GetString(), tp, fsp) + if err != nil { + return nil, errors.Trace(err) + } + case types.KindInt64: + value, err = mysql.ParseTimeFromNum(x.GetInt64(), tp, fsp) + if err != nil { + return nil, errors.Trace(err) + } + case types.KindNull: + return nil, nil + default: + return nil, errors.Trace(errDefaultValue) + } + case *ast.FuncCallExpr: + if x.FnName.L == currentTimestampL { + return CurrentTimestamp, nil + } + return nil, errors.Trace(errDefaultValue) + case *ast.UnaryOperationExpr: + // support some expression, like `-1` + v, err := Eval(ctx, x) + if err != nil { + return nil, errors.Trace(err) + } + ft := types.NewFieldType(mysql.TypeLonglong) + xval, err := types.Convert(v, ft) + if err != nil { + return nil, errors.Trace(err) + } + + value, err = mysql.ParseTimeFromNum(xval.(int64), tp, fsp) + if err != nil { + return nil, errors.Trace(err) + } + default: + return nil, nil + } + + return value, nil +} + +// IsCurrentTimeExpr returns whether e is CurrentTimeExpr. +func IsCurrentTimeExpr(e ast.ExprNode) bool { + x, ok := e.(*ast.FuncCallExpr) + if !ok { + return false + } + return x.FnName.L == currentTimestampL +} + +func getSystemTimestamp(ctx context.Context) (time.Time, error) { + value := time.Now() + + if ctx == nil { + return value, nil + } + + // check whether use timestamp varibale + sessionVars := variable.GetSessionVars(ctx) + if v, ok := sessionVars.Systems["timestamp"]; ok { + if v != "" { + timestamp, err := strconv.ParseInt(v, 10, 64) + if err != nil { + return time.Time{}, errors.Trace(err) + } + + if timestamp <= 0 { + return value, nil + } + + return time.Unix(timestamp, 0), nil + } + } + + return value, nil +} diff --git a/vendor/github.com/pingcap/tidb/executor/adapter.go b/vendor/github.com/pingcap/tidb/executor/adapter.go new file mode 100644 index 000000000..fbc8657b5 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/executor/adapter.go @@ -0,0 +1,120 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package executor + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/optimizer/plan" +) + +// recordSet wraps an executor, implements ast.RecordSet interface +type recordSet struct { + fields []*ast.ResultField + executor Executor +} + +func (a *recordSet) Fields() ([]*ast.ResultField, error) { + return a.fields, nil +} + +func (a *recordSet) Next() (*ast.Row, error) { + row, err := a.executor.Next() + if err != nil || row == nil { + return nil, errors.Trace(err) + } + return &ast.Row{Data: row.Data}, nil +} + +func (a *recordSet) Close() error { + return a.executor.Close() +} + +type statement struct { + is infoschema.InfoSchema + plan plan.Plan +} + +func (a *statement) OriginText() string { + return "" +} + +func (a *statement) SetText(text string) { + return +} + +func (a *statement) IsDDL() bool { + return false +} + +func (a *statement) Exec(ctx context.Context) (ast.RecordSet, error) { + b := newExecutorBuilder(ctx, a.is) + e := b.build(a.plan) + if b.err != nil { + return nil, errors.Trace(b.err) + } + + if executorExec, ok := e.(*ExecuteExec); ok { + err := executorExec.Build() + if err != nil { + return nil, errors.Trace(err) + } + e = executorExec.StmtExec + } + + if len(e.Fields()) == 0 { + // No result fields means no Recordset. + defer e.Close() + for { + row, err := e.Next() + if err != nil { + return nil, errors.Trace(err) + } + if row == nil { + // It's used to insert retry. + changeInsertValueForRetry(a.plan, e) + return nil, nil + } + } + } + + fs := e.Fields() + for _, f := range fs { + if len(f.ColumnAsName.O) == 0 { + f.ColumnAsName = f.Column.Name + } + } + return &recordSet{ + executor: e, + fields: fs, + }, nil +} + +func changeInsertValueForRetry(p plan.Plan, e Executor) { + if v, ok := p.(*plan.Insert); ok { + var insertValue *InsertValues + if !v.IsReplace { + insertValue = e.(*InsertExec).InsertValues + } else { + insertValue = e.(*ReplaceExec).InsertValues + } + v.Columns = insertValue.Columns + v.Setlist = insertValue.Setlist + if len(v.Setlist) == 0 { + v.Lists = insertValue.Lists + } + } +} diff --git a/vendor/github.com/pingcap/tidb/executor/builder.go b/vendor/github.com/pingcap/tidb/executor/builder.go new file mode 100644 index 000000000..07143ff42 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/executor/builder.go @@ -0,0 +1,438 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package executor + +import ( + "math" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/column" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/optimizer/plan" + "github.com/pingcap/tidb/parser/opcode" + "github.com/pingcap/tidb/sessionctx/autocommit" + "github.com/pingcap/tidb/sessionctx/variable" + "github.com/pingcap/tidb/util/types" +) + +// executorBuilder builds an Executor from a Plan. +// The InfoSchema must be the same one used in InfoBinder. +type executorBuilder struct { + ctx context.Context + is infoschema.InfoSchema + err error +} + +func newExecutorBuilder(ctx context.Context, is infoschema.InfoSchema) *executorBuilder { + return &executorBuilder{ + ctx: ctx, + is: is, + } +} + +func (b *executorBuilder) build(p plan.Plan) Executor { + switch v := p.(type) { + case nil: + return nil + case *plan.Aggregate: + return b.buildAggregate(v) + case *plan.CheckTable: + return b.buildCheckTable(v) + case *plan.DDL: + return b.buildDDL(v) + case *plan.Deallocate: + return b.buildDeallocate(v) + case *plan.Delete: + return b.buildDelete(v) + case *plan.Distinct: + return b.buildDistinct(v) + case *plan.Execute: + return b.buildExecute(v) + case *plan.Explain: + return b.buildExplain(v) + case *plan.Filter: + src := b.build(v.Src()) + return b.buildFilter(src, v.Conditions) + case *plan.Having: + return b.buildHaving(v) + case *plan.IndexScan: + return b.buildIndexScan(v) + case *plan.Insert: + return b.buildInsert(v) + case *plan.JoinInner: + return b.buildJoinInner(v) + case *plan.JoinOuter: + return b.buildJoinOuter(v) + case *plan.Limit: + return b.buildLimit(v) + case *plan.Prepare: + return b.buildPrepare(v) + case *plan.SelectFields: + return b.buildSelectFields(v) + case *plan.SelectLock: + return b.buildSelectLock(v) + case *plan.ShowDDL: + return b.buildShowDDL(v) + case *plan.Show: + return b.buildShow(v) + case *plan.Simple: + return b.buildSimple(v) + case *plan.Sort: + return b.buildSort(v) + case *plan.TableScan: + return b.buildTableScan(v) + case *plan.Union: + return b.buildUnion(v) + case *plan.Update: + return b.buildUpdate(v) + default: + b.err = ErrUnknownPlan.Gen("Unknown Plan %T", p) + return nil + } +} + +func (b *executorBuilder) buildFilter(src Executor, conditions []ast.ExprNode) Executor { + if len(conditions) == 0 { + return src + } + return &FilterExec{ + Src: src, + Condition: b.joinConditions(conditions), + ctx: b.ctx, + } +} + +func (b *executorBuilder) buildTableScan(v *plan.TableScan) Executor { + table, _ := b.is.TableByID(v.Table.ID) + e := &TableScanExec{ + t: table, + fields: v.Fields(), + ctx: b.ctx, + ranges: v.Ranges, + seekHandle: math.MinInt64, + } + return b.buildFilter(e, v.FilterConditions) +} + +func (b *executorBuilder) buildShowDDL(v *plan.ShowDDL) Executor { + return &ShowDDLExec{ + fields: v.Fields(), + ctx: b.ctx, + } +} + +func (b *executorBuilder) buildCheckTable(v *plan.CheckTable) Executor { + return &CheckTableExec{ + tables: v.Tables, + ctx: b.ctx, + } +} + +func (b *executorBuilder) buildDeallocate(v *plan.Deallocate) Executor { + return &DeallocateExec{ + ctx: b.ctx, + Name: v.Name, + } +} + +func (b *executorBuilder) buildIndexScan(v *plan.IndexScan) Executor { + tbl, _ := b.is.TableByID(v.Table.ID) + var idx *column.IndexedCol + for _, val := range tbl.Indices() { + if val.IndexInfo.Name.L == v.Index.Name.L { + idx = val + break + } + } + e := &IndexScanExec{ + tbl: tbl, + idx: idx, + fields: v.Fields(), + ctx: b.ctx, + Desc: v.Desc, + valueTypes: make([]*types.FieldType, len(idx.Columns)), + } + + for i, ic := range idx.Columns { + col := tbl.Cols()[ic.Offset] + e.valueTypes[i] = &col.FieldType + } + + e.Ranges = make([]*IndexRangeExec, len(v.Ranges)) + for i, val := range v.Ranges { + e.Ranges[i] = b.buildIndexRange(e, val) + } + return b.buildFilter(e, v.FilterConditions) +} + +func (b *executorBuilder) buildIndexRange(scan *IndexScanExec, v *plan.IndexRange) *IndexRangeExec { + ran := &IndexRangeExec{ + scan: scan, + lowVals: v.LowVal, + lowExclude: v.LowExclude, + highVals: v.HighVal, + highExclude: v.HighExclude, + } + return ran +} + +func (b *executorBuilder) buildJoinOuter(v *plan.JoinOuter) *JoinOuterExec { + e := &JoinOuterExec{ + OuterExec: b.build(v.Outer), + InnerPlan: v.Inner, + fields: v.Fields(), + builder: b, + } + return e +} + +func (b *executorBuilder) buildJoinInner(v *plan.JoinInner) *JoinInnerExec { + e := &JoinInnerExec{ + InnerPlans: v.Inners, + innerExecs: make([]Executor, len(v.Inners)), + Condition: b.joinConditions(v.Conditions), + fields: v.Fields(), + ctx: b.ctx, + builder: b, + } + return e +} + +func (b *executorBuilder) joinConditions(conditions []ast.ExprNode) ast.ExprNode { + if len(conditions) == 0 { + return nil + } + if len(conditions) == 1 { + return conditions[0] + } + condition := &ast.BinaryOperationExpr{ + Op: opcode.AndAnd, + L: conditions[0], + R: b.joinConditions(conditions[1:]), + } + return condition +} + +func (b *executorBuilder) buildSelectLock(v *plan.SelectLock) Executor { + src := b.build(v.Src()) + if autocommit.ShouldAutocommit(b.ctx) { + // Locking of rows for update using SELECT FOR UPDATE only applies when autocommit + // is disabled (either by beginning transaction with START TRANSACTION or by setting + // autocommit to 0. If autocommit is enabled, the rows matching the specification are not locked. + // See: https://dev.mysql.com/doc/refman/5.7/en/innodb-locking-reads.html + return src + } + e := &SelectLockExec{ + Src: src, + Lock: v.Lock, + ctx: b.ctx, + } + return e +} + +func (b *executorBuilder) buildSelectFields(v *plan.SelectFields) Executor { + src := b.build(v.Src()) + e := &SelectFieldsExec{ + Src: src, + ResultFields: v.Fields(), + ctx: b.ctx, + } + return e +} + +func (b *executorBuilder) buildAggregate(v *plan.Aggregate) Executor { + src := b.build(v.Src()) + e := &AggregateExec{ + Src: src, + ResultFields: v.Fields(), + ctx: b.ctx, + AggFuncs: v.AggFuncs, + GroupByItems: v.GroupByItems, + } + return e +} + +func (b *executorBuilder) buildHaving(v *plan.Having) Executor { + src := b.build(v.Src()) + return b.buildFilter(src, v.Conditions) +} + +func (b *executorBuilder) buildSort(v *plan.Sort) Executor { + src := b.build(v.Src()) + e := &SortExec{ + Src: src, + ByItems: v.ByItems, + ctx: b.ctx, + } + return e +} + +func (b *executorBuilder) buildLimit(v *plan.Limit) Executor { + src := b.build(v.Src()) + e := &LimitExec{ + Src: src, + Offset: v.Offset, + Count: v.Count, + } + return e +} + +func (b *executorBuilder) buildUnion(v *plan.Union) Executor { + e := &UnionExec{ + fields: v.Fields(), + Sels: make([]Executor, len(v.Selects)), + } + for i, sel := range v.Selects { + selExec := b.build(sel) + e.Sels[i] = selExec + } + return e +} + +func (b *executorBuilder) buildDistinct(v *plan.Distinct) Executor { + return &DistinctExec{Src: b.build(v.Src())} +} + +func (b *executorBuilder) buildPrepare(v *plan.Prepare) Executor { + return &PrepareExec{ + Ctx: b.ctx, + IS: b.is, + Name: v.Name, + SQLText: v.SQLText, + } +} + +func (b *executorBuilder) buildExecute(v *plan.Execute) Executor { + return &ExecuteExec{ + Ctx: b.ctx, + IS: b.is, + Name: v.Name, + UsingVars: v.UsingVars, + ID: v.ID, + } +} + +func (b *executorBuilder) buildUpdate(v *plan.Update) Executor { + selExec := b.build(v.SelectPlan) + return &UpdateExec{ctx: b.ctx, SelectExec: selExec, OrderedList: v.OrderedList} +} + +func (b *executorBuilder) buildDelete(v *plan.Delete) Executor { + selExec := b.build(v.SelectPlan) + return &DeleteExec{ + ctx: b.ctx, + SelectExec: selExec, + Tables: v.Tables, + IsMultiTable: v.IsMultiTable, + } +} + +func (b *executorBuilder) buildShow(v *plan.Show) Executor { + e := &ShowExec{ + Tp: v.Tp, + DBName: model.NewCIStr(v.DBName), + Table: v.Table, + Column: v.Column, + User: v.User, + Flag: v.Flag, + Full: v.Full, + GlobalScope: v.GlobalScope, + ctx: b.ctx, + is: b.is, + fields: v.Fields(), + } + if e.Tp == ast.ShowGrants && len(e.User) == 0 { + e.User = variable.GetSessionVars(e.ctx).User + } + return e +} + +func (b *executorBuilder) buildSimple(v *plan.Simple) Executor { + switch s := v.Statement.(type) { + case *ast.GrantStmt: + return b.buildGrant(s) + } + return &SimpleExec{Statement: v.Statement, ctx: b.ctx} +} + +func (b *executorBuilder) buildInsert(v *plan.Insert) Executor { + ivs := &InsertValues{ + ctx: b.ctx, + Columns: v.Columns, + Lists: v.Lists, + Setlist: v.Setlist, + } + if v.SelectPlan != nil { + ivs.SelectExec = b.build(v.SelectPlan) + } + // Get Table + ts, ok := v.Table.TableRefs.Left.(*ast.TableSource) + if !ok { + b.err = errors.New("Can not get table") + return nil + } + tn, ok := ts.Source.(*ast.TableName) + if !ok { + b.err = errors.New("Can not get table") + return nil + } + tableInfo := tn.TableInfo + tbl, ok := b.is.TableByID(tableInfo.ID) + if !ok { + b.err = errors.Errorf("Can not get table %d", tableInfo.ID) + return nil + } + ivs.Table = tbl + if v.IsReplace { + return b.buildReplace(ivs) + } + insert := &InsertExec{ + InsertValues: ivs, + OnDuplicate: v.OnDuplicate, + Priority: v.Priority, + } + // fields is used to evaluate values expr. + insert.fields = ts.GetResultFields() + return insert +} + +func (b *executorBuilder) buildReplace(vals *InsertValues) Executor { + return &ReplaceExec{ + InsertValues: vals, + } +} + +func (b *executorBuilder) buildGrant(grant *ast.GrantStmt) Executor { + return &GrantExec{ + ctx: b.ctx, + Privs: grant.Privs, + ObjectType: grant.ObjectType, + Level: grant.Level, + Users: grant.Users, + } +} + +func (b *executorBuilder) buildDDL(v *plan.DDL) Executor { + return &DDLExec{Statement: v.Statement, ctx: b.ctx, is: b.is} +} + +func (b *executorBuilder) buildExplain(v *plan.Explain) Executor { + return &ExplainExec{ + StmtPlan: v.StmtPlan, + fields: v.Fields(), + } +} diff --git a/vendor/github.com/pingcap/tidb/executor/compiler.go b/vendor/github.com/pingcap/tidb/executor/compiler.go new file mode 100644 index 000000000..a00e2eb19 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/executor/compiler.go @@ -0,0 +1,60 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package executor + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/optimizer" + "github.com/pingcap/tidb/optimizer/plan" + "github.com/pingcap/tidb/sessionctx" +) + +// Compiler compiles an ast.StmtNode to a stmt.Statement. +type Compiler struct { +} + +// Compile compiles an ast.StmtNode to a stmt.Statement. +// If it is supported to use new plan and executer, it optimizes the node to +// a plan, and we wrap the plan in an adapter as stmt.Statement. +// If it is not supported, the node will be converted to old statement. +func (c *Compiler) Compile(ctx context.Context, node ast.StmtNode) (ast.Statement, error) { + ast.SetFlag(node) + + is := sessionctx.GetDomain(ctx).InfoSchema() + if err := optimizer.Preprocess(node, is, ctx); err != nil { + return nil, errors.Trace(err) + } + // Validate should be after NameResolve. + if err := optimizer.Validate(node, false); err != nil { + return nil, errors.Trace(err) + } + sb := NewSubQueryBuilder(is) + p, err := optimizer.Optimize(ctx, node, sb) + if err != nil { + return nil, errors.Trace(err) + } + sa := &statement{ + is: is, + plan: p, + } + return sa, nil +} + +// NewSubQueryBuilder builds and returns a new SubQuery builder. +func NewSubQueryBuilder(is infoschema.InfoSchema) plan.SubQueryBuilder { + return &subqueryBuilder{is: is} +} diff --git a/vendor/github.com/pingcap/tidb/executor/executor.go b/vendor/github.com/pingcap/tidb/executor/executor.go new file mode 100644 index 000000000..6372317ba --- /dev/null +++ b/vendor/github.com/pingcap/tidb/executor/executor.go @@ -0,0 +1,1157 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package executor + +import ( + "sort" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/column" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/evaluator" + "github.com/pingcap/tidb/inspectkv" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/optimizer/plan" + "github.com/pingcap/tidb/sessionctx" + "github.com/pingcap/tidb/sessionctx/db" + "github.com/pingcap/tidb/sessionctx/forupdate" + "github.com/pingcap/tidb/table" + "github.com/pingcap/tidb/terror" + "github.com/pingcap/tidb/util/codec" + "github.com/pingcap/tidb/util/distinct" + "github.com/pingcap/tidb/util/types" +) + +var ( + _ Executor = &AggregateExec{} + _ Executor = &CheckTableExec{} + _ Executor = &FilterExec{} + _ Executor = &IndexRangeExec{} + _ Executor = &IndexScanExec{} + _ Executor = &LimitExec{} + _ Executor = &SelectFieldsExec{} + _ Executor = &SelectLockExec{} + _ Executor = &ShowDDLExec{} + _ Executor = &SortExec{} + _ Executor = &TableScanExec{} +) + +// Error instances. +var ( + ErrUnknownPlan = terror.ClassExecutor.New(CodeUnknownPlan, "Unknown plan") + ErrPrepareMulti = terror.ClassExecutor.New(CodePrepareMulti, "Can not prepare multiple statements") + ErrStmtNotFound = terror.ClassExecutor.New(CodeStmtNotFound, "Prepared statement not found") + ErrSchemaChanged = terror.ClassExecutor.New(CodeSchemaChanged, "Schema has changed") + ErrWrongParamCount = terror.ClassExecutor.New(CodeWrongParamCount, "Wrong parameter count") +) + +// Error codes. +const ( + CodeUnknownPlan terror.ErrCode = 1 + CodePrepareMulti terror.ErrCode = 2 + CodeStmtNotFound terror.ErrCode = 3 + CodeSchemaChanged terror.ErrCode = 4 + CodeWrongParamCount terror.ErrCode = 5 +) + +// Row represents a record row. +type Row struct { + // Data is the output record data for current Plan. + Data []types.Datum + + RowKeys []*RowKeyEntry +} + +// RowKeyEntry is designed for Delete statement in multi-table mode, +// we should know which table this row comes from. +type RowKeyEntry struct { + // The table which this row come from. + Tbl table.Table + // Row key. + Handle int64 +} + +// Executor executes a query. +type Executor interface { + Fields() []*ast.ResultField + Next() (*Row, error) + Close() error +} + +// ShowDDLExec represents a show DDL executor. +type ShowDDLExec struct { + fields []*ast.ResultField + ctx context.Context + done bool +} + +// Fields implements Executor Fields interface. +func (e *ShowDDLExec) Fields() []*ast.ResultField { + return e.fields +} + +// Next implements Execution Next interface. +func (e *ShowDDLExec) Next() (*Row, error) { + if e.done { + return nil, nil + } + + txn, err := e.ctx.GetTxn(false) + if err != nil { + return nil, errors.Trace(err) + } + + ddlInfo, err := inspectkv.GetDDLInfo(txn) + if err != nil { + return nil, errors.Trace(err) + } + bgInfo, err := inspectkv.GetBgDDLInfo(txn) + if err != nil { + return nil, errors.Trace(err) + } + + var ddlOwner, ddlJob string + if ddlInfo.Owner != nil { + ddlOwner = ddlInfo.Owner.String() + } + if ddlInfo.Job != nil { + ddlJob = ddlInfo.Job.String() + } + + var bgOwner, bgJob string + if bgInfo.Owner != nil { + bgOwner = bgInfo.Owner.String() + } + if bgInfo.Job != nil { + bgJob = bgInfo.Job.String() + } + + row := &Row{} + row.Data = types.MakeDatums( + ddlInfo.SchemaVer, + ddlOwner, + ddlJob, + bgInfo.SchemaVer, + bgOwner, + bgJob, + ) + for i, f := range e.fields { + f.Expr.SetValue(row.Data[i].GetValue()) + } + e.done = true + + return row, nil +} + +// Close implements Executor Close interface. +func (e *ShowDDLExec) Close() error { + return nil +} + +// CheckTableExec represents a check table executor. +type CheckTableExec struct { + tables []*ast.TableName + ctx context.Context + done bool +} + +// Fields implements Executor Fields interface. +func (e *CheckTableExec) Fields() []*ast.ResultField { + return nil +} + +// Next implements Execution Next interface. +func (e *CheckTableExec) Next() (*Row, error) { + if e.done { + return nil, nil + } + + dbName := model.NewCIStr(db.GetCurrentSchema(e.ctx)) + is := sessionctx.GetDomain(e.ctx).InfoSchema() + + for _, t := range e.tables { + tb, err := is.TableByName(dbName, t.Name) + if err != nil { + return nil, errors.Trace(err) + } + for _, idx := range tb.Indices() { + txn, err := e.ctx.GetTxn(false) + if err != nil { + return nil, errors.Trace(err) + } + err = inspectkv.CompareIndexData(txn, tb, idx) + if err != nil { + return nil, errors.Errorf("%v err:%v", t.Name, err) + } + } + } + e.done = true + + return nil, nil +} + +// Close implements plan.Plan Close interface. +func (e *CheckTableExec) Close() error { + return nil +} + +// TableScanExec represents a table scan executor. +type TableScanExec struct { + t table.Table + fields []*ast.ResultField + iter kv.Iterator + ctx context.Context + ranges []plan.TableRange // Disjoint close handle ranges. + seekHandle int64 // The handle to seek, should be initialized to math.MinInt64. + cursor int // The range cursor, used to locate to current range. +} + +// Fields implements Executor Fields interface. +func (e *TableScanExec) Fields() []*ast.ResultField { + return e.fields +} + +// Next implements Execution Next interface. +func (e *TableScanExec) Next() (*Row, error) { + for { + if e.cursor >= len(e.ranges) { + return nil, nil + } + ran := e.ranges[e.cursor] + if e.seekHandle < ran.LowVal { + e.seekHandle = ran.LowVal + } + if e.seekHandle > ran.HighVal { + e.cursor++ + continue + } + handle, found, err := e.t.Seek(e.ctx, e.seekHandle) + if err != nil { + return nil, errors.Trace(err) + } + if !found { + return nil, nil + } + if handle > ran.HighVal { + // The handle is out of the current range, but may be in following ranges. + // We seek to the range that may contains the handle, so we + // don't need to seek key again. + inRange := e.seekRange(handle) + if !inRange { + // The handle may be less than the current range low value, can not + // return directly. + continue + } + } + row, err := e.getRow(handle) + if err != nil { + return nil, errors.Trace(err) + } + e.seekHandle = handle + 1 + return row, nil + } +} + +// seekRange increments the range cursor to the range +// with high value greater or equal to handle. +func (e *TableScanExec) seekRange(handle int64) (inRange bool) { + for { + e.cursor++ + if e.cursor >= len(e.ranges) { + return false + } + ran := e.ranges[e.cursor] + if handle < ran.LowVal { + return false + } + if handle > ran.HighVal { + continue + } + return true + } +} + +func (e *TableScanExec) getRow(handle int64) (*Row, error) { + row := &Row{} + var err error + row.Data, err = e.t.Row(e.ctx, handle) + if err != nil { + return nil, errors.Trace(err) + } + // Set result fields value. + for i, v := range e.fields { + v.Expr.SetValue(row.Data[i].GetValue()) + } + + // Put rowKey to the tail of record row + rke := &RowKeyEntry{ + Tbl: e.t, + Handle: handle, + } + row.RowKeys = append(row.RowKeys, rke) + return row, nil +} + +// Close implements Executor Close interface. +func (e *TableScanExec) Close() error { + if e.iter != nil { + e.iter.Close() + e.iter = nil + } + return nil +} + +// IndexRangeExec represents an index range scan executor. +type IndexRangeExec struct { + scan *IndexScanExec + + // seekVal is different from lowVal, it is casted from lowVal and + // must be less than or equal to lowVal, used to seek the index. + lowVals []types.Datum + lowExclude bool + highVals []types.Datum + highExclude bool + + iter kv.IndexIterator + skipLowCmp bool + finished bool +} + +// Fields implements Executor Fields interface. +func (e *IndexRangeExec) Fields() []*ast.ResultField { + return e.scan.fields +} + +// Next implements Executor Next interface. +func (e *IndexRangeExec) Next() (*Row, error) { + if e.iter == nil { + seekVals := make([]types.Datum, len(e.scan.idx.Columns)) + for i := 0; i < len(e.lowVals); i++ { + if e.lowVals[i].Kind() == types.KindMinNotNull { + seekVals[i].SetBytes([]byte{}) + } else { + val, err := e.lowVals[i].ConvertTo(e.scan.valueTypes[i]) + seekVals[i] = val + if err != nil { + return nil, errors.Trace(err) + } + } + } + txn, err := e.scan.ctx.GetTxn(false) + if err != nil { + return nil, errors.Trace(err) + } + e.iter, _, err = e.scan.idx.X.Seek(txn, seekVals) + if err != nil { + return nil, types.EOFAsNil(err) + } + } + + for { + if e.finished { + return nil, nil + } + idxKey, h, err := e.iter.Next() + if err != nil { + return nil, types.EOFAsNil(err) + } + if !e.skipLowCmp { + var cmp int + cmp, err = indexCompare(idxKey, e.lowVals) + if err != nil { + return nil, errors.Trace(err) + } + if cmp < 0 || (cmp == 0 && e.lowExclude) { + continue + } + e.skipLowCmp = true + } + cmp, err := indexCompare(idxKey, e.highVals) + if err != nil { + return nil, errors.Trace(err) + } + if cmp > 0 || (cmp == 0 && e.highExclude) { + // This span has finished iteration. + e.finished = true + continue + } + var row *Row + row, err = e.lookupRow(h) + if err != nil { + return nil, errors.Trace(err) + } + return row, nil + } +} + +// indexCompare compares multi column index. +// The length of boundVals may be less than idxKey. +func indexCompare(idxKey []types.Datum, boundVals []types.Datum) (int, error) { + for i := 0; i < len(boundVals); i++ { + cmp, err := idxKey[i].CompareDatum(boundVals[i]) + if err != nil { + return -1, errors.Trace(err) + } + if cmp != 0 { + return cmp, nil + } + } + return 0, nil +} + +func (e *IndexRangeExec) lookupRow(h int64) (*Row, error) { + row := &Row{} + var err error + row.Data, err = e.scan.tbl.Row(e.scan.ctx, h) + if err != nil { + return nil, errors.Trace(err) + } + rowKey := &RowKeyEntry{ + Tbl: e.scan.tbl, + Handle: h, + } + row.RowKeys = append(row.RowKeys, rowKey) + return row, nil +} + +// Close implements Executor Close interface. +func (e *IndexRangeExec) Close() error { + if e.iter != nil { + e.iter.Close() + e.iter = nil + } + e.finished = false + e.skipLowCmp = false + return nil +} + +// IndexScanExec represents an index scan executor. +type IndexScanExec struct { + tbl table.Table + idx *column.IndexedCol + fields []*ast.ResultField + Ranges []*IndexRangeExec + Desc bool + rangeIdx int + ctx context.Context + valueTypes []*types.FieldType +} + +// Fields implements Executor Fields interface. +func (e *IndexScanExec) Fields() []*ast.ResultField { + return e.fields +} + +// Next implements Executor Next interface. +func (e *IndexScanExec) Next() (*Row, error) { + for e.rangeIdx < len(e.Ranges) { + ran := e.Ranges[e.rangeIdx] + row, err := ran.Next() + if err != nil { + return nil, errors.Trace(err) + } + if row != nil { + for i, val := range row.Data { + e.fields[i].Expr.SetValue(val.GetValue()) + } + return row, nil + } + ran.Close() + e.rangeIdx++ + } + return nil, nil +} + +// Close implements Executor Close interface. +func (e *IndexScanExec) Close() error { + for e.rangeIdx < len(e.Ranges) { + e.Ranges[e.rangeIdx].Close() + e.rangeIdx++ + } + return nil +} + +// JoinOuterExec represents an outer join executor. +type JoinOuterExec struct { + OuterExec Executor + InnerPlan plan.Plan + innerExec Executor + fields []*ast.ResultField + builder *executorBuilder + gotRow bool +} + +// Fields implements Executor Fields interface. +func (e *JoinOuterExec) Fields() []*ast.ResultField { + return e.fields +} + +// Next implements Executor Next interface. +// The data in the returned row is not used by caller. +// If inner executor didn't get any row for an outer executor row, +// a row with 0 len Data indicates there is no inner row matched for +// an outer row. +func (e *JoinOuterExec) Next() (*Row, error) { + var rowKeys []*RowKeyEntry + for { + if e.innerExec == nil { + e.gotRow = false + outerRow, err := e.OuterExec.Next() + if err != nil { + return nil, errors.Trace(err) + } + if outerRow == nil { + return nil, nil + } + rowKeys = outerRow.RowKeys + plan.Refine(e.InnerPlan) + e.innerExec = e.builder.build(e.InnerPlan) + if e.builder.err != nil { + return nil, errors.Trace(e.builder.err) + } + } + row, err := e.innerExec.Next() + if err != nil { + return nil, errors.Trace(err) + } + if row == nil { + e.innerExec.Close() + e.innerExec = nil + if e.gotRow { + continue + } + e.setInnerNull() + return &Row{RowKeys: rowKeys}, nil + } + if len(row.Data) != 0 { + e.gotRow = true + row.RowKeys = append(rowKeys, row.RowKeys...) + return row, nil + } + } +} + +func (e *JoinOuterExec) setInnerNull() { + for _, rf := range e.InnerPlan.Fields() { + rf.Expr.SetValue(nil) + } +} + +// Close implements Executor Close interface. +func (e *JoinOuterExec) Close() error { + err := e.OuterExec.Close() + if e.innerExec != nil { + return errors.Trace(e.innerExec.Close()) + } + return errors.Trace(err) +} + +// JoinInnerExec represents an inner join executor. +type JoinInnerExec struct { + InnerPlans []plan.Plan + innerExecs []Executor + Condition ast.ExprNode + ctx context.Context + fields []*ast.ResultField + builder *executorBuilder + done bool + cursor int +} + +// Fields implements Executor Fields interface. +func (e *JoinInnerExec) Fields() []*ast.ResultField { + return e.fields +} + +// Next implements Executor Next interface. +// The data in the returned row is not used by caller. +func (e *JoinInnerExec) Next() (*Row, error) { + if e.done { + return nil, nil + } + rowKeysSlice := make([][]*RowKeyEntry, len(e.InnerPlans)) + for { + exec := e.innerExecs[e.cursor] + if exec == nil { + innerPlan := e.InnerPlans[e.cursor] + plan.Refine(innerPlan) + exec = e.builder.build(innerPlan) + if e.builder.err != nil { + return nil, errors.Trace(e.builder.err) + } + e.innerExecs[e.cursor] = exec + } + row, err := exec.Next() + if err != nil { + return nil, errors.Trace(err) + } + if row == nil { + exec.Close() + e.innerExecs[e.cursor] = nil + if e.cursor == 0 { + e.done = true + return nil, nil + } + e.cursor-- + continue + } + rowKeysSlice[e.cursor] = row.RowKeys + if e.cursor < len(e.innerExecs)-1 { + e.cursor++ + continue + } + var match = true + if e.Condition != nil { + match, err = evaluator.EvalBool(e.ctx, e.Condition) + if err != nil { + return nil, errors.Trace(err) + } + } + if match { + row.RowKeys = joinRowKeys(rowKeysSlice) + return row, nil + } + } +} + +func joinRowKeys(rowKeysSlice [][]*RowKeyEntry) []*RowKeyEntry { + count := 0 + for _, rowKeys := range rowKeysSlice { + count += len(rowKeys) + } + joined := make([]*RowKeyEntry, count) + offset := 0 + for _, rowKeys := range rowKeysSlice { + copy(joined[offset:], rowKeys) + offset += len(rowKeys) + } + return joined +} + +// Close implements Executor Close interface. +func (e *JoinInnerExec) Close() error { + var err error + for _, inExec := range e.innerExecs { + if inExec != nil { + e := inExec.Close() + if e != nil { + err = errors.Trace(e) + } + } + } + return err +} + +// SelectFieldsExec represents a select fields executor. +type SelectFieldsExec struct { + Src Executor + ResultFields []*ast.ResultField + executed bool + ctx context.Context +} + +// Fields implements Executor Fields interface. +func (e *SelectFieldsExec) Fields() []*ast.ResultField { + return e.ResultFields +} + +// Next implements Executor Next interface. +func (e *SelectFieldsExec) Next() (*Row, error) { + var rowKeys []*RowKeyEntry + if e.Src != nil { + srcRow, err := e.Src.Next() + if err != nil { + return nil, errors.Trace(err) + } + if srcRow == nil { + return nil, nil + } + rowKeys = srcRow.RowKeys + } else { + // If Src is nil, only one row should be returned. + if e.executed { + return nil, nil + } + } + e.executed = true + row := &Row{ + RowKeys: rowKeys, + Data: make([]types.Datum, len(e.ResultFields)), + } + for i, field := range e.ResultFields { + val, err := evaluator.Eval(e.ctx, field.Expr) + if err != nil { + return nil, errors.Trace(err) + } + row.Data[i] = types.NewDatum(val) + } + return row, nil +} + +// Close implements Executor Close interface. +func (e *SelectFieldsExec) Close() error { + if e.Src != nil { + return e.Src.Close() + } + return nil +} + +// FilterExec represents a filter executor. +type FilterExec struct { + Src Executor + Condition ast.ExprNode + ctx context.Context +} + +// Fields implements Executor Fields interface. +func (e *FilterExec) Fields() []*ast.ResultField { + return e.Src.Fields() +} + +// Next implements Executor Next interface. +func (e *FilterExec) Next() (*Row, error) { + for { + srcRow, err := e.Src.Next() + if err != nil { + return nil, errors.Trace(err) + } + if srcRow == nil { + return nil, nil + } + match, err := evaluator.EvalBool(e.ctx, e.Condition) + if err != nil { + return nil, errors.Trace(err) + } + if match { + return srcRow, nil + } + } +} + +// Close implements Executor Close interface. +func (e *FilterExec) Close() error { + return e.Src.Close() +} + +// SelectLockExec represents a select lock executor. +type SelectLockExec struct { + Src Executor + Lock ast.SelectLockType + ctx context.Context +} + +// Fields implements Executor Fields interface. +func (e *SelectLockExec) Fields() []*ast.ResultField { + return e.Src.Fields() +} + +// Next implements Executor Next interface. +func (e *SelectLockExec) Next() (*Row, error) { + row, err := e.Src.Next() + if err != nil { + return nil, errors.Trace(err) + } + if row == nil { + return nil, nil + } + if len(row.RowKeys) != 0 && e.Lock == ast.SelectLockForUpdate { + forupdate.SetForUpdate(e.ctx) + for _, k := range row.RowKeys { + err = k.Tbl.LockRow(e.ctx, k.Handle, true) + if err != nil { + return nil, errors.Trace(err) + } + } + } + return row, nil +} + +// Close implements Executor Close interface. +func (e *SelectLockExec) Close() error { + return e.Src.Close() +} + +// LimitExec represents limit executor +type LimitExec struct { + Src Executor + Offset uint64 + Count uint64 + Idx uint64 +} + +// Fields implements Executor Fields interface. +func (e *LimitExec) Fields() []*ast.ResultField { + return e.Src.Fields() +} + +// Next implements Executor Next interface. +func (e *LimitExec) Next() (*Row, error) { + for e.Idx < e.Offset { + srcRow, err := e.Src.Next() + if err != nil { + return nil, errors.Trace(err) + } + if srcRow == nil { + return nil, nil + } + e.Idx++ + } + // Negative Limit means no limit. + if e.Count >= 0 && e.Idx >= e.Offset+e.Count { + return nil, nil + } + srcRow, err := e.Src.Next() + if err != nil { + return nil, errors.Trace(err) + } + if srcRow == nil { + return nil, nil + } + e.Idx++ + return srcRow, nil +} + +// Close implements Executor Close interface. +func (e *LimitExec) Close() error { + return e.Src.Close() +} + +// orderByRow binds a row to its order values, so it can be sorted. +type orderByRow struct { + key []interface{} + row *Row +} + +// SortExec represents sorting executor. +type SortExec struct { + Src Executor + ByItems []*ast.ByItem + Rows []*orderByRow + ctx context.Context + Idx int + fetched bool + err error +} + +// Fields implements Executor Fields interface. +func (e *SortExec) Fields() []*ast.ResultField { + return e.Src.Fields() +} + +// Len returns the number of rows. +func (e *SortExec) Len() int { + return len(e.Rows) +} + +// Swap implements sort.Interface Swap interface. +func (e *SortExec) Swap(i, j int) { + e.Rows[i], e.Rows[j] = e.Rows[j], e.Rows[i] +} + +// Less implements sort.Interface Less interface. +func (e *SortExec) Less(i, j int) bool { + for index, by := range e.ByItems { + v1 := e.Rows[i].key[index] + v2 := e.Rows[j].key[index] + + ret, err := types.Compare(v1, v2) + if err != nil { + e.err = err + return true + } + + if by.Desc { + ret = -ret + } + + if ret < 0 { + return true + } else if ret > 0 { + return false + } + } + + return false +} + +// Next implements Executor Next interface. +func (e *SortExec) Next() (*Row, error) { + if !e.fetched { + for { + srcRow, err := e.Src.Next() + if err != nil { + return nil, errors.Trace(err) + } + if srcRow == nil { + break + } + orderRow := &orderByRow{ + row: srcRow, + key: make([]interface{}, len(e.ByItems)), + } + for i, byItem := range e.ByItems { + orderRow.key[i], err = evaluator.Eval(e.ctx, byItem.Expr) + if err != nil { + return nil, errors.Trace(err) + } + } + e.Rows = append(e.Rows, orderRow) + } + sort.Sort(e) + e.fetched = true + } + if e.err != nil { + return nil, errors.Trace(e.err) + } + if e.Idx >= len(e.Rows) { + return nil, nil + } + row := e.Rows[e.Idx].row + e.Idx++ + return row, nil +} + +// Close implements Executor Close interface. +func (e *SortExec) Close() error { + return e.Src.Close() +} + +// For select stmt with aggregate function but without groupby clasue, +// We consider there is a single group with key singleGroup. +const singleGroup = "SingleGroup" + +// AggregateExec deals with all the aggregate functions. +// It is built from Aggregate Plan. When Next() is called, it reads all the data from Src and updates all the items in AggFuncs. +// TODO: Support having. +type AggregateExec struct { + Src Executor + ResultFields []*ast.ResultField + executed bool + ctx context.Context + finish bool + AggFuncs []*ast.AggregateFuncExpr + groupMap map[string]bool + groups []string + currentGroupIndex int + GroupByItems []*ast.ByItem +} + +// Fields implements Executor Fields interface. +func (e *AggregateExec) Fields() []*ast.ResultField { + return e.ResultFields +} + +// Next implements Executor Next interface. +func (e *AggregateExec) Next() (*Row, error) { + // In this stage we consider all data from src as a single group. + if !e.executed { + e.groupMap = make(map[string]bool) + e.groups = []string{} + for { + hasMore, err := e.innerNext() + if err != nil { + return nil, errors.Trace(err) + } + if !hasMore { + break + } + } + e.executed = true + if (len(e.groups) == 0) && (len(e.GroupByItems) == 0) { + // If no groupby and no data, we should add an empty group. + // For example: + // "select count(c) from t;" should return one row [0] + // "select count(c) from t group by c1;" should return empty result set. + e.groups = append(e.groups, singleGroup) + } + } + if e.currentGroupIndex >= len(e.groups) { + return nil, nil + } + groupKey := e.groups[e.currentGroupIndex] + for _, af := range e.AggFuncs { + af.CurrentGroup = groupKey + } + e.currentGroupIndex++ + return &Row{}, nil +} + +func (e *AggregateExec) getGroupKey() (string, error) { + if len(e.GroupByItems) == 0 { + return singleGroup, nil + } + vals := make([]types.Datum, 0, len(e.GroupByItems)) + for _, item := range e.GroupByItems { + v, err := evaluator.Eval(e.ctx, item.Expr) + if err != nil { + return "", errors.Trace(err) + } + vals = append(vals, types.NewDatum(v)) + } + bs, err := codec.EncodeValue([]byte{}, vals...) + if err != nil { + return "", errors.Trace(err) + } + return string(bs), nil +} + +// Fetch a single row from src and update each aggregate function. +// If the first return value is false, it means there is no more data from src. +func (e *AggregateExec) innerNext() (bool, error) { + if e.Src != nil { + srcRow, err := e.Src.Next() + if err != nil { + return false, errors.Trace(err) + } + if srcRow == nil { + return false, nil + } + } else { + // If Src is nil, only one row should be returned. + if e.executed { + return false, nil + } + } + e.executed = true + groupKey, err := e.getGroupKey() + if err != nil { + return false, errors.Trace(err) + } + if _, ok := e.groupMap[groupKey]; !ok { + e.groupMap[groupKey] = true + e.groups = append(e.groups, groupKey) + } + for _, af := range e.AggFuncs { + for _, arg := range af.Args { + _, err := evaluator.Eval(e.ctx, arg) + if err != nil { + return false, errors.Trace(err) + } + } + af.CurrentGroup = groupKey + af.Update() + } + return true, nil +} + +// Close implements Executor Close interface. +func (e *AggregateExec) Close() error { + for _, af := range e.AggFuncs { + af.Clear() + } + if e.Src != nil { + return e.Src.Close() + } + return nil +} + +// UnionExec represents union executor. +type UnionExec struct { + fields []*ast.ResultField + Sels []Executor + cursor int +} + +// Fields implements Executor Fields interface. +func (e *UnionExec) Fields() []*ast.ResultField { + return e.fields +} + +// Next implements Executor Next interface. +func (e *UnionExec) Next() (*Row, error) { + for { + if e.cursor >= len(e.Sels) { + return nil, nil + } + sel := e.Sels[e.cursor] + row, err := sel.Next() + if err != nil { + return nil, errors.Trace(err) + } + if row == nil { + e.cursor++ + continue + } + if e.cursor != 0 { + for i := range row.Data { + // The column value should be casted as the same type of the first select statement in corresponding position + rf := e.fields[i] + var val types.Datum + val, err = row.Data[i].ConvertTo(&rf.Column.FieldType) + if err != nil { + return nil, errors.Trace(err) + } + row.Data[i] = val + } + } + for i, v := range row.Data { + e.fields[i].Expr.SetValue(v.GetValue()) + } + return row, nil + } +} + +// Close implements Executor Close interface. +func (e *UnionExec) Close() error { + var err error + for _, sel := range e.Sels { + er := sel.Close() + if er != nil { + err = errors.Trace(er) + } + } + return err +} + +// DistinctExec represents Distinct executor. +type DistinctExec struct { + Src Executor + checker *distinct.Checker +} + +// Fields implements Executor Fields interface. +func (e *DistinctExec) Fields() []*ast.ResultField { + return e.Src.Fields() +} + +// Next implements Executor Next interface. +func (e *DistinctExec) Next() (*Row, error) { + if e.checker == nil { + e.checker = distinct.CreateDistinctChecker() + } + for { + row, err := e.Src.Next() + if err != nil { + return nil, errors.Trace(err) + } + if row == nil { + return nil, nil + } + ok, err := e.checker.Check(types.DatumsToInterfaces(row.Data)) + if err != nil { + return nil, errors.Trace(err) + } + if !ok { + continue + } + return row, nil + } +} + +// Close implements Executor Close interface. +func (e *DistinctExec) Close() error { + return e.Src.Close() +} diff --git a/vendor/github.com/pingcap/tidb/executor/executor_ddl.go b/vendor/github.com/pingcap/tidb/executor/executor_ddl.go new file mode 100644 index 000000000..710193f93 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/executor/executor_ddl.go @@ -0,0 +1,205 @@ +// Copyright 2016 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package executor + +import ( + "strings" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/privilege" + "github.com/pingcap/tidb/sessionctx" + "github.com/pingcap/tidb/terror" +) + +// DDLExec represents a DDL executor. +type DDLExec struct { + Statement ast.StmtNode + ctx context.Context + is infoschema.InfoSchema + done bool +} + +// Fields implements Executor Fields interface. +func (e *DDLExec) Fields() []*ast.ResultField { + return nil +} + +// Next implements Execution Next interface. +func (e *DDLExec) Next() (*Row, error) { + if e.done { + return nil, nil + } + var err error + switch x := e.Statement.(type) { + case *ast.TruncateTableStmt: + err = e.executeTruncateTable(x) + case *ast.CreateDatabaseStmt: + err = e.executeCreateDatabase(x) + case *ast.CreateTableStmt: + err = e.executeCreateTable(x) + case *ast.CreateIndexStmt: + err = e.executeCreateIndex(x) + case *ast.DropDatabaseStmt: + err = e.executeDropDatabase(x) + case *ast.DropTableStmt: + err = e.executeDropTable(x) + case *ast.DropIndexStmt: + err = e.executeDropIndex(x) + case *ast.AlterTableStmt: + err = e.executeAlterTable(x) + } + if err != nil { + return nil, errors.Trace(err) + } + e.done = true + return nil, nil +} + +// Close implements Executor Close interface. +func (e *DDLExec) Close() error { + return nil +} + +func (e *DDLExec) executeTruncateTable(s *ast.TruncateTableStmt) error { + table, ok := e.is.TableByID(s.Table.TableInfo.ID) + if !ok { + return errors.New("table not found, should never happen") + } + return table.Truncate(e.ctx) +} + +func (e *DDLExec) executeCreateDatabase(s *ast.CreateDatabaseStmt) error { + var opt *ast.CharsetOpt + if len(s.Options) != 0 { + opt = &ast.CharsetOpt{} + for _, val := range s.Options { + switch val.Tp { + case ast.DatabaseOptionCharset: + opt.Chs = val.Value + case ast.DatabaseOptionCollate: + opt.Col = val.Value + } + } + } + err := sessionctx.GetDomain(e.ctx).DDL().CreateSchema(e.ctx, model.NewCIStr(s.Name), opt) + if err != nil { + if terror.ErrorEqual(err, infoschema.DatabaseExists) && s.IfNotExists { + err = nil + } + } + return errors.Trace(err) +} + +func (e *DDLExec) executeCreateTable(s *ast.CreateTableStmt) error { + ident := ast.Ident{Schema: s.Table.Schema, Name: s.Table.Name} + err := sessionctx.GetDomain(e.ctx).DDL().CreateTable(e.ctx, ident, s.Cols, s.Constraints, s.Options) + if terror.ErrorEqual(err, infoschema.TableExists) { + if s.IfNotExists { + return nil + } + return infoschema.TableExists.Gen("CREATE TABLE: table exists %s", ident) + } + return errors.Trace(err) +} + +func (e *DDLExec) executeCreateIndex(s *ast.CreateIndexStmt) error { + ident := ast.Ident{Schema: s.Table.Schema, Name: s.Table.Name} + err := sessionctx.GetDomain(e.ctx).DDL().CreateIndex(e.ctx, ident, s.Unique, model.NewCIStr(s.IndexName), s.IndexColNames) + return errors.Trace(err) +} + +func (e *DDLExec) executeDropDatabase(s *ast.DropDatabaseStmt) error { + err := sessionctx.GetDomain(e.ctx).DDL().DropSchema(e.ctx, model.NewCIStr(s.Name)) + if terror.ErrorEqual(err, infoschema.DatabaseNotExists) { + if s.IfExists { + err = nil + } else { + err = infoschema.DatabaseDropExists.Gen("Can't drop database '%s'; database doesn't exist", s.Name) + } + } + return errors.Trace(err) +} + +func (e *DDLExec) executeDropTable(s *ast.DropTableStmt) error { + var notExistTables []string + for _, tn := range s.Tables { + fullti := ast.Ident{Schema: tn.Schema, Name: tn.Name} + schema, ok := e.is.SchemaByName(tn.Schema) + if !ok { + // TODO: we should return special error for table not exist, checking "not exist" is not enough, + // because some other errors may contain this error string too. + notExistTables = append(notExistTables, fullti.String()) + continue + } + tb, err := e.is.TableByName(tn.Schema, tn.Name) + if err != nil && strings.HasSuffix(err.Error(), "not exist") { + notExistTables = append(notExistTables, fullti.String()) + continue + } else if err != nil { + return errors.Trace(err) + } + // Check Privilege + privChecker := privilege.GetPrivilegeChecker(e.ctx) + hasPriv, err := privChecker.Check(e.ctx, schema, tb.Meta(), mysql.DropPriv) + if err != nil { + return errors.Trace(err) + } + if !hasPriv { + return errors.Errorf("You do not have the privilege to drop table %s.%s.", tn.Schema, tn.Name) + } + + err = sessionctx.GetDomain(e.ctx).DDL().DropTable(e.ctx, fullti) + if infoschema.DatabaseNotExists.Equal(err) || infoschema.TableNotExists.Equal(err) { + notExistTables = append(notExistTables, fullti.String()) + } else if err != nil { + return errors.Trace(err) + } + } + if len(notExistTables) > 0 && !s.IfExists { + return infoschema.TableDropExists.Gen("DROP TABLE: table %s does not exist", strings.Join(notExistTables, ",")) + } + return nil +} + +func (e *DDLExec) executeDropIndex(s *ast.DropIndexStmt) error { + ti := ast.Ident{Schema: s.Table.Schema, Name: s.Table.Name} + err := sessionctx.GetDomain(e.ctx).DDL().DropIndex(e.ctx, ti, model.NewCIStr(s.IndexName)) + if (infoschema.DatabaseNotExists.Equal(err) || infoschema.TableNotExists.Equal(err)) && s.IfExists { + err = nil + } + return errors.Trace(err) +} + +func (e *DDLExec) executeAlterTable(s *ast.AlterTableStmt) error { + ti := ast.Ident{Schema: s.Table.Schema, Name: s.Table.Name} + err := sessionctx.GetDomain(e.ctx).DDL().AlterTable(e.ctx, ti, s.Specs) + return errors.Trace(err) +} + +func joinColumnName(columnName *ast.ColumnName) string { + var originStrs []string + if columnName.Schema.O != "" { + originStrs = append(originStrs, columnName.Schema.O) + } + if columnName.Table.O != "" { + originStrs = append(originStrs, columnName.Table.O) + } + originStrs = append(originStrs, columnName.Name.O) + return strings.Join(originStrs, ".") +} diff --git a/vendor/github.com/pingcap/tidb/executor/executor_simple.go b/vendor/github.com/pingcap/tidb/executor/executor_simple.go new file mode 100644 index 000000000..b5d35e37a --- /dev/null +++ b/vendor/github.com/pingcap/tidb/executor/executor_simple.go @@ -0,0 +1,279 @@ +// Copyright 2016 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package executor + +import ( + "fmt" + "strings" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/evaluator" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/sessionctx" + "github.com/pingcap/tidb/sessionctx/db" + "github.com/pingcap/tidb/sessionctx/variable" + "github.com/pingcap/tidb/util" + "github.com/pingcap/tidb/util/charset" + "github.com/pingcap/tidb/util/sqlexec" + "github.com/pingcap/tidb/util/types" +) + +// SimpleExec represents simple statement executor. +// For statements do simple execution. +// includes `UseStmt`, 'SetStmt`, `SetCharsetStmt`. +// `DoStmt`, `BeginStmt`, `CommitStmt`, `RollbackStmt`. +// TODO: list all simple statements. +type SimpleExec struct { + Statement ast.StmtNode + ctx context.Context + done bool +} + +// Fields implements Executor Fields interface. +func (e *SimpleExec) Fields() []*ast.ResultField { + return nil +} + +// Next implements Execution Next interface. +func (e *SimpleExec) Next() (*Row, error) { + if e.done { + return nil, nil + } + var err error + switch x := e.Statement.(type) { + case *ast.UseStmt: + err = e.executeUse(x) + case *ast.SetStmt: + err = e.executeSet(x) + case *ast.SetCharsetStmt: + err = e.executeSetCharset(x) + case *ast.DoStmt: + err = e.executeDo(x) + case *ast.BeginStmt: + err = e.executeBegin(x) + case *ast.CommitStmt: + err = e.executeCommit(x) + case *ast.RollbackStmt: + err = e.executeRollback(x) + case *ast.CreateUserStmt: + err = e.executeCreateUser(x) + case *ast.SetPwdStmt: + err = e.executeSetPwd(x) + } + if err != nil { + return nil, errors.Trace(err) + } + e.done = true + return nil, nil +} + +// Close implements Executor Close interface. +func (e *SimpleExec) Close() error { + return nil +} + +func (e *SimpleExec) executeUse(s *ast.UseStmt) error { + dbname := model.NewCIStr(s.DBName) + dbinfo, exists := sessionctx.GetDomain(e.ctx).InfoSchema().SchemaByName(dbname) + if !exists { + return infoschema.DatabaseNotExists.Gen("database %s not exists", dbname) + } + db.BindCurrentSchema(e.ctx, dbname.O) + // character_set_database is the character set used by the default database. + // The server sets this variable whenever the default database changes. + // See: http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_character_set_database + sessionVars := variable.GetSessionVars(e.ctx) + sessionVars.Systems[variable.CharsetDatabase] = dbinfo.Charset + sessionVars.Systems[variable.CollationDatabase] = dbinfo.Collate + return nil +} + +func (e *SimpleExec) executeSet(s *ast.SetStmt) error { + sessionVars := variable.GetSessionVars(e.ctx) + globalVars := variable.GetGlobalVarAccessor(e.ctx) + for _, v := range s.Variables { + // Variable is case insensitive, we use lower case. + name := strings.ToLower(v.Name) + if !v.IsSystem { + // User variable. + value, err := evaluator.Eval(e.ctx, v.Value) + if err != nil { + return errors.Trace(err) + } + + if value == nil { + delete(sessionVars.Users, name) + } else { + sessionVars.Users[name] = fmt.Sprintf("%v", value) + } + return nil + } + sysVar := variable.GetSysVar(name) + if sysVar == nil { + return variable.UnknownSystemVar.Gen("Unknown system variable '%s'", name) + } + if sysVar.Scope == variable.ScopeNone { + return errors.Errorf("Variable '%s' is a read only variable", name) + } + if v.IsGlobal { + if sysVar.Scope&variable.ScopeGlobal > 0 { + value, err := evaluator.Eval(e.ctx, v.Value) + if err != nil { + return errors.Trace(err) + } + if value == nil { + value = "" + } + svalue, err := types.ToString(value) + if err != nil { + return errors.Trace(err) + } + err = globalVars.SetGlobalSysVar(e.ctx, name, svalue) + return errors.Trace(err) + } + return errors.Errorf("Variable '%s' is a SESSION variable and can't be used with SET GLOBAL", name) + } + if sysVar.Scope&variable.ScopeSession > 0 { + if value, err := evaluator.Eval(e.ctx, v.Value); err != nil { + return errors.Trace(err) + } else if value == nil { + sessionVars.Systems[name] = "" + } else { + sessionVars.Systems[name] = fmt.Sprintf("%v", value) + } + return nil + } + return errors.Errorf("Variable '%s' is a GLOBAL variable and should be set with SET GLOBAL", name) + } + return nil +} + +func (e *SimpleExec) executeSetCharset(s *ast.SetCharsetStmt) error { + collation := s.Collate + if len(collation) == 0 { + var err error + collation, err = charset.GetDefaultCollation(s.Charset) + if err != nil { + return errors.Trace(err) + } + } + sessionVars := variable.GetSessionVars(e.ctx) + for _, v := range variable.SetNamesVariables { + sessionVars.Systems[v] = s.Charset + } + sessionVars.Systems[variable.CollationConnection] = collation + return nil +} + +func (e *SimpleExec) executeDo(s *ast.DoStmt) error { + for _, expr := range s.Exprs { + _, err := evaluator.Eval(e.ctx, expr) + if err != nil { + return errors.Trace(err) + } + } + return nil +} + +func (e *SimpleExec) executeBegin(s *ast.BeginStmt) error { + _, err := e.ctx.GetTxn(true) + if err != nil { + return errors.Trace(err) + } + // With START TRANSACTION, autocommit remains disabled until you end + // the transaction with COMMIT or ROLLBACK. The autocommit mode then + // reverts to its previous state. + variable.GetSessionVars(e.ctx).SetStatusFlag(mysql.ServerStatusInTrans, true) + return nil +} + +func (e *SimpleExec) executeCommit(s *ast.CommitStmt) error { + err := e.ctx.FinishTxn(false) + variable.GetSessionVars(e.ctx).SetStatusFlag(mysql.ServerStatusInTrans, false) + return errors.Trace(err) +} + +func (e *SimpleExec) executeRollback(s *ast.RollbackStmt) error { + err := e.ctx.FinishTxn(true) + variable.GetSessionVars(e.ctx).SetStatusFlag(mysql.ServerStatusInTrans, false) + return errors.Trace(err) +} + +func (e *SimpleExec) executeCreateUser(s *ast.CreateUserStmt) error { + users := make([]string, 0, len(s.Specs)) + for _, spec := range s.Specs { + userName, host := parseUser(spec.User) + exists, err1 := userExists(e.ctx, userName, host) + if err1 != nil { + return errors.Trace(err1) + } + if exists { + if !s.IfNotExists { + return errors.New("Duplicate user") + } + continue + } + pwd := "" + if spec.AuthOpt.ByAuthString { + pwd = util.EncodePassword(spec.AuthOpt.AuthString) + } else { + pwd = util.EncodePassword(spec.AuthOpt.HashString) + } + user := fmt.Sprintf(`("%s", "%s", "%s")`, host, userName, pwd) + users = append(users, user) + } + if len(users) == 0 { + return nil + } + sql := fmt.Sprintf(`INSERT INTO %s.%s (Host, User, Password) VALUES %s;`, mysql.SystemDB, mysql.UserTable, strings.Join(users, ", ")) + _, err := e.ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(e.ctx, sql) + if err != nil { + return errors.Trace(err) + } + return nil +} + +// parse user string into username and host +// root@localhost -> roor, localhost +func parseUser(user string) (string, string) { + strs := strings.Split(user, "@") + return strs[0], strs[1] +} + +func userExists(ctx context.Context, name string, host string) (bool, error) { + sql := fmt.Sprintf(`SELECT * FROM %s.%s WHERE User="%s" AND Host="%s";`, mysql.SystemDB, mysql.UserTable, name, host) + rs, err := ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(ctx, sql) + if err != nil { + return false, errors.Trace(err) + } + defer rs.Close() + row, err := rs.Next() + if err != nil { + return false, errors.Trace(err) + } + return row != nil, nil +} + +func (e *SimpleExec) executeSetPwd(s *ast.SetPwdStmt) error { + // TODO: If len(s.User) == 0, use CURRENT_USER() + userName, host := parseUser(s.User) + // Update mysql.user + sql := fmt.Sprintf(`UPDATE %s.%s SET password="%s" WHERE User="%s" AND Host="%s";`, mysql.SystemDB, mysql.UserTable, util.EncodePassword(s.Password), userName, host) + _, err := e.ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(e.ctx, sql) + return errors.Trace(err) +} diff --git a/vendor/github.com/pingcap/tidb/executor/executor_write.go b/vendor/github.com/pingcap/tidb/executor/executor_write.go new file mode 100644 index 000000000..1c3ac3d47 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/executor/executor_write.go @@ -0,0 +1,932 @@ +// Copyright 2016 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package executor + +import ( + "fmt" + "strings" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/column" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/evaluator" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/sessionctx" + "github.com/pingcap/tidb/sessionctx/variable" + "github.com/pingcap/tidb/table" + "github.com/pingcap/tidb/terror" + "github.com/pingcap/tidb/util/types" +) + +var ( + _ Executor = &UpdateExec{} + _ Executor = &DeleteExec{} + _ Executor = &InsertExec{} +) + +// UpdateExec represents an update executor. +type UpdateExec struct { + SelectExec Executor + OrderedList []*ast.Assignment + + // Map for unique (Table, handle) pair. + updatedRowKeys map[table.Table]map[int64]struct{} + ctx context.Context + + rows []*Row // The rows fetched from TableExec. + newRowsData [][]types.Datum // The new values to be set. + fetched bool + cursor int +} + +// Next implements Executor Next interface. +func (e *UpdateExec) Next() (*Row, error) { + if !e.fetched { + err := e.fetchRows() + if err != nil { + return nil, errors.Trace(err) + } + e.fetched = true + } + + columns, err := getUpdateColumns(e.OrderedList) + if err != nil { + return nil, errors.Trace(err) + } + if e.cursor >= len(e.rows) { + return nil, nil + } + if e.updatedRowKeys == nil { + e.updatedRowKeys = make(map[table.Table]map[int64]struct{}) + } + row := e.rows[e.cursor] + newData := e.newRowsData[e.cursor] + for _, entry := range row.RowKeys { + tbl := entry.Tbl + if e.updatedRowKeys[tbl] == nil { + e.updatedRowKeys[tbl] = make(map[int64]struct{}) + } + offset := e.getTableOffset(tbl) + handle := entry.Handle + oldData := row.Data[offset : offset+len(tbl.Cols())] + newTableData := newData[offset : offset+len(tbl.Cols())] + + _, ok := e.updatedRowKeys[tbl][handle] + if ok { + // Each matching row is updated once, even if it matches the conditions multiple times. + continue + } + // Update row + err1 := updateRecord(e.ctx, handle, oldData, newTableData, columns, tbl, offset, false) + if err1 != nil { + return nil, errors.Trace(err1) + } + e.updatedRowKeys[tbl][handle] = struct{}{} + } + e.cursor++ + return &Row{}, nil +} + +func getUpdateColumns(assignList []*ast.Assignment) (map[int]*ast.Assignment, error) { + m := make(map[int]*ast.Assignment, len(assignList)) + for i, v := range assignList { + m[i] = v + } + return m, nil +} + +func (e *UpdateExec) fetchRows() error { + for { + row, err := e.SelectExec.Next() + if err != nil { + return errors.Trace(err) + } + if row == nil { + return nil + } + data := make([]types.Datum, len(e.SelectExec.Fields())) + newData := make([]types.Datum, len(e.SelectExec.Fields())) + for i, f := range e.SelectExec.Fields() { + data[i] = types.NewDatum(f.Expr.GetValue()) + newData[i] = data[i] + if e.OrderedList[i] != nil { + val, err := evaluator.Eval(e.ctx, e.OrderedList[i].Expr) + if err != nil { + return errors.Trace(err) + } + newData[i] = types.NewDatum(val) + } + } + row.Data = data + e.rows = append(e.rows, row) + e.newRowsData = append(e.newRowsData, newData) + } +} + +func (e *UpdateExec) getTableOffset(t table.Table) int { + fields := e.SelectExec.Fields() + i := 0 + for i < len(fields) { + field := fields[i] + if field.Table.Name.L == t.Meta().Name.L { + return i + } + i += len(field.Table.Columns) + } + return 0 +} + +func updateRecord(ctx context.Context, h int64, oldData, newData []types.Datum, updateColumns map[int]*ast.Assignment, t table.Table, offset int, onDuplicateUpdate bool) error { + if err := t.LockRow(ctx, h, false); err != nil { + return errors.Trace(err) + } + + cols := t.Cols() + touched := make(map[int]bool, len(cols)) + + assignExists := false + var newHandle types.Datum + for i, asgn := range updateColumns { + if asgn == nil { + continue + } + if i < offset || i >= offset+len(cols) { + // The assign expression is for another table, not this. + continue + } + + colIndex := i - offset + col := cols[colIndex] + if col.IsPKHandleColumn(t.Meta()) { + newHandle = newData[i] + } + if mysql.HasAutoIncrementFlag(col.Flag) { + if newData[i].Kind() == types.KindNull { + return errors.Errorf("Column '%v' cannot be null", col.Name.O) + } + val, err := newData[i].ToInt64() + if err != nil { + return errors.Trace(err) + } + t.RebaseAutoID(val, true) + } + + touched[colIndex] = true + assignExists = true + } + + // If no assign list for this table, no need to update. + if !assignExists { + return nil + } + + // Check whether new value is valid. + if err := column.CastValues(ctx, newData, cols); err != nil { + return errors.Trace(err) + } + + if err := column.CheckNotNull(cols, newData); err != nil { + return errors.Trace(err) + } + + // If row is not changed, we should do nothing. + rowChanged := false + for i := range oldData { + if !touched[i] { + continue + } + + n, err := newData[i].CompareDatum(oldData[i]) + if err != nil { + return errors.Trace(err) + } + if n != 0 { + rowChanged = true + break + } + } + if !rowChanged { + // See: https://dev.mysql.com/doc/refman/5.7/en/mysql-real-connect.html CLIENT_FOUND_ROWS + if variable.GetSessionVars(ctx).ClientCapability&mysql.ClientFoundRows > 0 { + variable.GetSessionVars(ctx).AddAffectedRows(1) + } + return nil + } + + var err error + if newHandle.Kind() != types.KindNull { + err = t.RemoveRecord(ctx, h, oldData) + if err != nil { + return errors.Trace(err) + } + _, err = t.AddRecord(ctx, newData) + } else { + // Update record to new value and update index. + err = t.UpdateRecord(ctx, h, oldData, newData, touched) + } + if err != nil { + return errors.Trace(err) + } + + // Record affected rows. + if !onDuplicateUpdate { + variable.GetSessionVars(ctx).AddAffectedRows(1) + } else { + variable.GetSessionVars(ctx).AddAffectedRows(2) + } + return nil +} + +// Fields implements Executor Fields interface. +// Returns nil to indicate there is no output. +func (e *UpdateExec) Fields() []*ast.ResultField { + return nil +} + +// Close implements Executor Close interface. +func (e *UpdateExec) Close() error { + return e.SelectExec.Close() +} + +// DeleteExec represents a delete executor. +// See: https://dev.mysql.com/doc/refman/5.7/en/delete.html +type DeleteExec struct { + SelectExec Executor + + ctx context.Context + Tables []*ast.TableName + IsMultiTable bool + + finished bool +} + +// Next implements Executor Next interface. +func (e *DeleteExec) Next() (*Row, error) { + if e.finished { + return nil, nil + } + defer func() { + e.finished = true + }() + if e.IsMultiTable && len(e.Tables) == 0 { + return &Row{}, nil + } + tblIDMap := make(map[int64]bool, len(e.Tables)) + // Get table alias map. + tblNames := make(map[string]string) + + // Map for unique (Table, handle) pair. + rowKeyMap := make(map[table.Table]map[int64]struct{}) + if e.IsMultiTable { + // Delete from multiple tables should consider table ident list. + fs := e.SelectExec.Fields() + for _, f := range fs { + if len(f.TableAsName.L) > 0 { + tblNames[f.TableAsName.L] = f.TableName.Name.L + } else { + tblNames[f.TableName.Name.L] = f.TableName.Name.L + } + } + for _, t := range e.Tables { + // Consider DBName. + _, ok := tblNames[t.Name.L] + if !ok { + return nil, errors.Errorf("Unknown table '%s' in MULTI DELETE", t.Name.O) + } + tblIDMap[t.TableInfo.ID] = true + } + } + for { + row, err := e.SelectExec.Next() + if err != nil { + return nil, errors.Trace(err) + } + if row == nil { + break + } + + for _, entry := range row.RowKeys { + if e.IsMultiTable { + tid := entry.Tbl.Meta().ID + if _, ok := tblIDMap[tid]; !ok { + continue + } + } + if rowKeyMap[entry.Tbl] == nil { + rowKeyMap[entry.Tbl] = make(map[int64]struct{}) + } + rowKeyMap[entry.Tbl][entry.Handle] = struct{}{} + } + } + for t, handleMap := range rowKeyMap { + for handle := range handleMap { + data, err := t.Row(e.ctx, handle) + if err != nil { + return nil, errors.Trace(err) + } + err = e.removeRow(e.ctx, t, handle, data) + if err != nil { + return nil, errors.Trace(err) + } + } + } + return nil, nil +} + +func (e *DeleteExec) getTable(ctx context.Context, tableName *ast.TableName) (table.Table, error) { + return sessionctx.GetDomain(ctx).InfoSchema().TableByName(tableName.Schema, tableName.Name) +} + +func (e *DeleteExec) removeRow(ctx context.Context, t table.Table, h int64, data []types.Datum) error { + err := t.RemoveRecord(ctx, h, data) + if err != nil { + return errors.Trace(err) + } + variable.GetSessionVars(ctx).AddAffectedRows(1) + return nil +} + +// Fields implements Executor Fields interface. +// Returns nil to indicate there is no output. +func (e *DeleteExec) Fields() []*ast.ResultField { + return nil +} + +// Close implements Executor Close interface. +func (e *DeleteExec) Close() error { + return e.SelectExec.Close() +} + +// InsertValues is the data to insert. +type InsertValues struct { + currRow int + ctx context.Context + SelectExec Executor + + Table table.Table + Columns []*ast.ColumnName + Lists [][]ast.ExprNode + Setlist []*ast.Assignment +} + +// InsertExec represents an insert executor. +type InsertExec struct { + *InsertValues + + OnDuplicate []*ast.Assignment + fields []*ast.ResultField + + Priority int + + finished bool +} + +// Next implements Executor Next interface. +func (e *InsertExec) Next() (*Row, error) { + if e.finished { + return nil, nil + } + cols, err := e.getColumns(e.Table.Cols()) + if err != nil { + return nil, errors.Trace(err) + } + txn, err := e.ctx.GetTxn(false) + if err != nil { + return nil, errors.Trace(err) + } + toUpdateColumns, err := getOnDuplicateUpdateColumns(e.OnDuplicate, e.Table) + if err != nil { + return nil, errors.Trace(err) + } + + var rows [][]types.Datum + if e.SelectExec != nil { + rows, err = e.getRowsSelect(cols) + } else { + rows, err = e.getRows(cols) + } + if err != nil { + return nil, errors.Trace(err) + } + + for _, row := range rows { + if len(e.OnDuplicate) == 0 { + txn.SetOption(kv.PresumeKeyNotExists, nil) + } + h, err := e.Table.AddRecord(e.ctx, row) + txn.DelOption(kv.PresumeKeyNotExists) + if err == nil { + continue + } + + if len(e.OnDuplicate) == 0 || !terror.ErrorEqual(err, kv.ErrKeyExists) { + return nil, errors.Trace(err) + } + if err = e.onDuplicateUpdate(row, h, toUpdateColumns); err != nil { + return nil, errors.Trace(err) + } + } + e.finished = true + return nil, nil +} + +// Fields implements Executor Fields interface. +// Returns nil to indicate there is no output. +func (e *InsertExec) Fields() []*ast.ResultField { + return nil +} + +// Close implements Executor Close interface. +func (e *InsertExec) Close() error { + if e.SelectExec != nil { + return e.SelectExec.Close() + } + return nil +} + +// There are three types of insert statements: +// 1 insert ... values(...) --> name type column +// 2 insert ... set x=y... --> set type column +// 3 insert ... (select ..) --> name type column +// See: https://dev.mysql.com/doc/refman/5.7/en/insert.html +func (e *InsertValues) getColumns(tableCols []*column.Col) ([]*column.Col, error) { + var cols []*column.Col + var err error + + if len(e.Setlist) > 0 { + // Process `set` type column. + columns := make([]string, 0, len(e.Setlist)) + for _, v := range e.Setlist { + columns = append(columns, v.Column.Name.O) + } + + cols, err = column.FindCols(tableCols, columns) + if err != nil { + return nil, errors.Errorf("INSERT INTO %s: %s", e.Table.Meta().Name.O, err) + } + + if len(cols) == 0 { + return nil, errors.Errorf("INSERT INTO %s: empty column", e.Table.Meta().Name.O) + } + } else { + // Process `name` type column. + columns := make([]string, 0, len(e.Columns)) + for _, v := range e.Columns { + columns = append(columns, v.Name.O) + } + cols, err = column.FindCols(tableCols, columns) + if err != nil { + return nil, errors.Errorf("INSERT INTO %s: %s", e.Table.Meta().Name.O, err) + } + + // If cols are empty, use all columns instead. + if len(cols) == 0 { + cols = tableCols + } + } + + // Check column whether is specified only once. + err = column.CheckOnce(cols) + if err != nil { + return nil, errors.Trace(err) + } + + return cols, nil +} + +func (e *InsertValues) fillValueList() error { + if len(e.Setlist) > 0 { + if len(e.Lists) > 0 { + return errors.Errorf("INSERT INTO %s: set type should not use values", e.Table) + } + var l []ast.ExprNode + for _, v := range e.Setlist { + l = append(l, v.Expr) + } + e.Lists = append(e.Lists, l) + } + return nil +} + +func (e *InsertValues) checkValueCount(insertValueCount, valueCount, num int, cols []*column.Col) error { + if insertValueCount != valueCount { + // "insert into t values (), ()" is valid. + // "insert into t values (), (1)" is not valid. + // "insert into t values (1), ()" is not valid. + // "insert into t values (1,2), (1)" is not valid. + // So the value count must be same for all insert list. + return errors.Errorf("Column count doesn't match value count at row %d", num+1) + } + if valueCount == 0 && len(e.Columns) > 0 { + // "insert into t (c1) values ()" is not valid. + return errors.Errorf("INSERT INTO %s: expected %d value(s), have %d", e.Table.Meta().Name.O, len(e.Columns), 0) + } else if valueCount > 0 && valueCount != len(cols) { + return errors.Errorf("INSERT INTO %s: expected %d value(s), have %d", e.Table.Meta().Name.O, len(cols), valueCount) + } + return nil +} + +func (e *InsertValues) getColumnDefaultValues(cols []*column.Col) (map[string]types.Datum, error) { + defaultValMap := map[string]types.Datum{} + for _, col := range cols { + if value, ok, err := table.GetColDefaultValue(e.ctx, &col.ColumnInfo); ok { + if err != nil { + return nil, errors.Trace(err) + } + defaultValMap[col.Name.L] = value + } + } + return defaultValMap, nil +} + +func (e *InsertValues) getRows(cols []*column.Col) (rows [][]types.Datum, err error) { + // process `insert|replace ... set x=y...` + if err = e.fillValueList(); err != nil { + return nil, errors.Trace(err) + } + + defaultVals, err := e.getColumnDefaultValues(e.Table.Cols()) + if err != nil { + return nil, errors.Trace(err) + } + + rows = make([][]types.Datum, len(e.Lists)) + length := len(e.Lists[0]) + for i, list := range e.Lists { + if err = e.checkValueCount(length, len(list), i, cols); err != nil { + return nil, errors.Trace(err) + } + e.currRow = i + rows[i], err = e.getRow(cols, list, defaultVals) + if err != nil { + return nil, errors.Trace(err) + } + } + return +} + +func (e *InsertValues) getRow(cols []*column.Col, list []ast.ExprNode, defaultVals map[string]types.Datum) ([]types.Datum, error) { + vals := make([]types.Datum, len(list)) + var err error + for i, expr := range list { + if d, ok := expr.(*ast.DefaultExpr); ok { + cn := d.Name + if cn != nil { + var found bool + vals[i], found = defaultVals[cn.Name.L] + if !found { + return nil, errors.Errorf("default column not found - %s", cn.Name.O) + } + } else { + vals[i] = defaultVals[cols[i].Name.L] + } + } else { + var val interface{} + val, err = evaluator.Eval(e.ctx, expr) + vals[i].SetValue(val) + if err != nil { + return nil, errors.Trace(err) + } + } + } + return e.fillRowData(cols, vals) +} + +func (e *InsertValues) getRowsSelect(cols []*column.Col) ([][]types.Datum, error) { + // process `insert|replace into ... select ... from ...` + if len(e.SelectExec.Fields()) != len(cols) { + return nil, errors.Errorf("Column count %d doesn't match value count %d", len(cols), len(e.SelectExec.Fields())) + } + var rows [][]types.Datum + for { + innerRow, err := e.SelectExec.Next() + if err != nil { + return nil, errors.Trace(err) + } + if innerRow == nil { + break + } + e.currRow = len(rows) + row, err := e.fillRowData(cols, innerRow.Data) + if err != nil { + return nil, errors.Trace(err) + } + rows = append(rows, row) + } + return rows, nil +} + +func (e *InsertValues) fillRowData(cols []*column.Col, vals []types.Datum) ([]types.Datum, error) { + row := make([]types.Datum, len(e.Table.Cols())) + marked := make(map[int]struct{}, len(vals)) + for i, v := range vals { + offset := cols[i].Offset + row[offset] = v + marked[offset] = struct{}{} + } + err := e.initDefaultValues(row, marked) + if err != nil { + return nil, errors.Trace(err) + } + if err = column.CastValues(e.ctx, row, cols); err != nil { + return nil, errors.Trace(err) + } + if err = column.CheckNotNull(e.Table.Cols(), row); err != nil { + return nil, errors.Trace(err) + } + return row, nil +} + +func (e *InsertValues) initDefaultValues(row []types.Datum, marked map[int]struct{}) error { + var rewriteValueCol *column.Col + var defaultValueCols []*column.Col + for i, c := range e.Table.Cols() { + if row[i].Kind() != types.KindNull { + // Column value isn't nil and column isn't auto-increment, continue. + if !mysql.HasAutoIncrementFlag(c.Flag) { + continue + } + val, err := row[i].ToInt64() + if err != nil { + return errors.Trace(err) + } + if val != 0 { + e.Table.RebaseAutoID(val, true) + continue + } + } + + // If the nil value is evaluated in insert list, we will use nil except auto increment column. + if _, ok := marked[i]; ok && !mysql.HasAutoIncrementFlag(c.Flag) && !mysql.HasTimestampFlag(c.Flag) { + continue + } + + if mysql.HasAutoIncrementFlag(c.Flag) { + recordID, err := e.Table.AllocAutoID() + if err != nil { + return errors.Trace(err) + } + row[i].SetInt64(recordID) + // Notes: incompatible with mysql + // MySQL will set last insert id to the first row, as follows: + // `t(id int AUTO_INCREMENT, c1 int, PRIMARY KEY (id))` + // `insert t (c1) values(1),(2),(3);` + // Last insert id will be 1, not 3. + variable.GetSessionVars(e.ctx).SetLastInsertID(uint64(recordID)) + // It's used for retry. + rewriteValueCol = c + } else { + var err error + row[i], _, err = table.GetColDefaultValue(e.ctx, &c.ColumnInfo) + if err != nil { + return errors.Trace(err) + } + } + + defaultValueCols = append(defaultValueCols, c) + } + if err := column.CastValues(e.ctx, row, defaultValueCols); err != nil { + return errors.Trace(err) + } + + // It's used for retry. + if rewriteValueCol == nil { + return nil + } + if len(e.Setlist) > 0 { + val := &ast.Assignment{ + Column: &ast.ColumnName{Name: rewriteValueCol.Name}, + Expr: ast.NewValueExpr(row[rewriteValueCol.Offset].GetValue())} + if len(e.Setlist) < rewriteValueCol.Offset+1 { + e.Setlist = append(e.Setlist, val) + return nil + } + setlist := make([]*ast.Assignment, 0, len(e.Setlist)+1) + setlist = append(setlist, e.Setlist[:rewriteValueCol.Offset]...) + setlist = append(setlist, val) + e.Setlist = append(setlist, e.Setlist[rewriteValueCol.Offset:]...) + return nil + } + + // records the values of each row. + vals := make([]ast.ExprNode, len(row)) + for i, col := range row { + vals[i] = ast.NewValueExpr(col.GetValue()) + } + if len(e.Lists) <= e.currRow { + e.Lists = append(e.Lists, vals) + } else { + e.Lists[e.currRow] = vals + } + + // records the column name only once. + if e.currRow != len(e.Lists)-1 { + return nil + } + if len(e.Columns) < rewriteValueCol.Offset+1 { + e.Columns = append(e.Columns, &ast.ColumnName{Name: rewriteValueCol.Name}) + return nil + } + cols := make([]*ast.ColumnName, 0, len(e.Columns)+1) + cols = append(cols, e.Columns[:rewriteValueCol.Offset]...) + cols = append(cols, &ast.ColumnName{Name: rewriteValueCol.Name}) + e.Columns = append(cols, e.Columns[rewriteValueCol.Offset:]...) + + return nil +} + +func (e *InsertExec) onDuplicateUpdate(row []types.Datum, h int64, cols map[int]*ast.Assignment) error { + // On duplicate key update the duplicate row. + // Evaluate the updated value. + // TODO: report rows affected and last insert id. + data, err := e.Table.Row(e.ctx, h) + if err != nil { + return errors.Trace(err) + } + // For evaluate ValuesExpr + // http://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_values + for i, rf := range e.fields { + rf.Expr.SetValue(row[i].GetValue()) + } + // Evaluate assignment + newData := make([]types.Datum, len(data)) + for i, c := range row { + asgn, ok := cols[i] + if !ok { + newData[i] = c + continue + } + var val interface{} + val, err = evaluator.Eval(e.ctx, asgn.Expr) + if err != nil { + return errors.Trace(err) + } + newData[i].SetValue(val) + } + if err = updateRecord(e.ctx, h, data, newData, cols, e.Table, 0, true); err != nil { + return errors.Trace(err) + } + return nil +} + +func findColumnByName(t table.Table, name string) (*column.Col, error) { + _, tableName, colName := splitQualifiedName(name) + if len(tableName) > 0 && tableName != t.Meta().Name.O { + return nil, errors.Errorf("unknown field %s.%s", tableName, colName) + } + + c := column.FindCol(t.Cols(), colName) + if c == nil { + return nil, errors.Errorf("unknown field %s", colName) + } + return c, nil +} + +func getOnDuplicateUpdateColumns(assignList []*ast.Assignment, t table.Table) (map[int]*ast.Assignment, error) { + m := make(map[int]*ast.Assignment, len(assignList)) + + for _, v := range assignList { + col := v.Column + c, err := findColumnByName(t, joinQualifiedName("", col.Table.L, col.Name.L)) + if err != nil { + return nil, errors.Trace(err) + } + m[c.Offset] = v + } + return m, nil +} + +// ReplaceExec represents a replace executor. +type ReplaceExec struct { + *InsertValues + Priority int + finished bool +} + +// Fields implements Executor Fields interface. +// Returns nil to indicate there is no output. +func (e *ReplaceExec) Fields() []*ast.ResultField { + return nil +} + +// Close implements Executor Close interface. +func (e *ReplaceExec) Close() error { + if e.SelectExec != nil { + return e.SelectExec.Close() + } + return nil +} + +// Next implements Executor Next interface. +func (e *ReplaceExec) Next() (*Row, error) { + if e.finished { + return nil, nil + } + cols, err := e.getColumns(e.Table.Cols()) + if err != nil { + return nil, errors.Trace(err) + } + + var rows [][]types.Datum + if e.SelectExec != nil { + rows, err = e.getRowsSelect(cols) + } else { + rows, err = e.getRows(cols) + } + if err != nil { + return nil, errors.Trace(err) + } + + for _, row := range rows { + h, err := e.Table.AddRecord(e.ctx, row) + if err == nil { + continue + } + if err != nil && !terror.ErrorEqual(err, kv.ErrKeyExists) { + return nil, errors.Trace(err) + } + + // While the insertion fails because a duplicate-key error occurs for a primary key or unique index, + // a storage engine may perform the REPLACE as an update rather than a delete plus insert. + // See: http://dev.mysql.com/doc/refman/5.7/en/replace.html. + if err = e.replaceRow(h, row); err != nil { + return nil, errors.Trace(err) + } + variable.GetSessionVars(e.ctx).AddAffectedRows(1) + } + e.finished = true + return nil, nil +} + +func (e *ReplaceExec) replaceRow(handle int64, replaceRow []types.Datum) error { + row, err := e.Table.Row(e.ctx, handle) + if err != nil { + return errors.Trace(err) + } + isReplace := false + touched := make(map[int]bool, len(row)) + for i, val := range row { + v, err1 := val.CompareDatum(replaceRow[i]) + if err1 != nil { + return errors.Trace(err1) + } + if v != 0 { + touched[i] = true + isReplace = true + } + } + if isReplace { + variable.GetSessionVars(e.ctx).AddAffectedRows(1) + if err = e.Table.UpdateRecord(e.ctx, handle, row, replaceRow, touched); err != nil { + return errors.Trace(err) + } + } + return nil +} + +// SplitQualifiedName splits an identifier name to db, table and field name. +func splitQualifiedName(name string) (db string, table string, field string) { + seps := strings.Split(name, ".") + + l := len(seps) + switch l { + case 1: + // `name` is field. + field = seps[0] + case 2: + // `name` is `table.field`. + table, field = seps[0], seps[1] + case 3: + // `name` is `db.table.field`. + db, table, field = seps[0], seps[1], seps[2] + default: + // `name` is `db.table.field`. + db, table, field = seps[l-3], seps[l-2], seps[l-1] + } + + return +} + +// JoinQualifiedName converts db, table, field to a qualified name. +func joinQualifiedName(db string, table string, field string) string { + if len(db) > 0 { + return fmt.Sprintf("%s.%s.%s", db, table, field) + } else if len(table) > 0 { + return fmt.Sprintf("%s.%s", table, field) + } else { + return field + } +} diff --git a/vendor/github.com/pingcap/tidb/executor/explain.go b/vendor/github.com/pingcap/tidb/executor/explain.go new file mode 100644 index 000000000..1d135e074 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/executor/explain.go @@ -0,0 +1,217 @@ +// Copyright 2016 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package executor + +import ( + "strconv" + "strings" + + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/optimizer/plan" + "github.com/pingcap/tidb/parser/opcode" + "github.com/pingcap/tidb/util/types" +) + +type explainEntry struct { + ID int64 + selectType string + table string + joinType string + possibleKeys string + key string + keyLen string + ref string + rows int64 + extra []string +} + +func (e *explainEntry) setJoinTypeForTableScan(p *plan.TableScan) { + if len(p.AccessConditions) == 0 { + e.joinType = "ALL" + return + } + if p.RefAccess { + e.joinType = "eq_ref" + return + } + for _, con := range p.AccessConditions { + if x, ok := con.(*ast.BinaryOperationExpr); ok { + if x.Op == opcode.EQ { + e.joinType = "const" + return + } + } + } + e.joinType = "range" +} + +func (e *explainEntry) setJoinTypeForIndexScan(p *plan.IndexScan) { + if len(p.AccessConditions) == 0 { + e.joinType = "index" + return + } + if len(p.AccessConditions) == p.AccessEqualCount { + if p.RefAccess { + if p.Index.Unique { + e.joinType = "eq_ref" + } else { + e.joinType = "ref" + } + } else { + if p.Index.Unique { + e.joinType = "const" + } else { + e.joinType = "range" + } + } + return + } + e.joinType = "range" +} + +// ExplainExec represents an explain executor. +// See: https://dev.mysql.com/doc/refman/5.7/en/explain-output.html +type ExplainExec struct { + StmtPlan plan.Plan + fields []*ast.ResultField + rows []*Row + cursor int +} + +// Fields implements Executor Fields interface. +func (e *ExplainExec) Fields() []*ast.ResultField { + return e.fields +} + +// Next implements Execution Next interface. +func (e *ExplainExec) Next() (*Row, error) { + if e.rows == nil { + e.fetchRows() + } + if e.cursor >= len(e.rows) { + return nil, nil + } + row := e.rows[e.cursor] + e.cursor++ + return row, nil +} + +func (e *ExplainExec) fetchRows() { + visitor := &explainVisitor{id: 1} + e.StmtPlan.Accept(visitor) + for _, entry := range visitor.entries { + row := &Row{} + row.Data = types.MakeDatums( + entry.ID, + entry.selectType, + entry.table, + entry.joinType, + entry.key, + entry.key, + entry.keyLen, + entry.ref, + entry.rows, + strings.Join(entry.extra, "; "), + ) + for i := range row.Data { + if row.Data[i].Kind() == types.KindString && row.Data[i].GetString() == "" { + row.Data[i].SetNull() + } + } + e.rows = append(e.rows, row) + } +} + +// Close implements Executor Close interface. +func (e *ExplainExec) Close() error { + return nil +} + +type explainVisitor struct { + id int64 + + // Sort extra should be appended in the first table in a join. + sort bool + entries []*explainEntry +} + +func (v *explainVisitor) Enter(p plan.Plan) (plan.Plan, bool) { + switch x := p.(type) { + case *plan.TableScan: + v.entries = append(v.entries, v.newEntryForTableScan(x)) + case *plan.IndexScan: + v.entries = append(v.entries, v.newEntryForIndexScan(x)) + case *plan.Sort: + v.sort = true + } + return p, false +} + +func (v *explainVisitor) Leave(p plan.Plan) (plan.Plan, bool) { + return p, true +} + +func (v *explainVisitor) newEntryForTableScan(p *plan.TableScan) *explainEntry { + entry := &explainEntry{ + ID: v.id, + selectType: "SIMPLE", + table: p.Table.Name.O, + } + entry.setJoinTypeForTableScan(p) + if entry.joinType != "ALL" { + entry.key = "PRIMARY" + entry.keyLen = "8" + } + if len(p.AccessConditions)+len(p.FilterConditions) > 0 { + entry.extra = append(entry.extra, "Using where") + } + + v.setSortExtra(entry) + return entry +} + +func (v *explainVisitor) newEntryForIndexScan(p *plan.IndexScan) *explainEntry { + entry := &explainEntry{ + ID: v.id, + selectType: "SIMPLE", + table: p.Table.Name.O, + key: p.Index.Name.O, + } + if len(p.AccessConditions) != 0 { + keyLen := 0 + for i := 0; i < len(p.Index.Columns); i++ { + if i < p.AccessEqualCount { + keyLen += p.Index.Columns[i].Length + } else if i < len(p.AccessConditions) { + keyLen += p.Index.Columns[i].Length + break + } + } + entry.keyLen = strconv.Itoa(keyLen) + } + entry.setJoinTypeForIndexScan(p) + if len(p.AccessConditions)+len(p.FilterConditions) > 0 { + entry.extra = append(entry.extra, "Using where") + } + + v.setSortExtra(entry) + return entry +} + +func (v *explainVisitor) setSortExtra(entry *explainEntry) { + if v.sort { + entry.extra = append(entry.extra, "Using filesort") + v.sort = false + } +} diff --git a/vendor/github.com/pingcap/tidb/executor/grant.go b/vendor/github.com/pingcap/tidb/executor/grant.go new file mode 100644 index 000000000..45ebdc161 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/executor/grant.go @@ -0,0 +1,520 @@ +// Copyright 2016 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package executor + +import ( + "fmt" + "strings" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/column" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/sessionctx" + "github.com/pingcap/tidb/sessionctx/db" + "github.com/pingcap/tidb/sessionctx/variable" + "github.com/pingcap/tidb/table" + "github.com/pingcap/tidb/util/sqlexec" + "github.com/pingcap/tidb/util/types" +) + +/*** + * Grant Statement + * See: https://dev.mysql.com/doc/refman/5.7/en/grant.html + ************************************************************************************/ +var ( + _ Executor = (*GrantExec)(nil) +) + +// GrantExec executes GrantStmt. +type GrantExec struct { + Privs []*ast.PrivElem + ObjectType ast.ObjectTypeType + Level *ast.GrantLevel + Users []*ast.UserSpec + + ctx context.Context + done bool +} + +// Fields implements Executor Fields interface. +func (e *GrantExec) Fields() []*ast.ResultField { + return nil +} + +// Next implements Execution Next interface. +func (e *GrantExec) Next() (*Row, error) { + if e.done { + return nil, nil + } + // Grant for each user + for _, user := range e.Users { + // Check if user exists. + userName, host := parseUser(user.User) + exists, err := userExists(e.ctx, userName, host) + if err != nil { + return nil, errors.Trace(err) + } + if !exists { + return nil, errors.Errorf("Unknown user: %s", user.User) + } + + // If there is no privilege entry in corresponding table, insert a new one. + // DB scope: mysql.DB + // Table scope: mysql.Tables_priv + // Column scope: mysql.Columns_priv + switch e.Level.Level { + case ast.GrantLevelDB: + err := e.checkAndInitDBPriv(userName, host) + if err != nil { + return nil, errors.Trace(err) + } + case ast.GrantLevelTable: + err := e.checkAndInitTablePriv(userName, host) + if err != nil { + return nil, errors.Trace(err) + } + } + // Grant each priv to the user. + for _, priv := range e.Privs { + if len(priv.Cols) > 0 { + // Check column scope privilege entry. + // TODO: Check validity before insert new entry. + err1 := e.checkAndInitColumnPriv(userName, host, priv.Cols) + if err1 != nil { + return nil, errors.Trace(err1) + } + } + err2 := e.grantPriv(priv, user) + if err2 != nil { + return nil, errors.Trace(err2) + } + } + } + e.done = true + return nil, nil +} + +// Close implements Executor Close interface. +func (e *GrantExec) Close() error { + return nil +} + +// Check if DB scope privilege entry exists in mysql.DB. +// If unexists, insert a new one. +func (e *GrantExec) checkAndInitDBPriv(user string, host string) error { + db, err := e.getTargetSchema() + if err != nil { + return errors.Trace(err) + } + ok, err := dbUserExists(e.ctx, user, host, db.Name.O) + if err != nil { + return errors.Trace(err) + } + if ok { + return nil + } + // Entry does not exist for user-host-db. Insert a new entry. + return initDBPrivEntry(e.ctx, user, host, db.Name.O) +} + +// Check if table scope privilege entry exists in mysql.Tables_priv. +// If unexists, insert a new one. +func (e *GrantExec) checkAndInitTablePriv(user string, host string) error { + db, tbl, err := e.getTargetSchemaAndTable() + if err != nil { + return errors.Trace(err) + } + ok, err := tableUserExists(e.ctx, user, host, db.Name.O, tbl.Meta().Name.O) + if err != nil { + return errors.Trace(err) + } + if ok { + return nil + } + // Entry does not exist for user-host-db-tbl. Insert a new entry. + return initTablePrivEntry(e.ctx, user, host, db.Name.O, tbl.Meta().Name.O) +} + +// Check if column scope privilege entry exists in mysql.Columns_priv. +// If unexists, insert a new one. +func (e *GrantExec) checkAndInitColumnPriv(user string, host string, cols []*ast.ColumnName) error { + db, tbl, err := e.getTargetSchemaAndTable() + if err != nil { + return errors.Trace(err) + } + for _, c := range cols { + col := column.FindCol(tbl.Cols(), c.Name.L) + if col == nil { + return errors.Errorf("Unknown column: %s", c.Name.O) + } + ok, err := columnPrivEntryExists(e.ctx, user, host, db.Name.O, tbl.Meta().Name.O, col.Name.O) + if err != nil { + return errors.Trace(err) + } + if ok { + continue + } + // Entry does not exist for user-host-db-tbl-col. Insert a new entry. + err = initColumnPrivEntry(e.ctx, user, host, db.Name.O, tbl.Meta().Name.O, col.Name.O) + if err != nil { + return errors.Trace(err) + } + } + return nil +} + +// Insert a new row into mysql.DB with empty privilege. +func initDBPrivEntry(ctx context.Context, user string, host string, db string) error { + sql := fmt.Sprintf(`INSERT INTO %s.%s (Host, User, DB) VALUES ("%s", "%s", "%s")`, mysql.SystemDB, mysql.DBTable, host, user, db) + _, err := ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(ctx, sql) + return errors.Trace(err) +} + +// Insert a new row into mysql.Tables_priv with empty privilege. +func initTablePrivEntry(ctx context.Context, user string, host string, db string, tbl string) error { + sql := fmt.Sprintf(`INSERT INTO %s.%s (Host, User, DB, Table_name, Table_priv, Column_priv) VALUES ("%s", "%s", "%s", "%s", "", "")`, mysql.SystemDB, mysql.TablePrivTable, host, user, db, tbl) + _, err := ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(ctx, sql) + return errors.Trace(err) +} + +// Insert a new row into mysql.Columns_priv with empty privilege. +func initColumnPrivEntry(ctx context.Context, user string, host string, db string, tbl string, col string) error { + sql := fmt.Sprintf(`INSERT INTO %s.%s (Host, User, DB, Table_name, Column_name, Column_priv) VALUES ("%s", "%s", "%s", "%s", "%s", "")`, mysql.SystemDB, mysql.ColumnPrivTable, host, user, db, tbl, col) + _, err := ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(ctx, sql) + return errors.Trace(err) +} + +// Grant priv to user in s.Level scope. +func (e *GrantExec) grantPriv(priv *ast.PrivElem, user *ast.UserSpec) error { + switch e.Level.Level { + case ast.GrantLevelGlobal: + return e.grantGlobalPriv(priv, user) + case ast.GrantLevelDB: + return e.grantDBPriv(priv, user) + case ast.GrantLevelTable: + if len(priv.Cols) == 0 { + return e.grantTablePriv(priv, user) + } + return e.grantColumnPriv(priv, user) + default: + return errors.Errorf("Unknown grant level: %#v", e.Level) + } +} + +// Manipulate mysql.user table. +func (e *GrantExec) grantGlobalPriv(priv *ast.PrivElem, user *ast.UserSpec) error { + asgns, err := composeGlobalPrivUpdate(priv.Priv) + if err != nil { + return errors.Trace(err) + } + userName, host := parseUser(user.User) + sql := fmt.Sprintf(`UPDATE %s.%s SET %s WHERE User="%s" AND Host="%s"`, mysql.SystemDB, mysql.UserTable, asgns, userName, host) + _, err = e.ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(e.ctx, sql) + return errors.Trace(err) +} + +// Manipulate mysql.db table. +func (e *GrantExec) grantDBPriv(priv *ast.PrivElem, user *ast.UserSpec) error { + db, err := e.getTargetSchema() + if err != nil { + return errors.Trace(err) + } + asgns, err := composeDBPrivUpdate(priv.Priv) + if err != nil { + return errors.Trace(err) + } + userName, host := parseUser(user.User) + sql := fmt.Sprintf(`UPDATE %s.%s SET %s WHERE User="%s" AND Host="%s" AND DB="%s";`, mysql.SystemDB, mysql.DBTable, asgns, userName, host, db.Name.O) + _, err = e.ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(e.ctx, sql) + return errors.Trace(err) +} + +// Manipulate mysql.tables_priv table. +func (e *GrantExec) grantTablePriv(priv *ast.PrivElem, user *ast.UserSpec) error { + db, tbl, err := e.getTargetSchemaAndTable() + if err != nil { + return errors.Trace(err) + } + userName, host := parseUser(user.User) + asgns, err := composeTablePrivUpdate(e.ctx, priv.Priv, userName, host, db.Name.O, tbl.Meta().Name.O) + if err != nil { + return errors.Trace(err) + } + sql := fmt.Sprintf(`UPDATE %s.%s SET %s WHERE User="%s" AND Host="%s" AND DB="%s" AND Table_name="%s";`, mysql.SystemDB, mysql.TablePrivTable, asgns, userName, host, db.Name.O, tbl.Meta().Name.O) + _, err = e.ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(e.ctx, sql) + return errors.Trace(err) +} + +// Manipulate mysql.tables_priv table. +func (e *GrantExec) grantColumnPriv(priv *ast.PrivElem, user *ast.UserSpec) error { + db, tbl, err := e.getTargetSchemaAndTable() + if err != nil { + return errors.Trace(err) + } + userName, host := parseUser(user.User) + for _, c := range priv.Cols { + col := column.FindCol(tbl.Cols(), c.Name.L) + if col == nil { + return errors.Errorf("Unknown column: %s", c) + } + asgns, err := composeColumnPrivUpdate(e.ctx, priv.Priv, userName, host, db.Name.O, tbl.Meta().Name.O, col.Name.O) + if err != nil { + return errors.Trace(err) + } + sql := fmt.Sprintf(`UPDATE %s.%s SET %s WHERE User="%s" AND Host="%s" AND DB="%s" AND Table_name="%s" AND Column_name="%s";`, mysql.SystemDB, mysql.ColumnPrivTable, asgns, userName, host, db.Name.O, tbl.Meta().Name.O, col.Name.O) + _, err = e.ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(e.ctx, sql) + if err != nil { + return errors.Trace(err) + } + } + return nil +} + +// Compose update stmt assignment list string for global scope privilege update. +func composeGlobalPrivUpdate(priv mysql.PrivilegeType) (string, error) { + if priv == mysql.AllPriv { + strs := make([]string, 0, len(mysql.Priv2UserCol)) + for _, v := range mysql.Priv2UserCol { + strs = append(strs, fmt.Sprintf(`%s="Y"`, v)) + } + return strings.Join(strs, ", "), nil + } + col, ok := mysql.Priv2UserCol[priv] + if !ok { + return "", errors.Errorf("Unknown priv: %v", priv) + } + return fmt.Sprintf(`%s="Y"`, col), nil +} + +// Compose update stmt assignment list for db scope privilege update. +func composeDBPrivUpdate(priv mysql.PrivilegeType) (string, error) { + if priv == mysql.AllPriv { + strs := make([]string, 0, len(mysql.AllDBPrivs)) + for _, p := range mysql.AllDBPrivs { + v, ok := mysql.Priv2UserCol[p] + if !ok { + return "", errors.Errorf("Unknown db privilege %v", priv) + } + strs = append(strs, fmt.Sprintf(`%s="Y"`, v)) + } + return strings.Join(strs, ", "), nil + } + col, ok := mysql.Priv2UserCol[priv] + if !ok { + return "", errors.Errorf("Unknown priv: %v", priv) + } + return fmt.Sprintf(`%s="Y"`, col), nil +} + +// Compose update stmt assignment list for table scope privilege update. +func composeTablePrivUpdate(ctx context.Context, priv mysql.PrivilegeType, name string, host string, db string, tbl string) (string, error) { + var newTablePriv, newColumnPriv string + if priv == mysql.AllPriv { + for _, p := range mysql.AllTablePrivs { + v, ok := mysql.Priv2SetStr[p] + if !ok { + return "", errors.Errorf("Unknown table privilege %v", p) + } + if len(newTablePriv) == 0 { + newTablePriv = v + } else { + newTablePriv = fmt.Sprintf("%s,%s", newTablePriv, v) + } + } + for _, p := range mysql.AllColumnPrivs { + v, ok := mysql.Priv2SetStr[p] + if !ok { + return "", errors.Errorf("Unknown column privilege %v", p) + } + if len(newColumnPriv) == 0 { + newColumnPriv = v + } else { + newColumnPriv = fmt.Sprintf("%s,%s", newColumnPriv, v) + } + } + } else { + currTablePriv, currColumnPriv, err := getTablePriv(ctx, name, host, db, tbl) + if err != nil { + return "", errors.Trace(err) + } + p, ok := mysql.Priv2SetStr[priv] + if !ok { + return "", errors.Errorf("Unknown priv: %v", priv) + } + if len(currTablePriv) == 0 { + newTablePriv = p + } else { + newTablePriv = fmt.Sprintf("%s,%s", currTablePriv, p) + } + for _, cp := range mysql.AllColumnPrivs { + if priv == cp { + if len(currColumnPriv) == 0 { + newColumnPriv = p + } else { + newColumnPriv = fmt.Sprintf("%s,%s", currColumnPriv, p) + } + break + } + } + } + return fmt.Sprintf(`Table_priv="%s", Column_priv="%s", Grantor="%s"`, newTablePriv, newColumnPriv, variable.GetSessionVars(ctx).User), nil +} + +// Compose update stmt assignment list for column scope privilege update. +func composeColumnPrivUpdate(ctx context.Context, priv mysql.PrivilegeType, name string, host string, db string, tbl string, col string) (string, error) { + newColumnPriv := "" + if priv == mysql.AllPriv { + for _, p := range mysql.AllColumnPrivs { + v, ok := mysql.Priv2SetStr[p] + if !ok { + return "", errors.Errorf("Unknown column privilege %v", p) + } + if len(newColumnPriv) == 0 { + newColumnPriv = v + } else { + newColumnPriv = fmt.Sprintf("%s,%s", newColumnPriv, v) + } + } + } else { + currColumnPriv, err := getColumnPriv(ctx, name, host, db, tbl, col) + if err != nil { + return "", errors.Trace(err) + } + p, ok := mysql.Priv2SetStr[priv] + if !ok { + return "", errors.Errorf("Unknown priv: %v", priv) + } + if len(currColumnPriv) == 0 { + newColumnPriv = p + } else { + newColumnPriv = fmt.Sprintf("%s,%s", currColumnPriv, p) + } + } + return fmt.Sprintf(`Column_priv="%s"`, newColumnPriv), nil +} + +// Helper function to check if the sql returns any row. +func recordExists(ctx context.Context, sql string) (bool, error) { + rs, err := ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(ctx, sql) + if err != nil { + return false, errors.Trace(err) + } + defer rs.Close() + row, err := rs.Next() + if err != nil { + return false, errors.Trace(err) + } + return row != nil, nil +} + +// Check if there is an entry with key user-host-db in mysql.DB. +func dbUserExists(ctx context.Context, name string, host string, db string) (bool, error) { + sql := fmt.Sprintf(`SELECT * FROM %s.%s WHERE User="%s" AND Host="%s" AND DB="%s";`, mysql.SystemDB, mysql.DBTable, name, host, db) + return recordExists(ctx, sql) +} + +// Check if there is an entry with key user-host-db-tbl in mysql.Tables_priv. +func tableUserExists(ctx context.Context, name string, host string, db string, tbl string) (bool, error) { + sql := fmt.Sprintf(`SELECT * FROM %s.%s WHERE User="%s" AND Host="%s" AND DB="%s" AND Table_name="%s";`, mysql.SystemDB, mysql.TablePrivTable, name, host, db, tbl) + return recordExists(ctx, sql) +} + +// Check if there is an entry with key user-host-db-tbl-col in mysql.Columns_priv. +func columnPrivEntryExists(ctx context.Context, name string, host string, db string, tbl string, col string) (bool, error) { + sql := fmt.Sprintf(`SELECT * FROM %s.%s WHERE User="%s" AND Host="%s" AND DB="%s" AND Table_name="%s" AND Column_name="%s";`, mysql.SystemDB, mysql.ColumnPrivTable, name, host, db, tbl, col) + return recordExists(ctx, sql) +} + +// Get current table scope privilege set from mysql.Tables_priv. +// Return Table_priv and Column_priv. +func getTablePriv(ctx context.Context, name string, host string, db string, tbl string) (string, string, error) { + sql := fmt.Sprintf(`SELECT Table_priv, Column_priv FROM %s.%s WHERE User="%s" AND Host="%s" AND DB="%s" AND Table_name="%s";`, mysql.SystemDB, mysql.TablePrivTable, name, host, db, tbl) + rs, err := ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(ctx, sql) + if err != nil { + return "", "", errors.Trace(err) + } + defer rs.Close() + row, err := rs.Next() + if err != nil { + return "", "", errors.Trace(err) + } + var tPriv, cPriv string + if row.Data[0].Kind() == types.KindMysqlSet { + tablePriv := row.Data[0].GetMysqlSet() + tPriv = tablePriv.Name + } + if row.Data[1].Kind() == types.KindMysqlSet { + columnPriv := row.Data[1].GetMysqlSet() + cPriv = columnPriv.Name + } + return tPriv, cPriv, nil +} + +// Get current column scope privilege set from mysql.Columns_priv. +// Return Column_priv. +func getColumnPriv(ctx context.Context, name string, host string, db string, tbl string, col string) (string, error) { + sql := fmt.Sprintf(`SELECT Column_priv FROM %s.%s WHERE User="%s" AND Host="%s" AND DB="%s" AND Table_name="%s" AND Column_name="%s";`, mysql.SystemDB, mysql.ColumnPrivTable, name, host, db, tbl, col) + rs, err := ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(ctx, sql) + if err != nil { + return "", errors.Trace(err) + } + defer rs.Close() + row, err := rs.Next() + if err != nil { + return "", errors.Trace(err) + } + cPriv := "" + if row.Data[0].Kind() == types.KindMysqlSet { + cPriv = row.Data[0].GetMysqlSet().Name + } + return cPriv, nil +} + +// Find the schema by dbName. +func (e *GrantExec) getTargetSchema() (*model.DBInfo, error) { + dbName := e.Level.DBName + if len(dbName) == 0 { + // Grant *, use current schema + dbName = db.GetCurrentSchema(e.ctx) + if len(dbName) == 0 { + return nil, errors.New("Miss DB name for grant privilege.") + } + } + //check if db exists + schema := model.NewCIStr(dbName) + is := sessionctx.GetDomain(e.ctx).InfoSchema() + db, ok := is.SchemaByName(schema) + if !ok { + return nil, errors.Errorf("Unknown schema name: %s", dbName) + } + return db, nil +} + +// Find the schema and table by dbName and tableName. +func (e *GrantExec) getTargetSchemaAndTable() (*model.DBInfo, table.Table, error) { + db, err := e.getTargetSchema() + if err != nil { + return nil, nil, errors.Trace(err) + } + name := model.NewCIStr(e.Level.TableName) + is := sessionctx.GetDomain(e.ctx).InfoSchema() + tbl, err := is.TableByName(db.Name, name) + if err != nil { + return nil, nil, errors.Trace(err) + } + return db, tbl, nil +} diff --git a/vendor/github.com/pingcap/tidb/executor/prepared.go b/vendor/github.com/pingcap/tidb/executor/prepared.go new file mode 100644 index 000000000..01371246e --- /dev/null +++ b/vendor/github.com/pingcap/tidb/executor/prepared.go @@ -0,0 +1,277 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package executor + +import ( + "sort" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/evaluator" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/optimizer" + "github.com/pingcap/tidb/optimizer/plan" + "github.com/pingcap/tidb/parser" + "github.com/pingcap/tidb/sessionctx" + "github.com/pingcap/tidb/sessionctx/variable" +) + +var ( + _ Executor = &DeallocateExec{} + _ Executor = &ExecuteExec{} + _ Executor = &PrepareExec{} +) + +type paramMarkerSorter struct { + markers []*ast.ParamMarkerExpr +} + +func (p *paramMarkerSorter) Len() int { + return len(p.markers) +} + +func (p *paramMarkerSorter) Less(i, j int) bool { + return p.markers[i].Offset < p.markers[j].Offset +} + +func (p *paramMarkerSorter) Swap(i, j int) { + p.markers[i], p.markers[j] = p.markers[j], p.markers[i] +} + +type paramMarkerExtractor struct { + markers []*ast.ParamMarkerExpr +} + +func (e *paramMarkerExtractor) Enter(in ast.Node) (ast.Node, bool) { + return in, false +} + +func (e *paramMarkerExtractor) Leave(in ast.Node) (ast.Node, bool) { + if x, ok := in.(*ast.ParamMarkerExpr); ok { + e.markers = append(e.markers, x) + } + return in, true +} + +// Prepared represents a prepared statement. +type Prepared struct { + Stmt ast.StmtNode + Params []*ast.ParamMarkerExpr + SchemaVersion int64 +} + +// PrepareExec represents a PREPARE executor. +type PrepareExec struct { + IS infoschema.InfoSchema + Ctx context.Context + Name string + SQLText string + + ID uint32 + ResultFields []*ast.ResultField + ParamCount int + Err error +} + +// Fields implements Executor Fields interface. +func (e *PrepareExec) Fields() []*ast.ResultField { + // returns nil to indicate prepare will not return Recordset. + return nil +} + +// Next implements Executor Next interface. +func (e *PrepareExec) Next() (*Row, error) { + e.DoPrepare() + return nil, e.Err +} + +// Close implements plan.Plan Close interface. +func (e *PrepareExec) Close() error { + return nil +} + +// DoPrepare prepares the statement, it can be called multiple times without +// side effect. +func (e *PrepareExec) DoPrepare() { + vars := variable.GetSessionVars(e.Ctx) + if e.ID != 0 { + // Must be the case when we retry a prepare. + // Make sure it is idempotent. + _, ok := vars.PreparedStmts[e.ID] + if ok { + return + } + } + charset, collation := variable.GetCharsetInfo(e.Ctx) + stmts, err := parser.Parse(e.SQLText, charset, collation) + if err != nil { + e.Err = errors.Trace(err) + return + } + if len(stmts) != 1 { + e.Err = ErrPrepareMulti + return + } + stmt := stmts[0] + var extractor paramMarkerExtractor + stmt.Accept(&extractor) + + // The parameter markers are appended in visiting order, which may not + // be the same as the position order in the query string. We need to + // sort it by position. + sorter := ¶mMarkerSorter{markers: extractor.markers} + sort.Sort(sorter) + e.ParamCount = len(sorter.markers) + prepared := &Prepared{ + Stmt: stmt, + Params: sorter.markers, + SchemaVersion: e.IS.SchemaMetaVersion(), + } + + err = optimizer.Prepare(e.IS, e.Ctx, stmt) + if err != nil { + e.Err = errors.Trace(err) + return + } + if resultSetNode, ok := stmt.(ast.ResultSetNode); ok { + e.ResultFields = resultSetNode.GetResultFields() + } + + if e.ID == 0 { + e.ID = vars.GetNextPreparedStmtID() + } + if e.Name != "" { + vars.PreparedStmtNameToID[e.Name] = e.ID + } + vars.PreparedStmts[e.ID] = prepared +} + +// ExecuteExec represents an EXECUTE executor. +// It executes a prepared statement. +type ExecuteExec struct { + IS infoschema.InfoSchema + Ctx context.Context + Name string + UsingVars []ast.ExprNode + ID uint32 + StmtExec Executor +} + +// Fields implements Executor Fields interface. +func (e *ExecuteExec) Fields() []*ast.ResultField { + // Will never be called. + return nil +} + +// Next implements Executor Next interface. +func (e *ExecuteExec) Next() (*Row, error) { + // Will never be called. + return nil, nil +} + +// Close implements plan.Plan Close interface. +func (e *ExecuteExec) Close() error { + // Will never be called. + return nil +} + +// Build builds a prepared statement into an executor. +func (e *ExecuteExec) Build() error { + vars := variable.GetSessionVars(e.Ctx) + if e.Name != "" { + e.ID = vars.PreparedStmtNameToID[e.Name] + } + v := vars.PreparedStmts[e.ID] + if v == nil { + return ErrStmtNotFound + } + prepared := v.(*Prepared) + + if len(prepared.Params) != len(e.UsingVars) { + return ErrWrongParamCount + } + + for i, usingVar := range e.UsingVars { + val, err := evaluator.Eval(e.Ctx, usingVar) + if err != nil { + return errors.Trace(err) + } + prepared.Params[i].SetValue(val) + } + + if prepared.SchemaVersion != e.IS.SchemaMetaVersion() { + // If the schema version has changed we need to prepare it again, + // if this time it failed, the real reason for the error is schema changed. + err := optimizer.Prepare(e.IS, e.Ctx, prepared.Stmt) + if err != nil { + return ErrSchemaChanged.Gen("Schema change casued error: %s", err.Error()) + } + prepared.SchemaVersion = e.IS.SchemaMetaVersion() + } + sb := &subqueryBuilder{is: e.IS} + plan, err := optimizer.Optimize(e.Ctx, prepared.Stmt, sb) + if err != nil { + return errors.Trace(err) + } + b := newExecutorBuilder(e.Ctx, e.IS) + stmtExec := b.build(plan) + if b.err != nil { + return errors.Trace(b.err) + } + e.StmtExec = stmtExec + return nil +} + +// DeallocateExec represent a DEALLOCATE executor. +type DeallocateExec struct { + Name string + ctx context.Context +} + +// Fields implements Executor Fields interface. +func (e *DeallocateExec) Fields() []*ast.ResultField { + return nil +} + +// Next implements Executor Next interface. +func (e *DeallocateExec) Next() (*Row, error) { + vars := variable.GetSessionVars(e.ctx) + id, ok := vars.PreparedStmtNameToID[e.Name] + if !ok { + return nil, ErrStmtNotFound + } + delete(vars.PreparedStmtNameToID, e.Name) + delete(vars.PreparedStmts, id) + return nil, nil +} + +// Close implements plan.Plan Close interface. +func (e *DeallocateExec) Close() error { + return nil +} + +// CompileExecutePreparedStmt compiles a session Execute command to a stmt.Statement. +func CompileExecutePreparedStmt(ctx context.Context, ID uint32, args ...interface{}) ast.Statement { + execPlan := &plan.Execute{ID: ID} + execPlan.UsingVars = make([]ast.ExprNode, len(args)) + for i, val := range args { + execPlan.UsingVars[i] = ast.NewValueExpr(val) + } + sa := &statement{ + is: sessionctx.GetDomain(ctx).InfoSchema(), + plan: execPlan, + } + return sa +} diff --git a/vendor/github.com/pingcap/tidb/executor/show.go b/vendor/github.com/pingcap/tidb/executor/show.go new file mode 100644 index 000000000..7a4a2bdc3 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/executor/show.go @@ -0,0 +1,461 @@ +// Copyright 2016 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package executor + +import ( + "bytes" + "fmt" + "sort" + "strings" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/column" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/privilege" + "github.com/pingcap/tidb/sessionctx/variable" + "github.com/pingcap/tidb/table" + "github.com/pingcap/tidb/util/charset" + "github.com/pingcap/tidb/util/types" +) + +// ShowExec represents a show executor. +type ShowExec struct { + Tp ast.ShowStmtType // Databases/Tables/Columns/.... + DBName model.CIStr + Table *ast.TableName // Used for showing columns. + Column *ast.ColumnName // Used for `desc table column`. + Flag int // Some flag parsed from sql, such as FULL. + Full bool + User string // Used for show grants. + + // Used by show variables + GlobalScope bool + + fields []*ast.ResultField + ctx context.Context + is infoschema.InfoSchema + + fetched bool + rows []*Row + cursor int +} + +// Fields implements Executor Fields interface. +func (e *ShowExec) Fields() []*ast.ResultField { + return e.fields +} + +// Next implements Execution Next interface. +func (e *ShowExec) Next() (*Row, error) { + if e.rows == nil { + err := e.fetchAll() + if err != nil { + return nil, errors.Trace(err) + } + } + if e.cursor >= len(e.rows) { + return nil, nil + } + row := e.rows[e.cursor] + for i, field := range e.fields { + field.Expr.SetValue(row.Data[i].GetValue()) + } + e.cursor++ + return row, nil +} + +func (e *ShowExec) fetchAll() error { + switch e.Tp { + case ast.ShowCharset: + return e.fetchShowCharset() + case ast.ShowCollation: + return e.fetchShowCollation() + case ast.ShowColumns: + return e.fetchShowColumns() + case ast.ShowCreateTable: + return e.fetchShowCreateTable() + case ast.ShowDatabases: + return e.fetchShowDatabases() + case ast.ShowEngines: + return e.fetchShowEngines() + case ast.ShowGrants: + return e.fetchShowGrants() + case ast.ShowIndex: + return e.fetchShowIndex() + case ast.ShowProcedureStatus: + return e.fetchShowProcedureStatus() + case ast.ShowStatus: + return e.fetchShowStatus() + case ast.ShowTables: + return e.fetchShowTables() + case ast.ShowTableStatus: + return e.fetchShowTableStatus() + case ast.ShowTriggers: + return e.fetchShowTriggers() + case ast.ShowVariables: + return e.fetchShowVariables() + case ast.ShowWarnings: + // empty result + } + return nil +} + +func (e *ShowExec) fetchShowEngines() error { + row := &Row{ + Data: types.MakeDatums( + "InnoDB", + "DEFAULT", + "Supports transactions, row-level locking, and foreign keys", + "YES", + "YES", + "YES", + ), + } + e.rows = append(e.rows, row) + return nil +} + +func (e *ShowExec) fetchShowDatabases() error { + dbs := e.is.AllSchemaNames() + // TODO: let information_schema be the first database + sort.Strings(dbs) + for _, d := range dbs { + e.rows = append(e.rows, &Row{Data: types.MakeDatums(d)}) + } + return nil +} + +func (e *ShowExec) fetchShowTables() error { + if !e.is.SchemaExists(e.DBName) { + return errors.Errorf("Can not find DB: %s", e.DBName) + } + // sort for tables + var tableNames []string + for _, v := range e.is.SchemaTables(e.DBName) { + tableNames = append(tableNames, v.Meta().Name.L) + } + sort.Strings(tableNames) + for _, v := range tableNames { + data := types.MakeDatums(v) + if e.Full { + // TODO: support "VIEW" later if we have supported view feature. + // now, just use "BASE TABLE". + data = append(data, types.NewDatum("BASE TABLE")) + } + e.rows = append(e.rows, &Row{Data: data}) + } + return nil +} + +func (e *ShowExec) fetchShowTableStatus() error { + if !e.is.SchemaExists(e.DBName) { + return errors.Errorf("Can not find DB: %s", e.DBName) + } + + // sort for tables + var tableNames []string + for _, v := range e.is.SchemaTables(e.DBName) { + tableNames = append(tableNames, v.Meta().Name.L) + } + sort.Strings(tableNames) + + for _, v := range tableNames { + now := mysql.CurrentTime(mysql.TypeDatetime) + data := types.MakeDatums(v, "InnoDB", "10", "Compact", 100, 100, 100, 100, 100, 100, 100, + now, now, now, "utf8_general_ci", "", "", "") + e.rows = append(e.rows, &Row{Data: data}) + } + return nil +} + +func (e *ShowExec) fetchShowColumns() error { + tb, err := e.getTable() + if err != nil { + return errors.Trace(err) + } + cols := tb.Cols() + for _, col := range cols { + if e.Column != nil && e.Column.Name.L != col.Name.L { + continue + } + + desc := column.NewColDesc(col) + + // The FULL keyword causes the output to include the column collation and comments, + // as well as the privileges you have for each column. + row := &Row{} + if e.Full { + row.Data = types.MakeDatums( + desc.Field, + desc.Type, + desc.Collation, + desc.Null, + desc.Key, + desc.DefaultValue, + desc.Extra, + desc.Privileges, + desc.Comment, + ) + } else { + row.Data = types.MakeDatums( + desc.Field, + desc.Type, + desc.Null, + desc.Key, + desc.DefaultValue, + desc.Extra, + ) + } + e.rows = append(e.rows, row) + } + return nil +} + +func (e *ShowExec) fetchShowIndex() error { + tb, err := e.getTable() + if err != nil { + return errors.Trace(err) + } + for _, idx := range tb.Indices() { + for i, col := range idx.Columns { + nonUniq := 1 + if idx.Unique { + nonUniq = 0 + } + var subPart interface{} + if col.Length != types.UnspecifiedLength { + subPart = col.Length + } + data := types.MakeDatums( + tb.Meta().Name.O, // Table + nonUniq, // Non_unique + idx.Name.O, // Key_name + i+1, // Seq_in_index + col.Name.O, // Column_name + "utf8_bin", // Colation + 0, // Cardinality + subPart, // Sub_part + nil, // Packed + "YES", // Null + idx.Tp.String(), // Index_type + "", // Comment + idx.Comment, // Index_comment + ) + e.rows = append(e.rows, &Row{Data: data}) + } + } + return nil +} + +func (e *ShowExec) fetchShowCharset() error { + // See: http://dev.mysql.com/doc/refman/5.7/en/show-character-set.html + descs := charset.GetAllCharsets() + for _, desc := range descs { + row := &Row{ + Data: types.MakeDatums( + desc.Name, + desc.Desc, + desc.DefaultCollation, + desc.Maxlen, + ), + } + e.rows = append(e.rows, row) + } + return nil +} + +func (e *ShowExec) fetchShowVariables() error { + sessionVars := variable.GetSessionVars(e.ctx) + globalVars := variable.GetGlobalVarAccessor(e.ctx) + for _, v := range variable.SysVars { + var err error + var value string + if !e.GlobalScope { + // Try to get Session Scope variable value first. + sv, ok := sessionVars.Systems[v.Name] + if ok { + value = sv + } else { + // If session scope variable is not set, get the global scope value. + value, err = globalVars.GetGlobalSysVar(e.ctx, v.Name) + if err != nil { + return errors.Trace(err) + } + } + } else { + value, err = globalVars.GetGlobalSysVar(e.ctx, v.Name) + if err != nil { + return errors.Trace(err) + } + } + row := &Row{Data: types.MakeDatums(v.Name, value)} + e.rows = append(e.rows, row) + } + return nil +} + +func (e *ShowExec) fetchShowStatus() error { + statusVars, err := variable.GetStatusVars() + if err != nil { + return errors.Trace(err) + } + for status, v := range statusVars { + if e.GlobalScope && v.Scope == variable.ScopeSession { + continue + } + value, err := types.ToString(v.Value) + if err != nil { + return errors.Trace(err) + } + row := &Row{Data: types.MakeDatums(status, value)} + e.rows = append(e.rows, row) + } + return nil +} + +func (e *ShowExec) fetchShowCreateTable() error { + tb, err := e.getTable() + if err != nil { + return errors.Trace(err) + } + + // TODO: let the result more like MySQL. + var buf bytes.Buffer + buf.WriteString(fmt.Sprintf("CREATE TABLE `%s` (\n", tb.Meta().Name.O)) + for i, col := range tb.Cols() { + buf.WriteString(fmt.Sprintf(" `%s` %s", col.Name.O, col.GetTypeDesc())) + if mysql.HasAutoIncrementFlag(col.Flag) { + buf.WriteString(" NOT NULL AUTO_INCREMENT") + } else { + if mysql.HasNotNullFlag(col.Flag) { + buf.WriteString(" NOT NULL") + } + switch col.DefaultValue { + case nil: + buf.WriteString(" DEFAULT NULL") + case "CURRENT_TIMESTAMP": + buf.WriteString(" DEFAULT CURRENT_TIMESTAMP") + default: + buf.WriteString(fmt.Sprintf(" DEFAULT '%v'", col.DefaultValue)) + } + + if mysql.HasOnUpdateNowFlag(col.Flag) { + buf.WriteString(" ON UPDATE CURRENT_TIMESTAMP") + } + } + if i != len(tb.Cols())-1 { + buf.WriteString(",\n") + } + } + + if len(tb.Indices()) > 0 { + buf.WriteString(",\n") + } + + for i, idx := range tb.Indices() { + if idx.Primary { + buf.WriteString(" PRIMARY KEY ") + } else if idx.Unique { + buf.WriteString(fmt.Sprintf(" UNIQUE KEY `%s` ", idx.Name.O)) + } else { + buf.WriteString(fmt.Sprintf(" KEY `%s` ", idx.Name.O)) + } + + cols := make([]string, 0, len(idx.Columns)) + for _, c := range idx.Columns { + cols = append(cols, c.Name.O) + } + buf.WriteString(fmt.Sprintf("(`%s`)", strings.Join(cols, "`,`"))) + if i != len(tb.Indices())-1 { + buf.WriteString(",\n") + } + } + buf.WriteString("\n") + + buf.WriteString(") ENGINE=InnoDB") + if s := tb.Meta().Charset; len(s) > 0 { + buf.WriteString(fmt.Sprintf(" DEFAULT CHARSET=%s", s)) + } else { + buf.WriteString(" DEFAULT CHARSET=latin1") + } + + data := types.MakeDatums(tb.Meta().Name.O, buf.String()) + e.rows = append(e.rows, &Row{Data: data}) + return nil +} + +func (e *ShowExec) fetchShowCollation() error { + collations := charset.GetCollations() + for _, v := range collations { + isDefault := "" + if v.IsDefault { + isDefault = "Yes" + } + row := &Row{Data: types.MakeDatums( + v.Name, + v.CharsetName, + v.ID, + isDefault, + "Yes", + 1, + )} + e.rows = append(e.rows, row) + } + return nil +} + +func (e *ShowExec) fetchShowGrants() error { + // Get checker + checker := privilege.GetPrivilegeChecker(e.ctx) + if checker == nil { + return errors.New("Miss privilege checker!") + } + gs, err := checker.ShowGrants(e.ctx, e.User) + if err != nil { + return errors.Trace(err) + } + for _, g := range gs { + data := types.MakeDatums(g) + e.rows = append(e.rows, &Row{Data: data}) + } + return nil +} + +func (e *ShowExec) fetchShowTriggers() error { + return nil +} + +func (e *ShowExec) fetchShowProcedureStatus() error { + return nil +} + +func (e *ShowExec) getTable() (table.Table, error) { + if e.Table == nil { + return nil, errors.New("table not found") + } + tb, ok := e.is.TableByID(e.Table.TableInfo.ID) + if !ok { + return nil, errors.Errorf("table %s not found", e.Table.Name) + } + return tb, nil +} + +// Close implements Executor Close interface. +func (e *ShowExec) Close() error { + return nil +} diff --git a/vendor/github.com/pingcap/tidb/executor/subquery.go b/vendor/github.com/pingcap/tidb/executor/subquery.go new file mode 100644 index 000000000..d12001112 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/executor/subquery.go @@ -0,0 +1,145 @@ +// Copyright 2016 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package executor + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/optimizer/plan" + "github.com/pingcap/tidb/util/types" +) + +var _ ast.SubqueryExec = &subquery{} + +// subquery is an exprNode with a plan. +type subquery struct { + types.Datum + Type *types.FieldType + flag uint64 + text string + plan plan.Plan + is infoschema.InfoSchema +} + +// SetDatum implements Expression interface. +func (sq *subquery) SetDatum(datum types.Datum) { + sq.Datum = datum +} + +// GetDatum implements Expression interface. +func (sq *subquery) GetDatum() *types.Datum { + return &sq.Datum +} + +// SetFlag implements Expression interface. +func (sq *subquery) SetFlag(flag uint64) { + sq.flag = flag +} + +// GetFlag implements Expression interface. +func (sq *subquery) GetFlag() uint64 { + return sq.flag +} + +// SetText implements Node interface. +func (sq *subquery) SetText(text string) { + sq.text = text +} + +// Text implements Node interface. +func (sq *subquery) Text() string { + return sq.text +} + +// SetType implements Expression interface. +func (sq *subquery) SetType(tp *types.FieldType) { + sq.Type = tp +} + +// GetType implements Expression interface. +func (sq *subquery) GetType() *types.FieldType { + return sq.Type +} + +func (sq *subquery) Accept(v ast.Visitor) (ast.Node, bool) { + // SubQuery is not a normal ExprNode. + newNode, skipChildren := v.Enter(sq) + if skipChildren { + return v.Leave(newNode) + } + sq = newNode.(*subquery) + return v.Leave(sq) +} + +func (sq *subquery) EvalRows(ctx context.Context, rowCount int) ([]interface{}, error) { + b := newExecutorBuilder(ctx, sq.is) + plan.Refine(sq.plan) + e := b.build(sq.plan) + if b.err != nil { + return nil, errors.Trace(b.err) + } + defer e.Close() + if len(e.Fields()) == 0 { + // No result fields means no Recordset. + for { + row, err := e.Next() + if err != nil { + return nil, errors.Trace(err) + } + if row == nil { + return nil, nil + } + } + } + var ( + err error + row *Row + rows = []interface{}{} + ) + for rowCount != 0 { + row, err = e.Next() + if err != nil { + return rows, errors.Trace(err) + } + if row == nil { + break + } + if len(row.Data) == 1 { + rows = append(rows, row.Data[0].GetValue()) + } else { + rows = append(rows, types.DatumsToInterfaces(row.Data)) + } + if rowCount > 0 { + rowCount-- + } + } + return rows, nil +} + +func (sq *subquery) ColumnCount() (int, error) { + return len(sq.plan.Fields()), nil +} + +type subqueryBuilder struct { + is infoschema.InfoSchema +} + +func (sb *subqueryBuilder) Build(p plan.Plan) ast.SubqueryExec { + return &subquery{ + is: sb.is, + plan: p, + } +} diff --git a/vendor/github.com/pingcap/tidb/gitcookie.sh b/vendor/github.com/pingcap/tidb/gitcookie.sh new file mode 100644 index 000000000..353d6240e --- /dev/null +++ b/vendor/github.com/pingcap/tidb/gitcookie.sh @@ -0,0 +1,9 @@ +touch ~/.gitcookies +chmod 0600 ~/.gitcookies + +git config --global http.cookiefile ~/.gitcookies + +tr , \\t <<\__END__ >>~/.gitcookies +go.googlesource.com,FALSE,/,TRUE,2147483647,o,git-z.pingcap.com=1/Xv6CBlnVpdrhYBXT5i_VexGocQcbgkKsrW938zgjqx0 +go-review.googlesource.com,FALSE,/,TRUE,2147483647,o,git-z.pingcap.com=1/Xv6CBlnVpdrhYBXT5i_VexGocQcbgkKsrW938zgjqx0 +__END__ diff --git a/vendor/github.com/pingcap/tidb/infoschema/infoschema.go b/vendor/github.com/pingcap/tidb/infoschema/infoschema.go new file mode 100644 index 000000000..d2b12cdb0 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/infoschema/infoschema.go @@ -0,0 +1,499 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package infoschema + +import ( + "strings" + "sync/atomic" + + "github.com/juju/errors" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/meta" + "github.com/pingcap/tidb/meta/autoid" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/perfschema" + "github.com/pingcap/tidb/table" + "github.com/pingcap/tidb/terror" + // import table implementation to init table.TableFromMeta + _ "github.com/pingcap/tidb/table/tables" + "github.com/pingcap/tidb/util/types" +) + +// InfoSchema is the interface used to retrieve the schema information. +// It works as a in memory cache and doesn't handle any schema change. +// InfoSchema is read-only, and the returned value is a copy. +// TODO: add more methods to retrieve tables and columns. +type InfoSchema interface { + SchemaByName(schema model.CIStr) (*model.DBInfo, bool) + SchemaExists(schema model.CIStr) bool + TableByName(schema, table model.CIStr) (table.Table, error) + TableExists(schema, table model.CIStr) bool + ColumnByName(schema, table, column model.CIStr) (*model.ColumnInfo, bool) + ColumnExists(schema, table, column model.CIStr) bool + IndexByName(schema, table, index model.CIStr) (*model.IndexInfo, bool) + SchemaByID(id int64) (*model.DBInfo, bool) + TableByID(id int64) (table.Table, bool) + AllocByID(id int64) (autoid.Allocator, bool) + ColumnByID(id int64) (*model.ColumnInfo, bool) + ColumnIndicesByID(id int64) ([]*model.IndexInfo, bool) + AllSchemaNames() []string + AllSchemas() []*model.DBInfo + Clone() (result []*model.DBInfo) + SchemaTables(schema model.CIStr) []table.Table + SchemaMetaVersion() int64 +} + +// Infomation Schema Name. +const ( + Name = "INFORMATION_SCHEMA" +) + +type infoSchema struct { + schemaNameToID map[string]int64 + tableNameToID map[tableName]int64 + columnNameToID map[columnName]int64 + schemas map[int64]*model.DBInfo + tables map[int64]table.Table + tableAllocators map[int64]autoid.Allocator + columns map[int64]*model.ColumnInfo + indices map[indexName]*model.IndexInfo + columnIndices map[int64][]*model.IndexInfo + + // We should check version when change schema. + schemaMetaVersion int64 +} + +var _ InfoSchema = (*infoSchema)(nil) + +type tableName struct { + schema string + table string +} + +type columnName struct { + tableName + name string +} + +type indexName struct { + tableName + name string +} + +func (is *infoSchema) SchemaByName(schema model.CIStr) (val *model.DBInfo, ok bool) { + id, ok := is.schemaNameToID[schema.L] + if !ok { + return + } + val, ok = is.schemas[id] + return +} + +func (is *infoSchema) SchemaMetaVersion() int64 { + return is.schemaMetaVersion +} + +func (is *infoSchema) SchemaExists(schema model.CIStr) bool { + _, ok := is.schemaNameToID[schema.L] + return ok +} + +func (is *infoSchema) TableByName(schema, table model.CIStr) (t table.Table, err error) { + id, ok := is.tableNameToID[tableName{schema: schema.L, table: table.L}] + if !ok { + return nil, TableNotExists.Gen("table %s.%s does not exist", schema, table) + } + t = is.tables[id] + return +} + +func (is *infoSchema) TableExists(schema, table model.CIStr) bool { + _, ok := is.tableNameToID[tableName{schema: schema.L, table: table.L}] + return ok +} + +func (is *infoSchema) ColumnByName(schema, table, column model.CIStr) (val *model.ColumnInfo, ok bool) { + id, ok := is.columnNameToID[columnName{tableName: tableName{schema: schema.L, table: table.L}, name: column.L}] + if !ok { + return + } + val, ok = is.columns[id] + return +} + +func (is *infoSchema) ColumnExists(schema, table, column model.CIStr) bool { + _, ok := is.columnNameToID[columnName{tableName: tableName{schema: schema.L, table: table.L}, name: column.L}] + return ok +} + +func (is *infoSchema) IndexByName(schema, table, index model.CIStr) (val *model.IndexInfo, ok bool) { + val, ok = is.indices[indexName{tableName: tableName{schema: schema.L, table: table.L}, name: index.L}] + return +} + +func (is *infoSchema) SchemaByID(id int64) (val *model.DBInfo, ok bool) { + val, ok = is.schemas[id] + return +} + +func (is *infoSchema) TableByID(id int64) (val table.Table, ok bool) { + val, ok = is.tables[id] + return +} + +func (is *infoSchema) AllocByID(id int64) (val autoid.Allocator, ok bool) { + val, ok = is.tableAllocators[id] + return +} + +func (is *infoSchema) ColumnByID(id int64) (val *model.ColumnInfo, ok bool) { + val, ok = is.columns[id] + return +} + +func (is *infoSchema) ColumnIndicesByID(id int64) (indices []*model.IndexInfo, ok bool) { + indices, ok = is.columnIndices[id] + return +} + +func (is *infoSchema) AllSchemaNames() (names []string) { + for _, v := range is.schemas { + names = append(names, v.Name.O) + } + return +} + +func (is *infoSchema) AllSchemas() (schemas []*model.DBInfo) { + for _, v := range is.schemas { + schemas = append(schemas, v) + } + return +} + +func (is *infoSchema) SchemaTables(schema model.CIStr) (tables []table.Table) { + di, ok := is.SchemaByName(schema) + if !ok { + return + } + for _, ti := range di.Tables { + tables = append(tables, is.tables[ti.ID]) + } + return +} + +func (is *infoSchema) Clone() (result []*model.DBInfo) { + for _, v := range is.schemas { + result = append(result, v.Clone()) + } + return +} + +// Handle handles information schema, including getting and setting. +type Handle struct { + value atomic.Value + store kv.Storage +} + +// NewHandle creates a new Handle. +func NewHandle(store kv.Storage) *Handle { + h := &Handle{ + store: store, + } + // init memory tables + initMemoryTables(store) + initPerfSchema(store) + return h +} + +func initPerfSchema(store kv.Storage) { + perfHandle = perfschema.NewPerfHandle(store) +} + +func genGlobalID(store kv.Storage) (int64, error) { + var globalID int64 + err := kv.RunInNewTxn(store, true, func(txn kv.Transaction) error { + var err error + globalID, err = meta.NewMeta(txn).GenGlobalID() + return errors.Trace(err) + }) + return globalID, errors.Trace(err) +} + +var ( + // Information_Schema + isDB *model.DBInfo + schemataTbl table.Table + tablesTbl table.Table + columnsTbl table.Table + statisticsTbl table.Table + charsetTbl table.Table + collationsTbl table.Table + filesTbl table.Table + defTbl table.Table + profilingTbl table.Table + nameToTable map[string]table.Table + + perfHandle perfschema.PerfSchema +) + +func setColumnID(meta *model.TableInfo, store kv.Storage) error { + var err error + for _, c := range meta.Columns { + c.ID, err = genGlobalID(store) + if err != nil { + return errors.Trace(err) + } + } + return nil +} + +func initMemoryTables(store kv.Storage) error { + // Init Information_Schema + var ( + err error + tbl table.Table + ) + dbID, err := genGlobalID(store) + if err != nil { + return errors.Trace(err) + } + nameToTable = make(map[string]table.Table) + isTables := make([]*model.TableInfo, 0, len(tableNameToColumns)) + for name, cols := range tableNameToColumns { + meta := buildTableMeta(name, cols) + isTables = append(isTables, meta) + meta.ID, err = genGlobalID(store) + if err != nil { + return errors.Trace(err) + } + err = setColumnID(meta, store) + if err != nil { + return errors.Trace(err) + } + alloc := autoid.NewMemoryAllocator(dbID) + tbl, err = createMemoryTable(meta, alloc) + if err != nil { + return errors.Trace(err) + } + nameToTable[meta.Name.L] = tbl + } + schemataTbl = nameToTable[strings.ToLower(tableSchemata)] + tablesTbl = nameToTable[strings.ToLower(tableTables)] + columnsTbl = nameToTable[strings.ToLower(tableColumns)] + statisticsTbl = nameToTable[strings.ToLower(tableStatistics)] + charsetTbl = nameToTable[strings.ToLower(tableCharacterSets)] + collationsTbl = nameToTable[strings.ToLower(tableCollations)] + + // CharacterSets/Collations contain static data. Init them now. + err = insertData(charsetTbl, dataForCharacterSets()) + if err != nil { + return errors.Trace(err) + } + err = insertData(collationsTbl, dataForColltions()) + if err != nil { + return errors.Trace(err) + } + // create db + isDB = &model.DBInfo{ + ID: dbID, + Name: model.NewCIStr(Name), + Charset: mysql.DefaultCharset, + Collate: mysql.DefaultCollationName, + Tables: isTables, + } + return nil +} + +func insertData(tbl table.Table, rows [][]types.Datum) error { + for _, r := range rows { + _, err := tbl.AddRecord(nil, r) + if err != nil { + return errors.Trace(err) + } + } + return nil +} + +func refillTable(tbl table.Table, rows [][]types.Datum) error { + err := tbl.Truncate(nil) + if err != nil { + return errors.Trace(err) + } + return insertData(tbl, rows) +} + +// Set sets DBInfo to information schema. +func (h *Handle) Set(newInfo []*model.DBInfo, schemaMetaVersion int64) error { + info := &infoSchema{ + schemaNameToID: map[string]int64{}, + tableNameToID: map[tableName]int64{}, + columnNameToID: map[columnName]int64{}, + schemas: map[int64]*model.DBInfo{}, + tables: map[int64]table.Table{}, + tableAllocators: map[int64]autoid.Allocator{}, + columns: map[int64]*model.ColumnInfo{}, + indices: map[indexName]*model.IndexInfo{}, + columnIndices: map[int64][]*model.IndexInfo{}, + schemaMetaVersion: schemaMetaVersion, + } + var err error + var hasOldInfo bool + infoschema := h.Get() + if infoschema != nil { + hasOldInfo = true + } + for _, di := range newInfo { + info.schemas[di.ID] = di + info.schemaNameToID[di.Name.L] = di.ID + for _, t := range di.Tables { + alloc := autoid.NewAllocator(h.store, di.ID) + if hasOldInfo { + val, ok := infoschema.AllocByID(t.ID) + if ok { + alloc = val + } + } + info.tableAllocators[t.ID] = alloc + info.tables[t.ID], err = table.TableFromMeta(alloc, t) + if err != nil { + return errors.Trace(err) + } + tname := tableName{di.Name.L, t.Name.L} + info.tableNameToID[tname] = t.ID + for _, c := range t.Columns { + info.columns[c.ID] = c + info.columnNameToID[columnName{tname, c.Name.L}] = c.ID + } + for _, idx := range t.Indices { + info.indices[indexName{tname, idx.Name.L}] = idx + for _, idxCol := range idx.Columns { + columnID := t.Columns[idxCol.Offset].ID + columnIndices := info.columnIndices[columnID] + info.columnIndices[columnID] = append(columnIndices, idx) + } + } + } + } + // Build Information_Schema + info.schemaNameToID[isDB.Name.L] = isDB.ID + info.schemas[isDB.ID] = isDB + for _, t := range isDB.Tables { + tbl, ok := nameToTable[t.Name.L] + if !ok { + return errors.Errorf("table `%s` is missing.", t.Name) + } + info.tables[t.ID] = tbl + tname := tableName{isDB.Name.L, t.Name.L} + info.tableNameToID[tname] = t.ID + for _, c := range t.Columns { + info.columns[c.ID] = c + info.columnNameToID[columnName{tname, c.Name.L}] = c.ID + } + } + + // Add Performance_Schema + psDB := perfHandle.GetDBMeta() + info.schemaNameToID[psDB.Name.L] = psDB.ID + info.schemas[psDB.ID] = psDB + for _, t := range psDB.Tables { + tbl, ok := perfHandle.GetTable(t.Name.O) + if !ok { + return errors.Errorf("table `%s` is missing.", t.Name) + } + info.tables[t.ID] = tbl + tname := tableName{psDB.Name.L, t.Name.L} + info.tableNameToID[tname] = t.ID + for _, c := range t.Columns { + info.columns[c.ID] = c + info.columnNameToID[columnName{tname, c.Name.L}] = c.ID + } + } + // Should refill some tables in Information_Schema. + // schemata/tables/columns/statistics + dbNames := make([]string, 0, len(info.schemas)) + dbInfos := make([]*model.DBInfo, 0, len(info.schemas)) + for _, v := range info.schemas { + dbNames = append(dbNames, v.Name.L) + dbInfos = append(dbInfos, v) + } + err = refillTable(schemataTbl, dataForSchemata(dbNames)) + if err != nil { + return errors.Trace(err) + } + err = refillTable(tablesTbl, dataForTables(dbInfos)) + if err != nil { + return errors.Trace(err) + } + err = refillTable(columnsTbl, dataForColumns(dbInfos)) + if err != nil { + return errors.Trace(err) + } + err = refillTable(statisticsTbl, dataForStatistics(dbInfos)) + if err != nil { + return errors.Trace(err) + } + h.value.Store(info) + return nil +} + +// Get gets information schema from Handle. +func (h *Handle) Get() InfoSchema { + v := h.value.Load() + schema, _ := v.(InfoSchema) + return schema +} + +// Schema error codes. +const ( + CodeDbDropExists terror.ErrCode = 1008 + CodeDatabaseNotExists = 1049 + CodeTableNotExists = 1146 + CodeColumnNotExists = 1054 + + CodeDatabaseExists = 1007 + CodeTableExists = 1050 + CodeBadTable = 1051 +) + +var ( + // DatabaseDropExists returns for drop an unexist database. + DatabaseDropExists = terror.ClassSchema.New(CodeDbDropExists, "database doesn't exist") + // DatabaseNotExists returns for database not exists. + DatabaseNotExists = terror.ClassSchema.New(CodeDatabaseNotExists, "database not exists") + // TableNotExists returns for table not exists. + TableNotExists = terror.ClassSchema.New(CodeTableNotExists, "table not exists") + // ColumnNotExists returns for column not exists. + ColumnNotExists = terror.ClassSchema.New(CodeColumnNotExists, "field not exists") + + // DatabaseExists returns for database already exists. + DatabaseExists = terror.ClassSchema.New(CodeDatabaseExists, "database already exists") + // TableExists returns for table already exists. + TableExists = terror.ClassSchema.New(CodeTableExists, "table already exists") + // TableDropExists returns for drop an unexist table. + TableDropExists = terror.ClassSchema.New(CodeBadTable, "unknown table") +) + +func init() { + schemaMySQLErrCodes := map[terror.ErrCode]uint16{ + CodeDbDropExists: mysql.ErrDbDropExists, + CodeDatabaseNotExists: mysql.ErrBadDb, + CodeTableNotExists: mysql.ErrNoSuchTable, + CodeColumnNotExists: mysql.ErrBadField, + CodeDatabaseExists: mysql.ErrDbCreateExists, + CodeTableExists: mysql.ErrTableExists, + CodeBadTable: mysql.ErrBadTable, + } + terror.ErrClassToMySQLCodes[terror.ClassSchema] = schemaMySQLErrCodes +} diff --git a/vendor/github.com/pingcap/tidb/infoschema/tables.go b/vendor/github.com/pingcap/tidb/infoschema/tables.go new file mode 100644 index 000000000..3069eb3cb --- /dev/null +++ b/vendor/github.com/pingcap/tidb/infoschema/tables.go @@ -0,0 +1,458 @@ +// Copyright 2016 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package infoschema + +import ( + "fmt" + "sort" + + "github.com/pingcap/tidb/column" + "github.com/pingcap/tidb/meta/autoid" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/table" + "github.com/pingcap/tidb/table/tables" + "github.com/pingcap/tidb/util/charset" + "github.com/pingcap/tidb/util/types" +) + +const ( + tableSchemata = "SCHEMATA" + tableTables = "TABLES" + tableColumns = "COLUMNS" + tableStatistics = "STATISTICS" + tableCharacterSets = "CHARACTER_SETS" + tableCollations = "COLLATIONS" + tableFiles = "FILES" + catalogVal = "def" + tableProfiling = "PROFILING" +) + +type columnInfo struct { + name string + tp byte + size int + flag uint + deflt interface{} + elems []string +} + +func buildColumnInfo(tableName string, col columnInfo) *model.ColumnInfo { + mCharset := charset.CharsetBin + mCollation := charset.CharsetBin + mFlag := mysql.UnsignedFlag + if col.tp == mysql.TypeVarchar || col.tp == mysql.TypeBlob { + mCharset = mysql.DefaultCharset + mCollation = mysql.DefaultCollationName + mFlag = 0 + } + fieldType := types.FieldType{ + Charset: mCharset, + Collate: mCollation, + Tp: col.tp, + Flen: col.size, + Flag: uint(mFlag), + } + return &model.ColumnInfo{ + Name: model.NewCIStr(col.name), + FieldType: fieldType, + State: model.StatePublic, + } +} + +func buildTableMeta(tableName string, cs []columnInfo) *model.TableInfo { + cols := make([]*model.ColumnInfo, 0, len(cs)) + for _, c := range cs { + cols = append(cols, buildColumnInfo(tableName, c)) + } + for i, col := range cols { + col.Offset = i + } + return &model.TableInfo{ + Name: model.NewCIStr(tableName), + Columns: cols, + State: model.StatePublic, + } +} + +var schemataCols = []columnInfo{ + {"CATALOG_NAME", mysql.TypeVarchar, 512, 0, nil, nil}, + {"SCHEMA_NAME", mysql.TypeVarchar, 64, 0, nil, nil}, + {"DEFAULT_CHARACTER_SET_NAME", mysql.TypeVarchar, 64, 0, nil, nil}, + {"DEFAULT_COLLATION_NAME", mysql.TypeVarchar, 32, 0, nil, nil}, + {"SQL_PATH", mysql.TypeVarchar, 512, 0, nil, nil}, +} + +var tablesCols = []columnInfo{ + {"TABLE_CATALOG", mysql.TypeVarchar, 512, 0, nil, nil}, + {"TABLE_SCHEMA", mysql.TypeVarchar, 64, 0, nil, nil}, + {"TABLE_NAME", mysql.TypeVarchar, 64, 0, nil, nil}, + {"TABLE_TYPE", mysql.TypeVarchar, 64, 0, nil, nil}, + {"ENGINE", mysql.TypeVarchar, 64, 0, nil, nil}, + {"VERSION", mysql.TypeLonglong, 21, 0, nil, nil}, + {"ROW_FORMAT", mysql.TypeVarchar, 10, 0, nil, nil}, + {"TABLE_ROWS", mysql.TypeLonglong, 21, 0, nil, nil}, + {"AVG_ROW_LENGTH", mysql.TypeLonglong, 21, 0, nil, nil}, + {"DATA_LENGTH", mysql.TypeLonglong, 21, 0, nil, nil}, + {"MAX_DATA_LENGTH", mysql.TypeLonglong, 21, 0, nil, nil}, + {"INDEX_LENGTH", mysql.TypeLonglong, 21, 0, nil, nil}, + {"DATA_FREE", mysql.TypeLonglong, 21, 0, nil, nil}, + {"AUTO_INCREMENT", mysql.TypeLonglong, 21, 0, nil, nil}, + {"CREATE_TIME", mysql.TypeDatetime, 19, 0, nil, nil}, + {"UPDATE_TIME", mysql.TypeDatetime, 19, 0, nil, nil}, + {"CHECK_TIME", mysql.TypeDatetime, 19, 0, nil, nil}, + {"TABLE_COLLATION", mysql.TypeVarchar, 32, 0, nil, nil}, + {"CHECK_SUM", mysql.TypeLonglong, 21, 0, nil, nil}, + {"CREATE_OPTIONS", mysql.TypeVarchar, 255, 0, nil, nil}, + {"TABLE_COMMENT", mysql.TypeVarchar, 2048, 0, nil, nil}, +} + +var columnsCols = []columnInfo{ + {"TABLE_CATALOG", mysql.TypeVarchar, 512, 0, nil, nil}, + {"TABLE_SCHEMA", mysql.TypeVarchar, 64, 0, nil, nil}, + {"TABLE_NAME", mysql.TypeVarchar, 64, 0, nil, nil}, + {"COLUMN_NAME", mysql.TypeVarchar, 64, 0, nil, nil}, + {"ORIGINAL_POSITION", mysql.TypeLonglong, 64, 0, nil, nil}, + {"COLUMN_DEFAULT", mysql.TypeBlob, 196606, 0, nil, nil}, + {"IS_NULLABLE", mysql.TypeVarchar, 3, 0, nil, nil}, + {"DATA_TYPE", mysql.TypeVarchar, 64, 0, nil, nil}, + {"CHARACTER_MAXIMUM_LENGTH", mysql.TypeLonglong, 21, 0, nil, nil}, + {"CHARACTOR_OCTET_LENGTH", mysql.TypeLonglong, 21, 0, nil, nil}, + {"NUMERIC_PRECISION", mysql.TypeLonglong, 21, 0, nil, nil}, + {"NUMERIC_SCALE", mysql.TypeLonglong, 21, 0, nil, nil}, + {"DATETIME_PRECISION", mysql.TypeLonglong, 21, 0, nil, nil}, + {"CHARACTER_SET_NAME", mysql.TypeVarchar, 32, 0, nil, nil}, + {"COLLATION_NAME", mysql.TypeVarchar, 32, 0, nil, nil}, + {"COLUMN_TYPE", mysql.TypeBlob, 196606, 0, nil, nil}, + {"COLUMN_KEY", mysql.TypeVarchar, 3, 0, nil, nil}, + {"EXTRA", mysql.TypeVarchar, 30, 0, nil, nil}, + {"PRIVILEGES", mysql.TypeVarchar, 80, 0, nil, nil}, + {"COLUMN_COMMENT", mysql.TypeVarchar, 1024, 0, nil, nil}, +} + +var statisticsCols = []columnInfo{ + {"TABLE_CATALOG", mysql.TypeVarchar, 512, 0, nil, nil}, + {"TABLE_SCHEMA", mysql.TypeVarchar, 64, 0, nil, nil}, + {"TABLE_NAME", mysql.TypeVarchar, 64, 0, nil, nil}, + {"NON_UNIQUE", mysql.TypeVarchar, 1, 0, nil, nil}, + {"INDEX_SCHEMA", mysql.TypeVarchar, 64, 0, nil, nil}, + {"INDEX_NAME", mysql.TypeVarchar, 64, 0, nil, nil}, + {"SEQ_IN_INDEX", mysql.TypeLonglong, 2, 0, nil, nil}, + {"COLUMN_NAME", mysql.TypeVarchar, 21, 0, nil, nil}, + {"COLLATION", mysql.TypeVarchar, 1, 0, nil, nil}, + {"CARDINALITY", mysql.TypeLonglong, 21, 0, nil, nil}, + {"SUB_PART", mysql.TypeLonglong, 3, 0, nil, nil}, + {"PACKED", mysql.TypeVarchar, 10, 0, nil, nil}, + {"NULLABLE", mysql.TypeVarchar, 3, 0, nil, nil}, + {"INDEX_TYPE", mysql.TypeVarchar, 16, 0, nil, nil}, + {"COMMENT", mysql.TypeVarchar, 16, 0, nil, nil}, + {"INDEX_COMMENT", mysql.TypeVarchar, 1024, 0, nil, nil}, +} + +var profilingCols = []columnInfo{ + {"QUERY_ID", mysql.TypeLong, 20, 0, nil, nil}, + {"SEQ", mysql.TypeLong, 20, 0, nil, nil}, + {"STATE", mysql.TypeVarchar, 30, 0, nil, nil}, + {"DURATION", mysql.TypeNewDecimal, 9, 0, nil, nil}, + {"CPU_USER", mysql.TypeNewDecimal, 9, 0, nil, nil}, + {"CPU_SYSTEM", mysql.TypeNewDecimal, 9, 0, nil, nil}, + {"CONTEXT_VOLUNTARY", mysql.TypeLong, 20, 0, nil, nil}, + {"CONTEXT_INVOLUNTARY", mysql.TypeLong, 20, 0, nil, nil}, + {"BLOCK_OPS_IN", mysql.TypeLong, 20, 0, nil, nil}, + {"BLOCK_OPS_OUT", mysql.TypeLong, 20, 0, nil, nil}, + {"MESSAGES_SENT", mysql.TypeLong, 20, 0, nil, nil}, + {"MESSAGES_RECEIVED", mysql.TypeLong, 20, 0, nil, nil}, + {"PAGE_FAULTS_MAJOR", mysql.TypeLong, 20, 0, nil, nil}, + {"PAGE_FAULTS_MINOR", mysql.TypeLong, 20, 0, nil, nil}, + {"SWAPS", mysql.TypeLong, 20, 0, nil, nil}, + {"SOURCE_FUNCTION", mysql.TypeVarchar, 30, 0, nil, nil}, + {"SOURCE_FILE", mysql.TypeVarchar, 20, 0, nil, nil}, + {"SOURCE_LINE", mysql.TypeLong, 20, 0, nil, nil}, +} + +var charsetCols = []columnInfo{ + {"CHARACTER_SET_NAME", mysql.TypeVarchar, 32, 0, nil, nil}, + {"DEFAULT_COLLATE_NAME", mysql.TypeVarchar, 32, 0, nil, nil}, + {"DESCRIPTION", mysql.TypeVarchar, 60, 0, nil, nil}, + {"MAXLEN", mysql.TypeLonglong, 3, 0, nil, nil}, +} + +var collationsCols = []columnInfo{ + {"COLLATION_NAME", mysql.TypeVarchar, 32, 0, nil, nil}, + {"CHARACTER_SET_NAME", mysql.TypeVarchar, 32, 0, nil, nil}, + {"ID", mysql.TypeLonglong, 11, 0, nil, nil}, + {"IS_DEFAULT", mysql.TypeVarchar, 3, 0, nil, nil}, + {"IS_COMPILED", mysql.TypeVarchar, 3, 0, nil, nil}, + {"SORTLEN", mysql.TypeLonglong, 3, 0, nil, nil}, +} + +func dataForCharacterSets() (records [][]types.Datum) { + records = append(records, + types.MakeDatums("ascii", "ascii_general_ci", "US ASCII", 1), + types.MakeDatums("binary", "binary", "Binary pseudo charset", 1), + types.MakeDatums("latin1", "latin1_swedish_ci", "cp1252 West European", 1), + types.MakeDatums("utf8", "utf8_general_ci", "UTF-8 Unicode", 3), + types.MakeDatums("utf8mb4", "utf8mb4_general_ci", "UTF-8 Unicode", 4), + ) + return records +} + +func dataForColltions() (records [][]types.Datum) { + records = append(records, + types.MakeDatums("ascii_general_ci", "ascii", 1, "Yes", "Yes", 1), + types.MakeDatums("binary", "binary", 2, "Yes", "Yes", 1), + types.MakeDatums("latin1_swedish_ci", "latin1", 3, "Yes", "Yes", 1), + types.MakeDatums("utf8_general_ci", "utf8", 4, "Yes", "Yes", 1), + types.MakeDatums("utf8mb4_general_ci", "utf8mb4", 5, "Yes", "Yes", 1), + ) + return records +} + +var filesCols = []columnInfo{ + {"FILE_ID", mysql.TypeLonglong, 4, 0, nil, nil}, + {"FILE_NAME", mysql.TypeVarchar, 64, 0, nil, nil}, + {"TABLESPACE_NAME", mysql.TypeVarchar, 20, 0, nil, nil}, + {"TABLE_CATALOG", mysql.TypeVarchar, 64, 0, nil, nil}, + {"TABLE_SCHEMA", mysql.TypeVarchar, 64, 0, nil, nil}, + {"TABLE_NAME", mysql.TypeVarchar, 64, 0, nil, nil}, + {"LOGFILE_GROUP_NAME", mysql.TypeVarchar, 64, 0, nil, nil}, + {"LOGFILE_GROUP_NUMBER", mysql.TypeLonglong, 32, 0, nil, nil}, + {"ENGINE", mysql.TypeVarchar, 64, 0, nil, nil}, + {"FULLTEXT_KEYS", mysql.TypeVarchar, 64, 0, nil, nil}, + {"DELETED_ROWS", mysql.TypeLonglong, 4, 0, nil, nil}, + {"UPDATE_COUNT", mysql.TypeLonglong, 4, 0, nil, nil}, + {"FREE_EXTENTS", mysql.TypeLonglong, 4, 0, nil, nil}, + {"TOTAL_EXTENTS", mysql.TypeLonglong, 4, 0, nil, nil}, + {"EXTENT_SIZE", mysql.TypeLonglong, 4, 0, nil, nil}, + {"INITIAL_SIZE", mysql.TypeLonglong, 21, 0, nil, nil}, + {"MAXIMUM_SIZE", mysql.TypeLonglong, 21, 0, nil, nil}, + {"AUTOEXTEND_SIZE", mysql.TypeLonglong, 21, 0, nil, nil}, + {"CREATION_TIME", mysql.TypeDatetime, -1, 0, nil, nil}, + {"LAST_UPDATE_TIME", mysql.TypeDatetime, -1, 0, nil, nil}, + {"LAST_ACCESS_TIME", mysql.TypeDatetime, -1, 0, nil, nil}, + {"RECOVER_TIME", mysql.TypeLonglong, 4, 0, nil, nil}, + {"TRANSACTION_COUNTER", mysql.TypeLonglong, 4, 0, nil, nil}, + {"VERSION", mysql.TypeLonglong, 21, 0, nil, nil}, + {"ROW_FORMAT", mysql.TypeVarchar, 21, 0, nil, nil}, + {"TABLE_ROWS", mysql.TypeLonglong, 21, 0, nil, nil}, + {"AVG_ROW_LENGTH", mysql.TypeLonglong, 21, 0, nil, nil}, + {"DATA_FREE", mysql.TypeLonglong, 21, 0, nil, nil}, + {"CREATE_TIME", mysql.TypeDatetime, -1, 0, nil, nil}, + {"UPDATE_TIME", mysql.TypeDatetime, -1, 0, nil, nil}, + {"CHECK_TIME", mysql.TypeDatetime, -1, 0, nil, nil}, + {"CHECKSUM", mysql.TypeLonglong, 21, 0, nil, nil}, + {"STATUS", mysql.TypeVarchar, 20, 0, nil, nil}, + {"EXTRA", mysql.TypeVarchar, 255, 0, nil, nil}, +} + +func dataForSchemata(schemas []string) [][]types.Datum { + sort.Strings(schemas) + rows := [][]types.Datum{} + for _, schema := range schemas { + record := types.MakeDatums( + catalogVal, // CATALOG_NAME + schema, // SCHEMA_NAME + mysql.DefaultCharset, // DEFAULT_CHARACTER_SET_NAME + mysql.DefaultCollationName, // DEFAULT_COLLATION_NAME + nil, + ) + rows = append(rows, record) + } + return rows +} + +func dataForTables(schemas []*model.DBInfo) [][]types.Datum { + rows := [][]types.Datum{} + for _, schema := range schemas { + for _, table := range schema.Tables { + record := types.MakeDatums( + catalogVal, // TABLE_CATALOG + schema.Name.O, // TABLE_SCHEMA + table.Name.O, // TABLE_NAME + "BASE_TABLE", // TABLE_TYPE + "InnoDB", // ENGINE + uint64(10), // VERSION + "Compact", // ROW_FORMAT + uint64(0), // TABLE_ROWS + uint64(0), // AVG_ROW_LENGTH + uint64(16384), // DATA_LENGTH + uint64(0), // MAX_DATA_LENGTH + uint64(0), // INDEX_LENGTH + uint64(0), // DATA_FREE + nil, // AUTO_INCREMENT + nil, // CREATE_TIME + nil, // UPDATE_TIME + nil, // CHECK_TIME + "latin1_swedish_ci", // TABLE_COLLATION + nil, // CHECKSUM + "", // CREATE_OPTIONS + "", // TABLE_COMMENT + ) + rows = append(rows, record) + } + } + return rows +} + +func dataForColumns(schemas []*model.DBInfo) [][]types.Datum { + rows := [][]types.Datum{} + for _, schema := range schemas { + for _, table := range schema.Tables { + rs := dataForColumnsInTable(schema, table) + for _, r := range rs { + rows = append(rows, r) + } + } + } + return rows +} + +func dataForColumnsInTable(schema *model.DBInfo, table *model.TableInfo) [][]types.Datum { + rows := [][]types.Datum{} + for i, col := range table.Columns { + colLen := col.Flen + if colLen == types.UnspecifiedLength { + colLen = mysql.GetDefaultFieldLength(col.Tp) + } + decimal := col.Decimal + if decimal == types.UnspecifiedLength { + decimal = 0 + } + columnType := col.FieldType.CompactStr() + columnDesc := column.NewColDesc(&column.Col{ColumnInfo: *col}) + var columnDefault interface{} + if columnDesc.DefaultValue != nil { + columnDefault = fmt.Sprintf("%v", columnDesc.DefaultValue) + } + record := types.MakeDatums( + catalogVal, // TABLE_CATALOG + schema.Name.O, // TABLE_SCHEMA + table.Name.O, // TABLE_NAME + col.Name.O, // COLUMN_NAME + i+1, // ORIGINAL_POSITION + columnDefault, // COLUMN_DEFAULT + columnDesc.Null, // IS_NULLABLE + types.TypeToStr(col.Tp, col.Charset), // DATA_TYPE + colLen, // CHARACTER_MAXIMUM_LENGTH + colLen, // CHARACTOR_OCTET_LENGTH + decimal, // NUMERIC_PRECISION + 0, // NUMERIC_SCALE + 0, // DATETIME_PRECISION + col.Charset, // CHARACTER_SET_NAME + col.Collate, // COLLATION_NAME + columnType, // COLUMN_TYPE + columnDesc.Key, // COLUMN_KEY + columnDesc.Extra, // EXTRA + "select,insert,update,references", // PRIVILEGES + "", // COLUMN_COMMENT + ) + rows = append(rows, record) + } + return rows +} + +func dataForStatistics(schemas []*model.DBInfo) [][]types.Datum { + rows := [][]types.Datum{} + for _, schema := range schemas { + for _, table := range schema.Tables { + rs := dataForStatisticsInTable(schema, table) + for _, r := range rs { + rows = append(rows, r) + } + } + } + return rows +} + +func dataForStatisticsInTable(schema *model.DBInfo, table *model.TableInfo) [][]types.Datum { + rows := [][]types.Datum{} + if table.PKIsHandle { + for _, col := range table.Columns { + if mysql.HasPriKeyFlag(col.Flag) { + record := types.MakeDatums( + catalogVal, // TABLE_CATALOG + schema.Name.O, // TABLE_SCHEMA + table.Name.O, // TABLE_NAME + "0", // NON_UNIQUE + schema.Name.O, // INDEX_SCHEMA + "PRIMARY", // INDEX_NAME + 1, // SEQ_IN_INDEX + col.Name.O, // COLUMN_NAME + "A", // COLLATION + 0, // CARDINALITY + nil, // SUB_PART + nil, // PACKED + "", // NULLABLE + "BTREE", // INDEX_TYPE + "", // COMMENT + "", // INDEX_COMMENT + ) + rows = append(rows, record) + } + } + } + nameToCol := make(map[string]*model.ColumnInfo, len(table.Columns)) + for _, c := range table.Columns { + nameToCol[c.Name.L] = c + } + for _, index := range table.Indices { + nonUnique := "1" + if index.Unique { + nonUnique = "0" + } + for i, key := range index.Columns { + col := nameToCol[key.Name.L] + nullable := "YES" + if mysql.HasNotNullFlag(col.Flag) { + nullable = "" + } + record := types.MakeDatums( + catalogVal, // TABLE_CATALOG + schema.Name.O, // TABLE_SCHEMA + table.Name.O, // TABLE_NAME + nonUnique, // NON_UNIQUE + schema.Name.O, // INDEX_SCHEMA + index.Name.O, // INDEX_NAME + i+1, // SEQ_IN_INDEX + key.Name.O, // COLUMN_NAME + "A", // COLLATION + 0, // CARDINALITY + nil, // SUB_PART + nil, // PACKED + nullable, // NULLABLE + "BTREE", // INDEX_TYPE + "", // COMMENT + "", // INDEX_COMMENT + ) + rows = append(rows, record) + } + } + return rows +} + +var tableNameToColumns = map[string]([]columnInfo){ + tableSchemata: schemataCols, + tableTables: tablesCols, + tableColumns: columnsCols, + tableStatistics: statisticsCols, + tableCharacterSets: charsetCols, + tableCollations: collationsCols, + tableFiles: filesCols, + tableProfiling: profilingCols, +} + +func createMemoryTable(meta *model.TableInfo, alloc autoid.Allocator) (table.Table, error) { + tbl, _ := tables.MemoryTableFromMeta(alloc, meta) + return tbl, nil +} diff --git a/vendor/github.com/pingcap/tidb/inspectkv/inspectkv.go b/vendor/github.com/pingcap/tidb/inspectkv/inspectkv.go new file mode 100644 index 000000000..1a0efd2b1 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/inspectkv/inspectkv.go @@ -0,0 +1,452 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package inspectkv + +import ( + "io" + "reflect" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/column" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/meta" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/table" + "github.com/pingcap/tidb/table/tables" + "github.com/pingcap/tidb/terror" + "github.com/pingcap/tidb/util" + "github.com/pingcap/tidb/util/types" +) + +// DDLInfo is for DDL information. +type DDLInfo struct { + SchemaVer int64 + ReorgHandle int64 // it's only used for DDL information. + Owner *model.Owner + Job *model.Job +} + +// GetDDLInfo returns DDL information. +func GetDDLInfo(txn kv.Transaction) (*DDLInfo, error) { + var err error + info := &DDLInfo{} + t := meta.NewMeta(txn) + + info.Owner, err = t.GetDDLJobOwner() + if err != nil { + return nil, errors.Trace(err) + } + info.Job, err = t.GetDDLJob(0) + if err != nil { + return nil, errors.Trace(err) + } + info.SchemaVer, err = t.GetSchemaVersion() + if err != nil { + return nil, errors.Trace(err) + } + if info.Job == nil { + return info, nil + } + + info.ReorgHandle, err = t.GetDDLReorgHandle(info.Job) + if err != nil { + return nil, errors.Trace(err) + } + + return info, nil +} + +// GetBgDDLInfo returns background DDL information. +func GetBgDDLInfo(txn kv.Transaction) (*DDLInfo, error) { + var err error + info := &DDLInfo{} + t := meta.NewMeta(txn) + + info.Owner, err = t.GetBgJobOwner() + if err != nil { + return nil, errors.Trace(err) + } + info.Job, err = t.GetBgJob(0) + if err != nil { + return nil, errors.Trace(err) + } + info.SchemaVer, err = t.GetSchemaVersion() + if err != nil { + return nil, errors.Trace(err) + } + + return info, nil +} + +func nextIndexVals(data []types.Datum) []types.Datum { + // Add 0x0 to the end of data. + return append(data, types.Datum{}) +} + +// RecordData is the record data composed of a handle and values. +type RecordData struct { + Handle int64 + Values []types.Datum +} + +// GetIndexRecordsCount returns the total number of the index records from startVals. +// If startVals = nil, returns the total number of the index records. +func GetIndexRecordsCount(txn kv.Transaction, kvIndex kv.Index, startVals []types.Datum) (int64, error) { + it, _, err := kvIndex.Seek(txn, startVals) + if err != nil { + return 0, errors.Trace(err) + } + defer it.Close() + + var cnt int64 + for { + _, _, err := it.Next() + if terror.ErrorEqual(err, io.EOF) { + break + } else if err != nil { + return 0, errors.Trace(err) + } + cnt++ + } + + return cnt, nil +} + +// ScanIndexData scans the index handles and values in a limited number, according to the index information. +// It returns data and the next startVals until it doesn't have data, then returns data is nil and +// the next startVals is the values which can't get data. If startVals = nil and limit = -1, +// it returns the index data of the whole. +func ScanIndexData(txn kv.Transaction, kvIndex kv.Index, startVals []types.Datum, limit int64) ( + []*RecordData, []types.Datum, error) { + it, _, err := kvIndex.Seek(txn, startVals) + if err != nil { + return nil, nil, errors.Trace(err) + } + defer it.Close() + + var idxRows []*RecordData + var curVals []types.Datum + for limit != 0 { + val, h, err1 := it.Next() + if terror.ErrorEqual(err1, io.EOF) { + return idxRows, nextIndexVals(curVals), nil + } else if err1 != nil { + return nil, nil, errors.Trace(err1) + } + idxRows = append(idxRows, &RecordData{Handle: h, Values: val}) + limit-- + curVals = val + } + + nextVals, _, err := it.Next() + if terror.ErrorEqual(err, io.EOF) { + return idxRows, nextIndexVals(curVals), nil + } else if err != nil { + return nil, nil, errors.Trace(err) + } + + return idxRows, nextVals, nil +} + +// CompareIndexData compares index data one by one. +// It returns nil if the data from the index is equal to the data from the table columns, +// otherwise it returns an error with a different set of records. +func CompareIndexData(txn kv.Transaction, t table.Table, idx *column.IndexedCol) error { + err := checkIndexAndRecord(txn, t, idx) + if err != nil { + return errors.Trace(err) + } + + return checkRecordAndIndex(txn, t, idx) +} + +func checkIndexAndRecord(txn kv.Transaction, t table.Table, idx *column.IndexedCol) error { + kvIndex := kv.NewKVIndex(t.IndexPrefix(), idx.Name.L, idx.ID, idx.Unique) + it, err := kvIndex.SeekFirst(txn) + if err != nil { + return errors.Trace(err) + } + defer it.Close() + + cols := make([]*column.Col, len(idx.Columns)) + for i, col := range idx.Columns { + cols[i] = t.Cols()[col.Offset] + } + + for { + vals1, h, err := it.Next() + if terror.ErrorEqual(err, io.EOF) { + break + } else if err != nil { + return errors.Trace(err) + } + + vals2, err := rowWithCols(txn, t, h, cols) + if terror.ErrorEqual(err, kv.ErrNotExist) { + record := &RecordData{Handle: h, Values: vals1} + err = errors.Errorf("index:%v != record:%v", record, nil) + } + if err != nil { + return errors.Trace(err) + } + if !reflect.DeepEqual(vals1, vals2) { + record1 := &RecordData{Handle: h, Values: vals1} + record2 := &RecordData{Handle: h, Values: vals2} + return errors.Errorf("index:%v != record:%v", record1, record2) + } + } + + return nil +} + +func checkRecordAndIndex(txn kv.Transaction, t table.Table, idx *column.IndexedCol) error { + cols := make([]*column.Col, len(idx.Columns)) + for i, col := range idx.Columns { + cols[i] = t.Cols()[col.Offset] + } + + startKey := t.RecordKey(0, nil) + kvIndex := kv.NewKVIndex(t.IndexPrefix(), idx.Name.L, idx.ID, idx.Unique) + filterFunc := func(h1 int64, vals1 []types.Datum, cols []*column.Col) (bool, error) { + isExist, h2, err := kvIndex.Exist(txn, vals1, h1) + if terror.ErrorEqual(err, kv.ErrKeyExists) { + record1 := &RecordData{Handle: h1, Values: vals1} + record2 := &RecordData{Handle: h2, Values: vals1} + return false, errors.Errorf("index:%v != record:%v", record2, record1) + } + if err != nil { + return false, errors.Trace(err) + } + if !isExist { + record := &RecordData{Handle: h1, Values: vals1} + return false, errors.Errorf("index:%v != record:%v", nil, record) + } + + return true, nil + } + err := iterRecords(txn, t, startKey, cols, filterFunc) + + if err != nil { + return errors.Trace(err) + } + + return nil +} + +func scanTableData(retriever kv.Retriever, t table.Table, cols []*column.Col, startHandle, limit int64) ( + []*RecordData, int64, error) { + var records []*RecordData + + startKey := t.RecordKey(startHandle, nil) + filterFunc := func(h int64, d []types.Datum, cols []*column.Col) (bool, error) { + if limit != 0 { + r := &RecordData{ + Handle: h, + Values: d, + } + records = append(records, r) + limit-- + return true, nil + } + + return false, nil + } + err := iterRecords(retriever, t, startKey, cols, filterFunc) + if err != nil { + return nil, 0, errors.Trace(err) + } + + if len(records) == 0 { + return records, startHandle, nil + } + + nextHandle := records[len(records)-1].Handle + 1 + + return records, nextHandle, nil +} + +// ScanTableRecord scans table row handles and column values in a limited number. +// It returns data and the next startHandle until it doesn't have data, then returns data is nil and +// the next startHandle is the handle which can't get data. If startHandle = 0 and limit = -1, +// it returns the table data of the whole. +func ScanTableRecord(retriever kv.Retriever, t table.Table, startHandle, limit int64) ( + []*RecordData, int64, error) { + return scanTableData(retriever, t, t.Cols(), startHandle, limit) +} + +// ScanSnapshotTableRecord scans the ver version of the table data in a limited number. +// It returns data and the next startHandle until it doesn't have data, then returns data is nil and +// the next startHandle is the handle which can't get data. If startHandle = 0 and limit = -1, +// it returns the table data of the whole. +func ScanSnapshotTableRecord(store kv.Storage, ver kv.Version, t table.Table, startHandle, limit int64) ( + []*RecordData, int64, error) { + snap, err := store.GetSnapshot(ver) + if err != nil { + return nil, 0, errors.Trace(err) + } + defer snap.Release() + + records, nextHandle, err := ScanTableRecord(snap, t, startHandle, limit) + + return records, nextHandle, errors.Trace(err) +} + +// CompareTableRecord compares data and the corresponding table data one by one. +// It returns nil if data is equal to the data that scans from table, otherwise +// it returns an error with a different set of records. If exact is false, only compares handle. +func CompareTableRecord(txn kv.Transaction, t table.Table, data []*RecordData, exact bool) error { + m := make(map[int64][]types.Datum, len(data)) + for _, r := range data { + if _, ok := m[r.Handle]; ok { + return errors.Errorf("handle:%d is repeated in data", r.Handle) + } + m[r.Handle] = r.Values + } + + startKey := t.RecordKey(0, nil) + filterFunc := func(h int64, vals []types.Datum, cols []*column.Col) (bool, error) { + vals2, ok := m[h] + if !ok { + record := &RecordData{Handle: h, Values: vals} + return false, errors.Errorf("data:%v != record:%v", nil, record) + } + if !exact { + delete(m, h) + return true, nil + } + + if !reflect.DeepEqual(vals, vals2) { + record1 := &RecordData{Handle: h, Values: vals2} + record2 := &RecordData{Handle: h, Values: vals} + return false, errors.Errorf("data:%v != record:%v", record1, record2) + } + + delete(m, h) + + return true, nil + } + err := iterRecords(txn, t, startKey, t.Cols(), filterFunc) + if err != nil { + return errors.Trace(err) + } + + for h, vals := range m { + record := &RecordData{Handle: h, Values: vals} + return errors.Errorf("data:%v != record:%v", record, nil) + } + + return nil +} + +// GetTableRecordsCount returns the total number of table records from startHandle. +// If startHandle = 0, returns the total number of table records. +func GetTableRecordsCount(txn kv.Transaction, t table.Table, startHandle int64) (int64, error) { + startKey := t.RecordKey(startHandle, nil) + it, err := txn.Seek(startKey) + if err != nil { + return 0, errors.Trace(err) + } + + var cnt int64 + prefix := t.RecordPrefix() + for it.Valid() && it.Key().HasPrefix(prefix) { + handle, err := tables.DecodeRecordKeyHandle(it.Key()) + if err != nil { + return 0, errors.Trace(err) + } + + it.Close() + rk := t.RecordKey(handle+1, nil) + it, err = txn.Seek(rk) + if err != nil { + return 0, errors.Trace(err) + } + + cnt++ + } + + it.Close() + + return cnt, nil +} + +func rowWithCols(txn kv.Retriever, t table.Table, h int64, cols []*column.Col) ([]types.Datum, error) { + v := make([]types.Datum, len(cols)) + for i, col := range cols { + if col.State != model.StatePublic { + return nil, errors.Errorf("Cannot use none public column - %v", cols) + } + if col.IsPKHandleColumn(t.Meta()) { + v[i].SetInt64(h) + continue + } + + k := t.RecordKey(h, col) + data, err := txn.Get(k) + if err != nil { + return nil, errors.Trace(err) + } + + val, err := tables.DecodeValue(data, &col.FieldType) + if err != nil { + return nil, errors.Trace(err) + } + v[i] = val + } + return v, nil +} + +func iterRecords(retriever kv.Retriever, t table.Table, startKey kv.Key, cols []*column.Col, + fn table.RecordIterFunc) error { + it, err := retriever.Seek(startKey) + if err != nil { + return errors.Trace(err) + } + defer it.Close() + + if !it.Valid() { + return nil + } + + log.Debugf("startKey:%q, key:%q, value:%q", startKey, it.Key(), it.Value()) + + prefix := t.RecordPrefix() + for it.Valid() && it.Key().HasPrefix(prefix) { + // first kv pair is row lock information. + // TODO: check valid lock + // get row handle + handle, err := tables.DecodeRecordKeyHandle(it.Key()) + if err != nil { + return errors.Trace(err) + } + + data, err := rowWithCols(retriever, t, handle, cols) + if err != nil { + return errors.Trace(err) + } + more, err := fn(handle, data, cols) + if !more || err != nil { + return errors.Trace(err) + } + + rk := t.RecordKey(handle, nil) + err = kv.NextUntil(it, util.RowKeyPrefixFilter(rk)) + if err != nil { + return errors.Trace(err) + } + } + + return nil +} diff --git a/vendor/github.com/pingcap/tidb/kv/btree_buffer.go b/vendor/github.com/pingcap/tidb/kv/btree_buffer.go new file mode 100644 index 000000000..efa433571 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/btree_buffer.go @@ -0,0 +1,142 @@ +// Copyright 2015 PingCAP, Inc. +// +// Copyright 2015 Wenbin Xiao +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package kv + +import ( + "io" + + "github.com/juju/errors" + "github.com/pingcap/tidb/kv/memkv" + "github.com/pingcap/tidb/terror" + "github.com/pingcap/tidb/util/types" +) + +type btreeBuffer struct { + tree *memkv.Tree +} + +// NewBTreeBuffer returns a breeBuffer. +func NewBTreeBuffer() MemBuffer { + return &btreeBuffer{ + tree: memkv.NewTree(types.Collators[true]), + } +} + +// Get returns the value associated with the key; ErrNotExist error if the key does not exist. +func (b *btreeBuffer) Get(k Key) ([]byte, error) { + v, ok := b.tree.Get(toIfaces(k)) + if !ok { + return nil, ErrNotExist + } + return fromIfaces(v), nil +} + +// Set associates the key with the value. +func (b *btreeBuffer) Set(k Key, v []byte) error { + if len(v) == 0 { + return errors.Trace(ErrCannotSetNilValue) + } + b.tree.Set(toIfaces(k), toIfaces(v)) + return nil +} + +// Delete removes the entry from buffer with provided key. +func (b *btreeBuffer) Delete(k Key) error { + b.tree.Set(toIfaces(k), nil) + return nil +} + +// Release clear the whole buffer. +func (b *btreeBuffer) Release() { + b.tree.Clear() +} + +type btreeIter struct { + e *memkv.Enumerator + k Key + v []byte + ok bool +} + +// Seek creates a new Iterator based on the provided key. +func (b *btreeBuffer) Seek(k Key) (Iterator, error) { + var e *memkv.Enumerator + var err error + if k == nil { + e, err = b.tree.SeekFirst() + if err != nil { + if terror.ErrorEqual(err, io.EOF) { + return &btreeIter{ok: false}, nil + } + return &btreeIter{ok: false}, errors.Trace(err) + } + } else { + key := toIfaces([]byte(k)) + e, _ = b.tree.Seek(key) + } + iter := &btreeIter{e: e} + // the initial push... + err = iter.Next() + if err != nil { + return &btreeIter{ok: false}, errors.Trace(err) + } + return iter, nil +} + +// Close implements Iterator Close. +func (i *btreeIter) Close() { + //noop +} + +// Key implements Iterator Key. +func (i *btreeIter) Key() Key { + return i.k +} + +// Value implements Iterator Value. +func (i *btreeIter) Value() []byte { + return i.v +} + +// Next implements Iterator Next. +func (i *btreeIter) Next() error { + k, v, err := i.e.Next() + if err != nil { + i.ok = false + if terror.ErrorEqual(err, io.EOF) { + return nil + } + return errors.Trace(err) + } + i.k, i.v, i.ok = fromIfaces(k), fromIfaces(v), true + return nil +} + +// Valid implements Iterator Valid. +func (i *btreeIter) Valid() bool { + return i.ok +} + +func toIfaces(v []byte) []interface{} { + return []interface{}{v} +} + +func fromIfaces(v []interface{}) []byte { + if v == nil { + return nil + } + return v[0].([]byte) +} diff --git a/vendor/github.com/pingcap/tidb/kv/buffer_store.go b/vendor/github.com/pingcap/tidb/kv/buffer_store.go new file mode 100644 index 000000000..e211aae8d --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/buffer_store.go @@ -0,0 +1,93 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package kv + +import ( + "github.com/juju/errors" +) + +// BufferStore wraps a Retriever for read and a MemBuffer for buffered write. +// Common usage pattern: +// bs := NewBufferStore(r) // use BufferStore to wrap a Retriever +// defer bs.Release() // make sure it will be released +// // ... +// // read/write on bs +// // ... +// bs.SaveTo(m) // save above operations to a Mutator +type BufferStore struct { + MemBuffer + r Retriever +} + +// NewBufferStore creates a BufferStore using r for read. +func NewBufferStore(r Retriever) *BufferStore { + return &BufferStore{ + r: r, + MemBuffer: &lazyMemBuffer{}, + } +} + +// Get implements the Retriever interface. +func (s *BufferStore) Get(k Key) ([]byte, error) { + val, err := s.MemBuffer.Get(k) + if IsErrNotFound(err) { + val, err = s.r.Get(k) + } + if err != nil { + return nil, errors.Trace(err) + } + if len(val) == 0 { + return nil, errors.Trace(ErrNotExist) + } + return val, nil +} + +// Seek implements the Retriever interface. +func (s *BufferStore) Seek(k Key) (Iterator, error) { + bufferIt, err := s.MemBuffer.Seek(k) + if err != nil { + return nil, errors.Trace(err) + } + retrieverIt, err := s.r.Seek(k) + if err != nil { + return nil, errors.Trace(err) + } + return newUnionIter(bufferIt, retrieverIt), nil +} + +// WalkBuffer iterates all buffered kv pairs. +func (s *BufferStore) WalkBuffer(f func(k Key, v []byte) error) error { + iter, err := s.MemBuffer.Seek(nil) + if err != nil { + return errors.Trace(err) + } + defer iter.Close() + for ; iter.Valid(); iter.Next() { + if err := f(iter.Key(), iter.Value()); err != nil { + return errors.Trace(err) + } + } + return nil +} + +// SaveTo saves all buffered kv pairs into a Mutator. +func (s *BufferStore) SaveTo(m Mutator) error { + err := s.WalkBuffer(func(k Key, v []byte) error { + if len(v) == 0 { + return errors.Trace(m.Delete(k)) + } + return errors.Trace(m.Set(k, v)) + }) + return errors.Trace(err) +} diff --git a/vendor/github.com/pingcap/tidb/kv/bufpool.go b/vendor/github.com/pingcap/tidb/kv/bufpool.go new file mode 100644 index 000000000..0e02e1951 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/bufpool.go @@ -0,0 +1,58 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package kv + +import ( + "sync" + + "github.com/ngaut/log" +) + +// A cache holds a set of reusable objects. +// The slice is a stack (LIFO). +// If more are needed, the cache creates them by calling new. +type cache struct { + mu sync.Mutex + name string + saved []MemBuffer + // factory + fact func() MemBuffer +} + +func (c *cache) put(x MemBuffer) { + c.mu.Lock() + if len(c.saved) < cap(c.saved) { + c.saved = append(c.saved, x) + } else { + log.Warnf("%s is full, size: %d, you may need to increase pool size", c.name, len(c.saved)) + } + c.mu.Unlock() +} + +func (c *cache) get() MemBuffer { + c.mu.Lock() + n := len(c.saved) + if n == 0 { + c.mu.Unlock() + return c.fact() + } + x := c.saved[n-1] + c.saved = c.saved[0 : n-1] + c.mu.Unlock() + return x +} + +func newCache(name string, cap int, fact func() MemBuffer) *cache { + return &cache{name: name, saved: make([]MemBuffer, 0, cap), fact: fact} +} diff --git a/vendor/github.com/pingcap/tidb/kv/error.go b/vendor/github.com/pingcap/tidb/kv/error.go new file mode 100644 index 000000000..831c01c22 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/error.go @@ -0,0 +1,91 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package kv + +import ( + "errors" + "strings" + + "github.com/pingcap/go-themis" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/terror" +) + +// KV error codes. +const ( + CodeIncompatibleDBFormat terror.ErrCode = 1 + CodeNoDataForHandle terror.ErrCode = 2 + CodeKeyExists terror.ErrCode = 3 +) + +var ( + // ErrClosed is used when close an already closed txn. + ErrClosed = errors.New("Error: Transaction already closed") + // ErrNotExist is used when try to get an entry with an unexist key from KV store. + ErrNotExist = errors.New("Error: key not exist") + // ErrConditionNotMatch is used when condition is not met. + ErrConditionNotMatch = errors.New("Error: Condition not match") + // ErrLockConflict is used when try to lock an already locked key. + ErrLockConflict = errors.New("Error: Lock conflict") + // ErrLazyConditionPairsNotMatch is used when value in store differs from expect pairs. + ErrLazyConditionPairsNotMatch = errors.New("Error: Lazy condition pairs not match") + // ErrRetryable is used when KV store occurs RPC error or some other + // errors which SQL layer can safely retry. + ErrRetryable = errors.New("Error: KV error safe to retry") + // ErrCannotSetNilValue is the error when sets an empty value. + ErrCannotSetNilValue = errors.New("can not set nil value") + // ErrInvalidTxn is the error when commits or rollbacks in an invalid transaction. + ErrInvalidTxn = errors.New("invalid transaction") + + // ErrNotCommitted is the error returned by CommitVersion when this + // transaction is not committed. + ErrNotCommitted = errors.New("this transaction has not committed") + + // ErrKeyExists returns when key is already exist. + ErrKeyExists = terror.ClassKV.New(CodeKeyExists, "key already exist") +) + +func init() { + kvMySQLErrCodes := map[terror.ErrCode]uint16{ + CodeKeyExists: mysql.ErrDupEntry, + } + terror.ErrClassToMySQLCodes[terror.ClassKV] = kvMySQLErrCodes +} + +// IsRetryableError checks if the err is a fatal error and the under going operation is worth to retry. +func IsRetryableError(err error) bool { + if err == nil { + return false + } + + if terror.ErrorEqual(err, ErrRetryable) || + terror.ErrorEqual(err, ErrLockConflict) || + terror.ErrorEqual(err, ErrConditionNotMatch) || + terror.ErrorEqual(err, themis.ErrRetryable) || + // HBase exception message will tell you if you should retry or not + strings.Contains(err.Error(), "try again later") { + return true + } + + return false +} + +// IsErrNotFound checks if err is a kind of NotFound error. +func IsErrNotFound(err error) bool { + if terror.ErrorEqual(err, ErrNotExist) { + return true + } + + return false +} diff --git a/vendor/github.com/pingcap/tidb/kv/index_iter.go b/vendor/github.com/pingcap/tidb/kv/index_iter.go new file mode 100644 index 000000000..50884ddc9 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/index_iter.go @@ -0,0 +1,290 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package kv + +import ( + "bytes" + "encoding/binary" + "io" + + "github.com/juju/errors" + "github.com/pingcap/tidb/util/codec" + "github.com/pingcap/tidb/util/types" +) + +var ( + _ Index = (*kvIndex)(nil) + _ IndexIterator = (*indexIter)(nil) +) + +// IndexIterator is the interface for iterator of index data on KV store. +type IndexIterator interface { + Next() (k []types.Datum, h int64, err error) + Close() +} + +// Index is the interface for index data on KV store. +type Index interface { + // Create supports insert into statement. + Create(rm RetrieverMutator, indexedValues []types.Datum, h int64) error + // Delete supports delete from statement. + Delete(m Mutator, indexedValues []types.Datum, h int64) error + // Drop supports drop table, drop index statements. + Drop(rm RetrieverMutator) error + // Exist supports check index exists or not. + Exist(rm RetrieverMutator, indexedValues []types.Datum, h int64) (bool, int64, error) + // GenIndexKey generates an index key. + GenIndexKey(indexedValues []types.Datum, h int64) (key []byte, distinct bool, err error) + // Seek supports where clause. + Seek(r Retriever, indexedValues []types.Datum) (iter IndexIterator, hit bool, err error) + // SeekFirst supports aggregate min and ascend order by. + SeekFirst(r Retriever) (iter IndexIterator, err error) +} + +func encodeHandle(h int64) []byte { + buf := &bytes.Buffer{} + err := binary.Write(buf, binary.BigEndian, h) + if err != nil { + panic(err) + } + return buf.Bytes() +} + +func decodeHandle(data []byte) (int64, error) { + var h int64 + buf := bytes.NewBuffer(data) + err := binary.Read(buf, binary.BigEndian, &h) + return h, errors.Trace(err) +} + +// indexIter is for KV store index iterator. +type indexIter struct { + it Iterator + idx *kvIndex + prefix Key +} + +// Close does the clean up works when KV store index iterator is closed. +func (c *indexIter) Close() { + if c.it != nil { + c.it.Close() + c.it = nil + } +} + +// Next returns current key and moves iterator to the next step. +func (c *indexIter) Next() (val []types.Datum, h int64, err error) { + if !c.it.Valid() { + return nil, 0, errors.Trace(io.EOF) + } + if !c.it.Key().HasPrefix(c.prefix) { + return nil, 0, errors.Trace(io.EOF) + } + // get indexedValues + buf := c.it.Key()[len(c.prefix):] + vv, err := codec.Decode(buf) + if err != nil { + return nil, 0, errors.Trace(err) + } + // if index is *not* unique, the handle is in keybuf + if !c.idx.unique { + h = vv[len(vv)-1].GetInt64() + val = vv[0 : len(vv)-1] + } else { + // otherwise handle is value + h, err = decodeHandle(c.it.Value()) + if err != nil { + return nil, 0, errors.Trace(err) + } + val = vv + } + // update new iter to next + err = c.it.Next() + if err != nil { + return nil, 0, errors.Trace(err) + } + return +} + +// kvIndex is the data structure for index data in the KV store. +type kvIndex struct { + indexName string + indexID int64 + unique bool + prefix Key +} + +// GenIndexPrefix generates the index prefix. +func GenIndexPrefix(indexPrefix Key, indexID int64) Key { + buf := make([]byte, 0, len(indexPrefix)+8) + buf = append(buf, indexPrefix...) + buf = codec.EncodeInt(buf, indexID) + return buf +} + +// NewKVIndex builds a new kvIndex object. +func NewKVIndex(indexPrefix Key, indexName string, indexID int64, unique bool) Index { + index := &kvIndex{ + indexName: indexName, + indexID: indexID, + unique: unique, + prefix: GenIndexPrefix(indexPrefix, indexID), + } + + return index +} + +// GenIndexKey generates storage key for index values. Returned distinct indicates whether the +// indexed values should be distinct in storage (i.e. whether handle is encoded in the key). +func (c *kvIndex) GenIndexKey(indexedValues []types.Datum, h int64) (key []byte, distinct bool, err error) { + if c.unique { + // See: https://dev.mysql.com/doc/refman/5.7/en/create-index.html + // A UNIQUE index creates a constraint such that all values in the index must be distinct. + // An error occurs if you try to add a new row with a key value that matches an existing row. + // For all engines, a UNIQUE index permits multiple NULL values for columns that can contain NULL. + distinct = true + for _, cv := range indexedValues { + if cv.Kind() == types.KindNull { + distinct = false + break + } + } + } + + key = append(key, c.prefix...) + if distinct { + key, err = codec.EncodeKey(key, indexedValues...) + } else { + key, err = codec.EncodeKey(key, append(indexedValues, types.NewDatum(h))...) + } + if err != nil { + return nil, false, errors.Trace(err) + } + return +} + +// Create creates a new entry in the kvIndex data. +// If the index is unique and there is an existing entry with the same key, Create will return ErrKeyExists. +func (c *kvIndex) Create(rm RetrieverMutator, indexedValues []types.Datum, h int64) error { + key, distinct, err := c.GenIndexKey(indexedValues, h) + if err != nil { + return errors.Trace(err) + } + if !distinct { + // TODO: reconsider value + err = rm.Set(key, []byte("timestamp?")) + return errors.Trace(err) + } + + _, err = rm.Get(key) + if IsErrNotFound(err) { + err = rm.Set(key, encodeHandle(h)) + return errors.Trace(err) + } + + return errors.Trace(ErrKeyExists) +} + +// Delete removes the entry for handle h and indexdValues from KV index. +func (c *kvIndex) Delete(m Mutator, indexedValues []types.Datum, h int64) error { + key, _, err := c.GenIndexKey(indexedValues, h) + if err != nil { + return errors.Trace(err) + } + err = m.Delete(key) + return errors.Trace(err) +} + +// Drop removes the KV index from store. +func (c *kvIndex) Drop(rm RetrieverMutator) error { + it, err := rm.Seek(c.prefix) + if err != nil { + return errors.Trace(err) + } + defer it.Close() + + // remove all indices + for it.Valid() { + if !it.Key().HasPrefix(c.prefix) { + break + } + err := rm.Delete(it.Key()) + if err != nil { + return errors.Trace(err) + } + err = it.Next() + if err != nil { + return errors.Trace(err) + } + } + return nil +} + +// Seek searches KV index for the entry with indexedValues. +func (c *kvIndex) Seek(r Retriever, indexedValues []types.Datum) (iter IndexIterator, hit bool, err error) { + key, _, err := c.GenIndexKey(indexedValues, 0) + if err != nil { + return nil, false, errors.Trace(err) + } + it, err := r.Seek(key) + if err != nil { + return nil, false, errors.Trace(err) + } + // check if hit + hit = false + if it.Valid() && it.Key().Cmp(key) == 0 { + hit = true + } + return &indexIter{it: it, idx: c, prefix: c.prefix}, hit, nil +} + +// SeekFirst returns an iterator which points to the first entry of the KV index. +func (c *kvIndex) SeekFirst(r Retriever) (iter IndexIterator, err error) { + it, err := r.Seek(c.prefix) + if err != nil { + return nil, errors.Trace(err) + } + return &indexIter{it: it, idx: c, prefix: c.prefix}, nil +} + +func (c *kvIndex) Exist(rm RetrieverMutator, indexedValues []types.Datum, h int64) (bool, int64, error) { + key, distinct, err := c.GenIndexKey(indexedValues, h) + if err != nil { + return false, 0, errors.Trace(err) + } + + value, err := rm.Get(key) + if IsErrNotFound(err) { + return false, 0, nil + } + if err != nil { + return false, 0, errors.Trace(err) + } + + // For distinct index, the value of key is handle. + if distinct { + handle, err := decodeHandle(value) + if err != nil { + return false, 0, errors.Trace(err) + } + + if handle != h { + return true, handle, errors.Trace(ErrKeyExists) + } + + return true, handle, nil + } + + return true, h, nil +} diff --git a/vendor/github.com/pingcap/tidb/kv/iter.go b/vendor/github.com/pingcap/tidb/kv/iter.go new file mode 100644 index 000000000..2c337be3c --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/iter.go @@ -0,0 +1,29 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package kv + +import "github.com/juju/errors" + +// NextUntil applies FnKeyCmp to each entry of the iterator until meets some condition. +// It will stop when fn returns true, or iterator is invalid or an error occurs. +func NextUntil(it Iterator, fn FnKeyCmp) error { + var err error + for it.Valid() && !fn(it.Key()) { + err = it.Next() + if err != nil { + return errors.Trace(err) + } + } + return nil +} diff --git a/vendor/github.com/pingcap/tidb/kv/key.go b/vendor/github.com/pingcap/tidb/kv/key.go new file mode 100644 index 000000000..fed902ff2 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/key.go @@ -0,0 +1,57 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package kv + +import "bytes" + +// Key represents high-level Key type. +type Key []byte + +// Next returns the next key in byte-order. +func (k Key) Next() Key { + // add 0x0 to the end of key + buf := make([]byte, len([]byte(k))+1) + copy(buf, []byte(k)) + return buf +} + +// Cmp returns the comparison result of two key. +// The result will be 0 if a==b, -1 if a < b, and +1 if a > b. +func (k Key) Cmp(another Key) int { + return bytes.Compare(k, another) +} + +// HasPrefix tests whether the Key begins with prefix. +func (k Key) HasPrefix(prefix Key) bool { + return bytes.HasPrefix(k, prefix) +} + +// Clone returns a copy of the Key. +func (k Key) Clone() Key { + return append([]byte(nil), k...) +} + +// EncodedKey represents encoded key in low-level storage engine. +type EncodedKey []byte + +// Cmp returns the comparison result of two key. +// The result will be 0 if a==b, -1 if a < b, and +1 if a > b. +func (k EncodedKey) Cmp(another EncodedKey) int { + return bytes.Compare(k, another) +} + +// Next returns the next key in byte-order. +func (k EncodedKey) Next() EncodedKey { + return EncodedKey(bytes.Join([][]byte{k, Key{0}}, nil)) +} diff --git a/vendor/github.com/pingcap/tidb/kv/kv.go b/vendor/github.com/pingcap/tidb/kv/kv.go new file mode 100644 index 000000000..fb75e4944 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/kv.go @@ -0,0 +1,172 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package kv + +import "io" + +const ( + // PresumeKeyNotExists directives that when dealing with a Get operation but failing to read data from cache, + // we presume that the key does not exist in Store. The actual existence will be checked before the + // transaction's commit. + // This option is an optimization for frequent checks during a transaction, e.g. batch inserts. + PresumeKeyNotExists Option = iota + 1 + // PresumeKeyNotExistsError is the option key for error. + // When PresumeKeyNotExists is set and condition is not match, should throw the error. + PresumeKeyNotExistsError +) + +// Retriever is the interface wraps the basic Get and Seek methods. +type Retriever interface { + // Get gets the value for key k from kv store. + // If corresponding kv pair does not exist, it returns nil and ErrNotExist. + Get(k Key) ([]byte, error) + // Seek creates an Iterator positioned on the first entry that k <= entry's key. + // If such entry is not found, it returns an invalid Iterator with no error. + // The Iterator must be Closed after use. + Seek(k Key) (Iterator, error) +} + +// Mutator is the interface wraps the basic Set and Delete methods. +type Mutator interface { + // Set sets the value for key k as v into kv store. + // v must NOT be nil or empty, otherwise it returns ErrCannotSetNilValue. + Set(k Key, v []byte) error + // Delete removes the entry for key k from kv store. + Delete(k Key) error +} + +// RetrieverMutator is the interface that groups Retriever and Mutator interfaces. +type RetrieverMutator interface { + Retriever + Mutator +} + +// MemBuffer is an in-memory kv collection. It should be released after use. +type MemBuffer interface { + RetrieverMutator + // Release releases the buffer. + Release() +} + +// Transaction defines the interface for operations inside a Transaction. +// This is not thread safe. +type Transaction interface { + RetrieverMutator + // Commit commits the transaction operations to KV store. + Commit() error + // Rollback undoes the transaction operations to KV store. + Rollback() error + // String implements fmt.Stringer interface. + String() string + // LockKeys tries to lock the entries with the keys in KV store. + LockKeys(keys ...Key) error + // SetOption sets an option with a value, when val is nil, uses the default + // value of this option. + SetOption(opt Option, val interface{}) + // DelOption deletes an option. + DelOption(opt Option) + // IsReadOnly checks if the transaction has only performed read operations. + IsReadOnly() bool + // GetClient gets a client instance. + GetClient() Client + // StartTS returns the transaction start timestamp. + StartTS() int64 +} + +// Client is used to send request to KV layer. +type Client interface { + // Send sends request to KV layer, returns a Response. + Send(req *Request) Response + + // SupportRequestType checks if reqType and subType is supported. + SupportRequestType(reqType, subType int64) bool +} + +// ReqTypes. +const ( + ReqTypeSelect = 101 + ReqTypeIndex = 102 +) + +// KeyRange represents a range where StartKey <= key < EndKey. +type KeyRange struct { + StartKey Key + EndKey Key +} + +// Request represents a kv request. +type Request struct { + // The request type. + Tp int64 + Data []byte + // Key Ranges + KeyRanges []KeyRange + // If desc is true, the request is sent in descending order. + Desc bool + // If concurrency is 1, it only sends the request to a single storage unit when + // ResponseIterator.Next is called. If concurrency is greater than 1, the request will be + // sent to multiple storage units concurrently. + Concurrency int +} + +// Response represents the response returned from KV layer. +type Response interface { + // Next returns a resultSubset from a single storage unit. + // When full result set is returned, nil is returned. + Next() (resultSubset io.ReadCloser, err error) +} + +// Snapshot defines the interface for the snapshot fetched from KV store. +type Snapshot interface { + Retriever + // BatchGet gets a batch of values from snapshot. + BatchGet(keys []Key) (map[string][]byte, error) + // Release releases the snapshot to store. + Release() +} + +// Driver is the interface that must be implemented by a KV storage. +type Driver interface { + // Open returns a new Storage. + // The path is the string for storage specific format. + Open(path string) (Storage, error) +} + +// Storage defines the interface for storage. +// Isolation should be at least SI(SNAPSHOT ISOLATION) +type Storage interface { + // Begin transaction + Begin() (Transaction, error) + // GetSnapshot gets a snapshot that is able to read any data which data is <= ver. + // if ver is MaxVersion or > current max committed version, we will use current version for this snapshot. + GetSnapshot(ver Version) (Snapshot, error) + // Close store + Close() error + // Storage's unique ID + UUID() string + // CurrentVersion returns current max committed version. + CurrentVersion() (Version, error) +} + +// FnKeyCmp is the function for iterator the keys +type FnKeyCmp func(key Key) bool + +// Iterator is the interface for a iterator on KV store. +type Iterator interface { + Valid() bool + Key() Key + Value() []byte + Next() error + Close() +} diff --git a/vendor/github.com/pingcap/tidb/kv/memdb_buffer.go b/vendor/github.com/pingcap/tidb/kv/memdb_buffer.go new file mode 100644 index 000000000..82c897ee4 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/memdb_buffer.go @@ -0,0 +1,106 @@ +// Copyright 2015 PingCAP, Inc. +// +// Copyright 2015 Wenbin Xiao +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package kv + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/terror" + "github.com/syndtr/goleveldb/leveldb" + "github.com/syndtr/goleveldb/leveldb/comparer" + "github.com/syndtr/goleveldb/leveldb/iterator" + "github.com/syndtr/goleveldb/leveldb/memdb" + "github.com/syndtr/goleveldb/leveldb/util" +) + +type memDbBuffer struct { + db *memdb.DB +} + +type memDbIter struct { + iter iterator.Iterator +} + +// NewMemDbBuffer creates a new memDbBuffer. +func NewMemDbBuffer() MemBuffer { + return &memDbBuffer{db: memdb.New(comparer.DefaultComparer, 4*1024)} +} + +// Seek creates an Iterator. +func (m *memDbBuffer) Seek(k Key) (Iterator, error) { + var i Iterator + if k == nil { + i = &memDbIter{iter: m.db.NewIterator(&util.Range{})} + } else { + i = &memDbIter{iter: m.db.NewIterator(&util.Range{Start: []byte(k)})} + } + i.Next() + return i, nil +} + +// Get returns the value associated with key. +func (m *memDbBuffer) Get(k Key) ([]byte, error) { + v, err := m.db.Get(k) + if terror.ErrorEqual(err, leveldb.ErrNotFound) { + return nil, ErrNotExist + } + return v, nil +} + +// Set associates key with value. +func (m *memDbBuffer) Set(k Key, v []byte) error { + if len(v) == 0 { + return errors.Trace(ErrCannotSetNilValue) + } + err := m.db.Put(k, v) + return errors.Trace(err) +} + +// Delete removes the entry from buffer with provided key. +func (m *memDbBuffer) Delete(k Key) error { + err := m.db.Put(k, nil) + return errors.Trace(err) +} + +// Release reset the buffer. +func (m *memDbBuffer) Release() { + m.db.Reset() +} + +// Next implements the Iterator Next. +func (i *memDbIter) Next() error { + i.iter.Next() + return nil +} + +// Valid implements the Iterator Valid. +func (i *memDbIter) Valid() bool { + return i.iter.Valid() +} + +// Key implements the Iterator Key. +func (i *memDbIter) Key() Key { + return i.iter.Key() +} + +// Value implements the Iterator Value. +func (i *memDbIter) Value() []byte { + return i.iter.Value() +} + +// Close Implements the Iterator Close. +func (i *memDbIter) Close() { + i.iter.Release() +} diff --git a/vendor/github.com/pingcap/tidb/kv/memkv/btree.go b/vendor/github.com/pingcap/tidb/kv/memkv/btree.go new file mode 100644 index 000000000..34e249162 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/memkv/btree.go @@ -0,0 +1,739 @@ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package memkv + +import ( + "io" +) + +const ( + kx = 128 //DONE benchmark tune this number if using custom key/value type(s). + kd = 64 //DONE benchmark tune this number if using custom key/value type(s). +) + +type ( + // cmp compares a and b. Return value is: + // + // < 0 if a < b + // 0 if a == b + // > 0 if a > b + // + cmp func(a, b []interface{}) int + + d struct { // data page + c int + d [2*kd + 1]de + n *d + p *d + } + + de struct { // d element + k []interface{} + v []interface{} + } + + // Enumerator is the iterator for btree + Enumerator struct { + err error + hit bool + i int + k []interface{} + q *d + t *Tree + ver int64 + } + + // Tree is a B+tree. + Tree struct { + c int + cmp cmp + first *d + last *d + r interface{} + ver int64 + } + + xe struct { // x element + ch interface{} + sep *d + } + + x struct { // index page + c int + x [2*kx + 2]xe + } +) + +var ( // R/O zero values + zd d + zde de + zx x + zxe xe +) + +func clr(q interface{}) { + switch z := q.(type) { + case *x: + for i := 0; i <= z.c; i++ { // Ch0 Sep0 ... Chn-1 Sepn-1 Chn + clr(z.x[i].ch) + } + *z = zx // GC + case *d: + *z = zd // GC + } +} + +// -------------------------------------------------------------------------- x + +func newX(ch0 interface{}) *x { + r := &x{} + r.x[0].ch = ch0 + return r +} + +func (q *x) extract(i int) { + q.c-- + if i < q.c { + copy(q.x[i:], q.x[i+1:q.c+1]) + q.x[q.c].ch = q.x[q.c+1].ch + q.x[q.c].sep = nil // GC + q.x[q.c+1] = zxe // GC + } +} + +func (q *x) insert(i int, d *d, ch interface{}) *x { + c := q.c + if i < c { + q.x[c+1].ch = q.x[c].ch + copy(q.x[i+2:], q.x[i+1:c]) + q.x[i+1].sep = q.x[i].sep + } + c++ + q.c = c + q.x[i].sep = d + q.x[i+1].ch = ch + return q +} + +func (q *x) siblings(i int) (l, r *d) { + if i >= 0 { + if i > 0 { + l = q.x[i-1].ch.(*d) + } + if i < q.c { + r = q.x[i+1].ch.(*d) + } + } + return +} + +// -------------------------------------------------------------------------- d + +func (l *d) mvL(r *d, c int) { + copy(l.d[l.c:], r.d[:c]) + copy(r.d[:], r.d[c:r.c]) + l.c += c + r.c -= c +} + +func (l *d) mvR(r *d, c int) { + copy(r.d[c:], r.d[:r.c]) + copy(r.d[:c], l.d[l.c-c:]) + r.c += c + l.c -= c +} + +// ----------------------------------------------------------------------- tree + +// NewTree returns a newly created, empty tree. The compare function is used +// for key collation. +func NewTree(cmp cmp) *Tree { + return &Tree{cmp: cmp} +} + +// Clear removes all K/V pairs from the tree. +func (t *Tree) Clear() { + if t.r == nil { + return + } + + clr(t.r) + t.c, t.first, t.last, t.r = 0, nil, nil, nil + t.ver++ +} + +func (t *Tree) cat(p *x, q, r *d, pi int) { + t.ver++ + q.mvL(r, r.c) + if r.n != nil { + r.n.p = q + } else { + t.last = q + } + q.n = r.n + if p.c > 1 { + p.extract(pi) + p.x[pi].ch = q + } else { + t.r = q + } +} + +func (t *Tree) catX(p, q, r *x, pi int) { + t.ver++ + q.x[q.c].sep = p.x[pi].sep + copy(q.x[q.c+1:], r.x[:r.c]) + q.c += r.c + 1 + q.x[q.c].ch = r.x[r.c].ch + if p.c > 1 { + p.c-- + pc := p.c + if pi < pc { + p.x[pi].sep = p.x[pi+1].sep + copy(p.x[pi+1:], p.x[pi+2:pc+1]) + p.x[pc].ch = p.x[pc+1].ch + p.x[pc].sep = nil // GC + p.x[pc+1].ch = nil // GC + } + return + } + + t.r = q +} + +//Delete removes the k's KV pair, if it exists, in which case Delete returns +//true. +func (t *Tree) Delete(k []interface{}) (ok bool) { + pi := -1 + var p *x + q := t.r + if q == nil { + return + } + + for { + var i int + i, ok = t.find(q, k) + if ok { + switch z := q.(type) { + case *x: + dp := z.x[i].sep + switch { + case dp.c > kd: + t.extract(dp, 0) + default: + if z.c < kx && q != t.r { + t.underflowX(p, &z, pi, &i) + } + pi = i + 1 + p = z + q = z.x[pi].ch + ok = false + continue + } + case *d: + t.extract(z, i) + if z.c >= kd { + return + } + + if q != t.r { + t.underflow(p, z, pi) + } else if t.c == 0 { + t.Clear() + } + } + return + } + + switch z := q.(type) { + case *x: + if z.c < kx && q != t.r { + t.underflowX(p, &z, pi, &i) + } + pi = i + p = z + q = z.x[i].ch + case *d: + return + } + } +} + +func (t *Tree) extract(q *d, i int) { // (r []interface{}) { + t.ver++ + //r = q.d[i].v // prepared for Extract + q.c-- + if i < q.c { + copy(q.d[i:], q.d[i+1:q.c+1]) + } + q.d[q.c] = zde // GC + t.c-- + return +} + +func (t *Tree) find(q interface{}, k []interface{}) (i int, ok bool) { + var mk []interface{} + l := 0 + switch z := q.(type) { + case *x: + h := z.c - 1 + for l <= h { + m := (l + h) >> 1 + mk = z.x[m].sep.d[0].k + switch cmp := t.cmp(k, mk); { + case cmp > 0: + l = m + 1 + case cmp == 0: + return m, true + default: + h = m - 1 + } + } + case *d: + h := z.c - 1 + for l <= h { + m := (l + h) >> 1 + mk = z.d[m].k + switch cmp := t.cmp(k, mk); { + case cmp > 0: + l = m + 1 + case cmp == 0: + return m, true + default: + h = m - 1 + } + } + } + return l, false +} + +// First returns the first item of the tree in the key collating order, or +// (nil, nil) if the tree is empty. +func (t *Tree) First() (k []interface{}, v []interface{}) { + if q := t.first; q != nil { + q := &q.d[0] + k, v = q.k, q.v + } + return +} + +// Get returns the value associated with k and true if it exists. Otherwise Get +// returns (nil, false). +func (t *Tree) Get(k []interface{}) (v []interface{}, ok bool) { + q := t.r + if q == nil { + return + } + + for { + var i int + if i, ok = t.find(q, k); ok { + switch z := q.(type) { + case *x: + return z.x[i].sep.d[0].v, true + case *d: + return z.d[i].v, true + } + } + switch z := q.(type) { + case *x: + q = z.x[i].ch + default: + return + } + } +} + +func (t *Tree) insert(q *d, i int, k []interface{}, v []interface{}) *d { + t.ver++ + c := q.c + if i < c { + copy(q.d[i+1:], q.d[i:c]) + } + c++ + q.c = c + q.d[i].k, q.d[i].v = k, v + t.c++ + return q +} + +// Last returns the last item of the tree in the key collating order, or (nil, +// nil) if the tree is empty. +func (t *Tree) Last() (k []interface{}, v []interface{}) { + if q := t.last; q != nil { + q := &q.d[q.c-1] + k, v = q.k, q.v + } + return +} + +// Len returns the number of items in the tree. +func (t *Tree) Len() int { + return t.c +} + +func (t *Tree) overflow(p *x, q *d, pi, i int, k []interface{}, v []interface{}) { + t.ver++ + l, r := p.siblings(pi) + + if l != nil && l.c < 2*kd { + l.mvL(q, 1) + t.insert(q, i-1, k, v) + return + } + + if r != nil && r.c < 2*kd { + if i < 2*kd { + q.mvR(r, 1) + t.insert(q, i, k, v) + } else { + t.insert(r, 0, k, v) + } + return + } + + t.split(p, q, pi, i, k, v) +} + +// Seek returns an Enumerator positioned on a an item such that k >= item's +// key. ok reports if k == item.key The Enumerator's position is possibly +// after the last item in the tree. +func (t *Tree) Seek(k []interface{}) (e *Enumerator, ok bool) { + q := t.r + if q == nil { + e = &Enumerator{nil, false, 0, k, nil, t, t.ver} + return + } + + for { + var i int + if i, ok = t.find(q, k); ok { + switch z := q.(type) { + case *x: + e = &Enumerator{nil, ok, 0, k, z.x[i].sep, t, t.ver} + return + case *d: + e = &Enumerator{nil, ok, i, k, z, t, t.ver} + return + } + } + switch z := q.(type) { + case *x: + q = z.x[i].ch + case *d: + e = &Enumerator{nil, ok, i, k, z, t, t.ver} + return + } + } +} + +// SeekFirst returns an Enumerator positioned on the first KV pair in the tree, +// if any. For an empty tree, err == io.EOF is returned and e will be nil. +func (t *Tree) SeekFirst() (e *Enumerator, err error) { + q := t.first + if q == nil { + return nil, io.EOF + } + + return &Enumerator{nil, true, 0, q.d[0].k, q, t, t.ver}, nil +} + +// SeekLast returns an Enumerator positioned on the last KV pair in the tree, +// if any. For an empty tree, err == io.EOF is returned and e will be nil. +func (t *Tree) SeekLast() (e *Enumerator, err error) { + q := t.last + if q == nil { + return nil, io.EOF + } + + return &Enumerator{nil, true, q.c - 1, q.d[q.c-1].k, q, t, t.ver}, nil +} + +// Set sets the value associated with k. +func (t *Tree) Set(k []interface{}, v []interface{}) { + pi := -1 + var p *x + q := t.r + if q != nil { + for { + i, ok := t.find(q, k) + if ok { + switch z := q.(type) { + case *x: + z.x[i].sep.d[0].v = v + case *d: + z.d[i].v = v + } + return + } + + switch z := q.(type) { + case *x: + if z.c > 2*kx { + t.splitX(p, &z, pi, &i) + } + pi = i + p = z + q = z.x[i].ch + case *d: + switch { + case z.c < 2*kd: + t.insert(z, i, k, v) + default: + t.overflow(p, z, pi, i, k, v) + } + return + } + } + } + + z := t.insert(&d{}, 0, k, v) + t.r, t.first, t.last = z, z, z + return +} + +func (t *Tree) split(p *x, q *d, pi, i int, k []interface{}, v []interface{}) { + t.ver++ + r := &d{} + if q.n != nil { + r.n = q.n + r.n.p = r + } else { + t.last = r + } + q.n = r + r.p = q + + copy(r.d[:], q.d[kd:2*kd]) + for i := range q.d[kd:] { + q.d[kd+i] = zde + } + q.c = kd + r.c = kd + if pi >= 0 { + p.insert(pi, r, r) + } else { + t.r = newX(q).insert(0, r, r) + } + if i > kd { + t.insert(r, i-kd, k, v) + return + } + + t.insert(q, i, k, v) +} + +func (t *Tree) splitX(p *x, pp **x, pi int, i *int) { + t.ver++ + q := *pp + r := &x{} + copy(r.x[:], q.x[kx+1:]) + q.c = kx + r.c = kx + if pi >= 0 { + p.insert(pi, q.x[kx].sep, r) + } else { + t.r = newX(q).insert(0, q.x[kx].sep, r) + } + q.x[kx].sep = nil + for i := range q.x[kx+1:] { + q.x[kx+i+1] = zxe + } + if *i > kx { + *pp = r + *i -= kx + 1 + } +} + +func (t *Tree) underflow(p *x, q *d, pi int) { + t.ver++ + l, r := p.siblings(pi) + + if l != nil && l.c+q.c >= 2*kd { + l.mvR(q, 1) + } else if r != nil && q.c+r.c >= 2*kd { + q.mvL(r, 1) + r.d[r.c] = zde // GC + } else if l != nil { + t.cat(p, l, q, pi-1) + } else { + t.cat(p, q, r, pi) + } +} + +func (t *Tree) underflowX(p *x, pp **x, pi int, i *int) { + t.ver++ + var l, r *x + q := *pp + + if pi >= 0 { + if pi > 0 { + l = p.x[pi-1].ch.(*x) + } + if pi < p.c { + r = p.x[pi+1].ch.(*x) + } + } + + if l != nil && l.c > kx { + q.x[q.c+1].ch = q.x[q.c].ch + copy(q.x[1:], q.x[:q.c]) + q.x[0].ch = l.x[l.c].ch + q.x[0].sep = p.x[pi-1].sep + q.c++ + *i++ + l.c-- + p.x[pi-1].sep = l.x[l.c].sep + return + } + + if r != nil && r.c > kx { + q.x[q.c].sep = p.x[pi].sep + q.c++ + q.x[q.c].ch = r.x[0].ch + p.x[pi].sep = r.x[0].sep + copy(r.x[:], r.x[1:r.c]) + r.c-- + rc := r.c + r.x[rc].ch = r.x[rc+1].ch + r.x[rc].sep = nil + r.x[rc+1].ch = nil + return + } + + if l != nil { + *i += l.c + 1 + t.catX(p, l, q, pi-1) + *pp = l + return + } + + t.catX(p, q, r, pi) +} + +// ----------------------------------------------------------------- Enumerator + +// Next returns the currently enumerated item, if it exists and moves to the +// next item in the key collation order. If there is no item to return, err == +// io.EOF is returned. +func (e *Enumerator) Next() (k []interface{}, v []interface{}, err error) { + if err = e.err; err != nil { + return + } + + if e.ver != e.t.ver { + f, hit := e.t.Seek(e.k) + if !e.hit && hit { + if err = f.next(); err != nil { + return + } + } + + *e = *f + } + if e.q == nil { + e.err, err = io.EOF, io.EOF + return + } + + if e.i >= e.q.c { + if err = e.next(); err != nil { + return + } + } + + i := e.q.d[e.i] + k, v = i.k, i.v + e.k, e.hit = k, false + e.next() + return +} + +func (e *Enumerator) next() error { + if e.q == nil { + e.err = io.EOF + return io.EOF + } + + switch { + case e.i < e.q.c-1: + e.i++ + default: + if e.q, e.i = e.q.n, 0; e.q == nil { + e.err = io.EOF + } + } + return e.err +} + +// Prev returns the currently enumerated item, if it exists and moves to the +// previous item in the key collation order. If there is no item to return, err +// == io.EOF is returned. +func (e *Enumerator) Prev() (k []interface{}, v []interface{}, err error) { + if err = e.err; err != nil { + return + } + + if e.ver != e.t.ver { + f, hit := e.t.Seek(e.k) + if !e.hit && hit { + if err = f.prev(); err != nil { + return + } + } + + *e = *f + } + if e.q == nil { + e.err, err = io.EOF, io.EOF + return + } + + if e.i >= e.q.c { + if err = e.next(); err != nil { + return + } + } + + i := e.q.d[e.i] + k, v = i.k, i.v + e.k, e.hit = k, false + e.prev() + return +} + +func (e *Enumerator) prev() error { + if e.q == nil { + e.err = io.EOF + return io.EOF + } + + switch { + case e.i > 0: + e.i-- + default: + if e.q = e.q.p; e.q == nil { + e.err = io.EOF + break + } + + e.i = e.q.c - 1 + } + return e.err +} diff --git a/vendor/github.com/pingcap/tidb/kv/memkv/temp.go b/vendor/github.com/pingcap/tidb/kv/memkv/temp.go new file mode 100644 index 000000000..01e9d43d0 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/memkv/temp.go @@ -0,0 +1,72 @@ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package memkv + +import ( + "github.com/pingcap/tidb/util/types" +) + +type btreeIterator interface { + Next() (k, v []interface{}, err error) +} + +// Temp is the interface of a memory kv storage +type Temp interface { + Drop() (err error) + Get(k []interface{}) (v []interface{}, err error) + SeekFirst() (e btreeIterator, err error) + Set(k, v []interface{}) (err error) +} + +// memtemp for join/groupby or any aggregation operation +type memTemp struct { + // memory btree + tree *Tree +} + +// CreateTemp returns a new empty memory kv +func CreateTemp(asc bool) (_ Temp, err error) { + return &memTemp{ + tree: NewTree(types.Collators[asc]), + }, nil +} + +func (t *memTemp) Get(k []interface{}) (v []interface{}, err error) { + v, _ = t.tree.Get(k) + return +} + +func (t *memTemp) Drop() (err error) { return } + +func (t *memTemp) Set(k, v []interface{}) (err error) { + vv, err := types.Clone(v) + if err != nil { + return err + } + t.tree.Set(append([]interface{}(nil), k...), vv.([]interface{})) + return +} + +func (t *memTemp) SeekFirst() (e btreeIterator, err error) { + it, err := t.tree.SeekFirst() + if err != nil { + return + } + + return it, nil +} diff --git a/vendor/github.com/pingcap/tidb/kv/txn.go b/vendor/github.com/pingcap/tidb/kv/txn.go new file mode 100644 index 000000000..18515380b --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/txn.go @@ -0,0 +1,78 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package kv + +import ( + "math" + "math/rand" + "time" + + "github.com/juju/errors" + "github.com/ngaut/log" +) + +// RunInNewTxn will run the f in a new transaction environment. +func RunInNewTxn(store Storage, retryable bool, f func(txn Transaction) error) error { + for i := 0; i < maxRetryCnt; i++ { + txn, err := store.Begin() + if err != nil { + log.Errorf("[kv] RunInNewTxn error - %v", err) + return errors.Trace(err) + } + + err = f(txn) + if retryable && IsRetryableError(err) { + log.Warnf("[kv] Retry txn %v", txn) + txn.Rollback() + continue + } + if err != nil { + txn.Rollback() + return errors.Trace(err) + } + + err = txn.Commit() + if retryable && IsRetryableError(err) { + log.Warnf("[kv] Retry txn %v", txn) + txn.Rollback() + BackOff(i) + continue + } + if err != nil { + return errors.Trace(err) + } + break + } + + return nil +} + +var ( + // Max retry count in RunInNewTxn + maxRetryCnt = 100 + // retryBackOffBase is the initial duration, in microsecond, a failed transaction stays dormancy before it retries + retryBackOffBase = 1 + // retryBackOffCap is the max amount of duration, in microsecond, a failed transaction stays dormancy before it retries + retryBackOffCap = 100 +) + +// BackOff Implements exponential backoff with full jitter. +// Returns real back off time in microsecond. +// See: http://www.awsarchitectureblog.com/2015/03/backoff.html. +func BackOff(attempts int) int { + upper := int(math.Min(float64(retryBackOffCap), float64(retryBackOffBase)*math.Pow(2.0, float64(attempts)))) + sleep := time.Duration(rand.Intn(upper)) * time.Millisecond + time.Sleep(sleep) + return int(sleep) +} diff --git a/vendor/github.com/pingcap/tidb/kv/union_iter.go b/vendor/github.com/pingcap/tidb/kv/union_iter.go new file mode 100644 index 000000000..41fc795f2 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/union_iter.go @@ -0,0 +1,156 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package kv + +import "github.com/ngaut/log" + +// UnionIter is the iterator on an UnionStore. +type UnionIter struct { + dirtyIt Iterator + snapshotIt Iterator + + dirtyValid bool + snapshotValid bool + + curIsDirty bool + isValid bool +} + +func newUnionIter(dirtyIt Iterator, snapshotIt Iterator) *UnionIter { + it := &UnionIter{ + dirtyIt: dirtyIt, + snapshotIt: snapshotIt, + dirtyValid: dirtyIt.Valid(), + snapshotValid: snapshotIt.Valid(), + } + it.updateCur() + return it +} + +// Go next and update valid status. +func (iter *UnionIter) dirtyNext() { + iter.dirtyIt.Next() + iter.dirtyValid = iter.dirtyIt.Valid() +} + +// Go next and update valid status. +func (iter *UnionIter) snapshotNext() { + iter.snapshotIt.Next() + iter.snapshotValid = iter.snapshotIt.Valid() +} + +func (iter *UnionIter) updateCur() { + iter.isValid = true + for { + if !iter.dirtyValid && !iter.snapshotValid { + iter.isValid = false + return + } + + if !iter.dirtyValid { + iter.curIsDirty = false + return + } + + if !iter.snapshotValid { + iter.curIsDirty = true + // if delete it + if len(iter.dirtyIt.Value()) == 0 { + iter.dirtyNext() + continue + } + break + } + + // both valid + if iter.snapshotValid && iter.dirtyValid { + snapshotKey := iter.snapshotIt.Key() + dirtyKey := iter.dirtyIt.Key() + cmp := dirtyKey.Cmp(snapshotKey) + // if equal, means both have value + if cmp == 0 { + if len(iter.dirtyIt.Value()) == 0 { + // snapshot has a record, but txn says we have deleted it + // just go next + iter.dirtyNext() + iter.snapshotNext() + continue + } + // both go next + iter.snapshotNext() + iter.curIsDirty = true + break + } else if cmp > 0 { + // record from snapshot comes first + iter.curIsDirty = false + break + } else { + // record from dirty comes first + if len(iter.dirtyIt.Value()) == 0 { + log.Warnf("[kv] delete a record not exists? k = %q", iter.dirtyIt.Key()) + // jump over this deletion + iter.dirtyNext() + continue + } + iter.curIsDirty = true + break + } + } + } +} + +// Next implements the Iterator Next interface. +func (iter *UnionIter) Next() error { + if !iter.curIsDirty { + iter.snapshotNext() + } else { + iter.dirtyNext() + } + iter.updateCur() + return nil +} + +// Value implements the Iterator Value interface. +// Multi columns +func (iter *UnionIter) Value() []byte { + if !iter.curIsDirty { + return iter.snapshotIt.Value() + } + return iter.dirtyIt.Value() +} + +// Key implements the Iterator Key interface. +func (iter *UnionIter) Key() Key { + if !iter.curIsDirty { + return iter.snapshotIt.Key() + } + return iter.dirtyIt.Key() +} + +// Valid implements the Iterator Valid interface. +func (iter *UnionIter) Valid() bool { + return iter.isValid +} + +// Close implements the Iterator Close interface. +func (iter *UnionIter) Close() { + if iter.snapshotIt != nil { + iter.snapshotIt.Close() + iter.snapshotIt = nil + } + if iter.dirtyIt != nil { + iter.dirtyIt.Close() + iter.dirtyIt = nil + } +} diff --git a/vendor/github.com/pingcap/tidb/kv/union_store.go b/vendor/github.com/pingcap/tidb/kv/union_store.go new file mode 100644 index 000000000..b5a093e08 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/union_store.go @@ -0,0 +1,212 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package kv + +import ( + "bytes" + + "github.com/juju/errors" +) + +// UnionStore is a store that wraps a snapshot for read and a BufferStore for buffered write. +// Also, it provides some transaction related utilities. +type UnionStore interface { + MemBuffer + // CheckLazyConditionPairs loads all lazy values from store then checks if all values are matched. + // Lazy condition pairs should be checked before transaction commit. + CheckLazyConditionPairs() error + // WalkBuffer iterates all buffered kv pairs. + WalkBuffer(f func(k Key, v []byte) error) error + // SetOption sets an option with a value, when val is nil, uses the default + // value of this option. + SetOption(opt Option, val interface{}) + // DelOption deletes an option. + DelOption(opt Option) +} + +// Option is used for customizing kv store's behaviors during a transaction. +type Option int + +// Options is an interface of a set of options. Each option is associated with a value. +type Options interface { + // Get gets an option value. + Get(opt Option) (v interface{}, ok bool) +} + +var ( + p = newCache("memdb pool", 100, func() MemBuffer { + return NewMemDbBuffer() + }) +) + +// conditionPair is used to store lazy check condition. +// If condition not match (value is not equal as expected one), returns err. +type conditionPair struct { + key Key + value []byte + err error +} + +// UnionStore is an in-memory Store which contains a buffer for write and a +// snapshot for read. +type unionStore struct { + *BufferStore + snapshot Snapshot // for read + lazyConditionPairs map[string](*conditionPair) // for delay check + opts options +} + +// NewUnionStore builds a new UnionStore. +func NewUnionStore(snapshot Snapshot) UnionStore { + return &unionStore{ + BufferStore: NewBufferStore(snapshot), + snapshot: snapshot, + lazyConditionPairs: make(map[string](*conditionPair)), + opts: make(map[Option]interface{}), + } +} + +type lazyMemBuffer struct { + mb MemBuffer +} + +func (lmb *lazyMemBuffer) Get(k Key) ([]byte, error) { + if lmb.mb == nil { + return nil, ErrNotExist + } + + return lmb.mb.Get(k) +} + +func (lmb *lazyMemBuffer) Set(key Key, value []byte) error { + if lmb.mb == nil { + lmb.mb = p.get() + } + + return lmb.mb.Set(key, value) +} + +func (lmb *lazyMemBuffer) Delete(k Key) error { + if lmb.mb == nil { + lmb.mb = p.get() + } + + return lmb.mb.Delete(k) +} + +func (lmb *lazyMemBuffer) Seek(k Key) (Iterator, error) { + if lmb.mb == nil { + lmb.mb = p.get() + } + + return lmb.mb.Seek(k) +} + +func (lmb *lazyMemBuffer) Release() { + if lmb.mb == nil { + return + } + + lmb.mb.Release() + + p.put(lmb.mb) + lmb.mb = nil +} + +// Get implements the Retriever interface. +func (us *unionStore) Get(k Key) ([]byte, error) { + v, err := us.MemBuffer.Get(k) + if IsErrNotFound(err) { + if _, ok := us.opts.Get(PresumeKeyNotExists); ok { + e, ok := us.opts.Get(PresumeKeyNotExistsError) + if ok && e != nil { + us.markLazyConditionPair(k, nil, e.(error)) + } else { + us.markLazyConditionPair(k, nil, ErrKeyExists) + } + return nil, errors.Trace(ErrNotExist) + } + } + if IsErrNotFound(err) { + v, err = us.BufferStore.r.Get(k) + } + if err != nil { + return v, errors.Trace(err) + } + if len(v) == 0 { + return nil, errors.Trace(ErrNotExist) + } + return v, nil +} + +// markLazyConditionPair marks a kv pair for later check. +// If condition not match, should return e as error. +func (us *unionStore) markLazyConditionPair(k Key, v []byte, e error) { + us.lazyConditionPairs[string(k)] = &conditionPair{ + key: k.Clone(), + value: v, + err: e, + } +} + +// CheckLazyConditionPairs implements the UnionStore interface. +func (us *unionStore) CheckLazyConditionPairs() error { + if len(us.lazyConditionPairs) == 0 { + return nil + } + keys := make([]Key, 0, len(us.lazyConditionPairs)) + for _, v := range us.lazyConditionPairs { + keys = append(keys, v.key) + } + values, err := us.snapshot.BatchGet(keys) + if err != nil { + return errors.Trace(err) + } + + for k, v := range us.lazyConditionPairs { + if len(v.value) == 0 { + if _, exist := values[k]; exist { + return errors.Trace(v.err) + } + } else { + if bytes.Compare(values[k], v.value) != 0 { + return errors.Trace(ErrLazyConditionPairsNotMatch) + } + } + } + return nil +} + +// SetOption implements the UnionStore SetOption interface. +func (us *unionStore) SetOption(opt Option, val interface{}) { + us.opts[opt] = val +} + +// DelOption implements the UnionStore DelOption interface. +func (us *unionStore) DelOption(opt Option) { + delete(us.opts, opt) +} + +// Release implements the UnionStore Release interface. +func (us *unionStore) Release() { + us.snapshot.Release() + us.BufferStore.Release() +} + +type options map[Option]interface{} + +func (opts options) Get(opt Option) (interface{}, bool) { + v, ok := opts[opt] + return v, ok +} diff --git a/vendor/github.com/pingcap/tidb/kv/utils.go b/vendor/github.com/pingcap/tidb/kv/utils.go new file mode 100644 index 000000000..8fb08d13f --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/utils.go @@ -0,0 +1,60 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package kv + +import ( + "strconv" + + "github.com/juju/errors" +) + +// IncInt64 increases the value for key k in kv store by step. +func IncInt64(rm RetrieverMutator, k Key, step int64) (int64, error) { + val, err := rm.Get(k) + if IsErrNotFound(err) { + err = rm.Set(k, []byte(strconv.FormatInt(step, 10))) + if err != nil { + return 0, errors.Trace(err) + } + return step, nil + } + if err != nil { + return 0, errors.Trace(err) + } + + intVal, err := strconv.ParseInt(string(val), 10, 0) + if err != nil { + return 0, errors.Trace(err) + } + + intVal += step + err = rm.Set(k, []byte(strconv.FormatInt(intVal, 10))) + if err != nil { + return 0, errors.Trace(err) + } + return intVal, nil +} + +// GetInt64 get int64 value which created by IncInt64 method. +func GetInt64(r Retriever, k Key) (int64, error) { + val, err := r.Get(k) + if IsErrNotFound(err) { + return 0, nil + } + if err != nil { + return 0, errors.Trace(err) + } + intVal, err := strconv.ParseInt(string(val), 10, 0) + return intVal, errors.Trace(err) +} diff --git a/vendor/github.com/pingcap/tidb/kv/version.go b/vendor/github.com/pingcap/tidb/kv/version.go new file mode 100644 index 000000000..f00921586 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/kv/version.go @@ -0,0 +1,51 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package kv + +import "math" + +// VersionProvider provides increasing IDs. +type VersionProvider interface { + CurrentVersion() (Version, error) +} + +// Version is the wrapper of KV's version. +type Version struct { + Ver uint64 +} + +var ( + // MaxVersion is the maximum version, notice that it's not a valid version. + MaxVersion = Version{Ver: math.MaxUint64} + // MinVersion is the minimum version, it's not a valid version, too. + MinVersion = Version{Ver: 0} +) + +// NewVersion creates a new Version struct. +func NewVersion(v uint64) Version { + return Version{ + Ver: v, + } +} + +// Cmp returns the comparison result of two versions. +// The result will be 0 if a==b, -1 if a < b, and +1 if a > b. +func (v Version) Cmp(another Version) int { + if v.Ver > another.Ver { + return 1 + } else if v.Ver < another.Ver { + return -1 + } + return 0 +} diff --git a/vendor/github.com/pingcap/tidb/make.cmd b/vendor/github.com/pingcap/tidb/make.cmd new file mode 100644 index 000000000..83a2dbda6 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/make.cmd @@ -0,0 +1,32 @@ +@echo off +::go build option +set TiDBBuildTS=%date:~0,10% %time:~1,7% +for /f "delims=" %%i in ('git rev-parse HEAD') do (set TiDBGitHash=%%i) +set LDFLAGS="-X github.com/pingcap/tidb/util/printer.TiDBBuildTS=%TiDBBuildTS% -X github.com/pingcap/tidb/util/printer.TiDBGitHash=%TiDBGitHash%" + +:: godep +go get github.com/tools/godep + +@echo [Parser] +go get github.com/qiuyesuifeng/goyacc +go get github.com/qiuyesuifeng/golex +type nul >>temp.XXXXXX +goyacc -o nul -xegen "temp.XXXXXX" parser/parser.y +goyacc -o parser/parser.go -xe "temp.XXXXXX" parser/parser.y +DEL /F /A /Q temp.XXXXXX +DEL /F /A /Q y.output + +golex -o parser/scanner.go parser/scanner.l + +@echo [Build] +godep go build -ldflags '%LDFLAGS%' + +@echo [Install] +godep go install ./... + + +@echo [Test] +godep go test -cover ./... + +::done +@echo [Done] diff --git a/vendor/github.com/pingcap/tidb/meta/autoid/autoid.go b/vendor/github.com/pingcap/tidb/meta/autoid/autoid.go new file mode 100644 index 000000000..b9385e9ed --- /dev/null +++ b/vendor/github.com/pingcap/tidb/meta/autoid/autoid.go @@ -0,0 +1,180 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package autoid + +import ( + "sync" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/meta" +) + +const ( + step = 1000 +) + +// Allocator is an auto increment id generator. +// Just keep id unique actually. +type Allocator interface { + // Alloc allocs the next autoID for table with tableID. + // It gets a batch of autoIDs at a time. So it does not need to access storage for each call. + Alloc(tableID int64) (int64, error) + // Rebase rebases the autoID base for table with tableID and the new base value. + // If allocIDs is true, it will allocate some IDs and save to the cache. + // If allocIDs is false, it will not allocate IDs. + Rebase(tableID, newBase int64, allocIDs bool) error +} + +type allocator struct { + mu sync.Mutex + base int64 + end int64 + store kv.Storage + dbID int64 +} + +// Rebase implements autoid.Allocator Rebase interface. +func (alloc *allocator) Rebase(tableID, newBase int64, allocIDs bool) error { + if tableID == 0 { + return errors.New("Invalid tableID") + } + + alloc.mu.Lock() + defer alloc.mu.Unlock() + if newBase <= alloc.base { + return nil + } + if newBase <= alloc.end { + alloc.base = newBase + return nil + } + + return kv.RunInNewTxn(alloc.store, true, func(txn kv.Transaction) error { + m := meta.NewMeta(txn) + end, err := m.GetAutoTableID(alloc.dbID, tableID) + if err != nil { + return errors.Trace(err) + } + + if newBase <= end { + return nil + } + newStep := newBase - end + step + if !allocIDs { + newStep = newBase - end + } + end, err = m.GenAutoTableID(alloc.dbID, tableID, newStep) + if err != nil { + return errors.Trace(err) + } + + alloc.end = end + alloc.base = newBase + if !allocIDs { + alloc.base = alloc.end + } + return nil + }) +} + +// Alloc implements autoid.Allocator Alloc interface. +func (alloc *allocator) Alloc(tableID int64) (int64, error) { + if tableID == 0 { + return 0, errors.New("Invalid tableID") + } + alloc.mu.Lock() + defer alloc.mu.Unlock() + if alloc.base == alloc.end { // step + err := kv.RunInNewTxn(alloc.store, true, func(txn kv.Transaction) error { + m := meta.NewMeta(txn) + base, err1 := m.GetAutoTableID(alloc.dbID, tableID) + if err1 != nil { + return errors.Trace(err1) + } + end, err1 := m.GenAutoTableID(alloc.dbID, tableID, step) + if err1 != nil { + return errors.Trace(err1) + } + + alloc.end = end + if end == step { + alloc.base = base + } else { + alloc.base = end - step + } + return nil + }) + + if err != nil { + return 0, errors.Trace(err) + } + } + + alloc.base++ + log.Debugf("[kv] Alloc id %d, table ID:%d, from %p, database ID:%d", alloc.base, tableID, alloc, alloc.dbID) + return alloc.base, nil +} + +var ( + memID int64 + memIDLock sync.Mutex +) + +type memoryAllocator struct { + mu sync.Mutex + base int64 + end int64 + dbID int64 +} + +// Rebase implements autoid.Allocator Rebase interface. +func (alloc *memoryAllocator) Rebase(tableID, newBase int64, allocIDs bool) error { + // TODO: implement it. + return nil +} + +// Alloc implements autoid.Allocator Alloc interface. +func (alloc *memoryAllocator) Alloc(tableID int64) (int64, error) { + if tableID == 0 { + return 0, errors.New("Invalid tableID") + } + alloc.mu.Lock() + defer alloc.mu.Unlock() + if alloc.base == alloc.end { // step + memIDLock.Lock() + memID = memID + step + alloc.end = memID + alloc.base = alloc.end - step + memIDLock.Unlock() + } + alloc.base++ + return alloc.base, nil +} + +// NewAllocator returns a new auto increment id generator on the store. +func NewAllocator(store kv.Storage, dbID int64) Allocator { + return &allocator{ + store: store, + dbID: dbID, + } +} + +// NewMemoryAllocator returns a new auto increment id generator in memory. +func NewMemoryAllocator(dbID int64) Allocator { + return &memoryAllocator{ + dbID: dbID, + } +} diff --git a/vendor/github.com/pingcap/tidb/meta/meta.go b/vendor/github.com/pingcap/tidb/meta/meta.go new file mode 100644 index 000000000..ff8b31679 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/meta/meta.go @@ -0,0 +1,650 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package meta + +import ( + "encoding/binary" + "encoding/json" + "fmt" + "strconv" + "strings" + "sync" + "time" + + "github.com/juju/errors" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/structure" +) + +var ( + globalIDMutex sync.Mutex +) + +// Meta structure: +// NextGlobalID -> int64 +// SchemaVersion -> int64 +// DBs -> { +// DB:1 -> db meta data []byte +// DB:2 -> db meta data []byte +// } +// DB:1 -> { +// Table:1 -> table meta data []byte +// Table:2 -> table meta data []byte +// TID:1 -> int64 +// TID:2 -> int64 +// } +// + +var ( + mNextGlobalIDKey = []byte("NextGlobalID") + mSchemaVersionKey = []byte("SchemaVersionKey") + mDBs = []byte("DBs") + mDBPrefix = "DB" + mTablePrefix = "Table" + mTableIDPrefix = "TID" + mBootstrapKey = []byte("BootstrapKey") +) + +var ( + // ErrDBExists is the error for db exists. + ErrDBExists = errors.New("database already exists") + // ErrDBNotExists is the error for db not exists. + ErrDBNotExists = errors.New("database doesn't exist") + // ErrTableExists is the error for table exists. + ErrTableExists = errors.New("table already exists") + // ErrTableNotExists is the error for table not exists. + ErrTableNotExists = errors.New("table doesn't exist") +) + +// Meta is for handling meta information in a transaction. +type Meta struct { + txn *structure.TxStructure +} + +// NewMeta creates a Meta in transaction txn. +func NewMeta(txn kv.Transaction) *Meta { + t := structure.NewStructure(txn, []byte{'m'}) + return &Meta{txn: t} +} + +// GenGlobalID generates next id globally. +func (m *Meta) GenGlobalID() (int64, error) { + globalIDMutex.Lock() + defer globalIDMutex.Unlock() + + return m.txn.Inc(mNextGlobalIDKey, 1) +} + +// GetGlobalID gets current global id. +func (m *Meta) GetGlobalID() (int64, error) { + return m.txn.GetInt64(mNextGlobalIDKey) +} + +func (m *Meta) dbKey(dbID int64) []byte { + return []byte(fmt.Sprintf("%s:%d", mDBPrefix, dbID)) +} + +func (m *Meta) parseDatabaseID(key string) (int64, error) { + seps := strings.Split(key, ":") + if len(seps) != 2 { + return 0, errors.Errorf("invalid db key %s", key) + } + + n, err := strconv.ParseInt(seps[1], 10, 64) + return n, errors.Trace(err) +} + +func (m *Meta) autoTalbeIDKey(tableID int64) []byte { + return []byte(fmt.Sprintf("%s:%d", mTableIDPrefix, tableID)) +} + +func (m *Meta) tableKey(tableID int64) []byte { + return []byte(fmt.Sprintf("%s:%d", mTablePrefix, tableID)) +} + +func (m *Meta) parseTableID(key string) (int64, error) { + seps := strings.Split(key, ":") + if len(seps) != 2 { + return 0, errors.Errorf("invalid table meta key %s", key) + } + + n, err := strconv.ParseInt(seps[1], 10, 64) + return n, errors.Trace(err) +} + +// GenAutoTableID adds step to the auto id of the table and returns the sum. +func (m *Meta) GenAutoTableID(dbID int64, tableID int64, step int64) (int64, error) { + // Check if db exists. + dbKey := m.dbKey(dbID) + if err := m.checkDBExists(dbKey); err != nil { + return 0, errors.Trace(err) + } + + // Check if table exists. + tableKey := m.tableKey(tableID) + if err := m.checkTableExists(dbKey, tableKey); err != nil { + return 0, errors.Trace(err) + } + + return m.txn.HInc(dbKey, m.autoTalbeIDKey(tableID), step) +} + +// GetAutoTableID gets current auto id with table id. +func (m *Meta) GetAutoTableID(dbID int64, tableID int64) (int64, error) { + return m.txn.HGetInt64(m.dbKey(dbID), m.autoTalbeIDKey(tableID)) +} + +// GetSchemaVersion gets current global schema version. +func (m *Meta) GetSchemaVersion() (int64, error) { + return m.txn.GetInt64(mSchemaVersionKey) +} + +// GenSchemaVersion generates next schema version. +func (m *Meta) GenSchemaVersion() (int64, error) { + return m.txn.Inc(mSchemaVersionKey, 1) +} + +func (m *Meta) checkDBExists(dbKey []byte) error { + v, err := m.txn.HGet(mDBs, dbKey) + if err != nil { + return errors.Trace(err) + } else if v == nil { + return ErrDBNotExists + } + + return nil +} + +func (m *Meta) checkDBNotExists(dbKey []byte) error { + v, err := m.txn.HGet(mDBs, dbKey) + if err != nil { + return errors.Trace(err) + } + + if v != nil { + return ErrDBExists + } + + return nil +} + +func (m *Meta) checkTableExists(dbKey []byte, tableKey []byte) error { + v, err := m.txn.HGet(dbKey, tableKey) + if err != nil { + return errors.Trace(err) + } + + if v == nil { + return ErrTableNotExists + } + + return nil +} + +func (m *Meta) checkTableNotExists(dbKey []byte, tableKey []byte) error { + v, err := m.txn.HGet(dbKey, tableKey) + if err != nil { + return errors.Trace(err) + } + + if v != nil { + return ErrTableExists + } + + return nil +} + +// CreateDatabase creates a database with db info. +func (m *Meta) CreateDatabase(dbInfo *model.DBInfo) error { + dbKey := m.dbKey(dbInfo.ID) + + if err := m.checkDBNotExists(dbKey); err != nil { + return errors.Trace(err) + } + + data, err := json.Marshal(dbInfo) + if err != nil { + return errors.Trace(err) + } + + return m.txn.HSet(mDBs, dbKey, data) +} + +// UpdateDatabase updates a database with db info. +func (m *Meta) UpdateDatabase(dbInfo *model.DBInfo) error { + dbKey := m.dbKey(dbInfo.ID) + + if err := m.checkDBExists(dbKey); err != nil { + return errors.Trace(err) + } + + data, err := json.Marshal(dbInfo) + if err != nil { + return errors.Trace(err) + } + + return m.txn.HSet(mDBs, dbKey, data) +} + +// CreateTable creates a table with tableInfo in database. +func (m *Meta) CreateTable(dbID int64, tableInfo *model.TableInfo) error { + // Check if db exists. + dbKey := m.dbKey(dbID) + if err := m.checkDBExists(dbKey); err != nil { + return errors.Trace(err) + } + + // Check if table exists. + tableKey := m.tableKey(tableInfo.ID) + if err := m.checkTableNotExists(dbKey, tableKey); err != nil { + return errors.Trace(err) + } + + data, err := json.Marshal(tableInfo) + if err != nil { + return errors.Trace(err) + } + + return m.txn.HSet(dbKey, tableKey, data) +} + +// DropDatabase drops whole database. +func (m *Meta) DropDatabase(dbID int64) error { + // Check if db exists. + dbKey := m.dbKey(dbID) + if err := m.txn.HClear(dbKey); err != nil { + return errors.Trace(err) + } + + if err := m.txn.HDel(mDBs, dbKey); err != nil { + return errors.Trace(err) + } + + return nil +} + +// DropTable drops table in database. +func (m *Meta) DropTable(dbID int64, tableID int64) error { + // Check if db exists. + dbKey := m.dbKey(dbID) + if err := m.checkDBExists(dbKey); err != nil { + return errors.Trace(err) + } + + // Check if table exists. + tableKey := m.tableKey(tableID) + if err := m.checkTableExists(dbKey, tableKey); err != nil { + return errors.Trace(err) + } + + if err := m.txn.HDel(dbKey, tableKey); err != nil { + return errors.Trace(err) + } + + if err := m.txn.HDel(dbKey, m.autoTalbeIDKey(tableID)); err != nil { + return errors.Trace(err) + } + + return nil +} + +// UpdateTable updates the table with table info. +func (m *Meta) UpdateTable(dbID int64, tableInfo *model.TableInfo) error { + // Check if db exists. + dbKey := m.dbKey(dbID) + if err := m.checkDBExists(dbKey); err != nil { + return errors.Trace(err) + } + + // Check if table exists. + tableKey := m.tableKey(tableInfo.ID) + if err := m.checkTableExists(dbKey, tableKey); err != nil { + return errors.Trace(err) + } + + data, err := json.Marshal(tableInfo) + if err != nil { + return errors.Trace(err) + } + + err = m.txn.HSet(dbKey, tableKey, data) + return errors.Trace(err) +} + +// ListTables shows all tables in database. +func (m *Meta) ListTables(dbID int64) ([]*model.TableInfo, error) { + dbKey := m.dbKey(dbID) + if err := m.checkDBExists(dbKey); err != nil { + return nil, errors.Trace(err) + } + + res, err := m.txn.HGetAll(dbKey) + if err != nil { + return nil, errors.Trace(err) + } + + tables := make([]*model.TableInfo, 0, len(res)/2) + for _, r := range res { + // only handle table meta + tableKey := string(r.Field) + if !strings.HasPrefix(tableKey, mTablePrefix) { + continue + } + + tbInfo := &model.TableInfo{} + err = json.Unmarshal(r.Value, tbInfo) + if err != nil { + return nil, errors.Trace(err) + } + + tables = append(tables, tbInfo) + } + + return tables, nil +} + +// ListDatabases shows all databases. +func (m *Meta) ListDatabases() ([]*model.DBInfo, error) { + res, err := m.txn.HGetAll(mDBs) + if err != nil { + return nil, errors.Trace(err) + } + + dbs := make([]*model.DBInfo, 0, len(res)) + for _, r := range res { + dbInfo := &model.DBInfo{} + err = json.Unmarshal(r.Value, dbInfo) + if err != nil { + return nil, errors.Trace(err) + } + dbs = append(dbs, dbInfo) + } + return dbs, nil +} + +// GetDatabase gets the database value with ID. +func (m *Meta) GetDatabase(dbID int64) (*model.DBInfo, error) { + dbKey := m.dbKey(dbID) + value, err := m.txn.HGet(mDBs, dbKey) + if err != nil || value == nil { + return nil, errors.Trace(err) + } + + dbInfo := &model.DBInfo{} + err = json.Unmarshal(value, dbInfo) + return dbInfo, errors.Trace(err) +} + +// GetTable gets the table value in database with tableID. +func (m *Meta) GetTable(dbID int64, tableID int64) (*model.TableInfo, error) { + // Check if db exists. + dbKey := m.dbKey(dbID) + if err := m.checkDBExists(dbKey); err != nil { + return nil, errors.Trace(err) + } + + tableKey := m.tableKey(tableID) + value, err := m.txn.HGet(dbKey, tableKey) + if err != nil || value == nil { + return nil, errors.Trace(err) + } + + tableInfo := &model.TableInfo{} + err = json.Unmarshal(value, tableInfo) + return tableInfo, errors.Trace(err) +} + +// DDL job structure +// DDLOnwer: []byte +// DDLJobList: list jobs +// DDLJobHistory: hash +// DDLJobReorg: hash +// +// for multi DDL workers, only one can become the owner +// to operate DDL jobs, and dispatch them to MR Jobs. + +var ( + mDDLJobOwnerKey = []byte("DDLJobOwner") + mDDLJobListKey = []byte("DDLJobList") + mDDLJobHistoryKey = []byte("DDLJobHistory") + mDDLJobReorgKey = []byte("DDLJobReorg") +) + +func (m *Meta) getJobOwner(key []byte) (*model.Owner, error) { + value, err := m.txn.Get(key) + if err != nil || value == nil { + return nil, errors.Trace(err) + } + + owner := &model.Owner{} + err = json.Unmarshal(value, owner) + return owner, errors.Trace(err) +} + +// GetDDLJobOwner gets the current owner for DDL. +func (m *Meta) GetDDLJobOwner() (*model.Owner, error) { + return m.getJobOwner(mDDLJobOwnerKey) +} + +func (m *Meta) setJobOwner(key []byte, o *model.Owner) error { + b, err := json.Marshal(o) + if err != nil { + return errors.Trace(err) + } + return m.txn.Set(key, b) +} + +// SetDDLJobOwner sets the current owner for DDL. +func (m *Meta) SetDDLJobOwner(o *model.Owner) error { + return m.setJobOwner(mDDLJobOwnerKey, o) +} + +func (m *Meta) enQueueDDLJob(key []byte, job *model.Job) error { + b, err := job.Encode() + if err != nil { + return errors.Trace(err) + } + return m.txn.RPush(key, b) +} + +// EnQueueDDLJob adds a DDL job to the list. +func (m *Meta) EnQueueDDLJob(job *model.Job) error { + return m.enQueueDDLJob(mDDLJobListKey, job) +} + +func (m *Meta) deQueueDDLJob(key []byte) (*model.Job, error) { + value, err := m.txn.LPop(key) + if err != nil || value == nil { + return nil, errors.Trace(err) + } + + job := &model.Job{} + err = job.Decode(value) + return job, errors.Trace(err) +} + +// DeQueueDDLJob pops a DDL job from the list. +func (m *Meta) DeQueueDDLJob() (*model.Job, error) { + return m.deQueueDDLJob(mDDLJobListKey) +} + +func (m *Meta) getDDLJob(key []byte, index int64) (*model.Job, error) { + value, err := m.txn.LIndex(key, index) + if err != nil || value == nil { + return nil, errors.Trace(err) + } + + job := &model.Job{} + err = job.Decode(value) + return job, errors.Trace(err) +} + +// GetDDLJob returns the DDL job with index. +func (m *Meta) GetDDLJob(index int64) (*model.Job, error) { + job, err := m.getDDLJob(mDDLJobListKey, index) + return job, errors.Trace(err) +} + +func (m *Meta) updateDDLJob(index int64, job *model.Job, key []byte) error { + // TODO: use timestamp allocated by TSO + job.LastUpdateTS = time.Now().UnixNano() + b, err := job.Encode() + if err != nil { + return errors.Trace(err) + } + return m.txn.LSet(key, index, b) +} + +// UpdateDDLJob updates the DDL job with index. +func (m *Meta) UpdateDDLJob(index int64, job *model.Job) error { + return m.updateDDLJob(index, job, mDDLJobListKey) +} + +// DDLJobQueueLen returns the DDL job queue length. +func (m *Meta) DDLJobQueueLen() (int64, error) { + return m.txn.LLen(mDDLJobListKey) +} + +func (m *Meta) jobIDKey(id int64) []byte { + b := make([]byte, 8) + binary.BigEndian.PutUint64(b, uint64(id)) + return b +} + +func (m *Meta) addHistoryDDLJob(key []byte, job *model.Job) error { + b, err := job.Encode() + if err != nil { + return errors.Trace(err) + } + + return m.txn.HSet(key, m.jobIDKey(job.ID), b) +} + +// AddHistoryDDLJob adds DDL job to history. +func (m *Meta) AddHistoryDDLJob(job *model.Job) error { + return m.addHistoryDDLJob(mDDLJobHistoryKey, job) +} + +func (m *Meta) getHistoryDDLJob(key []byte, id int64) (*model.Job, error) { + value, err := m.txn.HGet(key, m.jobIDKey(id)) + if err != nil || value == nil { + return nil, errors.Trace(err) + } + + job := &model.Job{} + err = job.Decode(value) + return job, errors.Trace(err) +} + +// GetHistoryDDLJob gets a history DDL job. +func (m *Meta) GetHistoryDDLJob(id int64) (*model.Job, error) { + return m.getHistoryDDLJob(mDDLJobHistoryKey, id) +} + +// IsBootstrapped returns whether we have already run bootstrap or not. +// return true means we don't need doing any other bootstrap. +func (m *Meta) IsBootstrapped() (bool, error) { + value, err := m.txn.GetInt64(mBootstrapKey) + if err != nil { + return false, errors.Trace(err) + } + return value == 1, nil +} + +// FinishBootstrap finishes bootstrap. +func (m *Meta) FinishBootstrap() error { + err := m.txn.Set(mBootstrapKey, []byte("1")) + return errors.Trace(err) +} + +// UpdateDDLReorgHandle saves the job reorganization latest processed handle for later resuming. +func (m *Meta) UpdateDDLReorgHandle(job *model.Job, handle int64) error { + err := m.txn.HSet(mDDLJobReorgKey, m.jobIDKey(job.ID), []byte(strconv.FormatInt(handle, 10))) + return errors.Trace(err) +} + +// RemoveDDLReorgHandle removes the job reorganization handle. +func (m *Meta) RemoveDDLReorgHandle(job *model.Job) error { + err := m.txn.HDel(mDDLJobReorgKey, m.jobIDKey(job.ID)) + return errors.Trace(err) +} + +// GetDDLReorgHandle gets the latest processed handle. +func (m *Meta) GetDDLReorgHandle(job *model.Job) (int64, error) { + value, err := m.txn.HGetInt64(mDDLJobReorgKey, m.jobIDKey(job.ID)) + return value, errors.Trace(err) +} + +// DDL background job structure +// BgJobOnwer: []byte +// BgJobList: list jobs +// BgJobHistory: hash +// BgJobReorg: hash +// +// for multi background worker, only one can become the owner +// to operate background job, and dispatch them to MR background job. + +var ( + mBgJobOwnerKey = []byte("BgJobOwner") + mBgJobListKey = []byte("BgJobList") + mBgJobHistoryKey = []byte("BgJobHistory") +) + +// UpdateBgJob updates the background job with index. +func (m *Meta) UpdateBgJob(index int64, job *model.Job) error { + return m.updateDDLJob(index, job, mBgJobListKey) +} + +// GetBgJob returns the background job with index. +func (m *Meta) GetBgJob(index int64) (*model.Job, error) { + job, err := m.getDDLJob(mBgJobListKey, index) + + return job, errors.Trace(err) +} + +// EnQueueBgJob adds a background job to the list. +func (m *Meta) EnQueueBgJob(job *model.Job) error { + return m.enQueueDDLJob(mBgJobListKey, job) +} + +// BgJobQueueLen returns the background job queue length. +func (m *Meta) BgJobQueueLen() (int64, error) { + return m.txn.LLen(mBgJobListKey) +} + +// AddHistoryBgJob adds background job to history. +func (m *Meta) AddHistoryBgJob(job *model.Job) error { + return m.addHistoryDDLJob(mBgJobHistoryKey, job) +} + +// GetHistoryBgJob gets a history background job. +func (m *Meta) GetHistoryBgJob(id int64) (*model.Job, error) { + return m.getHistoryDDLJob(mBgJobHistoryKey, id) +} + +// DeQueueBgJob pops a background job from the list. +func (m *Meta) DeQueueBgJob() (*model.Job, error) { + return m.deQueueDDLJob(mBgJobListKey) +} + +// GetBgJobOwner gets the current background job owner. +func (m *Meta) GetBgJobOwner() (*model.Owner, error) { + return m.getJobOwner(mBgJobOwnerKey) +} + +// SetBgJobOwner sets the current background job owner. +func (m *Meta) SetBgJobOwner(o *model.Owner) error { + return m.setJobOwner(mBgJobOwnerKey, o) +} diff --git a/vendor/github.com/pingcap/tidb/model/ddl.go b/vendor/github.com/pingcap/tidb/model/ddl.go new file mode 100644 index 000000000..d8809dac1 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/model/ddl.go @@ -0,0 +1,163 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "encoding/json" + "fmt" + + "github.com/juju/errors" +) + +// ActionType is the type for DDL action. +type ActionType byte + +// List DDL actions. +const ( + ActionNone ActionType = iota + ActionCreateSchema + ActionDropSchema + ActionCreateTable + ActionDropTable + ActionAddColumn + ActionDropColumn + ActionAddIndex + ActionDropIndex +) + +func (action ActionType) String() string { + switch action { + case ActionCreateSchema: + return "create schema" + case ActionDropSchema: + return "drop schema" + case ActionCreateTable: + return "create table" + case ActionDropTable: + return "drop table" + case ActionAddColumn: + return "add column" + case ActionDropColumn: + return "drop column" + case ActionAddIndex: + return "add index" + case ActionDropIndex: + return "drop index" + default: + return "none" + } +} + +// Job is for a DDL operation. +type Job struct { + ID int64 `json:"id"` + Type ActionType `json:"type"` + SchemaID int64 `json:"schema_id"` + TableID int64 `json:"table_id"` + State JobState `json:"state"` + Error string `json:"err"` + // every time we meet an error when running job, we will increase it + ErrorCount int64 `json:"err_count"` + Args []interface{} `json:"-"` + // we must use json raw message for delay parsing special args. + RawArgs json.RawMessage `json:"raw_args"` + SchemaState SchemaState `json:"schema_state"` + // snapshot version for this job. + SnapshotVer uint64 `json:"snapshot_ver"` + // unix nano seconds + // TODO: use timestamp allocated by TSO + LastUpdateTS int64 `json:"last_update_ts"` +} + +// Encode encodes job with json format. +func (job *Job) Encode() ([]byte, error) { + var err error + job.RawArgs, err = json.Marshal(job.Args) + if err != nil { + return nil, errors.Trace(err) + } + + var b []byte + b, err = json.Marshal(job) + return b, errors.Trace(err) +} + +// Decode decodes job from the json buffer, we must use DecodeArgs later to +// decode special args for this job. +func (job *Job) Decode(b []byte) error { + err := json.Unmarshal(b, job) + return errors.Trace(err) +} + +// DecodeArgs decodes job args. +func (job *Job) DecodeArgs(args ...interface{}) error { + job.Args = args + err := json.Unmarshal(job.RawArgs, &job.Args) + return errors.Trace(err) +} + +// String implements fmt.Stringer interface. +func (job *Job) String() string { + return fmt.Sprintf("ID:%d, Type:%s, State:%s, SchemaState:%s, SchemaID:%d, TableID:%d, Args:%s", + job.ID, job.Type, job.State, job.SchemaState, job.SchemaID, job.TableID, job.RawArgs) +} + +// IsFinished returns whether job is finished or not. +// If the job state is Done or Cancelled, it is finished. +func (job *Job) IsFinished() bool { + return job.State == JobDone || job.State == JobCancelled +} + +// IsRunning returns whether job is still running or not. +func (job *Job) IsRunning() bool { + return job.State == JobRunning +} + +// JobState is for job state. +type JobState byte + +// List job states. +const ( + JobNone JobState = iota + JobRunning + JobDone + JobCancelled +) + +// String implements fmt.Stringer interface. +func (s JobState) String() string { + switch s { + case JobRunning: + return "running" + case JobDone: + return "done" + case JobCancelled: + return "cancelled" + default: + return "none" + } +} + +// Owner is for DDL Owner. +type Owner struct { + OwnerID string `json:"owner_id"` + // unix nano seconds + // TODO: use timestamp allocated by TSO + LastUpdateTS int64 `json:"last_update_ts"` +} + +// String implements fmt.Stringer interface. +func (o *Owner) String() string { + return fmt.Sprintf("ID:%s, LastUpdateTS:%d", o.OwnerID, o.LastUpdateTS) +} diff --git a/vendor/github.com/pingcap/tidb/model/model.go b/vendor/github.com/pingcap/tidb/model/model.go new file mode 100644 index 000000000..6c19baead --- /dev/null +++ b/vendor/github.com/pingcap/tidb/model/model.go @@ -0,0 +1,199 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package model + +import ( + "strings" + + "github.com/pingcap/tidb/util/types" +) + +// SchemaState is the state for schema elements. +type SchemaState byte + +const ( + // StateNone means this schema element is absent and can't be used. + StateNone SchemaState = iota + // StateDeleteOnly means we can only delete items for this schema element. + StateDeleteOnly + // StateWriteOnly means we can use any write operation on this schema element, + // but outer can't read the changed data. + StateWriteOnly + // StateWriteReorganization means we are re-organizating whole data after write only state. + StateWriteReorganization + // StateDeleteReorganization means we are re-organizating whole data after delete only state. + StateDeleteReorganization + // StatePublic means this schema element is ok for all write and read operations. + StatePublic +) + +// String implements fmt.Stringer interface. +func (s SchemaState) String() string { + switch s { + case StateDeleteOnly: + return "delete only" + case StateWriteOnly: + return "write only" + case StateWriteReorganization: + return "write reorganization" + case StateDeleteReorganization: + return "delete reorganization" + case StatePublic: + return "public" + default: + return "none" + } +} + +// ColumnInfo provides meta data describing of a table column. +type ColumnInfo struct { + ID int64 `json:"id"` + Name CIStr `json:"name"` + Offset int `json:"offset"` + DefaultValue interface{} `json:"default"` + types.FieldType `json:"type"` + State SchemaState `json:"state"` +} + +// Clone clones ColumnInfo. +func (c *ColumnInfo) Clone() *ColumnInfo { + nc := *c + return &nc +} + +// TableInfo provides meta data describing a DB table. +type TableInfo struct { + ID int64 `json:"id"` + Name CIStr `json:"name"` + Charset string `json:"charset"` + Collate string `json:"collate"` + // Columns are listed in the order in which they appear in the schema. + Columns []*ColumnInfo `json:"cols"` + Indices []*IndexInfo `json:"index_info"` + State SchemaState `json:"state"` + PKIsHandle bool `json:"pk_is_handle"` + Comment string `json:"comment"` +} + +// Clone clones TableInfo. +func (t *TableInfo) Clone() *TableInfo { + nt := *t + nt.Columns = make([]*ColumnInfo, len(t.Columns)) + nt.Indices = make([]*IndexInfo, len(t.Indices)) + + for i := range t.Columns { + nt.Columns[i] = t.Columns[i].Clone() + } + + for i := range t.Indices { + nt.Indices[i] = t.Indices[i].Clone() + } + return &nt +} + +// IndexColumn provides index column info. +type IndexColumn struct { + Name CIStr `json:"name"` // Index name + Offset int `json:"offset"` // Index offset + Length int `json:"length"` // Index length +} + +// Clone clones IndexColumn. +func (i *IndexColumn) Clone() *IndexColumn { + ni := *i + return &ni +} + +// IndexType is the type of index +type IndexType int + +// String implements Stringer interface. +func (t IndexType) String() string { + switch t { + case IndexTypeBtree: + return "BTREE" + case IndexTypeHash: + return "HASH" + } + return "" +} + +// IndexTypes +const ( + IndexTypeBtree IndexType = iota + 1 + IndexTypeHash +) + +// IndexInfo provides meta data describing a DB index. +// It corresponds to the statement `CREATE INDEX Name ON Table (Column);` +// See: https://dev.mysql.com/doc/refman/5.7/en/create-index.html +type IndexInfo struct { + ID int64 `json:"id"` + Name CIStr `json:"idx_name"` // Index name. + Table CIStr `json:"tbl_name"` // Table name. + Columns []*IndexColumn `json:"idx_cols"` // Index columns. + Unique bool `json:"is_unique"` // Whether the index is unique. + Primary bool `json:"is_primary"` // Whether the index is primary key. + State SchemaState `json:"state"` + Comment string `json:"comment"` // Comment + Tp IndexType `json:"index_type"` // Index type: Btree or Hash +} + +// Clone clones IndexInfo. +func (index *IndexInfo) Clone() *IndexInfo { + ni := *index + ni.Columns = make([]*IndexColumn, len(index.Columns)) + for i := range index.Columns { + ni.Columns[i] = index.Columns[i].Clone() + } + return &ni +} + +// DBInfo provides meta data describing a DB. +type DBInfo struct { + ID int64 `json:"id"` // Database ID + Name CIStr `json:"db_name"` // DB name. + Charset string `json:"charset"` + Collate string `json:"collate"` + Tables []*TableInfo `json:"-"` // Tables in the DB. + State SchemaState `json:"state"` +} + +// Clone clones DBInfo. +func (db *DBInfo) Clone() *DBInfo { + newInfo := *db + newInfo.Tables = make([]*TableInfo, len(db.Tables)) + for i := range db.Tables { + newInfo.Tables[i] = db.Tables[i].Clone() + } + return &newInfo +} + +// CIStr is case insensitve string. +type CIStr struct { + O string `json:"O"` // Original string. + L string `json:"L"` // Lower case string. +} + +// String implements fmt.Stringer interface. +func (cis CIStr) String() string { + return cis.O +} + +// NewCIStr creates a new CIStr. +func NewCIStr(s string) (cs CIStr) { + cs.O = s + cs.L = strings.ToLower(s) + return +} diff --git a/vendor/github.com/pingcap/tidb/mysql/bit.go b/vendor/github.com/pingcap/tidb/mysql/bit.go new file mode 100644 index 000000000..4f76dceb1 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/mysql/bit.go @@ -0,0 +1,106 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package mysql + +import ( + "fmt" + "strconv" + "strings" + + "github.com/juju/errors" +) + +// Bit is for mysql bit type. +type Bit struct { + // Value holds the value for bit type. + Value uint64 + + // Width is the display with for bit value. + // e.g, with is 8, 0 is for 0b00000000. + Width int +} + +// String implements fmt.Stringer interface. +func (b Bit) String() string { + format := fmt.Sprintf("0b%%0%db", b.Width) + return fmt.Sprintf(format, b.Value) +} + +// ToNumber changes bit type to float64 for numeric operation. +// MySQL treats bit as double type. +func (b Bit) ToNumber() float64 { + return float64(b.Value) +} + +// ToString returns the binary string for bit type. +func (b Bit) ToString() string { + byteSize := (b.Width + 7) / 8 + buf := make([]byte, byteSize) + for i := byteSize - 1; i >= 0; i-- { + buf[byteSize-i-1] = byte(b.Value >> uint(i*8)) + } + return string(buf) +} + +// Min and Max bit width. +const ( + MinBitWidth = 1 + MaxBitWidth = 64 + // UnspecifiedBitWidth is the unspecified with if you want to calculate bit width dynamically. + UnspecifiedBitWidth = -1 +) + +// ParseBit parses bit string. +// The string format can be b'val', B'val' or 0bval, val must be 0 or 1. +// Width is the display width for bit representation. -1 means calculating +// width dynamically, using following algorithm: (len("011101") + 7) & ^7, +// e.g, if bit string is 0b01, the above will return 8 for its bit width. +func ParseBit(s string, width int) (Bit, error) { + if len(s) == 0 { + return Bit{}, errors.Errorf("invalid empty string for parsing bit type") + } + + if s[0] == 'b' || s[0] == 'B' { + // format is b'val' or B'val' + s = strings.Trim(s[1:], "'") + } else if strings.HasPrefix(s, "0b") { + s = s[2:] + } else { + // here means format is not b'val', B'val' or 0bval. + return Bit{}, errors.Errorf("invalid bit type format %s", s) + } + + if width == UnspecifiedBitWidth { + width = (len(s) + 7) & ^7 + } + + if width == 0 { + width = MinBitWidth + } + + if width < MinBitWidth || width > MaxBitWidth { + return Bit{}, errors.Errorf("invalid display width for bit type, must in [1, 64], but %d", width) + } + + n, err := strconv.ParseUint(s, 2, 64) + if err != nil { + return Bit{}, errors.Trace(err) + } + + if n > (uint64(1)< 0 { + // It is scientific notation, like 3.14e10 + expInt, err := strconv.Atoi(value[n+1:]) + if err != nil { + return Decimal{}, fmt.Errorf("can't convert %s to decimal, incorrect exponent", value) + } + value = value[0:n] + exp = int32(expInt) + } + + parts := strings.Split(value, ".") + if len(parts) == 1 { + // There is no decimal point, we can just parse the original string as + // an int. + intString = value + } else if len(parts) == 2 { + intString = parts[0] + parts[1] + expInt := -len(parts[1]) + exp += int32(expInt) + } else { + return Decimal{}, fmt.Errorf("can't convert %s to decimal: too many .s", value) + } + + dValue := new(big.Int) + _, ok := dValue.SetString(intString, 10) + if !ok { + return Decimal{}, fmt.Errorf("can't convert %s to decimal", value) + } + + val := Decimal{ + value: dValue, + exp: exp, + fracDigits: fracDigitsDefault(exp), + } + if exp < -MaxFractionDigits { + val = val.rescale(-MaxFractionDigits) + } + return val, nil +} + +// NewDecimalFromFloat converts a float64 to Decimal. +// +// Example: +// +// NewDecimalFromFloat(123.45678901234567).String() // output: "123.4567890123456" +// NewDecimalFromFloat(.00000000000000001).String() // output: "0.00000000000000001" +// +// NOTE: this will panic on NaN, +/-inf. +func NewDecimalFromFloat(value float64) Decimal { + floor := math.Floor(value) + + // fast path, where float is an int. + if floor == value && !math.IsInf(value, 0) { + return NewDecimalFromInt(int64(value), 0) + } + + str := strconv.FormatFloat(value, 'f', -1, 64) + dec, err := ParseDecimal(str) + if err != nil { + panic(err) + } + return dec +} + +// NewDecimalFromFloatWithExponent converts a float64 to Decimal, with an arbitrary +// number of fractional digits. +// +// Example: +// +// NewDecimalFromFloatWithExponent(123.456, -2).String() // output: "123.46" +// +func NewDecimalFromFloatWithExponent(value float64, exp int32) Decimal { + mul := math.Pow(10, -float64(exp)) + floatValue := value * mul + if math.IsNaN(floatValue) || math.IsInf(floatValue, 0) { + panic(fmt.Sprintf("Cannot create a Decimal from %v", floatValue)) + } + dValue := big.NewInt(round(floatValue)) + + return Decimal{ + value: dValue, + exp: exp, + fracDigits: fracDigitsDefault(exp), + } +} + +// rescale returns a rescaled version of the decimal. Returned +// decimal may be less precise if the given exponent is bigger +// than the initial exponent of the Decimal. +// NOTE: this will truncate, NOT round +// +// Example: +// +// d := New(12345, -4) +// d2 := d.rescale(-1) +// d3 := d2.rescale(-4) +// println(d1) +// println(d2) +// println(d3) +// +// Output: +// +// 1.2345 +// 1.2 +// 1.2000 +// +func (d Decimal) rescale(exp int32) Decimal { + d.ensureInitialized() + if exp < -MaxFractionDigits-1 { + // Limit the number of digits but we can not call Round here because it is called by Round. + // Limit it to MaxFractionDigits + 1 to make sure the final result is correct. + exp = -MaxFractionDigits - 1 + } + // Must convert exps to float64 before - to prevent overflow. + diff := math.Abs(float64(exp) - float64(d.exp)) + value := new(big.Int).Set(d.value) + + expScale := new(big.Int).Exp(tenInt, big.NewInt(int64(diff)), nil) + if exp > d.exp { + value = value.Quo(value, expScale) + } else if exp < d.exp { + value = value.Mul(value, expScale) + } + return Decimal{ + value: value, + exp: exp, + fracDigits: d.fracDigits, + } +} + +// Abs returns the absolute value of the decimal. +func (d Decimal) Abs() Decimal { + d.ensureInitialized() + d2Value := new(big.Int).Abs(d.value) + return Decimal{ + value: d2Value, + exp: d.exp, + fracDigits: d.fracDigits, + } +} + +// Add returns d + d2. +func (d Decimal) Add(d2 Decimal) Decimal { + baseExp := min(d.exp, d2.exp) + rd := d.rescale(baseExp) + rd2 := d2.rescale(baseExp) + + d3Value := new(big.Int).Add(rd.value, rd2.value) + return Decimal{ + value: d3Value, + exp: baseExp, + fracDigits: fracDigitsPlus(d.fracDigits, d2.fracDigits), + } +} + +// Sub returns d - d2. +func (d Decimal) Sub(d2 Decimal) Decimal { + baseExp := min(d.exp, d2.exp) + rd := d.rescale(baseExp) + rd2 := d2.rescale(baseExp) + + d3Value := new(big.Int).Sub(rd.value, rd2.value) + return Decimal{ + value: d3Value, + exp: baseExp, + fracDigits: fracDigitsPlus(d.fracDigits, d2.fracDigits), + } +} + +// Mul returns d * d2. +func (d Decimal) Mul(d2 Decimal) Decimal { + d.ensureInitialized() + d2.ensureInitialized() + + expInt64 := int64(d.exp) + int64(d2.exp) + if expInt64 > math.MaxInt32 || expInt64 < math.MinInt32 { + // It is better to panic than to give incorrect results, as + // decimals are usually used for money. + panic(fmt.Sprintf("exponent %v overflows an int32!", expInt64)) + } + + d3Value := new(big.Int).Mul(d.value, d2.value) + val := Decimal{ + value: d3Value, + exp: int32(expInt64), + fracDigits: fracDigitsMul(d.fracDigits, d2.fracDigits), + } + if val.exp < -(MaxFractionDigits) { + val = val.Round(MaxFractionDigits) + } + return val +} + +// Div returns d / d2. If it doesn't divide exactly, the result will have +// DivisionPrecision digits after the decimal point. +func (d Decimal) Div(d2 Decimal) Decimal { + // Division is hard, use Rat to do it. + ratNum := d.Rat() + ratDenom := d2.Rat() + + quoRat := big.NewRat(0, 1).Quo(ratNum, ratDenom) + + // Converting from Rat to Decimal inefficiently for now. + ret, err := ParseDecimal(quoRat.FloatString(MaxFractionDigits + 1)) + if err != nil { + panic(err) // This should never happen. + } + // To pass test "2 / 3 * 3 < 2" -> "1". + ret = ret.Truncate(MaxFractionDigits) + ret.fracDigits = fracDigitsDiv(d.fracDigits) + return ret +} + +// Cmp compares the numbers represented by d and d2, and returns: +// +// -1 if d < d2 +// 0 if d == d2 +// +1 if d > d2 +// +func (d Decimal) Cmp(d2 Decimal) int { + baseExp := min(d.exp, d2.exp) + rd := d.rescale(baseExp) + rd2 := d2.rescale(baseExp) + + return rd.value.Cmp(rd2.value) +} + +// Equals returns whether the numbers represented by d and d2 are equal. +func (d Decimal) Equals(d2 Decimal) bool { + return d.Cmp(d2) == 0 +} + +// Exponent returns the exponent, or scale component of the decimal. +func (d Decimal) Exponent() int32 { + return d.exp +} + +// FracDigits returns the number of fractional digits of the decimal. +func (d Decimal) FracDigits() int32 { + return d.fracDigits +} + +// IntPart returns the integer component of the decimal. +func (d Decimal) IntPart() int64 { + scaledD := d.rescale(0) + return scaledD.value.Int64() +} + +// Rat returns a rational number representation of the decimal. +func (d Decimal) Rat() *big.Rat { + d.ensureInitialized() + if d.exp <= 0 { + // It must negate after casting to prevent int32 overflow. + denom := new(big.Int).Exp(tenInt, big.NewInt(-int64(d.exp)), nil) + return new(big.Rat).SetFrac(d.value, denom) + } + + mul := new(big.Int).Exp(tenInt, big.NewInt(int64(d.exp)), nil) + num := new(big.Int).Mul(d.value, mul) + return new(big.Rat).SetFrac(num, oneInt) +} + +// Float64 returns the nearest float64 value for d and a bool indicating +// whether f represents d exactly. +// For more details, see the documentation for big.Rat.Float64. +func (d Decimal) Float64() (f float64, exact bool) { + return d.Rat().Float64() +} + +// String returns the string representation of the decimal +// with the fixed point. +// +// Example: +// +// d := New(-12345, -3) +// println(d.String()) +// +// Output: +// +// -12.345 +// +func (d Decimal) String() string { + return d.StringFixed(d.fracDigits) +} + +// StringFixed returns a rounded fixed-point string with places digits after +// the decimal point. +// +// Example: +// +// NewFromFloat(0).StringFixed(2) // output: "0.00" +// NewFromFloat(0).StringFixed(0) // output: "0" +// NewFromFloat(5.45).StringFixed(0) // output: "5" +// NewFromFloat(5.45).StringFixed(1) // output: "5.5" +// NewFromFloat(5.45).StringFixed(2) // output: "5.45" +// NewFromFloat(5.45).StringFixed(3) // output: "5.450" +// NewFromFloat(545).StringFixed(-1) // output: "550" +// +func (d Decimal) StringFixed(places int32) string { + rounded := d.Round(places) + return rounded.string(false) +} + +// Round rounds the decimal to places decimal places. +// If places < 0, it will round the integer part to the nearest 10^(-places). +// +// Example: +// +// NewFromFloat(5.45).Round(1).String() // output: "5.5" +// NewFromFloat(545).Round(-1).String() // output: "550" +// +func (d Decimal) Round(places int32) Decimal { + // Truncate to places + 1. + ret := d.rescale(-places - 1) + + // Add sign(d) * 0.5. + if ret.value.Sign() < 0 { + ret.value.Sub(ret.value, fiveInt) + } else { + ret.value.Add(ret.value, fiveInt) + } + + // Floor for positive numbers, Ceil for negative numbers. + _, m := ret.value.DivMod(ret.value, tenInt, new(big.Int)) + ret.exp++ + if ret.value.Sign() < 0 && m.Cmp(zeroInt) != 0 { + ret.value.Add(ret.value, oneInt) + } + ret.fracDigits = places + return ret +} + +// Floor returns the nearest integer value less than or equal to d. +func (d Decimal) Floor() Decimal { + d.ensureInitialized() + + exp := big.NewInt(10) + + // It must negate after casting to prevent int32 overflow. + exp.Exp(exp, big.NewInt(-int64(d.exp)), nil) + + z := new(big.Int).Div(d.value, exp) + return Decimal{value: z, exp: 0} +} + +// Ceil returns the nearest integer value greater than or equal to d. +func (d Decimal) Ceil() Decimal { + d.ensureInitialized() + + exp := big.NewInt(10) + + // It must negate after casting to prevent int32 overflow. + exp.Exp(exp, big.NewInt(-int64(d.exp)), nil) + + z, m := new(big.Int).DivMod(d.value, exp, new(big.Int)) + if m.Cmp(zeroInt) != 0 { + z.Add(z, oneInt) + } + return Decimal{value: z, exp: 0} +} + +// Truncate truncates off digits from the number, without rounding. +// +// NOTE: precision is the last digit that will not be truncated (must be >= 0). +// +// Example: +// +// decimal.NewFromString("123.456").Truncate(2).String() // "123.45" +// +func (d Decimal) Truncate(precision int32) Decimal { + d.ensureInitialized() + if precision >= 0 && -precision > d.exp { + d = d.rescale(-precision) + } + d.fracDigits = precision + return d +} + +// UnmarshalJSON implements the json.Unmarshaler interface. +func (d *Decimal) UnmarshalJSON(decimalBytes []byte) error { + str, err := unquoteIfQuoted(decimalBytes) + if err != nil { + return fmt.Errorf("Error decoding string '%s': %s", decimalBytes, err) + } + + decimal, err := ParseDecimal(str) + *d = decimal + if err != nil { + return fmt.Errorf("Error decoding string '%s': %s", str, err) + } + return nil +} + +// MarshalJSON implements the json.Marshaler interface. +func (d Decimal) MarshalJSON() ([]byte, error) { + str := "\"" + d.String() + "\"" + return []byte(str), nil +} + +// Scan implements the sql.Scanner interface for database deserialization. +func (d *Decimal) Scan(value interface{}) error { + str, err := unquoteIfQuoted(value) + if err != nil { + return err + } + *d, err = ParseDecimal(str) + + return err +} + +// Value implements the driver.Valuer interface for database serialization. +func (d Decimal) Value() (driver.Value, error) { + return d.String(), nil +} + +// BigIntValue returns the *bit.Int value member of decimal. +func (d Decimal) BigIntValue() *big.Int { + return d.value +} + +// UnmarshalText implements the encoding.TextUnmarshaler interface for XML +// deserialization. +func (d *Decimal) UnmarshalText(text []byte) error { + str := string(text) + + dec, err := ParseDecimal(str) + *d = dec + if err != nil { + return fmt.Errorf("Error decoding string '%s': %s", str, err) + } + + return nil +} + +// MarshalText implements the encoding.TextMarshaler interface for XML +// serialization. +func (d Decimal) MarshalText() (text []byte, err error) { + return []byte(d.String()), nil +} + +// StringScaled first scales the decimal then calls .String() on it. +// NOTE: buggy, unintuitive, and DEPRECATED! Use StringFixed instead. +func (d Decimal) StringScaled(exp int32) string { + return d.rescale(exp).String() +} + +func (d Decimal) string(trimTrailingZeros bool) string { + if d.exp >= 0 { + return d.rescale(0).value.String() + } + + abs := new(big.Int).Abs(d.value) + str := abs.String() + + var intPart, fractionalPart string + + // this cast to int will cause bugs if d.exp == INT_MIN + // and you are on a 32-bit machine. Won't fix this super-edge case. + dExpInt := int(d.exp) + if len(str) > -dExpInt { + intPart = str[:len(str)+dExpInt] + fractionalPart = str[len(str)+dExpInt:] + } else { + intPart = "0" + + num0s := -dExpInt - len(str) + fractionalPart = strings.Repeat("0", num0s) + str + } + + if trimTrailingZeros { + i := len(fractionalPart) - 1 + for ; i >= 0; i-- { + if fractionalPart[i] != '0' { + break + } + } + fractionalPart = fractionalPart[:i+1] + } + + number := intPart + if len(fractionalPart) > 0 { + number += "." + fractionalPart + } + + if d.value.Sign() < 0 { + return "-" + number + } + + return number +} + +func (d *Decimal) ensureInitialized() { + if d.value == nil { + d.value = new(big.Int) + } +} + +func min(x, y int32) int32 { + if x >= y { + return y + } + return x +} + +func max(x, y int32) int32 { + if x >= y { + return x + } + return y +} + +func round(n float64) int64 { + if n < 0 { + return int64(n - 0.5) + } + return int64(n + 0.5) +} + +func unquoteIfQuoted(value interface{}) (string, error) { + bytes, ok := value.([]byte) + if !ok { + return "", fmt.Errorf("Could not convert value '%+v' to byte array", + value) + } + + // If the amount is quoted, strip the quotes. + if len(bytes) > 2 && bytes[0] == '"' && bytes[len(bytes)-1] == '"' { + bytes = bytes[1 : len(bytes)-1] + } + return string(bytes), nil +} + +func fracDigitsDefault(exp int32) int32 { + if exp < 0 { + return min(MaxFractionDigits, -exp) + } + + return 0 +} + +func fracDigitsPlus(x, y int32) int32 { + return max(x, y) +} + +func fracDigitsDiv(x int32) int32 { + return min(x+DivIncreasePrecision, MaxFractionDigits) +} + +func fracDigitsMul(a, b int32) int32 { + return min(MaxFractionDigits, a+b) +} diff --git a/vendor/github.com/pingcap/tidb/mysql/enum.go b/vendor/github.com/pingcap/tidb/mysql/enum.go new file mode 100644 index 000000000..425a3e1b5 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/mysql/enum.go @@ -0,0 +1,62 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package mysql + +import ( + "strconv" + "strings" + + "github.com/juju/errors" +) + +// Enum is for MySQL enum type. +type Enum struct { + Name string + Value uint64 +} + +// String implements fmt.Stringer interface. +func (e Enum) String() string { + return e.Name +} + +// ToNumber changes enum index to float64 for numeric operation. +func (e Enum) ToNumber() float64 { + return float64(e.Value) +} + +// ParseEnumName creates a Enum with item name. +func ParseEnumName(elems []string, name string) (Enum, error) { + for i, n := range elems { + if strings.EqualFold(n, name) { + return Enum{Name: n, Value: uint64(i) + 1}, nil + } + } + + // name doesn't exist, maybe an integer? + if num, err := strconv.ParseUint(name, 0, 64); err == nil { + return ParseEnumValue(elems, num) + } + + return Enum{}, errors.Errorf("item %s is not in enum %v", name, elems) +} + +// ParseEnumValue creates a Enum with special number. +func ParseEnumValue(elems []string, number uint64) (Enum, error) { + if number == 0 || number > uint64(len(elems)) { + return Enum{}, errors.Errorf("number %d overflow enum boundary [1, %d]", number, len(elems)) + } + + return Enum{Name: elems[number-1], Value: number}, nil +} diff --git a/vendor/github.com/pingcap/tidb/mysql/errcode.go b/vendor/github.com/pingcap/tidb/mysql/errcode.go new file mode 100644 index 000000000..8de53d7e7 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/mysql/errcode.go @@ -0,0 +1,885 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package mysql + +// MySQL error code. +// This value is numeric. It is not portable to other database systems. +const ( + ErrErrorFirst uint16 = 1000 + ErrHashchk = 1000 + ErrNisamchk = 1001 + ErrNo = 1002 + ErrYes = 1003 + ErrCantCreateFile = 1004 + ErrCantCreateTable = 1005 + ErrCantCreateDb = 1006 + ErrDbCreateExists = 1007 + ErrDbDropExists = 1008 + ErrDbDropDelete = 1009 + ErrDbDropRmdir = 1010 + ErrCantDeleteFile = 1011 + ErrCantFindSystemRec = 1012 + ErrCantGetStat = 1013 + ErrCantGetWd = 1014 + ErrCantLock = 1015 + ErrCantOpenFile = 1016 + ErrFileNotFound = 1017 + ErrCantReadDir = 1018 + ErrCantSetWd = 1019 + ErrCheckread = 1020 + ErrDiskFull = 1021 + ErrDupKey = 1022 + ErrErrorOnClose = 1023 + ErrErrorOnRead = 1024 + ErrErrorOnRename = 1025 + ErrErrorOnWrite = 1026 + ErrFileUsed = 1027 + ErrFilsortAbort = 1028 + ErrFormNotFound = 1029 + ErrGetErrno = 1030 + ErrIllegalHa = 1031 + ErrKeyNotFound = 1032 + ErrNotFormFile = 1033 + ErrNotKeyfile = 1034 + ErrOldKeyfile = 1035 + ErrOpenAsReadonly = 1036 + ErrOutofmemory = 1037 + ErrOutOfSortmemory = 1038 + ErrUnexpectedEOF = 1039 + ErrConCount = 1040 + ErrOutOfResources = 1041 + ErrBadHost = 1042 + ErrHandshake = 1043 + ErrDbaccessDenied = 1044 + ErrAccessDenied = 1045 + ErrNoDb = 1046 + ErrUnknownCom = 1047 + ErrBadNull = 1048 + ErrBadDb = 1049 + ErrTableExists = 1050 + ErrBadTable = 1051 + ErrNonUniq = 1052 + ErrServerShutdown = 1053 + ErrBadField = 1054 + ErrWrongFieldWithGroup = 1055 + ErrWrongGroupField = 1056 + ErrWrongSumSelect = 1057 + ErrWrongValueCount = 1058 + ErrTooLongIdent = 1059 + ErrDupFieldname = 1060 + ErrDupKeyname = 1061 + ErrDupEntry = 1062 + ErrWrongFieldSpec = 1063 + ErrParse = 1064 + ErrEmptyQuery = 1065 + ErrNonuniqTable = 1066 + ErrInvalidDefault = 1067 + ErrMultiplePriKey = 1068 + ErrTooManyKeys = 1069 + ErrTooManyKeyParts = 1070 + ErrTooLongKey = 1071 + ErrKeyColumnDoesNotExits = 1072 + ErrBlobUsedAsKey = 1073 + ErrTooBigFieldlength = 1074 + ErrWrongAutoKey = 1075 + ErrReady = 1076 + ErrNormalShutdown = 1077 + ErrGotSignal = 1078 + ErrShutdownComplete = 1079 + ErrForcingClose = 1080 + ErrIpsock = 1081 + ErrNoSuchIndex = 1082 + ErrWrongFieldTerminators = 1083 + ErrBlobsAndNoTerminated = 1084 + ErrTextfileNotReadable = 1085 + ErrFileExists = 1086 + ErrLoadInfo = 1087 + ErrAlterInfo = 1088 + ErrWrongSubKey = 1089 + ErrCantRemoveAllFields = 1090 + ErrCantDropFieldOrKey = 1091 + ErrInsertInfo = 1092 + ErrUpdateTableUsed = 1093 + ErrNoSuchThread = 1094 + ErrKillDenied = 1095 + ErrNoTablesUsed = 1096 + ErrTooBigSet = 1097 + ErrNoUniqueLogfile = 1098 + ErrTableNotLockedForWrite = 1099 + ErrTableNotLocked = 1100 + ErrBlobCantHaveDefault = 1101 + ErrWrongDbName = 1102 + ErrWrongTableName = 1103 + ErrTooBigSelect = 1104 + ErrUnknown = 1105 + ErrUnknownProcedure = 1106 + ErrWrongParamcountToProcedure = 1107 + ErrWrongParametersToProcedure = 1108 + ErrUnknownTable = 1109 + ErrFieldSpecifiedTwice = 1110 + ErrInvalidGroupFuncUse = 1111 + ErrUnsupportedExtension = 1112 + ErrTableMustHaveColumns = 1113 + ErrRecordFileFull = 1114 + ErrUnknownCharacterSet = 1115 + ErrTooManyTables = 1116 + ErrTooManyFields = 1117 + ErrTooBigRowsize = 1118 + ErrStackOverrun = 1119 + ErrWrongOuterJoin = 1120 + ErrNullColumnInIndex = 1121 + ErrCantFindUdf = 1122 + ErrCantInitializeUdf = 1123 + ErrUdfNoPaths = 1124 + ErrUdfExists = 1125 + ErrCantOpenLibrary = 1126 + ErrCantFindDlEntry = 1127 + ErrFunctionNotDefined = 1128 + ErrHostIsBlocked = 1129 + ErrHostNotPrivileged = 1130 + ErrPasswordAnonymousUser = 1131 + ErrPasswordNotAllowed = 1132 + ErrPasswordNoMatch = 1133 + ErrUpdateInfo = 1134 + ErrCantCreateThread = 1135 + ErrWrongValueCountOnRow = 1136 + ErrCantReopenTable = 1137 + ErrInvalidUseOfNull = 1138 + ErrRegexp = 1139 + ErrMixOfGroupFuncAndFields = 1140 + ErrNonexistingGrant = 1141 + ErrTableaccessDenied = 1142 + ErrColumnaccessDenied = 1143 + ErrIllegalGrantForTable = 1144 + ErrGrantWrongHostOrUser = 1145 + ErrNoSuchTable = 1146 + ErrNonexistingTableGrant = 1147 + ErrNotAllowedCommand = 1148 + ErrSyntax = 1149 + ErrDelayedCantChangeLock = 1150 + ErrTooManyDelayedThreads = 1151 + ErrAbortingConnection = 1152 + ErrNetPacketTooLarge = 1153 + ErrNetReadErrorFromPipe = 1154 + ErrNetFcntl = 1155 + ErrNetPacketsOutOfOrder = 1156 + ErrNetUncompress = 1157 + ErrNetRead = 1158 + ErrNetReadInterrupted = 1159 + ErrNetErrorOnWrite = 1160 + ErrNetWriteInterrupted = 1161 + ErrTooLongString = 1162 + ErrTableCantHandleBlob = 1163 + ErrTableCantHandleAutoIncrement = 1164 + ErrDelayedInsertTableLocked = 1165 + ErrWrongColumnName = 1166 + ErrWrongKeyColumn = 1167 + ErrWrongMrgTable = 1168 + ErrDupUnique = 1169 + ErrBlobKeyWithoutLength = 1170 + ErrPrimaryCantHaveNull = 1171 + ErrTooManyRows = 1172 + ErrRequiresPrimaryKey = 1173 + ErrNoRaidCompiled = 1174 + ErrUpdateWithoutKeyInSafeMode = 1175 + ErrKeyDoesNotExits = 1176 + ErrCheckNoSuchTable = 1177 + ErrCheckNotImplemented = 1178 + ErrCantDoThisDuringAnTransaction = 1179 + ErrErrorDuringCommit = 1180 + ErrErrorDuringRollback = 1181 + ErrErrorDuringFlushLogs = 1182 + ErrErrorDuringCheckpoint = 1183 + ErrNewAbortingConnection = 1184 + ErrDumpNotImplemented = 1185 + ErrFlushMasterBinlogClosed = 1186 + ErrIndexRebuild = 1187 + ErrMaster = 1188 + ErrMasterNetRead = 1189 + ErrMasterNetWrite = 1190 + ErrFtMatchingKeyNotFound = 1191 + ErrLockOrActiveTransaction = 1192 + ErrUnknownSystemVariable = 1193 + ErrCrashedOnUsage = 1194 + ErrCrashedOnRepair = 1195 + ErrWarningNotCompleteRollback = 1196 + ErrTransCacheFull = 1197 + ErrSlaveMustStop = 1198 + ErrSlaveNotRunning = 1199 + ErrBadSlave = 1200 + ErrMasterInfo = 1201 + ErrSlaveThread = 1202 + ErrTooManyUserConnections = 1203 + ErrSetConstantsOnly = 1204 + ErrLockWaitTimeout = 1205 + ErrLockTableFull = 1206 + ErrReadOnlyTransaction = 1207 + ErrDropDbWithReadLock = 1208 + ErrCreateDbWithReadLock = 1209 + ErrWrongArguments = 1210 + ErrNoPermissionToCreateUser = 1211 + ErrUnionTablesInDifferentDir = 1212 + ErrLockDeadlock = 1213 + ErrTableCantHandleFt = 1214 + ErrCannotAddForeign = 1215 + ErrNoReferencedRow = 1216 + ErrRowIsReferenced = 1217 + ErrConnectToMaster = 1218 + ErrQueryOnMaster = 1219 + ErrErrorWhenExecutingCommand = 1220 + ErrWrongUsage = 1221 + ErrWrongNumberOfColumnsInSelect = 1222 + ErrCantUpdateWithReadlock = 1223 + ErrMixingNotAllowed = 1224 + ErrDupArgument = 1225 + ErrUserLimitReached = 1226 + ErrSpecificAccessDenied = 1227 + ErrLocalVariable = 1228 + ErrGlobalVariable = 1229 + ErrNoDefault = 1230 + ErrWrongValueForVar = 1231 + ErrWrongTypeForVar = 1232 + ErrVarCantBeRead = 1233 + ErrCantUseOptionHere = 1234 + ErrNotSupportedYet = 1235 + ErrMasterFatalErrorReadingBinlog = 1236 + ErrSlaveIgnoredTable = 1237 + ErrIncorrectGlobalLocalVar = 1238 + ErrWrongFkDef = 1239 + ErrKeyRefDoNotMatchTableRef = 1240 + ErrOperandColumns = 1241 + ErrSubqueryNo1Row = 1242 + ErrUnknownStmtHandler = 1243 + ErrCorruptHelpDb = 1244 + ErrCyclicReference = 1245 + ErrAutoConvert = 1246 + ErrIllegalReference = 1247 + ErrDerivedMustHaveAlias = 1248 + ErrSelectReduced = 1249 + ErrTablenameNotAllowedHere = 1250 + ErrNotSupportedAuthMode = 1251 + ErrSpatialCantHaveNull = 1252 + ErrCollationCharsetMismatch = 1253 + ErrSlaveWasRunning = 1254 + ErrSlaveWasNotRunning = 1255 + ErrTooBigForUncompress = 1256 + ErrZlibZMem = 1257 + ErrZlibZBuf = 1258 + ErrZlibZData = 1259 + ErrCutValueGroupConcat = 1260 + ErrWarnTooFewRecords = 1261 + ErrWarnTooManyRecords = 1262 + ErrWarnNullToNotnull = 1263 + ErrWarnDataOutOfRange = 1264 + WarnDataTruncated = 1265 + ErrWarnUsingOtherHandler = 1266 + ErrCantAggregate2collations = 1267 + ErrDropUser = 1268 + ErrRevokeGrants = 1269 + ErrCantAggregate3collations = 1270 + ErrCantAggregateNcollations = 1271 + ErrVariableIsNotStruct = 1272 + ErrUnknownCollation = 1273 + ErrSlaveIgnoredSslParams = 1274 + ErrServerIsInSecureAuthMode = 1275 + ErrWarnFieldResolved = 1276 + ErrBadSlaveUntilCond = 1277 + ErrMissingSkipSlave = 1278 + ErrUntilCondIgnored = 1279 + ErrWrongNameForIndex = 1280 + ErrWrongNameForCatalog = 1281 + ErrWarnQcResize = 1282 + ErrBadFtColumn = 1283 + ErrUnknownKeyCache = 1284 + ErrWarnHostnameWontWork = 1285 + ErrUnknownStorageEngine = 1286 + ErrWarnDeprecatedSyntax = 1287 + ErrNonUpdatableTable = 1288 + ErrFeatureDisabled = 1289 + ErrOptionPreventsStatement = 1290 + ErrDuplicatedValueInType = 1291 + ErrTruncatedWrongValue = 1292 + ErrTooMuchAutoTimestampCols = 1293 + ErrInvalidOnUpdate = 1294 + ErrUnsupportedPs = 1295 + ErrGetErrmsg = 1296 + ErrGetTemporaryErrmsg = 1297 + ErrUnknownTimeZone = 1298 + ErrWarnInvalidTimestamp = 1299 + ErrInvalidCharacterString = 1300 + ErrWarnAllowedPacketOverflowed = 1301 + ErrConflictingDeclarations = 1302 + ErrSpNoRecursiveCreate = 1303 + ErrSpAlreadyExists = 1304 + ErrSpDoesNotExist = 1305 + ErrSpDropFailed = 1306 + ErrSpStoreFailed = 1307 + ErrSpLilabelMismatch = 1308 + ErrSpLabelRedefine = 1309 + ErrSpLabelMismatch = 1310 + ErrSpUninitVar = 1311 + ErrSpBadselect = 1312 + ErrSpBadreturn = 1313 + ErrSpBadstatement = 1314 + ErrUpdateLogDeprecatedIgnored = 1315 + ErrUpdateLogDeprecatedTranslated = 1316 + ErrQueryInterrupted = 1317 + ErrSpWrongNoOfArgs = 1318 + ErrSpCondMismatch = 1319 + ErrSpNoreturn = 1320 + ErrSpNoreturnend = 1321 + ErrSpBadCursorQuery = 1322 + ErrSpBadCursorSelect = 1323 + ErrSpCursorMismatch = 1324 + ErrSpCursorAlreadyOpen = 1325 + ErrSpCursorNotOpen = 1326 + ErrSpUndeclaredVar = 1327 + ErrSpWrongNoOfFetchArgs = 1328 + ErrSpFetchNoData = 1329 + ErrSpDupParam = 1330 + ErrSpDupVar = 1331 + ErrSpDupCond = 1332 + ErrSpDupCurs = 1333 + ErrSpCantAlter = 1334 + ErrSpSubselectNyi = 1335 + ErrStmtNotAllowedInSfOrTrg = 1336 + ErrSpVarcondAfterCurshndlr = 1337 + ErrSpCursorAfterHandler = 1338 + ErrSpCaseNotFound = 1339 + ErrFparserTooBigFile = 1340 + ErrFparserBadHeader = 1341 + ErrFparserEOFInComment = 1342 + ErrFparserErrorInParameter = 1343 + ErrFparserEOFInUnknownParameter = 1344 + ErrViewNoExplain = 1345 + ErrFrmUnknownType = 1346 + ErrWrongObject = 1347 + ErrNonupdateableColumn = 1348 + ErrViewSelectDerived = 1349 + ErrViewSelectClause = 1350 + ErrViewSelectVariable = 1351 + ErrViewSelectTmptable = 1352 + ErrViewWrongList = 1353 + ErrWarnViewMerge = 1354 + ErrWarnViewWithoutKey = 1355 + ErrViewInvalid = 1356 + ErrSpNoDropSp = 1357 + ErrSpGotoInHndlr = 1358 + ErrTrgAlreadyExists = 1359 + ErrTrgDoesNotExist = 1360 + ErrTrgOnViewOrTempTable = 1361 + ErrTrgCantChangeRow = 1362 + ErrTrgNoSuchRowInTrg = 1363 + ErrNoDefaultForField = 1364 + ErrDivisionByZero = 1365 + ErrTruncatedWrongValueForField = 1366 + ErrIllegalValueForType = 1367 + ErrViewNonupdCheck = 1368 + ErrViewCheckFailed = 1369 + ErrProcaccessDenied = 1370 + ErrRelayLogFail = 1371 + ErrPasswdLength = 1372 + ErrUnknownTargetBinlog = 1373 + ErrIoErrLogIndexRead = 1374 + ErrBinlogPurgeProhibited = 1375 + ErrFseekFail = 1376 + ErrBinlogPurgeFatalErr = 1377 + ErrLogInUse = 1378 + ErrLogPurgeUnknownErr = 1379 + ErrRelayLogInit = 1380 + ErrNoBinaryLogging = 1381 + ErrReservedSyntax = 1382 + ErrWsasFailed = 1383 + ErrDiffGroupsProc = 1384 + ErrNoGroupForProc = 1385 + ErrOrderWithProc = 1386 + ErrLoggingProhibitChangingOf = 1387 + ErrNoFileMapping = 1388 + ErrWrongMagic = 1389 + ErrPsManyParam = 1390 + ErrKeyPart0 = 1391 + ErrViewChecksum = 1392 + ErrViewMultiupdate = 1393 + ErrViewNoInsertFieldList = 1394 + ErrViewDeleteMergeView = 1395 + ErrCannotUser = 1396 + ErrXaerNota = 1397 + ErrXaerInval = 1398 + ErrXaerRmfail = 1399 + ErrXaerOutside = 1400 + ErrXaerRmerr = 1401 + ErrXaRbrollback = 1402 + ErrNonexistingProcGrant = 1403 + ErrProcAutoGrantFail = 1404 + ErrProcAutoRevokeFail = 1405 + ErrDataTooLong = 1406 + ErrSpBadSQLstate = 1407 + ErrStartup = 1408 + ErrLoadFromFixedSizeRowsToVar = 1409 + ErrCantCreateUserWithGrant = 1410 + ErrWrongValueForType = 1411 + ErrTableDefChanged = 1412 + ErrSpDupHandler = 1413 + ErrSpNotVarArg = 1414 + ErrSpNoRetset = 1415 + ErrCantCreateGeometryObject = 1416 + ErrFailedRoutineBreakBinlog = 1417 + ErrBinlogUnsafeRoutine = 1418 + ErrBinlogCreateRoutineNeedSuper = 1419 + ErrExecStmtWithOpenCursor = 1420 + ErrStmtHasNoOpenCursor = 1421 + ErrCommitNotAllowedInSfOrTrg = 1422 + ErrNoDefaultForViewField = 1423 + ErrSpNoRecursion = 1424 + ErrTooBigScale = 1425 + ErrTooBigPrecision = 1426 + ErrMBiggerThanD = 1427 + ErrWrongLockOfSystemTable = 1428 + ErrConnectToForeignDataSource = 1429 + ErrQueryOnForeignDataSource = 1430 + ErrForeignDataSourceDoesntExist = 1431 + ErrForeignDataStringInvalidCantCreate = 1432 + ErrForeignDataStringInvalid = 1433 + ErrCantCreateFederatedTable = 1434 + ErrTrgInWrongSchema = 1435 + ErrStackOverrunNeedMore = 1436 + ErrTooLongBody = 1437 + ErrWarnCantDropDefaultKeycache = 1438 + ErrTooBigDisplaywidth = 1439 + ErrXaerDupid = 1440 + ErrDatetimeFunctionOverflow = 1441 + ErrCantUpdateUsedTableInSfOrTrg = 1442 + ErrViewPreventUpdate = 1443 + ErrPsNoRecursion = 1444 + ErrSpCantSetAutocommit = 1445 + ErrMalformedDefiner = 1446 + ErrViewFrmNoUser = 1447 + ErrViewOtherUser = 1448 + ErrNoSuchUser = 1449 + ErrForbidSchemaChange = 1450 + ErrRowIsReferenced2 = 1451 + ErrNoReferencedRow2 = 1452 + ErrSpBadVarShadow = 1453 + ErrTrgNoDefiner = 1454 + ErrOldFileFormat = 1455 + ErrSpRecursionLimit = 1456 + ErrSpProcTableCorrupt = 1457 + ErrSpWrongName = 1458 + ErrTableNeedsUpgrade = 1459 + ErrSpNoAggregate = 1460 + ErrMaxPreparedStmtCountReached = 1461 + ErrViewRecursive = 1462 + ErrNonGroupingFieldUsed = 1463 + ErrTableCantHandleSpkeys = 1464 + ErrNoTriggersOnSystemSchema = 1465 + ErrRemovedSpaces = 1466 + ErrAutoincReadFailed = 1467 + ErrUsername = 1468 + ErrHostname = 1469 + ErrWrongStringLength = 1470 + ErrNonInsertableTable = 1471 + ErrAdminWrongMrgTable = 1472 + ErrTooHighLevelOfNestingForSelect = 1473 + ErrNameBecomesEmpty = 1474 + ErrAmbiguousFieldTerm = 1475 + ErrForeignServerExists = 1476 + ErrForeignServerDoesntExist = 1477 + ErrIllegalHaCreateOption = 1478 + ErrPartitionRequiresValues = 1479 + ErrPartitionWrongValues = 1480 + ErrPartitionMaxvalue = 1481 + ErrPartitionSubpartition = 1482 + ErrPartitionSubpartMix = 1483 + ErrPartitionWrongNoPart = 1484 + ErrPartitionWrongNoSubpart = 1485 + ErrWrongExprInPartitionFunc = 1486 + ErrNoConstExprInRangeOrList = 1487 + ErrFieldNotFoundPart = 1488 + ErrListOfFieldsOnlyInHash = 1489 + ErrInconsistentPartitionInfo = 1490 + ErrPartitionFuncNotAllowed = 1491 + ErrPartitionsMustBeDefined = 1492 + ErrRangeNotIncreasing = 1493 + ErrInconsistentTypeOfFunctions = 1494 + ErrMultipleDefConstInListPart = 1495 + ErrPartitionEntry = 1496 + ErrMixHandler = 1497 + ErrPartitionNotDefined = 1498 + ErrTooManyPartitions = 1499 + ErrSubpartition = 1500 + ErrCantCreateHandlerFile = 1501 + ErrBlobFieldInPartFunc = 1502 + ErrUniqueKeyNeedAllFieldsInPf = 1503 + ErrNoParts = 1504 + ErrPartitionMgmtOnNonpartitioned = 1505 + ErrForeignKeyOnPartitioned = 1506 + ErrDropPartitionNonExistent = 1507 + ErrDropLastPartition = 1508 + ErrCoalesceOnlyOnHashPartition = 1509 + ErrReorgHashOnlyOnSameNo = 1510 + ErrReorgNoParam = 1511 + ErrOnlyOnRangeListPartition = 1512 + ErrAddPartitionSubpart = 1513 + ErrAddPartitionNoNewPartition = 1514 + ErrCoalescePartitionNoPartition = 1515 + ErrReorgPartitionNotExist = 1516 + ErrSameNamePartition = 1517 + ErrNoBinlog = 1518 + ErrConsecutiveReorgPartitions = 1519 + ErrReorgOutsideRange = 1520 + ErrPartitionFunctionFailure = 1521 + ErrPartState = 1522 + ErrLimitedPartRange = 1523 + ErrPluginIsNotLoaded = 1524 + ErrWrongValue = 1525 + ErrNoPartitionForGivenValue = 1526 + ErrFilegroupOptionOnlyOnce = 1527 + ErrCreateFilegroupFailed = 1528 + ErrDropFilegroupFailed = 1529 + ErrTablespaceAutoExtend = 1530 + ErrWrongSizeNumber = 1531 + ErrSizeOverflow = 1532 + ErrAlterFilegroupFailed = 1533 + ErrBinlogRowLoggingFailed = 1534 + ErrBinlogRowWrongTableDef = 1535 + ErrBinlogRowRbrToSbr = 1536 + ErrEventAlreadyExists = 1537 + ErrEventStoreFailed = 1538 + ErrEventDoesNotExist = 1539 + ErrEventCantAlter = 1540 + ErrEventDropFailed = 1541 + ErrEventIntervalNotPositiveOrTooBig = 1542 + ErrEventEndsBeforeStarts = 1543 + ErrEventExecTimeInThePast = 1544 + ErrEventOpenTableFailed = 1545 + ErrEventNeitherMExprNorMAt = 1546 + ErrObsoleteColCountDoesntMatchCorrupted = 1547 + ErrObsoleteCannotLoadFromTable = 1548 + ErrEventCannotDelete = 1549 + ErrEventCompile = 1550 + ErrEventSameName = 1551 + ErrEventDataTooLong = 1552 + ErrDropIndexFk = 1553 + ErrWarnDeprecatedSyntaxWithVer = 1554 + ErrCantWriteLockLogTable = 1555 + ErrCantLockLogTable = 1556 + ErrForeignDuplicateKeyOldUnused = 1557 + ErrColCountDoesntMatchPleaseUpdate = 1558 + ErrTempTablePreventsSwitchOutOfRbr = 1559 + ErrStoredFunctionPreventsSwitchBinlogFormat = 1560 + ErrNdbCantSwitchBinlogFormat = 1561 + ErrPartitionNoTemporary = 1562 + ErrPartitionConstDomain = 1563 + ErrPartitionFunctionIsNotAllowed = 1564 + ErrDdlLog = 1565 + ErrNullInValuesLessThan = 1566 + ErrWrongPartitionName = 1567 + ErrCantChangeTxCharacteristics = 1568 + ErrDupEntryAutoincrementCase = 1569 + ErrEventModifyQueue = 1570 + ErrEventSetVar = 1571 + ErrPartitionMerge = 1572 + ErrCantActivateLog = 1573 + ErrRbrNotAvailable = 1574 + ErrBase64Decode = 1575 + ErrEventRecursionForbidden = 1576 + ErrEventsDb = 1577 + ErrOnlyIntegersAllowed = 1578 + ErrUnsuportedLogEngine = 1579 + ErrBadLogStatement = 1580 + ErrCantRenameLogTable = 1581 + ErrWrongParamcountToNativeFct = 1582 + ErrWrongParametersToNativeFct = 1583 + ErrWrongParametersToStoredFct = 1584 + ErrNativeFctNameCollision = 1585 + ErrDupEntryWithKeyName = 1586 + ErrBinlogPurgeEmfile = 1587 + ErrEventCannotCreateInThePast = 1588 + ErrEventCannotAlterInThePast = 1589 + ErrSlaveIncident = 1590 + ErrNoPartitionForGivenValueSilent = 1591 + ErrBinlogUnsafeStatement = 1592 + ErrSlaveFatal = 1593 + ErrSlaveRelayLogReadFailure = 1594 + ErrSlaveRelayLogWriteFailure = 1595 + ErrSlaveCreateEventFailure = 1596 + ErrSlaveMasterComFailure = 1597 + ErrBinlogLoggingImpossible = 1598 + ErrViewNoCreationCtx = 1599 + ErrViewInvalidCreationCtx = 1600 + ErrSrInvalidCreationCtx = 1601 + ErrTrgCorruptedFile = 1602 + ErrTrgNoCreationCtx = 1603 + ErrTrgInvalidCreationCtx = 1604 + ErrEventInvalidCreationCtx = 1605 + ErrTrgCantOpenTable = 1606 + ErrCantCreateSroutine = 1607 + ErrNeverUsed = 1608 + ErrNoFormatDescriptionEventBeforeBinlogStatement = 1609 + ErrSlaveCorruptEvent = 1610 + ErrLoadDataInvalidColumn = 1611 + ErrLogPurgeNoFile = 1612 + ErrXaRbtimeout = 1613 + ErrXaRbdeadlock = 1614 + ErrNeedReprepare = 1615 + ErrDelayedNotSupported = 1616 + WarnNoMasterInfo = 1617 + WarnOptionIgnored = 1618 + WarnPluginDeleteBuiltin = 1619 + WarnPluginBusy = 1620 + ErrVariableIsReadonly = 1621 + ErrWarnEngineTransactionRollback = 1622 + ErrSlaveHeartbeatFailure = 1623 + ErrSlaveHeartbeatValueOutOfRange = 1624 + ErrNdbReplicationSchema = 1625 + ErrConflictFnParse = 1626 + ErrExceptionsWrite = 1627 + ErrTooLongTableComment = 1628 + ErrTooLongFieldComment = 1629 + ErrFuncInexistentNameCollision = 1630 + ErrDatabaseName = 1631 + ErrTableName = 1632 + ErrPartitionName = 1633 + ErrSubpartitionName = 1634 + ErrTemporaryName = 1635 + ErrRenamedName = 1636 + ErrTooManyConcurrentTrxs = 1637 + WarnNonASCIISeparatorNotImplemented = 1638 + ErrDebugSyncTimeout = 1639 + ErrDebugSyncHitLimit = 1640 + ErrDupSignalSet = 1641 + ErrSignalWarn = 1642 + ErrSignalNotFound = 1643 + ErrSignalException = 1644 + ErrResignalWithoutActiveHandler = 1645 + ErrSignalBadConditionType = 1646 + WarnCondItemTruncated = 1647 + ErrCondItemTooLong = 1648 + ErrUnknownLocale = 1649 + ErrSlaveIgnoreServerIds = 1650 + ErrQueryCacheDisabled = 1651 + ErrSameNamePartitionField = 1652 + ErrPartitionColumnList = 1653 + ErrWrongTypeColumnValue = 1654 + ErrTooManyPartitionFuncFields = 1655 + ErrMaxvalueInValuesIn = 1656 + ErrTooManyValues = 1657 + ErrRowSinglePartitionField = 1658 + ErrFieldTypeNotAllowedAsPartitionField = 1659 + ErrPartitionFieldsTooLong = 1660 + ErrBinlogRowEngineAndStmtEngine = 1661 + ErrBinlogRowModeAndStmtEngine = 1662 + ErrBinlogUnsafeAndStmtEngine = 1663 + ErrBinlogRowInjectionAndStmtEngine = 1664 + ErrBinlogStmtModeAndRowEngine = 1665 + ErrBinlogRowInjectionAndStmtMode = 1666 + ErrBinlogMultipleEnginesAndSelfLoggingEngine = 1667 + ErrBinlogUnsafeLimit = 1668 + ErrBinlogUnsafeInsertDelayed = 1669 + ErrBinlogUnsafeSystemTable = 1670 + ErrBinlogUnsafeAutoincColumns = 1671 + ErrBinlogUnsafeUdf = 1672 + ErrBinlogUnsafeSystemVariable = 1673 + ErrBinlogUnsafeSystemFunction = 1674 + ErrBinlogUnsafeNontransAfterTrans = 1675 + ErrMessageAndStatement = 1676 + ErrSlaveConversionFailed = 1677 + ErrSlaveCantCreateConversion = 1678 + ErrInsideTransactionPreventsSwitchBinlogFormat = 1679 + ErrPathLength = 1680 + ErrWarnDeprecatedSyntaxNoReplacement = 1681 + ErrWrongNativeTableStructure = 1682 + ErrWrongPerfschemaUsage = 1683 + ErrWarnISSkippedTable = 1684 + ErrInsideTransactionPreventsSwitchBinlogDirect = 1685 + ErrStoredFunctionPreventsSwitchBinlogDirect = 1686 + ErrSpatialMustHaveGeomCol = 1687 + ErrTooLongIndexComment = 1688 + ErrLockAborted = 1689 + ErrDataOutOfRange = 1690 + ErrWrongSpvarTypeInLimit = 1691 + ErrBinlogUnsafeMultipleEnginesAndSelfLoggingEngine = 1692 + ErrBinlogUnsafeMixedStatement = 1693 + ErrInsideTransactionPreventsSwitchSQLLogBin = 1694 + ErrStoredFunctionPreventsSwitchSQLLogBin = 1695 + ErrFailedReadFromParFile = 1696 + ErrValuesIsNotIntType = 1697 + ErrAccessDeniedNoPassword = 1698 + ErrSetPasswordAuthPlugin = 1699 + ErrGrantPluginUserExists = 1700 + ErrTruncateIllegalFk = 1701 + ErrPluginIsPermanent = 1702 + ErrSlaveHeartbeatValueOutOfRangeMin = 1703 + ErrSlaveHeartbeatValueOutOfRangeMax = 1704 + ErrStmtCacheFull = 1705 + ErrMultiUpdateKeyConflict = 1706 + ErrTableNeedsRebuild = 1707 + WarnOptionBelowLimit = 1708 + ErrIndexColumnTooLong = 1709 + ErrErrorInTriggerBody = 1710 + ErrErrorInUnknownTriggerBody = 1711 + ErrIndexCorrupt = 1712 + ErrUndoRecordTooBig = 1713 + ErrBinlogUnsafeInsertIgnoreSelect = 1714 + ErrBinlogUnsafeInsertSelectUpdate = 1715 + ErrBinlogUnsafeReplaceSelect = 1716 + ErrBinlogUnsafeCreateIgnoreSelect = 1717 + ErrBinlogUnsafeCreateReplaceSelect = 1718 + ErrBinlogUnsafeUpdateIgnore = 1719 + ErrPluginNoUninstall = 1720 + ErrPluginNoInstall = 1721 + ErrBinlogUnsafeWriteAutoincSelect = 1722 + ErrBinlogUnsafeCreateSelectAutoinc = 1723 + ErrBinlogUnsafeInsertTwoKeys = 1724 + ErrTableInFkCheck = 1725 + ErrUnsupportedEngine = 1726 + ErrBinlogUnsafeAutoincNotFirst = 1727 + ErrCannotLoadFromTableV2 = 1728 + ErrMasterDelayValueOutOfRange = 1729 + ErrOnlyFdAndRbrEventsAllowedInBinlogStatement = 1730 + ErrPartitionExchangeDifferentOption = 1731 + ErrPartitionExchangePartTable = 1732 + ErrPartitionExchangeTempTable = 1733 + ErrPartitionInsteadOfSubpartition = 1734 + ErrUnknownPartition = 1735 + ErrTablesDifferentMetadata = 1736 + ErrRowDoesNotMatchPartition = 1737 + ErrBinlogCacheSizeGreaterThanMax = 1738 + ErrWarnIndexNotApplicable = 1739 + ErrPartitionExchangeForeignKey = 1740 + ErrNoSuchKeyValue = 1741 + ErrRplInfoDataTooLong = 1742 + ErrNetworkReadEventChecksumFailure = 1743 + ErrBinlogReadEventChecksumFailure = 1744 + ErrBinlogStmtCacheSizeGreaterThanMax = 1745 + ErrCantUpdateTableInCreateTableSelect = 1746 + ErrPartitionClauseOnNonpartitioned = 1747 + ErrRowDoesNotMatchGivenPartitionSet = 1748 + ErrNoSuchPartitionunused = 1749 + ErrChangeRplInfoRepositoryFailure = 1750 + ErrWarningNotCompleteRollbackWithCreatedTempTable = 1751 + ErrWarningNotCompleteRollbackWithDroppedTempTable = 1752 + ErrMtsFeatureIsNotSupported = 1753 + ErrMtsUpdatedDbsGreaterMax = 1754 + ErrMtsCantParallel = 1755 + ErrMtsInconsistentData = 1756 + ErrFulltextNotSupportedWithPartitioning = 1757 + ErrDaInvalidConditionNumber = 1758 + ErrInsecurePlainText = 1759 + ErrInsecureChangeMaster = 1760 + ErrForeignDuplicateKeyWithChildInfo = 1761 + ErrForeignDuplicateKeyWithoutChildInfo = 1762 + ErrSQLthreadWithSecureSlave = 1763 + ErrTableHasNoFt = 1764 + ErrVariableNotSettableInSfOrTrigger = 1765 + ErrVariableNotSettableInTransaction = 1766 + ErrGtidNextIsNotInGtidNextList = 1767 + ErrCantChangeGtidNextInTransactionWhenGtidNextListIsNull = 1768 + ErrSetStatementCannotInvokeFunction = 1769 + ErrGtidNextCantBeAutomaticIfGtidNextListIsNonNull = 1770 + ErrSkippingLoggedTransaction = 1771 + ErrMalformedGtidSetSpecification = 1772 + ErrMalformedGtidSetEncoding = 1773 + ErrMalformedGtidSpecification = 1774 + ErrGnoExhausted = 1775 + ErrBadSlaveAutoPosition = 1776 + ErrAutoPositionRequiresGtidModeOn = 1777 + ErrCantDoImplicitCommitInTrxWhenGtidNextIsSet = 1778 + ErrGtidMode2Or3RequiresEnforceGtidConsistencyOn = 1779 + ErrGtidModeRequiresBinlog = 1780 + ErrCantSetGtidNextToGtidWhenGtidModeIsOff = 1781 + ErrCantSetGtidNextToAnonymousWhenGtidModeIsOn = 1782 + ErrCantSetGtidNextListToNonNullWhenGtidModeIsOff = 1783 + ErrFoundGtidEventWhenGtidModeIsOff = 1784 + ErrGtidUnsafeNonTransactionalTable = 1785 + ErrGtidUnsafeCreateSelect = 1786 + ErrGtidUnsafeCreateDropTemporaryTableInTransaction = 1787 + ErrGtidModeCanOnlyChangeOneStepAtATime = 1788 + ErrMasterHasPurgedRequiredGtids = 1789 + ErrCantSetGtidNextWhenOwningGtid = 1790 + ErrUnknownExplainFormat = 1791 + ErrCantExecuteInReadOnlyTransaction = 1792 + ErrTooLongTablePartitionComment = 1793 + ErrSlaveConfiguration = 1794 + ErrInnodbFtLimit = 1795 + ErrInnodbNoFtTempTable = 1796 + ErrInnodbFtWrongDocidColumn = 1797 + ErrInnodbFtWrongDocidIndex = 1798 + ErrInnodbOnlineLogTooBig = 1799 + ErrUnknownAlterAlgorithm = 1800 + ErrUnknownAlterLock = 1801 + ErrMtsChangeMasterCantRunWithGaps = 1802 + ErrMtsRecoveryFailure = 1803 + ErrMtsResetWorkers = 1804 + ErrColCountDoesntMatchCorruptedV2 = 1805 + ErrSlaveSilentRetryTransaction = 1806 + ErrDiscardFkChecksRunning = 1807 + ErrTableSchemaMismatch = 1808 + ErrTableInSystemTablespace = 1809 + ErrIoRead = 1810 + ErrIoWrite = 1811 + ErrTablespaceMissing = 1812 + ErrTablespaceExists = 1813 + ErrTablespaceDiscarded = 1814 + ErrInternal = 1815 + ErrInnodbImport = 1816 + ErrInnodbIndexCorrupt = 1817 + ErrInvalidYearColumnLength = 1818 + ErrNotValidPassword = 1819 + ErrMustChangePassword = 1820 + ErrFkNoIndexChild = 1821 + ErrFkNoIndexParent = 1822 + ErrFkFailAddSystem = 1823 + ErrFkCannotOpenParent = 1824 + ErrFkIncorrectOption = 1825 + ErrFkDupName = 1826 + ErrPasswordFormat = 1827 + ErrFkColumnCannotDrop = 1828 + ErrFkColumnCannotDropChild = 1829 + ErrFkColumnNotNull = 1830 + ErrDupIndex = 1831 + ErrFkColumnCannotChange = 1832 + ErrFkColumnCannotChangeChild = 1833 + ErrFkCannotDeleteParent = 1834 + ErrMalformedPacket = 1835 + ErrReadOnlyMode = 1836 + ErrGtidNextTypeUndefinedGroup = 1837 + ErrVariableNotSettableInSp = 1838 + ErrCantSetGtidPurgedWhenGtidModeIsOff = 1839 + ErrCantSetGtidPurgedWhenGtidExecutedIsNotEmpty = 1840 + ErrCantSetGtidPurgedWhenOwnedGtidsIsNotEmpty = 1841 + ErrGtidPurgedWasChanged = 1842 + ErrGtidExecutedWasChanged = 1843 + ErrBinlogStmtModeAndNoReplTables = 1844 + ErrAlterOperationNotSupported = 1845 + ErrAlterOperationNotSupportedReason = 1846 + ErrAlterOperationNotSupportedReasonCopy = 1847 + ErrAlterOperationNotSupportedReasonPartition = 1848 + ErrAlterOperationNotSupportedReasonFkRename = 1849 + ErrAlterOperationNotSupportedReasonColumnType = 1850 + ErrAlterOperationNotSupportedReasonFkCheck = 1851 + ErrAlterOperationNotSupportedReasonIgnore = 1852 + ErrAlterOperationNotSupportedReasonNopk = 1853 + ErrAlterOperationNotSupportedReasonAutoinc = 1854 + ErrAlterOperationNotSupportedReasonHiddenFts = 1855 + ErrAlterOperationNotSupportedReasonChangeFts = 1856 + ErrAlterOperationNotSupportedReasonFts = 1857 + ErrSQLSlaveSkipCounterNotSettableInGtidMode = 1858 + ErrDupUnknownInIndex = 1859 + ErrIdentCausesTooLongPath = 1860 + ErrAlterOperationNotSupportedReasonNotNull = 1861 + ErrMustChangePasswordLogin = 1862 + ErrRowInWrongPartition = 1863 + ErrErrorLast = 1863 +) diff --git a/vendor/github.com/pingcap/tidb/mysql/errname.go b/vendor/github.com/pingcap/tidb/mysql/errname.go new file mode 100644 index 000000000..ad11ec746 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/mysql/errname.go @@ -0,0 +1,882 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package mysql + +// MySQLErrName maps error code to MySQL error messages. +var MySQLErrName = map[uint16]string{ + ErrHashchk: "hashchk", + ErrNisamchk: "isamchk", + ErrNo: "NO", + ErrYes: "YES", + ErrCantCreateFile: "Can't create file '%-.200s' (errno: %d - %s)", + ErrCantCreateTable: "Can't create table '%-.200s' (errno: %d)", + ErrCantCreateDb: "Can't create database '%-.192s' (errno: %d)", + ErrDbCreateExists: "Can't create database '%-.192s'; database exists", + ErrDbDropExists: "Can't drop database '%-.192s'; database doesn't exist", + ErrDbDropDelete: "Error dropping database (can't delete '%-.192s', errno: %d)", + ErrDbDropRmdir: "Error dropping database (can't rmdir '%-.192s', errno: %d)", + ErrCantDeleteFile: "Error on delete of '%-.192s' (errno: %d - %s)", + ErrCantFindSystemRec: "Can't read record in system table", + ErrCantGetStat: "Can't get status of '%-.200s' (errno: %d - %s)", + ErrCantGetWd: "Can't get working directory (errno: %d - %s)", + ErrCantLock: "Can't lock file (errno: %d - %s)", + ErrCantOpenFile: "Can't open file: '%-.200s' (errno: %d - %s)", + ErrFileNotFound: "Can't find file: '%-.200s' (errno: %d - %s)", + ErrCantReadDir: "Can't read dir of '%-.192s' (errno: %d - %s)", + ErrCantSetWd: "Can't change dir to '%-.192s' (errno: %d - %s)", + ErrCheckread: "Record has changed since last read in table '%-.192s'", + ErrDiskFull: "Disk full (%s); waiting for someone to free some space... (errno: %d - %s)", + ErrDupKey: "Can't write; duplicate key in table '%-.192s'", + ErrErrorOnClose: "Error on close of '%-.192s' (errno: %d - %s)", + ErrErrorOnRead: "Error reading file '%-.200s' (errno: %d - %s)", + ErrErrorOnRename: "Error on rename of '%-.210s' to '%-.210s' (errno: %d - %s)", + ErrErrorOnWrite: "Error writing file '%-.200s' (errno: %d - %s)", + ErrFileUsed: "'%-.192s' is locked against change", + ErrFilsortAbort: "Sort aborted", + ErrFormNotFound: "View '%-.192s' doesn't exist for '%-.192s'", + ErrGetErrno: "Got error %d from storage engine", + ErrIllegalHa: "Table storage engine for '%-.192s' doesn't have this option", + ErrKeyNotFound: "Can't find record in '%-.192s'", + ErrNotFormFile: "Incorrect information in file: '%-.200s'", + ErrNotKeyfile: "Incorrect key file for table '%-.200s'; try to repair it", + ErrOldKeyfile: "Old key file for table '%-.192s'; repair it!", + ErrOpenAsReadonly: "Table '%-.192s' is read only", + ErrOutofmemory: "Out of memory; restart server and try again (needed %d bytes)", + ErrOutOfSortmemory: "Out of sort memory, consider increasing server sort buffer size", + ErrUnexpectedEOF: "Unexpected EOF found when reading file '%-.192s' (errno: %d - %s)", + ErrConCount: "Too many connections", + ErrOutOfResources: "Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space", + ErrBadHost: "Can't get hostname for your address", + ErrHandshake: "Bad handshake", + ErrDbaccessDenied: "Access denied for user '%-.48s'@'%-.64s' to database '%-.192s'", + ErrAccessDenied: "Access denied for user '%-.48s'@'%-.64s' (using password: %s)", + ErrNoDb: "No database selected", + ErrUnknownCom: "Unknown command", + ErrBadNull: "Column '%-.192s' cannot be null", + ErrBadDb: "Unknown database '%-.192s'", + ErrTableExists: "Table '%-.192s' already exists", + ErrBadTable: "Unknown table '%-.100s'", + ErrNonUniq: "Column '%-.192s' in %-.192s is ambiguous", + ErrServerShutdown: "Server shutdown in progress", + ErrBadField: "Unknown column '%-.192s' in '%-.192s'", + ErrWrongFieldWithGroup: "'%-.192s' isn't in GROUP BY", + ErrWrongGroupField: "Can't group on '%-.192s'", + ErrWrongSumSelect: "Statement has sum functions and columns in same statement", + ErrWrongValueCount: "Column count doesn't match value count", + ErrTooLongIdent: "Identifier name '%-.100s' is too long", + ErrDupFieldname: "Duplicate column name '%-.192s'", + ErrDupKeyname: "Duplicate key name '%-.192s'", + ErrDupEntry: "Duplicate entry '%-.192s' for key %d", + ErrWrongFieldSpec: "Incorrect column specifier for column '%-.192s'", + ErrParse: "%s near '%-.80s' at line %d", + ErrEmptyQuery: "Query was empty", + ErrNonuniqTable: "Not unique table/alias: '%-.192s'", + ErrInvalidDefault: "Invalid default value for '%-.192s'", + ErrMultiplePriKey: "Multiple primary key defined", + ErrTooManyKeys: "Too many keys specified; max %d keys allowed", + ErrTooManyKeyParts: "Too many key parts specified; max %d parts allowed", + ErrTooLongKey: "Specified key was too long; max key length is %d bytes", + ErrKeyColumnDoesNotExits: "Key column '%-.192s' doesn't exist in table", + ErrBlobUsedAsKey: "BLOB column '%-.192s' can't be used in key specification with the used table type", + ErrTooBigFieldlength: "Column length too big for column '%-.192s' (max = %lu); use BLOB or TEXT instead", + ErrWrongAutoKey: "Incorrect table definition; there can be only one auto column and it must be defined as a key", + ErrReady: "%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d", + ErrNormalShutdown: "%s: Normal shutdown\n", + ErrGotSignal: "%s: Got signal %d. Aborting!\n", + ErrShutdownComplete: "%s: Shutdown complete\n", + ErrForcingClose: "%s: Forcing close of thread %ld user: '%-.48s'\n", + ErrIpsock: "Can't create IP socket", + ErrNoSuchIndex: "Table '%-.192s' has no index like the one used in CREATE INDEX; recreate the table", + ErrWrongFieldTerminators: "Field separator argument is not what is expected; check the manual", + ErrBlobsAndNoTerminated: "You can't use fixed rowlength with BLOBs; please use 'fields terminated by'", + ErrTextfileNotReadable: "The file '%-.128s' must be in the database directory or be readable by all", + ErrFileExists: "File '%-.200s' already exists", + ErrLoadInfo: "Records: %ld Deleted: %ld Skipped: %ld Warnings: %ld", + ErrAlterInfo: "Records: %ld Duplicates: %ld", + ErrWrongSubKey: "Incorrect prefix key; the used key part isn't a string, the used length is longer than the key part, or the storage engine doesn't support unique prefix keys", + ErrCantRemoveAllFields: "You can't delete all columns with ALTER TABLE; use DROP TABLE instead", + ErrCantDropFieldOrKey: "Can't DROP '%-.192s'; check that column/key exists", + ErrInsertInfo: "Records: %ld Duplicates: %ld Warnings: %ld", + ErrUpdateTableUsed: "You can't specify target table '%-.192s' for update in FROM clause", + ErrNoSuchThread: "Unknown thread id: %lu", + ErrKillDenied: "You are not owner of thread %lu", + ErrNoTablesUsed: "No tables used", + ErrTooBigSet: "Too many strings for column %-.192s and SET", + ErrNoUniqueLogfile: "Can't generate a unique log-filename %-.200s.(1-999)\n", + ErrTableNotLockedForWrite: "Table '%-.192s' was locked with a READ lock and can't be updated", + ErrTableNotLocked: "Table '%-.192s' was not locked with LOCK TABLES", + ErrBlobCantHaveDefault: "BLOB/TEXT column '%-.192s' can't have a default value", + ErrWrongDbName: "Incorrect database name '%-.100s'", + ErrWrongTableName: "Incorrect table name '%-.100s'", + ErrTooBigSelect: "The SELECT would examine more than MAXJOINSIZE rows; check your WHERE and use SET SQLBIGSELECTS=1 or SET MAXJOINSIZE=# if the SELECT is okay", + ErrUnknown: "Unknown error", + ErrUnknownProcedure: "Unknown procedure '%-.192s'", + ErrWrongParamcountToProcedure: "Incorrect parameter count to procedure '%-.192s'", + ErrWrongParametersToProcedure: "Incorrect parameters to procedure '%-.192s'", + ErrUnknownTable: "Unknown table '%-.192s' in %-.32s", + ErrFieldSpecifiedTwice: "Column '%-.192s' specified twice", + ErrInvalidGroupFuncUse: "Invalid use of group function", + ErrUnsupportedExtension: "Table '%-.192s' uses an extension that doesn't exist in this MySQL version", + ErrTableMustHaveColumns: "A table must have at least 1 column", + ErrRecordFileFull: "The table '%-.192s' is full", + ErrUnknownCharacterSet: "Unknown character set: '%-.64s'", + ErrTooManyTables: "Too many tables; MySQL can only use %d tables in a join", + ErrTooManyFields: "Too many columns", + ErrTooBigRowsize: "Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs", + ErrStackOverrun: "Thread stack overrun: Used: %ld of a %ld stack. Use 'mysqld --threadStack=#' to specify a bigger stack if needed", + ErrWrongOuterJoin: "Cross dependency found in OUTER JOIN; examine your ON conditions", + ErrNullColumnInIndex: "Table handler doesn't support NULL in given index. Please change column '%-.192s' to be NOT NULL or use another handler", + ErrCantFindUdf: "Can't load function '%-.192s'", + ErrCantInitializeUdf: "Can't initialize function '%-.192s'; %-.80s", + ErrUdfNoPaths: "No paths allowed for shared library", + ErrUdfExists: "Function '%-.192s' already exists", + ErrCantOpenLibrary: "Can't open shared library '%-.192s' (errno: %d %-.128s)", + ErrCantFindDlEntry: "Can't find symbol '%-.128s' in library", + ErrFunctionNotDefined: "Function '%-.192s' is not defined", + ErrHostIsBlocked: "Host '%-.64s' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'", + ErrHostNotPrivileged: "Host '%-.64s' is not allowed to connect to this MySQL server", + ErrPasswordAnonymousUser: "You are using MySQL as an anonymous user and anonymous users are not allowed to change passwords", + ErrPasswordNotAllowed: "You must have privileges to update tables in the mysql database to be able to change passwords for others", + ErrPasswordNoMatch: "Can't find any matching row in the user table", + ErrUpdateInfo: "Rows matched: %ld Changed: %ld Warnings: %ld", + ErrCantCreateThread: "Can't create a new thread (errno %d); if you are not out of available memory, you can consult the manual for a possible OS-dependent bug", + ErrWrongValueCountOnRow: "Column count doesn't match value count at row %ld", + ErrCantReopenTable: "Can't reopen table: '%-.192s'", + ErrInvalidUseOfNull: "Invalid use of NULL value", + ErrRegexp: "Got error '%-.64s' from regexp", + ErrMixOfGroupFuncAndFields: "Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause", + ErrNonexistingGrant: "There is no such grant defined for user '%-.48s' on host '%-.64s'", + ErrTableaccessDenied: "%-.128s command denied to user '%-.48s'@'%-.64s' for table '%-.64s'", + ErrColumnaccessDenied: "%-.16s command denied to user '%-.48s'@'%-.64s' for column '%-.192s' in table '%-.192s'", + ErrIllegalGrantForTable: "Illegal GRANT/REVOKE command; please consult the manual to see which privileges can be used", + ErrGrantWrongHostOrUser: "The host or user argument to GRANT is too long", + ErrNoSuchTable: "Table '%-.192s.%-.192s' doesn't exist", + ErrNonexistingTableGrant: "There is no such grant defined for user '%-.48s' on host '%-.64s' on table '%-.192s'", + ErrNotAllowedCommand: "The used command is not allowed with this MySQL version", + ErrSyntax: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use", + ErrDelayedCantChangeLock: "Delayed insert thread couldn't get requested lock for table %-.192s", + ErrTooManyDelayedThreads: "Too many delayed threads in use", + ErrAbortingConnection: "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)", + ErrNetPacketTooLarge: "Got a packet bigger than 'maxAllowedPacket' bytes", + ErrNetReadErrorFromPipe: "Got a read error from the connection pipe", + ErrNetFcntl: "Got an error from fcntl()", + ErrNetPacketsOutOfOrder: "Got packets out of order", + ErrNetUncompress: "Couldn't uncompress communication packet", + ErrNetRead: "Got an error reading communication packets", + ErrNetReadInterrupted: "Got timeout reading communication packets", + ErrNetErrorOnWrite: "Got an error writing communication packets", + ErrNetWriteInterrupted: "Got timeout writing communication packets", + ErrTooLongString: "Result string is longer than 'maxAllowedPacket' bytes", + ErrTableCantHandleBlob: "The used table type doesn't support BLOB/TEXT columns", + ErrTableCantHandleAutoIncrement: "The used table type doesn't support AUTOINCREMENT columns", + ErrDelayedInsertTableLocked: "INSERT DELAYED can't be used with table '%-.192s' because it is locked with LOCK TABLES", + ErrWrongColumnName: "Incorrect column name '%-.100s'", + ErrWrongKeyColumn: "The used storage engine can't index column '%-.192s'", + ErrWrongMrgTable: "Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist", + ErrDupUnique: "Can't write, because of unique constraint, to table '%-.192s'", + ErrBlobKeyWithoutLength: "BLOB/TEXT column '%-.192s' used in key specification without a key length", + ErrPrimaryCantHaveNull: "All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead", + ErrTooManyRows: "Result consisted of more than one row", + ErrRequiresPrimaryKey: "This table type requires a primary key", + ErrNoRaidCompiled: "This version of MySQL is not compiled with RAID support", + ErrUpdateWithoutKeyInSafeMode: "You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column", + ErrKeyDoesNotExits: "Key '%-.192s' doesn't exist in table '%-.192s'", + ErrCheckNoSuchTable: "Can't open table", + ErrCheckNotImplemented: "The storage engine for the table doesn't support %s", + ErrCantDoThisDuringAnTransaction: "You are not allowed to execute this command in a transaction", + ErrErrorDuringCommit: "Got error %d during COMMIT", + ErrErrorDuringRollback: "Got error %d during ROLLBACK", + ErrErrorDuringFlushLogs: "Got error %d during FLUSHLOGS", + ErrErrorDuringCheckpoint: "Got error %d during CHECKPOINT", + ErrNewAbortingConnection: "Aborted connection %ld to db: '%-.192s' user: '%-.48s' host: '%-.64s' (%-.64s)", + ErrDumpNotImplemented: "The storage engine for the table does not support binary table dump", + ErrFlushMasterBinlogClosed: "Binlog closed, cannot RESET MASTER", + ErrIndexRebuild: "Failed rebuilding the index of dumped table '%-.192s'", + ErrMaster: "Error from master: '%-.64s'", + ErrMasterNetRead: "Net error reading from master", + ErrMasterNetWrite: "Net error writing to master", + ErrFtMatchingKeyNotFound: "Can't find FULLTEXT index matching the column list", + ErrLockOrActiveTransaction: "Can't execute the given command because you have active locked tables or an active transaction", + ErrUnknownSystemVariable: "Unknown system variable '%-.64s'", + ErrCrashedOnUsage: "Table '%-.192s' is marked as crashed and should be repaired", + ErrCrashedOnRepair: "Table '%-.192s' is marked as crashed and last (automatic?) repair failed", + ErrWarningNotCompleteRollback: "Some non-transactional changed tables couldn't be rolled back", + ErrTransCacheFull: "Multi-statement transaction required more than 'maxBinlogCacheSize' bytes of storage; increase this mysqld variable and try again", + ErrSlaveMustStop: "This operation cannot be performed with a running slave; run STOP SLAVE first", + ErrSlaveNotRunning: "This operation requires a running slave; configure slave and do START SLAVE", + ErrBadSlave: "The server is not configured as slave; fix in config file or with CHANGE MASTER TO", + ErrMasterInfo: "Could not initialize master info structure; more error messages can be found in the MySQL error log", + ErrSlaveThread: "Could not create slave thread; check system resources", + ErrTooManyUserConnections: "User %-.64s already has more than 'maxUserConnections' active connections", + ErrSetConstantsOnly: "You may only use constant expressions with SET", + ErrLockWaitTimeout: "Lock wait timeout exceeded; try restarting transaction", + ErrLockTableFull: "The total number of locks exceeds the lock table size", + ErrReadOnlyTransaction: "Update locks cannot be acquired during a READ UNCOMMITTED transaction", + ErrDropDbWithReadLock: "DROP DATABASE not allowed while thread is holding global read lock", + ErrCreateDbWithReadLock: "CREATE DATABASE not allowed while thread is holding global read lock", + ErrWrongArguments: "Incorrect arguments to %s", + ErrNoPermissionToCreateUser: "'%-.48s'@'%-.64s' is not allowed to create new users", + ErrUnionTablesInDifferentDir: "Incorrect table definition; all MERGE tables must be in the same database", + ErrLockDeadlock: "Deadlock found when trying to get lock; try restarting transaction", + ErrTableCantHandleFt: "The used table type doesn't support FULLTEXT indexes", + ErrCannotAddForeign: "Cannot add foreign key constraint", + ErrNoReferencedRow: "Cannot add or update a child row: a foreign key constraint fails", + ErrRowIsReferenced: "Cannot delete or update a parent row: a foreign key constraint fails", + ErrConnectToMaster: "Error connecting to master: %-.128s", + ErrQueryOnMaster: "Error running query on master: %-.128s", + ErrErrorWhenExecutingCommand: "Error when executing command %s: %-.128s", + ErrWrongUsage: "Incorrect usage of %s and %s", + ErrWrongNumberOfColumnsInSelect: "The used SELECT statements have a different number of columns", + ErrCantUpdateWithReadlock: "Can't execute the query because you have a conflicting read lock", + ErrMixingNotAllowed: "Mixing of transactional and non-transactional tables is disabled", + ErrDupArgument: "Option '%s' used twice in statement", + ErrUserLimitReached: "User '%-.64s' has exceeded the '%s' resource (current value: %ld)", + ErrSpecificAccessDenied: "Access denied; you need (at least one of) the %-.128s privilege(s) for this operation", + ErrLocalVariable: "Variable '%-.64s' is a SESSION variable and can't be used with SET GLOBAL", + ErrGlobalVariable: "Variable '%-.64s' is a GLOBAL variable and should be set with SET GLOBAL", + ErrNoDefault: "Variable '%-.64s' doesn't have a default value", + ErrWrongValueForVar: "Variable '%-.64s' can't be set to the value of '%-.200s'", + ErrWrongTypeForVar: "Incorrect argument type to variable '%-.64s'", + ErrVarCantBeRead: "Variable '%-.64s' can only be set, not read", + ErrCantUseOptionHere: "Incorrect usage/placement of '%s'", + ErrNotSupportedYet: "This version of MySQL doesn't yet support '%s'", + ErrMasterFatalErrorReadingBinlog: "Got fatal error %d from master when reading data from binary log: '%-.320s'", + ErrSlaveIgnoredTable: "Slave SQL thread ignored the query because of replicate-*-table rules", + ErrIncorrectGlobalLocalVar: "Variable '%-.192s' is a %s variable", + ErrWrongFkDef: "Incorrect foreign key definition for '%-.192s': %s", + ErrKeyRefDoNotMatchTableRef: "Key reference and table reference don't match", + ErrOperandColumns: "Operand should contain %d column(s)", + ErrSubqueryNo1Row: "Subquery returns more than 1 row", + ErrUnknownStmtHandler: "Unknown prepared statement handler (%.*s) given to %s", + ErrCorruptHelpDb: "Help database is corrupt or does not exist", + ErrCyclicReference: "Cyclic reference on subqueries", + ErrAutoConvert: "Converting column '%s' from %s to %s", + ErrIllegalReference: "Reference '%-.64s' not supported (%s)", + ErrDerivedMustHaveAlias: "Every derived table must have its own alias", + ErrSelectReduced: "Select %u was reduced during optimization", + ErrTablenameNotAllowedHere: "Table '%-.192s' from one of the SELECTs cannot be used in %-.32s", + ErrNotSupportedAuthMode: "Client does not support authentication protocol requested by server; consider upgrading MySQL client", + ErrSpatialCantHaveNull: "All parts of a SPATIAL index must be NOT NULL", + ErrCollationCharsetMismatch: "COLLATION '%s' is not valid for CHARACTER SET '%s'", + ErrSlaveWasRunning: "Slave is already running", + ErrSlaveWasNotRunning: "Slave already has been stopped", + ErrTooBigForUncompress: "Uncompressed data size too large; the maximum size is %d (probably, length of uncompressed data was corrupted)", + ErrZlibZMem: "ZLIB: Not enough memory", + ErrZlibZBuf: "ZLIB: Not enough room in the output buffer (probably, length of uncompressed data was corrupted)", + ErrZlibZData: "ZLIB: Input data corrupted", + ErrCutValueGroupConcat: "Row %u was cut by GROUPCONCAT()", + ErrWarnTooFewRecords: "Row %ld doesn't contain data for all columns", + ErrWarnTooManyRecords: "Row %ld was truncated; it contained more data than there were input columns", + ErrWarnNullToNotnull: "Column set to default value; NULL supplied to NOT NULL column '%s' at row %ld", + ErrWarnDataOutOfRange: "Out of range value for column '%s' at row %ld", + WarnDataTruncated: "Data truncated for column '%s' at row %ld", + ErrWarnUsingOtherHandler: "Using storage engine %s for table '%s'", + ErrCantAggregate2collations: "Illegal mix of collations (%s,%s) and (%s,%s) for operation '%s'", + ErrDropUser: "Cannot drop one or more of the requested users", + ErrRevokeGrants: "Can't revoke all privileges for one or more of the requested users", + ErrCantAggregate3collations: "Illegal mix of collations (%s,%s), (%s,%s), (%s,%s) for operation '%s'", + ErrCantAggregateNcollations: "Illegal mix of collations for operation '%s'", + ErrVariableIsNotStruct: "Variable '%-.64s' is not a variable component (can't be used as XXXX.variableName)", + ErrUnknownCollation: "Unknown collation: '%-.64s'", + ErrSlaveIgnoredSslParams: "SSL parameters in CHANGE MASTER are ignored because this MySQL slave was compiled without SSL support; they can be used later if MySQL slave with SSL is started", + ErrServerIsInSecureAuthMode: "Server is running in --secure-auth mode, but '%s'@'%s' has a password in the old format; please change the password to the new format", + ErrWarnFieldResolved: "Field or reference '%-.192s%s%-.192s%s%-.192s' of SELECT #%d was resolved in SELECT #%d", + ErrBadSlaveUntilCond: "Incorrect parameter or combination of parameters for START SLAVE UNTIL", + ErrMissingSkipSlave: "It is recommended to use --skip-slave-start when doing step-by-step replication with START SLAVE UNTIL; otherwise, you will get problems if you get an unexpected slave's mysqld restart", + ErrUntilCondIgnored: "SQL thread is not to be started so UNTIL options are ignored", + ErrWrongNameForIndex: "Incorrect index name '%-.100s'", + ErrWrongNameForCatalog: "Incorrect catalog name '%-.100s'", + ErrWarnQcResize: "Query cache failed to set size %lu; new query cache size is %lu", + ErrBadFtColumn: "Column '%-.192s' cannot be part of FULLTEXT index", + ErrUnknownKeyCache: "Unknown key cache '%-.100s'", + ErrWarnHostnameWontWork: "MySQL is started in --skip-name-resolve mode; you must restart it without this switch for this grant to work", + ErrUnknownStorageEngine: "Unknown storage engine '%s'", + ErrWarnDeprecatedSyntax: "'%s' is deprecated and will be removed in a future release. Please use %s instead", + ErrNonUpdatableTable: "The target table %-.100s of the %s is not updatable", + ErrFeatureDisabled: "The '%s' feature is disabled; you need MySQL built with '%s' to have it working", + ErrOptionPreventsStatement: "The MySQL server is running with the %s option so it cannot execute this statement", + ErrDuplicatedValueInType: "Column '%-.100s' has duplicated value '%-.64s' in %s", + ErrTruncatedWrongValue: "Truncated incorrect %-.32s value: '%-.128s'", + ErrTooMuchAutoTimestampCols: "Incorrect table definition; there can be only one TIMESTAMP column with CURRENTTIMESTAMP in DEFAULT or ON UPDATE clause", + ErrInvalidOnUpdate: "Invalid ON UPDATE clause for '%-.192s' column", + ErrUnsupportedPs: "This command is not supported in the prepared statement protocol yet", + ErrGetErrmsg: "Got error %d '%-.100s' from %s", + ErrGetTemporaryErrmsg: "Got temporary error %d '%-.100s' from %s", + ErrUnknownTimeZone: "Unknown or incorrect time zone: '%-.64s'", + ErrWarnInvalidTimestamp: "Invalid TIMESTAMP value in column '%s' at row %ld", + ErrInvalidCharacterString: "Invalid %s character string: '%.64s'", + ErrWarnAllowedPacketOverflowed: "Result of %s() was larger than maxAllowedPacket (%ld) - truncated", + ErrConflictingDeclarations: "Conflicting declarations: '%s%s' and '%s%s'", + ErrSpNoRecursiveCreate: "Can't create a %s from within another stored routine", + ErrSpAlreadyExists: "%s %s already exists", + ErrSpDoesNotExist: "%s %s does not exist", + ErrSpDropFailed: "Failed to DROP %s %s", + ErrSpStoreFailed: "Failed to CREATE %s %s", + ErrSpLilabelMismatch: "%s with no matching label: %s", + ErrSpLabelRedefine: "Redefining label %s", + ErrSpLabelMismatch: "End-label %s without match", + ErrSpUninitVar: "Referring to uninitialized variable %s", + ErrSpBadselect: "PROCEDURE %s can't return a result set in the given context", + ErrSpBadreturn: "RETURN is only allowed in a FUNCTION", + ErrSpBadstatement: "%s is not allowed in stored procedures", + ErrUpdateLogDeprecatedIgnored: "The update log is deprecated and replaced by the binary log; SET SQLLOGUPDATE has been ignored.", + ErrUpdateLogDeprecatedTranslated: "The update log is deprecated and replaced by the binary log; SET SQLLOGUPDATE has been translated to SET SQLLOGBIN.", + ErrQueryInterrupted: "Query execution was interrupted", + ErrSpWrongNoOfArgs: "Incorrect number of arguments for %s %s; expected %u, got %u", + ErrSpCondMismatch: "Undefined CONDITION: %s", + ErrSpNoreturn: "No RETURN found in FUNCTION %s", + ErrSpNoreturnend: "FUNCTION %s ended without RETURN", + ErrSpBadCursorQuery: "Cursor statement must be a SELECT", + ErrSpBadCursorSelect: "Cursor SELECT must not have INTO", + ErrSpCursorMismatch: "Undefined CURSOR: %s", + ErrSpCursorAlreadyOpen: "Cursor is already open", + ErrSpCursorNotOpen: "Cursor is not open", + ErrSpUndeclaredVar: "Undeclared variable: %s", + ErrSpWrongNoOfFetchArgs: "Incorrect number of FETCH variables", + ErrSpFetchNoData: "No data - zero rows fetched, selected, or processed", + ErrSpDupParam: "Duplicate parameter: %s", + ErrSpDupVar: "Duplicate variable: %s", + ErrSpDupCond: "Duplicate condition: %s", + ErrSpDupCurs: "Duplicate cursor: %s", + ErrSpCantAlter: "Failed to ALTER %s %s", + ErrSpSubselectNyi: "Subquery value not supported", + ErrStmtNotAllowedInSfOrTrg: "%s is not allowed in stored function or trigger", + ErrSpVarcondAfterCurshndlr: "Variable or condition declaration after cursor or handler declaration", + ErrSpCursorAfterHandler: "Cursor declaration after handler declaration", + ErrSpCaseNotFound: "Case not found for CASE statement", + ErrFparserTooBigFile: "Configuration file '%-.192s' is too big", + ErrFparserBadHeader: "Malformed file type header in file '%-.192s'", + ErrFparserEOFInComment: "Unexpected end of file while parsing comment '%-.200s'", + ErrFparserErrorInParameter: "Error while parsing parameter '%-.192s' (line: '%-.192s')", + ErrFparserEOFInUnknownParameter: "Unexpected end of file while skipping unknown parameter '%-.192s'", + ErrViewNoExplain: "EXPLAIN/SHOW can not be issued; lacking privileges for underlying table", + ErrFrmUnknownType: "File '%-.192s' has unknown type '%-.64s' in its header", + ErrWrongObject: "'%-.192s.%-.192s' is not %s", + ErrNonupdateableColumn: "Column '%-.192s' is not updatable", + ErrViewSelectDerived: "View's SELECT contains a subquery in the FROM clause", + ErrViewSelectClause: "View's SELECT contains a '%s' clause", + ErrViewSelectVariable: "View's SELECT contains a variable or parameter", + ErrViewSelectTmptable: "View's SELECT refers to a temporary table '%-.192s'", + ErrViewWrongList: "View's SELECT and view's field list have different column counts", + ErrWarnViewMerge: "View merge algorithm can't be used here for now (assumed undefined algorithm)", + ErrWarnViewWithoutKey: "View being updated does not have complete key of underlying table in it", + ErrViewInvalid: "View '%-.192s.%-.192s' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them", + ErrSpNoDropSp: "Can't drop or alter a %s from within another stored routine", + ErrSpGotoInHndlr: "GOTO is not allowed in a stored procedure handler", + ErrTrgAlreadyExists: "Trigger already exists", + ErrTrgDoesNotExist: "Trigger does not exist", + ErrTrgOnViewOrTempTable: "Trigger's '%-.192s' is view or temporary table", + ErrTrgCantChangeRow: "Updating of %s row is not allowed in %strigger", + ErrTrgNoSuchRowInTrg: "There is no %s row in %s trigger", + ErrNoDefaultForField: "Field '%-.192s' doesn't have a default value", + ErrDivisionByZero: "Division by 0", + ErrTruncatedWrongValueForField: "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld", + ErrIllegalValueForType: "Illegal %s '%-.192s' value found during parsing", + ErrViewNonupdCheck: "CHECK OPTION on non-updatable view '%-.192s.%-.192s'", + ErrViewCheckFailed: "CHECK OPTION failed '%-.192s.%-.192s'", + ErrProcaccessDenied: "%-.16s command denied to user '%-.48s'@'%-.64s' for routine '%-.192s'", + ErrRelayLogFail: "Failed purging old relay logs: %s", + ErrPasswdLength: "Password hash should be a %d-digit hexadecimal number", + ErrUnknownTargetBinlog: "Target log not found in binlog index", + ErrIoErrLogIndexRead: "I/O error reading log index file", + ErrBinlogPurgeProhibited: "Server configuration does not permit binlog purge", + ErrFseekFail: "Failed on fseek()", + ErrBinlogPurgeFatalErr: "Fatal error during log purge", + ErrLogInUse: "A purgeable log is in use, will not purge", + ErrLogPurgeUnknownErr: "Unknown error during log purge", + ErrRelayLogInit: "Failed initializing relay log position: %s", + ErrNoBinaryLogging: "You are not using binary logging", + ErrReservedSyntax: "The '%-.64s' syntax is reserved for purposes internal to the MySQL server", + ErrWsasFailed: "WSAStartup Failed", + ErrDiffGroupsProc: "Can't handle procedures with different groups yet", + ErrNoGroupForProc: "Select must have a group with this procedure", + ErrOrderWithProc: "Can't use ORDER clause with this procedure", + ErrLoggingProhibitChangingOf: "Binary logging and replication forbid changing the global server %s", + ErrNoFileMapping: "Can't map file: %-.200s, errno: %d", + ErrWrongMagic: "Wrong magic in %-.64s", + ErrPsManyParam: "Prepared statement contains too many placeholders", + ErrKeyPart0: "Key part '%-.192s' length cannot be 0", + ErrViewChecksum: "View text checksum failed", + ErrViewMultiupdate: "Can not modify more than one base table through a join view '%-.192s.%-.192s'", + ErrViewNoInsertFieldList: "Can not insert into join view '%-.192s.%-.192s' without fields list", + ErrViewDeleteMergeView: "Can not delete from join view '%-.192s.%-.192s'", + ErrCannotUser: "Operation %s failed for %.256s", + ErrXaerNota: "XAERNOTA: Unknown XID", + ErrXaerInval: "XAERINVAL: Invalid arguments (or unsupported command)", + ErrXaerRmfail: "XAERRMFAIL: The command cannot be executed when global transaction is in the %.64s state", + ErrXaerOutside: "XAEROUTSIDE: Some work is done outside global transaction", + ErrXaerRmerr: "XAERRMERR: Fatal error occurred in the transaction branch - check your data for consistency", + ErrXaRbrollback: "XARBROLLBACK: Transaction branch was rolled back", + ErrNonexistingProcGrant: "There is no such grant defined for user '%-.48s' on host '%-.64s' on routine '%-.192s'", + ErrProcAutoGrantFail: "Failed to grant EXECUTE and ALTER ROUTINE privileges", + ErrProcAutoRevokeFail: "Failed to revoke all privileges to dropped routine", + ErrDataTooLong: "Data too long for column '%s' at row %ld", + ErrSpBadSQLstate: "Bad SQLSTATE: '%s'", + ErrStartup: "%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d %s", + ErrLoadFromFixedSizeRowsToVar: "Can't load value from file with fixed size rows to variable", + ErrCantCreateUserWithGrant: "You are not allowed to create a user with GRANT", + ErrWrongValueForType: "Incorrect %-.32s value: '%-.128s' for function %-.32s", + ErrTableDefChanged: "Table definition has changed, please retry transaction", + ErrSpDupHandler: "Duplicate handler declared in the same block", + ErrSpNotVarArg: "OUT or INOUT argument %d for routine %s is not a variable or NEW pseudo-variable in BEFORE trigger", + ErrSpNoRetset: "Not allowed to return a result set from a %s", + ErrCantCreateGeometryObject: "Cannot get geometry object from data you send to the GEOMETRY field", + ErrFailedRoutineBreakBinlog: "A routine failed and has neither NO SQL nor READS SQL DATA in its declaration and binary logging is enabled; if non-transactional tables were updated, the binary log will miss their changes", + ErrBinlogUnsafeRoutine: "This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe logBinTrustFunctionCreators variable)", + ErrBinlogCreateRoutineNeedSuper: "You do not have the SUPER privilege and binary logging is enabled (you *might* want to use the less safe logBinTrustFunctionCreators variable)", + ErrExecStmtWithOpenCursor: "You can't execute a prepared statement which has an open cursor associated with it. Reset the statement to re-execute it.", + ErrStmtHasNoOpenCursor: "The statement (%lu) has no open cursor.", + ErrCommitNotAllowedInSfOrTrg: "Explicit or implicit commit is not allowed in stored function or trigger.", + ErrNoDefaultForViewField: "Field of view '%-.192s.%-.192s' underlying table doesn't have a default value", + ErrSpNoRecursion: "Recursive stored functions and triggers are not allowed.", + ErrTooBigScale: "Too big scale %d specified for column '%-.192s'. Maximum is %lu.", + ErrTooBigPrecision: "Too big precision %d specified for column '%-.192s'. Maximum is %lu.", + ErrMBiggerThanD: "For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%-.192s').", + ErrWrongLockOfSystemTable: "You can't combine write-locking of system tables with other tables or lock types", + ErrConnectToForeignDataSource: "Unable to connect to foreign data source: %.64s", + ErrQueryOnForeignDataSource: "There was a problem processing the query on the foreign data source. Data source : %-.64s", + ErrForeignDataSourceDoesntExist: "The foreign data source you are trying to reference does not exist. Data source : %-.64s", + ErrForeignDataStringInvalidCantCreate: "Can't create federated table. The data source connection string '%-.64s' is not in the correct format", + ErrForeignDataStringInvalid: "The data source connection string '%-.64s' is not in the correct format", + ErrCantCreateFederatedTable: "Can't create federated table. Foreign data src : %-.64s", + ErrTrgInWrongSchema: "Trigger in wrong schema", + ErrStackOverrunNeedMore: "Thread stack overrun: %ld bytes used of a %ld byte stack, and %ld bytes needed. Use 'mysqld --threadStack=#' to specify a bigger stack.", + ErrTooLongBody: "Routine body for '%-.100s' is too long", + ErrWarnCantDropDefaultKeycache: "Cannot drop default keycache", + ErrTooBigDisplaywidth: "Display width out of range for column '%-.192s' (max = %lu)", + ErrXaerDupid: "XAERDUPID: The XID already exists", + ErrDatetimeFunctionOverflow: "Datetime function: %-.32s field overflow", + ErrCantUpdateUsedTableInSfOrTrg: "Can't update table '%-.192s' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.", + ErrViewPreventUpdate: "The definition of table '%-.192s' prevents operation %.192s on table '%-.192s'.", + ErrPsNoRecursion: "The prepared statement contains a stored routine call that refers to that same statement. It's not allowed to execute a prepared statement in such a recursive manner", + ErrSpCantSetAutocommit: "Not allowed to set autocommit from a stored function or trigger", + ErrMalformedDefiner: "Definer is not fully qualified", + ErrViewFrmNoUser: "View '%-.192s'.'%-.192s' has no definer information (old table format). Current user is used as definer. Please recreate the view!", + ErrViewOtherUser: "You need the SUPER privilege for creation view with '%-.192s'@'%-.192s' definer", + ErrNoSuchUser: "The user specified as a definer ('%-.64s'@'%-.64s') does not exist", + ErrForbidSchemaChange: "Changing schema from '%-.192s' to '%-.192s' is not allowed.", + ErrRowIsReferenced2: "Cannot delete or update a parent row: a foreign key constraint fails (%.192s)", + ErrNoReferencedRow2: "Cannot add or update a child row: a foreign key constraint fails (%.192s)", + ErrSpBadVarShadow: "Variable '%-.64s' must be quoted with `...`, or renamed", + ErrTrgNoDefiner: "No definer attribute for trigger '%-.192s'.'%-.192s'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger.", + ErrOldFileFormat: "'%-.192s' has an old format, you should re-create the '%s' object(s)", + ErrSpRecursionLimit: "Recursive limit %d (as set by the maxSpRecursionDepth variable) was exceeded for routine %.192s", + ErrSpProcTableCorrupt: "Failed to load routine %-.192s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)", + ErrSpWrongName: "Incorrect routine name '%-.192s'", + ErrTableNeedsUpgrade: "Table upgrade required. Please do \"REPAIR TABLE `%-.32s`\"", + ErrSpNoAggregate: "AGGREGATE is not supported for stored functions", + ErrMaxPreparedStmtCountReached: "Can't create more than maxPreparedStmtCount statements (current value: %lu)", + ErrViewRecursive: "`%-.192s`.`%-.192s` contains view recursion", + ErrNonGroupingFieldUsed: "Non-grouping field '%-.192s' is used in %-.64s clause", + ErrTableCantHandleSpkeys: "The used table type doesn't support SPATIAL indexes", + ErrNoTriggersOnSystemSchema: "Triggers can not be created on system tables", + ErrRemovedSpaces: "Leading spaces are removed from name '%s'", + ErrAutoincReadFailed: "Failed to read auto-increment value from storage engine", + ErrUsername: "user name", + ErrHostname: "host name", + ErrWrongStringLength: "String '%-.70s' is too long for %s (should be no longer than %d)", + ErrNonInsertableTable: "The target table %-.100s of the %s is not insertable-into", + ErrAdminWrongMrgTable: "Table '%-.64s' is differently defined or of non-MyISAM type or doesn't exist", + ErrTooHighLevelOfNestingForSelect: "Too high level of nesting for select", + ErrNameBecomesEmpty: "Name '%-.64s' has become ''", + ErrAmbiguousFieldTerm: "First character of the FIELDS TERMINATED string is ambiguous; please use non-optional and non-empty FIELDS ENCLOSED BY", + ErrForeignServerExists: "The foreign server, %s, you are trying to create already exists.", + ErrForeignServerDoesntExist: "The foreign server name you are trying to reference does not exist. Data source : %-.64s", + ErrIllegalHaCreateOption: "Table storage engine '%-.64s' does not support the create option '%.64s'", + ErrPartitionRequiresValues: "Syntax : %-.64s PARTITIONING requires definition of VALUES %-.64s for each partition", + ErrPartitionWrongValues: "Only %-.64s PARTITIONING can use VALUES %-.64s in partition definition", + ErrPartitionMaxvalue: "MAXVALUE can only be used in last partition definition", + ErrPartitionSubpartition: "Subpartitions can only be hash partitions and by key", + ErrPartitionSubpartMix: "Must define subpartitions on all partitions if on one partition", + ErrPartitionWrongNoPart: "Wrong number of partitions defined, mismatch with previous setting", + ErrPartitionWrongNoSubpart: "Wrong number of subpartitions defined, mismatch with previous setting", + ErrWrongExprInPartitionFunc: "Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed", + ErrNoConstExprInRangeOrList: "Expression in RANGE/LIST VALUES must be constant", + ErrFieldNotFoundPart: "Field in list of fields for partition function not found in table", + ErrListOfFieldsOnlyInHash: "List of fields is only allowed in KEY partitions", + ErrInconsistentPartitionInfo: "The partition info in the frm file is not consistent with what can be written into the frm file", + ErrPartitionFuncNotAllowed: "The %-.192s function returns the wrong type", + ErrPartitionsMustBeDefined: "For %-.64s partitions each partition must be defined", + ErrRangeNotIncreasing: "VALUES LESS THAN value must be strictly increasing for each partition", + ErrInconsistentTypeOfFunctions: "VALUES value must be of same type as partition function", + ErrMultipleDefConstInListPart: "Multiple definition of same constant in list partitioning", + ErrPartitionEntry: "Partitioning can not be used stand-alone in query", + ErrMixHandler: "The mix of handlers in the partitions is not allowed in this version of MySQL", + ErrPartitionNotDefined: "For the partitioned engine it is necessary to define all %-.64s", + ErrTooManyPartitions: "Too many partitions (including subpartitions) were defined", + ErrSubpartition: "It is only possible to mix RANGE/LIST partitioning with HASH/KEY partitioning for subpartitioning", + ErrCantCreateHandlerFile: "Failed to create specific handler file", + ErrBlobFieldInPartFunc: "A BLOB field is not allowed in partition function", + ErrUniqueKeyNeedAllFieldsInPf: "A %-.192s must include all columns in the table's partitioning function", + ErrNoParts: "Number of %-.64s = 0 is not an allowed value", + ErrPartitionMgmtOnNonpartitioned: "Partition management on a not partitioned table is not possible", + ErrForeignKeyOnPartitioned: "Foreign key clause is not yet supported in conjunction with partitioning", + ErrDropPartitionNonExistent: "Error in list of partitions to %-.64s", + ErrDropLastPartition: "Cannot remove all partitions, use DROP TABLE instead", + ErrCoalesceOnlyOnHashPartition: "COALESCE PARTITION can only be used on HASH/KEY partitions", + ErrReorgHashOnlyOnSameNo: "REORGANIZE PARTITION can only be used to reorganize partitions not to change their numbers", + ErrReorgNoParam: "REORGANIZE PARTITION without parameters can only be used on auto-partitioned tables using HASH PARTITIONs", + ErrOnlyOnRangeListPartition: "%-.64s PARTITION can only be used on RANGE/LIST partitions", + ErrAddPartitionSubpart: "Trying to Add partition(s) with wrong number of subpartitions", + ErrAddPartitionNoNewPartition: "At least one partition must be added", + ErrCoalescePartitionNoPartition: "At least one partition must be coalesced", + ErrReorgPartitionNotExist: "More partitions to reorganize than there are partitions", + ErrSameNamePartition: "Duplicate partition name %-.192s", + ErrNoBinlog: "It is not allowed to shut off binlog on this command", + ErrConsecutiveReorgPartitions: "When reorganizing a set of partitions they must be in consecutive order", + ErrReorgOutsideRange: "Reorganize of range partitions cannot change total ranges except for last partition where it can extend the range", + ErrPartitionFunctionFailure: "Partition function not supported in this version for this handler", + ErrPartState: "Partition state cannot be defined from CREATE/ALTER TABLE", + ErrLimitedPartRange: "The %-.64s handler only supports 32 bit integers in VALUES", + ErrPluginIsNotLoaded: "Plugin '%-.192s' is not loaded", + ErrWrongValue: "Incorrect %-.32s value: '%-.128s'", + ErrNoPartitionForGivenValue: "Table has no partition for value %-.64s", + ErrFilegroupOptionOnlyOnce: "It is not allowed to specify %s more than once", + ErrCreateFilegroupFailed: "Failed to create %s", + ErrDropFilegroupFailed: "Failed to drop %s", + ErrTablespaceAutoExtend: "The handler doesn't support autoextend of tablespaces", + ErrWrongSizeNumber: "A size parameter was incorrectly specified, either number or on the form 10M", + ErrSizeOverflow: "The size number was correct but we don't allow the digit part to be more than 2 billion", + ErrAlterFilegroupFailed: "Failed to alter: %s", + ErrBinlogRowLoggingFailed: "Writing one row to the row-based binary log failed", + ErrBinlogRowWrongTableDef: "Table definition on master and slave does not match: %s", + ErrBinlogRowRbrToSbr: "Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events", + ErrEventAlreadyExists: "Event '%-.192s' already exists", + ErrEventStoreFailed: "Failed to store event %s. Error code %d from storage engine.", + ErrEventDoesNotExist: "Unknown event '%-.192s'", + ErrEventCantAlter: "Failed to alter event '%-.192s'", + ErrEventDropFailed: "Failed to drop %s", + ErrEventIntervalNotPositiveOrTooBig: "INTERVAL is either not positive or too big", + ErrEventEndsBeforeStarts: "ENDS is either invalid or before STARTS", + ErrEventExecTimeInThePast: "Event execution time is in the past. Event has been disabled", + ErrEventOpenTableFailed: "Failed to open mysql.event", + ErrEventNeitherMExprNorMAt: "No datetime expression provided", + ErrObsoleteColCountDoesntMatchCorrupted: "Column count of mysql.%s is wrong. Expected %d, found %d. The table is probably corrupted", + ErrObsoleteCannotLoadFromTable: "Cannot load from mysql.%s. The table is probably corrupted", + ErrEventCannotDelete: "Failed to delete the event from mysql.event", + ErrEventCompile: "Error during compilation of event's body", + ErrEventSameName: "Same old and new event name", + ErrEventDataTooLong: "Data for column '%s' too long", + ErrDropIndexFk: "Cannot drop index '%-.192s': needed in a foreign key constraint", + ErrWarnDeprecatedSyntaxWithVer: "The syntax '%s' is deprecated and will be removed in MySQL %s. Please use %s instead", + ErrCantWriteLockLogTable: "You can't write-lock a log table. Only read access is possible", + ErrCantLockLogTable: "You can't use locks with log tables.", + ErrForeignDuplicateKeyOldUnused: "Upholding foreign key constraints for table '%.192s', entry '%-.192s', key %d would lead to a duplicate entry", + ErrColCountDoesntMatchPleaseUpdate: "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use mysqlUpgrade to fix this error.", + ErrTempTablePreventsSwitchOutOfRbr: "Cannot switch out of the row-based binary log format when the session has open temporary tables", + ErrStoredFunctionPreventsSwitchBinlogFormat: "Cannot change the binary logging format inside a stored function or trigger", + ErrNdbCantSwitchBinlogFormat: "The NDB cluster engine does not support changing the binlog format on the fly yet", + ErrPartitionNoTemporary: "Cannot create temporary table with partitions", + ErrPartitionConstDomain: "Partition constant is out of partition function domain", + ErrPartitionFunctionIsNotAllowed: "This partition function is not allowed", + ErrDdlLog: "Error in DDL log", + ErrNullInValuesLessThan: "Not allowed to use NULL value in VALUES LESS THAN", + ErrWrongPartitionName: "Incorrect partition name", + ErrCantChangeTxCharacteristics: "Transaction characteristics can't be changed while a transaction is in progress", + ErrDupEntryAutoincrementCase: "ALTER TABLE causes autoIncrement resequencing, resulting in duplicate entry '%-.192s' for key '%-.192s'", + ErrEventModifyQueue: "Internal scheduler error %d", + ErrEventSetVar: "Error during starting/stopping of the scheduler. Error code %u", + ErrPartitionMerge: "Engine cannot be used in partitioned tables", + ErrCantActivateLog: "Cannot activate '%-.64s' log", + ErrRbrNotAvailable: "The server was not built with row-based replication", + ErrBase64Decode: "Decoding of base64 string failed", + ErrEventRecursionForbidden: "Recursion of EVENT DDL statements is forbidden when body is present", + ErrEventsDb: "Cannot proceed because system tables used by Event Scheduler were found damaged at server start", + ErrOnlyIntegersAllowed: "Only integers allowed as number here", + ErrUnsuportedLogEngine: "This storage engine cannot be used for log tables\"", + ErrBadLogStatement: "You cannot '%s' a log table if logging is enabled", + ErrCantRenameLogTable: "Cannot rename '%s'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to '%s'", + ErrWrongParamcountToNativeFct: "Incorrect parameter count in the call to native function '%-.192s'", + ErrWrongParametersToNativeFct: "Incorrect parameters in the call to native function '%-.192s'", + ErrWrongParametersToStoredFct: "Incorrect parameters in the call to stored function '%-.192s'", + ErrNativeFctNameCollision: "This function '%-.192s' has the same name as a native function", + ErrDupEntryWithKeyName: "Duplicate entry '%-.64s' for key '%-.192s'", + ErrBinlogPurgeEmfile: "Too many files opened, please execute the command again", + ErrEventCannotCreateInThePast: "Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was dropped immediately after creation.", + ErrEventCannotAlterInThePast: "Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. The event was not changed. Specify a time in the future.", + ErrSlaveIncident: "The incident %s occured on the master. Message: %-.64s", + ErrNoPartitionForGivenValueSilent: "Table has no partition for some existing values", + ErrBinlogUnsafeStatement: "Unsafe statement written to the binary log using statement format since BINLOGFORMAT = STATEMENT. %s", + ErrSlaveFatal: "Fatal : %s", + ErrSlaveRelayLogReadFailure: "Relay log read failure: %s", + ErrSlaveRelayLogWriteFailure: "Relay log write failure: %s", + ErrSlaveCreateEventFailure: "Failed to create %s", + ErrSlaveMasterComFailure: "Master command %s failed: %s", + ErrBinlogLoggingImpossible: "Binary logging not possible. Message: %s", + ErrViewNoCreationCtx: "View `%-.64s`.`%-.64s` has no creation context", + ErrViewInvalidCreationCtx: "Creation context of view `%-.64s`.`%-.64s' is invalid", + ErrSrInvalidCreationCtx: "Creation context of stored routine `%-.64s`.`%-.64s` is invalid", + ErrTrgCorruptedFile: "Corrupted TRG file for table `%-.64s`.`%-.64s`", + ErrTrgNoCreationCtx: "Triggers for table `%-.64s`.`%-.64s` have no creation context", + ErrTrgInvalidCreationCtx: "Trigger creation context of table `%-.64s`.`%-.64s` is invalid", + ErrEventInvalidCreationCtx: "Creation context of event `%-.64s`.`%-.64s` is invalid", + ErrTrgCantOpenTable: "Cannot open table for trigger `%-.64s`.`%-.64s`", + ErrCantCreateSroutine: "Cannot create stored routine `%-.64s`. Check warnings", + ErrNeverUsed: "Ambiguous slave modes combination. %s", + ErrNoFormatDescriptionEventBeforeBinlogStatement: "The BINLOG statement of type `%s` was not preceded by a format description BINLOG statement.", + ErrSlaveCorruptEvent: "Corrupted replication event was detected", + ErrLoadDataInvalidColumn: "Invalid column reference (%-.64s) in LOAD DATA", + ErrLogPurgeNoFile: "Being purged log %s was not found", + ErrXaRbtimeout: "XARBTIMEOUT: Transaction branch was rolled back: took too long", + ErrXaRbdeadlock: "XARBDEADLOCK: Transaction branch was rolled back: deadlock was detected", + ErrNeedReprepare: "Prepared statement needs to be re-prepared", + ErrDelayedNotSupported: "DELAYED option not supported for table '%-.192s'", + WarnNoMasterInfo: "The master info structure does not exist", + WarnOptionIgnored: "<%-.64s> option ignored", + WarnPluginDeleteBuiltin: "Built-in plugins cannot be deleted", + WarnPluginBusy: "Plugin is busy and will be uninstalled on shutdown", + ErrVariableIsReadonly: "%s variable '%s' is read-only. Use SET %s to assign the value", + ErrWarnEngineTransactionRollback: "Storage engine %s does not support rollback for this statement. Transaction rolled back and must be restarted", + ErrSlaveHeartbeatFailure: "Unexpected master's heartbeat data: %s", + ErrSlaveHeartbeatValueOutOfRange: "The requested value for the heartbeat period is either negative or exceeds the maximum allowed (%s seconds).", + ErrNdbReplicationSchema: "Bad schema for mysql.ndbReplication table. Message: %-.64s", + ErrConflictFnParse: "Error in parsing conflict function. Message: %-.64s", + ErrExceptionsWrite: "Write to exceptions table failed. Message: %-.128s\"", + ErrTooLongTableComment: "Comment for table '%-.64s' is too long (max = %lu)", + ErrTooLongFieldComment: "Comment for field '%-.64s' is too long (max = %lu)", + ErrFuncInexistentNameCollision: "FUNCTION %s does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual", + ErrDatabaseName: "Database", + ErrTableName: "Table", + ErrPartitionName: "Partition", + ErrSubpartitionName: "Subpartition", + ErrTemporaryName: "Temporary", + ErrRenamedName: "Renamed", + ErrTooManyConcurrentTrxs: "Too many active concurrent transactions", + WarnNonASCIISeparatorNotImplemented: "Non-ASCII separator arguments are not fully supported", + ErrDebugSyncTimeout: "debug sync point wait timed out", + ErrDebugSyncHitLimit: "debug sync point hit limit reached", + ErrDupSignalSet: "Duplicate condition information item '%s'", + ErrSignalWarn: "Unhandled user-defined warning condition", + ErrSignalNotFound: "Unhandled user-defined not found condition", + ErrSignalException: "Unhandled user-defined exception condition", + ErrResignalWithoutActiveHandler: "RESIGNAL when handler not active", + ErrSignalBadConditionType: "SIGNAL/RESIGNAL can only use a CONDITION defined with SQLSTATE", + WarnCondItemTruncated: "Data truncated for condition item '%s'", + ErrCondItemTooLong: "Data too long for condition item '%s'", + ErrUnknownLocale: "Unknown locale: '%-.64s'", + ErrSlaveIgnoreServerIds: "The requested server id %d clashes with the slave startup option --replicate-same-server-id", + ErrQueryCacheDisabled: "Query cache is disabled; restart the server with queryCacheType=1 to enable it", + ErrSameNamePartitionField: "Duplicate partition field name '%-.192s'", + ErrPartitionColumnList: "Inconsistency in usage of column lists for partitioning", + ErrWrongTypeColumnValue: "Partition column values of incorrect type", + ErrTooManyPartitionFuncFields: "Too many fields in '%-.192s'", + ErrMaxvalueInValuesIn: "Cannot use MAXVALUE as value in VALUES IN", + ErrTooManyValues: "Cannot have more than one value for this type of %-.64s partitioning", + ErrRowSinglePartitionField: "Row expressions in VALUES IN only allowed for multi-field column partitioning", + ErrFieldTypeNotAllowedAsPartitionField: "Field '%-.192s' is of a not allowed type for this type of partitioning", + ErrPartitionFieldsTooLong: "The total length of the partitioning fields is too large", + ErrBinlogRowEngineAndStmtEngine: "Cannot execute statement: impossible to write to binary log since both row-incapable engines and statement-incapable engines are involved.", + ErrBinlogRowModeAndStmtEngine: "Cannot execute statement: impossible to write to binary log since BINLOGFORMAT = ROW and at least one table uses a storage engine limited to statement-based logging.", + ErrBinlogUnsafeAndStmtEngine: "Cannot execute statement: impossible to write to binary log since statement is unsafe, storage engine is limited to statement-based logging, and BINLOGFORMAT = MIXED. %s", + ErrBinlogRowInjectionAndStmtEngine: "Cannot execute statement: impossible to write to binary log since statement is in row format and at least one table uses a storage engine limited to statement-based logging.", + ErrBinlogStmtModeAndRowEngine: "Cannot execute statement: impossible to write to binary log since BINLOGFORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging.%s", + ErrBinlogRowInjectionAndStmtMode: "Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOGFORMAT = STATEMENT.", + ErrBinlogMultipleEnginesAndSelfLoggingEngine: "Cannot execute statement: impossible to write to binary log since more than one engine is involved and at least one engine is self-logging.", + ErrBinlogUnsafeLimit: "The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.", + ErrBinlogUnsafeInsertDelayed: "The statement is unsafe because it uses INSERT DELAYED. This is unsafe because the times when rows are inserted cannot be predicted.", + ErrBinlogUnsafeSystemTable: "The statement is unsafe because it uses the general log, slow query log, or performanceSchema table(s). This is unsafe because system tables may differ on slaves.", + ErrBinlogUnsafeAutoincColumns: "Statement is unsafe because it invokes a trigger or a stored function that inserts into an AUTOINCREMENT column. Inserted values cannot be logged correctly.", + ErrBinlogUnsafeUdf: "Statement is unsafe because it uses a UDF which may not return the same value on the slave.", + ErrBinlogUnsafeSystemVariable: "Statement is unsafe because it uses a system variable that may have a different value on the slave.", + ErrBinlogUnsafeSystemFunction: "Statement is unsafe because it uses a system function that may return a different value on the slave.", + ErrBinlogUnsafeNontransAfterTrans: "Statement is unsafe because it accesses a non-transactional table after accessing a transactional table within the same transaction.", + ErrMessageAndStatement: "%s Statement: %s", + ErrSlaveConversionFailed: "Column %d of table '%-.192s.%-.192s' cannot be converted from type '%-.32s' to type '%-.32s'", + ErrSlaveCantCreateConversion: "Can't create conversion table for table '%-.192s.%-.192s'", + ErrInsideTransactionPreventsSwitchBinlogFormat: "Cannot modify @@session.binlogFormat inside a transaction", + ErrPathLength: "The path specified for %.64s is too long.", + ErrWarnDeprecatedSyntaxNoReplacement: "'%s' is deprecated and will be removed in a future release.", + ErrWrongNativeTableStructure: "Native table '%-.64s'.'%-.64s' has the wrong structure", + ErrWrongPerfschemaUsage: "Invalid performanceSchema usage.", + ErrWarnISSkippedTable: "Table '%s'.'%s' was skipped since its definition is being modified by concurrent DDL statement", + ErrInsideTransactionPreventsSwitchBinlogDirect: "Cannot modify @@session.binlogDirectNonTransactionalUpdates inside a transaction", + ErrStoredFunctionPreventsSwitchBinlogDirect: "Cannot change the binlog direct flag inside a stored function or trigger", + ErrSpatialMustHaveGeomCol: "A SPATIAL index may only contain a geometrical type column", + ErrTooLongIndexComment: "Comment for index '%-.64s' is too long (max = %lu)", + ErrLockAborted: "Wait on a lock was aborted due to a pending exclusive lock", + ErrDataOutOfRange: "%s value is out of range in '%s'", + ErrWrongSpvarTypeInLimit: "A variable of a non-integer based type in LIMIT clause", + ErrBinlogUnsafeMultipleEnginesAndSelfLoggingEngine: "Mixing self-logging and non-self-logging engines in a statement is unsafe.", + ErrBinlogUnsafeMixedStatement: "Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them.", + ErrInsideTransactionPreventsSwitchSQLLogBin: "Cannot modify @@session.sqlLogBin inside a transaction", + ErrStoredFunctionPreventsSwitchSQLLogBin: "Cannot change the sqlLogBin inside a stored function or trigger", + ErrFailedReadFromParFile: "Failed to read from the .par file", + ErrValuesIsNotIntType: "VALUES value for partition '%-.64s' must have type INT", + ErrAccessDeniedNoPassword: "Access denied for user '%-.48s'@'%-.64s'", + ErrSetPasswordAuthPlugin: "SET PASSWORD has no significance for users authenticating via plugins", + ErrGrantPluginUserExists: "GRANT with IDENTIFIED WITH is illegal because the user %-.*s already exists", + ErrTruncateIllegalFk: "Cannot truncate a table referenced in a foreign key constraint (%.192s)", + ErrPluginIsPermanent: "Plugin '%s' is forcePlusPermanent and can not be unloaded", + ErrSlaveHeartbeatValueOutOfRangeMin: "The requested value for the heartbeat period is less than 1 millisecond. The value is reset to 0, meaning that heartbeating will effectively be disabled.", + ErrSlaveHeartbeatValueOutOfRangeMax: "The requested value for the heartbeat period exceeds the value of `slaveNetTimeout' seconds. A sensible value for the period should be less than the timeout.", + ErrStmtCacheFull: "Multi-row statements required more than 'maxBinlogStmtCacheSize' bytes of storage; increase this mysqld variable and try again", + ErrMultiUpdateKeyConflict: "Primary key/partition key update is not allowed since the table is updated both as '%-.192s' and '%-.192s'.", + ErrTableNeedsRebuild: "Table rebuild required. Please do \"ALTER TABLE `%-.32s` FORCE\" or dump/reload to fix it!", + WarnOptionBelowLimit: "The value of '%s' should be no less than the value of '%s'", + ErrIndexColumnTooLong: "Index column size too large. The maximum column size is %lu bytes.", + ErrErrorInTriggerBody: "Trigger '%-.64s' has an error in its body: '%-.256s'", + ErrErrorInUnknownTriggerBody: "Unknown trigger has an error in its body: '%-.256s'", + ErrIndexCorrupt: "Index %s is corrupted", + ErrUndoRecordTooBig: "Undo log record is too big.", + ErrBinlogUnsafeInsertIgnoreSelect: "INSERT IGNORE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.", + ErrBinlogUnsafeInsertSelectUpdate: "INSERT... SELECT... ON DUPLICATE KEY UPDATE is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are updated. This order cannot be predicted and may differ on master and the slave.", + ErrBinlogUnsafeReplaceSelect: "REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.", + ErrBinlogUnsafeCreateIgnoreSelect: "CREATE... IGNORE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.", + ErrBinlogUnsafeCreateReplaceSelect: "CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.", + ErrBinlogUnsafeUpdateIgnore: "UPDATE IGNORE is unsafe because the order in which rows are updated determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.", + ErrPluginNoUninstall: "Plugin '%s' is marked as not dynamically uninstallable. You have to stop the server to uninstall it.", + ErrPluginNoInstall: "Plugin '%s' is marked as not dynamically installable. You have to stop the server to install it.", + ErrBinlogUnsafeWriteAutoincSelect: "Statements writing to a table with an auto-increment column after selecting from another table are unsafe because the order in which rows are retrieved determines what (if any) rows will be written. This order cannot be predicted and may differ on master and the slave.", + ErrBinlogUnsafeCreateSelectAutoinc: "CREATE TABLE... SELECT... on a table with an auto-increment column is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are inserted. This order cannot be predicted and may differ on master and the slave.", + ErrBinlogUnsafeInsertTwoKeys: "INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe", + ErrTableInFkCheck: "Table is being used in foreign key check.", + ErrUnsupportedEngine: "Storage engine '%s' does not support system tables. [%s.%s]", + ErrBinlogUnsafeAutoincNotFirst: "INSERT into autoincrement field which is not the first part in the composed primary key is unsafe.", + ErrCannotLoadFromTableV2: "Cannot load from %s.%s. The table is probably corrupted", + ErrMasterDelayValueOutOfRange: "The requested value %u for the master delay exceeds the maximum %u", + ErrOnlyFdAndRbrEventsAllowedInBinlogStatement: "Only FormatDescriptionLogEvent and row events are allowed in BINLOG statements (but %s was provided)", + ErrPartitionExchangeDifferentOption: "Non matching attribute '%-.64s' between partition and table", + ErrPartitionExchangePartTable: "Table to exchange with partition is partitioned: '%-.64s'", + ErrPartitionExchangeTempTable: "Table to exchange with partition is temporary: '%-.64s'", + ErrPartitionInsteadOfSubpartition: "Subpartitioned table, use subpartition instead of partition", + ErrUnknownPartition: "Unknown partition '%-.64s' in table '%-.64s'", + ErrTablesDifferentMetadata: "Tables have different definitions", + ErrRowDoesNotMatchPartition: "Found a row that does not match the partition", + ErrBinlogCacheSizeGreaterThanMax: "Option binlogCacheSize (%lu) is greater than maxBinlogCacheSize (%lu); setting binlogCacheSize equal to maxBinlogCacheSize.", + ErrWarnIndexNotApplicable: "Cannot use %-.64s access on index '%-.64s' due to type or collation conversion on field '%-.64s'", + ErrPartitionExchangeForeignKey: "Table to exchange with partition has foreign key references: '%-.64s'", + ErrNoSuchKeyValue: "Key value '%-.192s' was not found in table '%-.192s.%-.192s'", + ErrRplInfoDataTooLong: "Data for column '%s' too long", + ErrNetworkReadEventChecksumFailure: "Replication event checksum verification failed while reading from network.", + ErrBinlogReadEventChecksumFailure: "Replication event checksum verification failed while reading from a log file.", + ErrBinlogStmtCacheSizeGreaterThanMax: "Option binlogStmtCacheSize (%lu) is greater than maxBinlogStmtCacheSize (%lu); setting binlogStmtCacheSize equal to maxBinlogStmtCacheSize.", + ErrCantUpdateTableInCreateTableSelect: "Can't update table '%-.192s' while '%-.192s' is being created.", + ErrPartitionClauseOnNonpartitioned: "PARTITION () clause on non partitioned table", + ErrRowDoesNotMatchGivenPartitionSet: "Found a row not matching the given partition set", + ErrNoSuchPartitionunused: "partition '%-.64s' doesn't exist", + ErrChangeRplInfoRepositoryFailure: "Failure while changing the type of replication repository: %s.", + ErrWarningNotCompleteRollbackWithCreatedTempTable: "The creation of some temporary tables could not be rolled back.", + ErrWarningNotCompleteRollbackWithDroppedTempTable: "Some temporary tables were dropped, but these operations could not be rolled back.", + ErrMtsFeatureIsNotSupported: "%s is not supported in multi-threaded slave mode. %s", + ErrMtsUpdatedDbsGreaterMax: "The number of modified databases exceeds the maximum %d; the database names will not be included in the replication event metadata.", + ErrMtsCantParallel: "Cannot execute the current event group in the parallel mode. Encountered event %s, relay-log name %s, position %s which prevents execution of this event group in parallel mode. Reason: %s.", + ErrMtsInconsistentData: "%s", + ErrFulltextNotSupportedWithPartitioning: "FULLTEXT index is not supported for partitioned tables.", + ErrDaInvalidConditionNumber: "Invalid condition number", + ErrInsecurePlainText: "Sending passwords in plain text without SSL/TLS is extremely insecure.", + ErrInsecureChangeMaster: "Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MySQL Manual for more about this issue and possible alternatives.", + ErrForeignDuplicateKeyWithChildInfo: "Foreign key constraint for table '%.192s', record '%-.192s' would lead to a duplicate entry in table '%.192s', key '%.192s'", + ErrForeignDuplicateKeyWithoutChildInfo: "Foreign key constraint for table '%.192s', record '%-.192s' would lead to a duplicate entry in a child table", + ErrSQLthreadWithSecureSlave: "Setting authentication options is not possible when only the Slave SQL Thread is being started.", + ErrTableHasNoFt: "The table does not have FULLTEXT index to support this query", + ErrVariableNotSettableInSfOrTrigger: "The system variable %.200s cannot be set in stored functions or triggers.", + ErrVariableNotSettableInTransaction: "The system variable %.200s cannot be set when there is an ongoing transaction.", + ErrGtidNextIsNotInGtidNextList: "The system variable @@SESSION.GTIDNEXT has the value %.200s, which is not listed in @@SESSION.GTIDNEXTLIST.", + ErrCantChangeGtidNextInTransactionWhenGtidNextListIsNull: "When @@SESSION.GTIDNEXTLIST == NULL, the system variable @@SESSION.GTIDNEXT cannot change inside a transaction.", + ErrSetStatementCannotInvokeFunction: "The statement 'SET %.200s' cannot invoke a stored function.", + ErrGtidNextCantBeAutomaticIfGtidNextListIsNonNull: "The system variable @@SESSION.GTIDNEXT cannot be 'AUTOMATIC' when @@SESSION.GTIDNEXTLIST is non-NULL.", + ErrSkippingLoggedTransaction: "Skipping transaction %.200s because it has already been executed and logged.", + ErrMalformedGtidSetSpecification: "Malformed GTID set specification '%.200s'.", + ErrMalformedGtidSetEncoding: "Malformed GTID set encoding.", + ErrMalformedGtidSpecification: "Malformed GTID specification '%.200s'.", + ErrGnoExhausted: "Impossible to generate Global Transaction Identifier: the integer component reached the maximal value. Restart the server with a new serverUuid.", + ErrBadSlaveAutoPosition: "Parameters MASTERLOGFILE, MASTERLOGPOS, RELAYLOGFILE and RELAYLOGPOS cannot be set when MASTERAUTOPOSITION is active.", + ErrAutoPositionRequiresGtidModeOn: "CHANGE MASTER TO MASTERAUTOPOSITION = 1 can only be executed when @@GLOBAL.GTIDMODE = ON.", + ErrCantDoImplicitCommitInTrxWhenGtidNextIsSet: "Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTIDNEXT != AUTOMATIC or @@SESSION.GTIDNEXTLIST != NULL.", + ErrGtidMode2Or3RequiresEnforceGtidConsistencyOn: "@@GLOBAL.GTIDMODE = ON or UPGRADESTEP2 requires @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1.", + ErrGtidModeRequiresBinlog: "@@GLOBAL.GTIDMODE = ON or UPGRADESTEP1 or UPGRADESTEP2 requires --log-bin and --log-slave-updates.", + ErrCantSetGtidNextToGtidWhenGtidModeIsOff: "@@SESSION.GTIDNEXT cannot be set to UUID:NUMBER when @@GLOBAL.GTIDMODE = OFF.", + ErrCantSetGtidNextToAnonymousWhenGtidModeIsOn: "@@SESSION.GTIDNEXT cannot be set to ANONYMOUS when @@GLOBAL.GTIDMODE = ON.", + ErrCantSetGtidNextListToNonNullWhenGtidModeIsOff: "@@SESSION.GTIDNEXTLIST cannot be set to a non-NULL value when @@GLOBAL.GTIDMODE = OFF.", + ErrFoundGtidEventWhenGtidModeIsOff: "Found a GtidLogEvent or PreviousGtidsLogEvent when @@GLOBAL.GTIDMODE = OFF.", + ErrGtidUnsafeNonTransactionalTable: "When @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1, updates to non-transactional tables can only be done in either autocommitted statements or single-statement transactions, and never in the same statement as updates to transactional tables.", + ErrGtidUnsafeCreateSelect: "CREATE TABLE ... SELECT is forbidden when @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1.", + ErrGtidUnsafeCreateDropTemporaryTableInTransaction: "When @@GLOBAL.ENFORCEGTIDCONSISTENCY = 1, the statements CREATE TEMPORARY TABLE and DROP TEMPORARY TABLE can be executed in a non-transactional context only, and require that AUTOCOMMIT = 1.", + ErrGtidModeCanOnlyChangeOneStepAtATime: "The value of @@GLOBAL.GTIDMODE can only change one step at a time: OFF <-> UPGRADESTEP1 <-> UPGRADESTEP2 <-> ON. Also note that this value must be stepped up or down simultaneously on all servers; see the Manual for instructions.", + ErrMasterHasPurgedRequiredGtids: "The slave is connecting using CHANGE MASTER TO MASTERAUTOPOSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires.", + ErrCantSetGtidNextWhenOwningGtid: "@@SESSION.GTIDNEXT cannot be changed by a client that owns a GTID. The client owns %s. Ownership is released on COMMIT or ROLLBACK.", + ErrUnknownExplainFormat: "Unknown EXPLAIN format name: '%s'", + ErrCantExecuteInReadOnlyTransaction: "Cannot execute statement in a READ ONLY transaction.", + ErrTooLongTablePartitionComment: "Comment for table partition '%-.64s' is too long (max = %lu)", + ErrSlaveConfiguration: "Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in the MySQL error log.", + ErrInnodbFtLimit: "InnoDB presently supports one FULLTEXT index creation at a time", + ErrInnodbNoFtTempTable: "Cannot create FULLTEXT index on temporary InnoDB table", + ErrInnodbFtWrongDocidColumn: "Column '%-.192s' is of wrong type for an InnoDB FULLTEXT index", + ErrInnodbFtWrongDocidIndex: "Index '%-.192s' is of wrong type for an InnoDB FULLTEXT index", + ErrInnodbOnlineLogTooBig: "Creating index '%-.192s' required more than 'innodbOnlineAlterLogMaxSize' bytes of modification log. Please try again.", + ErrUnknownAlterAlgorithm: "Unknown ALGORITHM '%s'", + ErrUnknownAlterLock: "Unknown LOCK type '%s'", + ErrMtsChangeMasterCantRunWithGaps: "CHANGE MASTER cannot be executed when the slave was stopped with an error or killed in MTS mode. Consider using RESET SLAVE or START SLAVE UNTIL.", + ErrMtsRecoveryFailure: "Cannot recover after SLAVE errored out in parallel execution mode. Additional error messages can be found in the MySQL error log.", + ErrMtsResetWorkers: "Cannot clean up worker info tables. Additional error messages can be found in the MySQL error log.", + ErrColCountDoesntMatchCorruptedV2: "Column count of %s.%s is wrong. Expected %d, found %d. The table is probably corrupted", + ErrSlaveSilentRetryTransaction: "Slave must silently retry current transaction", + ErrDiscardFkChecksRunning: "There is a foreign key check running on table '%-.192s'. Cannot discard the table.", + ErrTableSchemaMismatch: "Schema mismatch (%s)", + ErrTableInSystemTablespace: "Table '%-.192s' in system tablespace", + ErrIoRead: "IO Read : (%lu, %s) %s", + ErrIoWrite: "IO Write : (%lu, %s) %s", + ErrTablespaceMissing: "Tablespace is missing for table '%-.192s'", + ErrTablespaceExists: "Tablespace for table '%-.192s' exists. Please DISCARD the tablespace before IMPORT.", + ErrTablespaceDiscarded: "Tablespace has been discarded for table '%-.192s'", + ErrInternal: "Internal : %s", + ErrInnodbImport: "ALTER TABLE '%-.192s' IMPORT TABLESPACE failed with error %lu : '%s'", + ErrInnodbIndexCorrupt: "Index corrupt: %s", + ErrInvalidYearColumnLength: "YEAR(%lu) column type is deprecated. Creating YEAR(4) column instead.", + ErrNotValidPassword: "Your password does not satisfy the current policy requirements", + ErrMustChangePassword: "You must SET PASSWORD before executing this statement", + ErrFkNoIndexChild: "Failed to add the foreign key constaint. Missing index for constraint '%s' in the foreign table '%s'", + ErrFkNoIndexParent: "Failed to add the foreign key constaint. Missing index for constraint '%s' in the referenced table '%s'", + ErrFkFailAddSystem: "Failed to add the foreign key constraint '%s' to system tables", + ErrFkCannotOpenParent: "Failed to open the referenced table '%s'", + ErrFkIncorrectOption: "Failed to add the foreign key constraint on table '%s'. Incorrect options in FOREIGN KEY constraint '%s'", + ErrFkDupName: "Duplicate foreign key constraint name '%s'", + ErrPasswordFormat: "The password hash doesn't have the expected format. Check if the correct password algorithm is being used with the PASSWORD() function.", + ErrFkColumnCannotDrop: "Cannot drop column '%-.192s': needed in a foreign key constraint '%-.192s'", + ErrFkColumnCannotDropChild: "Cannot drop column '%-.192s': needed in a foreign key constraint '%-.192s' of table '%-.192s'", + ErrFkColumnNotNull: "Column '%-.192s' cannot be NOT NULL: needed in a foreign key constraint '%-.192s' SET NULL", + ErrDupIndex: "Duplicate index '%-.64s' defined on the table '%-.64s.%-.64s'. This is deprecated and will be disallowed in a future release.", + ErrFkColumnCannotChange: "Cannot change column '%-.192s': used in a foreign key constraint '%-.192s'", + ErrFkColumnCannotChangeChild: "Cannot change column '%-.192s': used in a foreign key constraint '%-.192s' of table '%-.192s'", + ErrFkCannotDeleteParent: "Cannot delete rows from table which is parent in a foreign key constraint '%-.192s' of table '%-.192s'", + ErrMalformedPacket: "Malformed communication packet.", + ErrReadOnlyMode: "Running in read-only mode", + ErrGtidNextTypeUndefinedGroup: "When @@SESSION.GTIDNEXT is set to a GTID, you must explicitly set it again after a COMMIT or ROLLBACK. If you see this error message in the slave SQL thread, it means that a table in the current transaction is transactional on the master and non-transactional on the slave. In a client connection, it means that you executed SET @@SESSION.GTIDNEXT before a transaction and forgot to set @@SESSION.GTIDNEXT to a different identifier or to 'AUTOMATIC' after COMMIT or ROLLBACK. Current @@SESSION.GTIDNEXT is '%s'.", + ErrVariableNotSettableInSp: "The system variable %.200s cannot be set in stored procedures.", + ErrCantSetGtidPurgedWhenGtidModeIsOff: "@@GLOBAL.GTIDPURGED can only be set when @@GLOBAL.GTIDMODE = ON.", + ErrCantSetGtidPurgedWhenGtidExecutedIsNotEmpty: "@@GLOBAL.GTIDPURGED can only be set when @@GLOBAL.GTIDEXECUTED is empty.", + ErrCantSetGtidPurgedWhenOwnedGtidsIsNotEmpty: "@@GLOBAL.GTIDPURGED can only be set when there are no ongoing transactions (not even in other clients).", + ErrGtidPurgedWasChanged: "@@GLOBAL.GTIDPURGED was changed from '%s' to '%s'.", + ErrGtidExecutedWasChanged: "@@GLOBAL.GTIDEXECUTED was changed from '%s' to '%s'.", + ErrBinlogStmtModeAndNoReplTables: "Cannot execute statement: impossible to write to binary log since BINLOGFORMAT = STATEMENT, and both replicated and non replicated tables are written to.", + ErrAlterOperationNotSupported: "%s is not supported for this operation. Try %s.", + ErrAlterOperationNotSupportedReason: "%s is not supported. Reason: %s. Try %s.", + ErrAlterOperationNotSupportedReasonCopy: "COPY algorithm requires a lock", + ErrAlterOperationNotSupportedReasonPartition: "Partition specific operations do not yet support LOCK/ALGORITHM", + ErrAlterOperationNotSupportedReasonFkRename: "Columns participating in a foreign key are renamed", + ErrAlterOperationNotSupportedReasonColumnType: "Cannot change column type INPLACE", + ErrAlterOperationNotSupportedReasonFkCheck: "Adding foreign keys needs foreignKeyChecks=OFF", + ErrAlterOperationNotSupportedReasonIgnore: "Creating unique indexes with IGNORE requires COPY algorithm to remove duplicate rows", + ErrAlterOperationNotSupportedReasonNopk: "Dropping a primary key is not allowed without also adding a new primary key", + ErrAlterOperationNotSupportedReasonAutoinc: "Adding an auto-increment column requires a lock", + ErrAlterOperationNotSupportedReasonHiddenFts: "Cannot replace hidden FTSDOCID with a user-visible one", + ErrAlterOperationNotSupportedReasonChangeFts: "Cannot drop or rename FTSDOCID", + ErrAlterOperationNotSupportedReasonFts: "Fulltext index creation requires a lock", + ErrSQLSlaveSkipCounterNotSettableInGtidMode: "sqlSlaveSkipCounter can not be set when the server is running with @@GLOBAL.GTIDMODE = ON. Instead, for each transaction that you want to skip, generate an empty transaction with the same GTID as the transaction", + ErrDupUnknownInIndex: "Duplicate entry for key '%-.192s'", + ErrIdentCausesTooLongPath: "Long database name and identifier for object resulted in path length exceeding %d characters. Path: '%s'.", + ErrAlterOperationNotSupportedReasonNotNull: "cannot silently convert NULL values, as required in this SQLMODE", + ErrMustChangePasswordLogin: "Your password has expired. To log in you must change it using a client that supports expired passwords.", + ErrRowInWrongPartition: "Found a row in wrong partition %s", +} diff --git a/vendor/github.com/pingcap/tidb/mysql/error.go b/vendor/github.com/pingcap/tidb/mysql/error.go new file mode 100644 index 000000000..43246a4a2 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/mysql/error.go @@ -0,0 +1,71 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package mysql + +import ( + "errors" + "fmt" +) + +// Portable analogs of some common call errors. +var ( + ErrBadConn = errors.New("connection was bad") + ErrMalformPacket = errors.New("Malform packet error") +) + +// SQLError records an error information, from executing SQL. +type SQLError struct { + Code uint16 + Message string + State string +} + +// Error prints errors, with a formatted string. +func (e *SQLError) Error() string { + return fmt.Sprintf("ERROR %d (%s): %s", e.Code, e.State, e.Message) +} + +// NewErr generates a SQL error, with an error code and default format specifier defined in MySQLErrName. +func NewErr(errCode uint16, args ...interface{}) *SQLError { + e := &SQLError{Code: errCode} + + if s, ok := MySQLState[errCode]; ok { + e.State = s + } else { + e.State = DefaultMySQLState + } + + if format, ok := MySQLErrName[errCode]; ok { + e.Message = fmt.Sprintf(format, args...) + } else { + e.Message = fmt.Sprint(args...) + } + + return e +} + +// NewErrf creates a SQL error, with an error code and a format specifier +func NewErrf(errCode uint16, format string, args ...interface{}) *SQLError { + e := &SQLError{Code: errCode} + + if s, ok := MySQLState[errCode]; ok { + e.State = s + } else { + e.State = DefaultMySQLState + } + + e.Message = fmt.Sprintf(format, args...) + + return e +} diff --git a/vendor/github.com/pingcap/tidb/mysql/fsp.go b/vendor/github.com/pingcap/tidb/mysql/fsp.go new file mode 100644 index 000000000..820fabb3d --- /dev/null +++ b/vendor/github.com/pingcap/tidb/mysql/fsp.go @@ -0,0 +1,92 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package mysql + +import ( + "math" + "strconv" + "strings" + + "github.com/juju/errors" +) + +const ( + // UnspecifiedFsp is the unspecified fractional seconds part. + UnspecifiedFsp int = -1 + // MaxFsp is the maximum digit of fractional seconds part. + MaxFsp int = 6 + // MinFsp is the minimum digit of fractional seconds part. + MinFsp int = 0 + // DefaultFsp is the default digit of fractional seconds part. + // MySQL use 0 as the default Fsp. + DefaultFsp int = 0 +) + +func checkFsp(fsp int) (int, error) { + if fsp == UnspecifiedFsp { + return DefaultFsp, nil + } + if fsp < MinFsp || fsp > MaxFsp { + return DefaultFsp, errors.Errorf("Invalid fsp %d", fsp) + } + return fsp, nil +} + +func parseFrac(s string, fsp int) (int, error) { + if len(s) == 0 { + return 0, nil + } + + var err error + fsp, err = checkFsp(fsp) + if err != nil { + return 0, errors.Trace(err) + } + + // Use float to calculate frac, e.g, "123" -> "0.123" + if !strings.HasPrefix(s, ".") && !strings.HasPrefix(s, "0.") { + s = "0." + s + } + + frac, err := strconv.ParseFloat(s, 64) + if err != nil { + return 0, errors.Trace(err) + } + + // round frac to the nearest value with FSP + var round float64 + pow := math.Pow(10, float64(fsp)) + digit := pow * frac + _, div := math.Modf(digit) + if div >= 0.5 { + round = math.Ceil(digit) + } else { + round = math.Floor(digit) + } + + // Get the final frac, with 6 digit number + // 0.1236 round 3 -> 124 -> 123000 + // 0.0312 round 2 -> 3 -> 30000 + return int(round * math.Pow10(MaxFsp-fsp)), nil +} + +// alignFrac is used to generate alignment frac, like `100` -> `100000` +func alignFrac(s string, fsp int) string { + sl := len(s) + if sl < fsp { + return s + strings.Repeat("0", fsp-sl) + } + + return s +} diff --git a/vendor/github.com/pingcap/tidb/mysql/hex.go b/vendor/github.com/pingcap/tidb/mysql/hex.go new file mode 100644 index 000000000..5858b5d96 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/mysql/hex.go @@ -0,0 +1,85 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package mysql + +import ( + "encoding/hex" + "fmt" + "strconv" + "strings" + + "github.com/juju/errors" +) + +// Hex is for mysql hexadecimal literal type. +type Hex struct { + // Value holds numeric value for hexadecimal literal. + Value int64 +} + +// String implements fmt.Stringer interface. +func (h Hex) String() string { + s := fmt.Sprintf("%X", h.Value) + if len(s)%2 != 0 { + return "0x0" + s + } + + return "0x" + s +} + +// ToNumber changes hexadecimal type to float64 for numeric operation. +// MySQL treats hexadecimal literal as double type. +func (h Hex) ToNumber() float64 { + return float64(h.Value) +} + +// ToString returns the string representation for hexadecimal literal. +func (h Hex) ToString() string { + s := fmt.Sprintf("%x", h.Value) + if len(s)%2 != 0 { + s = "0" + s + } + + // should never error. + b, _ := hex.DecodeString(s) + return string(b) +} + +// ParseHex parses hexadecimal literal string. +// The string format can be X'val', x'val' or 0xval. +// val must in (0...9, a...z, A...Z). +func ParseHex(s string) (Hex, error) { + if len(s) == 0 { + return Hex{}, errors.Errorf("invalid empty string for parsing hexadecimal literal") + } + + if s[0] == 'x' || s[0] == 'X' { + // format is x'val' or X'val' + s = strings.Trim(s[1:], "'") + if len(s)%2 != 0 { + return Hex{}, errors.Errorf("invalid hexadecimal format, must even numbers, but %d", len(s)) + } + s = "0x" + s + } else if !strings.HasPrefix(s, "0x") { + // here means format is not x'val', X'val' or 0xval. + return Hex{}, errors.Errorf("invalid hexadecimal format %s", s) + } + + n, err := strconv.ParseInt(s, 0, 64) + if err != nil { + return Hex{}, errors.Trace(err) + } + + return Hex{Value: n}, nil +} diff --git a/vendor/github.com/pingcap/tidb/mysql/set.go b/vendor/github.com/pingcap/tidb/mysql/set.go new file mode 100644 index 000000000..8c0788a61 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/mysql/set.go @@ -0,0 +1,111 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package mysql + +import ( + "strconv" + "strings" + + "github.com/juju/errors" +) + +var zeroSet = Set{Name: "", Value: 0} + +// Set is for MySQL Set type. +type Set struct { + Name string + Value uint64 +} + +// String implements fmt.Stringer interface. +func (e Set) String() string { + return e.Name +} + +// ToNumber changes Set to float64 for numeric operation. +func (e Set) ToNumber() float64 { + return float64(e.Value) +} + +// ParseSetName creates a Set with name. +func ParseSetName(elems []string, name string) (Set, error) { + if len(name) == 0 { + return zeroSet, nil + } + + seps := strings.Split(name, ",") + marked := make(map[string]struct{}, len(seps)) + for _, s := range seps { + marked[strings.ToLower(s)] = struct{}{} + } + items := make([]string, 0, len(seps)) + + value := uint64(0) + for i, n := range elems { + key := strings.ToLower(n) + if _, ok := marked[key]; ok { + value |= (1 << uint64(i)) + delete(marked, key) + items = append(items, key) + } + } + + if len(marked) == 0 { + return Set{Name: strings.Join(items, ","), Value: value}, nil + } + + // name doesn't exist, maybe an integer? + if num, err := strconv.ParseUint(name, 0, 64); err == nil { + return ParseSetValue(elems, num) + } + + return Set{}, errors.Errorf("item %s is not in Set %v", name, elems) +} + +var ( + setIndexValue []uint64 + setIndexInvertValue []uint64 +) + +func init() { + setIndexValue = make([]uint64, 64) + setIndexInvertValue = make([]uint64, 64) + + for i := 0; i < 64; i++ { + setIndexValue[i] = 1 << uint64(i) + setIndexInvertValue[i] = ^setIndexValue[i] + } +} + +// ParseSetValue creates a Set with special number. +func ParseSetValue(elems []string, number uint64) (Set, error) { + if number == 0 { + return zeroSet, nil + } + + value := number + var items []string + for i := 0; i < len(elems); i++ { + if number&setIndexValue[i] > 0 { + items = append(items, elems[i]) + number &= setIndexInvertValue[i] + } + } + + if number != 0 { + return Set{}, errors.Errorf("invalid number %d for Set %v", number, elems) + } + + return Set{Name: strings.Join(items, ","), Value: value}, nil +} diff --git a/vendor/github.com/pingcap/tidb/mysql/state.go b/vendor/github.com/pingcap/tidb/mysql/state.go new file mode 100644 index 000000000..67fcd0e5a --- /dev/null +++ b/vendor/github.com/pingcap/tidb/mysql/state.go @@ -0,0 +1,249 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package mysql + +const ( + // DefaultMySQLState is default state of the mySQL + DefaultMySQLState = "HY000" +) + +// MySQLState maps error code to MySQL SQLSTATE value. +// The values are taken from ANSI SQL and ODBC and are more standardized. +var MySQLState = map[uint16]string{ + ErrDupKey: "23000", + ErrOutofmemory: "HY001", + ErrOutOfSortmemory: "HY001", + ErrConCount: "08004", + ErrBadHost: "08S01", + ErrHandshake: "08S01", + ErrDbaccessDenied: "42000", + ErrAccessDenied: "28000", + ErrNoDb: "3D000", + ErrUnknownCom: "08S01", + ErrBadNull: "23000", + ErrBadDb: "42000", + ErrTableExists: "42S01", + ErrBadTable: "42S02", + ErrNonUniq: "23000", + ErrServerShutdown: "08S01", + ErrBadField: "42S22", + ErrWrongFieldWithGroup: "42000", + ErrWrongSumSelect: "42000", + ErrWrongGroupField: "42000", + ErrWrongValueCount: "21S01", + ErrTooLongIdent: "42000", + ErrDupFieldname: "42S21", + ErrDupKeyname: "42000", + ErrDupEntry: "23000", + ErrWrongFieldSpec: "42000", + ErrParse: "42000", + ErrEmptyQuery: "42000", + ErrNonuniqTable: "42000", + ErrInvalidDefault: "42000", + ErrMultiplePriKey: "42000", + ErrTooManyKeys: "42000", + ErrTooManyKeyParts: "42000", + ErrTooLongKey: "42000", + ErrKeyColumnDoesNotExits: "42000", + ErrBlobUsedAsKey: "42000", + ErrTooBigFieldlength: "42000", + ErrWrongAutoKey: "42000", + ErrForcingClose: "08S01", + ErrIpsock: "08S01", + ErrNoSuchIndex: "42S12", + ErrWrongFieldTerminators: "42000", + ErrBlobsAndNoTerminated: "42000", + ErrCantRemoveAllFields: "42000", + ErrCantDropFieldOrKey: "42000", + ErrBlobCantHaveDefault: "42000", + ErrWrongDbName: "42000", + ErrWrongTableName: "42000", + ErrTooBigSelect: "42000", + ErrUnknownProcedure: "42000", + ErrWrongParamcountToProcedure: "42000", + ErrUnknownTable: "42S02", + ErrFieldSpecifiedTwice: "42000", + ErrUnsupportedExtension: "42000", + ErrTableMustHaveColumns: "42000", + ErrUnknownCharacterSet: "42000", + ErrTooBigRowsize: "42000", + ErrWrongOuterJoin: "42000", + ErrNullColumnInIndex: "42000", + ErrPasswordAnonymousUser: "42000", + ErrPasswordNotAllowed: "42000", + ErrPasswordNoMatch: "42000", + ErrWrongValueCountOnRow: "21S01", + ErrInvalidUseOfNull: "22004", + ErrRegexp: "42000", + ErrMixOfGroupFuncAndFields: "42000", + ErrNonexistingGrant: "42000", + ErrTableaccessDenied: "42000", + ErrColumnaccessDenied: "42000", + ErrIllegalGrantForTable: "42000", + ErrGrantWrongHostOrUser: "42000", + ErrNoSuchTable: "42S02", + ErrNonexistingTableGrant: "42000", + ErrNotAllowedCommand: "42000", + ErrSyntax: "42000", + ErrAbortingConnection: "08S01", + ErrNetPacketTooLarge: "08S01", + ErrNetReadErrorFromPipe: "08S01", + ErrNetFcntl: "08S01", + ErrNetPacketsOutOfOrder: "08S01", + ErrNetUncompress: "08S01", + ErrNetRead: "08S01", + ErrNetReadInterrupted: "08S01", + ErrNetErrorOnWrite: "08S01", + ErrNetWriteInterrupted: "08S01", + ErrTooLongString: "42000", + ErrTableCantHandleBlob: "42000", + ErrTableCantHandleAutoIncrement: "42000", + ErrWrongColumnName: "42000", + ErrWrongKeyColumn: "42000", + ErrDupUnique: "23000", + ErrBlobKeyWithoutLength: "42000", + ErrPrimaryCantHaveNull: "42000", + ErrTooManyRows: "42000", + ErrRequiresPrimaryKey: "42000", + ErrKeyDoesNotExits: "42000", + ErrCheckNoSuchTable: "42000", + ErrCheckNotImplemented: "42000", + ErrCantDoThisDuringAnTransaction: "25000", + ErrNewAbortingConnection: "08S01", + ErrMasterNetRead: "08S01", + ErrMasterNetWrite: "08S01", + ErrTooManyUserConnections: "42000", + ErrReadOnlyTransaction: "25000", + ErrNoPermissionToCreateUser: "42000", + ErrLockDeadlock: "40001", + ErrNoReferencedRow: "23000", + ErrRowIsReferenced: "23000", + ErrConnectToMaster: "08S01", + ErrWrongNumberOfColumnsInSelect: "21000", + ErrUserLimitReached: "42000", + ErrSpecificAccessDenied: "42000", + ErrNoDefault: "42000", + ErrWrongValueForVar: "42000", + ErrWrongTypeForVar: "42000", + ErrCantUseOptionHere: "42000", + ErrNotSupportedYet: "42000", + ErrWrongFkDef: "42000", + ErrOperandColumns: "21000", + ErrSubqueryNo1Row: "21000", + ErrIllegalReference: "42S22", + ErrDerivedMustHaveAlias: "42000", + ErrSelectReduced: "01000", + ErrTablenameNotAllowedHere: "42000", + ErrNotSupportedAuthMode: "08004", + ErrSpatialCantHaveNull: "42000", + ErrCollationCharsetMismatch: "42000", + ErrWarnTooFewRecords: "01000", + ErrWarnTooManyRecords: "01000", + ErrWarnNullToNotnull: "22004", + ErrWarnDataOutOfRange: "22003", + WarnDataTruncated: "01000", + ErrWrongNameForIndex: "42000", + ErrWrongNameForCatalog: "42000", + ErrUnknownStorageEngine: "42000", + ErrTruncatedWrongValue: "22007", + ErrSpNoRecursiveCreate: "2F003", + ErrSpAlreadyExists: "42000", + ErrSpDoesNotExist: "42000", + ErrSpLilabelMismatch: "42000", + ErrSpLabelRedefine: "42000", + ErrSpLabelMismatch: "42000", + ErrSpUninitVar: "01000", + ErrSpBadselect: "0A000", + ErrSpBadreturn: "42000", + ErrSpBadstatement: "0A000", + ErrUpdateLogDeprecatedIgnored: "42000", + ErrUpdateLogDeprecatedTranslated: "42000", + ErrQueryInterrupted: "70100", + ErrSpWrongNoOfArgs: "42000", + ErrSpCondMismatch: "42000", + ErrSpNoreturn: "42000", + ErrSpNoreturnend: "2F005", + ErrSpBadCursorQuery: "42000", + ErrSpBadCursorSelect: "42000", + ErrSpCursorMismatch: "42000", + ErrSpCursorAlreadyOpen: "24000", + ErrSpCursorNotOpen: "24000", + ErrSpUndeclaredVar: "42000", + ErrSpFetchNoData: "02000", + ErrSpDupParam: "42000", + ErrSpDupVar: "42000", + ErrSpDupCond: "42000", + ErrSpDupCurs: "42000", + ErrSpSubselectNyi: "0A000", + ErrStmtNotAllowedInSfOrTrg: "0A000", + ErrSpVarcondAfterCurshndlr: "42000", + ErrSpCursorAfterHandler: "42000", + ErrSpCaseNotFound: "20000", + ErrDivisionByZero: "22012", + ErrIllegalValueForType: "22007", + ErrProcaccessDenied: "42000", + ErrXaerNota: "XAE04", + ErrXaerInval: "XAE05", + ErrXaerRmfail: "XAE07", + ErrXaerOutside: "XAE09", + ErrXaerRmerr: "XAE03", + ErrXaRbrollback: "XA100", + ErrNonexistingProcGrant: "42000", + ErrDataTooLong: "22001", + ErrSpBadSQLstate: "42000", + ErrCantCreateUserWithGrant: "42000", + ErrSpDupHandler: "42000", + ErrSpNotVarArg: "42000", + ErrSpNoRetset: "0A000", + ErrCantCreateGeometryObject: "22003", + ErrTooBigScale: "42000", + ErrTooBigPrecision: "42000", + ErrMBiggerThanD: "42000", + ErrTooLongBody: "42000", + ErrTooBigDisplaywidth: "42000", + ErrXaerDupid: "XAE08", + ErrDatetimeFunctionOverflow: "22008", + ErrRowIsReferenced2: "23000", + ErrNoReferencedRow2: "23000", + ErrSpBadVarShadow: "42000", + ErrSpWrongName: "42000", + ErrSpNoAggregate: "42000", + ErrMaxPreparedStmtCountReached: "42000", + ErrNonGroupingFieldUsed: "42000", + ErrForeignDuplicateKeyOldUnused: "23000", + ErrCantChangeTxCharacteristics: "25001", + ErrWrongParamcountToNativeFct: "42000", + ErrWrongParametersToNativeFct: "42000", + ErrWrongParametersToStoredFct: "42000", + ErrDupEntryWithKeyName: "23000", + ErrXaRbtimeout: "XA106", + ErrXaRbdeadlock: "XA102", + ErrFuncInexistentNameCollision: "42000", + ErrDupSignalSet: "42000", + ErrSignalWarn: "01000", + ErrSignalNotFound: "02000", + ErrSignalException: "HY000", + ErrResignalWithoutActiveHandler: "0K000", + ErrSpatialMustHaveGeomCol: "42000", + ErrDataOutOfRange: "22003", + ErrAccessDeniedNoPassword: "28000", + ErrTruncateIllegalFk: "42000", + ErrDaInvalidConditionNumber: "35000", + ErrForeignDuplicateKeyWithChildInfo: "23000", + ErrForeignDuplicateKeyWithoutChildInfo: "23000", + ErrCantExecuteInReadOnlyTransaction: "25006", + ErrAlterOperationNotSupported: "0A000", + ErrAlterOperationNotSupportedReason: "0A000", + ErrDupUnknownInIndex: "23000", +} diff --git a/vendor/github.com/pingcap/tidb/mysql/time.go b/vendor/github.com/pingcap/tidb/mysql/time.go new file mode 100644 index 000000000..7f9819941 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/mysql/time.go @@ -0,0 +1,1422 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package mysql + +import ( + "bytes" + "fmt" + "math" + "strconv" + "strings" + "time" + "unicode" + + "github.com/juju/errors" +) + +// Portable analogs of some common call errors. +var ( + ErrInvalidTimeFormat = errors.New("invalid time format") + ErrInvalidYearFormat = errors.New("invalid year format") + ErrInvalidYear = errors.New("invalid year") +) + +// Time format without fractional seconds precision. +const ( + DateFormat = "2006-01-02" + TimeFormat = "2006-01-02 15:04:05" + // TimeFSPFormat is time format with fractional seconds precision. + TimeFSPFormat = "2006-01-02 15:04:05.000000" +) + +const ( + // MinYear is the minimum for mysql year type. + MinYear int16 = 1901 + // MaxYear is the maximum for mysql year type. + MaxYear int16 = 2155 + + // MinTime is the minimum for mysql time type. + MinTime = -time.Duration(838*3600+59*60+59) * time.Second + // MaxTime is the maximum for mysql time type. + MaxTime = time.Duration(838*3600+59*60+59) * time.Second + + zeroDatetimeStr = "0000-00-00 00:00:00" + zeroDateStr = "0000-00-00" +) + +// Zero values for different types. +var ( + // ZeroDuration is the zero value for Duration type. + ZeroDuration = Duration{Duration: time.Duration(0), Fsp: DefaultFsp} + + // ZeroTime is the zero value for time.Time type. + ZeroTime = time.Date(0, 0, 0, 0, 0, 0, 0, time.UTC) + + // ZeroDatetime is the zero value for datetime Time. + ZeroDatetime = Time{ + Time: ZeroTime, + Type: TypeDatetime, + Fsp: DefaultFsp, + } + + // ZeroTimestamp is the zero value for timestamp Time. + ZeroTimestamp = Time{ + Time: ZeroTime, + Type: TypeTimestamp, + Fsp: DefaultFsp, + } + + // ZeroDate is the zero value for date Time. + ZeroDate = Time{ + Time: ZeroTime, + Type: TypeDate, + Fsp: DefaultFsp, + } +) + +var ( + // MinDatetime is the minimum for mysql datetime type. + MinDatetime = time.Date(1000, 1, 1, 0, 0, 0, 0, time.Local) + // MaxDatetime is the maximum for mysql datetime type. + MaxDatetime = time.Date(9999, 12, 31, 23, 59, 59, 999999, time.Local) + + // MinTimestamp is the minimum for mysql timestamp type. + MinTimestamp = time.Date(1970, 1, 1, 0, 0, 1, 0, time.UTC) + // MaxTimestamp is the maximum for mysql timestamp type. + MaxTimestamp = time.Date(2038, 1, 19, 3, 14, 7, 999999, time.UTC) + + // WeekdayNames lists names of weekdays, which are used in builtin time function `dayname`. + WeekdayNames = []string{ + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday", + } +) + +// Time is the struct for handling datetime, timestamp and date. +// TODO: check if need a NewTime function to set Fsp default value? +type Time struct { + time.Time + Type uint8 + // Fsp is short for Fractional Seconds Precision. + // See http://dev.mysql.com/doc/refman/5.7/en/fractional-seconds.html + Fsp int +} + +// CurrentTime returns current time with type tp. +func CurrentTime(tp uint8) Time { + return Time{Time: time.Now(), Type: tp, Fsp: 0} +} + +func (t Time) String() string { + if t.IsZero() { + if t.Type == TypeDate { + return zeroDateStr + } + + return zeroDatetimeStr + } + + if t.Type == TypeDate { + return t.Time.Format(DateFormat) + } + + tfStr := TimeFormat + if t.Fsp > 0 { + tfStr = fmt.Sprintf("%s.%s", tfStr, strings.Repeat("0", t.Fsp)) + } + + return t.Time.Format(tfStr) +} + +// IsZero returns a boolean indicating whether the time is equal to ZeroTime. +func (t Time) IsZero() bool { + return t.Time.Equal(ZeroTime) +} + +// Marshal returns the binary encoding of time. +func (t Time) Marshal() ([]byte, error) { + var ( + b []byte + err error + ) + + switch t.Type { + case TypeDatetime, TypeDate: + // We must use t's Zone not current Now Zone, + // For EDT/EST, even we create the time with time.Local location, + // we may still have a different zone with current Now time. + _, offset := t.Zone() + // For datetime and date type, we have a trick to marshal. + // e.g, if local time is 2010-10-10T10:10:10 UTC+8 + // we will change this to 2010-10-10T10:10:10 UTC and then marshal. + b, err = t.Time.Add(time.Duration(offset) * time.Second).UTC().MarshalBinary() + case TypeTimestamp: + b, err = t.Time.UTC().MarshalBinary() + default: + err = errors.Errorf("invalid time type %d", t.Type) + } + + if err != nil { + return nil, errors.Trace(err) + } + + return b, nil +} + +// Unmarshal decodes the binary data into Time with current local time. +func (t *Time) Unmarshal(b []byte) error { + return t.UnmarshalInLocation(b, time.Local) +} + +// UnmarshalInLocation decodes the binary data +// into Time with a specific time Location. +func (t *Time) UnmarshalInLocation(b []byte, loc *time.Location) error { + if err := t.Time.UnmarshalBinary(b); err != nil { + return errors.Trace(err) + } + + if t.IsZero() { + return nil + } + + if t.Type == TypeDatetime || t.Type == TypeDate { + // e.g, for 2010-10-10T10:10:10 UTC, we will unmarshal to 2010-10-10T10:10:10 location + _, offset := t.Time.In(loc).Zone() + + t.Time = t.Time.Add(-time.Duration(offset) * time.Second).In(loc) + if t.Type == TypeDate { + // for date type ,we will only use year, month and day. + year, month, day := t.Time.Date() + t.Time = time.Date(year, month, day, 0, 0, 0, 0, loc) + } + } else if t.Type == TypeTimestamp { + t.Time = t.Time.In(loc) + } else { + return errors.Errorf("invalid time type %d", t.Type) + } + + return nil +} + +const numberFormat = "20060102150405" + +// ToNumber returns a formatted number. +// e.g, +// 2012-12-12T10:10:10 -> 20121212101010 +// 2012-12-12T10:10:10.123456 -> 20121212101010.123456 +func (t Time) ToNumber() Decimal { + if t.IsZero() { + return ZeroDecimal + } + + tfStr := numberFormat + if t.Fsp > 0 { + tfStr = fmt.Sprintf("%s.%s", tfStr, strings.Repeat("0", t.Fsp)) + } + + s := t.Time.Format(tfStr) + // We skip checking error here because time formatted string can be parsed certainly. + d, _ := ParseDecimal(s) + return d +} + +// Convert converts t with type tp. +func (t Time) Convert(tp uint8) (Time, error) { + if t.Type == tp || t.IsZero() { + return Time{Time: t.Time, Type: tp, Fsp: t.Fsp}, nil + } + + switch tp { + case TypeDatetime: + return Time{Time: t.Time, Type: TypeDatetime, Fsp: t.Fsp}, nil + case TypeTimestamp: + nt := Time{Time: t.Time, Type: TypeTimestamp, Fsp: t.Fsp} + if !checkTimestamp(nt) { + return ZeroTimestamp, errors.Trace(ErrInvalidTimeFormat) + } + return nt, nil + case TypeDate: + year, month, day := t.Time.Date() + return Time{Time: time.Date(year, month, day, 0, 0, 0, 0, time.Local), + Type: TypeDate, Fsp: 0}, nil + default: + return Time{Time: ZeroTime, Type: tp}, errors.Errorf("invalid time type %d", tp) + } +} + +// ConvertToDuration converts mysql datetime, timestamp and date to mysql time type. +// e.g, +// 2012-12-12T10:10:10 -> 10:10:10 +// 2012-12-12 -> 0 +func (t Time) ConvertToDuration() (Duration, error) { + if t.IsZero() { + return ZeroDuration, nil + } + + hour, minute, second := t.Clock() + frac := t.Nanosecond() + + d := time.Duration(hour*3600+minute*60+second)*time.Second + time.Duration(frac) + + // TODO: check convert validation + return Duration{Duration: time.Duration(d), Fsp: t.Fsp}, nil +} + +// Compare returns an integer comparing the time instant t to o. +// If t is after o, return 1, equal o, return 0, before o, return -1. +func (t Time) Compare(o Time) int { + if t.Time.After(o.Time) { + return 1 + } else if t.Time.Equal(o.Time) { + return 0 + } else { + return -1 + } +} + +// CompareString is like Compare, +// but parses string to Time then compares. +func (t Time) CompareString(str string) (int, error) { + // use MaxFsp to parse the string + o, err := ParseTime(str, t.Type, MaxFsp) + if err != nil { + return 0, errors.Trace(err) + } + + return t.Compare(o), nil +} + +// RoundFrac rounds fractional seconds precision with new fsp and returns a new one. +// We will use the “round half up” rule, e.g, >= 0.5 -> 1, < 0.5 -> 0, +// so 2011:11:11 10:10:10.888888 round 0 -> 2011:11:11 10:10:11 +// and 2011:11:11 10:10:10.111111 round 0 -> 2011:11:11 10:10:10 +func (t Time) RoundFrac(fsp int) (Time, error) { + if t.Type == TypeDate { + // date type has no fsp + return t, nil + } + + fsp, err := checkFsp(fsp) + if err != nil { + return t, errors.Trace(err) + } + + if fsp == t.Fsp { + // have same fsp + return t, nil + } + + nt := t.Time.Round(time.Duration(math.Pow10(9-fsp)) * time.Nanosecond) + return Time{Time: nt, Type: t.Type, Fsp: fsp}, nil +} + +func parseDateFormat(format string) []string { + format = strings.TrimSpace(format) + + start := 0 + seps := []string{} + for i := 0; i < len(format); i++ { + // Date fromat must start and end with number. + if i == 0 || i == len(format)-1 { + if !unicode.IsNumber(rune(format[i])) { + return nil + } + + continue + } + + // Seperator is a single none-number char. + if !unicode.IsNumber(rune(format[i])) { + if !unicode.IsNumber(rune(format[i-1])) { + return nil + } + + seps = append(seps, format[start:i]) + start = i + 1 + } + + } + + seps = append(seps, format[start:]) + return seps +} + +func parseDatetime(str string, fsp int) (Time, error) { + // Try to split str with delimiter. + // TODO: only punctuation can be the delimiter for date parts or time parts. + // But only space and T can be the delimiter between the date and time part. + var ( + year int + month int + day int + hour int + minute int + second int + frac int + fracStr string + + err error + ) + + seps := parseDateFormat(str) + + switch len(seps) { + case 1: + // No delimiter. + if len(str) == 14 { + // YYYYMMDDHHMMSS + _, err = fmt.Sscanf(str, "%4d%2d%2d%2d%2d%2d", &year, &month, &day, &hour, &minute, &second) + } else if len(str) == 12 { + // YYMMDDHHMMSS + _, err = fmt.Sscanf(str, "%2d%2d%2d%2d%2d%2d", &year, &month, &day, &hour, &minute, &second) + year = adjustYear(year) + } else if len(str) == 8 { + // YYYYMMDD + _, err = fmt.Sscanf(str, "%4d%2d%2d", &year, &month, &day) + } else if len(str) == 6 { + // YYMMDD + _, err = fmt.Sscanf(str, "%2d%2d%2d", &year, &month, &day) + year = adjustYear(year) + } else { + return ZeroDatetime, errors.Trace(ErrInvalidTimeFormat) + } + case 2: + s := seps[0] + fracStr = seps[1] + + if len(s) == 14 { + // YYYYMMDDHHMMSS.fraction + _, err = fmt.Sscanf(s, "%4d%2d%2d%2d%2d%2d", &year, &month, &day, &hour, &minute, &second) + } else if len(s) == 12 { + // YYMMDDHHMMSS.fraction + _, err = fmt.Sscanf(s, "%2d%2d%2d%2d%2d%2d", &year, &month, &day, &hour, &minute, &second) + year = adjustYear(year) + } else { + return ZeroDatetime, errors.Trace(ErrInvalidTimeFormat) + } + case 3: + // YYYY-MM-DD + err = scanTimeArgs(seps, &year, &month, &day) + case 6: + // We don't have fractional seconds part. + // YYYY-MM-DD HH-MM-SS + err = scanTimeArgs(seps, &year, &month, &day, &hour, &minute, &second) + case 7: + // We have fractional seconds part. + // YYY-MM-DD HH-MM-SS.fraction + err = scanTimeArgs(seps[0:len(seps)-1], &year, &month, &day, &hour, &minute, &second) + fracStr = seps[len(seps)-1] + default: + return ZeroDatetime, errors.Trace(ErrInvalidTimeFormat) + } + + if err != nil { + return ZeroDatetime, errors.Trace(err) + } + + // If str is sepereated by delimiters, the first one is year, and if the year is 2 digit, + // we should adjust it. + // TODO: ajust year is very complex, now we only consider the simplest way. + if len(seps[0]) == 2 { + year = adjustYear(year) + } + + frac, err = parseFrac(fracStr, fsp) + if err != nil { + return ZeroDatetime, errors.Trace(err) + } + + t, err := newTime(year, month, day, hour, minute, second, frac) + if err != nil { + return ZeroDatetime, errors.Trace(err) + } + + nt := Time{ + Time: t, + Type: TypeDatetime, + Fsp: fsp} + + return nt, nil +} + +func scanTimeArgs(seps []string, args ...*int) error { + if len(seps) != len(args) { + return errors.Trace(ErrInvalidTimeFormat) + } + + var err error + for i, s := range seps { + *args[i], err = strconv.Atoi(s) + if err != nil { + return errors.Trace(err) + } + } + return nil +} + +// ParseYear parses a formatted string and returns a year number. +func ParseYear(str string) (int16, error) { + v, err := strconv.ParseInt(str, 10, 16) + if err != nil { + return 0, errors.Trace(err) + } + y := int16(v) + + if len(str) == 4 { + // Nothing to do. + } else if len(str) == 2 || len(str) == 1 { + y = int16(adjustYear(int(y))) + } else { + return 0, errors.Trace(ErrInvalidYearFormat) + } + + if y < MinYear || y > MaxYear { + return 0, errors.Trace(ErrInvalidYearFormat) + } + + return y, nil +} + +func newTime(year int, month int, day int, hour int, minute int, second int, frac int) (time.Time, error) { + if year == 0 && month == 0 && day == 0 && hour == 0 && minute == 0 && second == 0 { + // Should we check fractional fractional here? + // But go time.Time can not support zero time 0000-00-00 00:00:00. + return ZeroTime, nil + } + + if err := checkTime(year, month, day, hour, minute, second, frac); err != nil { + return ZeroTime, errors.Trace(err) + } + + return time.Date(year, time.Month(month), day, hour, minute, second, frac*1000, time.Local), nil +} + +// See https://dev.mysql.com/doc/refman/5.7/en/two-digit-years.html +func adjustYear(y int) int { + if y >= 0 && y <= 69 { + y = 2000 + y + } else if y >= 70 && y <= 99 { + y = 1900 + y + } + return y +} + +// AdjustYear is used for adjusting year and checking its validation. +func AdjustYear(y int64) (int64, error) { + y = int64(adjustYear(int(y))) + if y < int64(MinYear) || y > int64(MaxYear) { + return 0, errors.Trace(ErrInvalidYear) + } + + return y, nil +} + +// Duration is the type for MySQL time type. +type Duration struct { + time.Duration + // Fsp is short for Fractional Seconds Precision. + // See http://dev.mysql.com/doc/refman/5.7/en/fractional-seconds.html + Fsp int +} + +// String returns the time formatted using default TimeFormat and fsp. +func (d Duration) String() string { + var buf bytes.Buffer + + sign, hours, minutes, seconds, fraction := splitDuration(d.Duration) + if sign < 0 { + buf.WriteByte('-') + } + + fmt.Fprintf(&buf, "%02d:%02d:%02d", hours, minutes, seconds) + if d.Fsp > 0 { + buf.WriteString(".") + buf.WriteString(d.formatFrac(fraction)) + } + + p := buf.String() + + return p +} + +func (d Duration) formatFrac(frac int) string { + format := fmt.Sprintf("%%0%dd", d.Fsp) + s := fmt.Sprintf(format, frac) + return s[0:d.Fsp] +} + +// ToNumber changes duration to number format. +// e.g, +// 10:10:10 -> 101010 +func (d Duration) ToNumber() Decimal { + sign, hours, minutes, seconds, fraction := splitDuration(time.Duration(d.Duration)) + var ( + s string + signStr string + ) + + if sign < 0 { + signStr = "-" + } + + if d.Fsp == 0 { + s = fmt.Sprintf("%s%02d%02d%02d", signStr, hours, minutes, seconds) + } else { + s = fmt.Sprintf("%s%02d%02d%02d.%s", signStr, hours, minutes, seconds, d.formatFrac(fraction)) + } + + // We skip checking error here because time formatted string can be parsed certainly. + v, _ := ParseDecimal(s) + return v +} + +// ConvertToTime converts duration to Time. +// Tp is TypeDatetime, TypeTimestamp and TypeDate. +func (d Duration) ConvertToTime(tp uint8) (Time, error) { + year, month, day := time.Now().Date() + // just use current year, month and day. + n := time.Date(year, month, day, 0, 0, 0, 0, time.Local) + n = n.Add(d.Duration) + + t := Time{ + Time: n, + Type: TypeDatetime, + Fsp: d.Fsp, + } + + return t.Convert(tp) +} + +// RoundFrac rounds fractional seconds precision with new fsp and returns a new one. +// We will use the “round half up” rule, e.g, >= 0.5 -> 1, < 0.5 -> 0, +// so 10:10:10.999999 round 0 -> 10:10:11 +// and 10:10:10.000000 round 0 -> 10:10:10 +func (d Duration) RoundFrac(fsp int) (Duration, error) { + fsp, err := checkFsp(fsp) + if err != nil { + return d, errors.Trace(err) + } + + if fsp == d.Fsp { + return d, nil + } + + n := ZeroTime + nd := n.Add(d.Duration).Round(time.Duration(math.Pow10(9-fsp)) * time.Nanosecond).Sub(n) + return Duration{Duration: nd, Fsp: fsp}, nil +} + +// Compare returns an integer comparing the Duration instant t to o. +// If d is after o, return 1, equal o, return 0, before o, return -1. +func (d Duration) Compare(o Duration) int { + if d.Duration > o.Duration { + return 1 + } else if d.Duration == o.Duration { + return 0 + } else { + return -1 + } +} + +// CompareString is like Compare, +// but parses str to Duration then compares. +func (d Duration) CompareString(str string) (int, error) { + // use MaxFsp to parse the string + o, err := ParseDuration(str, MaxFsp) + if err != nil { + return 0, err + } + + return d.Compare(o), nil +} + +// Hour returns current hour. +// e.g, hour("11:11:11") -> 11 +func (d Duration) Hour() int { + _, hour, _, _, _ := splitDuration(d.Duration) + return hour +} + +// Minute returns current minute. +// e.g, hour("11:11:11") -> 11 +func (d Duration) Minute() int { + _, _, minute, _, _ := splitDuration(d.Duration) + return minute +} + +// Second returns current second. +// e.g, hour("11:11:11") -> 11 +func (d Duration) Second() int { + _, _, _, second, _ := splitDuration(d.Duration) + return second +} + +// MicroSecond returns current microsecond. +// e.g, hour("11:11:11.11") -> 110000 +func (d Duration) MicroSecond() int { + _, _, _, _, frac := splitDuration(d.Duration) + return frac +} + +// ParseDuration parses the time form a formatted string with a fractional seconds part, +// returns the duration type Time value. +// See: http://dev.mysql.com/doc/refman/5.7/en/fractional-seconds.html +func ParseDuration(str string, fsp int) (Duration, error) { + var ( + day int + hour int + minute int + second int + frac int + + err error + sign = 0 + dayExists = false + ) + + fsp, err = checkFsp(fsp) + if err != nil { + return ZeroDuration, errors.Trace(err) + } + + if len(str) == 0 { + return ZeroDuration, nil + } else if str[0] == '-' { + str = str[1:] + sign = -1 + } + + // Time format may has day. + if n := strings.IndexByte(str, ' '); n >= 0 { + if day, err = strconv.Atoi(str[:n]); err == nil { + dayExists = true + } + str = str[n+1:] + } + + if n := strings.IndexByte(str, '.'); n >= 0 { + // It has fractional precesion parts. + fracStr := str[n+1:] + frac, err = parseFrac(fracStr, fsp) + if err != nil { + return ZeroDuration, errors.Trace(err) + } + str = str[0:n] + } + + // It tries to split str with delimiter, time delimiter must be : + seps := strings.Split(str, ":") + + switch len(seps) { + case 1: + if dayExists { + hour, err = strconv.Atoi(seps[0]) + } else { + // No delimiter. + if len(str) == 6 { + // HHMMSS + _, err = fmt.Sscanf(str, "%2d%2d%2d", &hour, &minute, &second) + } else if len(str) == 4 { + // MMSS + _, err = fmt.Sscanf(str, "%2d%2d", &minute, &second) + } else if len(str) == 2 { + // SS + _, err = fmt.Sscanf(str, "%2d", &second) + } else { + // Maybe only contains date. + _, err = ParseDate(str) + if err == nil { + return ZeroDuration, nil + } + return ZeroDuration, errors.Trace(ErrInvalidTimeFormat) + } + } + case 2: + // HH:MM + _, err = fmt.Sscanf(str, "%2d:%2d", &hour, &minute) + case 3: + // Time format maybe HH:MM:SS or HHH:MM:SS. + // See: https://dev.mysql.com/doc/refman/5.7/en/time.html + if !dayExists && len(seps[0]) == 3 { + _, err = fmt.Sscanf(str, "%3d:%2d:%2d", &hour, &minute, &second) + } else { + _, err = fmt.Sscanf(str, "%2d:%2d:%2d", &hour, &minute, &second) + } + default: + return ZeroDuration, errors.Trace(ErrInvalidTimeFormat) + } + + if err != nil { + return ZeroDuration, errors.Trace(err) + } + + d := time.Duration(day*24*3600+hour*3600+minute*60+second)*time.Second + time.Duration(frac)*time.Microsecond + if sign == -1 { + d = -d + } + + if d > MaxTime { + d = MaxTime + err = ErrInvalidTimeFormat + } else if d < MinTime { + d = MinTime + err = ErrInvalidTimeFormat + } + return Duration{Duration: d, Fsp: fsp}, errors.Trace(err) +} + +func splitDuration(t time.Duration) (int, int, int, int, int) { + sign := 1 + if t < 0 { + t = -t + sign = -1 + } + + hours := t / time.Hour + t -= hours * time.Hour + minutes := t / time.Minute + t -= minutes * time.Minute + seconds := t / time.Second + t -= seconds * time.Second + fraction := t / time.Microsecond + + return sign, int(hours), int(minutes), int(seconds), int(fraction) +} + +func checkTime(year int, month int, day int, hour int, minute int, second int, frac int) error { + // Notes: for datetime type, `insert t values("0001-01-01 00:00:00");` is valid + // so here only check year from 0~9999. + if (year < 0 || year > 9999) || + (month <= 0 || month > 12) || + (day <= 0 || day > 31) || + (hour < 0 || hour >= 24) || + (minute < 0 || minute >= 60) || + (second < 0 || second >= 60) || + (frac < 0) { + return errors.Trace(ErrInvalidTimeFormat) + } + + return nil +} + +func getTime(num int64, tp byte) (Time, error) { + s1 := num / 1000000 + s2 := num - s1*1000000 + + year := int(s1 / 10000) + s1 %= 10000 + month := int(s1 / 100) + day := int(s1 % 100) + + hour := int(s2 / 10000) + s2 %= 10000 + minute := int(s2 / 100) + second := int(s2 % 100) + + if err := checkTime(year, month, day, hour, minute, second, 0); err != nil { + return Time{ + Time: ZeroTime, + Type: tp, + Fsp: DefaultFsp, + }, err + } + + t, err := newTime(year, month, day, hour, minute, second, 0) + return Time{ + Time: t, + Type: tp, + Fsp: DefaultFsp, + }, errors.Trace(err) +} + +// See number_to_datetime function. +// https://github.com/mysql/mysql-server/blob/5.7/sql-common/my_time.c +func parseDateTimeFromNum(num int64) (Time, error) { + t := ZeroDate + // Check zero. + if num == 0 { + return t, nil + } + + // Check datetime type. + if num >= 10000101000000 { + return getTime(num, t.Type) + } + + // Check MMDD. + if num < 101 { + return t, errors.Trace(ErrInvalidTimeFormat) + } + + // Adjust year + // YYMMDD, year: 2000-2069 + if num <= (70-1)*10000+1231 { + num = (num + 20000000) * 1000000 + return getTime(num, t.Type) + } + + // Check YYMMDD. + if num < 70*10000+101 { + return t, errors.Trace(ErrInvalidTimeFormat) + } + + // Adjust year + // YYMMDD, year: 1970-1999 + if num < 991231 { + num = (num + 19000000) * 1000000 + return getTime(num, t.Type) + } + + // Check YYYYMMDD. + if num < 10000101 { + return t, errors.Trace(ErrInvalidTimeFormat) + } + + // Adjust hour/min/second. + if num < 99991231 { + num = num * 1000000 + return getTime(num, t.Type) + } + + // Check MMDDHHMMSS. + if num < 101000000 { + return t, errors.Trace(ErrInvalidTimeFormat) + } + + // Set TypeDatetime type. + t.Type = TypeDatetime + + // Adjust year + // YYMMDDHHMMSS, 2000-2069 + if num <= 69*10000000000+1231235959 { + num = num + 20000000000000 + return getTime(num, t.Type) + } + + // Check YYYYMMDDHHMMSS. + if num < 70*10000000000+101000000 { + return t, errors.Trace(ErrInvalidTimeFormat) + } + + // Adjust year + // YYMMDDHHMMSS, 1970-1999 + if num <= 991231235959 { + num = num + 19000000000000 + return getTime(num, t.Type) + } + + return getTime(num, t.Type) +} + +// ParseTime parses a formatted string with type tp and specific fsp. +// Type is TypeDatetime, TypeTimestamp and TypeDate. +// Fsp is in range [0, 6]. +// MySQL supports many valid datatime format, but still has some limitation. +// If delimiter exists, the date part and time part is seperated by a space or T, +// other punctuation character can be used as the delimiter between date parts or time parts. +// If no delimiter, the format must be YYYYMMDDHHMMSS or YYMMDDHHMMSS +// If we have fractional seconds part, we must use decimal points as the delimiter. +// The valid datetime range is from '1000-01-01 00:00:00.000000' to '9999-12-31 23:59:59.999999'. +// The valid timestamp range is from '1970-01-01 00:00:01.000000' to '2038-01-19 03:14:07.999999'. +// The valid date range is from '1000-01-01' to '9999-12-31' +func ParseTime(str string, tp byte, fsp int) (Time, error) { + fsp, err := checkFsp(fsp) + if err != nil { + return Time{Time: ZeroTime, Type: tp}, errors.Trace(err) + } + + t, err := parseDatetime(str, fsp) + if err != nil { + return Time{Time: ZeroTime, Type: tp}, errors.Trace(err) + } + + return t.Convert(tp) +} + +// ParseDatetime is a helper function wrapping ParseTime with datetime type and default fsp. +func ParseDatetime(str string) (Time, error) { + return ParseTime(str, TypeDatetime, DefaultFsp) +} + +// ParseTimestamp is a helper function wrapping ParseTime with timestamp type and default fsp. +func ParseTimestamp(str string) (Time, error) { + return ParseTime(str, TypeTimestamp, DefaultFsp) +} + +// ParseDate is a helper function wrapping ParseTime with date type. +func ParseDate(str string) (Time, error) { + // date has no fractional seconds precision + return ParseTime(str, TypeDate, MinFsp) +} + +// ParseTimeFromNum parses a formatted int64, +// returns the value which type is tp. +func ParseTimeFromNum(num int64, tp byte, fsp int) (Time, error) { + fsp, err := checkFsp(fsp) + if err != nil { + return Time{Time: ZeroTime, Type: tp}, errors.Trace(err) + } + + t, err := parseDateTimeFromNum(num) + if err != nil { + return Time{Time: ZeroTime, Type: tp}, errors.Trace(err) + } + + if !checkDatetime(t) { + return Time{Time: ZeroTime, Type: tp}, ErrInvalidTimeFormat + } + + t.Fsp = fsp + return t.Convert(tp) +} + +// ParseDatetimeFromNum is a helper function wrapping ParseTimeFromNum with datetime type and default fsp. +func ParseDatetimeFromNum(num int64) (Time, error) { + return ParseTimeFromNum(num, TypeDatetime, DefaultFsp) +} + +// ParseTimestampFromNum is a helper function wrapping ParseTimeFromNum with timestamp type and default fsp. +func ParseTimestampFromNum(num int64) (Time, error) { + return ParseTimeFromNum(num, TypeTimestamp, DefaultFsp) +} + +// ParseDateFromNum is a helper function wrapping ParseTimeFromNum with date type. +func ParseDateFromNum(num int64) (Time, error) { + // date has no fractional seconds precision + return ParseTimeFromNum(num, TypeDate, MinFsp) +} + +func checkDatetime(t Time) bool { + if t.IsZero() { + return true + } + + if t.Time.After(MaxDatetime) || t.Time.Before(MinDatetime) { + return false + } + + return true +} + +func checkTimestamp(t Time) bool { + if t.IsZero() { + return true + } + + if t.Time.After(MaxTimestamp) || t.Time.Before(MinTimestamp) { + return false + } + + return true +} + +// ExtractTimeNum extracts time value number from time unit and format. +func ExtractTimeNum(unit string, t Time) (int64, error) { + switch strings.ToUpper(unit) { + case "MICROSECOND": + return int64(t.Nanosecond() / 1000), nil + case "SECOND": + return int64(t.Second()), nil + case "MINUTE": + return int64(t.Minute()), nil + case "HOUR": + return int64(t.Hour()), nil + case "DAY": + return int64(t.Day()), nil + case "WEEK": + _, week := t.ISOWeek() + return int64(week), nil + case "MONTH": + return int64(t.Month()), nil + case "QUARTER": + m := int64(t.Month()) + // 1 - 3 -> 1 + // 4 - 6 -> 2 + // 7 - 9 -> 3 + // 10 - 12 -> 4 + return (m + 2) / 3, nil + case "YEAR": + return int64(t.Year()), nil + case "SECOND_MICROSECOND": + return int64(t.Second())*1000000 + int64(t.Nanosecond())/1000, nil + case "MINUTE_MICROSECOND": + _, m, s := t.Clock() + return int64(m)*100000000 + int64(s)*1000000 + int64(t.Nanosecond())/1000, nil + case "MINUTE_SECOND": + _, m, s := t.Clock() + return int64(m*100 + s), nil + case "HOUR_MICROSECOND": + h, m, s := t.Clock() + return int64(h)*10000000000 + int64(m)*100000000 + int64(s)*1000000 + int64(t.Nanosecond())/1000, nil + case "HOUR_SECOND": + h, m, s := t.Clock() + return int64(h)*10000 + int64(m)*100 + int64(s), nil + case "HOUR_MINUTE": + h, m, _ := t.Clock() + return int64(h)*100 + int64(m), nil + case "DAY_MICROSECOND": + h, m, s := t.Clock() + d := t.Day() + return int64(d*1000000+h*10000+m*100+s)*1000000 + int64(t.Nanosecond())/1000, nil + case "DAY_SECOND": + h, m, s := t.Clock() + d := t.Day() + return int64(d)*1000000 + int64(h)*10000 + int64(m)*100 + int64(s), nil + case "DAY_MINUTE": + h, m, _ := t.Clock() + d := t.Day() + return int64(d)*10000 + int64(h)*100 + int64(m), nil + case "DAY_HOUR": + h, _, _ := t.Clock() + d := t.Day() + return int64(d)*100 + int64(h), nil + case "YEAR_MONTH": + y, m, _ := t.Date() + return int64(y)*100 + int64(m), nil + default: + return 0, errors.Errorf("invalid unit %s", unit) + } +} + +func extractSingleTimeValue(unit string, format string) (int64, int64, int64, time.Duration, error) { + iv, err := strconv.ParseInt(format, 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + v := time.Duration(iv) + switch strings.ToUpper(unit) { + case "MICROSECOND": + return 0, 0, 0, v * time.Microsecond, nil + case "SECOND": + return 0, 0, 0, v * time.Second, nil + case "MINUTE": + return 0, 0, 0, v * time.Minute, nil + case "HOUR": + return 0, 0, 0, v * time.Hour, nil + case "DAY": + return 0, 0, iv, 0, nil + case "WEEK": + return 0, 0, 7 * iv, 0, nil + case "MONTH": + return 0, iv, 0, 0, nil + case "QUARTER": + return 0, 3 * iv, 0, 0, nil + case "YEAR": + return iv, 0, 0, 0, nil + } + + return 0, 0, 0, 0, errors.Errorf("invalid singel timeunit - %s", unit) +} + +// Format is `SS.FFFFFF`. +func extractSecondMicrosecond(format string) (int64, int64, int64, time.Duration, error) { + fields := strings.Split(format, ".") + if len(fields) != 2 { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + seconds, err := strconv.ParseInt(fields[0], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + microseconds, err := strconv.ParseInt(alignFrac(fields[1], MaxFsp), 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + return 0, 0, 0, time.Duration(seconds)*time.Second + time.Duration(microseconds)*time.Microsecond, nil +} + +// Format is `MM:SS.FFFFFF`. +func extractMinuteMicrosecond(format string) (int64, int64, int64, time.Duration, error) { + fields := strings.Split(format, ":") + if len(fields) != 2 { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + minutes, err := strconv.ParseInt(fields[0], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + _, _, _, value, err := extractSecondMicrosecond(fields[1]) + if err != nil { + return 0, 0, 0, 0, errors.Trace(err) + } + + return 0, 0, 0, time.Duration(minutes)*time.Minute + value, nil +} + +// Format is `MM:SS`. +func extractMinuteSecond(format string) (int64, int64, int64, time.Duration, error) { + fields := strings.Split(format, ":") + if len(fields) != 2 { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + minutes, err := strconv.ParseInt(fields[0], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + seconds, err := strconv.ParseInt(fields[1], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + return 0, 0, 0, time.Duration(minutes)*time.Minute + time.Duration(seconds)*time.Second, nil +} + +// Format is `HH:MM:SS.FFFFFF`. +func extractHourMicrosecond(format string) (int64, int64, int64, time.Duration, error) { + fields := strings.Split(format, ":") + if len(fields) != 3 { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + hours, err := strconv.ParseInt(fields[0], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + minutes, err := strconv.ParseInt(fields[1], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + _, _, _, value, err := extractSecondMicrosecond(fields[2]) + if err != nil { + return 0, 0, 0, 0, errors.Trace(err) + } + + return 0, 0, 0, time.Duration(hours)*time.Hour + time.Duration(minutes)*time.Minute + value, nil +} + +// Format is `HH:MM:SS`. +func extractHourSecond(format string) (int64, int64, int64, time.Duration, error) { + fields := strings.Split(format, ":") + if len(fields) != 3 { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + hours, err := strconv.ParseInt(fields[0], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + minutes, err := strconv.ParseInt(fields[1], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + seconds, err := strconv.ParseInt(fields[2], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + return 0, 0, 0, time.Duration(hours)*time.Hour + time.Duration(minutes)*time.Minute + time.Duration(seconds)*time.Second, nil +} + +// Format is `HH:MM`. +func extractHourMinute(format string) (int64, int64, int64, time.Duration, error) { + fields := strings.Split(format, ":") + if len(fields) != 2 { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + hours, err := strconv.ParseInt(fields[0], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + minutes, err := strconv.ParseInt(fields[1], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + return 0, 0, 0, time.Duration(hours)*time.Hour + time.Duration(minutes)*time.Minute, nil +} + +// Format is `DD HH:MM:SS.FFFFFF`. +func extractDayMicrosecond(format string) (int64, int64, int64, time.Duration, error) { + fields := strings.Split(format, " ") + if len(fields) != 2 { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + days, err := strconv.ParseInt(fields[0], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + _, _, _, value, err := extractHourMicrosecond(fields[1]) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + return 0, 0, days, value, nil +} + +// Format is `DD HH:MM:SS`. +func extractDaySecond(format string) (int64, int64, int64, time.Duration, error) { + fields := strings.Split(format, " ") + if len(fields) != 2 { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + days, err := strconv.ParseInt(fields[0], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + _, _, _, value, err := extractHourSecond(fields[1]) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + return 0, 0, days, value, nil +} + +// Format is `DD HH:MM`. +func extractDayMinute(format string) (int64, int64, int64, time.Duration, error) { + fields := strings.Split(format, " ") + if len(fields) != 2 { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + days, err := strconv.ParseInt(fields[0], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + _, _, _, value, err := extractHourMinute(fields[1]) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + return 0, 0, days, value, nil +} + +// Format is `DD HH`. +func extractDayHour(format string) (int64, int64, int64, time.Duration, error) { + fields := strings.Split(format, " ") + if len(fields) != 2 { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + days, err := strconv.ParseInt(fields[0], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + hours, err := strconv.ParseInt(fields[1], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + return 0, 0, days, time.Duration(hours) * time.Hour, nil +} + +// Format is `YYYY-MM`. +func extractYearMonth(format string) (int64, int64, int64, time.Duration, error) { + fields := strings.Split(format, "-") + if len(fields) != 2 { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + years, err := strconv.ParseInt(fields[0], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + months, err := strconv.ParseInt(fields[1], 10, 64) + if err != nil { + return 0, 0, 0, 0, errors.Errorf("invalid time format - %s", format) + } + + return years, months, 0, 0, nil +} + +// ExtractTimeValue extracts time value from time unit and format. +func ExtractTimeValue(unit string, format string) (int64, int64, int64, time.Duration, error) { + switch strings.ToUpper(unit) { + case "MICROSECOND", "SECOND", "MINUTE", "HOUR", "DAY", "WEEK", "MONTH", "QUARTER", "YEAR": + return extractSingleTimeValue(unit, format) + case "SECOND_MICROSECOND": + return extractSecondMicrosecond(format) + case "MINUTE_MICROSECOND": + return extractMinuteMicrosecond(format) + case "MINUTE_SECOND": + return extractMinuteSecond(format) + case "HOUR_MICROSECOND": + return extractHourMicrosecond(format) + case "HOUR_SECOND": + return extractHourSecond(format) + case "HOUR_MINUTE": + return extractHourMinute(format) + case "DAY_MICROSECOND": + return extractDayMicrosecond(format) + case "DAY_SECOND": + return extractDaySecond(format) + case "DAY_MINUTE": + return extractDayMinute(format) + case "DAY_HOUR": + return extractDayHour(format) + case "YEAR_MONTH": + return extractYearMonth(format) + default: + return 0, 0, 0, 0, errors.Errorf("invalid singel timeunit - %s", unit) + } +} + +// IsClockUnit returns true when unit is interval unit with hour, minute or second. +func IsClockUnit(unit string) bool { + switch strings.ToUpper(unit) { + case "MICROSECOND", "SECOND", "MINUTE", "HOUR", + "SECOND_MICROSECOND", "MINUTE_MICROSECOND", "MINUTE_SECOND", + "HOUR_MICROSECOND", "HOUR_SECOND", "HOUR_MINUTE", + "DAY_MICROSECOND", "DAY_SECOND", "DAY_MINUTE", "DAY_HOUR": + return true + default: + return false + } +} + +// IsDateFormat returns true when the specified time format could contain only date. +func IsDateFormat(format string) bool { + format = strings.TrimSpace(format) + seps := parseDateFormat(format) + length := len(format) + switch len(seps) { + case 1: + if (length == 8) || (length == 6) { + return true + } + case 3: + return true + } + return false +} + +// ParseTimeFromInt64 parses mysql time value from int64. +func ParseTimeFromInt64(num int64) (Time, error) { + return parseDateTimeFromNum(num) +} diff --git a/vendor/github.com/pingcap/tidb/mysql/type.go b/vendor/github.com/pingcap/tidb/mysql/type.go new file mode 100644 index 000000000..c80b0c5e5 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/mysql/type.go @@ -0,0 +1,144 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package mysql + +// MySQL type informations. +const ( + TypeDecimal byte = iota + TypeTiny + TypeShort + TypeLong + TypeFloat + TypeDouble + TypeNull + TypeTimestamp + TypeLonglong + TypeInt24 + TypeDate + TypeDuration /* Original name was TypeTime, renamed to Duration to resolve the conflict with Go type Time.*/ + TypeDatetime + TypeYear + TypeNewDate + TypeVarchar + TypeBit +) + +// TypeUnspecified is an uninitialized type. TypeDecimal is not used in MySQL. +var TypeUnspecified = TypeDecimal + +// MySQL type informations. +const ( + TypeNewDecimal byte = iota + 0xf6 + TypeEnum + TypeSet + TypeTinyBlob + TypeMediumBlob + TypeLongBlob + TypeBlob + TypeVarString + TypeString + TypeGeometry +) + +// IsUninitializedType check if a type code is uninitialized. +// TypeDecimal is the old type code for decimal and not be used in the new mysql version. +func IsUninitializedType(tp byte) bool { + return tp == TypeDecimal +} + +// Flag informations. +const ( + NotNullFlag = 1 /* Field can't be NULL */ + PriKeyFlag = 2 /* Field is part of a primary key */ + UniqueKeyFlag = 4 /* Field is part of a unique key */ + MultipleKeyFlag = 8 /* Field is part of a key */ + BlobFlag = 16 /* Field is a blob */ + UnsignedFlag = 32 /* Field is unsigned */ + ZerofillFlag = 64 /* Field is zerofill */ + BinaryFlag = 128 /* Field is binary */ + + EnumFlag = 256 /* Field is an enum */ + AutoIncrementFlag = 512 /* Field is an auto increment field */ + TimestampFlag = 1024 /* Field is a timestamp */ + SetFlag = 2048 /* Field is a set */ + NoDefaultValueFlag = 4096 /* Field doesn't have a default value */ + OnUpdateNowFlag = 8192 /* Field is set to NOW on UPDATE */ + NumFlag = 32768 /* Field is a num (for clients) */ + PartKeyFlag = 16384 /* Intern: Part of some keys */ + GroupFlag = 32768 /* Intern: Group field */ + UniqueFlag = 65536 /* Intern: Used by sql_yacc */ + BinCmpFlag = 131072 /* Intern: Used by sql_yacc */ +) + +// TypeInt24 bounds. +const ( + MaxUint24 = 1<<24 - 1 + MaxInt24 = 1<<23 - 1 + MinInt24 = -1 << 23 +) + +// HasNotNullFlag checks if NotNullFlag is set. +func HasNotNullFlag(flag uint) bool { + return (flag & NotNullFlag) > 0 +} + +// HasNoDefaultValueFlag checks if NoDefaultValueFlag is set. +func HasNoDefaultValueFlag(flag uint) bool { + return (flag & NoDefaultValueFlag) > 0 +} + +// HasAutoIncrementFlag checks if AutoIncrementFlag is set. +func HasAutoIncrementFlag(flag uint) bool { + return (flag & AutoIncrementFlag) > 0 +} + +// HasUnsignedFlag checks if UnsignedFlag is set. +func HasUnsignedFlag(flag uint) bool { + return (flag & UnsignedFlag) > 0 +} + +// HasZerofillFlag checks if ZerofillFlag is set. +func HasZerofillFlag(flag uint) bool { + return (flag & ZerofillFlag) > 0 +} + +// HasBinaryFlag checks if BinaryFlag is set. +func HasBinaryFlag(flag uint) bool { + return (flag & BinaryFlag) > 0 +} + +// HasPriKeyFlag checks if PriKeyFlag is set. +func HasPriKeyFlag(flag uint) bool { + return (flag & PriKeyFlag) > 0 +} + +// HasUniKeyFlag checks if UniqueKeyFlag is set. +func HasUniKeyFlag(flag uint) bool { + return (flag & UniqueKeyFlag) > 0 +} + +// HasMultipleKeyFlag checks if MultipleKeyFlag is set. +func HasMultipleKeyFlag(flag uint) bool { + return (flag & MultipleKeyFlag) > 0 +} + +// HasTimestampFlag checks if HasTimestampFlag is set. +func HasTimestampFlag(flag uint) bool { + return (flag & TimestampFlag) > 0 +} + +// HasOnUpdateNowFlag checks if OnUpdateNowFlag is set. +func HasOnUpdateNowFlag(flag uint) bool { + return (flag & OnUpdateNowFlag) > 0 +} diff --git a/vendor/github.com/pingcap/tidb/mysql/util.go b/vendor/github.com/pingcap/tidb/mysql/util.go new file mode 100644 index 000000000..7a5cf72e1 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/mysql/util.go @@ -0,0 +1,54 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package mysql + +// GetDefaultFieldLength is used for Interger Types, Flen is the display length. +// Call this when no Flen assigned in ddl. +// or column value is calculated from an expression. +// For example: "select count(*) from t;", the column type is int64 and Flen in ResultField will be 21. +// See: https://dev.mysql.com/doc/refman/5.7/en/storage-requirements.html +func GetDefaultFieldLength(tp byte) int { + switch tp { + case TypeTiny: + return 4 + case TypeShort: + return 6 + case TypeInt24: + return 9 + case TypeLong: + return 11 + case TypeLonglong: + return 21 + case TypeDecimal: + // See: https://dev.mysql.com/doc/refman/5.7/en/fixed-point-types.html + return 10 + case TypeBit, TypeBlob: + return -1 + default: + //TODO: add more types + return -1 + } +} + +// GetDefaultDecimal returns the default decimal length for column. +func GetDefaultDecimal(tp byte) int { + switch tp { + case TypeDecimal: + // See: https://dev.mysql.com/doc/refman/5.7/en/fixed-point-types.html + return 0 + default: + //TODO: add more types + return -1 + } +} diff --git a/vendor/github.com/pingcap/tidb/optimizer/logic.go b/vendor/github.com/pingcap/tidb/optimizer/logic.go new file mode 100644 index 000000000..36070dbf7 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/optimizer/logic.go @@ -0,0 +1,65 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package optimizer + +import ( + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/evaluator" +) + +// logicOptimize does logic optimization works on AST. +func logicOptimize(ctx context.Context, node ast.Node) error { + return preEvaluate(ctx, node) +} + +// preEvaluate evaluates preEvaluable expression and rewrites constant expression to value expression. +func preEvaluate(ctx context.Context, node ast.Node) error { + pe := preEvaluator{ctx: ctx} + node.Accept(&pe) + return pe.err +} + +type preEvaluator struct { + ctx context.Context + err error +} + +func (r *preEvaluator) Enter(in ast.Node) (ast.Node, bool) { + return in, false +} + +func (r *preEvaluator) Leave(in ast.Node) (ast.Node, bool) { + if expr, ok := in.(ast.ExprNode); ok { + if _, ok = expr.(*ast.ValueExpr); ok { + return in, true + } else if ast.IsPreEvaluable(expr) { + val, err := evaluator.Eval(r.ctx, expr) + if err != nil { + r.err = err + return in, false + } + if ast.IsConstant(expr) { + // The expression is constant, rewrite the expression to value expression. + valExpr := &ast.ValueExpr{} + valExpr.SetText(expr.Text()) + valExpr.SetType(expr.GetType()) + valExpr.SetValue(val) + return valExpr, true + } + expr.SetValue(val) + } + } + return in, true +} diff --git a/vendor/github.com/pingcap/tidb/optimizer/optimizer.go b/vendor/github.com/pingcap/tidb/optimizer/optimizer.go new file mode 100644 index 000000000..04bf74868 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/optimizer/optimizer.go @@ -0,0 +1,90 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package optimizer + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/optimizer/plan" + "github.com/pingcap/tidb/terror" +) + +// Optimize does optimization and creates a Plan. +// The node must be prepared first. +func Optimize(ctx context.Context, node ast.Node, sb plan.SubQueryBuilder) (plan.Plan, error) { + // We have to infer type again because after parameter is set, the expression type may change. + if err := InferType(node); err != nil { + return nil, errors.Trace(err) + } + if err := logicOptimize(ctx, node); err != nil { + return nil, errors.Trace(err) + } + p, err := plan.BuildPlan(node, sb) + if err != nil { + return nil, errors.Trace(err) + } + err = plan.Refine(p) + if err != nil { + return nil, errors.Trace(err) + } + return p, nil +} + +// Prepare prepares a raw statement parsed from parser. +// The statement must be prepared before it can be passed to optimize function. +// We pass InfoSchema instead of getting from Context in case it is changed after resolving name. +func Prepare(is infoschema.InfoSchema, ctx context.Context, node ast.Node) error { + ast.SetFlag(node) + if err := Preprocess(node, is, ctx); err != nil { + return errors.Trace(err) + } + if err := Validate(node, true); err != nil { + return errors.Trace(err) + } + return nil +} + +// Optimizer error codes. +const ( + CodeOneColumn terror.ErrCode = 1 + CodeSameColumns terror.ErrCode = 2 + CodeMultiWildCard terror.ErrCode = 3 + CodeUnsupported terror.ErrCode = 4 + CodeInvalidGroupFuncUse terror.ErrCode = 5 + CodeIllegalReference terror.ErrCode = 6 +) + +// Optimizer base errors. +var ( + ErrOneColumn = terror.ClassOptimizer.New(CodeOneColumn, "Operand should contain 1 column(s)") + ErrSameColumns = terror.ClassOptimizer.New(CodeSameColumns, "Operands should contain same columns") + ErrMultiWildCard = terror.ClassOptimizer.New(CodeMultiWildCard, "wildcard field exist more than once") + ErrUnSupported = terror.ClassOptimizer.New(CodeUnsupported, "unsupported") + ErrInvalidGroupFuncUse = terror.ClassOptimizer.New(CodeInvalidGroupFuncUse, "Invalid use of group function") + ErrIllegalReference = terror.ClassOptimizer.New(CodeIllegalReference, "Illegal reference") +) + +func init() { + mySQLErrCodes := map[terror.ErrCode]uint16{ + CodeOneColumn: mysql.ErrOperandColumns, + CodeSameColumns: mysql.ErrOperandColumns, + CodeMultiWildCard: mysql.ErrParse, + CodeInvalidGroupFuncUse: mysql.ErrInvalidGroupFuncUse, + CodeIllegalReference: mysql.ErrIllegalReference, + } + terror.ErrClassToMySQLCodes[terror.ClassOptimizer] = mySQLErrCodes +} diff --git a/vendor/github.com/pingcap/tidb/optimizer/plan/cost.go b/vendor/github.com/pingcap/tidb/optimizer/plan/cost.go new file mode 100644 index 000000000..88f80ce04 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/optimizer/plan/cost.go @@ -0,0 +1,109 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package plan + +import ( + "math" +) + +// Pre-defined cost factors. +const ( + FullRangeCount = 10000 + HalfRangeCount = 4000 + MiddleRangeCount = 100 + RowCost = 1.0 + IndexCost = 2.0 + SortCost = 2.0 + FilterRate = 0.5 +) + +// CostEstimator estimates the cost of a plan. +type costEstimator struct { +} + +// Enter implements Visitor Enter interface. +func (c *costEstimator) Enter(p Plan) (Plan, bool) { + return p, false +} + +// Leave implements Visitor Leave interface. +func (c *costEstimator) Leave(p Plan) (Plan, bool) { + switch v := p.(type) { + case *IndexScan: + c.indexScan(v) + case *Limit: + v.rowCount = v.Src().RowCount() + v.startupCost = v.Src().StartupCost() + v.totalCost = v.Src().TotalCost() + case *SelectFields: + if v.Src() != nil { + v.startupCost = v.Src().StartupCost() + v.rowCount = v.Src().RowCount() + v.totalCost = v.Src().TotalCost() + } + case *SelectLock: + v.startupCost = v.Src().StartupCost() + v.rowCount = v.Src().RowCount() + v.totalCost = v.Src().TotalCost() + case *Sort: + // Sort plan must retrieve all the rows before returns the first row. + v.startupCost = v.Src().TotalCost() + v.Src().RowCount()*SortCost + if v.limit == 0 { + v.rowCount = v.Src().RowCount() + } else { + v.rowCount = math.Min(v.Src().RowCount(), v.limit) + } + v.totalCost = v.startupCost + v.rowCount*RowCost + case *TableScan: + c.tableScan(v) + } + return p, true +} + +func (c *costEstimator) tableScan(v *TableScan) { + var rowCount float64 = FullRangeCount + for _, con := range v.AccessConditions { + rowCount *= guesstimateFilterRate(con) + } + v.startupCost = 0 + if v.limit == 0 { + // limit is zero means no limit. + v.rowCount = rowCount + } else { + v.rowCount = math.Min(rowCount, v.limit) + } + v.totalCost = v.rowCount * RowCost +} + +func (c *costEstimator) indexScan(v *IndexScan) { + var rowCount float64 = FullRangeCount + for _, con := range v.AccessConditions { + rowCount *= guesstimateFilterRate(con) + } + v.startupCost = 0 + if v.limit == 0 { + // limit is zero means no limit. + v.rowCount = rowCount + } else { + v.rowCount = math.Min(rowCount, v.limit) + } + v.totalCost = v.rowCount * RowCost +} + +// EstimateCost estimates the cost of the plan. +func EstimateCost(p Plan) float64 { + var estimator costEstimator + p.Accept(&estimator) + return p.TotalCost() +} diff --git a/vendor/github.com/pingcap/tidb/optimizer/plan/filterrate.go b/vendor/github.com/pingcap/tidb/optimizer/plan/filterrate.go new file mode 100644 index 000000000..244309a46 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/optimizer/plan/filterrate.go @@ -0,0 +1,115 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package plan + +import ( + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/parser/opcode" +) + +const ( + rateFull float64 = 1 + rateEqual float64 = 0.01 + rateNotEqual float64 = 0.99 + rateBetween float64 = 0.1 + rateGreaterOrLess float64 = 0.33 + rateIsFalse float64 = 0.1 + rateIsNull float64 = 0.1 + rateLike float64 = 0.1 +) + +// guesstimateFilterRate guesstimates the filter rate for an expression. +// For example: a table has 100 rows, after filter expression 'a between 0 and 9', +// 10 rows returned, then the filter rate is '0.1'. +// It only depends on the expression type, not the expression value. +// The expr parameter should contain only one column name. +func guesstimateFilterRate(expr ast.ExprNode) float64 { + switch x := expr.(type) { + case *ast.BetweenExpr: + return rateBetween + case *ast.BinaryOperationExpr: + return guesstimateBinop(x) + case *ast.ColumnNameExpr: + return rateFull + case *ast.IsNullExpr: + return guesstimateIsNull(x) + case *ast.IsTruthExpr: + return guesstimateIsTrue(x) + case *ast.ParenthesesExpr: + return guesstimateFilterRate(x.Expr) + case *ast.PatternInExpr: + return guesstimatePatternIn(x) + case *ast.PatternLikeExpr: + return guesstimatePatternLike(x) + } + return rateFull +} + +func guesstimateBinop(expr *ast.BinaryOperationExpr) float64 { + switch expr.Op { + case opcode.AndAnd: + // P(A and B) = P(A) * P(B) + return guesstimateFilterRate(expr.L) * guesstimateFilterRate(expr.R) + case opcode.OrOr: + // P(A or B) = P(A) + P(B) – P(A and B) + rateL := guesstimateFilterRate(expr.L) + rateR := guesstimateFilterRate(expr.R) + return rateL + rateR - rateL*rateR + case opcode.EQ: + return rateEqual + case opcode.GT, opcode.GE, opcode.LT, opcode.LE: + return rateGreaterOrLess + case opcode.NE: + return rateNotEqual + } + return rateFull +} + +func guesstimateIsNull(expr *ast.IsNullExpr) float64 { + if expr.Not { + return rateFull - rateIsNull + } + return rateIsNull +} + +func guesstimateIsTrue(expr *ast.IsTruthExpr) float64 { + if expr.True == 0 { + if expr.Not { + return rateFull - rateIsFalse + } + return rateIsFalse + } + if expr.Not { + return rateIsFalse + rateIsNull + } + return rateFull - rateIsFalse - rateIsNull +} + +func guesstimatePatternIn(expr *ast.PatternInExpr) float64 { + if len(expr.List) > 0 { + rate := rateEqual * float64(len(expr.List)) + if expr.Not { + return rateFull - rate + } + return rate + } + return rateFull +} + +func guesstimatePatternLike(expr *ast.PatternLikeExpr) float64 { + if expr.Not { + return rateFull - rateLike + } + return rateLike +} diff --git a/vendor/github.com/pingcap/tidb/optimizer/plan/plan.go b/vendor/github.com/pingcap/tidb/optimizer/plan/plan.go new file mode 100644 index 000000000..02ac6369a --- /dev/null +++ b/vendor/github.com/pingcap/tidb/optimizer/plan/plan.go @@ -0,0 +1,127 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package plan + +import ( + "math" + + "github.com/pingcap/tidb/ast" +) + +// Plan is a description of an execution flow. +// It is created from ast.Node first, then optimized by optimizer, +// then used by executor to create a Cursor which executes the statement. +type Plan interface { + // Accept a visitor, implementation should call Visitor.Enter first, + // then call children Accept methods, finally call Visitor.Leave. + Accept(v Visitor) (out Plan, ok bool) + // Fields returns the result fields of the plan. + Fields() []*ast.ResultField + // SetFields sets the results fields of the plan. + SetFields(fields []*ast.ResultField) + // The cost before returning fhe first row. + StartupCost() float64 + // The cost after returning all the rows. + TotalCost() float64 + // The expected row count. + RowCount() float64 + // SetLimit is used to push limit to upstream to estimate the cost. + SetLimit(limit float64) +} + +// WithSrcPlan is a Plan has a source Plan. +type WithSrcPlan interface { + Plan + Src() Plan + SetSrc(src Plan) +} + +// Visitor visits a Plan. +type Visitor interface { + // Enter is called before visit children. + // The out plan should be of exactly the same type as the in plan. + // if skipChildren is true, the children should not be visited. + Enter(in Plan) (out Plan, skipChildren bool) + + // Leave is called after children has been visited, the out Plan can + // be another type, this is different than ast.Visitor Leave, because + // Plans only contain children plans as Plan interface type, so it is safe + // to return a different type of plan. + Leave(in Plan) (out Plan, ok bool) +} + +// basePlan implements base Plan interface. +// Should be used as embedded struct in Plan implementations. +type basePlan struct { + fields []*ast.ResultField + startupCost float64 + totalCost float64 + rowCount float64 + limit float64 +} + +// StartupCost implements Plan StartupCost interface. +func (p *basePlan) StartupCost() float64 { + return p.startupCost +} + +// TotalCost implements Plan TotalCost interface. +func (p *basePlan) TotalCost() float64 { + return p.totalCost +} + +// RowCount implements Plan RowCount interface. +func (p *basePlan) RowCount() float64 { + if p.limit == 0 { + return p.rowCount + } + return math.Min(p.rowCount, p.limit) +} + +// SetLimit implements Plan SetLimit interface. +func (p *basePlan) SetLimit(limit float64) { + p.limit = limit +} + +// Fields implements Plan Fields interface. +func (p *basePlan) Fields() []*ast.ResultField { + return p.fields +} + +// SetFields implements Plan SetFields interface. +func (p *basePlan) SetFields(fields []*ast.ResultField) { + p.fields = fields +} + +// srcPlan implements base PlanWithSrc interface. +type planWithSrc struct { + basePlan + src Plan +} + +// Src implements PlanWithSrc interface. +func (p *planWithSrc) Src() Plan { + return p.src +} + +// SetSrc implements PlanWithSrc interface. +func (p *planWithSrc) SetSrc(src Plan) { + p.src = src +} + +// SetLimit implements Plan interface. +func (p *planWithSrc) SetLimit(limit float64) { + p.limit = limit + p.src.SetLimit(limit) +} diff --git a/vendor/github.com/pingcap/tidb/optimizer/plan/planbuilder.go b/vendor/github.com/pingcap/tidb/optimizer/plan/planbuilder.go new file mode 100644 index 000000000..74f4da7b6 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/optimizer/plan/planbuilder.go @@ -0,0 +1,926 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package plan + +import ( + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/parser/opcode" + "github.com/pingcap/tidb/terror" + "github.com/pingcap/tidb/util/charset" + "github.com/pingcap/tidb/util/types" +) + +// Error instances. +var ( + ErrUnsupportedType = terror.ClassOptimizerPlan.New(CodeUnsupportedType, "Unsupported type") +) + +// Error codes. +const ( + CodeUnsupportedType terror.ErrCode = 1 +) + +// BuildPlan builds a plan from a node. +// It returns ErrUnsupportedType if ast.Node type is not supported yet. +func BuildPlan(node ast.Node, sb SubQueryBuilder) (Plan, error) { + builder := planBuilder{sb: sb} + p := builder.build(node) + return p, builder.err +} + +// planBuilder builds Plan from an ast.Node. +// It just builds the ast node straightforwardly. +type planBuilder struct { + err error + hasAgg bool + sb SubQueryBuilder + obj interface{} +} + +func (b *planBuilder) build(node ast.Node) Plan { + switch x := node.(type) { + case *ast.AdminStmt: + return b.buildAdmin(x) + case *ast.AlterTableStmt: + return b.buildDDL(x) + case *ast.CreateDatabaseStmt: + return b.buildDDL(x) + case *ast.CreateIndexStmt: + return b.buildDDL(x) + case *ast.CreateTableStmt: + return b.buildDDL(x) + case *ast.DeallocateStmt: + return &Deallocate{Name: x.Name} + case *ast.DeleteStmt: + return b.buildDelete(x) + case *ast.DropDatabaseStmt: + return b.buildDDL(x) + case *ast.DropIndexStmt: + return b.buildDDL(x) + case *ast.DropTableStmt: + return b.buildDDL(x) + case *ast.ExecuteStmt: + return &Execute{Name: x.Name, UsingVars: x.UsingVars} + case *ast.ExplainStmt: + return b.buildExplain(x) + case *ast.InsertStmt: + return b.buildInsert(x) + case *ast.PrepareStmt: + return b.buildPrepare(x) + case *ast.SelectStmt: + return b.buildSelect(x) + case *ast.UnionStmt: + return b.buildUnion(x) + case *ast.UpdateStmt: + return b.buildUpdate(x) + case *ast.UseStmt: + return b.buildSimple(x) + case *ast.SetCharsetStmt: + return b.buildSimple(x) + case *ast.SetStmt: + return b.buildSimple(x) + case *ast.ShowStmt: + return b.buildShow(x) + case *ast.DoStmt: + return b.buildSimple(x) + case *ast.BeginStmt: + return b.buildSimple(x) + case *ast.CommitStmt: + return b.buildSimple(x) + case *ast.RollbackStmt: + return b.buildSimple(x) + case *ast.CreateUserStmt: + return b.buildSimple(x) + case *ast.SetPwdStmt: + return b.buildSimple(x) + case *ast.GrantStmt: + return b.buildSimple(x) + case *ast.TruncateTableStmt: + return b.buildDDL(x) + } + b.err = ErrUnsupportedType.Gen("Unsupported type %T", node) + return nil +} + +// Detect aggregate function or groupby clause. +func (b *planBuilder) detectSelectAgg(sel *ast.SelectStmt) bool { + if sel.GroupBy != nil { + return true + } + for _, f := range sel.GetResultFields() { + if ast.HasAggFlag(f.Expr) { + return true + } + } + if sel.Having != nil { + if ast.HasAggFlag(sel.Having.Expr) { + return true + } + } + if sel.OrderBy != nil { + for _, item := range sel.OrderBy.Items { + if ast.HasAggFlag(item.Expr) { + return true + } + } + } + return false +} + +// extractSelectAgg extracts aggregate functions and converts ColumnNameExpr to aggregate function. +func (b *planBuilder) extractSelectAgg(sel *ast.SelectStmt) []*ast.AggregateFuncExpr { + extractor := &ast.AggregateFuncExtractor{AggFuncs: make([]*ast.AggregateFuncExpr, 0)} + for _, f := range sel.GetResultFields() { + n, ok := f.Expr.Accept(extractor) + if !ok { + b.err = errors.New("Failed to extract agg expr!") + return nil + } + ve, ok := f.Expr.(*ast.ValueExpr) + if ok && len(f.Column.Name.O) > 0 { + agg := &ast.AggregateFuncExpr{ + F: ast.AggFuncFirstRow, + Args: []ast.ExprNode{ve}, + } + extractor.AggFuncs = append(extractor.AggFuncs, agg) + n = agg + } + f.Expr = n.(ast.ExprNode) + } + // Extract agg funcs from having clause. + if sel.Having != nil { + n, ok := sel.Having.Expr.Accept(extractor) + if !ok { + b.err = errors.New("Failed to extract agg expr from having clause") + return nil + } + sel.Having.Expr = n.(ast.ExprNode) + } + // Extract agg funcs from orderby clause. + if sel.OrderBy != nil { + for _, item := range sel.OrderBy.Items { + n, ok := item.Expr.Accept(extractor) + if !ok { + b.err = errors.New("Failed to extract agg expr from orderby clause") + return nil + } + item.Expr = n.(ast.ExprNode) + // If item is PositionExpr, we need to rebind it. + // For PositionExpr will refer to a ResultField in fieldlist. + // After extract AggExpr from fieldlist, it may be changed (See the code above). + if pe, ok := item.Expr.(*ast.PositionExpr); ok { + pe.Refer = sel.GetResultFields()[pe.N-1] + } + } + } + return extractor.AggFuncs +} + +func (b *planBuilder) buildSubquery(n ast.Node) { + sv := &subqueryVisitor{ + builder: b, + } + _, ok := n.Accept(sv) + if !ok { + log.Errorf("Extract subquery error") + } +} + +func (b *planBuilder) buildSelect(sel *ast.SelectStmt) Plan { + var aggFuncs []*ast.AggregateFuncExpr + hasAgg := b.detectSelectAgg(sel) + if hasAgg { + aggFuncs = b.extractSelectAgg(sel) + } + // Build subquery + // Convert subquery to expr with plan + b.buildSubquery(sel) + var p Plan + if sel.From != nil { + p = b.buildFrom(sel) + if b.err != nil { + return nil + } + if sel.LockTp != ast.SelectLockNone { + p = b.buildSelectLock(p, sel.LockTp) + if b.err != nil { + return nil + } + } + if hasAgg { + p = b.buildAggregate(p, aggFuncs, sel.GroupBy) + } + p = b.buildSelectFields(p, sel.GetResultFields()) + if b.err != nil { + return nil + } + } else { + if hasAgg { + p = b.buildAggregate(p, aggFuncs, nil) + } + p = b.buildSelectFields(p, sel.GetResultFields()) + if b.err != nil { + return nil + } + } + if sel.Having != nil { + p = b.buildHaving(p, sel.Having) + if b.err != nil { + return nil + } + } + if sel.Distinct { + p = b.buildDistinct(p) + if b.err != nil { + return nil + } + } + if sel.OrderBy != nil && !matchOrder(p, sel.OrderBy.Items) { + p = b.buildSort(p, sel.OrderBy.Items) + if b.err != nil { + return nil + } + } + if sel.Limit != nil { + p = b.buildLimit(p, sel.Limit) + if b.err != nil { + return nil + } + } + return p +} + +func (b *planBuilder) buildFrom(sel *ast.SelectStmt) Plan { + from := sel.From.TableRefs + if from.Right == nil { + return b.buildSingleTable(sel) + } + return b.buildJoin(sel) +} + +func (b *planBuilder) buildSingleTable(sel *ast.SelectStmt) Plan { + from := sel.From.TableRefs + ts, ok := from.Left.(*ast.TableSource) + if !ok { + b.err = ErrUnsupportedType.Gen("Unsupported type %T", from.Left) + return nil + } + var bestPlan Plan + switch v := ts.Source.(type) { + case *ast.TableName: + case *ast.SelectStmt: + bestPlan = b.buildSelect(v) + } + if bestPlan != nil { + return bestPlan + } + tn, ok := ts.Source.(*ast.TableName) + if !ok { + b.err = ErrUnsupportedType.Gen("Unsupported type %T", ts.Source) + return nil + } + conditions := splitWhere(sel.Where) + path := &joinPath{table: tn, conditions: conditions} + candidates := b.buildAllAccessMethodsPlan(path) + var lowestCost float64 + for _, v := range candidates { + cost := EstimateCost(b.buildPseudoSelectPlan(v, sel)) + if bestPlan == nil { + bestPlan = v + lowestCost = cost + } + if cost < lowestCost { + bestPlan = v + lowestCost = cost + } + } + return bestPlan +} + +func (b *planBuilder) buildAllAccessMethodsPlan(path *joinPath) []Plan { + var candidates []Plan + p := b.buildTableScanPlan(path) + candidates = append(candidates, p) + for _, index := range path.table.TableInfo.Indices { + ip := b.buildIndexScanPlan(index, path) + candidates = append(candidates, ip) + } + return candidates +} + +func (b *planBuilder) buildTableScanPlan(path *joinPath) Plan { + tn := path.table + p := &TableScan{ + Table: tn.TableInfo, + } + // Equal condition contains a column from previous joined table. + p.RefAccess = len(path.eqConds) > 0 + p.SetFields(tn.GetResultFields()) + var pkName model.CIStr + if p.Table.PKIsHandle { + for _, colInfo := range p.Table.Columns { + if mysql.HasPriKeyFlag(colInfo.Flag) { + pkName = colInfo.Name + } + } + } + for _, con := range path.conditions { + if pkName.L != "" { + checker := conditionChecker{tableName: tn.TableInfo.Name, pkName: pkName} + if checker.check(con) { + p.AccessConditions = append(p.AccessConditions, con) + } else { + p.FilterConditions = append(p.FilterConditions, con) + } + } else { + p.FilterConditions = append(p.FilterConditions, con) + } + } + return p +} + +func (b *planBuilder) buildIndexScanPlan(index *model.IndexInfo, path *joinPath) Plan { + tn := path.table + ip := &IndexScan{Table: tn.TableInfo, Index: index} + ip.RefAccess = len(path.eqConds) > 0 + ip.SetFields(tn.GetResultFields()) + + condMap := map[ast.ExprNode]bool{} + for _, con := range path.conditions { + condMap[con] = true + } +out: + // Build equal access conditions first. + // Starts from the first index column, if equal condition is found, add it to access conditions, + // proceed to the next index column. until we can't find any equal condition for the column. + for ip.AccessEqualCount < len(index.Columns) { + for con := range condMap { + binop, ok := con.(*ast.BinaryOperationExpr) + if !ok || binop.Op != opcode.EQ { + continue + } + if ast.IsPreEvaluable(binop.L) { + binop.L, binop.R = binop.R, binop.L + } + if !ast.IsPreEvaluable(binop.R) { + continue + } + cn, ok2 := binop.L.(*ast.ColumnNameExpr) + if !ok2 || cn.Refer.Column.Name.L != index.Columns[ip.AccessEqualCount].Name.L { + continue + } + ip.AccessConditions = append(ip.AccessConditions, con) + delete(condMap, con) + ip.AccessEqualCount++ + continue out + } + break + } + + for con := range condMap { + if ip.AccessEqualCount < len(ip.Index.Columns) { + // Try to add non-equal access condition for index column at AccessEqualCount. + checker := conditionChecker{tableName: tn.TableInfo.Name, idx: index, columnOffset: ip.AccessEqualCount} + if checker.check(con) { + ip.AccessConditions = append(ip.AccessConditions, con) + } else { + ip.FilterConditions = append(ip.FilterConditions, con) + } + } else { + ip.FilterConditions = append(ip.FilterConditions, con) + } + } + return ip +} + +// buildPseudoSelectPlan pre-builds more complete plans that may affect total cost. +func (b *planBuilder) buildPseudoSelectPlan(p Plan, sel *ast.SelectStmt) Plan { + if sel.OrderBy == nil { + return p + } + if sel.GroupBy != nil { + return p + } + if !matchOrder(p, sel.OrderBy.Items) { + np := &Sort{ByItems: sel.OrderBy.Items} + np.SetSrc(p) + p = np + } + if sel.Limit != nil { + np := &Limit{Offset: sel.Limit.Offset, Count: sel.Limit.Count} + np.SetSrc(p) + np.SetLimit(0) + p = np + } + return p +} + +func (b *planBuilder) buildSelectLock(src Plan, lock ast.SelectLockType) *SelectLock { + selectLock := &SelectLock{ + Lock: lock, + } + selectLock.SetSrc(src) + selectLock.SetFields(src.Fields()) + return selectLock +} + +func (b *planBuilder) buildSelectFields(src Plan, fields []*ast.ResultField) Plan { + selectFields := &SelectFields{} + selectFields.SetSrc(src) + selectFields.SetFields(fields) + return selectFields +} + +func (b *planBuilder) buildAggregate(src Plan, aggFuncs []*ast.AggregateFuncExpr, groupby *ast.GroupByClause) Plan { + // Add aggregate plan. + aggPlan := &Aggregate{ + AggFuncs: aggFuncs, + } + aggPlan.SetSrc(src) + if src != nil { + aggPlan.SetFields(src.Fields()) + } + if groupby != nil { + aggPlan.GroupByItems = groupby.Items + } + return aggPlan +} + +func (b *planBuilder) buildHaving(src Plan, having *ast.HavingClause) Plan { + p := &Having{ + Conditions: splitWhere(having.Expr), + } + p.SetSrc(src) + p.SetFields(src.Fields()) + return p +} + +func (b *planBuilder) buildSort(src Plan, byItems []*ast.ByItem) Plan { + sort := &Sort{ + ByItems: byItems, + } + sort.SetSrc(src) + sort.SetFields(src.Fields()) + return sort +} + +func (b *planBuilder) buildLimit(src Plan, limit *ast.Limit) Plan { + li := &Limit{ + Offset: limit.Offset, + Count: limit.Count, + } + li.SetSrc(src) + li.SetFields(src.Fields()) + return li +} + +func (b *planBuilder) buildPrepare(x *ast.PrepareStmt) Plan { + p := &Prepare{ + Name: x.Name, + } + if x.SQLVar != nil { + p.SQLText, _ = x.SQLVar.GetValue().(string) + } else { + p.SQLText = x.SQLText + } + return p +} + +func (b *planBuilder) buildAdmin(as *ast.AdminStmt) Plan { + var p Plan + + switch as.Tp { + case ast.AdminCheckTable: + p = &CheckTable{Tables: as.Tables} + case ast.AdminShowDDL: + p = &ShowDDL{} + p.SetFields(buildShowDDLFields()) + default: + b.err = ErrUnsupportedType.Gen("Unsupported type %T", as) + } + + return p +} + +func buildShowDDLFields() []*ast.ResultField { + rfs := make([]*ast.ResultField, 0, 6) + rfs = append(rfs, buildResultField("", "SCHEMA_VER", mysql.TypeLonglong, 4)) + rfs = append(rfs, buildResultField("", "OWNER", mysql.TypeVarchar, 64)) + rfs = append(rfs, buildResultField("", "JOB", mysql.TypeVarchar, 128)) + rfs = append(rfs, buildResultField("", "BG_SCHEMA_VER", mysql.TypeLonglong, 4)) + rfs = append(rfs, buildResultField("", "BG_OWNER", mysql.TypeVarchar, 64)) + rfs = append(rfs, buildResultField("", "BG_JOB", mysql.TypeVarchar, 128)) + + return rfs +} + +func buildResultField(tableName, name string, tp byte, size int) *ast.ResultField { + cs := charset.CharsetBin + cl := charset.CharsetBin + flag := mysql.UnsignedFlag + if tp == mysql.TypeVarchar || tp == mysql.TypeBlob { + cs = mysql.DefaultCharset + cl = mysql.DefaultCollationName + flag = 0 + } + + fieldType := types.FieldType{ + Charset: cs, + Collate: cl, + Tp: tp, + Flen: size, + Flag: uint(flag), + } + colInfo := &model.ColumnInfo{ + Name: model.NewCIStr(name), + FieldType: fieldType, + } + expr := &ast.ValueExpr{} + expr.SetType(&fieldType) + + return &ast.ResultField{ + Column: colInfo, + ColumnAsName: colInfo.Name, + TableAsName: model.NewCIStr(tableName), + DBName: model.NewCIStr(infoschema.Name), + Expr: expr, + } +} + +// matchOrder checks if the plan has the same ordering as items. +func matchOrder(p Plan, items []*ast.ByItem) bool { + switch x := p.(type) { + case *Aggregate: + return false + case *IndexScan: + if len(items) > len(x.Index.Columns) { + return false + } + for i, item := range items { + if item.Desc { + return false + } + var rf *ast.ResultField + switch y := item.Expr.(type) { + case *ast.ColumnNameExpr: + rf = y.Refer + case *ast.PositionExpr: + rf = y.Refer + default: + return false + } + if rf.Table.Name.L != x.Table.Name.L || rf.Column.Name.L != x.Index.Columns[i].Name.L { + return false + } + } + return true + case *TableScan: + if len(items) != 1 || !x.Table.PKIsHandle { + return false + } + if items[0].Desc { + return false + } + var refer *ast.ResultField + switch x := items[0].Expr.(type) { + case *ast.ColumnNameExpr: + refer = x.Refer + case *ast.PositionExpr: + refer = x.Refer + default: + return false + } + if mysql.HasPriKeyFlag(refer.Column.Flag) { + return true + } + return false + case *JoinOuter: + return false + case *JoinInner: + return false + case *Sort: + // Sort plan should not be checked here as there should only be one sort plan in a plan tree. + return false + case WithSrcPlan: + return matchOrder(x.Src(), items) + } + return true +} + +// splitWhere split a where expression to a list of AND conditions. +func splitWhere(where ast.ExprNode) []ast.ExprNode { + var conditions []ast.ExprNode + switch x := where.(type) { + case nil: + case *ast.BinaryOperationExpr: + if x.Op == opcode.AndAnd { + conditions = append(conditions, splitWhere(x.L)...) + conditions = append(conditions, splitWhere(x.R)...) + } else { + conditions = append(conditions, x) + } + case *ast.ParenthesesExpr: + conditions = append(conditions, splitWhere(x.Expr)...) + default: + conditions = append(conditions, where) + } + return conditions +} + +// SubQueryBuilder is the interface for building SubQuery executor. +type SubQueryBuilder interface { + Build(p Plan) ast.SubqueryExec +} + +// subqueryVisitor visits AST and handles SubqueryExpr. +type subqueryVisitor struct { + builder *planBuilder +} + +func (se *subqueryVisitor) Enter(in ast.Node) (out ast.Node, skipChildren bool) { + switch x := in.(type) { + case *ast.SubqueryExpr: + p := se.builder.build(x.Query) + // The expr pointor is copyed into ResultField when running name resolver. + // So we can not just replace the expr node in AST. We need to put SubQuery into the expr. + // See: optimizer.nameResolver.createResultFields() + x.SubqueryExec = se.builder.sb.Build(p) + return in, true + case *ast.Join: + // SubSelect in from clause will be handled in buildJoin(). + return in, true + } + return in, false +} + +func (se *subqueryVisitor) Leave(in ast.Node) (out ast.Node, ok bool) { + return in, true +} + +func (b *planBuilder) buildUnion(union *ast.UnionStmt) Plan { + sels := make([]Plan, len(union.SelectList.Selects)) + for i, sel := range union.SelectList.Selects { + sels[i] = b.buildSelect(sel) + } + var p Plan + p = &Union{ + Selects: sels, + } + unionFields := union.GetResultFields() + for _, sel := range sels { + for i, f := range sel.Fields() { + if i == len(unionFields) { + b.err = errors.New("The used SELECT statements have a different number of columns") + return nil + } + uField := unionFields[i] + /* + * The lengths of the columns in the UNION result take into account the values retrieved by all of the SELECT statements + * SELECT REPEAT('a',1) UNION SELECT REPEAT('b',10); + * +---------------+ + * | REPEAT('a',1) | + * +---------------+ + * | a | + * | bbbbbbbbbb | + * +---------------+ + */ + if f.Column.Flen > uField.Column.Flen { + uField.Column.Flen = f.Column.Flen + } + // For select nul union select "abc", we should not convert "abc" to nil. + // And the result field type should be VARCHAR. + if uField.Column.Tp == 0 || uField.Column.Tp == mysql.TypeNull { + uField.Column.Tp = f.Column.Tp + } + } + } + for _, v := range unionFields { + v.Expr.SetType(&v.Column.FieldType) + } + + p.SetFields(unionFields) + if union.Distinct { + p = b.buildDistinct(p) + } + if union.OrderBy != nil { + p = b.buildSort(p, union.OrderBy.Items) + } + if union.Limit != nil { + p = b.buildLimit(p, union.Limit) + } + return p +} + +func (b *planBuilder) buildDistinct(src Plan) Plan { + d := &Distinct{} + d.src = src + d.SetFields(src.Fields()) + return d +} + +func (b *planBuilder) buildUpdate(update *ast.UpdateStmt) Plan { + sel := &ast.SelectStmt{From: update.TableRefs, Where: update.Where, OrderBy: update.Order, Limit: update.Limit} + p := b.buildFrom(sel) + if sel.OrderBy != nil && !matchOrder(p, sel.OrderBy.Items) { + p = b.buildSort(p, sel.OrderBy.Items) + if b.err != nil { + return nil + } + } + if sel.Limit != nil { + p = b.buildLimit(p, sel.Limit) + if b.err != nil { + return nil + } + } + orderedList := b.buildUpdateLists(update.List, p.Fields()) + if b.err != nil { + return nil + } + return &Update{OrderedList: orderedList, SelectPlan: p} +} + +func (b *planBuilder) buildUpdateLists(list []*ast.Assignment, fields []*ast.ResultField) []*ast.Assignment { + newList := make([]*ast.Assignment, len(fields)) + for _, assign := range list { + offset, err := columnOffsetInFields(assign.Column, fields) + if err != nil { + b.err = errors.Trace(err) + return nil + } + newList[offset] = assign + } + return newList +} + +func (b *planBuilder) buildDelete(del *ast.DeleteStmt) Plan { + sel := &ast.SelectStmt{From: del.TableRefs, Where: del.Where, OrderBy: del.Order, Limit: del.Limit} + p := b.buildFrom(sel) + if sel.OrderBy != nil && !matchOrder(p, sel.OrderBy.Items) { + p = b.buildSort(p, sel.OrderBy.Items) + if b.err != nil { + return nil + } + } + if sel.Limit != nil { + p = b.buildLimit(p, sel.Limit) + if b.err != nil { + return nil + } + } + var tables []*ast.TableName + if del.Tables != nil { + tables = del.Tables.Tables + } + return &Delete{ + Tables: tables, + IsMultiTable: del.IsMultiTable, + SelectPlan: p, + } +} + +func columnOffsetInFields(cn *ast.ColumnName, fields []*ast.ResultField) (int, error) { + offset := -1 + tableNameL := cn.Table.L + columnNameL := cn.Name.L + if tableNameL != "" { + for i, f := range fields { + // Check table name. + if f.TableAsName.L != "" { + if tableNameL != f.TableAsName.L { + continue + } + } else { + if tableNameL != f.Table.Name.L { + continue + } + } + // Check column name. + if f.ColumnAsName.L != "" { + if columnNameL != f.ColumnAsName.L { + continue + } + } else { + if columnNameL != f.Column.Name.L { + continue + } + } + + offset = i + } + } else { + for i, f := range fields { + matchAsName := f.ColumnAsName.L != "" && f.ColumnAsName.L == columnNameL + matchColumnName := f.ColumnAsName.L == "" && f.Column.Name.L == columnNameL + if matchAsName || matchColumnName { + if offset != -1 { + return -1, errors.Errorf("column %s is ambiguous.", cn.Name.O) + } + offset = i + } + } + } + if offset == -1 { + return -1, errors.Errorf("column %s not found", cn.Name.O) + } + return offset, nil +} + +func (b *planBuilder) buildShow(show *ast.ShowStmt) Plan { + var p Plan + p = &Show{ + Tp: show.Tp, + DBName: show.DBName, + Table: show.Table, + Column: show.Column, + Flag: show.Flag, + Full: show.Full, + User: show.User, + } + p.SetFields(show.GetResultFields()) + var conditions []ast.ExprNode + if show.Pattern != nil { + conditions = append(conditions, show.Pattern) + } + if show.Where != nil { + conditions = append(conditions, show.Where) + } + if len(conditions) != 0 { + filter := &Filter{Conditions: conditions} + filter.SetSrc(p) + p = filter + } + return p +} + +func (b *planBuilder) buildSimple(node ast.StmtNode) Plan { + return &Simple{Statement: node} +} + +func (b *planBuilder) buildInsert(insert *ast.InsertStmt) Plan { + insertPlan := &Insert{ + Table: insert.Table, + Columns: insert.Columns, + Lists: insert.Lists, + Setlist: insert.Setlist, + OnDuplicate: insert.OnDuplicate, + IsReplace: insert.IsReplace, + Priority: insert.Priority, + } + if insert.Select != nil { + insertPlan.SelectPlan = b.build(insert.Select) + if b.err != nil { + return nil + } + } + return insertPlan +} + +func (b *planBuilder) buildDDL(node ast.DDLNode) Plan { + return &DDL{Statement: node} +} + +func (b *planBuilder) buildExplain(explain *ast.ExplainStmt) Plan { + if show, ok := explain.Stmt.(*ast.ShowStmt); ok { + return b.buildShow(show) + } + targetPlan := b.build(explain.Stmt) + if b.err != nil { + return nil + } + p := &Explain{StmtPlan: targetPlan} + p.SetFields(buildExplainFields()) + return p +} + +// See: https://dev.mysql.com/doc/refman/5.7/en/explain-output.html +func buildExplainFields() []*ast.ResultField { + rfs := make([]*ast.ResultField, 0, 10) + rfs = append(rfs, buildResultField("", "id", mysql.TypeLonglong, 4)) + rfs = append(rfs, buildResultField("", "select_type", mysql.TypeVarchar, 128)) + rfs = append(rfs, buildResultField("", "table", mysql.TypeVarchar, 128)) + rfs = append(rfs, buildResultField("", "type", mysql.TypeVarchar, 128)) + rfs = append(rfs, buildResultField("", "possible_keys", mysql.TypeVarchar, 128)) + rfs = append(rfs, buildResultField("", "key", mysql.TypeVarchar, 128)) + rfs = append(rfs, buildResultField("", "key_len", mysql.TypeVarchar, 128)) + rfs = append(rfs, buildResultField("", "ref", mysql.TypeVarchar, 128)) + rfs = append(rfs, buildResultField("", "rows", mysql.TypeVarchar, 128)) + rfs = append(rfs, buildResultField("", "Extra", mysql.TypeVarchar, 128)) + return rfs +} diff --git a/vendor/github.com/pingcap/tidb/optimizer/plan/planbuilder_join.go b/vendor/github.com/pingcap/tidb/optimizer/plan/planbuilder_join.go new file mode 100644 index 000000000..964cb850d --- /dev/null +++ b/vendor/github.com/pingcap/tidb/optimizer/plan/planbuilder_join.go @@ -0,0 +1,795 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package plan + +import ( + "strings" + + "github.com/ngaut/log" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/parser/opcode" +) + +// equalCond represents an equivalent join condition, like "t1.c1 = t2.c1". +type equalCond struct { + left *ast.ResultField + leftIdx bool + right *ast.ResultField + rightIdx bool +} + +func newEqualCond(left, right *ast.ResultField) *equalCond { + eq := &equalCond{left: left, right: right} + eq.leftIdx = equivHasIndex(eq.left) + eq.rightIdx = equivHasIndex(eq.right) + return eq +} + +func equivHasIndex(rf *ast.ResultField) bool { + if rf.Table.PKIsHandle && mysql.HasPriKeyFlag(rf.Column.Flag) { + return true + } + for _, idx := range rf.Table.Indices { + if len(idx.Columns) == 1 && idx.Columns[0].Name.L == rf.Column.Name.L { + return true + } + } + return false +} + +// joinPath can be a single table path, inner join or outer join. +type joinPath struct { + // for table path + table *ast.TableName + totalFilterRate float64 + + // for subquery + subquery ast.Node + asName model.CIStr + + neighborCount int // number of neighbor table. + idxDepCount int // number of paths this table depends on. + ordering *ast.ResultField + orderingDesc bool + + // for outer join path + outer *joinPath + inner *joinPath + rightJoin bool + + // for inner join path + inners []*joinPath + + // common + parent *joinPath + filterRate float64 + conditions []ast.ExprNode + eqConds []*equalCond + // The joinPaths that this path's index depends on. + idxDeps map[*joinPath]bool + neighbors map[*joinPath]bool +} + +// newTablePath creates a new table join path. +func newTablePath(table *ast.TableName) *joinPath { + return &joinPath{ + table: table, + filterRate: rateFull, + } +} + +// newSubqueryPath creates a new subquery join path. +func newSubqueryPath(node ast.Node, asName model.CIStr) *joinPath { + return &joinPath{ + subquery: node, + asName: asName, + filterRate: rateFull, + } +} + +// newOuterJoinPath creates a new outer join path and pushes on condition to children paths. +// The returned joinPath slice has one element. +func newOuterJoinPath(isRightJoin bool, leftPath, rightPath *joinPath, on *ast.OnCondition) *joinPath { + outerJoin := &joinPath{rightJoin: isRightJoin, outer: leftPath, inner: rightPath, filterRate: 1} + leftPath.parent = outerJoin + rightPath.parent = outerJoin + if isRightJoin { + outerJoin.outer, outerJoin.inner = outerJoin.inner, outerJoin.outer + } + if on != nil { + conditions := splitWhere(on.Expr) + availablePaths := []*joinPath{outerJoin.outer} + for _, con := range conditions { + if !outerJoin.inner.attachCondition(con, availablePaths) { + log.Errorf("Inner failed to attach ON condition") + } + } + } + return outerJoin +} + +// newInnerJoinPath creates inner join path and pushes on condition to children paths. +// If left path or right path is also inner join, it will be merged. +func newInnerJoinPath(leftPath, rightPath *joinPath, on *ast.OnCondition) *joinPath { + var innerJoin *joinPath + if len(leftPath.inners) != 0 { + innerJoin = leftPath + } else { + innerJoin = &joinPath{filterRate: leftPath.filterRate} + innerJoin.inners = append(innerJoin.inners, leftPath) + } + if len(rightPath.inners) != 0 { + innerJoin.inners = append(innerJoin.inners, rightPath.inners...) + innerJoin.conditions = append(innerJoin.conditions, rightPath.conditions...) + } else { + innerJoin.inners = append(innerJoin.inners, rightPath) + } + innerJoin.filterRate *= rightPath.filterRate + + for _, in := range innerJoin.inners { + in.parent = innerJoin + } + + if on != nil { + conditions := splitWhere(on.Expr) + for _, con := range conditions { + if !innerJoin.attachCondition(con, nil) { + innerJoin.conditions = append(innerJoin.conditions, con) + } + } + } + return innerJoin +} + +func (p *joinPath) resultFields() []*ast.ResultField { + if p.table != nil { + return p.table.GetResultFields() + } + if p.outer != nil { + if p.rightJoin { + return append(p.inner.resultFields(), p.outer.resultFields()...) + } + return append(p.outer.resultFields(), p.inner.resultFields()...) + } + var rfs []*ast.ResultField + for _, in := range p.inners { + rfs = append(rfs, in.resultFields()...) + } + return rfs +} + +// attachCondition tries to attach a condition as deep as possible. +// availablePaths are paths join before this path. +func (p *joinPath) attachCondition(condition ast.ExprNode, availablePaths []*joinPath) (attached bool) { + filterRate := guesstimateFilterRate(condition) + // table + if p.table != nil || p.subquery != nil { + attacher := conditionAttachChecker{targetPath: p, availablePaths: availablePaths} + condition.Accept(&attacher) + if attacher.invalid { + return false + } + p.conditions = append(p.conditions, condition) + p.filterRate *= filterRate + return true + } + // inner join + if len(p.inners) > 0 { + for _, in := range p.inners { + if in.attachCondition(condition, availablePaths) { + p.filterRate *= filterRate + return true + } + } + attacher := &conditionAttachChecker{targetPath: p, availablePaths: availablePaths} + condition.Accept(attacher) + if attacher.invalid { + return false + } + p.conditions = append(p.conditions, condition) + p.filterRate *= filterRate + return true + } + + // outer join + if p.outer.attachCondition(condition, availablePaths) { + p.filterRate *= filterRate + return true + } + if p.inner.attachCondition(condition, append(availablePaths, p.outer)) { + p.filterRate *= filterRate + return true + } + return false +} + +func (p *joinPath) containsTable(table *ast.TableName) bool { + if p.table != nil { + return p.table == table + } + if p.subquery != nil { + return p.asName.L == table.Name.L + } + if len(p.inners) != 0 { + for _, in := range p.inners { + if in.containsTable(table) { + return true + } + } + return false + } + + return p.outer.containsTable(table) || p.inner.containsTable(table) +} + +// attachEqualCond tries to attach an equalCond deep into a table path if applicable. +func (p *joinPath) attachEqualCond(eqCon *equalCond, availablePaths []*joinPath) (attached bool) { + // table + if p.table != nil { + var prevTable *ast.TableName + var needSwap bool + if eqCon.left.TableName == p.table { + prevTable = eqCon.right.TableName + } else if eqCon.right.TableName == p.table { + prevTable = eqCon.left.TableName + needSwap = true + } + if prevTable != nil { + for _, prev := range availablePaths { + if prev.containsTable(prevTable) { + if needSwap { + eqCon.left, eqCon.right = eqCon.right, eqCon.left + eqCon.leftIdx, eqCon.rightIdx = eqCon.rightIdx, eqCon.leftIdx + } + p.eqConds = append(p.eqConds, eqCon) + return true + } + } + } + return false + } + + // inner join + if len(p.inners) > 0 { + for _, in := range p.inners { + if in.attachEqualCond(eqCon, availablePaths) { + p.filterRate *= rateEqual + return true + } + } + return false + } + // outer join + if p.outer.attachEqualCond(eqCon, availablePaths) { + p.filterRate *= rateEqual + return true + } + if p.inner.attachEqualCond(eqCon, append(availablePaths, p.outer)) { + p.filterRate *= rateEqual + return true + } + return false +} + +func (p *joinPath) extractEqualConditon() { + var equivs []*equalCond + var cons []ast.ExprNode + for _, con := range p.conditions { + eq := equivFromExpr(con) + if eq != nil { + equivs = append(equivs, eq) + if p.table != nil { + if eq.right.TableName == p.table { + eq.left, eq.right = eq.right, eq.left + eq.leftIdx, eq.rightIdx = eq.rightIdx, eq.leftIdx + } + } + } else { + cons = append(cons, con) + } + } + p.eqConds = equivs + p.conditions = cons + for _, in := range p.inners { + in.extractEqualConditon() + } + if p.outer != nil { + p.outer.extractEqualConditon() + p.inner.extractEqualConditon() + } +} + +func (p *joinPath) addIndexDependency() { + if p.outer != nil { + p.outer.addIndexDependency() + p.inner.addIndexDependency() + return + } + if p.table != nil { + return + } + for _, eq := range p.eqConds { + if !eq.leftIdx && !eq.rightIdx { + continue + } + pathLeft := p.findInnerContains(eq.left.TableName) + if pathLeft == nil { + continue + } + pathRight := p.findInnerContains(eq.right.TableName) + if pathRight == nil { + continue + } + if eq.leftIdx && eq.rightIdx { + pathLeft.addNeighbor(pathRight) + pathRight.addNeighbor(pathLeft) + } else if eq.leftIdx { + if !pathLeft.hasOuterIdxEqualCond() { + pathLeft.addIndexDep(pathRight) + } + } else if eq.rightIdx { + if !pathRight.hasOuterIdxEqualCond() { + pathRight.addIndexDep(pathLeft) + } + } + } + for _, in := range p.inners { + in.removeIndexDepCycle(in) + in.addIndexDependency() + } +} + +func (p *joinPath) hasOuterIdxEqualCond() bool { + if p.table != nil { + for _, eq := range p.eqConds { + if eq.leftIdx { + return true + } + } + return false + } + if p.outer != nil { + return p.outer.hasOuterIdxEqualCond() + } + for _, in := range p.inners { + if in.hasOuterIdxEqualCond() { + return true + } + } + return false +} + +func (p *joinPath) findInnerContains(table *ast.TableName) *joinPath { + for _, in := range p.inners { + if in.containsTable(table) { + return in + } + } + return nil +} + +func (p *joinPath) addNeighbor(neighbor *joinPath) { + if p.neighbors == nil { + p.neighbors = map[*joinPath]bool{} + } + p.neighbors[neighbor] = true + p.neighborCount++ +} + +func (p *joinPath) addIndexDep(dep *joinPath) { + if p.idxDeps == nil { + p.idxDeps = map[*joinPath]bool{} + } + p.idxDeps[dep] = true + p.idxDepCount++ +} + +func (p *joinPath) removeIndexDepCycle(origin *joinPath) { + if p.idxDeps == nil { + return + } + for dep := range p.idxDeps { + if dep == origin { + delete(p.idxDeps, origin) + continue + } + dep.removeIndexDepCycle(origin) + } +} + +func (p *joinPath) score() float64 { + return 1 / p.filterRate +} + +func (p *joinPath) String() string { + if p.table != nil { + return p.table.TableInfo.Name.L + } + if p.outer != nil { + return "outer{" + p.outer.String() + "," + p.inner.String() + "}" + } + var innerStrs []string + for _, in := range p.inners { + innerStrs = append(innerStrs, in.String()) + } + return "inner{" + strings.Join(innerStrs, ",") + "}" +} + +func (p *joinPath) optimizeJoinOrder(availablePaths []*joinPath) { + if p.table != nil { + return + } + if p.outer != nil { + p.outer.optimizeJoinOrder(availablePaths) + p.inner.optimizeJoinOrder(append(availablePaths, p.outer)) + return + } + var ordered []*joinPath + pathMap := map[*joinPath]bool{} + for _, in := range p.inners { + pathMap[in] = true + } + for len(pathMap) > 0 { + next := p.nextPath(pathMap, availablePaths) + next.optimizeJoinOrder(availablePaths) + ordered = append(ordered, next) + delete(pathMap, next) + availablePaths = append(availablePaths, next) + for path := range pathMap { + if path.idxDeps != nil { + delete(path.idxDeps, next) + } + if path.neighbors != nil { + delete(path.neighbors, next) + } + } + p.reattach(pathMap, availablePaths) + } + p.inners = ordered +} + +// reattach is called by inner joinPath to retry attach conditions to inner paths +// after an inner path has been added to available paths. +func (p *joinPath) reattach(pathMap map[*joinPath]bool, availablePaths []*joinPath) { + if len(p.conditions) != 0 { + remainedConds := make([]ast.ExprNode, 0, len(p.conditions)) + for _, con := range p.conditions { + var attached bool + for path := range pathMap { + if path.attachCondition(con, availablePaths) { + attached = true + break + } + } + if !attached { + remainedConds = append(remainedConds, con) + } + } + p.conditions = remainedConds + } + if len(p.eqConds) != 0 { + remainedEqConds := make([]*equalCond, 0, len(p.eqConds)) + for _, eq := range p.eqConds { + var attached bool + for path := range pathMap { + if path.attachEqualCond(eq, availablePaths) { + attached = true + break + } + } + if !attached { + remainedEqConds = append(remainedEqConds, eq) + } + } + p.eqConds = remainedEqConds + } +} + +func (p *joinPath) nextPath(pathMap map[*joinPath]bool, availablePaths []*joinPath) *joinPath { + cans := p.candidates(pathMap) + if len(cans) == 0 { + var v *joinPath + for v = range pathMap { + log.Errorf("index dep %v, prevs %v\n", v.idxDeps, len(availablePaths)) + } + return v + } + indexPath := p.nextIndexPath(cans) + if indexPath != nil { + return indexPath + } + return p.pickPath(cans) +} + +func (p *joinPath) candidates(pathMap map[*joinPath]bool) []*joinPath { + var cans []*joinPath + for t := range pathMap { + if len(t.idxDeps) > 0 { + continue + } + cans = append(cans, t) + } + return cans +} + +func (p *joinPath) nextIndexPath(candidates []*joinPath) *joinPath { + var best *joinPath + for _, can := range candidates { + // Since we may not have equal conditions attached on the path, we + // need to check neighborCount and idxDepCount to see if this path + // can be joined with index. + neighborIsAvailable := len(can.neighbors) < can.neighborCount + idxDepIsAvailable := can.idxDepCount > 0 + if can.hasOuterIdxEqualCond() || neighborIsAvailable || idxDepIsAvailable { + if best == nil { + best = can + } + if can.score() > best.score() { + best = can + } + } + } + return best +} + +func (p *joinPath) pickPath(candidates []*joinPath) *joinPath { + var best *joinPath + for _, path := range candidates { + if best == nil { + best = path + } + if path.score() > best.score() { + best = path + } + } + return best +} + +// conditionAttachChecker checks if an expression is valid to +// attach to a path. attach is valid only if all the referenced tables in the +// expression are available. +type conditionAttachChecker struct { + targetPath *joinPath + availablePaths []*joinPath + invalid bool +} + +func (c *conditionAttachChecker) Enter(in ast.Node) (ast.Node, bool) { + switch x := in.(type) { + case *ast.ColumnNameExpr: + table := x.Refer.TableName + if c.targetPath.containsTable(table) { + return in, false + } + c.invalid = true + for _, path := range c.availablePaths { + if path.containsTable(table) { + c.invalid = false + return in, false + } + } + } + return in, false +} + +func (c *conditionAttachChecker) Leave(in ast.Node) (ast.Node, bool) { + return in, !c.invalid +} + +func (b *planBuilder) buildJoin(sel *ast.SelectStmt) Plan { + nrfinder := &nullRejectFinder{nullRejectTables: map[*ast.TableName]bool{}} + if sel.Where != nil { + sel.Where.Accept(nrfinder) + } + path := b.buildBasicJoinPath(sel.From.TableRefs, nrfinder.nullRejectTables) + rfs := path.resultFields() + + whereConditions := splitWhere(sel.Where) + for _, whereCond := range whereConditions { + if !path.attachCondition(whereCond, nil) { + // TODO: Find a better way to handle this condition. + path.conditions = append(path.conditions, whereCond) + log.Errorf("Failed to attach where condtion.") + } + } + path.extractEqualConditon() + path.addIndexDependency() + path.optimizeJoinOrder(nil) + p := b.buildPlanFromJoinPath(path) + p.SetFields(rfs) + return p +} + +type nullRejectFinder struct { + nullRejectTables map[*ast.TableName]bool +} + +func (n *nullRejectFinder) Enter(in ast.Node) (ast.Node, bool) { + switch x := in.(type) { + case *ast.BinaryOperationExpr: + if x.Op == opcode.NullEQ || x.Op == opcode.OrOr { + return in, true + } + case *ast.IsNullExpr: + if !x.Not { + return in, true + } + case *ast.IsTruthExpr: + if x.Not { + return in, true + } + } + return in, false +} + +func (n *nullRejectFinder) Leave(in ast.Node) (ast.Node, bool) { + switch x := in.(type) { + case *ast.ColumnNameExpr: + n.nullRejectTables[x.Refer.TableName] = true + } + return in, true +} + +func (b *planBuilder) buildBasicJoinPath(node ast.ResultSetNode, nullRejectTables map[*ast.TableName]bool) *joinPath { + switch x := node.(type) { + case nil: + return nil + case *ast.Join: + leftPath := b.buildBasicJoinPath(x.Left, nullRejectTables) + if x.Right == nil { + return leftPath + } + righPath := b.buildBasicJoinPath(x.Right, nullRejectTables) + isOuter := b.isOuterJoin(x.Tp, leftPath, righPath, nullRejectTables) + if isOuter { + return newOuterJoinPath(x.Tp == ast.RightJoin, leftPath, righPath, x.On) + } + return newInnerJoinPath(leftPath, righPath, x.On) + case *ast.TableSource: + switch v := x.Source.(type) { + case *ast.TableName: + return newTablePath(v) + case *ast.SelectStmt, *ast.UnionStmt: + return newSubqueryPath(v, x.AsName) + default: + b.err = ErrUnsupportedType.Gen("unsupported table source type %T", x) + return nil + } + default: + b.err = ErrUnsupportedType.Gen("unsupported table source type %T", x) + return nil + } +} + +func (b *planBuilder) isOuterJoin(tp ast.JoinType, leftPaths, rightPaths *joinPath, + nullRejectTables map[*ast.TableName]bool) bool { + var innerPath *joinPath + switch tp { + case ast.LeftJoin: + innerPath = rightPaths + case ast.RightJoin: + innerPath = leftPaths + default: + return false + } + for table := range nullRejectTables { + if innerPath.containsTable(table) { + return false + } + } + return true +} + +func equivFromExpr(expr ast.ExprNode) *equalCond { + binop, ok := expr.(*ast.BinaryOperationExpr) + if !ok || binop.Op != opcode.EQ { + return nil + } + ln, lOK := binop.L.(*ast.ColumnNameExpr) + rn, rOK := binop.R.(*ast.ColumnNameExpr) + if !lOK || !rOK { + return nil + } + if ln.Name.Table.L == "" || rn.Name.Table.L == "" { + return nil + } + if ln.Name.Schema.L == rn.Name.Schema.L && ln.Name.Table.L == rn.Name.Table.L { + return nil + } + return newEqualCond(ln.Refer, rn.Refer) +} + +func (b *planBuilder) buildPlanFromJoinPath(path *joinPath) Plan { + if path.table != nil { + return b.buildTablePlanFromJoinPath(path) + } + if path.subquery != nil { + return b.buildSubqueryJoinPath(path) + } + if path.outer != nil { + join := &JoinOuter{ + Outer: b.buildPlanFromJoinPath(path.outer), + Inner: b.buildPlanFromJoinPath(path.inner), + } + if path.rightJoin { + join.SetFields(append(join.Inner.Fields(), join.Outer.Fields()...)) + } else { + join.SetFields(append(join.Outer.Fields(), join.Inner.Fields()...)) + } + return join + } + join := &JoinInner{} + for _, in := range path.inners { + join.Inners = append(join.Inners, b.buildPlanFromJoinPath(in)) + join.fields = append(join.fields, in.resultFields()...) + } + join.Conditions = path.conditions + for _, equiv := range path.eqConds { + cond := &ast.BinaryOperationExpr{L: equiv.left.Expr, R: equiv.right.Expr, Op: opcode.EQ} + join.Conditions = append(join.Conditions, cond) + } + return join +} + +func (b *planBuilder) buildTablePlanFromJoinPath(path *joinPath) Plan { + for _, equiv := range path.eqConds { + columnNameExpr := &ast.ColumnNameExpr{} + columnNameExpr.Name = &ast.ColumnName{} + columnNameExpr.Name.Name = equiv.left.Column.Name + columnNameExpr.Name.Table = equiv.left.Table.Name + columnNameExpr.Refer = equiv.left + condition := &ast.BinaryOperationExpr{L: columnNameExpr, R: equiv.right.Expr, Op: opcode.EQ} + ast.SetFlag(condition) + path.conditions = append(path.conditions, condition) + } + candidates := b.buildAllAccessMethodsPlan(path) + var p Plan + var lowestCost float64 + for _, can := range candidates { + cost := EstimateCost(can) + if p == nil { + p = can + lowestCost = cost + } + if cost < lowestCost { + p = can + lowestCost = cost + } + } + return p +} + +// Build subquery join path plan +func (b *planBuilder) buildSubqueryJoinPath(path *joinPath) Plan { + for _, equiv := range path.eqConds { + columnNameExpr := &ast.ColumnNameExpr{} + columnNameExpr.Name = &ast.ColumnName{} + columnNameExpr.Name.Name = equiv.left.Column.Name + columnNameExpr.Name.Table = equiv.left.Table.Name + columnNameExpr.Refer = equiv.left + condition := &ast.BinaryOperationExpr{L: columnNameExpr, R: equiv.right.Expr, Op: opcode.EQ} + ast.SetFlag(condition) + path.conditions = append(path.conditions, condition) + } + p := b.build(path.subquery) + if len(path.conditions) == 0 { + return p + } + filterPlan := &Filter{Conditions: path.conditions} + filterPlan.SetSrc(p) + filterPlan.SetFields(p.Fields()) + return filterPlan +} diff --git a/vendor/github.com/pingcap/tidb/optimizer/plan/plans.go b/vendor/github.com/pingcap/tidb/optimizer/plan/plans.go new file mode 100644 index 000000000..7a1a7e5d4 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/optimizer/plan/plans.go @@ -0,0 +1,677 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package plan + +import ( + "fmt" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/util/types" +) + +// TableRange represents a range of row handle. +type TableRange struct { + LowVal int64 + HighVal int64 +} + +// TableScan represents a table scan plan. +type TableScan struct { + basePlan + + Table *model.TableInfo + Desc bool + Ranges []TableRange + + // RefAccess indicates it references a previous joined table, used in explain. + RefAccess bool + + // AccessConditions can be used to build index range. + AccessConditions []ast.ExprNode + + // FilterConditions can be used to filter result. + FilterConditions []ast.ExprNode +} + +// Accept implements Plan Accept interface. +func (p *TableScan) Accept(v Visitor) (Plan, bool) { + np, _ := v.Enter(p) + return v.Leave(np) +} + +// ShowDDL is for showing DDL information. +type ShowDDL struct { + basePlan +} + +// Accept implements Plan Accept interface. +func (p *ShowDDL) Accept(v Visitor) (Plan, bool) { + np, _ := v.Enter(p) + return v.Leave(np) +} + +// CheckTable is for checking table data. +type CheckTable struct { + basePlan + + Tables []*ast.TableName +} + +// Accept implements Plan Accept interface. +func (p *CheckTable) Accept(v Visitor) (Plan, bool) { + np, _ := v.Enter(p) + return v.Leave(np) + +} + +// IndexRange represents an index range to be scanned. +type IndexRange struct { + LowVal []types.Datum + LowExclude bool + HighVal []types.Datum + HighExclude bool +} + +// IsPoint returns if the index range is a point. +func (ir *IndexRange) IsPoint() bool { + if len(ir.LowVal) != len(ir.HighVal) { + return false + } + for i := range ir.LowVal { + a := ir.LowVal[i] + b := ir.HighVal[i] + if a.Kind() == types.KindMinNotNull || b.Kind() == types.KindMaxValue { + return false + } + cmp, err := a.CompareDatum(b) + if err != nil { + return false + } + if cmp != 0 { + return false + } + } + return !ir.LowExclude && !ir.HighExclude +} + +// IndexScan represents an index scan plan. +type IndexScan struct { + basePlan + + // The index used. + Index *model.IndexInfo + + // The table to lookup. + Table *model.TableInfo + + // Ordered and non-overlapping ranges to be scanned. + Ranges []*IndexRange + + // Desc indicates whether the index should be scanned in descending order. + Desc bool + + // RefAccess indicates it references a previous joined table, used in explain. + RefAccess bool + + // AccessConditions can be used to build index range. + AccessConditions []ast.ExprNode + + // Number of leading equal access condition. + // The offset of each equal condition correspond to the offset of index column. + // For example, an index has column (a, b, c), condition is 'a = 0 and b = 0 and c > 0' + // AccessEqualCount would be 2. + AccessEqualCount int + + // FilterConditions can be used to filter result. + FilterConditions []ast.ExprNode +} + +// Accept implements Plan Accept interface. +func (p *IndexScan) Accept(v Visitor) (Plan, bool) { + np, _ := v.Enter(p) + return v.Leave(np) +} + +// JoinOuter represents outer join plan. +type JoinOuter struct { + basePlan + + Outer Plan + Inner Plan +} + +// Accept implements Plan interface. +func (p *JoinOuter) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*JoinOuter) + var ok bool + p.Outer, ok = p.Outer.Accept(v) + if !ok { + return p, false + } + p.Inner, ok = p.Inner.Accept(v) + if !ok { + return p, false + } + return v.Leave(p) +} + +// JoinInner represents inner join plan. +type JoinInner struct { + basePlan + + Inners []Plan + Conditions []ast.ExprNode +} + +func (p *JoinInner) String() string { + return fmt.Sprintf("JoinInner()") +} + +// Accept implements Plan interface. +func (p *JoinInner) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*JoinInner) + for i, in := range p.Inners { + x, ok := in.Accept(v) + if !ok { + return p, false + } + p.Inners[i] = x + } + return v.Leave(p) +} + +// SelectLock represents a select lock plan. +type SelectLock struct { + planWithSrc + + Lock ast.SelectLockType +} + +// Accept implements Plan Accept interface. +func (p *SelectLock) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*SelectLock) + var ok bool + p.src, ok = p.src.Accept(v) + if !ok { + return p, false + } + return v.Leave(p) +} + +// SetLimit implements Plan SetLimit interface. +func (p *SelectLock) SetLimit(limit float64) { + p.limit = limit + p.src.SetLimit(p.limit) +} + +// SelectFields represents a select fields plan. +type SelectFields struct { + planWithSrc +} + +// Accept implements Plan Accept interface. +func (p *SelectFields) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*SelectFields) + if p.src != nil { + var ok bool + p.src, ok = p.src.Accept(v) + if !ok { + return p, false + } + } + return v.Leave(p) +} + +// SetLimit implements Plan SetLimit interface. +func (p *SelectFields) SetLimit(limit float64) { + p.limit = limit + if p.src != nil { + p.src.SetLimit(limit) + } +} + +// Sort represents a sorting plan. +type Sort struct { + planWithSrc + + ByItems []*ast.ByItem +} + +// Accept implements Plan Accept interface. +func (p *Sort) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*Sort) + var ok bool + p.src, ok = p.src.Accept(v) + if !ok { + return p, false + } + return v.Leave(p) +} + +// SetLimit implements Plan SetLimit interface. +// It set the Src limit only if it is bypassed. +// Bypass has to be determined before this get called. +func (p *Sort) SetLimit(limit float64) { + p.limit = limit +} + +// Limit represents offset and limit plan. +type Limit struct { + planWithSrc + + Offset uint64 + Count uint64 +} + +// Accept implements Plan Accept interface. +func (p *Limit) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*Limit) + var ok bool + p.src, ok = p.src.Accept(v) + if !ok { + return p, false + } + return v.Leave(p) +} + +// SetLimit implements Plan SetLimit interface. +// As Limit itself determine the real limit, +// We just ignore the input, and set the real limit. +func (p *Limit) SetLimit(limit float64) { + p.limit = float64(p.Offset + p.Count) + p.src.SetLimit(p.limit) +} + +// Union represents Union plan. +type Union struct { + basePlan + + Selects []Plan +} + +// Accept implements Plan Accept interface. +func (p *Union) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(p) + } + p = np.(*Union) + for i, sel := range p.Selects { + var ok bool + p.Selects[i], ok = sel.Accept(v) + if !ok { + return p, false + } + } + return v.Leave(p) +} + +// Distinct represents Distinct plan. +type Distinct struct { + planWithSrc +} + +// Accept implements Plan Accept interface. +func (p *Distinct) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(p) + } + p = np.(*Distinct) + var ok bool + p.src, ok = p.src.Accept(v) + if !ok { + return p, false + } + return v.Leave(p) +} + +// SetLimit implements Plan SetLimit interface. +func (p *Distinct) SetLimit(limit float64) { + p.limit = limit + if p.src != nil { + p.src.SetLimit(limit) + } +} + +// Prepare represents prepare plan. +type Prepare struct { + basePlan + + Name string + SQLText string +} + +// Accept implements Plan Accept interface. +func (p *Prepare) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*Prepare) + return v.Leave(p) +} + +// Execute represents prepare plan. +type Execute struct { + basePlan + + Name string + UsingVars []ast.ExprNode + ID uint32 +} + +// Accept implements Plan Accept interface. +func (p *Execute) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*Execute) + return v.Leave(p) +} + +// Deallocate represents deallocate plan. +type Deallocate struct { + basePlan + + Name string +} + +// Accept implements Plan Accept interface. +func (p *Deallocate) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*Deallocate) + return v.Leave(p) +} + +// Aggregate represents a select fields plan. +type Aggregate struct { + planWithSrc + AggFuncs []*ast.AggregateFuncExpr + GroupByItems []*ast.ByItem +} + +// Accept implements Plan Accept interface. +func (p *Aggregate) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*Aggregate) + if p.src != nil { + var ok bool + p.src, ok = p.src.Accept(v) + if !ok { + return p, false + } + } + return v.Leave(p) +} + +// SetLimit implements Plan SetLimit interface. +func (p *Aggregate) SetLimit(limit float64) { + p.limit = limit + if p.src != nil { + p.src.SetLimit(limit) + } +} + +// Having represents a having plan. +// The having plan should after aggregate plan. +type Having struct { + planWithSrc + + // Originally the WHERE or ON condition is parsed into a single expression, + // but after we converted to CNF(Conjunctive normal form), it can be + // split into a list of AND conditions. + Conditions []ast.ExprNode +} + +// Accept implements Plan Accept interface. +func (p *Having) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*Having) + var ok bool + p.src, ok = p.src.Accept(v) + if !ok { + return p, false + } + return v.Leave(p) +} + +// SetLimit implements Plan SetLimit interface. +func (p *Having) SetLimit(limit float64) { + p.limit = limit + // We assume 50% of the src row is filtered out. + p.src.SetLimit(limit * 2) +} + +// Update represents an update plan. +type Update struct { + basePlan + + OrderedList []*ast.Assignment // OrderedList has the same offset as TablePlan's result fields. + SelectPlan Plan +} + +// Accept implements Plan Accept interface. +func (p *Update) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*Update) + var ok bool + p.SelectPlan, ok = p.SelectPlan.Accept(v) + if !ok { + return p, false + } + return v.Leave(p) +} + +// Delete represents a delete plan. +type Delete struct { + basePlan + + SelectPlan Plan + Tables []*ast.TableName + IsMultiTable bool +} + +// Accept implements Plan Accept interface. +func (p *Delete) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*Delete) + var ok bool + p.SelectPlan, ok = p.SelectPlan.Accept(v) + if !ok { + return p, false + } + return v.Leave(p) +} + +// Filter represents a plan that filter srcplan result. +type Filter struct { + planWithSrc + + // Originally the WHERE or ON condition is parsed into a single expression, + // but after we converted to CNF(Conjunctive normal form), it can be + // split into a list of AND conditions. + Conditions []ast.ExprNode +} + +// Accept implements Plan Accept interface. +func (p *Filter) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*Filter) + var ok bool + p.src, ok = p.src.Accept(v) + if !ok { + return p, false + } + return v.Leave(p) +} + +// SetLimit implements Plan SetLimit interface. +func (p *Filter) SetLimit(limit float64) { + p.limit = limit + // We assume 50% of the src row is filtered out. + p.src.SetLimit(limit * 2) +} + +// Show represents a show plan. +type Show struct { + basePlan + + Tp ast.ShowStmtType // Databases/Tables/Columns/.... + DBName string + Table *ast.TableName // Used for showing columns. + Column *ast.ColumnName // Used for `desc table column`. + Flag int // Some flag parsed from sql, such as FULL. + Full bool + User string // Used for show grants. + + // Used by show variables + GlobalScope bool +} + +// Accept implements Plan Accept interface. +func (p *Show) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*Show) + return v.Leave(p) +} + +// Simple represents a simple statement plan which doesn't need any optimization. +type Simple struct { + basePlan + + Statement ast.StmtNode +} + +// Accept implements Plan Accept interface. +func (p *Simple) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*Simple) + return v.Leave(p) +} + +// Insert represents an insert plan. +type Insert struct { + basePlan + + Table *ast.TableRefsClause + Columns []*ast.ColumnName + Lists [][]ast.ExprNode + Setlist []*ast.Assignment + OnDuplicate []*ast.Assignment + SelectPlan Plan + + IsReplace bool + Priority int +} + +// Accept implements Plan Accept interface. +func (p *Insert) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*Insert) + if p.SelectPlan != nil { + var ok bool + p.SelectPlan, ok = p.SelectPlan.Accept(v) + if !ok { + return p, false + } + } + return v.Leave(p) +} + +// DDL represents a DDL statement plan. +type DDL struct { + basePlan + + Statement ast.DDLNode +} + +// Accept implements Plan Accept interface. +func (p *DDL) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + return v.Leave(np) + } + p = np.(*DDL) + return v.Leave(p) +} + +// Explain represents a explain plan. +type Explain struct { + basePlan + + StmtPlan Plan +} + +// Accept implements Plan Accept interface. +func (p *Explain) Accept(v Visitor) (Plan, bool) { + np, skip := v.Enter(p) + if skip { + v.Leave(np) + } + p = np.(*Explain) + return v.Leave(p) +} diff --git a/vendor/github.com/pingcap/tidb/optimizer/plan/range.go b/vendor/github.com/pingcap/tidb/optimizer/plan/range.go new file mode 100644 index 000000000..5278b6566 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/optimizer/plan/range.go @@ -0,0 +1,505 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package plan + +import ( + "fmt" + "math" + "sort" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/parser/opcode" + "github.com/pingcap/tidb/util/types" +) + +type rangePoint struct { + value types.Datum + excl bool // exclude + start bool +} + +func (rp rangePoint) String() string { + val := rp.value.GetValue() + if rp.value.Kind() == types.KindMinNotNull { + val = "-inf" + } else if rp.value.Kind() == types.KindMaxValue { + val = "+inf" + } + if rp.start { + symbol := "[" + if rp.excl { + symbol = "(" + } + return fmt.Sprintf("%s%v", symbol, val) + } + symbol := "]" + if rp.excl { + symbol = ")" + } + return fmt.Sprintf("%v%s", val, symbol) +} + +type rangePointSorter struct { + points []rangePoint + err error +} + +func (r *rangePointSorter) Len() int { + return len(r.points) +} + +func (r *rangePointSorter) Less(i, j int) bool { + a := r.points[i] + b := r.points[j] + cmp, err := a.value.CompareDatum(b.value) + if err != nil { + r.err = err + return true + } + if cmp == 0 { + return r.equalValueLess(a, b) + } + return cmp < 0 +} + +func (r *rangePointSorter) equalValueLess(a, b rangePoint) bool { + if a.start && b.start { + return !a.excl && b.excl + } else if a.start { + return !b.excl + } else if b.start { + return a.excl || b.excl + } + return a.excl && !b.excl +} + +func (r *rangePointSorter) Swap(i, j int) { + r.points[i], r.points[j] = r.points[j], r.points[i] +} + +type rangeBuilder struct { + err error +} + +func (r *rangeBuilder) build(expr ast.ExprNode) []rangePoint { + switch x := expr.(type) { + case *ast.BinaryOperationExpr: + return r.buildFromBinop(x) + case *ast.PatternInExpr: + return r.buildFromIn(x) + case *ast.ParenthesesExpr: + return r.build(x.Expr) + case *ast.BetweenExpr: + return r.buildFromBetween(x) + case *ast.IsNullExpr: + return r.buildFromIsNull(x) + case *ast.IsTruthExpr: + return r.buildFromIsTruth(x) + case *ast.PatternLikeExpr: + rans := r.buildFromPatternLike(x) + return rans + case *ast.ColumnNameExpr: + return r.buildFromColumnName(x) + } + return fullRange +} + +func (r *rangeBuilder) buildFromBinop(x *ast.BinaryOperationExpr) []rangePoint { + if x.Op == opcode.OrOr { + return r.union(r.build(x.L), r.build(x.R)) + } else if x.Op == opcode.AndAnd { + return r.intersection(r.build(x.L), r.build(x.R)) + } + // This has been checked that the binary operation is comparison operation, and one of + // the operand is column name expression. + var value types.Datum + var op opcode.Op + if _, ok := x.L.(*ast.ValueExpr); ok { + value = types.NewDatum(x.L.GetValue()) + switch x.Op { + case opcode.GE: + op = opcode.LE + case opcode.GT: + op = opcode.LT + case opcode.LT: + op = opcode.GT + case opcode.LE: + op = opcode.GE + default: + op = x.Op + } + } else { + value = types.NewDatum(x.R.GetValue()) + op = x.Op + } + if value.Kind() == types.KindNull { + return nil + } + switch op { + case opcode.EQ: + startPoint := rangePoint{value: value, start: true} + endPoint := rangePoint{value: value} + return []rangePoint{startPoint, endPoint} + case opcode.NE: + startPoint1 := rangePoint{value: types.MinNotNullDatum(), start: true} + endPoint1 := rangePoint{value: value, excl: true} + startPoint2 := rangePoint{value: value, start: true, excl: true} + endPoint2 := rangePoint{value: types.MaxValueDatum()} + return []rangePoint{startPoint1, endPoint1, startPoint2, endPoint2} + case opcode.LT: + startPoint := rangePoint{value: types.MinNotNullDatum(), start: true} + endPoint := rangePoint{value: value, excl: true} + return []rangePoint{startPoint, endPoint} + case opcode.LE: + startPoint := rangePoint{value: types.MinNotNullDatum(), start: true} + endPoint := rangePoint{value: value} + return []rangePoint{startPoint, endPoint} + case opcode.GT: + startPoint := rangePoint{value: value, start: true, excl: true} + endPoint := rangePoint{value: types.MaxValueDatum()} + return []rangePoint{startPoint, endPoint} + case opcode.GE: + startPoint := rangePoint{value: value, start: true} + endPoint := rangePoint{value: types.MaxValueDatum()} + return []rangePoint{startPoint, endPoint} + } + return nil +} + +func (r *rangeBuilder) buildFromIn(x *ast.PatternInExpr) []rangePoint { + if x.Not { + r.err = ErrUnsupportedType.Gen("NOT IN is not supported") + return fullRange + } + var rangePoints []rangePoint + for _, v := range x.List { + startPoint := rangePoint{value: types.NewDatum(v.GetValue()), start: true} + endPoint := rangePoint{value: types.NewDatum(v.GetValue())} + rangePoints = append(rangePoints, startPoint, endPoint) + } + sorter := rangePointSorter{points: rangePoints} + sort.Sort(&sorter) + if sorter.err != nil { + r.err = sorter.err + } + // check duplicates + hasDuplicate := false + isStart := false + for _, v := range rangePoints { + if isStart == v.start { + hasDuplicate = true + break + } + isStart = v.start + } + if !hasDuplicate { + return rangePoints + } + // remove duplicates + distinctRangePoints := make([]rangePoint, 0, len(rangePoints)) + isStart = false + for i := 0; i < len(rangePoints); i++ { + current := rangePoints[i] + if isStart == current.start { + continue + } + distinctRangePoints = append(distinctRangePoints, current) + isStart = current.start + } + return distinctRangePoints +} + +func (r *rangeBuilder) buildFromBetween(x *ast.BetweenExpr) []rangePoint { + if x.Not { + binop1 := &ast.BinaryOperationExpr{Op: opcode.LT, L: x.Expr, R: x.Left} + binop2 := &ast.BinaryOperationExpr{Op: opcode.GT, L: x.Expr, R: x.Right} + range1 := r.buildFromBinop(binop1) + range2 := r.buildFromBinop(binop2) + return r.union(range1, range2) + } + binop1 := &ast.BinaryOperationExpr{Op: opcode.GE, L: x.Expr, R: x.Left} + binop2 := &ast.BinaryOperationExpr{Op: opcode.LE, L: x.Expr, R: x.Right} + range1 := r.buildFromBinop(binop1) + range2 := r.buildFromBinop(binop2) + return r.intersection(range1, range2) +} + +func (r *rangeBuilder) buildFromIsNull(x *ast.IsNullExpr) []rangePoint { + if x.Not { + startPoint := rangePoint{value: types.MinNotNullDatum(), start: true} + endPoint := rangePoint{value: types.MaxValueDatum()} + return []rangePoint{startPoint, endPoint} + } + startPoint := rangePoint{start: true} + endPoint := rangePoint{} + return []rangePoint{startPoint, endPoint} +} + +func (r *rangeBuilder) buildFromIsTruth(x *ast.IsTruthExpr) []rangePoint { + if x.True != 0 { + if x.Not { + // NOT TRUE range is {[null null] [0, 0]} + startPoint1 := rangePoint{start: true} + endPoint1 := rangePoint{} + startPoint2 := rangePoint{start: true} + startPoint2.value.SetInt64(0) + endPoint2 := rangePoint{} + endPoint2.value.SetInt64(0) + return []rangePoint{startPoint1, endPoint1, startPoint2, endPoint2} + } + // TRUE range is {[-inf 0) (0 +inf]} + startPoint1 := rangePoint{value: types.MinNotNullDatum(), start: true} + endPoint1 := rangePoint{excl: true} + endPoint1.value.SetInt64(0) + startPoint2 := rangePoint{excl: true, start: true} + startPoint2.value.SetInt64(0) + endPoint2 := rangePoint{value: types.MaxValueDatum()} + return []rangePoint{startPoint1, endPoint1, startPoint2, endPoint2} + } + if x.Not { + startPoint1 := rangePoint{start: true} + endPoint1 := rangePoint{excl: true} + endPoint1.value.SetInt64(0) + startPoint2 := rangePoint{start: true, excl: true} + startPoint2.value.SetInt64(0) + endPoint2 := rangePoint{value: types.MaxValueDatum()} + return []rangePoint{startPoint1, endPoint1, startPoint2, endPoint2} + } + startPoint := rangePoint{start: true} + startPoint.value.SetInt64(0) + endPoint := rangePoint{} + endPoint.value.SetInt64(0) + return []rangePoint{startPoint, endPoint} +} + +func (r *rangeBuilder) buildFromPatternLike(x *ast.PatternLikeExpr) []rangePoint { + if x.Not { + // Pattern not like is not supported. + r.err = ErrUnsupportedType.Gen("NOT LIKE is not supported.") + return fullRange + } + pattern, err := types.ToString(x.Pattern.GetValue()) + if err != nil { + r.err = errors.Trace(err) + return fullRange + } + lowValue := make([]byte, 0, len(pattern)) + // unscape the pattern + var exclude bool + for i := 0; i < len(pattern); i++ { + if pattern[i] == x.Escape { + i++ + if i < len(pattern) { + lowValue = append(lowValue, pattern[i]) + } else { + lowValue = append(lowValue, x.Escape) + } + continue + } + if pattern[i] == '%' { + break + } else if pattern[i] == '_' { + exclude = true + break + } + lowValue = append(lowValue, pattern[i]) + } + if len(lowValue) == 0 { + return []rangePoint{{value: types.MinNotNullDatum(), start: true}, {value: types.MaxValueDatum()}} + } + startPoint := rangePoint{start: true, excl: exclude} + startPoint.value.SetBytesAsString(lowValue) + highValue := make([]byte, len(lowValue)) + copy(highValue, lowValue) + endPoint := rangePoint{excl: true} + for i := len(highValue) - 1; i >= 0; i-- { + highValue[i]++ + if highValue[i] != 0 { + endPoint.value.SetBytesAsString(highValue) + break + } + if i == 0 { + endPoint.value = types.MaxValueDatum() + break + } + } + ranges := make([]rangePoint, 2) + ranges[0] = startPoint + ranges[1] = endPoint + return ranges +} + +func (r *rangeBuilder) buildFromColumnName(x *ast.ColumnNameExpr) []rangePoint { + // column name expression is equivalent to column name is true. + startPoint1 := rangePoint{value: types.MinNotNullDatum(), start: true} + endPoint1 := rangePoint{excl: true} + endPoint1.value.SetInt64(0) + startPoint2 := rangePoint{excl: true, start: true} + startPoint2.value.SetInt64(0) + endPoint2 := rangePoint{value: types.MaxValueDatum()} + return []rangePoint{startPoint1, endPoint1, startPoint2, endPoint2} +} + +func (r *rangeBuilder) intersection(a, b []rangePoint) []rangePoint { + return r.merge(a, b, false) +} + +func (r *rangeBuilder) union(a, b []rangePoint) []rangePoint { + return r.merge(a, b, true) +} + +func (r *rangeBuilder) merge(a, b []rangePoint, union bool) []rangePoint { + sorter := rangePointSorter{points: append(a, b...)} + sort.Sort(&sorter) + if sorter.err != nil { + r.err = sorter.err + return nil + } + var ( + merged []rangePoint + inRangeCount int + requiredInRangeCount int + ) + if union { + requiredInRangeCount = 1 + } else { + requiredInRangeCount = 2 + } + for _, val := range sorter.points { + if val.start { + inRangeCount++ + if inRangeCount == requiredInRangeCount { + // just reached the required in range count, a new range started. + merged = append(merged, val) + } + } else { + if inRangeCount == requiredInRangeCount { + // just about to leave the required in range count, the range is ended. + merged = append(merged, val) + } + inRangeCount-- + } + } + return merged +} + +// buildIndexRanges build index ranges from range points. +// Only the first column in the index is built, extra column ranges will be appended by +// appendIndexRanges. +func (r *rangeBuilder) buildIndexRanges(rangePoints []rangePoint) []*IndexRange { + indexRanges := make([]*IndexRange, 0, len(rangePoints)/2) + for i := 0; i < len(rangePoints); i += 2 { + startPoint := rangePoints[i] + endPoint := rangePoints[i+1] + ir := &IndexRange{ + LowVal: []types.Datum{startPoint.value}, + LowExclude: startPoint.excl, + HighVal: []types.Datum{endPoint.value}, + HighExclude: endPoint.excl, + } + indexRanges = append(indexRanges, ir) + } + return indexRanges +} + +// appendIndexRanges appends additional column ranges for multi-column index. +// The additional column ranges can only be appended to point ranges. +// for example we have an index (a, b), if the condition is (a > 1 and b = 2) +// then we can not build a conjunctive ranges for this index. +func (r *rangeBuilder) appendIndexRanges(origin []*IndexRange, rangePoints []rangePoint) []*IndexRange { + var newIndexRanges []*IndexRange + for i := 0; i < len(origin); i++ { + oRange := origin[i] + if !oRange.IsPoint() { + newIndexRanges = append(newIndexRanges, oRange) + } else { + newIndexRanges = append(newIndexRanges, r.appendIndexRange(oRange, rangePoints)...) + } + } + return newIndexRanges +} + +func (r *rangeBuilder) appendIndexRange(origin *IndexRange, rangePoints []rangePoint) []*IndexRange { + newRanges := make([]*IndexRange, 0, len(rangePoints)/2) + for i := 0; i < len(rangePoints); i += 2 { + startPoint := rangePoints[i] + lowVal := make([]types.Datum, len(origin.LowVal)+1) + copy(lowVal, origin.LowVal) + lowVal[len(origin.LowVal)] = startPoint.value + + endPoint := rangePoints[i+1] + highVal := make([]types.Datum, len(origin.HighVal)+1) + copy(highVal, origin.HighVal) + highVal[len(origin.HighVal)] = endPoint.value + + ir := &IndexRange{ + LowVal: lowVal, + LowExclude: startPoint.excl, + HighVal: highVal, + HighExclude: endPoint.excl, + } + newRanges = append(newRanges, ir) + } + return newRanges +} + +func (r *rangeBuilder) buildTableRanges(rangePoints []rangePoint) []TableRange { + tableRanges := make([]TableRange, 0, len(rangePoints)/2) + for i := 0; i < len(rangePoints); i += 2 { + startPoint := rangePoints[i] + if startPoint.value.Kind() == types.KindNull || startPoint.value.Kind() == types.KindMinNotNull { + startPoint.value.SetInt64(math.MinInt64) + } + startInt, err := types.ToInt64(startPoint.value.GetValue()) + if err != nil { + r.err = errors.Trace(err) + return tableRanges + } + startDatum := types.NewDatum(startInt) + cmp, err := startDatum.CompareDatum(startPoint.value) + if err != nil { + r.err = errors.Trace(err) + return tableRanges + } + if cmp < 0 || (cmp == 0 && startPoint.excl) { + startInt++ + } + endPoint := rangePoints[i+1] + if endPoint.value.Kind() == types.KindNull { + endPoint.value.SetInt64(math.MinInt64) + } else if endPoint.value.Kind() == types.KindMaxValue { + endPoint.value.SetInt64(math.MaxInt64) + } + endInt, err := types.ToInt64(endPoint.value.GetValue()) + if err != nil { + r.err = errors.Trace(err) + return tableRanges + } + endDatum := types.NewDatum(endInt) + cmp, err = endDatum.CompareDatum(endPoint.value) + if err != nil { + r.err = errors.Trace(err) + return tableRanges + } + if cmp > 0 || (cmp == 0 && endPoint.excl) { + endInt-- + } + if startInt > endInt { + continue + } + tableRanges = append(tableRanges, TableRange{LowVal: startInt, HighVal: endInt}) + } + return tableRanges +} diff --git a/vendor/github.com/pingcap/tidb/optimizer/plan/refiner.go b/vendor/github.com/pingcap/tidb/optimizer/plan/refiner.go new file mode 100644 index 000000000..7ca3f3bd8 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/optimizer/plan/refiner.go @@ -0,0 +1,193 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package plan + +import ( + "math" + + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/parser/opcode" + "github.com/pingcap/tidb/util/types" +) + +// Refine tries to build index or table range. +func Refine(p Plan) error { + r := refiner{} + p.Accept(&r) + return r.err +} + +type refiner struct { + err error +} + +func (r *refiner) Enter(in Plan) (Plan, bool) { + return in, false +} + +func (r *refiner) Leave(in Plan) (Plan, bool) { + switch x := in.(type) { + case *IndexScan: + r.buildIndexRange(x) + case *Limit: + x.SetLimit(0) + case *TableScan: + r.buildTableRange(x) + } + return in, r.err == nil +} + +var fullRange = []rangePoint{ + {start: true}, + {value: types.MaxValueDatum()}, +} + +func (r *refiner) buildIndexRange(p *IndexScan) { + rb := rangeBuilder{} + if p.AccessEqualCount > 0 { + // Build ranges for equal access conditions. + point := rb.build(p.AccessConditions[0]) + p.Ranges = rb.buildIndexRanges(point) + for i := 1; i < p.AccessEqualCount; i++ { + point = rb.build(p.AccessConditions[i]) + p.Ranges = rb.appendIndexRanges(p.Ranges, point) + } + } + rangePoints := fullRange + // Build rangePoints for non-equal access condtions. + for i := p.AccessEqualCount; i < len(p.AccessConditions); i++ { + rangePoints = rb.intersection(rangePoints, rb.build(p.AccessConditions[i])) + } + if p.AccessEqualCount == 0 { + p.Ranges = rb.buildIndexRanges(rangePoints) + } else if p.AccessEqualCount < len(p.AccessConditions) { + p.Ranges = rb.appendIndexRanges(p.Ranges, rangePoints) + } + r.err = rb.err + return +} + +func (r *refiner) buildTableRange(p *TableScan) { + if len(p.AccessConditions) == 0 { + p.Ranges = []TableRange{{math.MinInt64, math.MaxInt64}} + return + } + rb := rangeBuilder{} + rangePoints := fullRange + for _, cond := range p.AccessConditions { + rangePoints = rb.intersection(rangePoints, rb.build(cond)) + } + p.Ranges = rb.buildTableRanges(rangePoints) + r.err = rb.err +} + +// conditionChecker checks if this condition can be pushed to index plan. +type conditionChecker struct { + tableName model.CIStr + idx *model.IndexInfo + // the offset of the indexed column to be checked. + columnOffset int + pkName model.CIStr +} + +func (c *conditionChecker) check(condition ast.ExprNode) bool { + switch x := condition.(type) { + case *ast.BinaryOperationExpr: + return c.checkBinaryOperation(x) + case *ast.BetweenExpr: + if ast.IsPreEvaluable(x.Left) && ast.IsPreEvaluable(x.Right) && c.checkColumnExpr(x.Expr) { + return true + } + case *ast.ColumnNameExpr: + return c.checkColumnExpr(x) + case *ast.IsNullExpr: + if c.checkColumnExpr(x.Expr) { + return true + } + case *ast.IsTruthExpr: + if c.checkColumnExpr(x.Expr) { + return true + } + case *ast.ParenthesesExpr: + return c.check(x.Expr) + case *ast.PatternInExpr: + if x.Sel != nil || x.Not { + return false + } + if !c.checkColumnExpr(x.Expr) { + return false + } + for _, val := range x.List { + if !ast.IsPreEvaluable(val) { + return false + } + } + return true + case *ast.PatternLikeExpr: + if x.Not { + return false + } + if !c.checkColumnExpr(x.Expr) { + return false + } + if !ast.IsPreEvaluable(x.Pattern) { + return false + } + patternVal := x.Pattern.GetValue() + if patternVal == nil { + return false + } + patternStr, err := types.ToString(patternVal) + if err != nil { + return false + } + firstChar := patternStr[0] + return firstChar != '%' && firstChar != '.' + } + return false +} + +func (c *conditionChecker) checkBinaryOperation(b *ast.BinaryOperationExpr) bool { + switch b.Op { + case opcode.OrOr: + return c.check(b.L) && c.check(b.R) + case opcode.AndAnd: + return c.check(b.L) && c.check(b.R) + case opcode.EQ, opcode.NE, opcode.GE, opcode.GT, opcode.LE, opcode.LT: + if ast.IsPreEvaluable(b.L) { + return c.checkColumnExpr(b.R) + } else if ast.IsPreEvaluable(b.R) { + return c.checkColumnExpr(b.L) + } + } + return false +} + +func (c *conditionChecker) checkColumnExpr(expr ast.ExprNode) bool { + cn, ok := expr.(*ast.ColumnNameExpr) + if !ok { + return false + } + if cn.Refer.Table.Name.L != c.tableName.L { + return false + } + if c.pkName.L != "" { + return c.pkName.L == cn.Refer.Column.Name.L + } + if c.idx != nil { + return cn.Refer.Column.Name.L == c.idx.Columns[c.columnOffset].Name.L + } + return true +} diff --git a/vendor/github.com/pingcap/tidb/optimizer/plan/stringer.go b/vendor/github.com/pingcap/tidb/optimizer/plan/stringer.go new file mode 100644 index 000000000..9b2c8ed3c --- /dev/null +++ b/vendor/github.com/pingcap/tidb/optimizer/plan/stringer.go @@ -0,0 +1,89 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package plan + +import ( + "fmt" + "math" + "strings" +) + +// ToString explains a Plan, returns description string. +func ToString(p Plan) string { + var e stringer + p.Accept(&e) + return strings.Join(e.strs, "->") +} + +type stringer struct { + strs []string + idxs []int +} + +func (e *stringer) Enter(in Plan) (Plan, bool) { + switch in.(type) { + case *JoinOuter, *JoinInner: + e.idxs = append(e.idxs, len(e.strs)) + } + return in, false +} + +func (e *stringer) Leave(in Plan) (Plan, bool) { + var str string + switch x := in.(type) { + case *CheckTable: + str = "CheckTable" + case *IndexScan: + str = fmt.Sprintf("Index(%s.%s)", x.Table.Name.L, x.Index.Name.L) + case *Limit: + str = "Limit" + case *SelectFields: + str = "Fields" + case *SelectLock: + str = "Lock" + case *ShowDDL: + str = "ShowDDL" + case *Sort: + str = "Sort" + case *TableScan: + if len(x.Ranges) > 0 { + ran := x.Ranges[0] + if ran.LowVal != math.MinInt64 || ran.HighVal != math.MaxInt64 { + str = fmt.Sprintf("Range(%s)", x.Table.Name.L) + } else { + str = fmt.Sprintf("Table(%s)", x.Table.Name.L) + } + } else { + str = fmt.Sprintf("Table(%s)", x.Table.Name.L) + } + case *JoinOuter: + last := len(e.idxs) - 1 + idx := e.idxs[last] + chilrden := e.strs[idx:] + e.strs = e.strs[:idx] + str = "OuterJoin{" + strings.Join(chilrden, "->") + "}" + e.idxs = e.idxs[:last] + case *JoinInner: + last := len(e.idxs) - 1 + idx := e.idxs[last] + chilrden := e.strs[idx:] + e.strs = e.strs[:idx] + str = "InnerJoin{" + strings.Join(chilrden, "->") + "}" + e.idxs = e.idxs[:last] + default: + str = fmt.Sprintf("%T", in) + } + e.strs = append(e.strs, str) + return in, true +} diff --git a/vendor/github.com/pingcap/tidb/optimizer/preprocess.go b/vendor/github.com/pingcap/tidb/optimizer/preprocess.go new file mode 100644 index 000000000..d5b2337e4 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/optimizer/preprocess.go @@ -0,0 +1,29 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package optimizer + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/infoschema" +) + +// Preprocess does preprocess work for optimizer. +func Preprocess(node ast.Node, info infoschema.InfoSchema, ctx context.Context) error { + if err := ResolveName(node, info, ctx); err != nil { + return errors.Trace(err) + } + return nil +} diff --git a/vendor/github.com/pingcap/tidb/optimizer/resolver.go b/vendor/github.com/pingcap/tidb/optimizer/resolver.go new file mode 100644 index 000000000..bad755b26 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/optimizer/resolver.go @@ -0,0 +1,924 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package optimizer + +import ( + "fmt" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/column" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/infoschema" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/sessionctx/db" + "github.com/pingcap/tidb/util/types" +) + +// ResolveName resolves table name and column name. +// It generates ResultFields for ResultSetNode and resolves ColumnNameExpr to a ResultField. +func ResolveName(node ast.Node, info infoschema.InfoSchema, ctx context.Context) error { + defaultSchema := db.GetCurrentSchema(ctx) + resolver := nameResolver{Info: info, Ctx: ctx, DefaultSchema: model.NewCIStr(defaultSchema)} + node.Accept(&resolver) + return errors.Trace(resolver.Err) +} + +// nameResolver is the visitor to resolve table name and column name. +// In general, a reference can only refer to information that are available for it. +// So children elements are visited in the order that previous elements make information +// available for following elements. +// +// During visiting, information are collected and stored in resolverContext. +// When we enter a subquery, a new resolverContext is pushed to the contextStack, so subquery +// information can overwrite outer query information. When we look up for a column reference, +// we look up from top to bottom in the contextStack. +type nameResolver struct { + Info infoschema.InfoSchema + Ctx context.Context + DefaultSchema model.CIStr + Err error + useOuterContext bool + + contextStack []*resolverContext +} + +// resolverContext stores information in a single level of select statement +// that table name and column name can be resolved. +type resolverContext struct { + /* For Select Statement. */ + // table map to lookup and check table name conflict. + tableMap map[string]int + // table map to lookup and check derived-table(subselect) name conflict. + derivedTableMap map[string]int + // tableSources collected in from clause. + tables []*ast.TableSource + // result fields collected in select field list. + fieldList []*ast.ResultField + // result fields collected in group by clause. + groupBy []*ast.ResultField + + // The join node stack is used by on condition to find out + // available tables to reference. On condition can only + // refer to tables involved in current join. + joinNodeStack []*ast.Join + + // When visiting TableRefs, tables in this context are not available + // because it is being collected. + inTableRefs bool + // When visiting on conditon only tables in current join node are available. + inOnCondition bool + // When visiting field list, fieldList in this context are not available. + inFieldList bool + // When visiting group by, groupBy fields are not available. + inGroupBy bool + // When visiting having, only fieldList and groupBy fields are available. + inHaving bool + // When visiting having, checks if the expr is an aggregate function expr. + inHavingAgg bool + // OrderBy clause has different resolving rule than group by. + inOrderBy bool + // When visiting column name in ByItem, we should know if the column name is in an expression. + inByItemExpression bool + // If subquery use outer context. + useOuterContext bool + // When visiting multi-table delete stmt table list. + inDeleteTableList bool + // When visiting create/drop table statement. + inCreateOrDropTable bool + // When visiting show statement. + inShow bool +} + +// currentContext gets the current resolverContext. +func (nr *nameResolver) currentContext() *resolverContext { + stackLen := len(nr.contextStack) + if stackLen == 0 { + return nil + } + return nr.contextStack[stackLen-1] +} + +// pushContext is called when we enter a statement. +func (nr *nameResolver) pushContext() { + nr.contextStack = append(nr.contextStack, &resolverContext{ + tableMap: map[string]int{}, + derivedTableMap: map[string]int{}, + }) +} + +// popContext is called when we leave a statement. +func (nr *nameResolver) popContext() { + nr.contextStack = nr.contextStack[:len(nr.contextStack)-1] +} + +// pushJoin is called when we enter a join node. +func (nr *nameResolver) pushJoin(j *ast.Join) { + ctx := nr.currentContext() + ctx.joinNodeStack = append(ctx.joinNodeStack, j) +} + +// popJoin is called when we leave a join node. +func (nr *nameResolver) popJoin() { + ctx := nr.currentContext() + ctx.joinNodeStack = ctx.joinNodeStack[:len(ctx.joinNodeStack)-1] +} + +// Enter implements ast.Visitor interface. +func (nr *nameResolver) Enter(inNode ast.Node) (outNode ast.Node, skipChildren bool) { + switch v := inNode.(type) { + case *ast.AdminStmt: + nr.pushContext() + case *ast.AggregateFuncExpr: + ctx := nr.currentContext() + if ctx.inHaving { + ctx.inHavingAgg = true + } + case *ast.AlterTableStmt: + nr.pushContext() + case *ast.ByItem: + if _, ok := v.Expr.(*ast.ColumnNameExpr); !ok { + // If ByItem is not a single column name expression, + // the resolving rule is different from order by clause. + nr.currentContext().inByItemExpression = true + } + if nr.currentContext().inGroupBy { + // make sure item is not aggregate function + if ast.HasAggFlag(v.Expr) { + nr.Err = ErrInvalidGroupFuncUse + return inNode, true + } + } + case *ast.CreateIndexStmt: + nr.pushContext() + case *ast.CreateTableStmt: + nr.pushContext() + nr.currentContext().inCreateOrDropTable = true + case *ast.DeleteStmt: + nr.pushContext() + case *ast.DeleteTableList: + nr.currentContext().inDeleteTableList = true + case *ast.DoStmt: + nr.pushContext() + case *ast.DropTableStmt: + nr.pushContext() + nr.currentContext().inCreateOrDropTable = true + case *ast.DropIndexStmt: + nr.pushContext() + case *ast.FieldList: + nr.currentContext().inFieldList = true + case *ast.GroupByClause: + nr.currentContext().inGroupBy = true + case *ast.HavingClause: + nr.currentContext().inHaving = true + case *ast.InsertStmt: + nr.pushContext() + case *ast.Join: + nr.pushJoin(v) + case *ast.OnCondition: + nr.currentContext().inOnCondition = true + case *ast.OrderByClause: + nr.currentContext().inOrderBy = true + case *ast.SelectStmt: + nr.pushContext() + case *ast.SetStmt: + for _, assign := range v.Variables { + if cn, ok := assign.Value.(*ast.ColumnNameExpr); ok && cn.Name.Table.L == "" { + // Convert column name expression to string value expression. + assign.Value = ast.NewValueExpr(cn.Name.Name.O) + } + } + nr.pushContext() + case *ast.ShowStmt: + nr.pushContext() + nr.currentContext().inShow = true + nr.fillShowFields(v) + case *ast.TableRefsClause: + nr.currentContext().inTableRefs = true + case *ast.TruncateTableStmt: + nr.pushContext() + case *ast.UnionStmt: + nr.pushContext() + case *ast.UpdateStmt: + nr.pushContext() + } + return inNode, false +} + +// Leave implements ast.Visitor interface. +func (nr *nameResolver) Leave(inNode ast.Node) (node ast.Node, ok bool) { + switch v := inNode.(type) { + case *ast.AdminStmt: + nr.popContext() + case *ast.AggregateFuncExpr: + ctx := nr.currentContext() + if ctx.inHaving { + ctx.inHavingAgg = false + } + case *ast.AlterTableStmt: + nr.popContext() + case *ast.TableName: + nr.handleTableName(v) + case *ast.ColumnNameExpr: + nr.handleColumnName(v) + case *ast.CreateIndexStmt: + nr.popContext() + case *ast.CreateTableStmt: + nr.popContext() + case *ast.DeleteTableList: + nr.currentContext().inDeleteTableList = false + case *ast.DoStmt: + nr.popContext() + case *ast.DropIndexStmt: + nr.popContext() + case *ast.DropTableStmt: + nr.popContext() + case *ast.TableSource: + nr.handleTableSource(v) + case *ast.OnCondition: + nr.currentContext().inOnCondition = false + case *ast.Join: + nr.handleJoin(v) + nr.popJoin() + case *ast.TableRefsClause: + nr.currentContext().inTableRefs = false + case *ast.FieldList: + nr.handleFieldList(v) + nr.currentContext().inFieldList = false + case *ast.GroupByClause: + ctx := nr.currentContext() + ctx.inGroupBy = false + for _, item := range v.Items { + switch x := item.Expr.(type) { + case *ast.ColumnNameExpr: + ctx.groupBy = append(ctx.groupBy, x.Refer) + } + } + case *ast.HavingClause: + nr.currentContext().inHaving = false + case *ast.OrderByClause: + nr.currentContext().inOrderBy = false + case *ast.ByItem: + nr.currentContext().inByItemExpression = false + case *ast.PositionExpr: + nr.handlePosition(v) + case *ast.SelectStmt: + ctx := nr.currentContext() + v.SetResultFields(ctx.fieldList) + if ctx.useOuterContext { + nr.useOuterContext = true + } + nr.popContext() + case *ast.SetStmt: + nr.popContext() + case *ast.ShowStmt: + nr.popContext() + case *ast.SubqueryExpr: + if nr.useOuterContext { + // TODO: check this + // If there is a deep nest of subquery, there may be something wrong. + v.UseOuterContext = true + nr.useOuterContext = false + } + case *ast.TruncateTableStmt: + nr.popContext() + case *ast.UnionStmt: + ctx := nr.currentContext() + v.SetResultFields(ctx.fieldList) + if ctx.useOuterContext { + nr.useOuterContext = true + } + nr.popContext() + case *ast.UnionSelectList: + nr.handleUnionSelectList(v) + case *ast.InsertStmt: + nr.popContext() + case *ast.DeleteStmt: + nr.popContext() + case *ast.UpdateStmt: + nr.popContext() + } + return inNode, nr.Err == nil +} + +// handleTableName looks up and sets the schema information and result fields for table name. +func (nr *nameResolver) handleTableName(tn *ast.TableName) { + if tn.Schema.L == "" { + tn.Schema = nr.DefaultSchema + } + ctx := nr.currentContext() + if ctx.inCreateOrDropTable { + // The table may not exist in create table or drop table statement. + // Skip resolving the table to avoid error. + return + } + if ctx.inDeleteTableList { + idx, ok := ctx.tableMap[nr.tableUniqueName(tn.Schema, tn.Name)] + if !ok { + nr.Err = errors.Errorf("Unknown table %s", tn.Name.O) + return + } + ts := ctx.tables[idx] + tableName := ts.Source.(*ast.TableName) + tn.DBInfo = tableName.DBInfo + tn.TableInfo = tableName.TableInfo + tn.SetResultFields(tableName.GetResultFields()) + return + } + table, err := nr.Info.TableByName(tn.Schema, tn.Name) + if err != nil { + nr.Err = errors.Trace(err) + return + } + tn.TableInfo = table.Meta() + dbInfo, _ := nr.Info.SchemaByName(tn.Schema) + tn.DBInfo = dbInfo + + rfs := make([]*ast.ResultField, 0, len(tn.TableInfo.Columns)) + for _, v := range tn.TableInfo.Columns { + if v.State != model.StatePublic { + continue + } + expr := &ast.ValueExpr{} + expr.SetType(&v.FieldType) + rf := &ast.ResultField{ + Column: v, + Table: tn.TableInfo, + DBName: tn.Schema, + Expr: expr, + TableName: tn, + } + rfs = append(rfs, rf) + } + tn.SetResultFields(rfs) + return +} + +// handleTableSources checks name duplication +// and puts the table source in current resolverContext. +// Note: +// "select * from t as a join (select 1) as a;" is not duplicate. +// "select * from t as a join t as a;" is duplicate. +// "select * from (select 1) as a join (select 1) as a;" is duplicate. +func (nr *nameResolver) handleTableSource(ts *ast.TableSource) { + for _, v := range ts.GetResultFields() { + v.TableAsName = ts.AsName + } + ctx := nr.currentContext() + switch ts.Source.(type) { + case *ast.TableName: + var name string + if ts.AsName.L != "" { + name = ts.AsName.L + } else { + tableName := ts.Source.(*ast.TableName) + name = nr.tableUniqueName(tableName.Schema, tableName.Name) + } + if _, ok := ctx.tableMap[name]; ok { + nr.Err = errors.Errorf("duplicated table/alias name %s", name) + return + } + ctx.tableMap[name] = len(ctx.tables) + case *ast.SelectStmt: + name := ts.AsName.L + if _, ok := ctx.derivedTableMap[name]; ok { + nr.Err = errors.Errorf("duplicated table/alias name %s", name) + return + } + ctx.derivedTableMap[name] = len(ctx.tables) + } + dupNames := make(map[string]struct{}, len(ts.GetResultFields())) + for _, f := range ts.GetResultFields() { + // duplicate column name in one table is not allowed. + // "select * from (select 1, 1) as a;" is duplicate. + name := f.ColumnAsName.L + if name == "" { + name = f.Column.Name.L + } + if _, ok := dupNames[name]; ok { + nr.Err = errors.Errorf("Duplicate column name '%s'", name) + return + } + dupNames[name] = struct{}{} + } + ctx.tables = append(ctx.tables, ts) + return +} + +// handleJoin sets result fields for join. +func (nr *nameResolver) handleJoin(j *ast.Join) { + if j.Right == nil { + j.SetResultFields(j.Left.GetResultFields()) + return + } + leftLen := len(j.Left.GetResultFields()) + rightLen := len(j.Right.GetResultFields()) + rfs := make([]*ast.ResultField, leftLen+rightLen) + copy(rfs, j.Left.GetResultFields()) + copy(rfs[leftLen:], j.Right.GetResultFields()) + j.SetResultFields(rfs) +} + +// handleColumnName looks up and sets ResultField for +// the column name. +func (nr *nameResolver) handleColumnName(cn *ast.ColumnNameExpr) { + ctx := nr.currentContext() + if ctx.inOnCondition { + // In on condition, only tables within current join is available. + nr.resolveColumnNameInOnCondition(cn) + return + } + + // Try to resolve the column name form top to bottom in the context stack. + for i := len(nr.contextStack) - 1; i >= 0; i-- { + if nr.resolveColumnNameInContext(nr.contextStack[i], cn) { + // Column is already resolved or encountered an error. + if i < len(nr.contextStack)-1 { + // If in subselect, the query use outer query. + nr.currentContext().useOuterContext = true + } + return + } + } + nr.Err = errors.Errorf("unknown column %s", cn.Name.Name.L) +} + +// resolveColumnNameInContext looks up and sets ResultField for a column with the ctx. +func (nr *nameResolver) resolveColumnNameInContext(ctx *resolverContext, cn *ast.ColumnNameExpr) bool { + if ctx.inTableRefs { + // In TableRefsClause, column reference only in join on condition which is handled before. + return false + } + if ctx.inFieldList { + // only resolve column using tables. + return nr.resolveColumnInTableSources(cn, ctx.tables) + } + if ctx.inGroupBy { + // From tables first, then field list. + // If ctx.InByItemExpression is true, the item is not an identifier. + // Otherwise it is an identifier. + if ctx.inByItemExpression { + // From table first, then field list. + if nr.resolveColumnInTableSources(cn, ctx.tables) { + return true + } + found := nr.resolveColumnInResultFields(ctx, cn, ctx.fieldList) + if nr.Err == nil && found { + // Check if resolved refer is an aggregate function expr. + if _, ok := cn.Refer.Expr.(*ast.AggregateFuncExpr); ok { + nr.Err = ErrIllegalReference.Gen("Reference '%s' not supported (reference to group function)", cn.Name.Name.O) + } + } + return found + } + // Resolve from table first, then from select list. + found := nr.resolveColumnInTableSources(cn, ctx.tables) + if nr.Err != nil { + return found + } + // We should copy the refer here. + // Because if the ByItem is an identifier, we should check if it + // is ambiguous even it is already resolved from table source. + // If the ByItem is not an identifier, we do not need the second check. + r := cn.Refer + if nr.resolveColumnInResultFields(ctx, cn, ctx.fieldList) { + if nr.Err != nil { + return true + } + if r != nil { + // It is not ambiguous and already resolved from table source. + // We should restore its Refer. + cn.Refer = r + } + if _, ok := cn.Refer.Expr.(*ast.AggregateFuncExpr); ok { + nr.Err = ErrIllegalReference.Gen("Reference '%s' not supported (reference to group function)", cn.Name.Name.O) + } + return true + } + return found + } + if ctx.inHaving { + // First group by, then field list. + if nr.resolveColumnInResultFields(ctx, cn, ctx.groupBy) { + return true + } + if ctx.inHavingAgg { + // If cn is in an aggregate function in having clause, check tablesource first. + if nr.resolveColumnInTableSources(cn, ctx.tables) { + return true + } + } + return nr.resolveColumnInResultFields(ctx, cn, ctx.fieldList) + } + if ctx.inOrderBy { + if nr.resolveColumnInResultFields(ctx, cn, ctx.groupBy) { + return true + } + if ctx.inByItemExpression { + // From table first, then field list. + if nr.resolveColumnInTableSources(cn, ctx.tables) { + return true + } + return nr.resolveColumnInResultFields(ctx, cn, ctx.fieldList) + } + // Field list first, then from table. + if nr.resolveColumnInResultFields(ctx, cn, ctx.fieldList) { + return true + } + return nr.resolveColumnInTableSources(cn, ctx.tables) + } + if ctx.inShow { + return nr.resolveColumnInResultFields(ctx, cn, ctx.fieldList) + } + // In where clause. + return nr.resolveColumnInTableSources(cn, ctx.tables) +} + +// resolveColumnNameInOnCondition resolves the column name in current join. +func (nr *nameResolver) resolveColumnNameInOnCondition(cn *ast.ColumnNameExpr) { + ctx := nr.currentContext() + join := ctx.joinNodeStack[len(ctx.joinNodeStack)-1] + tableSources := appendTableSources(nil, join) + if !nr.resolveColumnInTableSources(cn, tableSources) { + nr.Err = errors.Errorf("unkown column name %s", cn.Name.Name.O) + } +} + +func (nr *nameResolver) resolveColumnInTableSources(cn *ast.ColumnNameExpr, tableSources []*ast.TableSource) (done bool) { + var matchedResultField *ast.ResultField + tableNameL := cn.Name.Table.L + columnNameL := cn.Name.Name.L + if tableNameL != "" { + var matchedTable ast.ResultSetNode + for _, ts := range tableSources { + if tableNameL == ts.AsName.L { + // different table name. + matchedTable = ts + break + } else if ts.AsName.L != "" { + // Table as name shadows table real name. + continue + } + if tn, ok := ts.Source.(*ast.TableName); ok { + if cn.Name.Schema.L != "" && cn.Name.Schema.L != tn.Schema.L { + continue + } + if tableNameL == tn.Name.L { + matchedTable = ts + } + } + } + if matchedTable != nil { + resultFields := matchedTable.GetResultFields() + for _, rf := range resultFields { + if rf.ColumnAsName.L == columnNameL || rf.Column.Name.L == columnNameL { + // resolve column. + matchedResultField = rf + break + } + } + } + } else { + for _, ts := range tableSources { + rfs := ts.GetResultFields() + for _, rf := range rfs { + matchAsName := rf.ColumnAsName.L != "" && rf.ColumnAsName.L == columnNameL + matchColumnName := rf.ColumnAsName.L == "" && rf.Column.Name.L == columnNameL + if matchAsName || matchColumnName { + if matchedResultField != nil { + nr.Err = errors.Errorf("column %s is ambiguous.", cn.Name.Name.O) + return true + } + matchedResultField = rf + } + } + } + } + if matchedResultField != nil { + // Bind column. + cn.Refer = matchedResultField + return true + } + return false +} + +func (nr *nameResolver) resolveColumnInResultFields(ctx *resolverContext, cn *ast.ColumnNameExpr, rfs []*ast.ResultField) bool { + var matched *ast.ResultField + for _, rf := range rfs { + if cn.Name.Table.L != "" { + // Check table name + if rf.TableAsName.L != "" { + if cn.Name.Table.L != rf.TableAsName.L { + continue + } + } else if cn.Name.Table.L != rf.Table.Name.L { + continue + } + } + matchAsName := cn.Name.Name.L == rf.ColumnAsName.L + var matchColumnName bool + if ctx.inHaving { + matchColumnName = cn.Name.Name.L == rf.Column.Name.L + } else { + matchColumnName = rf.ColumnAsName.L == "" && cn.Name.Name.L == rf.Column.Name.L + } + if matchAsName || matchColumnName { + if rf.Column.Name.L == "" { + // This is not a real table column, resolve it directly. + cn.Refer = rf + return true + } + if matched == nil { + matched = rf + } else { + sameColumn := matched.TableName == rf.TableName && matched.Column.Name.L == rf.Column.Name.L + if !sameColumn { + nr.Err = errors.Errorf("column %s is ambiguous.", cn.Name.Name.O) + return true + } + } + } + } + if matched != nil { + // If in GroupBy, we clone the ResultField + if ctx.inGroupBy || ctx.inHaving || ctx.inOrderBy { + nf := *matched + expr := matched.Expr + if cexpr, ok := expr.(*ast.ColumnNameExpr); ok { + expr = cexpr.Refer.Expr + } + nf.Expr = expr + matched = &nf + } + // Bind column. + cn.Refer = matched + return true + } + return false +} + +// handleFieldList expands wild card field and sets fieldList in current context. +func (nr *nameResolver) handleFieldList(fieldList *ast.FieldList) { + var resultFields []*ast.ResultField + for _, v := range fieldList.Fields { + resultFields = append(resultFields, nr.createResultFields(v)...) + } + nr.currentContext().fieldList = resultFields +} + +func getInnerFromParentheses(expr ast.ExprNode) ast.ExprNode { + if pexpr, ok := expr.(*ast.ParenthesesExpr); ok { + return getInnerFromParentheses(pexpr.Expr) + } + return expr +} + +// createResultFields creates result field list for a single select field. +func (nr *nameResolver) createResultFields(field *ast.SelectField) (rfs []*ast.ResultField) { + ctx := nr.currentContext() + if field.WildCard != nil { + if len(ctx.tables) == 0 { + nr.Err = errors.New("No table used.") + return + } + tableRfs := []*ast.ResultField{} + if field.WildCard.Table.L == "" { + for _, v := range ctx.tables { + tableRfs = append(tableRfs, v.GetResultFields()...) + } + } else { + name := nr.tableUniqueName(field.WildCard.Schema, field.WildCard.Table) + tableIdx, ok1 := ctx.tableMap[name] + derivedTableIdx, ok2 := ctx.derivedTableMap[name] + if !ok1 && !ok2 { + nr.Err = errors.Errorf("unknown table %s.", field.WildCard.Table.O) + } + if ok1 { + tableRfs = ctx.tables[tableIdx].GetResultFields() + } + if ok2 { + tableRfs = append(tableRfs, ctx.tables[derivedTableIdx].GetResultFields()...) + } + + } + for _, trf := range tableRfs { + // Convert it to ColumnNameExpr + cn := &ast.ColumnName{ + Schema: trf.DBName, + Table: trf.Table.Name, + Name: trf.ColumnAsName, + } + cnExpr := &ast.ColumnNameExpr{ + Name: cn, + Refer: trf, + } + ast.SetFlag(cnExpr) + cnExpr.SetType(trf.Expr.GetType()) + rf := *trf + rf.Expr = cnExpr + rfs = append(rfs, &rf) + } + return + } + // The column is visited before so it must has been resolved already. + rf := &ast.ResultField{ColumnAsName: field.AsName} + innerExpr := getInnerFromParentheses(field.Expr) + switch v := innerExpr.(type) { + case *ast.ColumnNameExpr: + rf.Column = v.Refer.Column + rf.Table = v.Refer.Table + rf.DBName = v.Refer.DBName + rf.TableName = v.Refer.TableName + rf.Expr = v + default: + rf.Column = &model.ColumnInfo{} // Empty column info. + rf.Table = &model.TableInfo{} // Empty table info. + rf.Expr = v + } + if field.AsName.L == "" { + switch x := innerExpr.(type) { + case *ast.ColumnNameExpr: + rf.ColumnAsName = model.NewCIStr(x.Name.Name.O) + case *ast.ValueExpr: + if innerExpr.Text() != "" { + rf.ColumnAsName = model.NewCIStr(innerExpr.Text()) + } else { + rf.ColumnAsName = model.NewCIStr(field.Text()) + } + default: + rf.ColumnAsName = model.NewCIStr(field.Text()) + } + } + rfs = append(rfs, rf) + return +} + +func appendTableSources(in []*ast.TableSource, resultSetNode ast.ResultSetNode) (out []*ast.TableSource) { + switch v := resultSetNode.(type) { + case *ast.TableSource: + out = append(in, v) + case *ast.Join: + out = appendTableSources(in, v.Left) + if v.Right != nil { + out = appendTableSources(out, v.Right) + } + } + return +} + +func (nr *nameResolver) tableUniqueName(schema, table model.CIStr) string { + if schema.L != "" && schema.L != nr.DefaultSchema.L { + return schema.L + "." + table.L + } + return table.L +} + +func (nr *nameResolver) handlePosition(pos *ast.PositionExpr) { + ctx := nr.currentContext() + if pos.N < 1 || pos.N > len(ctx.fieldList) { + nr.Err = errors.Errorf("Unknown column '%d'", pos.N) + return + } + matched := ctx.fieldList[pos.N-1] + nf := *matched + expr := matched.Expr + if cexpr, ok := expr.(*ast.ColumnNameExpr); ok { + expr = cexpr.Refer.Expr + } + nf.Expr = expr + pos.Refer = &nf + if nr.currentContext().inGroupBy { + // make sure item is not aggregate function + if ast.HasAggFlag(pos.Refer.Expr) { + nr.Err = errors.New("group by cannot contain aggregate function") + } + } +} + +func (nr *nameResolver) handleUnionSelectList(u *ast.UnionSelectList) { + firstSelFields := u.Selects[0].GetResultFields() + unionFields := make([]*ast.ResultField, len(firstSelFields)) + // Copy first result fields, because we may change the result field type. + for i, v := range firstSelFields { + rf := *v + col := *v.Column + rf.Column = &col + if rf.Column.Flen == 0 { + rf.Column.Flen = types.UnspecifiedLength + } + rf.Expr = &ast.ValueExpr{} + unionFields[i] = &rf + } + nr.currentContext().fieldList = unionFields +} + +func (nr *nameResolver) fillShowFields(s *ast.ShowStmt) { + if s.DBName == "" { + if s.Table != nil && s.Table.Schema.L != "" { + s.DBName = s.Table.Schema.O + } else { + s.DBName = nr.DefaultSchema.O + } + } else if s.Table != nil && s.Table.Schema.L == "" { + s.Table.Schema = model.NewCIStr(s.DBName) + } + var fields []*ast.ResultField + var ( + names []string + ftypes []byte + ) + switch s.Tp { + case ast.ShowEngines: + names = []string{"Engine", "Support", "Comment", "Transactions", "XA", "Savepoints"} + case ast.ShowDatabases: + names = []string{"Database"} + case ast.ShowTables: + names = []string{fmt.Sprintf("Tables_in_%s", s.DBName)} + if s.Full { + names = append(names, "Table_type") + } + case ast.ShowTableStatus: + names = []string{"Name", "Engine", "Version", "Row_format", "Rows", "Avg_row_length", + "Data_length", "Max_data_length", "Index_length", "Data_free", "Auto_increment", + "Create_time", "Update_time", "Check_time", "Collation", "Checksum", + "Create_options", "Comment"} + ftypes = []byte{mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeLonglong, mysql.TypeVarchar, mysql.TypeLonglong, mysql.TypeLonglong, + mysql.TypeLonglong, mysql.TypeLonglong, mysql.TypeLonglong, mysql.TypeLonglong, mysql.TypeLonglong, + mysql.TypeDatetime, mysql.TypeDatetime, mysql.TypeDatetime, mysql.TypeVarchar, mysql.TypeVarchar, + mysql.TypeVarchar, mysql.TypeVarchar} + case ast.ShowColumns: + names = column.ColDescFieldNames(s.Full) + case ast.ShowWarnings: + names = []string{"Level", "Code", "Message"} + ftypes = []byte{mysql.TypeVarchar, mysql.TypeLong, mysql.TypeVarchar} + case ast.ShowCharset: + names = []string{"Charset", "Description", "Default collation", "Maxlen"} + ftypes = []byte{mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeLonglong} + case ast.ShowVariables: + names = []string{"Variable_name", "Value"} + case ast.ShowStatus: + names = []string{"Variable_name", "Value"} + case ast.ShowCollation: + names = []string{"Collation", "Charset", "Id", "Default", "Compiled", "Sortlen"} + ftypes = []byte{mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeLonglong, + mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeLonglong} + case ast.ShowCreateTable: + names = []string{"Table", "Create Table"} + case ast.ShowGrants: + names = []string{fmt.Sprintf("Grants for %s", s.User)} + case ast.ShowTriggers: + names = []string{"Trigger", "Event", "Table", "Statement", "Timing", "Created", + "sql_mode", "Definer", "character_set_client", "collation_connection", "Database Collation"} + ftypes = []byte{mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeVarchar, + mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeVarchar} + case ast.ShowProcedureStatus: + names = []string{} + ftypes = []byte{} + case ast.ShowIndex: + names = []string{"Table", "Non_unique", "Key_name", "Seq_in_index", + "Column_name", "Collation", "Cardinality", "Sub_part", "Packed", + "Null", "Index_type", "Comment", "Index_comment"} + ftypes = []byte{mysql.TypeVarchar, mysql.TypeLonglong, mysql.TypeVarchar, mysql.TypeLonglong, + mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeLonglong, mysql.TypeLonglong, + mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeVarchar, mysql.TypeVarchar} + } + for i, name := range names { + f := &ast.ResultField{ + ColumnAsName: model.NewCIStr(name), + Column: &model.ColumnInfo{}, // Empty column info. + Table: &model.TableInfo{}, // Empty table info. + } + if ftypes == nil || ftypes[i] == 0 { + // use varchar as the default return column type + f.Column.Tp = mysql.TypeVarchar + } else { + f.Column.Tp = ftypes[i] + } + f.Column.Charset, f.Column.Collate = types.DefaultCharsetForType(f.Column.Tp) + f.Expr = &ast.ValueExpr{} + f.Expr.SetType(&f.Column.FieldType) + fields = append(fields, f) + } + + if s.Pattern != nil && s.Pattern.Expr == nil { + rf := fields[0] + s.Pattern.Expr = &ast.ColumnNameExpr{ + Name: &ast.ColumnName{Name: rf.ColumnAsName}, + } + ast.SetFlag(s.Pattern) + } + s.SetResultFields(fields) + nr.currentContext().fieldList = fields +} diff --git a/vendor/github.com/pingcap/tidb/optimizer/typeinferer.go b/vendor/github.com/pingcap/tidb/optimizer/typeinferer.go new file mode 100644 index 000000000..837e7bb9a --- /dev/null +++ b/vendor/github.com/pingcap/tidb/optimizer/typeinferer.go @@ -0,0 +1,349 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package optimizer + +import ( + "strings" + + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/parser/opcode" + "github.com/pingcap/tidb/util/charset" + "github.com/pingcap/tidb/util/types" +) + +// InferType infers result type for ast.ExprNode. +func InferType(node ast.Node) error { + var inferrer typeInferrer + // TODO: get the default charset from ctx + inferrer.defaultCharset = "utf8" + node.Accept(&inferrer) + return inferrer.err +} + +type typeInferrer struct { + err error + defaultCharset string +} + +func (v *typeInferrer) Enter(in ast.Node) (out ast.Node, skipChildren bool) { + return in, false +} + +func (v *typeInferrer) Leave(in ast.Node) (out ast.Node, ok bool) { + switch x := in.(type) { + case *ast.AggregateFuncExpr: + v.aggregateFunc(x) + case *ast.BetweenExpr: + x.SetType(types.NewFieldType(mysql.TypeLonglong)) + x.Type.Charset = charset.CharsetBin + x.Type.Collate = charset.CollationBin + case *ast.BinaryOperationExpr: + v.binaryOperation(x) + case *ast.CaseExpr: + v.handleCaseExpr(x) + case *ast.ColumnNameExpr: + x.SetType(&x.Refer.Column.FieldType) + case *ast.CompareSubqueryExpr: + x.SetType(types.NewFieldType(mysql.TypeLonglong)) + x.Type.Charset = charset.CharsetBin + x.Type.Collate = charset.CollationBin + case *ast.ExistsSubqueryExpr: + x.SetType(types.NewFieldType(mysql.TypeLonglong)) + x.Type.Charset = charset.CharsetBin + x.Type.Collate = charset.CollationBin + case *ast.FuncCallExpr: + v.handleFuncCallExpr(x) + case *ast.FuncCastExpr: + x.SetType(x.Tp) + if len(x.Type.Charset) == 0 { + x.Type.Charset, x.Type.Collate = types.DefaultCharsetForType(x.Type.Tp) + } + case *ast.IsNullExpr: + x.SetType(types.NewFieldType(mysql.TypeLonglong)) + x.Type.Charset = charset.CharsetBin + x.Type.Collate = charset.CollationBin + case *ast.IsTruthExpr: + x.SetType(types.NewFieldType(mysql.TypeLonglong)) + x.Type.Charset = charset.CharsetBin + x.Type.Collate = charset.CollationBin + case *ast.ParamMarkerExpr: + x.SetType(types.DefaultTypeForValue(x.GetValue())) + case *ast.ParenthesesExpr: + x.SetType(x.Expr.GetType()) + case *ast.PatternInExpr: + x.SetType(types.NewFieldType(mysql.TypeLonglong)) + x.Type.Charset = charset.CharsetBin + x.Type.Collate = charset.CollationBin + case *ast.PatternLikeExpr: + x.SetType(types.NewFieldType(mysql.TypeLonglong)) + x.Type.Charset = charset.CharsetBin + x.Type.Collate = charset.CollationBin + case *ast.PatternRegexpExpr: + x.SetType(types.NewFieldType(mysql.TypeLonglong)) + x.Type.Charset = charset.CharsetBin + x.Type.Collate = charset.CollationBin + case *ast.SelectStmt: + v.selectStmt(x) + case *ast.UnaryOperationExpr: + v.unaryOperation(x) + case *ast.ValueExpr: + v.handleValueExpr(x) + case *ast.ValuesExpr: + v.handleValuesExpr(x) + case *ast.VariableExpr: + x.SetType(types.NewFieldType(mysql.TypeVarString)) + x.Type.Charset = v.defaultCharset + cln, err := charset.GetDefaultCollation(v.defaultCharset) + if err != nil { + v.err = err + } + x.Type.Collate = cln + // TODO: handle all expression types. + } + return in, true +} + +func (v *typeInferrer) selectStmt(x *ast.SelectStmt) { + rf := x.GetResultFields() + for _, val := range rf { + // column ID is 0 means it is not a real column from table, but a temporary column, + // so its type is not pre-defined, we need to set it. + if val.Column.ID == 0 && val.Expr.GetType() != nil { + val.Column.FieldType = *(val.Expr.GetType()) + } + } +} + +func (v *typeInferrer) aggregateFunc(x *ast.AggregateFuncExpr) { + name := strings.ToLower(x.F) + switch name { + case ast.AggFuncCount: + ft := types.NewFieldType(mysql.TypeLonglong) + ft.Flen = 21 + ft.Charset = charset.CharsetBin + ft.Collate = charset.CollationBin + x.SetType(ft) + case ast.AggFuncMax, ast.AggFuncMin: + x.SetType(x.Args[0].GetType()) + case ast.AggFuncSum, ast.AggFuncAvg: + ft := types.NewFieldType(mysql.TypeNewDecimal) + ft.Charset = charset.CharsetBin + ft.Collate = charset.CollationBin + x.SetType(ft) + case ast.AggFuncGroupConcat: + ft := types.NewFieldType(mysql.TypeVarString) + ft.Charset = v.defaultCharset + cln, err := charset.GetDefaultCollation(v.defaultCharset) + if err != nil { + v.err = err + } + ft.Collate = cln + x.SetType(ft) + } +} + +func (v *typeInferrer) binaryOperation(x *ast.BinaryOperationExpr) { + switch x.Op { + case opcode.AndAnd, opcode.OrOr, opcode.LogicXor: + x.Type = types.NewFieldType(mysql.TypeLonglong) + case opcode.LT, opcode.LE, opcode.GE, opcode.GT, opcode.EQ, opcode.NE, opcode.NullEQ: + x.Type = types.NewFieldType(mysql.TypeLonglong) + case opcode.RightShift, opcode.LeftShift, opcode.And, opcode.Or, opcode.Xor: + x.Type = types.NewFieldType(mysql.TypeLonglong) + x.Type.Flag |= mysql.UnsignedFlag + case opcode.IntDiv: + x.Type = types.NewFieldType(mysql.TypeLonglong) + case opcode.Plus, opcode.Minus, opcode.Mul, opcode.Mod: + if x.L.GetType() != nil && x.R.GetType() != nil { + xTp := mergeArithType(x.L.GetType().Tp, x.R.GetType().Tp) + x.Type = types.NewFieldType(xTp) + leftUnsigned := x.L.GetType().Flag & mysql.UnsignedFlag + rightUnsigned := x.R.GetType().Flag & mysql.UnsignedFlag + // If both operands are unsigned, result is unsigned. + x.Type.Flag |= (leftUnsigned & rightUnsigned) + } + case opcode.Div: + if x.L.GetType() != nil && x.R.GetType() != nil { + xTp := mergeArithType(x.L.GetType().Tp, x.R.GetType().Tp) + if xTp == mysql.TypeLonglong { + xTp = mysql.TypeDecimal + } + x.Type = types.NewFieldType(xTp) + } + } + x.Type.Charset = charset.CharsetBin + x.Type.Collate = charset.CollationBin +} + +func mergeArithType(a, b byte) byte { + switch a { + case mysql.TypeString, mysql.TypeVarchar, mysql.TypeVarString, mysql.TypeDouble, mysql.TypeFloat: + return mysql.TypeDouble + } + switch b { + case mysql.TypeString, mysql.TypeVarchar, mysql.TypeVarString, mysql.TypeDouble, mysql.TypeFloat: + return mysql.TypeDouble + } + if a == mysql.TypeNewDecimal || b == mysql.TypeNewDecimal { + return mysql.TypeNewDecimal + } + return mysql.TypeLonglong +} + +func (v *typeInferrer) unaryOperation(x *ast.UnaryOperationExpr) { + switch x.Op { + case opcode.Not: + x.Type = types.NewFieldType(mysql.TypeLonglong) + case opcode.BitNeg: + x.Type = types.NewFieldType(mysql.TypeLonglong) + x.Type.Flag |= mysql.UnsignedFlag + case opcode.Plus: + x.Type = x.V.GetType() + case opcode.Minus: + x.Type = types.NewFieldType(mysql.TypeLonglong) + if x.V.GetType() != nil { + switch x.V.GetType().Tp { + case mysql.TypeString, mysql.TypeVarchar, mysql.TypeVarString, mysql.TypeDouble, mysql.TypeFloat: + x.Type.Tp = mysql.TypeDouble + case mysql.TypeNewDecimal: + x.Type.Tp = mysql.TypeNewDecimal + } + } + } + x.Type.Charset = charset.CharsetBin + x.Type.Collate = charset.CollationBin +} + +func (v *typeInferrer) handleValueExpr(x *ast.ValueExpr) { + tp := types.DefaultTypeForValue(x.GetValue()) + // Set charset and collation + x.SetType(tp) +} + +func (v *typeInferrer) handleValuesExpr(x *ast.ValuesExpr) { + x.SetType(x.Column.GetType()) +} + +func (v *typeInferrer) getFsp(x *ast.FuncCallExpr) int { + if len(x.Args) == 1 { + a := x.Args[0].GetValue() + fsp, err := types.ToInt64(a) + if err != nil { + v.err = err + } + return int(fsp) + } + return 0 +} + +func (v *typeInferrer) handleFuncCallExpr(x *ast.FuncCallExpr) { + var ( + tp *types.FieldType + chs = charset.CharsetBin + ) + switch x.FnName.L { + case "abs", "ifnull", "nullif": + tp = x.Args[0].GetType() + case "pow", "power", "rand": + tp = types.NewFieldType(mysql.TypeDouble) + case "curdate", "current_date", "date": + tp = types.NewFieldType(mysql.TypeDate) + case "curtime", "current_time": + tp = types.NewFieldType(mysql.TypeDuration) + tp.Decimal = v.getFsp(x) + case "current_timestamp", "date_arith": + tp = types.NewFieldType(mysql.TypeDatetime) + case "microsecond", "second", "minute", "hour", "day", "week", "month", "year", + "dayofweek", "dayofmonth", "dayofyear", "weekday", "weekofyear", "yearweek", + "found_rows", "length", "extract", "locate": + tp = types.NewFieldType(mysql.TypeLonglong) + case "now", "sysdate": + tp = types.NewFieldType(mysql.TypeDatetime) + tp.Decimal = v.getFsp(x) + case "dayname", "version", "database", "user", "current_user", + "concat", "concat_ws", "left", "lower", "repeat", "replace", "upper", "convert", + "substring", "substring_index", "trim": + tp = types.NewFieldType(mysql.TypeVarString) + chs = v.defaultCharset + case "strcmp": + tp = types.NewFieldType(mysql.TypeLonglong) + case "connection_id": + tp = types.NewFieldType(mysql.TypeLonglong) + tp.Flag |= mysql.UnsignedFlag + case "if": + // TODO: fix this + // See: https://dev.mysql.com/doc/refman/5.5/en/control-flow-functions.html#function_if + // The default return type of IF() (which may matter when it is stored into a temporary table) is calculated as follows. + // Expression Return Value + // expr2 or expr3 returns a string string + // expr2 or expr3 returns a floating-point value floating-point + // expr2 or expr3 returns an integer integer + tp = x.Args[1].GetType() + default: + tp = types.NewFieldType(mysql.TypeUnspecified) + } + // If charset is unspecified. + if len(tp.Charset) == 0 { + tp.Charset = chs + cln := charset.CollationBin + if chs != charset.CharsetBin { + var err error + cln, err = charset.GetDefaultCollation(chs) + if err != nil { + v.err = err + } + } + tp.Collate = cln + } + x.SetType(tp) +} + +// The return type of a CASE expression is the compatible aggregated type of all return values, +// but also depends on the context in which it is used. +// If used in a string context, the result is returned as a string. +// If used in a numeric context, the result is returned as a decimal, real, or integer value. +func (v *typeInferrer) handleCaseExpr(x *ast.CaseExpr) { + var currType *types.FieldType + for _, w := range x.WhenClauses { + t := w.Result.GetType() + if currType == nil { + currType = t + continue + } + mtp := types.MergeFieldType(currType.Tp, t.Tp) + if mtp == t.Tp && mtp != currType.Tp { + currType.Charset = t.Charset + currType.Collate = t.Collate + } + currType.Tp = mtp + + } + if x.ElseClause != nil { + t := x.ElseClause.GetType() + if currType == nil { + currType = t + } else { + mtp := types.MergeFieldType(currType.Tp, t.Tp) + if mtp == t.Tp && mtp != currType.Tp { + currType.Charset = t.Charset + currType.Collate = t.Collate + } + currType.Tp = mtp + } + } + x.SetType(currType) + // TODO: We need a better way to set charset/collation + x.Type.Charset, x.Type.Collate = types.DefaultCharsetForType(x.Type.Tp) +} diff --git a/vendor/github.com/pingcap/tidb/optimizer/validator.go b/vendor/github.com/pingcap/tidb/optimizer/validator.go new file mode 100644 index 000000000..2064fb45f --- /dev/null +++ b/vendor/github.com/pingcap/tidb/optimizer/validator.go @@ -0,0 +1,246 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package optimizer + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/parser" + "github.com/pingcap/tidb/parser/opcode" +) + +// Validate checkes whether the node is valid. +func Validate(node ast.Node, inPrepare bool) error { + v := validator{inPrepare: inPrepare} + node.Accept(&v) + return v.err +} + +// validator is an ast.Visitor that validates +// ast Nodes parsed from parser. +type validator struct { + err error + wildCardCount int + inPrepare bool + inAggregate bool +} + +func (v *validator) Enter(in ast.Node) (out ast.Node, skipChildren bool) { + switch in.(type) { + case *ast.AggregateFuncExpr: + if v.inAggregate { + // Aggregate function can not contain aggregate function. + v.err = ErrInvalidGroupFuncUse + return in, true + } + v.inAggregate = true + } + return in, false +} + +func (v *validator) Leave(in ast.Node) (out ast.Node, ok bool) { + switch x := in.(type) { + case *ast.AggregateFuncExpr: + v.inAggregate = false + case *ast.BetweenExpr: + v.checkAllOneColumn(x.Expr, x.Left, x.Right) + case *ast.BinaryOperationExpr: + v.checkBinaryOperation(x) + case *ast.ByItem: + v.checkAllOneColumn(x.Expr) + case *ast.CreateTableStmt: + v.checkAutoIncrement(x) + case *ast.CompareSubqueryExpr: + v.checkSameColumns(x.L, x.R) + case *ast.FieldList: + v.checkFieldList(x) + case *ast.HavingClause: + v.checkAllOneColumn(x.Expr) + case *ast.IsNullExpr: + v.checkAllOneColumn(x.Expr) + case *ast.IsTruthExpr: + v.checkAllOneColumn(x.Expr) + case *ast.ParamMarkerExpr: + if !v.inPrepare { + v.err = parser.ErrSyntax.Gen("syntax error, unexpected '?'") + } + case *ast.PatternInExpr: + v.checkSameColumns(append(x.List, x.Expr)...) + } + + return in, v.err == nil +} + +// checkAllOneColumn checks that all expressions have one column. +// Expression may have more than one column when it is a rowExpr or +// a Subquery with more than one result fields. +func (v *validator) checkAllOneColumn(exprs ...ast.ExprNode) { + for _, expr := range exprs { + switch x := expr.(type) { + case *ast.RowExpr: + v.err = ErrOneColumn + case *ast.SubqueryExpr: + if len(x.Query.GetResultFields()) != 1 { + v.err = ErrOneColumn + } + } + } + return +} + +func checkAutoIncrementOp(colDef *ast.ColumnDef, num int) (bool, error) { + var hasAutoIncrement bool + + if colDef.Options[num].Tp == ast.ColumnOptionAutoIncrement { + hasAutoIncrement = true + if len(colDef.Options) == num+1 { + return hasAutoIncrement, nil + } + for _, op := range colDef.Options[num+1:] { + if op.Tp == ast.ColumnOptionDefaultValue { + return hasAutoIncrement, errors.Errorf("Invalid default value for '%s'", colDef.Name.Name.O) + } + } + } + if colDef.Options[num].Tp == ast.ColumnOptionDefaultValue && len(colDef.Options) != num+1 { + for _, op := range colDef.Options[num+1:] { + if op.Tp == ast.ColumnOptionAutoIncrement { + return hasAutoIncrement, errors.Errorf("Invalid default value for '%s'", colDef.Name.Name.O) + } + } + } + + return hasAutoIncrement, nil +} + +func isConstraintKeyTp(constraints []*ast.Constraint, colDef *ast.ColumnDef) bool { + for _, c := range constraints { + if len(c.Keys) < 1 { + } + // If the constraint as follows: primary key(c1, c2) + // we only support c1 column can be auto_increment. + if colDef.Name.Name.L != c.Keys[0].Column.Name.L { + continue + } + switch c.Tp { + case ast.ConstraintPrimaryKey, ast.ConstraintKey, ast.ConstraintIndex, + ast.ConstraintUniq, ast.ConstraintUniqIndex, ast.ConstraintUniqKey: + return true + } + } + + return false +} + +func (v *validator) checkAutoIncrement(stmt *ast.CreateTableStmt) { + var ( + isKey bool + count int + autoIncrementCol *ast.ColumnDef + ) + + for _, colDef := range stmt.Cols { + var hasAutoIncrement bool + for i, op := range colDef.Options { + ok, err := checkAutoIncrementOp(colDef, i) + if err != nil { + v.err = err + return + } + if ok { + hasAutoIncrement = true + } + switch op.Tp { + case ast.ColumnOptionPrimaryKey, ast.ColumnOptionUniqKey, ast.ColumnOptionUniqIndex, + ast.ColumnOptionUniq, ast.ColumnOptionKey, ast.ColumnOptionIndex: + isKey = true + } + } + if hasAutoIncrement { + count++ + autoIncrementCol = colDef + } + } + + if count < 1 { + return + } + + if !isKey { + isKey = isConstraintKeyTp(stmt.Constraints, autoIncrementCol) + } + if !isKey || count > 1 { + v.err = errors.New("Incorrect table definition; there can be only one auto column and it must be defined as a key") + } + + switch autoIncrementCol.Tp.Tp { + case mysql.TypeTiny, mysql.TypeShort, mysql.TypeLong, + mysql.TypeFloat, mysql.TypeDouble, mysql.TypeLonglong, mysql.TypeInt24: + default: + v.err = errors.Errorf("Incorrect column specifier for column '%s'", autoIncrementCol.Name.Name.O) + } +} + +func (v *validator) checkBinaryOperation(x *ast.BinaryOperationExpr) { + // row constructor only supports comparison operation. + switch x.Op { + case opcode.LT, opcode.LE, opcode.GE, opcode.GT, opcode.EQ, opcode.NE, opcode.NullEQ: + v.checkSameColumns(x.L, x.R) + default: + v.checkAllOneColumn(x.L, x.R) + } +} + +func columnCount(ex ast.ExprNode) int { + switch x := ex.(type) { + case *ast.RowExpr: + return len(x.Values) + case *ast.SubqueryExpr: + return len(x.Query.GetResultFields()) + default: + return 1 + } +} + +func (v *validator) checkSameColumns(exprs ...ast.ExprNode) { + if len(exprs) == 0 { + return + } + count := columnCount(exprs[0]) + for i := 1; i < len(exprs); i++ { + if columnCount(exprs[i]) != count { + v.err = ErrSameColumns + return + } + } +} + +// checkFieldList checks if there is only one '*' and each field has only one column. +func (v *validator) checkFieldList(x *ast.FieldList) { + var hasWildCard bool + for _, val := range x.Fields { + if val.WildCard != nil && val.WildCard.Table.L == "" { + if hasWildCard { + v.err = ErrMultiWildCard + return + } + hasWildCard = true + } + v.checkAllOneColumn(val.Expr) + if v.err != nil { + return + } + } +} diff --git a/vendor/github.com/pingcap/tidb/parser/opcode/opcode.go b/vendor/github.com/pingcap/tidb/parser/opcode/opcode.go new file mode 100644 index 000000000..f112845c5 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/parser/opcode/opcode.go @@ -0,0 +1,82 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package opcode + +import "fmt" + +// Op is opcode type. +type Op int + +// List operators. +const ( + AndAnd Op = iota + 1 + LeftShift + RightShift + OrOr + GE + LE + EQ + NE + LT + GT + Plus + Minus + And + Or + Mod + Xor + Div + Mul + Not + BitNeg + IntDiv + LogicXor + NullEQ +) + +var ops = map[Op]string{ + AndAnd: "&&", + LeftShift: "<<", + RightShift: ">>", + OrOr: "||", + GE: ">=", + LE: "<=", + EQ: "=", + NE: "!=", + LT: "<", + GT: ">", + Plus: "+", + Minus: "-", + And: "&", + Or: "|", + Mod: "%", + Xor: "^", + Div: "/", + Mul: "*", + Not: "!", + BitNeg: "~", + IntDiv: "DIV", + LogicXor: "XOR", + NullEQ: "<=>", +} + +// String implements Stringer interface. +func (o Op) String() string { + str, ok := ops[o] + if !ok { + panic(fmt.Sprintf("%d", o)) + } + + return str +} diff --git a/vendor/github.com/pingcap/tidb/parser/parser.go b/vendor/github.com/pingcap/tidb/parser/parser.go new file mode 100644 index 000000000..e673a6abb --- /dev/null +++ b/vendor/github.com/pingcap/tidb/parser/parser.go @@ -0,0 +1,9355 @@ +// Code generated by goyacc +// CAUTION: Generated file - DO NOT EDIT. + +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +// Inital yacc source generated by ebnf2y[1] +// at 2013-10-04 23:10:47.861401015 +0200 CEST +// +// $ ebnf2y -o ql.y -oe ql.ebnf -start StatementList -pkg ql -p _ +// +// [1]: http://github.com/cznic/ebnf2y + +package parser + +import __yyfmt__ "fmt" + +import ( + "strings" + + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/parser/opcode" + "github.com/pingcap/tidb/util/charset" + "github.com/pingcap/tidb/util/types" +) + +type yySymType struct { + yys int + offset int // offset + line int + col int + item interface{} + list []interface{} +} + +type yyXError struct { + state, xsym int +} + +const ( + yyDefault = 57667 + yyEOFCode = 57344 + abs = 57352 + add = 57353 + addDate = 57354 + admin = 57355 + after = 57356 + all = 57357 + alter = 57358 + and = 57359 + andand = 57360 + andnot = 57361 + any = 57362 + as = 57363 + asc = 57364 + at = 57365 + autoIncrement = 57366 + avg = 57367 + avgRowLength = 57368 + begin = 57369 + between = 57370 + bigIntType = 57605 + binaryType = 57620 + bitLit = 57351 + bitType = 57606 + blobType = 57623 + boolType = 57642 + booleanType = 57643 + both = 57371 + btree = 57372 + by = 57373 + byteType = 57374 + calcFoundRows = 57595 + caseKwd = 57375 + cast = 57376 + charType = 57618 + character = 57377 + charsetKwd = 57378 + check = 57379 + checksum = 57380 + coalesce = 57381 + collate = 57382 + collation = 57383 + column = 57384 + columns = 57385 + comment = 57386 + commit = 57387 + committed = 57388 + compact = 57389 + compressed = 57390 + compression = 57391 + concat = 57392 + concatWs = 57393 + connection = 57394 + connectionID = 57395 + constraint = 57396 + convert = 57397 + count = 57398 + create = 57399 + cross = 57400 + curDate = 57401 + curTime = 57403 + currentDate = 57402 + currentTime = 57404 + currentTs = 57596 + currentUser = 57405 + database = 57406 + databases = 57407 + dateAdd = 57408 + dateSub = 57409 + dateType = 57613 + datetimeType = 57615 + day = 57410 + dayHour = 57654 + dayMicrosecond = 57651 + dayMinute = 57653 + daySecond = 57652 + dayname = 57411 + dayofmonth = 57412 + dayofweek = 57413 + dayofyear = 57414 + ddl = 57415 + deallocate = 57416 + decimalType = 57607 + defaultKwd = 57417 + delayKeyWrite = 57419 + delayed = 57418 + deleteKwd = 57420 + desc = 57421 + describe = 57422 + distinct = 57423 + div = 57424 + do = 57425 + doubleType = 57610 + drop = 57426 + dual = 57427 + duplicate = 57428 + dynamic = 57429 + elseKwd = 57430 + end = 57431 + engine = 57432 + engines = 57433 + enum = 57434 + eq = 57435 + yyErrCode = 57345 + escape = 57436 + execute = 57437 + exists = 57438 + explain = 57439 + extract = 57440 + falseKwd = 57441 + fields = 57442 + first = 57443 + fixed = 57444 + float32Type = 57640 + float64Type = 57641 + floatLit = 57346 + floatType = 57609 + forKwd = 57446 + foreign = 57445 + foundRows = 57447 + from = 57448 + full = 57449 + fulltext = 57450 + ge = 57451 + global = 57452 + grant = 57453 + grants = 57454 + group = 57455 + groupConcat = 57456 + hash = 57457 + having = 57458 + hexLit = 57350 + highPriority = 57459 + hour = 57460 + hourMicrosecond = 57648 + hourMinute = 57650 + hourSecond = 57649 + identified = 57461 + identifier = 57347 + ifKwd = 57463 + ifNull = 57464 + ignore = 57462 + in = 57465 + index = 57466 + inner = 57467 + insert = 57468 + insertValues = 57660 + int16Type = 57630 + int24Type = 57631 + int32Type = 57632 + int64Type = 57633 + int8Type = 57634 + intLit = 57348 + intType = 57603 + integerType = 57604 + interval = 57469 + into = 57470 + is = 57471 + isolation = 57472 + join = 57473 + key = 57474 + keyBlockSize = 57475 + le = 57476 + leading = 57477 + left = 57478 + length = 57479 + level = 57480 + like = 57481 + limit = 57482 + local = 57483 + localTime = 57597 + localTs = 57598 + locate = 57484 + lock = 57485 + longblobType = 57625 + longtextType = 57629 + lowPriority = 57487 + lower = 57486 + lowerThanCalcFoundRows = 57657 + lowerThanComma = 57666 + lowerThanEq = 57661 + lowerThanEscape = 57665 + lowerThanInsertValues = 57659 + lowerThanLeftParen = 57663 + lowerThanQuick = 57664 + lowerThanSetKeyword = 57658 + lsh = 57488 + max = 57489 + maxRows = 57490 + mediumIntType = 57602 + mediumblobType = 57624 + mediumtextType = 57628 + microsecond = 57491 + min = 57492 + minRows = 57494 + minute = 57493 + minuteMicrosecond = 57646 + minuteSecond = 57647 + mod = 57495 + mode = 57496 + month = 57497 + names = 57498 + national = 57499 + neg = 57662 + neq = 57500 + neqSynonym = 57501 + not = 57502 + now = 57599 + null = 57503 + nullIf = 57505 + nulleq = 57504 + numericType = 57608 + offset = 57506 + on = 57507 + only = 57508 + option = 57509 + or = 57510 + order = 57511 + oror = 57512 + outer = 57513 + parseExpression = 57644 + password = 57514 + placeholder = 57515 + pow = 57516 + power = 57517 + precisionType = 57611 + prepare = 57518 + primary = 57519 + procedure = 57520 + quarter = 57521 + quick = 57522 + rand = 57523 + read = 57524 + realType = 57612 + redundant = 57525 + references = 57526 + regexpKwd = 57527 + repeat = 57528 + repeatable = 57529 + replace = 57530 + right = 57531 + rlike = 57532 + rollback = 57533 + row = 57534 + rowFormat = 57535 + rsh = 57536 + schema = 57537 + schemas = 57538 + second = 57539 + secondMicrosecond = 57645 + selectKwd = 57540 + serializable = 57541 + session = 57542 + set = 57543 + share = 57544 + show = 57545 + signed = 57546 + smallIntType = 57601 + some = 57547 + start = 57548 + status = 57549 + strcmp = 57552 + stringLit = 57349 + stringType = 57550 + subDate = 57551 + substring = 57553 + substringIndex = 57554 + sum = 57555 + sysDate = 57557 + sysVar = 57556 + tableKwd = 57558 + tableRefPriority = 57656 + tables = 57559 + textType = 57627 + then = 57560 + timeType = 57614 + timestampType = 57616 + tinyIntType = 57600 + tinyblobType = 57622 + tinytextType = 57626 + to = 57561 + trailing = 57562 + transaction = 57563 + triggers = 57564 + trim = 57565 + trueKwd = 57566 + truncate = 57567 + uint16Type = 57636 + uint32Type = 57637 + uint64Type = 57638 + uint8Type = 57639 + uintType = 57635 + uncommitted = 57568 + underscoreCS = 57569 + union = 57571 + unique = 57572 + unknown = 57570 + unlock = 57573 + unsigned = 57574 + update = 57575 + upper = 57576 + use = 57577 + user = 57578 + userVar = 57580 + using = 57579 + value = 57581 + values = 57582 + varbinaryType = 57621 + varcharType = 57619 + variables = 57583 + version = 57584 + warnings = 57585 + week = 57586 + weekday = 57587 + weekofyear = 57588 + when = 57589 + where = 57590 + write = 57591 + xor = 57592 + yearMonth = 57655 + yearType = 57617 + yearweek = 57593 + zerofill = 57594 + + yyMaxDepth = 200 + yyTabOfs = -876 +) + +var ( + yyXLAT = map[int]int{ + 57386: 0, // comment (813x) + 57366: 1, // autoIncrement (806x) + 57344: 2, // $end (783x) + 59: 3, // ';' (781x) + 57356: 4, // after (776x) + 57443: 5, // first (776x) + 57378: 6, // charsetKwd (720x) + 41: 7, // ')' (718x) + 44: 8, // ',' (717x) + 57475: 9, // keyBlockSize (696x) + 57514: 10, // password (692x) + 57368: 11, // avgRowLength (689x) + 57380: 12, // checksum (689x) + 57391: 13, // compression (689x) + 57394: 14, // connection (689x) + 57419: 15, // delayKeyWrite (689x) + 57432: 16, // engine (689x) + 57490: 17, // maxRows (689x) + 57494: 18, // minRows (689x) + 57535: 19, // rowFormat (689x) + 57431: 20, // end (663x) + 57549: 21, // status (663x) + 57559: 22, // tables (663x) + 57518: 23, // prepare (662x) + 57437: 24, // execute (661x) + 57583: 25, // variables (661x) + 57617: 26, // yearType (661x) + 57385: 27, // columns (660x) + 57615: 28, // datetimeType (660x) + 57613: 29, // dateType (660x) + 57410: 30, // day (660x) + 57442: 31, // fields (660x) + 57460: 32, // hour (660x) + 57472: 33, // isolation (660x) + 57491: 34, // microsecond (660x) + 57493: 35, // minute (660x) + 57497: 36, // month (660x) + 57506: 37, // offset (660x) + 57521: 38, // quarter (660x) + 57539: 39, // second (660x) + 57614: 40, // timeType (660x) + 57570: 41, // unknown (660x) + 57581: 42, // value (660x) + 57586: 43, // week (660x) + 57355: 44, // admin (659x) + 57369: 45, // begin (659x) + 57387: 46, // commit (659x) + 57389: 47, // compact (659x) + 57390: 48, // compressed (659x) + 57416: 49, // deallocate (659x) + 57425: 50, // do (659x) + 57429: 51, // dynamic (659x) + 57444: 52, // fixed (659x) + 57461: 53, // identified (659x) + 57599: 54, // now (659x) + 57525: 55, // redundant (659x) + 57533: 56, // rollback (659x) + 57546: 57, // signed (659x) + 57548: 58, // start (659x) + 57567: 59, // truncate (659x) + 57578: 60, // user (659x) + 57606: 61, // bitType (658x) + 57643: 62, // booleanType (658x) + 57642: 63, // boolType (658x) + 57372: 64, // btree (658x) + 57383: 65, // collation (658x) + 57388: 66, // committed (658x) + 57433: 67, // engines (658x) + 57449: 68, // full (658x) + 57452: 69, // global (658x) + 57454: 70, // grants (658x) + 57457: 71, // hash (658x) + 57480: 72, // level (658x) + 57483: 73, // local (658x) + 57496: 74, // mode (658x) + 57499: 75, // national (658x) + 57508: 76, // only (658x) + 57529: 77, // repeatable (658x) + 57541: 78, // serializable (658x) + 57542: 79, // session (658x) + 57627: 80, // textType (658x) + 57616: 81, // timestampType (658x) + 57563: 82, // transaction (658x) + 57564: 83, // triggers (658x) + 57568: 84, // uncommitted (658x) + 57585: 85, // warnings (658x) + 57352: 86, // abs (657x) + 57354: 87, // addDate (657x) + 57362: 88, // any (657x) + 57367: 89, // avg (657x) + 57595: 90, // calcFoundRows (657x) + 57381: 91, // coalesce (657x) + 57392: 92, // concat (657x) + 57393: 93, // concatWs (657x) + 57395: 94, // connectionID (657x) + 57398: 95, // count (657x) + 57403: 96, // curTime (657x) + 57408: 97, // dateAdd (657x) + 57409: 98, // dateSub (657x) + 57411: 99, // dayname (657x) + 57412: 100, // dayofmonth (657x) + 57413: 101, // dayofweek (657x) + 57414: 102, // dayofyear (657x) + 57436: 103, // escape (657x) + 57447: 104, // foundRows (657x) + 57456: 105, // groupConcat (657x) + 57347: 106, // identifier (657x) + 57464: 107, // ifNull (657x) + 57479: 108, // length (657x) + 57484: 109, // locate (657x) + 57489: 110, // max (657x) + 57492: 111, // min (657x) + 57498: 112, // names (657x) + 57505: 113, // nullIf (657x) + 57516: 114, // pow (657x) + 57517: 115, // power (657x) + 57522: 116, // quick (657x) + 57523: 117, // rand (657x) + 57534: 118, // row (657x) + 57547: 119, // some (657x) + 57551: 120, // subDate (657x) + 57553: 121, // substring (657x) + 57554: 122, // substringIndex (657x) + 57555: 123, // sum (657x) + 57565: 124, // trim (657x) + 57584: 125, // version (657x) + 57587: 126, // weekday (657x) + 57588: 127, // weekofyear (657x) + 57593: 128, // yearweek (657x) + 57502: 129, // not (557x) + 57507: 130, // on (552x) + 57349: 131, // stringLit (538x) + 57478: 132, // left (506x) + 40: 133, // '(' (492x) + 43: 134, // '+' (473x) + 45: 135, // '-' (473x) + 57417: 136, // defaultKwd (462x) + 57503: 137, // null (423x) + 57359: 138, // and (409x) + 57571: 139, // union (409x) + 57360: 140, // andand (408x) + 57510: 141, // or (408x) + 57512: 142, // oror (408x) + 57592: 143, // xor (408x) + 57446: 144, // forKwd (392x) + 57482: 145, // limit (392x) + 57448: 146, // from (391x) + 57485: 147, // lock (391x) + 57590: 148, // where (380x) + 57382: 149, // collate (368x) + 57511: 150, // order (367x) + 57435: 151, // eq (360x) + 57458: 152, // having (357x) + 57543: 153, // set (352x) + 57473: 154, // join (350x) + 57579: 155, // using (350x) + 57455: 156, // group (348x) + 57400: 157, // cross (343x) + 57467: 158, // inner (343x) + 57531: 159, // right (343x) + 125: 160, // '}' (340x) + 57481: 161, // like (337x) + 57363: 162, // as (334x) + 57421: 163, // desc (331x) + 57589: 164, // when (331x) + 42: 165, // '*' (329x) + 57364: 166, // asc (329x) + 57430: 167, // elseKwd (328x) + 57654: 168, // dayHour (327x) + 57651: 169, // dayMicrosecond (327x) + 57653: 170, // dayMinute (327x) + 57652: 171, // daySecond (327x) + 57648: 172, // hourMicrosecond (327x) + 57650: 173, // hourMinute (327x) + 57649: 174, // hourSecond (327x) + 57646: 175, // minuteMicrosecond (327x) + 57647: 176, // minuteSecond (327x) + 57645: 177, // secondMicrosecond (327x) + 57655: 178, // yearMonth (327x) + 57560: 179, // then (325x) + 57465: 180, // in (322x) + 60: 181, // '<' (320x) + 62: 182, // '>' (320x) + 57451: 183, // ge (320x) + 57471: 184, // is (320x) + 57476: 185, // le (320x) + 57500: 186, // neq (320x) + 57501: 187, // neqSynonym (320x) + 57504: 188, // nulleq (320x) + 57370: 189, // between (310x) + 57527: 190, // regexpKwd (310x) + 57532: 191, // rlike (310x) + 37: 192, // '%' (309x) + 38: 193, // '&' (309x) + 47: 194, // '/' (309x) + 94: 195, // '^' (309x) + 124: 196, // '|' (309x) + 57620: 197, // binaryType (309x) + 57424: 198, // div (309x) + 57488: 199, // lsh (309x) + 57495: 200, // mod (309x) + 57536: 201, // rsh (309x) + 57582: 202, // values (295x) + 57519: 203, // primary (263x) + 57572: 204, // unique (263x) + 57379: 205, // check (258x) + 57766: 206, // Identifier (246x) + 57793: 207, // NotKeywordToken (246x) + 57877: 208, // UnReservedKeyword (246x) + 57377: 209, // character (196x) + 57348: 210, // intLit (189x) + 46: 211, // '.' (183x) + 57463: 212, // ifKwd (173x) + 57530: 213, // replace (169x) + 57580: 214, // userVar (168x) + 57441: 215, // falseKwd (167x) + 57566: 216, // trueKwd (167x) + 57438: 217, // exists (166x) + 57346: 218, // floatLit (166x) + 57596: 219, // currentTs (165x) + 57406: 220, // database (165x) + 57537: 221, // schema (165x) + 57556: 222, // sysVar (165x) + 57351: 223, // bitLit (164x) + 57350: 224, // hexLit (164x) + 57569: 225, // underscoreCS (164x) + 33: 226, // '!' (163x) + 126: 227, // '~' (163x) + 57375: 228, // caseKwd (163x) + 57376: 229, // cast (163x) + 57397: 230, // convert (163x) + 57401: 231, // curDate (163x) + 57402: 232, // currentDate (163x) + 57404: 233, // currentTime (163x) + 57405: 234, // currentUser (163x) + 57440: 235, // extract (163x) + 57486: 236, // lower (163x) + 57515: 237, // placeholder (163x) + 57528: 238, // repeat (163x) + 57552: 239, // strcmp (163x) + 57557: 240, // sysDate (163x) + 57576: 241, // upper (163x) + 57687: 242, // ColumnName (159x) + 57540: 243, // selectKwd (154x) + 57474: 244, // key (144x) + 57466: 245, // index (143x) + 57851: 246, // SubSelect (136x) + 57618: 247, // charType (135x) + 57426: 248, // drop (135x) + 57445: 249, // foreign (135x) + 57524: 250, // read (135x) + 57450: 251, // fulltext (134x) + 57887: 252, // UserVariable (134x) + 57607: 253, // decimalType (133x) + 57604: 254, // integerType (133x) + 57561: 255, // to (133x) + 57619: 256, // varcharType (133x) + 57787: 257, // Literal (132x) + 57353: 258, // add (131x) + 57605: 259, // bigIntType (131x) + 57623: 260, // blobType (131x) + 57715: 261, // DateArithMultiFormsOpt (131x) + 57716: 262, // DateArithOpt (131x) + 57610: 263, // doubleType (131x) + 57434: 264, // enum (131x) + 57640: 265, // float32Type (131x) + 57641: 266, // float64Type (131x) + 57609: 267, // floatType (131x) + 57755: 268, // Function (131x) + 57756: 269, // FunctionCallAgg (131x) + 57757: 270, // FunctionCallConflict (131x) + 57758: 271, // FunctionCallKeyword (131x) + 57759: 272, // FunctionCallNonKeyword (131x) + 57760: 273, // FunctionNameConflict (131x) + 57633: 274, // int64Type (131x) + 57603: 275, // intType (131x) + 57625: 276, // longblobType (131x) + 57629: 277, // longtextType (131x) + 57624: 278, // mediumblobType (131x) + 57602: 279, // mediumIntType (131x) + 57628: 280, // mediumtextType (131x) + 57608: 281, // numericType (131x) + 57800: 282, // Operand (131x) + 57816: 283, // PrimaryExpression (131x) + 57612: 284, // realType (131x) + 57601: 285, // smallIntType (131x) + 57550: 286, // stringType (131x) + 57853: 287, // SystemVariable (131x) + 57622: 288, // tinyblobType (131x) + 57600: 289, // tinyIntType (131x) + 57626: 290, // tinytextType (131x) + 57638: 291, // uint64Type (131x) + 57635: 292, // uintType (131x) + 57621: 293, // varbinaryType (131x) + 57891: 294, // Variable (131x) + 57591: 295, // write (131x) + 57817: 296, // PrimaryFactor (123x) + 57813: 297, // PredicateExpr (110x) + 57737: 298, // Expression (108x) + 57742: 299, // Factor (108x) + 57898: 300, // logAnd (85x) + 57899: 301, // logOr (85x) + 57574: 302, // unsigned (33x) + 57861: 303, // TableName (31x) + 57594: 304, // zerofill (31x) + 57357: 305, // all (20x) + 57746: 306, // FieldLen (20x) + 57831: 307, // SelectStmt (17x) + 57731: 308, // EqOpt (16x) + 57738: 309, // ExpressionList (16x) + 57784: 310, // LengthNum (15x) + 57791: 311, // NUM (15x) + 57804: 312, // OptFieldLen (14x) + 57462: 313, // ignore (13x) + 57774: 314, // IndexType (13x) + 57880: 315, // UnionSelect (13x) + 57878: 316, // UnionClauseList (12x) + 57881: 317, // UnionStmt (12x) + 123: 318, // '{' (11x) + 57770: 319, // IndexColName (11x) + 57470: 320, // into (11x) + 57849: 321, // StringName (11x) + 57575: 322, // update (11x) + 57684: 323, // CharsetKw (10x) + 57771: 324, // IndexColNameList (10x) + 57781: 325, // JoinTable (10x) + 57858: 326, // TableFactor (10x) + 57558: 327, // tableKwd (10x) + 57867: 328, // TableRef (10x) + 57420: 329, // deleteKwd (8x) + 57423: 330, // distinct (8x) + 57772: 331, // IndexName (8x) + 57468: 332, // insert (8x) + 57720: 333, // DefaultKwdOpt (7x) + 57732: 334, // EscapedTableRef (7x) + 57773: 335, // IndexOption (7x) + 57802: 336, // OptCharset (7x) + 57896: 337, // WhereClause (7x) + 57897: 338, // WhereClauseOptional (7x) + 57724: 339, // DistinctOpt (6x) + 57775: 340, // IndexTypeOpt (6x) + 57803: 341, // OptCollate (6x) + 57868: 342, // TableRefs (6x) + 57399: 343, // create (5x) + 57707: 344, // CrossOpt (5x) + 57708: 345, // DBName (5x) + 57741: 346, // ExpressionOpt (5x) + 57782: 347, // JoinType (5x) + 57801: 348, // OptBinary (5x) + 57829: 349, // RowFormat (5x) + 57545: 350, // show (5x) + 57839: 351, // ShowDatabaseNameOpt (5x) + 57862: 352, // TableNameList (5x) + 57863: 353, // TableOption (5x) + 57889: 354, // Username (5x) + 57358: 355, // alter (4x) + 57673: 356, // Assignment (4x) + 57739: 357, // ExpressionListList (4x) + 57453: 358, // grant (4x) + 57769: 359, // IgnoreOptional (4x) + 57487: 360, // lowPriority (4x) + 57808: 361, // OrderBy (4x) + 57809: 362, // OrderByOptional (4x) + 57836: 363, // SelectStmtLimit (4x) + 57854: 364, // TableAsName (4x) + 57674: 365, // AssignmentList (3x) + 57373: 366, // by (3x) + 57681: 367, // ByItem (3x) + 57685: 368, // ColumnDef (3x) + 57396: 369, // constraint (3x) + 57699: 370, // Constraint (3x) + 57701: 371, // ConstraintKeywordOpt (3x) + 57723: 372, // DeleteFromStmt (3x) + 57748: 373, // FieldOpt (3x) + 57749: 374, // FieldOpts (3x) + 57751: 375, // FloatOpt (3x) + 57768: 376, // IfNotExists (3x) + 57776: 377, // InsertIntoStmt (3x) + 57513: 378, // outer (3x) + 57812: 379, // Precision (3x) + 57826: 380, // ReplaceIntoStmt (3x) + 57830: 381, // SelectLockOpt (3x) + 57864: 382, // TableOptionList (3x) + 57865: 383, // TableOptionListOpt (3x) + 57871: 384, // TimeUnit (3x) + 57872: 385, // TransactionChar (3x) + 57883: 386, // UpdateStmt (3x) + 57885: 387, // UserSpec (3x) + 57890: 388, // ValueSym (3x) + 57668: 389, // AdminStmt (2x) + 57669: 390, // AlterTableSpec (2x) + 57671: 391, // AlterTableStmt (2x) + 57677: 392, // AuthString (2x) + 57678: 393, // BeginTransactionStmt (2x) + 57682: 394, // ByList (2x) + 57683: 395, // CastType (2x) + 57384: 396, // column (2x) + 57686: 397, // ColumnKeywordOpt (2x) + 57688: 398, // ColumnNameList (2x) + 57690: 399, // ColumnOption (2x) + 57694: 400, // ColumnSetValue (2x) + 57697: 401, // CommitStmt (2x) + 57702: 402, // CreateDatabaseStmt (2x) + 57703: 403, // CreateIndexStmt (2x) + 57705: 404, // CreateTableStmt (2x) + 57706: 405, // CreateUserStmt (2x) + 57709: 406, // DatabaseOption (2x) + 57407: 407, // databases (2x) + 57712: 408, // DatabaseSym (2x) + 57717: 409, // DeallocateStmt (2x) + 57718: 410, // DeallocateSym (2x) + 57418: 411, // delayed (2x) + 57422: 412, // describe (2x) + 57725: 413, // DoStmt (2x) + 57726: 414, // DropDatabaseStmt (2x) + 57727: 415, // DropIndexStmt (2x) + 57728: 416, // DropTableStmt (2x) + 57730: 417, // EmptyStmt (2x) + 57733: 418, // ExecuteStmt (2x) + 57439: 419, // explain (2x) + 57734: 420, // ExplainStmt (2x) + 57735: 421, // ExplainSym (2x) + 57743: 422, // Field (2x) + 57754: 423, // FuncDatetimePrec (2x) + 57762: 424, // GrantStmt (2x) + 57767: 425, // IfExists (2x) + 57777: 426, // InsertValues (2x) + 57469: 427, // interval (2x) + 57779: 428, // IntoOpt (2x) + 57786: 429, // LimitClause (2x) + 57597: 430, // localTime (2x) + 57598: 431, // localTs (2x) + 57788: 432, // LockTablesStmt (2x) + 57790: 433, // LowPriorityOptional (2x) + 57794: 434, // NotOpt (2x) + 57795: 435, // NowSym (2x) + 57796: 436, // NumLiteral (2x) + 57806: 437, // OptInteger (2x) + 57807: 438, // Order (2x) + 57811: 439, // PasswordOpt (2x) + 57815: 440, // PreparedStmt (2x) + 57819: 441, // PrivElem (2x) + 57822: 442, // PrivType (2x) + 57828: 443, // RollbackStmt (2x) + 57838: 444, // SetStmt (2x) + 57841: 445, // ShowStmt (2x) + 57842: 446, // ShowTableAliasOpt (2x) + 57846: 447, // Statement (2x) + 57848: 448, // StringList (2x) + 57852: 449, // Symbol (2x) + 57856: 450, // TableElement (2x) + 57859: 451, // TableLock (2x) + 57873: 452, // TransactionChars (2x) + 57875: 453, // TruncateTableStmt (2x) + 57573: 454, // unlock (2x) + 57882: 455, // UnlockTablesStmt (2x) + 57577: 456, // use (2x) + 57886: 457, // UserSpecList (2x) + 57884: 458, // UseStmt (2x) + 57892: 459, // VariableAssignment (2x) + 57894: 460, // WhenClause (2x) + 57670: 461, // AlterTableSpecList (1x) + 57672: 462, // AnyOrAll (1x) + 57365: 463, // at (1x) + 57676: 464, // AuthOption (1x) + 57679: 465, // BitValueType (1x) + 57680: 466, // BlobType (1x) + 57371: 467, // both (1x) + 57689: 468, // ColumnNameListOpt (1x) + 57691: 469, // ColumnOptionList (1x) + 57692: 470, // ColumnOptionListOpt (1x) + 57693: 471, // ColumnPosition (1x) + 57695: 472, // ColumnSetValueList (1x) + 57698: 473, // CompareOp (1x) + 57700: 474, // ConstraintElem (1x) + 57704: 475, // CreateIndexStmtUnique (1x) + 57710: 476, // DatabaseOptionList (1x) + 57711: 477, // DatabaseOptionListOpt (1x) + 57713: 478, // DateAndTimeType (1x) + 57714: 479, // DateArithInterval (1x) + 57415: 480, // ddl (1x) + 57722: 481, // DefaultValueExpr (1x) + 57427: 482, // dual (1x) + 57428: 483, // duplicate (1x) + 57729: 484, // ElseOpt (1x) + 57736: 485, // ExplainableStmt (1x) + 57740: 486, // ExpressionListOpt (1x) + 57744: 487, // FieldAsName (1x) + 57745: 488, // FieldAsNameOpt (1x) + 57747: 489, // FieldList (1x) + 57750: 490, // FixedPointType (1x) + 57752: 491, // FloatingPointType (1x) + 57753: 492, // FromDual (1x) + 57761: 493, // GlobalScope (1x) + 57763: 494, // GroupByClause (1x) + 57764: 495, // HashString (1x) + 57765: 496, // HavingClause (1x) + 57459: 497, // highPriority (1x) + 57778: 498, // IntegerType (1x) + 57780: 499, // IsolationLevel (1x) + 57783: 500, // KeyOrIndex (1x) + 57477: 501, // leading (1x) + 57785: 502, // LikeEscapeOpt (1x) + 57789: 503, // LockType (1x) + 57792: 504, // NationalOpt (1x) + 57797: 505, // NumericType (1x) + 57798: 506, // ObjectType (1x) + 57799: 507, // OnDuplicateKeyUpdate (1x) + 57805: 508, // OptFull (1x) + 57509: 509, // option (1x) + 57810: 510, // OuterOpt (1x) + 57644: 511, // parseExpression (1x) + 57611: 512, // precisionType (1x) + 57814: 513, // PrepareSQL (1x) + 57818: 514, // Priority (1x) + 57820: 515, // PrivElemList (1x) + 57821: 516, // PrivLevel (1x) + 57520: 517, // procedure (1x) + 57823: 518, // QuickOptional (1x) + 57824: 519, // ReferDef (1x) + 57526: 520, // references (1x) + 57825: 521, // RegexpSym (1x) + 57827: 522, // ReplacePriority (1x) + 57538: 523, // schemas (1x) + 57832: 524, // SelectStmtCalcFoundRows (1x) + 57833: 525, // SelectStmtDistinct (1x) + 57834: 526, // SelectStmtFieldList (1x) + 57835: 527, // SelectStmtGroup (1x) + 57837: 528, // SelectStmtOpts (1x) + 57544: 529, // share (1x) + 57840: 530, // ShowLikeOrWhereOpt (1x) + 57843: 531, // ShowTargetFilterable (1x) + 57844: 532, // SignedLiteral (1x) + 57845: 533, // Start (1x) + 57847: 534, // StatementList (1x) + 57850: 535, // StringType (1x) + 57855: 536, // TableAsNameOpt (1x) + 57857: 537, // TableElementList (1x) + 57860: 538, // TableLockList (1x) + 57866: 539, // TableOrTables (1x) + 57869: 540, // TableRefsClause (1x) + 57870: 541, // TextType (1x) + 57562: 542, // trailing (1x) + 57874: 543, // TrimDirection (1x) + 57876: 544, // Type (1x) + 57879: 545, // UnionOpt (1x) + 57888: 546, // UserVariableList (1x) + 57893: 547, // VariableAssignmentList (1x) + 57895: 548, // WhenClauseList (1x) + 57667: 549, // $default (0x) + 57361: 550, // andnot (0x) + 57675: 551, // AssignmentListOpt (0x) + 57374: 552, // byteType (0x) + 57696: 553, // CommaOpt (0x) + 57719: 554, // Default (0x) + 57721: 555, // DefaultOpt (0x) + 57345: 556, // error (0x) + 57660: 557, // insertValues (0x) + 57630: 558, // int16Type (0x) + 57631: 559, // int24Type (0x) + 57632: 560, // int32Type (0x) + 57634: 561, // int8Type (0x) + 57657: 562, // lowerThanCalcFoundRows (0x) + 57666: 563, // lowerThanComma (0x) + 57661: 564, // lowerThanEq (0x) + 57665: 565, // lowerThanEscape (0x) + 57659: 566, // lowerThanInsertValues (0x) + 57663: 567, // lowerThanLeftParen (0x) + 57664: 568, // lowerThanQuick (0x) + 57658: 569, // lowerThanSetKeyword (0x) + 57900: 570, // name (0x) + 57662: 571, // neg (0x) + 57656: 572, // tableRefPriority (0x) + 57636: 573, // uint16Type (0x) + 57637: 574, // uint32Type (0x) + 57639: 575, // uint8Type (0x) + } + + yySymNames = []string{ + "comment", + "autoIncrement", + "$end", + "';'", + "after", + "first", + "charsetKwd", + "')'", + "','", + "keyBlockSize", + "password", + "avgRowLength", + "checksum", + "compression", + "connection", + "delayKeyWrite", + "engine", + "maxRows", + "minRows", + "rowFormat", + "end", + "status", + "tables", + "prepare", + "execute", + "variables", + "yearType", + "columns", + "datetimeType", + "dateType", + "day", + "fields", + "hour", + "isolation", + "microsecond", + "minute", + "month", + "offset", + "quarter", + "second", + "timeType", + "unknown", + "value", + "week", + "admin", + "begin", + "commit", + "compact", + "compressed", + "deallocate", + "do", + "dynamic", + "fixed", + "identified", + "now", + "redundant", + "rollback", + "signed", + "start", + "truncate", + "user", + "bitType", + "booleanType", + "boolType", + "btree", + "collation", + "committed", + "engines", + "full", + "global", + "grants", + "hash", + "level", + "local", + "mode", + "national", + "only", + "repeatable", + "serializable", + "session", + "textType", + "timestampType", + "transaction", + "triggers", + "uncommitted", + "warnings", + "abs", + "addDate", + "any", + "avg", + "calcFoundRows", + "coalesce", + "concat", + "concatWs", + "connectionID", + "count", + "curTime", + "dateAdd", + "dateSub", + "dayname", + "dayofmonth", + "dayofweek", + "dayofyear", + "escape", + "foundRows", + "groupConcat", + "identifier", + "ifNull", + "length", + "locate", + "max", + "min", + "names", + "nullIf", + "pow", + "power", + "quick", + "rand", + "row", + "some", + "subDate", + "substring", + "substringIndex", + "sum", + "trim", + "version", + "weekday", + "weekofyear", + "yearweek", + "not", + "on", + "stringLit", + "left", + "'('", + "'+'", + "'-'", + "defaultKwd", + "null", + "and", + "union", + "andand", + "or", + "oror", + "xor", + "forKwd", + "limit", + "from", + "lock", + "where", + "collate", + "order", + "eq", + "having", + "set", + "join", + "using", + "group", + "cross", + "inner", + "right", + "'}'", + "like", + "as", + "desc", + "when", + "'*'", + "asc", + "elseKwd", + "dayHour", + "dayMicrosecond", + "dayMinute", + "daySecond", + "hourMicrosecond", + "hourMinute", + "hourSecond", + "minuteMicrosecond", + "minuteSecond", + "secondMicrosecond", + "yearMonth", + "then", + "in", + "'<'", + "'>'", + "ge", + "is", + "le", + "neq", + "neqSynonym", + "nulleq", + "between", + "regexpKwd", + "rlike", + "'%'", + "'&'", + "'/'", + "'^'", + "'|'", + "binaryType", + "div", + "lsh", + "mod", + "rsh", + "values", + "primary", + "unique", + "check", + "Identifier", + "NotKeywordToken", + "UnReservedKeyword", + "character", + "intLit", + "'.'", + "ifKwd", + "replace", + "userVar", + "falseKwd", + "trueKwd", + "exists", + "floatLit", + "currentTs", + "database", + "schema", + "sysVar", + "bitLit", + "hexLit", + "underscoreCS", + "'!'", + "'~'", + "caseKwd", + "cast", + "convert", + "curDate", + "currentDate", + "currentTime", + "currentUser", + "extract", + "lower", + "placeholder", + "repeat", + "strcmp", + "sysDate", + "upper", + "ColumnName", + "selectKwd", + "key", + "index", + "SubSelect", + "charType", + "drop", + "foreign", + "read", + "fulltext", + "UserVariable", + "decimalType", + "integerType", + "to", + "varcharType", + "Literal", + "add", + "bigIntType", + "blobType", + "DateArithMultiFormsOpt", + "DateArithOpt", + "doubleType", + "enum", + "float32Type", + "float64Type", + "floatType", + "Function", + "FunctionCallAgg", + "FunctionCallConflict", + "FunctionCallKeyword", + "FunctionCallNonKeyword", + "FunctionNameConflict", + "int64Type", + "intType", + "longblobType", + "longtextType", + "mediumblobType", + "mediumIntType", + "mediumtextType", + "numericType", + "Operand", + "PrimaryExpression", + "realType", + "smallIntType", + "stringType", + "SystemVariable", + "tinyblobType", + "tinyIntType", + "tinytextType", + "uint64Type", + "uintType", + "varbinaryType", + "Variable", + "write", + "PrimaryFactor", + "PredicateExpr", + "Expression", + "Factor", + "logAnd", + "logOr", + "unsigned", + "TableName", + "zerofill", + "all", + "FieldLen", + "SelectStmt", + "EqOpt", + "ExpressionList", + "LengthNum", + "NUM", + "OptFieldLen", + "ignore", + "IndexType", + "UnionSelect", + "UnionClauseList", + "UnionStmt", + "'{'", + "IndexColName", + "into", + "StringName", + "update", + "CharsetKw", + "IndexColNameList", + "JoinTable", + "TableFactor", + "tableKwd", + "TableRef", + "deleteKwd", + "distinct", + "IndexName", + "insert", + "DefaultKwdOpt", + "EscapedTableRef", + "IndexOption", + "OptCharset", + "WhereClause", + "WhereClauseOptional", + "DistinctOpt", + "IndexTypeOpt", + "OptCollate", + "TableRefs", + "create", + "CrossOpt", + "DBName", + "ExpressionOpt", + "JoinType", + "OptBinary", + "RowFormat", + "show", + "ShowDatabaseNameOpt", + "TableNameList", + "TableOption", + "Username", + "alter", + "Assignment", + "ExpressionListList", + "grant", + "IgnoreOptional", + "lowPriority", + "OrderBy", + "OrderByOptional", + "SelectStmtLimit", + "TableAsName", + "AssignmentList", + "by", + "ByItem", + "ColumnDef", + "constraint", + "Constraint", + "ConstraintKeywordOpt", + "DeleteFromStmt", + "FieldOpt", + "FieldOpts", + "FloatOpt", + "IfNotExists", + "InsertIntoStmt", + "outer", + "Precision", + "ReplaceIntoStmt", + "SelectLockOpt", + "TableOptionList", + "TableOptionListOpt", + "TimeUnit", + "TransactionChar", + "UpdateStmt", + "UserSpec", + "ValueSym", + "AdminStmt", + "AlterTableSpec", + "AlterTableStmt", + "AuthString", + "BeginTransactionStmt", + "ByList", + "CastType", + "column", + "ColumnKeywordOpt", + "ColumnNameList", + "ColumnOption", + "ColumnSetValue", + "CommitStmt", + "CreateDatabaseStmt", + "CreateIndexStmt", + "CreateTableStmt", + "CreateUserStmt", + "DatabaseOption", + "databases", + "DatabaseSym", + "DeallocateStmt", + "DeallocateSym", + "delayed", + "describe", + "DoStmt", + "DropDatabaseStmt", + "DropIndexStmt", + "DropTableStmt", + "EmptyStmt", + "ExecuteStmt", + "explain", + "ExplainStmt", + "ExplainSym", + "Field", + "FuncDatetimePrec", + "GrantStmt", + "IfExists", + "InsertValues", + "interval", + "IntoOpt", + "LimitClause", + "localTime", + "localTs", + "LockTablesStmt", + "LowPriorityOptional", + "NotOpt", + "NowSym", + "NumLiteral", + "OptInteger", + "Order", + "PasswordOpt", + "PreparedStmt", + "PrivElem", + "PrivType", + "RollbackStmt", + "SetStmt", + "ShowStmt", + "ShowTableAliasOpt", + "Statement", + "StringList", + "Symbol", + "TableElement", + "TableLock", + "TransactionChars", + "TruncateTableStmt", + "unlock", + "UnlockTablesStmt", + "use", + "UserSpecList", + "UseStmt", + "VariableAssignment", + "WhenClause", + "AlterTableSpecList", + "AnyOrAll", + "at", + "AuthOption", + "BitValueType", + "BlobType", + "both", + "ColumnNameListOpt", + "ColumnOptionList", + "ColumnOptionListOpt", + "ColumnPosition", + "ColumnSetValueList", + "CompareOp", + "ConstraintElem", + "CreateIndexStmtUnique", + "DatabaseOptionList", + "DatabaseOptionListOpt", + "DateAndTimeType", + "DateArithInterval", + "ddl", + "DefaultValueExpr", + "dual", + "duplicate", + "ElseOpt", + "ExplainableStmt", + "ExpressionListOpt", + "FieldAsName", + "FieldAsNameOpt", + "FieldList", + "FixedPointType", + "FloatingPointType", + "FromDual", + "GlobalScope", + "GroupByClause", + "HashString", + "HavingClause", + "highPriority", + "IntegerType", + "IsolationLevel", + "KeyOrIndex", + "leading", + "LikeEscapeOpt", + "LockType", + "NationalOpt", + "NumericType", + "ObjectType", + "OnDuplicateKeyUpdate", + "OptFull", + "option", + "OuterOpt", + "parseExpression", + "precisionType", + "PrepareSQL", + "Priority", + "PrivElemList", + "PrivLevel", + "procedure", + "QuickOptional", + "ReferDef", + "references", + "RegexpSym", + "ReplacePriority", + "schemas", + "SelectStmtCalcFoundRows", + "SelectStmtDistinct", + "SelectStmtFieldList", + "SelectStmtGroup", + "SelectStmtOpts", + "share", + "ShowLikeOrWhereOpt", + "ShowTargetFilterable", + "SignedLiteral", + "Start", + "StatementList", + "StringType", + "TableAsNameOpt", + "TableElementList", + "TableLockList", + "TableOrTables", + "TableRefsClause", + "TextType", + "trailing", + "TrimDirection", + "Type", + "UnionOpt", + "UserVariableList", + "VariableAssignmentList", + "WhenClauseList", + "$default", + "andnot", + "AssignmentListOpt", + "byteType", + "CommaOpt", + "Default", + "DefaultOpt", + "error", + "insertValues", + "int16Type", + "int24Type", + "int32Type", + "int8Type", + "lowerThanCalcFoundRows", + "lowerThanComma", + "lowerThanEq", + "lowerThanEscape", + "lowerThanInsertValues", + "lowerThanLeftParen", + "lowerThanQuick", + "lowerThanSetKeyword", + "name", + "neg", + "tableRefPriority", + "uint16Type", + "uint32Type", + "uint8Type", + } + + yyReductions = map[int]struct{ xsym, components int }{ + 0: {0, 1}, + 1: {533, 1}, + 2: {533, 2}, + 3: {391, 5}, + 4: {390, 1}, + 5: {390, 4}, + 6: {390, 2}, + 7: {390, 3}, + 8: {390, 3}, + 9: {390, 3}, + 10: {390, 4}, + 11: {500, 1}, + 12: {500, 1}, + 13: {397, 0}, + 14: {397, 1}, + 15: {471, 0}, + 16: {471, 1}, + 17: {471, 2}, + 18: {461, 1}, + 19: {461, 3}, + 20: {371, 0}, + 21: {371, 1}, + 22: {371, 2}, + 23: {449, 1}, + 24: {356, 3}, + 25: {365, 1}, + 26: {365, 3}, + 27: {551, 0}, + 28: {551, 1}, + 29: {393, 1}, + 30: {393, 2}, + 31: {368, 3}, + 32: {242, 1}, + 33: {242, 3}, + 34: {242, 5}, + 35: {398, 1}, + 36: {398, 3}, + 37: {468, 0}, + 38: {468, 1}, + 39: {401, 1}, + 40: {399, 2}, + 41: {399, 1}, + 42: {399, 1}, + 43: {399, 2}, + 44: {399, 1}, + 45: {399, 2}, + 46: {399, 2}, + 47: {399, 3}, + 48: {399, 2}, + 49: {399, 4}, + 50: {469, 1}, + 51: {469, 2}, + 52: {470, 0}, + 53: {470, 1}, + 54: {474, 7}, + 55: {474, 7}, + 56: {474, 7}, + 57: {474, 7}, + 58: {474, 7}, + 59: {474, 8}, + 60: {474, 8}, + 61: {474, 7}, + 62: {519, 5}, + 63: {481, 1}, + 64: {481, 3}, + 65: {481, 1}, + 66: {435, 1}, + 67: {435, 1}, + 68: {435, 1}, + 69: {435, 1}, + 70: {532, 1}, + 71: {532, 2}, + 72: {532, 2}, + 73: {436, 1}, + 74: {436, 1}, + 75: {403, 9}, + 76: {475, 0}, + 77: {475, 1}, + 78: {319, 3}, + 79: {324, 0}, + 80: {324, 1}, + 81: {324, 3}, + 82: {402, 5}, + 83: {345, 1}, + 84: {406, 4}, + 85: {406, 4}, + 86: {477, 0}, + 87: {477, 1}, + 88: {476, 1}, + 89: {476, 2}, + 90: {404, 8}, + 91: {554, 2}, + 92: {555, 0}, + 93: {555, 1}, + 94: {333, 0}, + 95: {333, 1}, + 96: {413, 2}, + 97: {372, 9}, + 98: {372, 8}, + 99: {372, 9}, + 100: {408, 1}, + 101: {408, 1}, + 102: {414, 4}, + 103: {415, 6}, + 104: {416, 3}, + 105: {416, 5}, + 106: {539, 1}, + 107: {539, 1}, + 108: {308, 0}, + 109: {308, 1}, + 110: {417, 0}, + 111: {421, 1}, + 112: {421, 1}, + 113: {421, 1}, + 114: {420, 2}, + 115: {420, 3}, + 116: {420, 2}, + 117: {310, 1}, + 118: {311, 1}, + 119: {298, 3}, + 120: {298, 3}, + 121: {298, 3}, + 122: {298, 2}, + 123: {298, 4}, + 124: {298, 4}, + 125: {298, 4}, + 126: {298, 1}, + 127: {301, 1}, + 128: {301, 1}, + 129: {300, 1}, + 130: {300, 1}, + 131: {570, 1}, + 132: {309, 1}, + 133: {309, 3}, + 134: {486, 0}, + 135: {486, 1}, + 136: {299, 4}, + 137: {299, 3}, + 138: {299, 4}, + 139: {299, 1}, + 140: {473, 1}, + 141: {473, 1}, + 142: {473, 1}, + 143: {473, 1}, + 144: {473, 1}, + 145: {473, 1}, + 146: {473, 1}, + 147: {473, 1}, + 148: {462, 1}, + 149: {462, 1}, + 150: {462, 1}, + 151: {297, 6}, + 152: {297, 4}, + 153: {297, 6}, + 154: {297, 5}, + 155: {297, 4}, + 156: {297, 1}, + 157: {521, 1}, + 158: {521, 1}, + 159: {502, 0}, + 160: {502, 2}, + 161: {434, 0}, + 162: {434, 1}, + 163: {422, 1}, + 164: {422, 3}, + 165: {422, 5}, + 166: {422, 2}, + 167: {488, 0}, + 168: {488, 1}, + 169: {487, 1}, + 170: {487, 2}, + 171: {487, 1}, + 172: {487, 2}, + 173: {489, 1}, + 174: {489, 3}, + 175: {494, 3}, + 176: {496, 0}, + 177: {496, 2}, + 178: {425, 0}, + 179: {425, 2}, + 180: {376, 0}, + 181: {376, 3}, + 182: {359, 0}, + 183: {359, 1}, + 184: {331, 0}, + 185: {331, 1}, + 186: {335, 0}, + 187: {335, 3}, + 188: {335, 1}, + 189: {335, 2}, + 190: {314, 2}, + 191: {314, 2}, + 192: {340, 0}, + 193: {340, 1}, + 194: {206, 1}, + 195: {206, 1}, + 196: {206, 1}, + 197: {208, 1}, + 198: {208, 1}, + 199: {208, 1}, + 200: {208, 1}, + 201: {208, 1}, + 202: {208, 1}, + 203: {208, 1}, + 204: {208, 1}, + 205: {208, 1}, + 206: {208, 1}, + 207: {208, 1}, + 208: {208, 1}, + 209: {208, 1}, + 210: {208, 1}, + 211: {208, 1}, + 212: {208, 1}, + 213: {208, 1}, + 214: {208, 1}, + 215: {208, 1}, + 216: {208, 1}, + 217: {208, 1}, + 218: {208, 1}, + 219: {208, 1}, + 220: {208, 1}, + 221: {208, 1}, + 222: {208, 1}, + 223: {208, 1}, + 224: {208, 1}, + 225: {208, 1}, + 226: {208, 1}, + 227: {208, 1}, + 228: {208, 1}, + 229: {208, 1}, + 230: {208, 1}, + 231: {208, 1}, + 232: {208, 1}, + 233: {208, 1}, + 234: {208, 1}, + 235: {208, 1}, + 236: {208, 1}, + 237: {208, 1}, + 238: {208, 1}, + 239: {208, 1}, + 240: {208, 1}, + 241: {208, 1}, + 242: {208, 1}, + 243: {208, 1}, + 244: {208, 1}, + 245: {208, 1}, + 246: {208, 1}, + 247: {208, 1}, + 248: {208, 1}, + 249: {208, 1}, + 250: {208, 1}, + 251: {208, 1}, + 252: {208, 1}, + 253: {208, 1}, + 254: {208, 1}, + 255: {208, 1}, + 256: {208, 1}, + 257: {208, 1}, + 258: {208, 1}, + 259: {208, 1}, + 260: {208, 1}, + 261: {208, 1}, + 262: {208, 1}, + 263: {208, 1}, + 264: {208, 1}, + 265: {208, 1}, + 266: {208, 1}, + 267: {208, 1}, + 268: {208, 1}, + 269: {208, 1}, + 270: {208, 1}, + 271: {208, 1}, + 272: {208, 1}, + 273: {208, 1}, + 274: {208, 1}, + 275: {208, 1}, + 276: {208, 1}, + 277: {208, 1}, + 278: {207, 1}, + 279: {207, 1}, + 280: {207, 1}, + 281: {207, 1}, + 282: {207, 1}, + 283: {207, 1}, + 284: {207, 1}, + 285: {207, 1}, + 286: {207, 1}, + 287: {207, 1}, + 288: {207, 1}, + 289: {207, 1}, + 290: {207, 1}, + 291: {207, 1}, + 292: {207, 1}, + 293: {207, 1}, + 294: {207, 1}, + 295: {207, 1}, + 296: {207, 1}, + 297: {207, 1}, + 298: {207, 1}, + 299: {207, 1}, + 300: {207, 1}, + 301: {207, 1}, + 302: {207, 1}, + 303: {207, 1}, + 304: {207, 1}, + 305: {207, 1}, + 306: {207, 1}, + 307: {207, 1}, + 308: {207, 1}, + 309: {207, 1}, + 310: {207, 1}, + 311: {207, 1}, + 312: {207, 1}, + 313: {207, 1}, + 314: {207, 1}, + 315: {207, 1}, + 316: {207, 1}, + 317: {207, 1}, + 318: {207, 1}, + 319: {207, 1}, + 320: {207, 1}, + 321: {377, 7}, + 322: {428, 0}, + 323: {428, 1}, + 324: {426, 5}, + 325: {426, 4}, + 326: {426, 4}, + 327: {426, 2}, + 328: {426, 1}, + 329: {426, 1}, + 330: {426, 2}, + 331: {388, 1}, + 332: {388, 1}, + 333: {357, 2}, + 334: {357, 4}, + 335: {357, 3}, + 336: {357, 5}, + 337: {400, 3}, + 338: {472, 0}, + 339: {472, 1}, + 340: {472, 3}, + 341: {507, 0}, + 342: {507, 5}, + 343: {380, 5}, + 344: {522, 0}, + 345: {522, 1}, + 346: {522, 1}, + 347: {257, 1}, + 348: {257, 1}, + 349: {257, 1}, + 350: {257, 1}, + 351: {257, 1}, + 352: {257, 1}, + 353: {257, 2}, + 354: {257, 1}, + 355: {257, 1}, + 356: {282, 1}, + 357: {282, 1}, + 358: {282, 3}, + 359: {282, 1}, + 360: {282, 4}, + 361: {282, 1}, + 362: {282, 1}, + 363: {282, 6}, + 364: {282, 5}, + 365: {282, 2}, + 366: {361, 3}, + 367: {394, 1}, + 368: {394, 3}, + 369: {367, 2}, + 370: {438, 0}, + 371: {438, 1}, + 372: {438, 1}, + 373: {362, 0}, + 374: {362, 1}, + 375: {283, 1}, + 376: {283, 1}, + 377: {283, 1}, + 378: {283, 2}, + 379: {283, 2}, + 380: {283, 2}, + 381: {283, 2}, + 382: {283, 2}, + 383: {283, 3}, + 384: {268, 1}, + 385: {268, 1}, + 386: {268, 1}, + 387: {268, 1}, + 388: {273, 1}, + 389: {273, 1}, + 390: {273, 1}, + 391: {273, 1}, + 392: {273, 1}, + 393: {273, 1}, + 394: {273, 1}, + 395: {273, 1}, + 396: {270, 4}, + 397: {270, 1}, + 398: {270, 1}, + 399: {339, 0}, + 400: {339, 1}, + 401: {339, 1}, + 402: {339, 2}, + 403: {271, 6}, + 404: {271, 5}, + 405: {271, 6}, + 406: {271, 6}, + 407: {271, 4}, + 408: {271, 3}, + 409: {271, 4}, + 410: {271, 4}, + 411: {271, 4}, + 412: {272, 4}, + 413: {272, 3}, + 414: {272, 4}, + 415: {272, 2}, + 416: {272, 2}, + 417: {272, 4}, + 418: {272, 4}, + 419: {272, 4}, + 420: {272, 4}, + 421: {272, 4}, + 422: {272, 4}, + 423: {272, 4}, + 424: {272, 4}, + 425: {272, 8}, + 426: {272, 6}, + 427: {272, 6}, + 428: {272, 3}, + 429: {272, 4}, + 430: {272, 4}, + 431: {272, 4}, + 432: {272, 6}, + 433: {272, 8}, + 434: {272, 4}, + 435: {272, 4}, + 436: {272, 4}, + 437: {272, 4}, + 438: {272, 4}, + 439: {272, 4}, + 440: {272, 6}, + 441: {272, 6}, + 442: {272, 4}, + 443: {272, 8}, + 444: {272, 4}, + 445: {272, 6}, + 446: {272, 6}, + 447: {272, 6}, + 448: {272, 8}, + 449: {272, 8}, + 450: {272, 8}, + 451: {272, 4}, + 452: {272, 4}, + 453: {272, 6}, + 454: {272, 6}, + 455: {272, 7}, + 456: {272, 4}, + 457: {272, 4}, + 458: {272, 4}, + 459: {272, 4}, + 460: {272, 3}, + 461: {262, 1}, + 462: {262, 1}, + 463: {261, 1}, + 464: {261, 1}, + 465: {479, 1}, + 466: {479, 3}, + 467: {543, 1}, + 468: {543, 1}, + 469: {543, 1}, + 470: {269, 5}, + 471: {269, 5}, + 472: {269, 5}, + 473: {269, 5}, + 474: {269, 5}, + 475: {269, 5}, + 476: {269, 5}, + 477: {423, 0}, + 478: {423, 2}, + 479: {423, 3}, + 480: {384, 1}, + 481: {384, 1}, + 482: {384, 1}, + 483: {384, 1}, + 484: {384, 1}, + 485: {384, 1}, + 486: {384, 1}, + 487: {384, 1}, + 488: {384, 1}, + 489: {384, 1}, + 490: {384, 1}, + 491: {384, 1}, + 492: {384, 1}, + 493: {384, 1}, + 494: {384, 1}, + 495: {384, 1}, + 496: {384, 1}, + 497: {384, 1}, + 498: {384, 1}, + 499: {384, 1}, + 500: {346, 0}, + 501: {346, 1}, + 502: {548, 1}, + 503: {548, 2}, + 504: {460, 4}, + 505: {484, 0}, + 506: {484, 2}, + 507: {395, 2}, + 508: {395, 4}, + 509: {395, 1}, + 510: {395, 2}, + 511: {395, 2}, + 512: {395, 2}, + 513: {395, 2}, + 514: {395, 2}, + 515: {296, 3}, + 516: {296, 3}, + 517: {296, 3}, + 518: {296, 3}, + 519: {296, 3}, + 520: {296, 3}, + 521: {296, 3}, + 522: {296, 3}, + 523: {296, 3}, + 524: {296, 3}, + 525: {296, 3}, + 526: {296, 3}, + 527: {296, 1}, + 528: {514, 0}, + 529: {514, 1}, + 530: {514, 1}, + 531: {514, 1}, + 532: {433, 0}, + 533: {433, 1}, + 534: {303, 1}, + 535: {303, 3}, + 536: {352, 1}, + 537: {352, 3}, + 538: {518, 0}, + 539: {518, 1}, + 540: {440, 4}, + 541: {513, 1}, + 542: {513, 1}, + 543: {418, 2}, + 544: {418, 4}, + 545: {546, 1}, + 546: {546, 3}, + 547: {409, 3}, + 548: {410, 1}, + 549: {410, 1}, + 550: {443, 1}, + 551: {307, 5}, + 552: {307, 7}, + 553: {307, 11}, + 554: {492, 2}, + 555: {540, 1}, + 556: {342, 1}, + 557: {342, 3}, + 558: {334, 1}, + 559: {334, 4}, + 560: {328, 1}, + 561: {328, 1}, + 562: {326, 2}, + 563: {326, 4}, + 564: {326, 4}, + 565: {326, 3}, + 566: {536, 0}, + 567: {536, 1}, + 568: {364, 1}, + 569: {364, 2}, + 570: {325, 3}, + 571: {325, 5}, + 572: {325, 7}, + 573: {347, 1}, + 574: {347, 1}, + 575: {510, 0}, + 576: {510, 1}, + 577: {344, 1}, + 578: {344, 2}, + 579: {344, 2}, + 580: {429, 0}, + 581: {429, 2}, + 582: {363, 0}, + 583: {363, 2}, + 584: {363, 4}, + 585: {363, 4}, + 586: {525, 0}, + 587: {525, 1}, + 588: {525, 1}, + 589: {528, 2}, + 590: {524, 0}, + 591: {524, 1}, + 592: {526, 1}, + 593: {527, 0}, + 594: {527, 1}, + 595: {246, 3}, + 596: {246, 3}, + 597: {381, 0}, + 598: {381, 2}, + 599: {381, 4}, + 600: {317, 4}, + 601: {317, 8}, + 602: {316, 1}, + 603: {316, 4}, + 604: {315, 1}, + 605: {315, 3}, + 606: {545, 0}, + 607: {545, 1}, + 608: {545, 1}, + 609: {444, 2}, + 610: {444, 3}, + 611: {444, 5}, + 612: {444, 3}, + 613: {444, 4}, + 614: {444, 6}, + 615: {444, 4}, + 616: {444, 4}, + 617: {452, 1}, + 618: {452, 3}, + 619: {385, 3}, + 620: {385, 2}, + 621: {385, 2}, + 622: {499, 2}, + 623: {499, 2}, + 624: {499, 2}, + 625: {499, 1}, + 626: {459, 3}, + 627: {459, 4}, + 628: {459, 4}, + 629: {459, 4}, + 630: {459, 3}, + 631: {459, 3}, + 632: {547, 0}, + 633: {547, 1}, + 634: {547, 3}, + 635: {294, 1}, + 636: {294, 1}, + 637: {287, 1}, + 638: {252, 1}, + 639: {354, 3}, + 640: {439, 1}, + 641: {439, 4}, + 642: {392, 1}, + 643: {389, 3}, + 644: {389, 4}, + 645: {445, 3}, + 646: {445, 4}, + 647: {445, 2}, + 648: {445, 4}, + 649: {445, 4}, + 650: {531, 1}, + 651: {531, 1}, + 652: {531, 1}, + 653: {531, 2}, + 654: {531, 3}, + 655: {531, 3}, + 656: {531, 4}, + 657: {531, 4}, + 658: {531, 1}, + 659: {531, 2}, + 660: {531, 2}, + 661: {531, 1}, + 662: {531, 2}, + 663: {531, 2}, + 664: {530, 0}, + 665: {530, 2}, + 666: {530, 2}, + 667: {493, 0}, + 668: {493, 1}, + 669: {493, 1}, + 670: {508, 0}, + 671: {508, 1}, + 672: {351, 0}, + 673: {351, 2}, + 674: {351, 2}, + 675: {446, 2}, + 676: {446, 2}, + 677: {447, 1}, + 678: {447, 1}, + 679: {447, 1}, + 680: {447, 1}, + 681: {447, 1}, + 682: {447, 1}, + 683: {447, 1}, + 684: {447, 1}, + 685: {447, 1}, + 686: {447, 1}, + 687: {447, 1}, + 688: {447, 1}, + 689: {447, 1}, + 690: {447, 1}, + 691: {447, 1}, + 692: {447, 1}, + 693: {447, 1}, + 694: {447, 1}, + 695: {447, 1}, + 696: {447, 1}, + 697: {447, 1}, + 698: {447, 1}, + 699: {447, 1}, + 700: {447, 1}, + 701: {447, 1}, + 702: {447, 1}, + 703: {447, 1}, + 704: {447, 1}, + 705: {447, 1}, + 706: {447, 1}, + 707: {447, 1}, + 708: {447, 1}, + 709: {485, 1}, + 710: {485, 1}, + 711: {485, 1}, + 712: {485, 1}, + 713: {485, 1}, + 714: {534, 1}, + 715: {534, 3}, + 716: {370, 2}, + 717: {450, 1}, + 718: {450, 1}, + 719: {450, 4}, + 720: {537, 1}, + 721: {537, 3}, + 722: {353, 2}, + 723: {353, 3}, + 724: {353, 4}, + 725: {353, 4}, + 726: {353, 3}, + 727: {353, 3}, + 728: {353, 3}, + 729: {353, 3}, + 730: {353, 3}, + 731: {353, 3}, + 732: {353, 3}, + 733: {353, 3}, + 734: {353, 3}, + 735: {353, 3}, + 736: {353, 3}, + 737: {353, 1}, + 738: {383, 0}, + 739: {383, 1}, + 740: {382, 1}, + 741: {382, 2}, + 742: {382, 3}, + 743: {453, 3}, + 744: {349, 3}, + 745: {349, 3}, + 746: {349, 3}, + 747: {349, 3}, + 748: {349, 3}, + 749: {349, 3}, + 750: {544, 1}, + 751: {544, 1}, + 752: {544, 1}, + 753: {544, 1}, + 754: {544, 1}, + 755: {544, 1}, + 756: {544, 1}, + 757: {544, 1}, + 758: {544, 1}, + 759: {505, 3}, + 760: {505, 3}, + 761: {505, 3}, + 762: {505, 2}, + 763: {498, 1}, + 764: {498, 1}, + 765: {498, 1}, + 766: {498, 1}, + 767: {498, 1}, + 768: {498, 1}, + 769: {498, 1}, + 770: {498, 1}, + 771: {437, 0}, + 772: {437, 1}, + 773: {490, 1}, + 774: {490, 1}, + 775: {491, 1}, + 776: {491, 1}, + 777: {491, 1}, + 778: {491, 2}, + 779: {465, 1}, + 780: {535, 6}, + 781: {535, 5}, + 782: {535, 6}, + 783: {535, 2}, + 784: {535, 2}, + 785: {535, 1}, + 786: {535, 4}, + 787: {535, 6}, + 788: {535, 6}, + 789: {504, 0}, + 790: {504, 1}, + 791: {466, 1}, + 792: {466, 2}, + 793: {466, 1}, + 794: {466, 1}, + 795: {541, 1}, + 796: {541, 2}, + 797: {541, 1}, + 798: {541, 1}, + 799: {478, 1}, + 800: {478, 2}, + 801: {478, 2}, + 802: {478, 2}, + 803: {478, 2}, + 804: {306, 3}, + 805: {312, 0}, + 806: {312, 1}, + 807: {373, 1}, + 808: {373, 1}, + 809: {374, 0}, + 810: {374, 2}, + 811: {375, 0}, + 812: {375, 1}, + 813: {375, 1}, + 814: {379, 5}, + 815: {348, 0}, + 816: {348, 1}, + 817: {336, 0}, + 818: {336, 2}, + 819: {323, 2}, + 820: {323, 1}, + 821: {341, 0}, + 822: {341, 2}, + 823: {448, 1}, + 824: {448, 3}, + 825: {321, 1}, + 826: {321, 1}, + 827: {386, 9}, + 828: {386, 7}, + 829: {458, 2}, + 830: {337, 2}, + 831: {338, 0}, + 832: {338, 1}, + 833: {553, 0}, + 834: {553, 1}, + 835: {405, 4}, + 836: {387, 2}, + 837: {457, 1}, + 838: {457, 3}, + 839: {464, 0}, + 840: {464, 3}, + 841: {464, 4}, + 842: {495, 1}, + 843: {424, 7}, + 844: {441, 1}, + 845: {441, 4}, + 846: {515, 1}, + 847: {515, 3}, + 848: {442, 1}, + 849: {442, 1}, + 850: {442, 1}, + 851: {442, 2}, + 852: {442, 1}, + 853: {442, 1}, + 854: {442, 1}, + 855: {442, 1}, + 856: {442, 1}, + 857: {442, 1}, + 858: {442, 2}, + 859: {442, 1}, + 860: {442, 2}, + 861: {506, 0}, + 862: {506, 1}, + 863: {516, 1}, + 864: {516, 3}, + 865: {516, 3}, + 866: {516, 3}, + 867: {516, 1}, + 868: {455, 2}, + 869: {432, 3}, + 870: {451, 2}, + 871: {503, 1}, + 872: {503, 2}, + 873: {503, 1}, + 874: {538, 1}, + 875: {538, 3}, + } + + yyXErrors = map[yyXError]string{ + yyXError{1, -1}: "expected $end", + yyXError{392, -1}: "expected '('", + yyXError{393, -1}: "expected '('", + yyXError{394, -1}: "expected '('", + yyXError{395, -1}: "expected '('", + yyXError{396, -1}: "expected '('", + yyXError{399, -1}: "expected '('", + yyXError{400, -1}: "expected '('", + yyXError{402, -1}: "expected '('", + yyXError{403, -1}: "expected '('", + yyXError{404, -1}: "expected '('", + yyXError{407, -1}: "expected '('", + yyXError{408, -1}: "expected '('", + yyXError{409, -1}: "expected '('", + yyXError{410, -1}: "expected '('", + yyXError{411, -1}: "expected '('", + yyXError{412, -1}: "expected '('", + yyXError{413, -1}: "expected '('", + yyXError{414, -1}: "expected '('", + yyXError{834, -1}: "expected '('", + yyXError{999, -1}: "expected '('", + yyXError{1105, -1}: "expected '('", + yyXError{1106, -1}: "expected '('", + yyXError{1201, -1}: "expected '('", + yyXError{1209, -1}: "expected '('", + yyXError{1222, -1}: "expected '('", + yyXError{1235, -1}: "expected '('", + yyXError{1243, -1}: "expected '('", + yyXError{1245, -1}: "expected '('", + yyXError{1260, -1}: "expected '('", + yyXError{1265, -1}: "expected '('", + yyXError{1271, -1}: "expected '('", + yyXError{1277, -1}: "expected '('", + yyXError{1283, -1}: "expected '('", + yyXError{1289, -1}: "expected '('", + yyXError{1390, -1}: "expected '('", + yyXError{1391, -1}: "expected '('", + yyXError{1465, -1}: "expected '('", + yyXError{1512, -1}: "expected '('", + yyXError{287, -1}: "expected ')'", + yyXError{434, -1}: "expected ')'", + yyXError{480, -1}: "expected ')'", + yyXError{483, -1}: "expected ')'", + yyXError{490, -1}: "expected ')'", + yyXError{498, -1}: "expected ')'", + yyXError{501, -1}: "expected ')'", + yyXError{507, -1}: "expected ')'", + yyXError{510, -1}: "expected ')'", + yyXError{516, -1}: "expected ')'", + yyXError{517, -1}: "expected ')'", + yyXError{518, -1}: "expected ')'", + yyXError{519, -1}: "expected ')'", + yyXError{524, -1}: "expected ')'", + yyXError{526, -1}: "expected ')'", + yyXError{532, -1}: "expected ')'", + yyXError{534, -1}: "expected ')'", + yyXError{538, -1}: "expected ')'", + yyXError{546, -1}: "expected ')'", + yyXError{548, -1}: "expected ')'", + yyXError{565, -1}: "expected ')'", + yyXError{570, -1}: "expected ')'", + yyXError{584, -1}: "expected ')'", + yyXError{586, -1}: "expected ')'", + yyXError{591, -1}: "expected ')'", + yyXError{660, -1}: "expected ')'", + yyXError{673, -1}: "expected ')'", + yyXError{716, -1}: "expected ')'", + yyXError{736, -1}: "expected ')'", + yyXError{740, -1}: "expected ')'", + yyXError{742, -1}: "expected ')'", + yyXError{761, -1}: "expected ')'", + yyXError{1001, -1}: "expected ')'", + yyXError{1017, -1}: "expected ')'", + yyXError{1125, -1}: "expected ')'", + yyXError{1489, -1}: "expected ')'", + yyXError{250, -1}: "expected '*'", + yyXError{854, -1}: "expected =", + yyXError{953, -1}: "expected =", + yyXError{954, -1}: "expected =", + yyXError{955, -1}: "expected =", + yyXError{968, -1}: "expected =", + yyXError{971, -1}: "expected =", + yyXError{995, -1}: "expected =", + yyXError{1007, -1}: "expected =", + yyXError{1109, -1}: "expected =", + yyXError{1301, -1}: "expected =", + yyXError{1252, -1}: "expected = or empty or Field length num(uint64) or one of [=, integer literal]", + yyXError{1303, -1}: "expected = or empty or Field length num(uint64) or one of [=, integer literal]", + yyXError{1305, -1}: "expected = or empty or Field length num(uint64) or one of [=, integer literal]", + yyXError{1308, -1}: "expected = or empty or Field length num(uint64) or one of [=, integer literal]", + yyXError{1309, -1}: "expected = or empty or Field length num(uint64) or one of [=, integer literal]", + yyXError{1310, -1}: "expected = or empty or Field length num(uint64) or one of [=, integer literal]", + yyXError{1311, -1}: "expected = or empty or Field length num(uint64) or one of [=, integer literal]", + yyXError{1307, -1}: "expected = or empty or identifier or unreserved keyword or one of [=, ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1315, -1}: "expected = or empty or one of [=, COMPACT, COMPRESSED, DEFAULT, DYNAMIC, FIXED, REDUNDANT]", + yyXError{1302, -1}: "expected = or empty or one of [=, string literal]", + yyXError{1304, -1}: "expected = or empty or one of [=, string literal]", + yyXError{1306, -1}: "expected = or empty or one of [=, string literal]", + yyXError{1348, -1}: "expected = or empty or string literal or identifier or one of [=, ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{1349, -1}: "expected = or empty or string literal or identifier or one of [=, ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{1503, -1}: "expected = or empty or string literal or identifier or one of [=, ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{1504, -1}: "expected = or empty or string literal or identifier or one of [=, ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{253, -1}: "expected AT", + yyXError{1519, -1}: "expected Alter table specification list or one of [$end, ',', ';', ADD, AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, DROP, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1544, -1}: "expected Alter table specification or one of [$end, ',', ';', ADD, AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, DROP, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{821, -1}: "expected Any or All for subquery or Predicate expression factor or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{260, -1}: "expected BY", + yyXError{862, -1}: "expected BY", + yyXError{1046, -1}: "expected BY", + yyXError{872, -1}: "expected BY item or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{868, -1}: "expected BY list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1061, -1}: "expected BY list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1497, -1}: "expected CREATE Database specification list opt or one of [$end, ';', CHARACTER, CHARSET, COLLATE, DEFAULT]", + yyXError{1500, -1}: "expected CREATE Database specification or one of [$end, ';', CHARACTER, CHARSET, COLLATE, DEFAULT]", + yyXError{8, -1}: "expected CREATE INDEX optional UNIQUE clause or DATABASE or SCHEMA or one of [DATABASE, INDEX, SCHEMA, TABLE, UNIQUE, USER]", + yyXError{1473, -1}: "expected CURRENT_TIMESTAMP/LOCALTIME/LOCALTIMESTAMP/NOW or one of [CURRENT_TIMESTAMP, LOCALTIME, LOCALTIMESTAMP, NOW]", + yyXError{506, -1}: "expected Cast function target type or one of [BINARY, CHAR, DATE, DATETIME, DECIMAL, SIGNED, TIME, UNSIGNED]", + yyXError{564, -1}: "expected Cast function target type or one of [BINARY, CHAR, DATE, DATETIME, DECIMAL, SIGNED, TIME, UNSIGNED]", + yyXError{1523, -1}: "expected Column keyword or empty or column name or {KEY|INDEX} or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMN, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOREIGN, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INDEX, ISOLATION, KEY, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1522, -1}: "expected Column keyword or empty or table column definition or table constraint or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMN, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONSTRAINT, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOREIGN, FOUND_ROWS, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INDEX, ISOLATION, KEY, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNIQUE, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1539, -1}: "expected Column position [First|After ColumnName] or one of [$end, ',', ';', AFTER, FIRST]", + yyXError{313, -1}: "expected Compare opcode or one of [!=, $end, &&, ')', ',', ';', '<', '>', '}', <=, <=>, <>, =, >=, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{1203, -1}: "expected Constraint Symbol or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOREIGN, FOUND_ROWS, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INDEX, ISOLATION, KEY, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNIQUE, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1532, -1}: "expected Constraint Symbol or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{842, -1}: "expected Cross join option or join type or one of [$end, ')', ',', ';', '}', CROSS, FOR, GROUP, HAVING, INNER, JOIN, LEFT, LIMIT, LOCK, ON, ORDER, RIGHT, SET, UNION, WHERE]", + yyXError{284, -1}: "expected Cross join option or join type or one of [$end, ')', ',', ';', CROSS, FOR, GROUP, HAVING, INNER, JOIN, LEFT, LIMIT, LOCK, ON, ORDER, RIGHT, SET, UNION, WHERE]", + yyXError{277, -1}: "expected Cross join option or join type or one of [',', CROSS, INNER, JOIN, LEFT, RIGHT, SET]", + yyXError{851, -1}: "expected Cross join option or join type or one of ['}', CROSS, INNER, JOIN, LEFT, RIGHT]", + yyXError{309, -1}: "expected Cross join option or join type or one of [CROSS, INNER, JOIN, LEFT, ON, RIGHT]", + yyXError{11, -1}: "expected DATABASE or SCHEMA or TableOrTables or one of [DATABASE, INDEX, PREPARE, SCHEMA, TABLE, TABLES]", + yyXError{222, -1}: "expected DATABASES", + yyXError{937, -1}: "expected DDL", + yyXError{1140, -1}: "expected DUPLICATE", + yyXError{1155, -1}: "expected Database Name or If Exists or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1192, -1}: "expected Database Name or If Not Exists or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{65, -1}: "expected Database Name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{905, -1}: "expected Database Name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{906, -1}: "expected Database Name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1170, -1}: "expected Database Name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1496, -1}: "expected Database Name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{478, -1}: "expected Date arith interval part or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, INTERVAL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1462, -1}: "expected DefaultValueExpr(Now or Signed Literal) or one of ['+', '-', CURRENT_TIMESTAMP, LOCALTIME, LOCALTIMESTAMP, NOW, NULL, UNDERSCORE_CHARSET, bit literal, false, floating-point literal, hexadecimal literal, integer literal, string literal, true]", + yyXError{733, -1}: "expected Distinct option or expression list or one of ['!', '(', '*', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DISTINCT, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{712, -1}: "expected Distinct option or expression list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DISTINCT, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{772, -1}: "expected Distinct option or expression list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DISTINCT, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{628, -1}: "expected Distinct option or expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DISTINCT, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{684, -1}: "expected Distinct option or expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DISTINCT, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{691, -1}: "expected Distinct option or expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DISTINCT, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{557, -1}: "expected END", + yyXError{1161, -1}: "expected EXISTS", + yyXError{1165, -1}: "expected EXISTS", + yyXError{1198, -1}: "expected EXISTS", + yyXError{1038, -1}: "expected FOR UPDATE or LOCK IN SHARE MODE, or FromDual or SELECT statement optional LIMIT clause or one of [$end, ')', ';', FOR, FROM, LIMIT, LOCK, ON, UNION]", + yyXError{1042, -1}: "expected FOR UPDATE or LOCK IN SHARE MODE, or HAVING clause or Optinal WHERE clause or Optional ORDER BY clause optional or SELECT statement optional GROUP BY clause or SELECT statement optional LIMIT clause or one of [$end, ')', ';', FOR, GROUP, HAVING, LIMIT, LOCK, ON, ORDER, UNION, WHERE]", + yyXError{1045, -1}: "expected FOR UPDATE or LOCK IN SHARE MODE, or HAVING clause or Optional ORDER BY clause optional or SELECT statement optional GROUP BY clause or SELECT statement optional LIMIT clause or one of [$end, ')', ';', FOR, GROUP, HAVING, LIMIT, LOCK, ON, ORDER, UNION]", + yyXError{1047, -1}: "expected FOR UPDATE or LOCK IN SHARE MODE, or HAVING clause or Optional ORDER BY clause optional or SELECT statement optional LIMIT clause or one of [$end, ')', ';', FOR, HAVING, LIMIT, LOCK, ON, ORDER, UNION]", + yyXError{1040, -1}: "expected FOR UPDATE or LOCK IN SHARE MODE, or Optinal WHERE clause or SELECT statement optional LIMIT clause or one of [$end, ')', ';', FOR, LIMIT, LOCK, ON, UNION, WHERE]", + yyXError{1050, -1}: "expected FOR UPDATE or LOCK IN SHARE MODE, or Optional ORDER BY clause optional or SELECT statement optional LIMIT clause or one of [$end, ')', ';', FOR, LIMIT, LOCK, ON, ORDER, UNION]", + yyXError{1051, -1}: "expected FOR UPDATE or LOCK IN SHARE MODE, or SELECT statement optional LIMIT clause or one of [$end, ')', ';', FOR, LIMIT, LOCK, ON, UNION]", + yyXError{1063, -1}: "expected FOR UPDATE or LOCK IN SHARE MODE, or SELECT statement optional LIMIT clause or one of [$end, ')', ';', FOR, LIMIT, LOCK, ON, UNION]", + yyXError{1039, -1}: "expected FOR UPDATE or LOCK IN SHARE MODE, or one of [$end, ')', ';', FOR, LOCK, ON, UNION]", + yyXError{1052, -1}: "expected FOR UPDATE or LOCK IN SHARE MODE, or one of [$end, ')', ';', FOR, LOCK, ON, UNION]", + yyXError{1064, -1}: "expected FOR UPDATE or LOCK IN SHARE MODE, or one of [$end, ')', ';', FOR, LOCK, ON, UNION]", + yyXError{452, -1}: "expected FROM", + yyXError{888, -1}: "expected FROM", + yyXError{1089, -1}: "expected FROM", + yyXError{1034, -1}: "expected Field alias name opt or logical and operator or logical or operator or one of [$end, &&, ')', ',', ';', ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, XOR, YEAR, YEARWEEK, identifier, string literal, ||]", + yyXError{520, -1}: "expected Field length num(uint64) or integer literal", + yyXError{527, -1}: "expected Field length num(uint64) or integer literal", + yyXError{531, -1}: "expected Field length num(uint64) or integer literal", + yyXError{865, -1}: "expected Field length num(uint64) or integer literal", + yyXError{1020, -1}: "expected Field length num(uint64) or integer literal", + yyXError{1023, -1}: "expected Field length num(uint64) or integer literal", + yyXError{1024, -1}: "expected Field length num(uint64) or integer literal", + yyXError{1257, -1}: "expected Field length num(uint64) or integer literal", + yyXError{1326, -1}: "expected Field length num(uint64) or integer literal", + yyXError{1328, -1}: "expected Field length num(uint64) or integer literal", + yyXError{1330, -1}: "expected Field length num(uint64) or integer literal", + yyXError{1332, -1}: "expected Field length num(uint64) or integer literal", + yyXError{1338, -1}: "expected Field length num(uint64) or integer literal", + yyXError{1342, -1}: "expected Field length num(uint64) or integer literal", + yyXError{1346, -1}: "expected Field length num(uint64) or integer literal", + yyXError{1387, -1}: "expected Field length or '('", + yyXError{1433, -1}: "expected Field length or '('", + yyXError{1432, -1}: "expected Field length or Optional BINARY or Optional Character setting or Optional Collate setting or one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, BINARY, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1367, -1}: "expected Field length or empty or Field type definition option list or one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1226, -1}: "expected Field length or empty or ORDER BY clause optional collation specification or one of ['(', ')', ',', ASC, DESC]", + yyXError{509, -1}: "expected Field length or empty or Optional BINARY or Optional Character setting or one of ['(', ')', BINARY, CHARACTER, CHARSET]", + yyXError{1398, -1}: "expected Field length or empty or one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, BINARY, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1370, -1}: "expected Field length or empty or one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1386, -1}: "expected Field length or empty or one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1394, -1}: "expected Field length or empty or one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1402, -1}: "expected Field length or empty or one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1403, -1}: "expected Field length or empty or one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1404, -1}: "expected Field length or empty or one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1405, -1}: "expected Field length or empty or one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{508, -1}: "expected Field length or empty or one of ['(', ')']", + yyXError{511, -1}: "expected Field length or empty or one of ['(', ')']", + yyXError{513, -1}: "expected Field length or empty or one of ['(', ')']", + yyXError{1368, -1}: "expected Field type definition option list or Floating-point type option or one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1369, -1}: "expected Field type definition option list or Floating-point type option or one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1447, -1}: "expected Field type definition option list or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1452, -1}: "expected Field type definition option list or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1454, -1}: "expected Field type definition option list or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1448, -1}: "expected Field type definition option or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1453, -1}: "expected Field type definition option or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1455, -1}: "expected Field type definition option or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{512, -1}: "expected Floating-point type option or one of ['(', ')']", + yyXError{405, -1}: "expected Function datetime precision or one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{406, -1}: "expected Function datetime precision or one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{239, -1}: "expected Grant statement object type or Privilege scope or one of ['*', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLE, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{264, -1}: "expected Hashed string or string literal", + yyXError{16, -1}: "expected IGNORE or empty or INTO or EmptyString or Table name or insert statement priority or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAYED, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HIGH_PRIORITY, HOUR, IDENTIFIED, IFNULL, IGNORE, INTO, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, LOW_PRIORITY, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1131, -1}: "expected IGNORE or empty or INTO or EmptyString or Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, IGNORE, INTO, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{10, -1}: "expected IGNORE or empty or LOW_PRIORITY or empty or QUICK or empty or Table name list or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, IGNORE, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, LOW_PRIORITY, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{64, -1}: "expected IGNORE or empty or LOW_PRIORITY or empty or table reference or table references or one of ['(', '{', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, IGNORE, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, LOW_PRIORITY, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1172, -1}: "expected IGNORE or empty or QUICK or empty or Table name list or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, IGNORE, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1173, -1}: "expected IGNORE or empty or Table name list or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, IGNORE, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{4, -1}: "expected IGNORE or empty or one of [IGNORE, TABLE]", + yyXError{272, -1}: "expected IGNORE or empty or table reference or table references or one of ['(', '{', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, IGNORE, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1055, -1}: "expected IN", + yyXError{1190, -1}: "expected INDEX", + yyXError{1191, -1}: "expected INDEX", + yyXError{487, -1}: "expected INTERVAL", + yyXError{1094, -1}: "expected INTO or EmptyString or Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INTO, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1135, -1}: "expected INTO or EmptyString or Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INTO, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{17, -1}: "expected INTO or EmptyString or Table name or replace statement priority or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAYED, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INTO, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, LOW_PRIORITY, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1156, -1}: "expected If Exists or identifier or unreserved keyword or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1193, -1}: "expected If Not Exists or Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1194, -1}: "expected If Not Exists or Username and auth option list or one of [IF, string literal]", + yyXError{1250, -1}: "expected Index Option or one of [$end, ')', ',', ';', COMMENT, KEY_BLOCK_SIZE, USING]", + yyXError{1263, -1}: "expected Index Option or one of [$end, ')', ',', ';', COMMENT, KEY_BLOCK_SIZE, USING]", + yyXError{1268, -1}: "expected Index Option or one of [$end, ')', ',', ';', COMMENT, KEY_BLOCK_SIZE, USING]", + yyXError{1274, -1}: "expected Index Option or one of [$end, ')', ',', ';', COMMENT, KEY_BLOCK_SIZE, USING]", + yyXError{1280, -1}: "expected Index Option or one of [$end, ')', ',', ';', COMMENT, KEY_BLOCK_SIZE, USING]", + yyXError{1286, -1}: "expected Index Option or one of [$end, ')', ',', ';', COMMENT, KEY_BLOCK_SIZE, USING]", + yyXError{1292, -1}: "expected Index Option or one of [$end, ')', ',', ';', COMMENT, KEY_BLOCK_SIZE, USING]", + yyXError{1231, -1}: "expected Index column name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{981, -1}: "expected Isolation level or one of [READ, REPEATABLE, SERIALIZABLE]", + yyXError{302, -1}: "expected JOIN", + yyXError{303, -1}: "expected JOIN", + yyXError{306, -1}: "expected JOIN", + yyXError{307, -1}: "expected JOIN", + yyXError{1141, -1}: "expected KEY", + yyXError{1214, -1}: "expected KEY", + yyXError{1215, -1}: "expected KEY", + yyXError{1219, -1}: "expected KEY", + yyXError{1460, -1}: "expected KEY", + yyXError{1526, -1}: "expected KEY", + yyXError{1528, -1}: "expected KEY", + yyXError{977, -1}: "expected LEVEL", + yyXError{1181, -1}: "expected LIMIT clause or Optinal WHERE clause or Optional ORDER BY clause optional or one of [$end, ',', ';', LIMIT, ORDER, USING, WHERE]", + yyXError{856, -1}: "expected LIMIT clause or Optinal WHERE clause or Optional ORDER BY clause optional or one of [$end, ',', ';', LIMIT, ORDER, WHERE]", + yyXError{858, -1}: "expected LIMIT clause or Optional ORDER BY clause optional or one of [$end, ';', LIMIT, ORDER]", + yyXError{1186, -1}: "expected LIMIT clause or Optional ORDER BY clause optional or one of [$end, ';', LIMIT, ORDER]", + yyXError{864, -1}: "expected LIMIT clause or one of [$end, ';', LIMIT]", + yyXError{1187, -1}: "expected LIMIT clause or one of [$end, ';', LIMIT]", + yyXError{1224, -1}: "expected List of index column name or one of [')', ',', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1236, -1}: "expected List of index column name or one of [')', ',', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1248, -1}: "expected List of index column name or one of [')', ',', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1261, -1}: "expected List of index column name or one of [')', ',', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1266, -1}: "expected List of index column name or one of [')', ',', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1272, -1}: "expected List of index column name or one of [')', ',', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1278, -1}: "expected List of index column name or one of [')', ',', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1284, -1}: "expected List of index column name or one of [')', ',', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1290, -1}: "expected List of index column name or one of [')', ',', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1513, -1}: "expected List of index column name or one of [')', ',', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1057, -1}: "expected MODE", + yyXError{1195, -1}: "expected NOT", + yyXError{1457, -1}: "expected NULL", + yyXError{1483, -1}: "expected Num/Int/Float/Decimal Literal or one of [floating-point literal, integer literal]", + yyXError{1484, -1}: "expected Num/Int/Float/Decimal Literal or one of [floating-point literal, integer literal]", + yyXError{1167, -1}: "expected ON", + yyXError{1510, -1}: "expected ON", + yyXError{1138, -1}: "expected ON DUPLICATE KEY UPDATE value list or one of [$end, ';', ON]", + yyXError{224, -1}: "expected OPTION", + yyXError{869, -1}: "expected ORDER BY clause optional collation specification or logical and operator or logical or operator or one of [$end, &&, ')', ',', ';', AND, ASC, DESC, FOR, HAVING, LIMIT, LOCK, ON, OR, ORDER, UNION, XOR, ||]", + yyXError{1228, -1}: "expected ORDER BY clause optional collation specification or one of [')', ',', ASC, DESC]", + yyXError{881, -1}: "expected Optinal WHERE clause or one of [$end, ',', ';', WHERE]", + yyXError{1179, -1}: "expected Optinal WHERE clause or one of [$end, ',', ';', WHERE]", + yyXError{1184, -1}: "expected Optinal WHERE clause or one of [$end, ',', ';', WHERE]", + yyXError{1389, -1}: "expected Optional BINARY or Optional Character setting or Optional Collate setting or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, BINARY, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1434, -1}: "expected Optional BINARY or Optional Character setting or Optional Collate setting or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, BINARY, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1438, -1}: "expected Optional BINARY or Optional Character setting or Optional Collate setting or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, BINARY, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{535, -1}: "expected Optional BINARY or Optional Character setting or one of [')', BINARY, CHARACTER, CHARSET]", + yyXError{1415, -1}: "expected Optional Character setting or Optional Collate setting or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1424, -1}: "expected Optional Character setting or Optional Collate setting or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1427, -1}: "expected Optional Character setting or Optional Collate setting or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1435, -1}: "expected Optional Character setting or Optional Collate setting or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1439, -1}: "expected Optional Character setting or Optional Collate setting or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1442, -1}: "expected Optional Character setting or Optional Collate setting or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{536, -1}: "expected Optional Character setting or one of [')', CHARACTER, CHARSET]", + yyXError{1418, -1}: "expected Optional Collate setting or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1425, -1}: "expected Optional Collate setting or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1428, -1}: "expected Optional Collate setting or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1436, -1}: "expected Optional Collate setting or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1440, -1}: "expected Optional Collate setting or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1443, -1}: "expected Optional Collate setting or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{514, -1}: "expected Optional Integer keyword or one of [')', INTEGER]", + yyXError{515, -1}: "expected Optional Integer keyword or one of [')', INTEGER]", + yyXError{1018, -1}: "expected Optional ORDER BY clause optional or SELECT statement optional LIMIT clause or one of [$end, ')', ';', LIMIT, ON, ORDER, UNION]", + yyXError{551, -1}: "expected Optional else clause or When clause or one of [ELSE, END, WHEN]", + yyXError{401, -1}: "expected Optional expression or When clause list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{432, -1}: "expected Optional expression or one of ['!', '(', ')', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{659, -1}: "expected Optional expression or one of ['!', '(', ')', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{672, -1}: "expected Optional expression or one of ['!', '(', ')', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{739, -1}: "expected Optional expression or one of ['!', '(', ')', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1218, -1}: "expected Optional index type or index name or one of ['(', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INDEX, ISOLATION, KEY, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1216, -1}: "expected Optional index type or index name or one of ['(', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1217, -1}: "expected Optional index type or index name or one of ['(', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1240, -1}: "expected Optional index type or index name or one of ['(', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1241, -1}: "expected Optional index type or index name or one of ['(', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1239, -1}: "expected Optional index type or one of ['(', USING]", + yyXError{1242, -1}: "expected Optional index type or one of ['(', USING]", + yyXError{1259, -1}: "expected Optional index type or one of ['(', USING]", + yyXError{1270, -1}: "expected Optional index type or one of ['(', USING]", + yyXError{1276, -1}: "expected Optional index type or one of ['(', USING]", + yyXError{1288, -1}: "expected Optional index type or one of ['(', USING]", + yyXError{20, -1}: "expected PREPARE", + yyXError{21, -1}: "expected PREPARE", + yyXError{993, -1}: "expected Password option or one of [PASSWORD, string literal]", + yyXError{996, -1}: "expected Password option or one of [PASSWORD, string literal]", + yyXError{261, -1}: "expected Password string value or one of [PASSWORD, string literal]", + yyXError{1000, -1}: "expected Password string value or string literal", + yyXError{814, -1}: "expected Predicate expression factor or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1090, -1}: "expected Prepare statement sql string or one of [USER_VAR, string literal]", + yyXError{66, -1}: "expected Privilege element list or one of [ALL, ALTER, CREATE, DELETE, DROP, EXECUTE, GRANT, INDEX, INSERT, SELECT, SHOW, UPDATE]", + yyXError{240, -1}: "expected Privilege element or one of [ALL, ALTER, CREATE, DELETE, DROP, EXECUTE, GRANT, INDEX, INSERT, SELECT, SHOW, UPDATE]", + yyXError{242, -1}: "expected Privilege scope or one of ['*', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{983, -1}: "expected READ", + yyXError{776, -1}: "expected REGEXP or RLIKE or one of [BETWEEN, IN, LIKE, REGEXP, RLIKE]", + yyXError{315, -1}: "expected REGEXP or RLIKE or optional NOT or one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{1230, -1}: "expected Reference definition or REFERENCES", + yyXError{1099, -1}: "expected Rest part of INSERT/REPLACE INTO statement or one of ['(', SELECT, SET, VALUE, VALUES]", + yyXError{1137, -1}: "expected Rest part of INSERT/REPLACE INTO statement or one of ['(', SELECT, SET, VALUE, VALUES]", + yyXError{23, -1}: "expected SELECT statement field list or Select statement options or one of ['!', '(', '*', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DISTINCT, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1027, -1}: "expected SELECT statement field list or one of ['!', '(', '*', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1019, -1}: "expected SELECT statement optional LIMIT clause or one of [$end, ')', ';', LIMIT, ON]", + yyXError{1030, -1}: "expected SELECT statement optional SQL_CALC_FOUND_ROWS or one of ['!', '(', '*', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{585, -1}: "expected SELECT statement or SELECT", + yyXError{1015, -1}: "expected SELECT statement or SELECT", + yyXError{1010, -1}: "expected SELECT statement or Union (select) item or Union Option(empty/ALL/DISTINCT) or one of ['(', ALL, DISTINCT, SELECT]", + yyXError{1011, -1}: "expected SELECT statement or Union (select) item or one of ['(', SELECT]", + yyXError{1126, -1}: "expected SELECT statement or Union select state ment or Value or Values or one of ['(', SELECT, VALUE, VALUES]", + yyXError{816, -1}: "expected SELECT statement or Union select state ment or expression list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SELECT, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{374, -1}: "expected SELECT statement or Union select state ment or expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SELECT, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{594, -1}: "expected SELECT statement or Union select state ment or expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SELECT, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{24, -1}: "expected SELECT statement or Union select state ment or one of ['(', SELECT]", + yyXError{582, -1}: "expected SELECT statement or Union select state ment or one of ['(', SELECT]", + yyXError{282, -1}: "expected SELECT statement or Union select state ment or table references or one of ['(', '{', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SELECT, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{285, -1}: "expected SELECT statement or Union select state ment or table references or one of ['(', '{', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SELECT, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1100, -1}: "expected SELECT statement or column name list opt or one of [')', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SELECT, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{540, -1}: "expected SET", + yyXError{892, -1}: "expected SET", + yyXError{1056, -1}: "expected SHARE", + yyXError{894, -1}: "expected STATUS", + yyXError{899, -1}: "expected STATUS", + yyXError{885, -1}: "expected Show like or where clause option or one of [$end, ';', LIKE, WHERE]", + yyXError{914, -1}: "expected Show table alias option or one of [FROM, IN]", + yyXError{915, -1}: "expected Show table alias option or one of [FROM, IN]", + yyXError{898, -1}: "expected Show tables/columns statement database name option or one of [$end, ';', FROM, IN, LIKE, WHERE]", + yyXError{911, -1}: "expected Show tables/columns statement database name option or one of [$end, ';', FROM, IN, LIKE, WHERE]", + yyXError{913, -1}: "expected Show tables/columns statement database name option or one of [$end, ';', FROM, IN, LIKE, WHERE]", + yyXError{916, -1}: "expected Show tables/columns statement database name option or one of [$end, ';', FROM, IN, LIKE, WHERE]", + yyXError{922, -1}: "expected Show tables/columns statement database name option or one of [$end, ';', FROM, IN, LIKE, WHERE]", + yyXError{30, -1}: "expected Show target that can be filtered by WHERE or LIKE or one of [CHARACTER, COLLATION, COLUMNS, CREATE, DATABASES, ENGINES, FIELDS, FULL, GLOBAL, GRANTS, INDEX, PROCEDURE, SCHEMAS, SESSION, STATUS, TABLE, TABLES, TRIGGERS, VARIABLES, WARNINGS]", + yyXError{0, -1}: "expected Start or one of [$end, '(', ';', ADMIN, ALTER, BEGIN, COMMIT, CREATE, DEALLOCATE, DELETE, DESC, DESCRIBE, DO, DROP, EXECUTE, EXPLAIN, GRANT, INSERT, LOCK, PREPARE, REPLACE, ROLLBACK, SELECT, SET, SHOW, START, TRUNCATE, UNLOCK, UPDATE, USE, parse expression prefix]", + yyXError{378, -1}: "expected Sub Select or '('", + yyXError{802, -1}: "expected Sub Select or '('", + yyXError{831, -1}: "expected Sub Select or '('", + yyXError{63, -1}: "expected TABLE", + yyXError{886, -1}: "expected TABLE", + yyXError{938, -1}: "expected TABLE", + yyXError{1517, -1}: "expected TABLE", + yyXError{67, -1}: "expected TABLES", + yyXError{68, -1}: "expected TABLES", + yyXError{244, -1}: "expected TO", + yyXError{248, -1}: "expected TO", + yyXError{249, -1}: "expected TO", + yyXError{251, -1}: "expected TO", + yyXError{6, -1}: "expected TRANSACTION", + yyXError{69, -1}: "expected Table lock list or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{199, -1}: "expected Table locks type or one of [READ, WRITE]", + yyXError{205, -1}: "expected Table name and lock type or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1175, -1}: "expected Table name list or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1157, -1}: "expected Table name list or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{939, -1}: "expected Table name list or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1162, -1}: "expected Table name list or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1176, -1}: "expected Table name or Table name list or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{15, -1}: "expected Table name or explainable statement or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DELETE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INSERT, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SELECT, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, UPDATE, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{883, -1}: "expected Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{917, -1}: "expected Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{918, -1}: "expected Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{926, -1}: "expected Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{930, -1}: "expected Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{942, -1}: "expected Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1098, -1}: "expected Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1136, -1}: "expected Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1168, -1}: "expected Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1200, -1}: "expected Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1234, -1}: "expected Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1511, -1}: "expected Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1518, -1}: "expected Table name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1041, -1}: "expected Table references clause or one of ['(', '{', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DUAL, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{482, -1}: "expected Time unit or logical and operator or logical or operator or one of [&&, AND, DAY, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, MICROSECOND, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MONTH, OR, QUARTER, SECOND, SECOND_MICROSECOND, WEEK, XOR, YEAR, YEAR_MONTH, ||]", + yyXError{489, -1}: "expected Time unit or logical and operator or logical or operator or one of [&&, AND, DAY, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, MICROSECOND, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MONTH, OR, QUARTER, SECOND, SECOND_MICROSECOND, WEEK, XOR, YEAR, YEAR_MONTH, ||]", + yyXError{451, -1}: "expected Time unit or one of [DAY, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, MICROSECOND, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MONTH, QUARTER, SECOND, SECOND_MICROSECOND, WEEK, YEAR, YEAR_MONTH]", + yyXError{974, -1}: "expected Transaction characteristic list or one of [=, ISOLATION, READ]", + yyXError{991, -1}: "expected Transaction characteristic list or one of [=, ISOLATION, READ]", + yyXError{989, -1}: "expected Transaction characteristic or one of [ISOLATION, READ]", + yyXError{611, -1}: "expected Trim string direction or expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BOTH, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEADING, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRAILING, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1204, -1}: "expected Types or one of [BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, CHAR, DATE, DATETIME, DECIMAL, DOUBLE, ENUM, INT, INTEGER, LONGBLOB, LONGTEXT, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, NATIONAL, NUMERIC, REAL, SET, SMALLINT, TEXT, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, VARBINARY, VARCHAR, YEAR, float, float32, float64, int64, string, uint, uint64]", + yyXError{25, -1}: "expected UNION", + yyXError{26, -1}: "expected UNION", + yyXError{587, -1}: "expected UNION", + yyXError{1016, -1}: "expected UNION", + yyXError{1054, -1}: "expected UPDATE", + yyXError{1142, -1}: "expected UPDATE", + yyXError{1463, -1}: "expected UPDATE", + yyXError{254, -1}: "expected User auth option or one of [$end, ',', ';', IDENTIFIED]", + yyXError{1084, -1}: "expected User defined variable name list or USER_VAR", + yyXError{1087, -1}: "expected User defined variable name or USER_VAR", + yyXError{252, -1}: "expected Username and auth option list or string literal", + yyXError{1196, -1}: "expected Username and auth option list or string literal", + yyXError{257, -1}: "expected Username and auth option or string literal", + yyXError{928, -1}: "expected Username or string literal", + yyXError{994, -1}: "expected Username or string literal", + yyXError{550, -1}: "expected When clause list or WHEN", + yyXError{853, -1}: "expected assignment list or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{880, -1}: "expected assignment list or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1143, -1}: "expected assignment list or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{857, -1}: "expected assignment or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1300, -1}: "expected charset or charater set or one of [CHARACTER, CHARSET, COLLATE]", + yyXError{1499, -1}: "expected charset or charater set or one of [CHARACTER, CHARSET, COLLATE]", + yyXError{28, -1}: "expected charset or charater set or set variable value list or one of [$end, ',', ';', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARACTER, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, USER_VAR, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1467, -1}: "expected column definition option or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{228, -1}: "expected column name list or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1145, -1}: "expected column name or one of [$end, ';', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{232, -1}: "expected column name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{500, -1}: "expected column name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{590, -1}: "expected column name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1525, -1}: "expected column name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1542, -1}: "expected column name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1294, -1}: "expected create table option list opt or one of [$end, ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1313, -1}: "expected create table option or one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1324, -1}: "expected create table option or one of [AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{845, -1}: "expected escaped table reference or one of ['(', '{', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1101, -1}: "expected expression list list or '('", + yyXError{1119, -1}: "expected expression list list or '('", + yyXError{1122, -1}: "expected expression list list or '('", + yyXError{1127, -1}: "expected expression list list or '('", + yyXError{567, -1}: "expected expression list opt or one of ['!', '(', ')', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1116, -1}: "expected expression list or one of ['!', '(', ')', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{734, -1}: "expected expression list or one of ['!', '(', '*', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{9, -1}: "expected expression list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{598, -1}: "expected expression list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{602, -1}: "expected expression list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{678, -1}: "expected expression list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{706, -1}: "expected expression list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{713, -1}: "expected expression list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{744, -1}: "expected expression list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{747, -1}: "expected expression list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{750, -1}: "expected expression list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{758, -1}: "expected expression list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{763, -1}: "expected expression list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{773, -1}: "expected expression list or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{493, -1}: "expected expression or one of ['!', '(', ')', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{613, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{3, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{310, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{312, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{419, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{421, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{422, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{423, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{436, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{438, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{441, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{443, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{445, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{448, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{473, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{476, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{481, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{485, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{488, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{503, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{553, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{555, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{559, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{562, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{572, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{605, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{608, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{618, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{621, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{625, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{631, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{635, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{637, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{639, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{642, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{644, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{645, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{648, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{653, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{656, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{662, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{664, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{667, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{669, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{675, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{681, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{685, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{688, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{692, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{695, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{697, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{700, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{703, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{709, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{718, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{721, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{724, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{727, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{730, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{753, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{756, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{766, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{769, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{843, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{859, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{878, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{934, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{957, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{959, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{961, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{969, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{972, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1008, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1049, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1111, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1211, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1469, -1}: "expected expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1067, -1}: "expected field expression or one of ['!', '(', '*', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{247, -1}: "expected identifier or unreserved keyword or one of ['*', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1076, -1}: "expected identifier or unreserved keyword or one of ['*', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1079, -1}: "expected identifier or unreserved keyword or one of ['*', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{946, -1}: "expected identifier or unreserved keyword or one of [=, ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{949, -1}: "expected identifier or unreserved keyword or one of [=, ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{950, -1}: "expected identifier or unreserved keyword or one of [=, ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{965, -1}: "expected identifier or unreserved keyword or one of [=, ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{966, -1}: "expected identifier or unreserved keyword or one of [=, ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1299, -1}: "expected identifier or unreserved keyword or one of [=, ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1072, -1}: "expected identifier or unreserved keyword or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{18, -1}: "expected identifier or unreserved keyword or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{19, -1}: "expected identifier or unreserved keyword or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{207, -1}: "expected identifier or unreserved keyword or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{235, -1}: "expected identifier or unreserved keyword or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{237, -1}: "expected identifier or unreserved keyword or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{278, -1}: "expected identifier or unreserved keyword or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{291, -1}: "expected identifier or unreserved keyword or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1081, -1}: "expected identifier or unreserved keyword or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1164, -1}: "expected identifier or unreserved keyword or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1334, -1}: "expected identifier or unreserved keyword or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1355, -1}: "expected identifier or unreserved keyword or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1509, -1}: "expected identifier or unreserved keyword or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1527, -1}: "expected index name or one of [$end, ',', ';', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1221, -1}: "expected index name or one of ['(', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1282, -1}: "expected index name or one of ['(', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1104, -1}: "expected insert statement set value by column name list or one of [$end, ',', ';', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1113, -1}: "expected insert statement set value by column name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{809, -1}: "expected like escape option or one of [!=, $end, &&, ')', ',', ';', '<', '>', '}', <=, <=>, <>, =, >=, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{429, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ')', ',', ';', '}', ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{430, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ')', ',', ';', '}', ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{431, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ')', ',', ';', '}', ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{841, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ')', ',', ';', '}', ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{311, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ')', ',', ';', '}', AND, CROSS, FOR, GROUP, HAVING, INNER, JOIN, LEFT, LIMIT, LOCK, ON, OR, ORDER, RIGHT, SET, UNION, WHERE, XOR, ||]", + yyXError{844, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ')', ',', ';', '}', AND, CROSS, FOR, GROUP, HAVING, INNER, JOIN, LEFT, LIMIT, LOCK, ON, OR, ORDER, RIGHT, SET, UNION, WHERE, XOR, ||]", + yyXError{568, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ')', ',', ';', AND, OR, XOR, ||]", + yyXError{573, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ')', ',', ';', AND, OR, XOR, ||]", + yyXError{861, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ')', ';', AND, FOR, GROUP, HAVING, LIMIT, LOCK, ON, OR, ORDER, UNION, XOR, ||]", + yyXError{1060, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ')', ';', AND, FOR, LIMIT, LOCK, ON, OR, ORDER, UNION, XOR, ||]", + yyXError{879, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ',', ';', AND, LIMIT, OR, ORDER, WHERE, XOR, ||]", + yyXError{1112, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ',', ';', AND, ON, OR, XOR, ||]", + yyXError{958, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ',', ';', AND, OR, XOR, ||]", + yyXError{960, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ',', ';', AND, OR, XOR, ||]", + yyXError{962, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ',', ';', AND, OR, XOR, ||]", + yyXError{970, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ',', ';', AND, OR, XOR, ||]", + yyXError{973, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ',', ';', AND, OR, XOR, ||]", + yyXError{1009, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ',', ';', AND, OR, XOR, ||]", + yyXError{935, -1}: "expected logical and operator or logical or operator or one of [$end, &&, ';', AND, OR, XOR, ||]", + yyXError{1546, -1}: "expected logical and operator or logical or operator or one of [$end, &&, AND, OR, XOR, ||]", + yyXError{593, -1}: "expected logical and operator or logical or operator or one of [&&, ')', ',', AND, OR, XOR, ||]", + yyXError{651, -1}: "expected logical and operator or logical or operator or one of [&&, ')', ',', AND, OR, XOR, ||]", + yyXError{698, -1}: "expected logical and operator or logical or operator or one of [&&, ')', ',', AND, OR, XOR, ||]", + yyXError{646, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, FOR, OR, XOR, ||]", + yyXError{612, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, FROM, OR, XOR, ||]", + yyXError{433, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, WHEN, XOR, ||]", + yyXError{420, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{439, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{446, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{449, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{474, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{479, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{494, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{606, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{609, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{619, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{622, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{626, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{632, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{640, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{649, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{654, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{657, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{665, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{670, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{676, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{682, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{686, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{689, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{693, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{701, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{704, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{710, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{719, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{722, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{725, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{728, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{731, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{754, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{767, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{770, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{1212, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{1470, -1}: "expected logical and operator or logical or operator or one of [&&, ')', AND, OR, XOR, ||]", + yyXError{643, -1}: "expected logical and operator or logical or operator or one of [&&, ',', AND, FROM, OR, XOR, ||]", + yyXError{504, -1}: "expected logical and operator or logical or operator or one of [&&, ',', AND, OR, USING, XOR, ||]", + yyXError{437, -1}: "expected logical and operator or logical or operator or one of [&&, ',', AND, OR, XOR, ||]", + yyXError{442, -1}: "expected logical and operator or logical or operator or one of [&&, ',', AND, OR, XOR, ||]", + yyXError{444, -1}: "expected logical and operator or logical or operator or one of [&&, ',', AND, OR, XOR, ||]", + yyXError{477, -1}: "expected logical and operator or logical or operator or one of [&&, ',', AND, OR, XOR, ||]", + yyXError{486, -1}: "expected logical and operator or logical or operator or one of [&&, ',', AND, OR, XOR, ||]", + yyXError{636, -1}: "expected logical and operator or logical or operator or one of [&&, ',', AND, OR, XOR, ||]", + yyXError{638, -1}: "expected logical and operator or logical or operator or one of [&&, ',', AND, OR, XOR, ||]", + yyXError{663, -1}: "expected logical and operator or logical or operator or one of [&&, ',', AND, OR, XOR, ||]", + yyXError{668, -1}: "expected logical and operator or logical or operator or one of [&&, ',', AND, OR, XOR, ||]", + yyXError{696, -1}: "expected logical and operator or logical or operator or one of [&&, ',', AND, OR, XOR, ||]", + yyXError{757, -1}: "expected logical and operator or logical or operator or one of [&&, ',', AND, OR, XOR, ||]", + yyXError{563, -1}: "expected logical and operator or logical or operator or one of [&&, AND, AS, OR, XOR, ||]", + yyXError{556, -1}: "expected logical and operator or logical or operator or one of [&&, AND, ELSE, END, OR, WHEN, XOR, ||]", + yyXError{560, -1}: "expected logical and operator or logical or operator or one of [&&, AND, END, OR, XOR, ||]", + yyXError{617, -1}: "expected logical and operator or logical or operator or one of [&&, AND, FROM, OR, XOR, ||]", + yyXError{554, -1}: "expected logical and operator or logical or operator or one of [&&, AND, OR, THEN, XOR, ||]", + yyXError{70, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{71, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{72, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{73, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{74, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{75, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{76, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{77, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{78, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{79, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{80, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{81, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{82, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{83, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{84, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{85, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{86, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{87, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{88, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{89, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{90, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{91, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{92, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{93, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{94, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{95, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{96, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{97, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{98, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{99, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{100, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{101, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{102, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{103, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{104, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{105, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{106, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{107, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{108, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{109, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{110, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{111, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{112, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{113, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{114, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{115, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{116, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{117, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{118, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{119, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{120, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{121, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{122, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{123, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{124, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{125, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{126, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{127, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{128, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{129, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{130, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{131, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{132, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{133, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{134, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{135, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{136, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{137, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{138, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{139, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{140, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{141, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{142, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{143, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{144, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{145, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{146, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{147, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{148, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{149, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{150, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{151, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{152, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{153, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{154, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{155, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{156, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{157, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{158, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{159, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{160, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{161, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{162, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{163, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{164, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{165, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{166, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{167, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{168, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{169, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{170, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{171, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{172, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{173, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{174, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{175, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{176, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{177, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{178, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{179, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{180, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{181, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{182, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{183, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{184, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{185, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{186, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{187, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{188, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{189, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{190, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{191, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{192, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{193, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{194, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{195, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{196, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADD, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DROP, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOREIGN, FOUND_ROWS, FROM, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INDEX, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, READ, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TO, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VALUES, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, WRITE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{229, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{236, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{316, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{317, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{318, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{319, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{320, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{321, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{322, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{323, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{324, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{325, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{326, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{327, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{328, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{329, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{330, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{331, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{332, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{333, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{334, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{335, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{336, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{337, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{338, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{339, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{340, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{341, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{342, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{343, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{344, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{345, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{346, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{347, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{348, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{349, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{350, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{351, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{352, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{353, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{354, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{355, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{356, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{357, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{358, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{359, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{360, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{361, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{362, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{832, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{833, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{238, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIGINT, BINARY, BIT, BLOB, BOOL, BOOLEAN, BTREE, CHAR, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DECIMAL, DELAY_KEY_WRITE, DESC, DIV, DO, DOUBLE, DYNAMIC, ELSE, END, ENGINE, ENGINES, ENUM, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, INT, INTEGER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, LONGBLOB, LONGTEXT, MAX, MAX_ROWS, MEDIUMBLOB, MEDIUMINT, MEDIUMTEXT, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, NUMERIC, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REAL, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SMALLINT, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TINYBLOB, TINYINT, TINYTEXT, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARBINARY, VARCHAR, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, float, float32, float64, identifier, int64, string, string literal, uint, uint64, ||]", + yyXError{375, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{397, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{398, -1}: "expected one of [!=, $end, &&, '%', '&', '(', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{1033, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DIV, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, IN, IS, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, XOR, YEAR, YEARWEEK, identifier, string literal, ||]", + yyXError{1077, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '.', '/', ';', '<', '>', '^', '|', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DIV, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, IN, IS, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, XOR, YEAR, YEARWEEK, identifier, string literal, ||]", + yyXError{544, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{545, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARACTER, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{363, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{364, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{365, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{366, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{367, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{368, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{370, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{371, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{601, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNIQUE, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{372, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{373, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{376, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{377, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{379, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{380, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{381, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{387, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{388, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{389, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{390, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{391, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{415, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{416, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{417, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{418, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{428, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{435, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{440, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{447, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{450, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{475, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{484, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{491, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{492, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{495, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{496, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{497, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{499, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{502, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{547, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{549, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{561, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{566, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{571, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{575, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{576, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{577, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{578, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{579, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{580, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{581, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{588, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{589, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{592, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{597, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{600, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{604, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{607, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{610, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{620, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{623, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{624, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{627, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{633, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{641, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{647, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{650, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{652, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{655, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{658, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{661, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{666, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{671, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{674, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{677, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{680, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{683, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{687, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{690, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{694, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{699, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{702, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{705, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{708, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{711, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{715, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{717, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{720, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{723, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{726, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{729, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{732, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{737, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{738, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{741, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{743, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{746, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{749, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{752, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{755, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{760, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{762, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{765, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{768, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{771, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{775, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{790, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{791, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{792, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{793, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{794, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{795, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{796, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{797, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{798, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{799, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{800, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{801, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', '}', <<, <=, <=>, <>, =, >=, >>, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BETWEEN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DIV, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, IN, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MOD, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REGEXP, REPEATABLE, RIGHT, RLIKE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{596, -1}: "expected one of [!=, $end, &&, '%', '&', ')', '*', '+', ',', '-', '/', ';', '<', '>', '^', '|', <<, <=, <=>, <>, =, >=, >>, AND, BETWEEN, COLLATE, DIV, IN, IS, LIKE, MOD, NOT, OR, REGEXP, RLIKE, UNION, XOR, ||]", + yyXError{808, -1}: "expected one of [!=, $end, &&, ')', ',', ';', '<', '>', '}', <=, <=>, <>, =, >=, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{314, -1}: "expected one of [!=, $end, &&, ')', ',', ';', '<', '>', '}', <=, <=>, <>, =, >=, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{810, -1}: "expected one of [!=, $end, &&, ')', ',', ';', '<', '>', '}', <=, <=>, <>, =, >=, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{812, -1}: "expected one of [!=, $end, &&, ')', ',', ';', '<', '>', '}', <=, <=>, <>, =, >=, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{815, -1}: "expected one of [!=, $end, &&, ')', ',', ';', '<', '>', '}', <=, <=>, <>, =, >=, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{817, -1}: "expected one of [!=, $end, &&, ')', ',', ';', '<', '>', '}', <=, <=>, <>, =, >=, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{819, -1}: "expected one of [!=, $end, &&, ')', ',', ';', '<', '>', '}', <=, <=>, <>, =, >=, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{830, -1}: "expected one of [!=, $end, &&, ')', ',', ';', '<', '>', '}', <=, <=>, <>, =, >=, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{835, -1}: "expected one of [!=, $end, &&, ')', ',', ';', '<', '>', '}', <=, <=>, <>, =, >=, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{840, -1}: "expected one of [!=, $end, &&, ')', ',', ';', '<', '>', '}', <=, <=>, <>, =, >=, ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, IS, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{837, -1}: "expected one of [$end, &&, ')', ',', ';', '}', ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{838, -1}: "expected one of [$end, &&, ')', ',', ';', '}', ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{839, -1}: "expected one of [$end, &&, ')', ',', ';', '}', ABS, ADDDATE, ADMIN, AFTER, AND, ANY, AS, ASC, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DAY_HOUR, DAY_MICROSECOND, DAY_MINUTE, DAY_SECOND, DEALLOCATE, DELAY_KEY_WRITE, DESC, DO, DYNAMIC, ELSE, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, HOUR_MICROSECOND, HOUR_MINUTE, HOUR_SECOND, IDENTIFIED, IFNULL, INNER, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MINUTE_MICROSECOND, MINUTE_SECOND, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, OR, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SECOND_MICROSECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, THEN, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHEN, WHERE, XOR, YEAR, YEARWEEK, YEAR_MONTH, identifier, string literal, ||]", + yyXError{197, -1}: "expected one of [$end, '(', ')', ',', '.', ';', '}', ABS, ADD, ADDDATE, ADMIN, AFTER, ANY, AS, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARACTER, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DROP, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, IDENTIFIED, IFNULL, IN, INNER, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, READ, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHERE, WRITE, YEAR, YEARWEEK, identifier]", + yyXError{208, -1}: "expected one of [$end, '(', ')', ',', ';', '}', ABS, ADD, ADDDATE, ADMIN, AFTER, ANY, AS, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARACTER, CHARSET, CHECKSUM, COALESCE, COLLATE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DROP, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, IDENTIFIED, IFNULL, IN, INNER, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIKE, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, READ, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SELECT, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, USING, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHERE, WRITE, YEAR, YEARWEEK, identifier]", + yyXError{1383, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRECISION, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1371, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1372, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1373, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1374, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1375, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1376, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1377, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1378, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1379, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1380, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1381, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1382, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1445, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1384, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1475, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1476, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1477, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1478, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1480, -1}: "expected one of [$end, '(', ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1246, -1}: "expected one of [$end, '(', ')', ',', ';']", + yyXError{1247, -1}: "expected one of [$end, '(', ')', ',', ';']", + yyXError{1223, -1}: "expected one of [$end, '(', ',', ';', USING]", + yyXError{279, -1}: "expected one of [$end, ')', ',', ';', '}', CROSS, FOR, GROUP, HAVING, INNER, JOIN, LEFT, LIMIT, LOCK, ON, ORDER, RIGHT, SET, UNION, WHERE]", + yyXError{280, -1}: "expected one of [$end, ')', ',', ';', '}', CROSS, FOR, GROUP, HAVING, INNER, JOIN, LEFT, LIMIT, LOCK, ON, ORDER, RIGHT, SET, UNION, WHERE]", + yyXError{289, -1}: "expected one of [$end, ')', ',', ';', '}', CROSS, FOR, GROUP, HAVING, INNER, JOIN, LEFT, LIMIT, LOCK, ON, ORDER, RIGHT, SET, UNION, WHERE]", + yyXError{290, -1}: "expected one of [$end, ')', ',', ';', '}', CROSS, FOR, GROUP, HAVING, INNER, JOIN, LEFT, LIMIT, LOCK, ON, ORDER, RIGHT, SET, UNION, WHERE]", + yyXError{292, -1}: "expected one of [$end, ')', ',', ';', '}', CROSS, FOR, GROUP, HAVING, INNER, JOIN, LEFT, LIMIT, LOCK, ON, ORDER, RIGHT, SET, UNION, WHERE]", + yyXError{294, -1}: "expected one of [$end, ')', ',', ';', '}', CROSS, FOR, GROUP, HAVING, INNER, JOIN, LEFT, LIMIT, LOCK, ON, ORDER, RIGHT, SET, UNION, WHERE]", + yyXError{846, -1}: "expected one of [$end, ')', ',', ';', '}', CROSS, FOR, GROUP, HAVING, INNER, JOIN, LEFT, LIMIT, LOCK, ON, ORDER, RIGHT, SET, UNION, WHERE]", + yyXError{848, -1}: "expected one of [$end, ')', ',', ';', '}', CROSS, FOR, GROUP, HAVING, INNER, JOIN, LEFT, LIMIT, LOCK, ON, ORDER, RIGHT, SET, UNION, WHERE]", + yyXError{849, -1}: "expected one of [$end, ')', ',', ';', '}', CROSS, FOR, GROUP, HAVING, INNER, JOIN, LEFT, LIMIT, LOCK, ON, ORDER, RIGHT, SET, UNION, WHERE]", + yyXError{521, -1}: "expected one of [$end, ')', ',', ';', AFTER, ASC, AUTO_INCREMENT, BINARY, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, DESC, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{525, -1}: "expected one of [$end, ')', ',', ';', AFTER, ASC, AUTO_INCREMENT, BINARY, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, DESC, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1397, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, BINARY, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1399, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, BINARY, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1400, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, BINARY, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1410, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, BINARY, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{537, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHARACTER, CHARSET, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{543, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COLLATE, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1461, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, KEY, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{528, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{529, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{533, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1449, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1450, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1451, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE, UNSIGNED, ZEROFILL]", + yyXError{1358, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1359, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1360, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1361, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1362, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1363, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1364, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1365, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1366, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1388, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1393, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1395, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1396, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1401, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1406, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1407, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1408, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1409, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1411, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1419, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1421, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1426, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1429, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1430, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1431, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1437, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1441, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1444, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1446, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1458, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1459, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1466, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1468, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1471, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1472, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1474, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1479, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1481, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1482, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1485, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1486, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1487, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1488, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1490, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1491, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1492, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1493, -1}: "expected one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{1456, -1}: "expected one of [$end, ')', ',', ';', AFTER, FIRST]", + yyXError{522, -1}: "expected one of [$end, ')', ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, FOR, KEY_BLOCK_SIZE, LOCK, MAX_ROWS, MIN_ROWS, OFFSET, ON, PASSWORD, ROW_FORMAT, UNION]", + yyXError{523, -1}: "expected one of [$end, ')', ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, FOR, KEY_BLOCK_SIZE, LOCK, MAX_ROWS, MIN_ROWS, OFFSET, ON, PASSWORD, ROW_FORMAT, UNION]", + yyXError{1035, -1}: "expected one of [$end, ')', ',', ';', FOR, FROM, LIMIT, LOCK, ON, UNION]", + yyXError{1036, -1}: "expected one of [$end, ')', ',', ';', FOR, FROM, LIMIT, LOCK, ON, UNION]", + yyXError{1037, -1}: "expected one of [$end, ')', ',', ';', FOR, FROM, LIMIT, LOCK, ON, UNION]", + yyXError{1068, -1}: "expected one of [$end, ')', ',', ';', FOR, FROM, LIMIT, LOCK, ON, UNION]", + yyXError{1069, -1}: "expected one of [$end, ')', ',', ';', FOR, FROM, LIMIT, LOCK, ON, UNION]", + yyXError{1070, -1}: "expected one of [$end, ')', ',', ';', FOR, FROM, LIMIT, LOCK, ON, UNION]", + yyXError{1071, -1}: "expected one of [$end, ')', ',', ';', FOR, FROM, LIMIT, LOCK, ON, UNION]", + yyXError{1073, -1}: "expected one of [$end, ')', ',', ';', FOR, FROM, LIMIT, LOCK, ON, UNION]", + yyXError{1074, -1}: "expected one of [$end, ')', ',', ';', FOR, FROM, LIMIT, LOCK, ON, UNION]", + yyXError{1075, -1}: "expected one of [$end, ')', ',', ';', FOR, FROM, LIMIT, LOCK, ON, UNION]", + yyXError{1078, -1}: "expected one of [$end, ')', ',', ';', FOR, FROM, LIMIT, LOCK, ON, UNION]", + yyXError{1080, -1}: "expected one of [$end, ')', ',', ';', FOR, FROM, LIMIT, LOCK, ON, UNION]", + yyXError{275, -1}: "expected one of [$end, ')', ',', ';', FOR, GROUP, HAVING, LIMIT, LOCK, ON, ORDER, SET, UNION, WHERE]", + yyXError{847, -1}: "expected one of [$end, ')', ',', ';', FOR, GROUP, HAVING, LIMIT, LOCK, ON, ORDER, SET, UNION, WHERE]", + yyXError{852, -1}: "expected one of [$end, ')', ',', ';', FOR, GROUP, HAVING, LIMIT, LOCK, ON, ORDER, SET, UNION, WHERE]", + yyXError{1044, -1}: "expected one of [$end, ')', ',', ';', FOR, GROUP, HAVING, LIMIT, LOCK, ON, ORDER, UNION, WHERE]", + yyXError{871, -1}: "expected one of [$end, ')', ',', ';', FOR, HAVING, LIMIT, LOCK, ON, ORDER, UNION]", + yyXError{873, -1}: "expected one of [$end, ')', ',', ';', FOR, HAVING, LIMIT, LOCK, ON, ORDER, UNION]", + yyXError{874, -1}: "expected one of [$end, ')', ',', ';', FOR, HAVING, LIMIT, LOCK, ON, ORDER, UNION]", + yyXError{875, -1}: "expected one of [$end, ')', ',', ';', FOR, HAVING, LIMIT, LOCK, ON, ORDER, UNION]", + yyXError{876, -1}: "expected one of [$end, ')', ',', ';', FOR, HAVING, LIMIT, LOCK, ON, ORDER, UNION]", + yyXError{1062, -1}: "expected one of [$end, ')', ',', ';', FOR, HAVING, LIMIT, LOCK, ON, ORDER, UNION]", + yyXError{870, -1}: "expected one of [$end, ')', ',', ';', FOR, LIMIT, LOCK, ON, UNION]", + yyXError{1022, -1}: "expected one of [$end, ')', ',', ';', FOR, LOCK, OFFSET, ON, UNION]", + yyXError{262, -1}: "expected one of [$end, ')', ',', ';']", + yyXError{1220, -1}: "expected one of [$end, ')', ',', ';']", + yyXError{1233, -1}: "expected one of [$end, ')', ',', ';']", + yyXError{1238, -1}: "expected one of [$end, ')', ',', ';']", + yyXError{1251, -1}: "expected one of [$end, ')', ',', ';']", + yyXError{1253, -1}: "expected one of [$end, ')', ',', ';']", + yyXError{1255, -1}: "expected one of [$end, ')', ',', ';']", + yyXError{1258, -1}: "expected one of [$end, ')', ',', ';']", + yyXError{1264, -1}: "expected one of [$end, ')', ',', ';']", + yyXError{1269, -1}: "expected one of [$end, ')', ',', ';']", + yyXError{1275, -1}: "expected one of [$end, ')', ',', ';']", + yyXError{1281, -1}: "expected one of [$end, ')', ',', ';']", + yyXError{1287, -1}: "expected one of [$end, ')', ',', ';']", + yyXError{1293, -1}: "expected one of [$end, ')', ',', ';']", + yyXError{860, -1}: "expected one of [$end, ')', ';', FOR, GROUP, HAVING, LIMIT, LOCK, ON, ORDER, UNION]", + yyXError{1048, -1}: "expected one of [$end, ')', ';', FOR, HAVING, LIMIT, LOCK, ON, ORDER, UNION]", + yyXError{1043, -1}: "expected one of [$end, ')', ';', FOR, LIMIT, LOCK, ON, UNION, WHERE]", + yyXError{863, -1}: "expected one of [$end, ')', ';', FOR, LIMIT, LOCK, ON, UNION]", + yyXError{1025, -1}: "expected one of [$end, ')', ';', FOR, LOCK, ON, UNION]", + yyXError{1026, -1}: "expected one of [$end, ')', ';', FOR, LOCK, ON, UNION]", + yyXError{1014, -1}: "expected one of [$end, ')', ';', ON, UNION]", + yyXError{1053, -1}: "expected one of [$end, ')', ';', ON, UNION]", + yyXError{1058, -1}: "expected one of [$end, ')', ';', ON, UNION]", + yyXError{1059, -1}: "expected one of [$end, ')', ';', ON, UNION]", + yyXError{1065, -1}: "expected one of [$end, ')', ';', ON, UNION]", + yyXError{1066, -1}: "expected one of [$end, ')', ';', ON, UNION]", + yyXError{1021, -1}: "expected one of [$end, ')', ';', ON]", + yyXError{268, -1}: "expected one of [$end, ',', ';', =, IDENTIFIED]", + yyXError{1529, -1}: "expected one of [$end, ',', ';', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1530, -1}: "expected one of [$end, ',', ';', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1312, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1314, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1317, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1318, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1319, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1320, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1321, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1322, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1323, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1325, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1327, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1329, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1331, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1333, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1335, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1337, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1339, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1341, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1343, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1345, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1347, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1351, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1353, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1354, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1356, -1}: "expected one of [$end, ',', ';', AUTO_INCREMENT, AVG_ROW_LENGTH, CHARACTER, CHARSET, CHECKSUM, COLLATE, COMMENT, COMPRESSION, CONNECTION, DEFAULT, DELAY_KEY_WRITE, ENGINE, KEY_BLOCK_SIZE, MAX_ROWS, MIN_ROWS, PASSWORD, ROW_FORMAT]", + yyXError{1495, -1}: "expected one of [$end, ',', ';', FOREIGN, FULLTEXT, INDEX, KEY, PRIMARY, UNIQUE]", + yyXError{943, -1}: "expected one of [$end, ',', ';', FROM, USING]", + yyXError{940, -1}: "expected one of [$end, ',', ';', FROM]", + yyXError{855, -1}: "expected one of [$end, ',', ';', LIMIT, ORDER, WHERE]", + yyXError{877, -1}: "expected one of [$end, ',', ';', LIMIT, ORDER, WHERE]", + yyXError{202, -1}: "expected one of [$end, ',', ';', LOCAL]", + yyXError{1108, -1}: "expected one of [$end, ',', ';', ON]", + yyXError{1110, -1}: "expected one of [$end, ',', ';', ON]", + yyXError{1114, -1}: "expected one of [$end, ',', ';', ON]", + yyXError{1118, -1}: "expected one of [$end, ',', ';', ON]", + yyXError{1121, -1}: "expected one of [$end, ',', ';', ON]", + yyXError{198, -1}: "expected one of [$end, ',', ';']", + yyXError{200, -1}: "expected one of [$end, ',', ';']", + yyXError{201, -1}: "expected one of [$end, ',', ';']", + yyXError{203, -1}: "expected one of [$end, ',', ';']", + yyXError{204, -1}: "expected one of [$end, ',', ';']", + yyXError{206, -1}: "expected one of [$end, ',', ';']", + yyXError{255, -1}: "expected one of [$end, ',', ';']", + yyXError{256, -1}: "expected one of [$end, ',', ';']", + yyXError{258, -1}: "expected one of [$end, ',', ';']", + yyXError{259, -1}: "expected one of [$end, ',', ';']", + yyXError{263, -1}: "expected one of [$end, ',', ';']", + yyXError{265, -1}: "expected one of [$end, ',', ';']", + yyXError{266, -1}: "expected one of [$end, ',', ';']", + yyXError{941, -1}: "expected one of [$end, ',', ';']", + yyXError{951, -1}: "expected one of [$end, ',', ';']", + yyXError{956, -1}: "expected one of [$end, ',', ';']", + yyXError{967, -1}: "expected one of [$end, ',', ';']", + yyXError{975, -1}: "expected one of [$end, ',', ';']", + yyXError{976, -1}: "expected one of [$end, ',', ';']", + yyXError{979, -1}: "expected one of [$end, ',', ';']", + yyXError{980, -1}: "expected one of [$end, ',', ';']", + yyXError{982, -1}: "expected one of [$end, ',', ';']", + yyXError{985, -1}: "expected one of [$end, ',', ';']", + yyXError{986, -1}: "expected one of [$end, ',', ';']", + yyXError{987, -1}: "expected one of [$end, ',', ';']", + yyXError{988, -1}: "expected one of [$end, ',', ';']", + yyXError{990, -1}: "expected one of [$end, ',', ';']", + yyXError{992, -1}: "expected one of [$end, ',', ';']", + yyXError{1085, -1}: "expected one of [$end, ',', ';']", + yyXError{1086, -1}: "expected one of [$end, ',', ';']", + yyXError{1088, -1}: "expected one of [$end, ',', ';']", + yyXError{1144, -1}: "expected one of [$end, ',', ';']", + yyXError{1160, -1}: "expected one of [$end, ',', ';']", + yyXError{1163, -1}: "expected one of [$end, ',', ';']", + yyXError{1189, -1}: "expected one of [$end, ',', ';']", + yyXError{1197, -1}: "expected one of [$end, ',', ';']", + yyXError{1520, -1}: "expected one of [$end, ',', ';']", + yyXError{1521, -1}: "expected one of [$end, ',', ';']", + yyXError{1524, -1}: "expected one of [$end, ',', ';']", + yyXError{1533, -1}: "expected one of [$end, ',', ';']", + yyXError{1534, -1}: "expected one of [$end, ',', ';']", + yyXError{1535, -1}: "expected one of [$end, ',', ';']", + yyXError{1536, -1}: "expected one of [$end, ',', ';']", + yyXError{1538, -1}: "expected one of [$end, ',', ';']", + yyXError{1540, -1}: "expected one of [$end, ',', ';']", + yyXError{1541, -1}: "expected one of [$end, ',', ';']", + yyXError{1543, -1}: "expected one of [$end, ',', ';']", + yyXError{1545, -1}: "expected one of [$end, ',', ';']", + yyXError{269, -1}: "expected one of [$end, ';', CHARACTER, CHARSET, COLLATE, DEFAULT, LIKE, WHERE]", + yyXError{1501, -1}: "expected one of [$end, ';', CHARACTER, CHARSET, COLLATE, DEFAULT]", + yyXError{1502, -1}: "expected one of [$end, ';', CHARACTER, CHARSET, COLLATE, DEFAULT]", + yyXError{1506, -1}: "expected one of [$end, ';', CHARACTER, CHARSET, COLLATE, DEFAULT]", + yyXError{1508, -1}: "expected one of [$end, ';', CHARACTER, CHARSET, COLLATE, DEFAULT]", + yyXError{936, -1}: "expected one of [$end, ';', COLLATE]", + yyXError{1004, -1}: "expected one of [$end, ';', COLLATE]", + yyXError{887, -1}: "expected one of [$end, ';', FOR]", + yyXError{919, -1}: "expected one of [$end, ';', FROM, IN, LIKE, WHERE]", + yyXError{920, -1}: "expected one of [$end, ';', FROM, IN, LIKE, WHERE]", + yyXError{889, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{890, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{891, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{895, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{897, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{903, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{904, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{907, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{908, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{909, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{910, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{912, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{921, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{923, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{924, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{925, -1}: "expected one of [$end, ';', LIKE, WHERE]", + yyXError{1102, -1}: "expected one of [$end, ';', ON, UNION]", + yyXError{1128, -1}: "expected one of [$end, ';', ON, UNION]", + yyXError{1103, -1}: "expected one of [$end, ';', ON]", + yyXError{1115, -1}: "expected one of [$end, ';', ON]", + yyXError{1120, -1}: "expected one of [$end, ';', ON]", + yyXError{1123, -1}: "expected one of [$end, ';', ON]", + yyXError{1129, -1}: "expected one of [$end, ';', ON]", + yyXError{1130, -1}: "expected one of [$end, ';', ON]", + yyXError{27, -1}: "expected one of [$end, ';', UNION]", + yyXError{1083, -1}: "expected one of [$end, ';', USING]", + yyXError{2, -1}: "expected one of [$end, ';']", + yyXError{5, -1}: "expected one of [$end, ';']", + yyXError{7, -1}: "expected one of [$end, ';']", + yyXError{22, -1}: "expected one of [$end, ';']", + yyXError{31, -1}: "expected one of [$end, ';']", + yyXError{32, -1}: "expected one of [$end, ';']", + yyXError{33, -1}: "expected one of [$end, ';']", + yyXError{34, -1}: "expected one of [$end, ';']", + yyXError{35, -1}: "expected one of [$end, ';']", + yyXError{36, -1}: "expected one of [$end, ';']", + yyXError{37, -1}: "expected one of [$end, ';']", + yyXError{38, -1}: "expected one of [$end, ';']", + yyXError{39, -1}: "expected one of [$end, ';']", + yyXError{40, -1}: "expected one of [$end, ';']", + yyXError{41, -1}: "expected one of [$end, ';']", + yyXError{42, -1}: "expected one of [$end, ';']", + yyXError{43, -1}: "expected one of [$end, ';']", + yyXError{44, -1}: "expected one of [$end, ';']", + yyXError{45, -1}: "expected one of [$end, ';']", + yyXError{46, -1}: "expected one of [$end, ';']", + yyXError{47, -1}: "expected one of [$end, ';']", + yyXError{48, -1}: "expected one of [$end, ';']", + yyXError{49, -1}: "expected one of [$end, ';']", + yyXError{50, -1}: "expected one of [$end, ';']", + yyXError{51, -1}: "expected one of [$end, ';']", + yyXError{52, -1}: "expected one of [$end, ';']", + yyXError{53, -1}: "expected one of [$end, ';']", + yyXError{54, -1}: "expected one of [$end, ';']", + yyXError{55, -1}: "expected one of [$end, ';']", + yyXError{56, -1}: "expected one of [$end, ';']", + yyXError{57, -1}: "expected one of [$end, ';']", + yyXError{58, -1}: "expected one of [$end, ';']", + yyXError{59, -1}: "expected one of [$end, ';']", + yyXError{60, -1}: "expected one of [$end, ';']", + yyXError{61, -1}: "expected one of [$end, ';']", + yyXError{62, -1}: "expected one of [$end, ';']", + yyXError{209, -1}: "expected one of [$end, ';']", + yyXError{270, -1}: "expected one of [$end, ';']", + yyXError{866, -1}: "expected one of [$end, ';']", + yyXError{867, -1}: "expected one of [$end, ';']", + yyXError{882, -1}: "expected one of [$end, ';']", + yyXError{884, -1}: "expected one of [$end, ';']", + yyXError{927, -1}: "expected one of [$end, ';']", + yyXError{929, -1}: "expected one of [$end, ';']", + yyXError{931, -1}: "expected one of [$end, ';']", + yyXError{932, -1}: "expected one of [$end, ';']", + yyXError{944, -1}: "expected one of [$end, ';']", + yyXError{963, -1}: "expected one of [$end, ';']", + yyXError{997, -1}: "expected one of [$end, ';']", + yyXError{998, -1}: "expected one of [$end, ';']", + yyXError{1002, -1}: "expected one of [$end, ';']", + yyXError{1003, -1}: "expected one of [$end, ';']", + yyXError{1006, -1}: "expected one of [$end, ';']", + yyXError{1082, -1}: "expected one of [$end, ';']", + yyXError{1091, -1}: "expected one of [$end, ';']", + yyXError{1092, -1}: "expected one of [$end, ';']", + yyXError{1093, -1}: "expected one of [$end, ';']", + yyXError{1107, -1}: "expected one of [$end, ';']", + yyXError{1139, -1}: "expected one of [$end, ';']", + yyXError{1146, -1}: "expected one of [$end, ';']", + yyXError{1147, -1}: "expected one of [$end, ';']", + yyXError{1148, -1}: "expected one of [$end, ';']", + yyXError{1149, -1}: "expected one of [$end, ';']", + yyXError{1150, -1}: "expected one of [$end, ';']", + yyXError{1151, -1}: "expected one of [$end, ';']", + yyXError{1152, -1}: "expected one of [$end, ';']", + yyXError{1169, -1}: "expected one of [$end, ';']", + yyXError{1171, -1}: "expected one of [$end, ';']", + yyXError{1180, -1}: "expected one of [$end, ';']", + yyXError{1185, -1}: "expected one of [$end, ';']", + yyXError{1188, -1}: "expected one of [$end, ';']", + yyXError{1297, -1}: "expected one of [$end, ';']", + yyXError{1498, -1}: "expected one of [$end, ';']", + yyXError{1515, -1}: "expected one of [$end, ';']", + yyXError{1516, -1}: "expected one of [$end, ';']", + yyXError{1548, -1}: "expected one of [$end, ';']", + yyXError{630, -1}: "expected one of ['!', '(', '*', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{629, -1}: "expected one of ['!', '(', '*', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{634, -1}: "expected one of ['!', '(', '*', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1028, -1}: "expected one of ['!', '(', '*', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1029, -1}: "expected one of ['!', '(', '*', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1031, -1}: "expected one of ['!', '(', '*', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{1032, -1}: "expected one of ['!', '(', '*', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{822, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{823, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{824, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{825, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{826, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{827, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{828, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{829, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ALL, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{614, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{615, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{616, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{424, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{425, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{426, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{427, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOT, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{806, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{807, -1}: "expected one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{813, -1}: "expected one of ['%', '&', '*', '+', '-', '/', '^', '|', <<, >>, AND, DIV, MOD]", + yyXError{215, -1}: "expected one of ['(', ',', ON, USER]", + yyXError{211, -1}: "expected one of ['(', ',', ON]", + yyXError{213, -1}: "expected one of ['(', ',', ON]", + yyXError{214, -1}: "expected one of ['(', ',', ON]", + yyXError{216, -1}: "expected one of ['(', ',', ON]", + yyXError{217, -1}: "expected one of ['(', ',', ON]", + yyXError{218, -1}: "expected one of ['(', ',', ON]", + yyXError{219, -1}: "expected one of ['(', ',', ON]", + yyXError{220, -1}: "expected one of ['(', ',', ON]", + yyXError{221, -1}: "expected one of ['(', ',', ON]", + yyXError{223, -1}: "expected one of ['(', ',', ON]", + yyXError{225, -1}: "expected one of ['(', ',', ON]", + yyXError{226, -1}: "expected one of ['(', ',', ON]", + yyXError{227, -1}: "expected one of ['(', ',', ON]", + yyXError{271, -1}: "expected one of ['(', '{', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, IGNORE, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{273, -1}: "expected one of ['(', '{', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INTO, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLE, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{301, -1}: "expected one of ['(', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{304, -1}: "expected one of ['(', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{305, -1}: "expected one of ['(', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1012, -1}: "expected one of ['(', SELECT]", + yyXError{1013, -1}: "expected one of ['(', SELECT]", + yyXError{230, -1}: "expected one of [')', ',']", + yyXError{231, -1}: "expected one of [')', ',']", + yyXError{234, -1}: "expected one of [')', ',']", + yyXError{283, -1}: "expected one of [')', ',']", + yyXError{530, -1}: "expected one of [')', ',']", + yyXError{569, -1}: "expected one of [')', ',']", + yyXError{599, -1}: "expected one of [')', ',']", + yyXError{603, -1}: "expected one of [')', ',']", + yyXError{679, -1}: "expected one of [')', ',']", + yyXError{707, -1}: "expected one of [')', ',']", + yyXError{714, -1}: "expected one of [')', ',']", + yyXError{735, -1}: "expected one of [')', ',']", + yyXError{745, -1}: "expected one of [')', ',']", + yyXError{748, -1}: "expected one of [')', ',']", + yyXError{751, -1}: "expected one of [')', ',']", + yyXError{759, -1}: "expected one of [')', ',']", + yyXError{764, -1}: "expected one of [')', ',']", + yyXError{774, -1}: "expected one of [')', ',']", + yyXError{818, -1}: "expected one of [')', ',']", + yyXError{1117, -1}: "expected one of [')', ',']", + yyXError{1124, -1}: "expected one of [')', ',']", + yyXError{1205, -1}: "expected one of [')', ',']", + yyXError{1207, -1}: "expected one of [')', ',']", + yyXError{1208, -1}: "expected one of [')', ',']", + yyXError{1210, -1}: "expected one of [')', ',']", + yyXError{1213, -1}: "expected one of [')', ',']", + yyXError{1225, -1}: "expected one of [')', ',']", + yyXError{1227, -1}: "expected one of [')', ',']", + yyXError{1229, -1}: "expected one of [')', ',']", + yyXError{1232, -1}: "expected one of [')', ',']", + yyXError{1237, -1}: "expected one of [')', ',']", + yyXError{1249, -1}: "expected one of [')', ',']", + yyXError{1262, -1}: "expected one of [')', ',']", + yyXError{1267, -1}: "expected one of [')', ',']", + yyXError{1273, -1}: "expected one of [')', ',']", + yyXError{1279, -1}: "expected one of [')', ',']", + yyXError{1285, -1}: "expected one of [')', ',']", + yyXError{1291, -1}: "expected one of [')', ',']", + yyXError{1296, -1}: "expected one of [')', ',']", + yyXError{1413, -1}: "expected one of [')', ',']", + yyXError{1414, -1}: "expected one of [')', ',']", + yyXError{1417, -1}: "expected one of [')', ',']", + yyXError{1423, -1}: "expected one of [')', ',']", + yyXError{1514, -1}: "expected one of [')', ',']", + yyXError{453, -1}: "expected one of [')', FROM]", + yyXError{454, -1}: "expected one of [')', FROM]", + yyXError{455, -1}: "expected one of [')', FROM]", + yyXError{456, -1}: "expected one of [')', FROM]", + yyXError{457, -1}: "expected one of [')', FROM]", + yyXError{458, -1}: "expected one of [')', FROM]", + yyXError{459, -1}: "expected one of [')', FROM]", + yyXError{460, -1}: "expected one of [')', FROM]", + yyXError{461, -1}: "expected one of [')', FROM]", + yyXError{462, -1}: "expected one of [')', FROM]", + yyXError{463, -1}: "expected one of [')', FROM]", + yyXError{464, -1}: "expected one of [')', FROM]", + yyXError{465, -1}: "expected one of [')', FROM]", + yyXError{466, -1}: "expected one of [')', FROM]", + yyXError{467, -1}: "expected one of [')', FROM]", + yyXError{468, -1}: "expected one of [')', FROM]", + yyXError{469, -1}: "expected one of [')', FROM]", + yyXError{470, -1}: "expected one of [')', FROM]", + yyXError{471, -1}: "expected one of [')', FROM]", + yyXError{472, -1}: "expected one of [')', FROM]", + yyXError{286, -1}: "expected one of [')', UNION]", + yyXError{295, -1}: "expected one of [')', UNION]", + yyXError{583, -1}: "expected one of [')', UNION]", + yyXError{595, -1}: "expected one of [')', UNION]", + yyXError{243, -1}: "expected one of ['*', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1177, -1}: "expected one of [',', FROM]", + yyXError{210, -1}: "expected one of [',', ON]", + yyXError{212, -1}: "expected one of [',', ON]", + yyXError{233, -1}: "expected one of [',', ON]", + yyXError{241, -1}: "expected one of [',', ON]", + yyXError{276, -1}: "expected one of [',', SET]", + yyXError{1182, -1}: "expected one of [',', USING]", + yyXError{245, -1}: "expected one of ['.', TO]", + yyXError{246, -1}: "expected one of ['.', TO]", + yyXError{541, -1}: "expected one of [=, ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{542, -1}: "expected one of [=, ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{945, -1}: "expected one of [=, ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{948, -1}: "expected one of [=, FOR]", + yyXError{1256, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, integer literal, string literal]", + yyXError{12, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DELETE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INSERT, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SELECT, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, UPDATE, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{13, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DELETE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INSERT, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SELECT, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, UPDATE, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{14, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DELETE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INSERT, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SELECT, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, UPDATE, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1174, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FROM, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, IGNORE, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1153, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1154, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1158, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1159, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1132, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, IGNORE, INTO, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1133, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, IGNORE, INTO, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1134, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, IGNORE, INTO, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1095, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INTO, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1096, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INTO, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1199, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{1097, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1166, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1531, -1}: "expected one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{777, -1}: "expected one of [BETWEEN, IN, LIKE, NULL, REGEXP, RLIKE, UNKNOWN, false, true]", + yyXError{1244, -1}: "expected one of [BTREE, HASH]", + yyXError{1385, -1}: "expected one of [CHAR, VARCHAR]", + yyXError{1392, -1}: "expected one of [CHAR, VARCHAR]", + yyXError{1298, -1}: "expected one of [CHARACTER, CHARSET, COLLATE]", + yyXError{29, -1}: "expected one of [CHECK, SHOW]", + yyXError{893, -1}: "expected one of [COLUMNS, FIELDS, TABLES]", + yyXError{902, -1}: "expected one of [COLUMNS, FIELDS, TABLES]", + yyXError{984, -1}: "expected one of [COMMITTED, UNCOMMITTED]", + yyXError{1316, -1}: "expected one of [COMPACT, COMPRESSED, DEFAULT, DYNAMIC, FIXED, REDUNDANT]", + yyXError{552, -1}: "expected one of [ELSE, END, WHEN]", + yyXError{558, -1}: "expected one of [ELSE, END, WHEN]", + yyXError{1494, -1}: "expected one of [FOREIGN, FULLTEXT, INDEX, KEY, PRIMARY, UNIQUE]", + yyXError{299, -1}: "expected one of [JOIN, OUTER]", + yyXError{300, -1}: "expected one of [JOIN, OUTER]", + yyXError{836, -1}: "expected one of [NULL, UNKNOWN, false, true]", + yyXError{978, -1}: "expected one of [ONLY, WRITE]", + yyXError{896, -1}: "expected one of [STATUS, VARIABLES]", + yyXError{900, -1}: "expected one of [STATUS, VARIABLES]", + yyXError{901, -1}: "expected one of [STATUS, VARIABLES]", + yyXError{820, -1}: "expected optional NOT or one of [NOT, NULL, UNKNOWN, false, true]", + yyXError{298, -1}: "expected optional OUTER clause or one of [JOIN, OUTER]", + yyXError{1357, -1}: "expected optional column definition option list or one of [$end, ')', ',', ';', AFTER, AUTO_INCREMENT, CHECK, COMMENT, DEFAULT, FIRST, NOT, NULL, ON, PRIMARY, UNIQUE]", + yyXError{778, -1}: "expected primary expression factor or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{779, -1}: "expected primary expression factor or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{780, -1}: "expected primary expression factor or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{781, -1}: "expected primary expression factor or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{782, -1}: "expected primary expression factor or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{783, -1}: "expected primary expression factor or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{784, -1}: "expected primary expression factor or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{785, -1}: "expected primary expression factor or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{786, -1}: "expected primary expression factor or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{787, -1}: "expected primary expression factor or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{788, -1}: "expected primary expression factor or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{789, -1}: "expected primary expression factor or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{803, -1}: "expected primary expression factor or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{382, -1}: "expected primary expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{383, -1}: "expected primary expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{384, -1}: "expected primary expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{385, -1}: "expected primary expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{386, -1}: "expected primary expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{804, -1}: "expected primary expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{805, -1}: "expected primary expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{933, -1}: "expected primary expression or one of ['!', '(', '+', '-', '~', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BINARY, BIT, BOOL, BOOLEAN, BTREE, CASE, CAST, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONVERT, COUNT, CURDATE, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_USER, CUR_TIME, DATABASE, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DEFAULT, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, EXISTS, EXTRACT, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IF, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LOCAL, LOCATE, LOWER, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULL, NULLIF, OFFSET, ONLY, PASSWORD, PLACEHOLDER, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEAT, REPEATABLE, REPLACE, ROLLBACK, ROW, ROW_FORMAT, SCHEMA, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, STRCMP, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYSDATE, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNDERSCORE_CHARSET, UNKNOWN, UPPER, USER, USER_VAR, VALUE, VALUES, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, bit literal, false, floating-point literal, hexadecimal literal, identifier, integer literal, string literal, true]", + yyXError{964, -1}: "expected set variable value or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, SYS_VAR, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, USER_VAR, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1547, -1}: "expected statement or one of [$end, '(', ';', ADMIN, ALTER, BEGIN, COMMIT, CREATE, DEALLOCATE, DELETE, DESC, DESCRIBE, DO, DROP, EXECUTE, EXPLAIN, GRANT, INSERT, LOCK, PREPARE, REPLACE, ROLLBACK, SELECT, SET, SHOW, START, TRUNCATE, UNLOCK, UPDATE, USE]", + yyXError{1412, -1}: "expected string list or string literal", + yyXError{1422, -1}: "expected string list or string literal", + yyXError{267, -1}: "expected string literal", + yyXError{369, -1}: "expected string literal", + yyXError{811, -1}: "expected string literal", + yyXError{1254, -1}: "expected string literal", + yyXError{1336, -1}: "expected string literal", + yyXError{1340, -1}: "expected string literal", + yyXError{1344, -1}: "expected string literal", + yyXError{1416, -1}: "expected string literal", + yyXError{1464, -1}: "expected string literal", + yyXError{947, -1}: "expected string literal or identifier or one of [=, ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{505, -1}: "expected string literal or identifier or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{539, -1}: "expected string literal or identifier or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{574, -1}: "expected string literal or identifier or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{952, -1}: "expected string literal or identifier or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{1005, -1}: "expected string literal or identifier or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{1350, -1}: "expected string literal or identifier or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{1352, -1}: "expected string literal or identifier or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{1420, -1}: "expected string literal or identifier or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{1505, -1}: "expected string literal or identifier or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{1507, -1}: "expected string literal or identifier or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier, string literal]", + yyXError{281, -1}: "expected table alias name optional or one of [$end, ')', ',', ';', '}', ABS, ADDDATE, ADMIN, AFTER, ANY, AS, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CROSS, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOR, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP, GROUP_CONCAT, HASH, HAVING, HOUR, IDENTIFIED, IFNULL, INNER, ISOLATION, JOIN, KEY_BLOCK_SIZE, LEFT, LENGTH, LEVEL, LIMIT, LOCAL, LOCATE, LOCK, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ON, ONLY, ORDER, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, RIGHT, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SET, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, WHERE, YEAR, YEARWEEK, identifier]", + yyXError{296, -1}: "expected table alias name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AS, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNION, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{288, -1}: "expected table alias name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AS, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{293, -1}: "expected table alias name or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AS, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1537, -1}: "expected table column definition or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1206, -1}: "expected table constraint element or one of [FOREIGN, FULLTEXT, INDEX, KEY, PRIMARY, UNIQUE]", + yyXError{1202, -1}: "expected table definition element list or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONSTRAINT, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOREIGN, FOUND_ROWS, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INDEX, ISOLATION, KEY, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNIQUE, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1295, -1}: "expected table definition element or one of [ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECK, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, CONSTRAINT, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOREIGN, FOUND_ROWS, FULL, FULLTEXT, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, INDEX, ISOLATION, KEY, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, PRIMARY, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNIQUE, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{297, -1}: "expected table reference or one of ['(', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{308, -1}: "expected table reference or one of ['(', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{850, -1}: "expected table reference or one of ['(', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{274, -1}: "expected table reference or table references or one of ['(', '{', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1178, -1}: "expected table references or one of ['(', '{', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + yyXError{1183, -1}: "expected table references or one of ['(', '{', ABS, ADDDATE, ADMIN, AFTER, ANY, AUTO_INCREMENT, AVG, AVG_ROW_LENGTH, BEGIN, BIT, BOOL, BOOLEAN, BTREE, CHARSET, CHECKSUM, COALESCE, COLLATION, COLUMNS, COMMENT, COMMIT, COMMITTED, COMPACT, COMPRESSED, COMPRESSION, CONCAT, CONCAT_WS, CONNECTION, CONNECTION_ID, COUNT, CUR_TIME, DATE, DATETIME, DATE_ADD, DATE_SUB, DAY, DAYNAME, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, DEALLOCATE, DELAY_KEY_WRITE, DO, DYNAMIC, END, ENGINE, ENGINES, ESCAPE, EXECUTE, FIELDS, FIRST, FIXED, FOUND_ROWS, FULL, GLOBAL, GRANTS, GROUP_CONCAT, HASH, HOUR, IDENTIFIED, IFNULL, ISOLATION, KEY_BLOCK_SIZE, LENGTH, LEVEL, LOCAL, LOCATE, MAX, MAX_ROWS, MICROSECOND, MIN, MINUTE, MIN_ROWS, MODE, MONTH, NAMES, NATIONAL, NOW, NULLIF, OFFSET, ONLY, PASSWORD, POW, POWER, PREPARE, QUARTER, QUICK, RAND, REDUNDANT, REPEATABLE, ROLLBACK, ROW, ROW_FORMAT, SECOND, SERIALIZABLE, SESSION, SIGNED, SOME, SQL_CALC_FOUND_ROWS, START, STATUS, SUBDATE, SUBSTRING, SUBSTRING_INDEX, SUM, TABLES, TEXT, TIME, TIMESTAMP, TRANSACTION, TRIGGERS, TRIM, TRUNCATE, UNCOMMITTED, UNKNOWN, USER, VALUE, VARIABLES, VERSION, WARNINGS, WEEK, WEEKDAY, WEEKOFYEAR, YEAR, YEARWEEK, identifier]", + } + + yyParseTab = [1549][]uint16{ + // 0 + {2: 766, 766, 23: 894, 895, 44: 905, 881, 883, 49: 897, 885, 56: 898, 58: 882, 939, 133: 900, 147: 944, 153: 904, 163: 890, 213: 893, 243: 899, 246: 935, 248: 887, 307: 903, 315: 902, 901, 929, 322: 940, 329: 886, 332: 892, 343: 884, 350: 906, 355: 880, 358: 942, 372: 913, 377: 925, 380: 928, 386: 933, 389: 908, 391: 909, 393: 910, 401: 911, 916, 917, 918, 919, 409: 912, 896, 412: 889, 920, 921, 922, 923, 907, 914, 888, 915, 891, 424: 924, 432: 937, 440: 926, 443: 927, 930, 931, 447: 938, 453: 932, 943, 936, 941, 458: 934, 511: 879, 533: 877, 878}, + {2: 876}, + {2: 875, 2423}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 2422, 1189}, + {313: 1149, 327: 694, 359: 2393}, + // 5 + {2: 847, 847}, + {82: 2392}, + {2: 837, 837}, + {60: 2070, 204: 2067, 220: 2029, 2030, 245: 800, 327: 2069, 408: 2068, 475: 2066}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 309: 2065}, + // 10 + {344, 344, 4: 344, 344, 344, 9: 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 146: 344, 313: 344, 360: 1147, 433: 2048}, + {22: 2035, 327, 220: 2029, 2030, 245: 2032, 327: 2034, 408: 2031, 539: 2033}, + {765, 765, 4: 765, 765, 765, 9: 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 765, 213: 765, 243: 765, 322: 765, 329: 765, 332: 765}, + {764, 764, 4: 764, 764, 764, 9: 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 764, 213: 764, 243: 764, 322: 764, 329: 764, 332: 764}, + {763, 763, 4: 763, 763, 763, 9: 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 763, 213: 763, 243: 763, 322: 763, 329: 763, 332: 763}, + // 15 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 213: 893, 243: 899, 303: 2021, 307: 2023, 322: 940, 329: 886, 332: 892, 372: 2024, 377: 2026, 380: 2027, 386: 2025, 485: 2022}, + {348, 348, 4: 348, 348, 348, 9: 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 348, 313: 348, 320: 348, 360: 2008, 411: 2010, 497: 2009, 514: 2007}, + {532, 532, 4: 532, 532, 532, 9: 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 532, 320: 532, 360: 1971, 411: 1972, 522: 1970}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1965, 948, 947}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1959, 948, 947}, + // 20 + {23: 1957}, + {23: 328}, + {2: 326, 326}, + {290, 290, 4: 290, 290, 290, 9: 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 131: 290, 290, 290, 290, 290, 290, 290, 165: 290, 197: 290, 202: 290, 210: 290, 212: 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 290, 305: 1904, 330: 1905, 525: 1906, 528: 1903}, + {133: 1461, 243: 899, 307: 1471, 315: 902, 901, 1460}, + // 25 + {139: 1886}, + {139: 274}, + {2: 177, 177, 139: 272}, + {1005, 949, 244, 244, 950, 971, 1821, 8: 244, 1010, 1824, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 1826, 1018, 974, 1028, 1822, 998, 1013, 1026, 1023, 1027, 1825, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 1823, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1829, 948, 947, 1416, 214: 1831, 222: 1830, 323: 1828, 459: 1832, 547: 1827}, + {205: 1814, 350: 1813}, + // 30 + {21: 209, 206, 25: 209, 27: 206, 31: 206, 65: 1773, 67: 1765, 1778, 1776, 1763, 79: 1777, 83: 1774, 85: 1771, 209: 1768, 245: 1764, 327: 1770, 343: 1762, 407: 1766, 493: 1772, 508: 1769, 517: 1775, 523: 1767, 531: 1761}, + {2: 199, 199}, + {2: 198, 198}, + {2: 197, 197}, + {2: 196, 196}, + // 35 + {2: 195, 195}, + {2: 194, 194}, + {2: 193, 193}, + {2: 192, 192}, + {2: 191, 191}, + // 40 + {2: 190, 190}, + {2: 189, 189}, + {2: 188, 188}, + {2: 187, 187}, + {2: 186, 186}, + // 45 + {2: 185, 185}, + {2: 184, 184}, + {2: 183, 183}, + {2: 182, 182}, + {2: 181, 181}, + // 50 + {2: 180, 180}, + {2: 179, 179}, + {2: 178, 178}, + {2: 176, 176}, + {2: 175, 175}, + // 55 + {2: 174, 174}, + {2: 173, 173}, + {2: 172, 172}, + {2: 171, 171}, + {2: 170, 170}, + // 60 + {2: 169, 169}, + {2: 168, 168}, + {2: 162, 162}, + {327: 1759}, + {344, 344, 4: 344, 344, 344, 9: 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 344, 133: 344, 313: 344, 318: 344, 360: 1147, 433: 1148}, + // 65 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1145, 948, 947, 345: 1146}, + {24: 1094, 243: 1097, 245: 1095, 248: 1093, 305: 1089, 322: 1099, 329: 1092, 332: 1096, 343: 1091, 350: 1098, 355: 1090, 358: 1100, 441: 1088, 1087, 515: 1086}, + {22: 1085}, + {22: 945}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 1075, 451: 1076, 538: 1074}, + // 70 + {682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 682, 209: 682, 211: 682, 243: 682, 682, 682, 247: 682, 682, 682, 682, 682, 253: 682, 682, 682, 682, 258: 682, 682, 682, 263: 682, 682, 682, 682, 682, 274: 682, 682, 682, 682, 682, 682, 682, 682, 284: 682, 682, 682, 288: 682, 682, 682, 682, 682, 682, 295: 682}, + {681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, 209: 681, 211: 681, 243: 681, 681, 681, 247: 681, 681, 681, 681, 681, 253: 681, 681, 681, 681, 258: 681, 681, 681, 263: 681, 681, 681, 681, 681, 274: 681, 681, 681, 681, 681, 681, 681, 681, 284: 681, 681, 681, 288: 681, 681, 681, 681, 681, 681, 295: 681}, + {680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 680, 209: 680, 211: 680, 243: 680, 680, 680, 247: 680, 680, 680, 680, 680, 253: 680, 680, 680, 680, 258: 680, 680, 680, 263: 680, 680, 680, 680, 680, 274: 680, 680, 680, 680, 680, 680, 680, 680, 284: 680, 680, 680, 288: 680, 680, 680, 680, 680, 680, 295: 680}, + {679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 679, 209: 679, 211: 679, 243: 679, 679, 679, 247: 679, 679, 679, 679, 679, 253: 679, 679, 679, 679, 258: 679, 679, 679, 263: 679, 679, 679, 679, 679, 274: 679, 679, 679, 679, 679, 679, 679, 679, 284: 679, 679, 679, 288: 679, 679, 679, 679, 679, 679, 295: 679}, + {678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 678, 209: 678, 211: 678, 243: 678, 678, 678, 247: 678, 678, 678, 678, 678, 253: 678, 678, 678, 678, 258: 678, 678, 678, 263: 678, 678, 678, 678, 678, 274: 678, 678, 678, 678, 678, 678, 678, 678, 284: 678, 678, 678, 288: 678, 678, 678, 678, 678, 678, 295: 678}, + // 75 + {677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 209: 677, 211: 677, 243: 677, 677, 677, 247: 677, 677, 677, 677, 677, 253: 677, 677, 677, 677, 258: 677, 677, 677, 263: 677, 677, 677, 677, 677, 274: 677, 677, 677, 677, 677, 677, 677, 677, 284: 677, 677, 677, 288: 677, 677, 677, 677, 677, 677, 295: 677}, + {676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 676, 209: 676, 211: 676, 243: 676, 676, 676, 247: 676, 676, 676, 676, 676, 253: 676, 676, 676, 676, 258: 676, 676, 676, 263: 676, 676, 676, 676, 676, 274: 676, 676, 676, 676, 676, 676, 676, 676, 284: 676, 676, 676, 288: 676, 676, 676, 676, 676, 676, 295: 676}, + {675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 675, 209: 675, 211: 675, 243: 675, 675, 675, 247: 675, 675, 675, 675, 675, 253: 675, 675, 675, 675, 258: 675, 675, 675, 263: 675, 675, 675, 675, 675, 274: 675, 675, 675, 675, 675, 675, 675, 675, 284: 675, 675, 675, 288: 675, 675, 675, 675, 675, 675, 295: 675}, + {674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 674, 209: 674, 211: 674, 243: 674, 674, 674, 247: 674, 674, 674, 674, 674, 253: 674, 674, 674, 674, 258: 674, 674, 674, 263: 674, 674, 674, 674, 674, 274: 674, 674, 674, 674, 674, 674, 674, 674, 284: 674, 674, 674, 288: 674, 674, 674, 674, 674, 674, 295: 674}, + {673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 673, 209: 673, 211: 673, 243: 673, 673, 673, 247: 673, 673, 673, 673, 673, 253: 673, 673, 673, 673, 258: 673, 673, 673, 263: 673, 673, 673, 673, 673, 274: 673, 673, 673, 673, 673, 673, 673, 673, 284: 673, 673, 673, 288: 673, 673, 673, 673, 673, 673, 295: 673}, + // 80 + {672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 672, 209: 672, 211: 672, 243: 672, 672, 672, 247: 672, 672, 672, 672, 672, 253: 672, 672, 672, 672, 258: 672, 672, 672, 263: 672, 672, 672, 672, 672, 274: 672, 672, 672, 672, 672, 672, 672, 672, 284: 672, 672, 672, 288: 672, 672, 672, 672, 672, 672, 295: 672}, + {671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 671, 209: 671, 211: 671, 243: 671, 671, 671, 247: 671, 671, 671, 671, 671, 253: 671, 671, 671, 671, 258: 671, 671, 671, 263: 671, 671, 671, 671, 671, 274: 671, 671, 671, 671, 671, 671, 671, 671, 284: 671, 671, 671, 288: 671, 671, 671, 671, 671, 671, 295: 671}, + {670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 209: 670, 211: 670, 243: 670, 670, 670, 247: 670, 670, 670, 670, 670, 253: 670, 670, 670, 670, 258: 670, 670, 670, 263: 670, 670, 670, 670, 670, 274: 670, 670, 670, 670, 670, 670, 670, 670, 284: 670, 670, 670, 288: 670, 670, 670, 670, 670, 670, 295: 670}, + {669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 669, 209: 669, 211: 669, 243: 669, 669, 669, 247: 669, 669, 669, 669, 669, 253: 669, 669, 669, 669, 258: 669, 669, 669, 263: 669, 669, 669, 669, 669, 274: 669, 669, 669, 669, 669, 669, 669, 669, 284: 669, 669, 669, 288: 669, 669, 669, 669, 669, 669, 295: 669}, + {668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 668, 209: 668, 211: 668, 243: 668, 668, 668, 247: 668, 668, 668, 668, 668, 253: 668, 668, 668, 668, 258: 668, 668, 668, 263: 668, 668, 668, 668, 668, 274: 668, 668, 668, 668, 668, 668, 668, 668, 284: 668, 668, 668, 288: 668, 668, 668, 668, 668, 668, 295: 668}, + // 85 + {667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 667, 209: 667, 211: 667, 243: 667, 667, 667, 247: 667, 667, 667, 667, 667, 253: 667, 667, 667, 667, 258: 667, 667, 667, 263: 667, 667, 667, 667, 667, 274: 667, 667, 667, 667, 667, 667, 667, 667, 284: 667, 667, 667, 288: 667, 667, 667, 667, 667, 667, 295: 667}, + {666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 209: 666, 211: 666, 243: 666, 666, 666, 247: 666, 666, 666, 666, 666, 253: 666, 666, 666, 666, 258: 666, 666, 666, 263: 666, 666, 666, 666, 666, 274: 666, 666, 666, 666, 666, 666, 666, 666, 284: 666, 666, 666, 288: 666, 666, 666, 666, 666, 666, 295: 666}, + {665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 665, 209: 665, 211: 665, 243: 665, 665, 665, 247: 665, 665, 665, 665, 665, 253: 665, 665, 665, 665, 258: 665, 665, 665, 263: 665, 665, 665, 665, 665, 274: 665, 665, 665, 665, 665, 665, 665, 665, 284: 665, 665, 665, 288: 665, 665, 665, 665, 665, 665, 295: 665}, + {664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 664, 209: 664, 211: 664, 243: 664, 664, 664, 247: 664, 664, 664, 664, 664, 253: 664, 664, 664, 664, 258: 664, 664, 664, 263: 664, 664, 664, 664, 664, 274: 664, 664, 664, 664, 664, 664, 664, 664, 284: 664, 664, 664, 288: 664, 664, 664, 664, 664, 664, 295: 664}, + {663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 663, 209: 663, 211: 663, 243: 663, 663, 663, 247: 663, 663, 663, 663, 663, 253: 663, 663, 663, 663, 258: 663, 663, 663, 263: 663, 663, 663, 663, 663, 274: 663, 663, 663, 663, 663, 663, 663, 663, 284: 663, 663, 663, 288: 663, 663, 663, 663, 663, 663, 295: 663}, + // 90 + {662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 662, 209: 662, 211: 662, 243: 662, 662, 662, 247: 662, 662, 662, 662, 662, 253: 662, 662, 662, 662, 258: 662, 662, 662, 263: 662, 662, 662, 662, 662, 274: 662, 662, 662, 662, 662, 662, 662, 662, 284: 662, 662, 662, 288: 662, 662, 662, 662, 662, 662, 295: 662}, + {661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 661, 209: 661, 211: 661, 243: 661, 661, 661, 247: 661, 661, 661, 661, 661, 253: 661, 661, 661, 661, 258: 661, 661, 661, 263: 661, 661, 661, 661, 661, 274: 661, 661, 661, 661, 661, 661, 661, 661, 284: 661, 661, 661, 288: 661, 661, 661, 661, 661, 661, 295: 661}, + {660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 660, 209: 660, 211: 660, 243: 660, 660, 660, 247: 660, 660, 660, 660, 660, 253: 660, 660, 660, 660, 258: 660, 660, 660, 263: 660, 660, 660, 660, 660, 274: 660, 660, 660, 660, 660, 660, 660, 660, 284: 660, 660, 660, 288: 660, 660, 660, 660, 660, 660, 295: 660}, + {659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 659, 209: 659, 211: 659, 243: 659, 659, 659, 247: 659, 659, 659, 659, 659, 253: 659, 659, 659, 659, 258: 659, 659, 659, 263: 659, 659, 659, 659, 659, 274: 659, 659, 659, 659, 659, 659, 659, 659, 284: 659, 659, 659, 288: 659, 659, 659, 659, 659, 659, 295: 659}, + {658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 658, 209: 658, 211: 658, 243: 658, 658, 658, 247: 658, 658, 658, 658, 658, 253: 658, 658, 658, 658, 258: 658, 658, 658, 263: 658, 658, 658, 658, 658, 274: 658, 658, 658, 658, 658, 658, 658, 658, 284: 658, 658, 658, 288: 658, 658, 658, 658, 658, 658, 295: 658}, + // 95 + {657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 657, 209: 657, 211: 657, 243: 657, 657, 657, 247: 657, 657, 657, 657, 657, 253: 657, 657, 657, 657, 258: 657, 657, 657, 263: 657, 657, 657, 657, 657, 274: 657, 657, 657, 657, 657, 657, 657, 657, 284: 657, 657, 657, 288: 657, 657, 657, 657, 657, 657, 295: 657}, + {656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 656, 209: 656, 211: 656, 243: 656, 656, 656, 247: 656, 656, 656, 656, 656, 253: 656, 656, 656, 656, 258: 656, 656, 656, 263: 656, 656, 656, 656, 656, 274: 656, 656, 656, 656, 656, 656, 656, 656, 284: 656, 656, 656, 288: 656, 656, 656, 656, 656, 656, 295: 656}, + {655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 655, 209: 655, 211: 655, 243: 655, 655, 655, 247: 655, 655, 655, 655, 655, 253: 655, 655, 655, 655, 258: 655, 655, 655, 263: 655, 655, 655, 655, 655, 274: 655, 655, 655, 655, 655, 655, 655, 655, 284: 655, 655, 655, 288: 655, 655, 655, 655, 655, 655, 295: 655}, + {654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 654, 209: 654, 211: 654, 243: 654, 654, 654, 247: 654, 654, 654, 654, 654, 253: 654, 654, 654, 654, 258: 654, 654, 654, 263: 654, 654, 654, 654, 654, 274: 654, 654, 654, 654, 654, 654, 654, 654, 284: 654, 654, 654, 288: 654, 654, 654, 654, 654, 654, 295: 654}, + {653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 653, 209: 653, 211: 653, 243: 653, 653, 653, 247: 653, 653, 653, 653, 653, 253: 653, 653, 653, 653, 258: 653, 653, 653, 263: 653, 653, 653, 653, 653, 274: 653, 653, 653, 653, 653, 653, 653, 653, 284: 653, 653, 653, 288: 653, 653, 653, 653, 653, 653, 295: 653}, + // 100 + {652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 652, 209: 652, 211: 652, 243: 652, 652, 652, 247: 652, 652, 652, 652, 652, 253: 652, 652, 652, 652, 258: 652, 652, 652, 263: 652, 652, 652, 652, 652, 274: 652, 652, 652, 652, 652, 652, 652, 652, 284: 652, 652, 652, 288: 652, 652, 652, 652, 652, 652, 295: 652}, + {651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 651, 209: 651, 211: 651, 243: 651, 651, 651, 247: 651, 651, 651, 651, 651, 253: 651, 651, 651, 651, 258: 651, 651, 651, 263: 651, 651, 651, 651, 651, 274: 651, 651, 651, 651, 651, 651, 651, 651, 284: 651, 651, 651, 288: 651, 651, 651, 651, 651, 651, 295: 651}, + {650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 650, 209: 650, 211: 650, 243: 650, 650, 650, 247: 650, 650, 650, 650, 650, 253: 650, 650, 650, 650, 258: 650, 650, 650, 263: 650, 650, 650, 650, 650, 274: 650, 650, 650, 650, 650, 650, 650, 650, 284: 650, 650, 650, 288: 650, 650, 650, 650, 650, 650, 295: 650}, + {649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 649, 209: 649, 211: 649, 243: 649, 649, 649, 247: 649, 649, 649, 649, 649, 253: 649, 649, 649, 649, 258: 649, 649, 649, 263: 649, 649, 649, 649, 649, 274: 649, 649, 649, 649, 649, 649, 649, 649, 284: 649, 649, 649, 288: 649, 649, 649, 649, 649, 649, 295: 649}, + {648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 648, 209: 648, 211: 648, 243: 648, 648, 648, 247: 648, 648, 648, 648, 648, 253: 648, 648, 648, 648, 258: 648, 648, 648, 263: 648, 648, 648, 648, 648, 274: 648, 648, 648, 648, 648, 648, 648, 648, 284: 648, 648, 648, 288: 648, 648, 648, 648, 648, 648, 295: 648}, + // 105 + {647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 647, 209: 647, 211: 647, 243: 647, 647, 647, 247: 647, 647, 647, 647, 647, 253: 647, 647, 647, 647, 258: 647, 647, 647, 263: 647, 647, 647, 647, 647, 274: 647, 647, 647, 647, 647, 647, 647, 647, 284: 647, 647, 647, 288: 647, 647, 647, 647, 647, 647, 295: 647}, + {646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 646, 209: 646, 211: 646, 243: 646, 646, 646, 247: 646, 646, 646, 646, 646, 253: 646, 646, 646, 646, 258: 646, 646, 646, 263: 646, 646, 646, 646, 646, 274: 646, 646, 646, 646, 646, 646, 646, 646, 284: 646, 646, 646, 288: 646, 646, 646, 646, 646, 646, 295: 646}, + {645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 645, 209: 645, 211: 645, 243: 645, 645, 645, 247: 645, 645, 645, 645, 645, 253: 645, 645, 645, 645, 258: 645, 645, 645, 263: 645, 645, 645, 645, 645, 274: 645, 645, 645, 645, 645, 645, 645, 645, 284: 645, 645, 645, 288: 645, 645, 645, 645, 645, 645, 295: 645}, + {644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 644, 209: 644, 211: 644, 243: 644, 644, 644, 247: 644, 644, 644, 644, 644, 253: 644, 644, 644, 644, 258: 644, 644, 644, 263: 644, 644, 644, 644, 644, 274: 644, 644, 644, 644, 644, 644, 644, 644, 284: 644, 644, 644, 288: 644, 644, 644, 644, 644, 644, 295: 644}, + {643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 643, 209: 643, 211: 643, 243: 643, 643, 643, 247: 643, 643, 643, 643, 643, 253: 643, 643, 643, 643, 258: 643, 643, 643, 263: 643, 643, 643, 643, 643, 274: 643, 643, 643, 643, 643, 643, 643, 643, 284: 643, 643, 643, 288: 643, 643, 643, 643, 643, 643, 295: 643}, + // 110 + {642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 642, 209: 642, 211: 642, 243: 642, 642, 642, 247: 642, 642, 642, 642, 642, 253: 642, 642, 642, 642, 258: 642, 642, 642, 263: 642, 642, 642, 642, 642, 274: 642, 642, 642, 642, 642, 642, 642, 642, 284: 642, 642, 642, 288: 642, 642, 642, 642, 642, 642, 295: 642}, + {641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 641, 209: 641, 211: 641, 243: 641, 641, 641, 247: 641, 641, 641, 641, 641, 253: 641, 641, 641, 641, 258: 641, 641, 641, 263: 641, 641, 641, 641, 641, 274: 641, 641, 641, 641, 641, 641, 641, 641, 284: 641, 641, 641, 288: 641, 641, 641, 641, 641, 641, 295: 641}, + {640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 640, 209: 640, 211: 640, 243: 640, 640, 640, 247: 640, 640, 640, 640, 640, 253: 640, 640, 640, 640, 258: 640, 640, 640, 263: 640, 640, 640, 640, 640, 274: 640, 640, 640, 640, 640, 640, 640, 640, 284: 640, 640, 640, 288: 640, 640, 640, 640, 640, 640, 295: 640}, + {639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 639, 209: 639, 211: 639, 243: 639, 639, 639, 247: 639, 639, 639, 639, 639, 253: 639, 639, 639, 639, 258: 639, 639, 639, 263: 639, 639, 639, 639, 639, 274: 639, 639, 639, 639, 639, 639, 639, 639, 284: 639, 639, 639, 288: 639, 639, 639, 639, 639, 639, 295: 639}, + {638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 638, 209: 638, 211: 638, 243: 638, 638, 638, 247: 638, 638, 638, 638, 638, 253: 638, 638, 638, 638, 258: 638, 638, 638, 263: 638, 638, 638, 638, 638, 274: 638, 638, 638, 638, 638, 638, 638, 638, 284: 638, 638, 638, 288: 638, 638, 638, 638, 638, 638, 295: 638}, + // 115 + {637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 637, 209: 637, 211: 637, 243: 637, 637, 637, 247: 637, 637, 637, 637, 637, 253: 637, 637, 637, 637, 258: 637, 637, 637, 263: 637, 637, 637, 637, 637, 274: 637, 637, 637, 637, 637, 637, 637, 637, 284: 637, 637, 637, 288: 637, 637, 637, 637, 637, 637, 295: 637}, + {636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 636, 209: 636, 211: 636, 243: 636, 636, 636, 247: 636, 636, 636, 636, 636, 253: 636, 636, 636, 636, 258: 636, 636, 636, 263: 636, 636, 636, 636, 636, 274: 636, 636, 636, 636, 636, 636, 636, 636, 284: 636, 636, 636, 288: 636, 636, 636, 636, 636, 636, 295: 636}, + {635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 635, 209: 635, 211: 635, 243: 635, 635, 635, 247: 635, 635, 635, 635, 635, 253: 635, 635, 635, 635, 258: 635, 635, 635, 263: 635, 635, 635, 635, 635, 274: 635, 635, 635, 635, 635, 635, 635, 635, 284: 635, 635, 635, 288: 635, 635, 635, 635, 635, 635, 295: 635}, + {634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 634, 209: 634, 211: 634, 243: 634, 634, 634, 247: 634, 634, 634, 634, 634, 253: 634, 634, 634, 634, 258: 634, 634, 634, 263: 634, 634, 634, 634, 634, 274: 634, 634, 634, 634, 634, 634, 634, 634, 284: 634, 634, 634, 288: 634, 634, 634, 634, 634, 634, 295: 634}, + {633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 633, 209: 633, 211: 633, 243: 633, 633, 633, 247: 633, 633, 633, 633, 633, 253: 633, 633, 633, 633, 258: 633, 633, 633, 263: 633, 633, 633, 633, 633, 274: 633, 633, 633, 633, 633, 633, 633, 633, 284: 633, 633, 633, 288: 633, 633, 633, 633, 633, 633, 295: 633}, + // 120 + {632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 632, 209: 632, 211: 632, 243: 632, 632, 632, 247: 632, 632, 632, 632, 632, 253: 632, 632, 632, 632, 258: 632, 632, 632, 263: 632, 632, 632, 632, 632, 274: 632, 632, 632, 632, 632, 632, 632, 632, 284: 632, 632, 632, 288: 632, 632, 632, 632, 632, 632, 295: 632}, + {631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 209: 631, 211: 631, 243: 631, 631, 631, 247: 631, 631, 631, 631, 631, 253: 631, 631, 631, 631, 258: 631, 631, 631, 263: 631, 631, 631, 631, 631, 274: 631, 631, 631, 631, 631, 631, 631, 631, 284: 631, 631, 631, 288: 631, 631, 631, 631, 631, 631, 295: 631}, + {630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 630, 209: 630, 211: 630, 243: 630, 630, 630, 247: 630, 630, 630, 630, 630, 253: 630, 630, 630, 630, 258: 630, 630, 630, 263: 630, 630, 630, 630, 630, 274: 630, 630, 630, 630, 630, 630, 630, 630, 284: 630, 630, 630, 288: 630, 630, 630, 630, 630, 630, 295: 630}, + {629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 209: 629, 211: 629, 243: 629, 629, 629, 247: 629, 629, 629, 629, 629, 253: 629, 629, 629, 629, 258: 629, 629, 629, 263: 629, 629, 629, 629, 629, 274: 629, 629, 629, 629, 629, 629, 629, 629, 284: 629, 629, 629, 288: 629, 629, 629, 629, 629, 629, 295: 629}, + {628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 209: 628, 211: 628, 243: 628, 628, 628, 247: 628, 628, 628, 628, 628, 253: 628, 628, 628, 628, 258: 628, 628, 628, 263: 628, 628, 628, 628, 628, 274: 628, 628, 628, 628, 628, 628, 628, 628, 284: 628, 628, 628, 288: 628, 628, 628, 628, 628, 628, 295: 628}, + // 125 + {627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 209: 627, 211: 627, 243: 627, 627, 627, 247: 627, 627, 627, 627, 627, 253: 627, 627, 627, 627, 258: 627, 627, 627, 263: 627, 627, 627, 627, 627, 274: 627, 627, 627, 627, 627, 627, 627, 627, 284: 627, 627, 627, 288: 627, 627, 627, 627, 627, 627, 295: 627}, + {626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 209: 626, 211: 626, 243: 626, 626, 626, 247: 626, 626, 626, 626, 626, 253: 626, 626, 626, 626, 258: 626, 626, 626, 263: 626, 626, 626, 626, 626, 274: 626, 626, 626, 626, 626, 626, 626, 626, 284: 626, 626, 626, 288: 626, 626, 626, 626, 626, 626, 295: 626}, + {625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 625, 209: 625, 211: 625, 243: 625, 625, 625, 247: 625, 625, 625, 625, 625, 253: 625, 625, 625, 625, 258: 625, 625, 625, 263: 625, 625, 625, 625, 625, 274: 625, 625, 625, 625, 625, 625, 625, 625, 284: 625, 625, 625, 288: 625, 625, 625, 625, 625, 625, 295: 625}, + {624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 624, 209: 624, 211: 624, 243: 624, 624, 624, 247: 624, 624, 624, 624, 624, 253: 624, 624, 624, 624, 258: 624, 624, 624, 263: 624, 624, 624, 624, 624, 274: 624, 624, 624, 624, 624, 624, 624, 624, 284: 624, 624, 624, 288: 624, 624, 624, 624, 624, 624, 295: 624}, + {623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 623, 209: 623, 211: 623, 243: 623, 623, 623, 247: 623, 623, 623, 623, 623, 253: 623, 623, 623, 623, 258: 623, 623, 623, 263: 623, 623, 623, 623, 623, 274: 623, 623, 623, 623, 623, 623, 623, 623, 284: 623, 623, 623, 288: 623, 623, 623, 623, 623, 623, 295: 623}, + // 130 + {622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 622, 209: 622, 211: 622, 243: 622, 622, 622, 247: 622, 622, 622, 622, 622, 253: 622, 622, 622, 622, 258: 622, 622, 622, 263: 622, 622, 622, 622, 622, 274: 622, 622, 622, 622, 622, 622, 622, 622, 284: 622, 622, 622, 288: 622, 622, 622, 622, 622, 622, 295: 622}, + {621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 621, 209: 621, 211: 621, 243: 621, 621, 621, 247: 621, 621, 621, 621, 621, 253: 621, 621, 621, 621, 258: 621, 621, 621, 263: 621, 621, 621, 621, 621, 274: 621, 621, 621, 621, 621, 621, 621, 621, 284: 621, 621, 621, 288: 621, 621, 621, 621, 621, 621, 295: 621}, + {620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 620, 209: 620, 211: 620, 243: 620, 620, 620, 247: 620, 620, 620, 620, 620, 253: 620, 620, 620, 620, 258: 620, 620, 620, 263: 620, 620, 620, 620, 620, 274: 620, 620, 620, 620, 620, 620, 620, 620, 284: 620, 620, 620, 288: 620, 620, 620, 620, 620, 620, 295: 620}, + {619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 619, 209: 619, 211: 619, 243: 619, 619, 619, 247: 619, 619, 619, 619, 619, 253: 619, 619, 619, 619, 258: 619, 619, 619, 263: 619, 619, 619, 619, 619, 274: 619, 619, 619, 619, 619, 619, 619, 619, 284: 619, 619, 619, 288: 619, 619, 619, 619, 619, 619, 295: 619}, + {618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 618, 209: 618, 211: 618, 243: 618, 618, 618, 247: 618, 618, 618, 618, 618, 253: 618, 618, 618, 618, 258: 618, 618, 618, 263: 618, 618, 618, 618, 618, 274: 618, 618, 618, 618, 618, 618, 618, 618, 284: 618, 618, 618, 288: 618, 618, 618, 618, 618, 618, 295: 618}, + // 135 + {617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 617, 209: 617, 211: 617, 243: 617, 617, 617, 247: 617, 617, 617, 617, 617, 253: 617, 617, 617, 617, 258: 617, 617, 617, 263: 617, 617, 617, 617, 617, 274: 617, 617, 617, 617, 617, 617, 617, 617, 284: 617, 617, 617, 288: 617, 617, 617, 617, 617, 617, 295: 617}, + {616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 616, 209: 616, 211: 616, 243: 616, 616, 616, 247: 616, 616, 616, 616, 616, 253: 616, 616, 616, 616, 258: 616, 616, 616, 263: 616, 616, 616, 616, 616, 274: 616, 616, 616, 616, 616, 616, 616, 616, 284: 616, 616, 616, 288: 616, 616, 616, 616, 616, 616, 295: 616}, + {615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 615, 209: 615, 211: 615, 243: 615, 615, 615, 247: 615, 615, 615, 615, 615, 253: 615, 615, 615, 615, 258: 615, 615, 615, 263: 615, 615, 615, 615, 615, 274: 615, 615, 615, 615, 615, 615, 615, 615, 284: 615, 615, 615, 288: 615, 615, 615, 615, 615, 615, 295: 615}, + {614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 209: 614, 211: 614, 243: 614, 614, 614, 247: 614, 614, 614, 614, 614, 253: 614, 614, 614, 614, 258: 614, 614, 614, 263: 614, 614, 614, 614, 614, 274: 614, 614, 614, 614, 614, 614, 614, 614, 284: 614, 614, 614, 288: 614, 614, 614, 614, 614, 614, 295: 614}, + {613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 613, 209: 613, 211: 613, 243: 613, 613, 613, 247: 613, 613, 613, 613, 613, 253: 613, 613, 613, 613, 258: 613, 613, 613, 263: 613, 613, 613, 613, 613, 274: 613, 613, 613, 613, 613, 613, 613, 613, 284: 613, 613, 613, 288: 613, 613, 613, 613, 613, 613, 295: 613}, + // 140 + {612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 612, 209: 612, 211: 612, 243: 612, 612, 612, 247: 612, 612, 612, 612, 612, 253: 612, 612, 612, 612, 258: 612, 612, 612, 263: 612, 612, 612, 612, 612, 274: 612, 612, 612, 612, 612, 612, 612, 612, 284: 612, 612, 612, 288: 612, 612, 612, 612, 612, 612, 295: 612}, + {611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 611, 209: 611, 211: 611, 243: 611, 611, 611, 247: 611, 611, 611, 611, 611, 253: 611, 611, 611, 611, 258: 611, 611, 611, 263: 611, 611, 611, 611, 611, 274: 611, 611, 611, 611, 611, 611, 611, 611, 284: 611, 611, 611, 288: 611, 611, 611, 611, 611, 611, 295: 611}, + {610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 610, 209: 610, 211: 610, 243: 610, 610, 610, 247: 610, 610, 610, 610, 610, 253: 610, 610, 610, 610, 258: 610, 610, 610, 263: 610, 610, 610, 610, 610, 274: 610, 610, 610, 610, 610, 610, 610, 610, 284: 610, 610, 610, 288: 610, 610, 610, 610, 610, 610, 295: 610}, + {609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 609, 209: 609, 211: 609, 243: 609, 609, 609, 247: 609, 609, 609, 609, 609, 253: 609, 609, 609, 609, 258: 609, 609, 609, 263: 609, 609, 609, 609, 609, 274: 609, 609, 609, 609, 609, 609, 609, 609, 284: 609, 609, 609, 288: 609, 609, 609, 609, 609, 609, 295: 609}, + {608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 608, 209: 608, 211: 608, 243: 608, 608, 608, 247: 608, 608, 608, 608, 608, 253: 608, 608, 608, 608, 258: 608, 608, 608, 263: 608, 608, 608, 608, 608, 274: 608, 608, 608, 608, 608, 608, 608, 608, 284: 608, 608, 608, 288: 608, 608, 608, 608, 608, 608, 295: 608}, + // 145 + {607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 607, 209: 607, 211: 607, 243: 607, 607, 607, 247: 607, 607, 607, 607, 607, 253: 607, 607, 607, 607, 258: 607, 607, 607, 263: 607, 607, 607, 607, 607, 274: 607, 607, 607, 607, 607, 607, 607, 607, 284: 607, 607, 607, 288: 607, 607, 607, 607, 607, 607, 295: 607}, + {606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 606, 209: 606, 211: 606, 243: 606, 606, 606, 247: 606, 606, 606, 606, 606, 253: 606, 606, 606, 606, 258: 606, 606, 606, 263: 606, 606, 606, 606, 606, 274: 606, 606, 606, 606, 606, 606, 606, 606, 284: 606, 606, 606, 288: 606, 606, 606, 606, 606, 606, 295: 606}, + {605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 605, 209: 605, 211: 605, 243: 605, 605, 605, 247: 605, 605, 605, 605, 605, 253: 605, 605, 605, 605, 258: 605, 605, 605, 263: 605, 605, 605, 605, 605, 274: 605, 605, 605, 605, 605, 605, 605, 605, 284: 605, 605, 605, 288: 605, 605, 605, 605, 605, 605, 295: 605}, + {604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 604, 209: 604, 211: 604, 243: 604, 604, 604, 247: 604, 604, 604, 604, 604, 253: 604, 604, 604, 604, 258: 604, 604, 604, 263: 604, 604, 604, 604, 604, 274: 604, 604, 604, 604, 604, 604, 604, 604, 284: 604, 604, 604, 288: 604, 604, 604, 604, 604, 604, 295: 604}, + {603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 603, 209: 603, 211: 603, 243: 603, 603, 603, 247: 603, 603, 603, 603, 603, 253: 603, 603, 603, 603, 258: 603, 603, 603, 263: 603, 603, 603, 603, 603, 274: 603, 603, 603, 603, 603, 603, 603, 603, 284: 603, 603, 603, 288: 603, 603, 603, 603, 603, 603, 295: 603}, + // 150 + {602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 602, 209: 602, 211: 602, 243: 602, 602, 602, 247: 602, 602, 602, 602, 602, 253: 602, 602, 602, 602, 258: 602, 602, 602, 263: 602, 602, 602, 602, 602, 274: 602, 602, 602, 602, 602, 602, 602, 602, 284: 602, 602, 602, 288: 602, 602, 602, 602, 602, 602, 295: 602}, + {601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 601, 209: 601, 211: 601, 243: 601, 601, 601, 247: 601, 601, 601, 601, 601, 253: 601, 601, 601, 601, 258: 601, 601, 601, 263: 601, 601, 601, 601, 601, 274: 601, 601, 601, 601, 601, 601, 601, 601, 284: 601, 601, 601, 288: 601, 601, 601, 601, 601, 601, 295: 601}, + {600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 209: 600, 211: 600, 243: 600, 600, 600, 247: 600, 600, 600, 600, 600, 253: 600, 600, 600, 600, 258: 600, 600, 600, 263: 600, 600, 600, 600, 600, 274: 600, 600, 600, 600, 600, 600, 600, 600, 284: 600, 600, 600, 288: 600, 600, 600, 600, 600, 600, 295: 600}, + {599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 599, 209: 599, 211: 599, 243: 599, 599, 599, 247: 599, 599, 599, 599, 599, 253: 599, 599, 599, 599, 258: 599, 599, 599, 263: 599, 599, 599, 599, 599, 274: 599, 599, 599, 599, 599, 599, 599, 599, 284: 599, 599, 599, 288: 599, 599, 599, 599, 599, 599, 295: 599}, + {598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 209: 598, 211: 598, 243: 598, 598, 598, 247: 598, 598, 598, 598, 598, 253: 598, 598, 598, 598, 258: 598, 598, 598, 263: 598, 598, 598, 598, 598, 274: 598, 598, 598, 598, 598, 598, 598, 598, 284: 598, 598, 598, 288: 598, 598, 598, 598, 598, 598, 295: 598}, + // 155 + {597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 209: 597, 211: 597, 243: 597, 597, 597, 247: 597, 597, 597, 597, 597, 253: 597, 597, 597, 597, 258: 597, 597, 597, 263: 597, 597, 597, 597, 597, 274: 597, 597, 597, 597, 597, 597, 597, 597, 284: 597, 597, 597, 288: 597, 597, 597, 597, 597, 597, 295: 597}, + {596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 596, 209: 596, 211: 596, 243: 596, 596, 596, 247: 596, 596, 596, 596, 596, 253: 596, 596, 596, 596, 258: 596, 596, 596, 263: 596, 596, 596, 596, 596, 274: 596, 596, 596, 596, 596, 596, 596, 596, 284: 596, 596, 596, 288: 596, 596, 596, 596, 596, 596, 295: 596}, + {595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 209: 595, 211: 595, 243: 595, 595, 595, 247: 595, 595, 595, 595, 595, 253: 595, 595, 595, 595, 258: 595, 595, 595, 263: 595, 595, 595, 595, 595, 274: 595, 595, 595, 595, 595, 595, 595, 595, 284: 595, 595, 595, 288: 595, 595, 595, 595, 595, 595, 295: 595}, + {594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 209: 594, 211: 594, 243: 594, 594, 594, 247: 594, 594, 594, 594, 594, 253: 594, 594, 594, 594, 258: 594, 594, 594, 263: 594, 594, 594, 594, 594, 274: 594, 594, 594, 594, 594, 594, 594, 594, 284: 594, 594, 594, 288: 594, 594, 594, 594, 594, 594, 295: 594}, + {593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 209: 593, 211: 593, 243: 593, 593, 593, 247: 593, 593, 593, 593, 593, 253: 593, 593, 593, 593, 258: 593, 593, 593, 263: 593, 593, 593, 593, 593, 274: 593, 593, 593, 593, 593, 593, 593, 593, 284: 593, 593, 593, 288: 593, 593, 593, 593, 593, 593, 295: 593}, + // 160 + {592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 209: 592, 211: 592, 243: 592, 592, 592, 247: 592, 592, 592, 592, 592, 253: 592, 592, 592, 592, 258: 592, 592, 592, 263: 592, 592, 592, 592, 592, 274: 592, 592, 592, 592, 592, 592, 592, 592, 284: 592, 592, 592, 288: 592, 592, 592, 592, 592, 592, 295: 592}, + {591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 209: 591, 211: 591, 243: 591, 591, 591, 247: 591, 591, 591, 591, 591, 253: 591, 591, 591, 591, 258: 591, 591, 591, 263: 591, 591, 591, 591, 591, 274: 591, 591, 591, 591, 591, 591, 591, 591, 284: 591, 591, 591, 288: 591, 591, 591, 591, 591, 591, 295: 591}, + {590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 209: 590, 211: 590, 243: 590, 590, 590, 247: 590, 590, 590, 590, 590, 253: 590, 590, 590, 590, 258: 590, 590, 590, 263: 590, 590, 590, 590, 590, 274: 590, 590, 590, 590, 590, 590, 590, 590, 284: 590, 590, 590, 288: 590, 590, 590, 590, 590, 590, 295: 590}, + {589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 209: 589, 211: 589, 243: 589, 589, 589, 247: 589, 589, 589, 589, 589, 253: 589, 589, 589, 589, 258: 589, 589, 589, 263: 589, 589, 589, 589, 589, 274: 589, 589, 589, 589, 589, 589, 589, 589, 284: 589, 589, 589, 288: 589, 589, 589, 589, 589, 589, 295: 589}, + {588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 209: 588, 211: 588, 243: 588, 588, 588, 247: 588, 588, 588, 588, 588, 253: 588, 588, 588, 588, 258: 588, 588, 588, 263: 588, 588, 588, 588, 588, 274: 588, 588, 588, 588, 588, 588, 588, 588, 284: 588, 588, 588, 288: 588, 588, 588, 588, 588, 588, 295: 588}, + // 165 + {587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 209: 587, 211: 587, 243: 587, 587, 587, 247: 587, 587, 587, 587, 587, 253: 587, 587, 587, 587, 258: 587, 587, 587, 263: 587, 587, 587, 587, 587, 274: 587, 587, 587, 587, 587, 587, 587, 587, 284: 587, 587, 587, 288: 587, 587, 587, 587, 587, 587, 295: 587}, + {586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 209: 586, 211: 586, 243: 586, 586, 586, 247: 586, 586, 586, 586, 586, 253: 586, 586, 586, 586, 258: 586, 586, 586, 263: 586, 586, 586, 586, 586, 274: 586, 586, 586, 586, 586, 586, 586, 586, 284: 586, 586, 586, 288: 586, 586, 586, 586, 586, 586, 295: 586}, + {585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 209: 585, 211: 585, 243: 585, 585, 585, 247: 585, 585, 585, 585, 585, 253: 585, 585, 585, 585, 258: 585, 585, 585, 263: 585, 585, 585, 585, 585, 274: 585, 585, 585, 585, 585, 585, 585, 585, 284: 585, 585, 585, 288: 585, 585, 585, 585, 585, 585, 295: 585}, + {584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 209: 584, 211: 584, 243: 584, 584, 584, 247: 584, 584, 584, 584, 584, 253: 584, 584, 584, 584, 258: 584, 584, 584, 263: 584, 584, 584, 584, 584, 274: 584, 584, 584, 584, 584, 584, 584, 584, 284: 584, 584, 584, 288: 584, 584, 584, 584, 584, 584, 295: 584}, + {583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 209: 583, 211: 583, 243: 583, 583, 583, 247: 583, 583, 583, 583, 583, 253: 583, 583, 583, 583, 258: 583, 583, 583, 263: 583, 583, 583, 583, 583, 274: 583, 583, 583, 583, 583, 583, 583, 583, 284: 583, 583, 583, 288: 583, 583, 583, 583, 583, 583, 295: 583}, + // 170 + {582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 209: 582, 211: 582, 243: 582, 582, 582, 247: 582, 582, 582, 582, 582, 253: 582, 582, 582, 582, 258: 582, 582, 582, 263: 582, 582, 582, 582, 582, 274: 582, 582, 582, 582, 582, 582, 582, 582, 284: 582, 582, 582, 288: 582, 582, 582, 582, 582, 582, 295: 582}, + {581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 209: 581, 211: 581, 243: 581, 581, 581, 247: 581, 581, 581, 581, 581, 253: 581, 581, 581, 581, 258: 581, 581, 581, 263: 581, 581, 581, 581, 581, 274: 581, 581, 581, 581, 581, 581, 581, 581, 284: 581, 581, 581, 288: 581, 581, 581, 581, 581, 581, 295: 581}, + {580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 209: 580, 211: 580, 243: 580, 580, 580, 247: 580, 580, 580, 580, 580, 253: 580, 580, 580, 580, 258: 580, 580, 580, 263: 580, 580, 580, 580, 580, 274: 580, 580, 580, 580, 580, 580, 580, 580, 284: 580, 580, 580, 288: 580, 580, 580, 580, 580, 580, 295: 580}, + {579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 209: 579, 211: 579, 243: 579, 579, 579, 247: 579, 579, 579, 579, 579, 253: 579, 579, 579, 579, 258: 579, 579, 579, 263: 579, 579, 579, 579, 579, 274: 579, 579, 579, 579, 579, 579, 579, 579, 284: 579, 579, 579, 288: 579, 579, 579, 579, 579, 579, 295: 579}, + {578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 209: 578, 211: 578, 243: 578, 578, 578, 247: 578, 578, 578, 578, 578, 253: 578, 578, 578, 578, 258: 578, 578, 578, 263: 578, 578, 578, 578, 578, 274: 578, 578, 578, 578, 578, 578, 578, 578, 284: 578, 578, 578, 288: 578, 578, 578, 578, 578, 578, 295: 578}, + // 175 + {577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 209: 577, 211: 577, 243: 577, 577, 577, 247: 577, 577, 577, 577, 577, 253: 577, 577, 577, 577, 258: 577, 577, 577, 263: 577, 577, 577, 577, 577, 274: 577, 577, 577, 577, 577, 577, 577, 577, 284: 577, 577, 577, 288: 577, 577, 577, 577, 577, 577, 295: 577}, + {576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 209: 576, 211: 576, 243: 576, 576, 576, 247: 576, 576, 576, 576, 576, 253: 576, 576, 576, 576, 258: 576, 576, 576, 263: 576, 576, 576, 576, 576, 274: 576, 576, 576, 576, 576, 576, 576, 576, 284: 576, 576, 576, 288: 576, 576, 576, 576, 576, 576, 295: 576}, + {575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 209: 575, 211: 575, 243: 575, 575, 575, 247: 575, 575, 575, 575, 575, 253: 575, 575, 575, 575, 258: 575, 575, 575, 263: 575, 575, 575, 575, 575, 274: 575, 575, 575, 575, 575, 575, 575, 575, 284: 575, 575, 575, 288: 575, 575, 575, 575, 575, 575, 295: 575}, + {574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 209: 574, 211: 574, 243: 574, 574, 574, 247: 574, 574, 574, 574, 574, 253: 574, 574, 574, 574, 258: 574, 574, 574, 263: 574, 574, 574, 574, 574, 274: 574, 574, 574, 574, 574, 574, 574, 574, 284: 574, 574, 574, 288: 574, 574, 574, 574, 574, 574, 295: 574}, + {573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 209: 573, 211: 573, 243: 573, 573, 573, 247: 573, 573, 573, 573, 573, 253: 573, 573, 573, 573, 258: 573, 573, 573, 263: 573, 573, 573, 573, 573, 274: 573, 573, 573, 573, 573, 573, 573, 573, 284: 573, 573, 573, 288: 573, 573, 573, 573, 573, 573, 295: 573}, + // 180 + {572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 209: 572, 211: 572, 243: 572, 572, 572, 247: 572, 572, 572, 572, 572, 253: 572, 572, 572, 572, 258: 572, 572, 572, 263: 572, 572, 572, 572, 572, 274: 572, 572, 572, 572, 572, 572, 572, 572, 284: 572, 572, 572, 288: 572, 572, 572, 572, 572, 572, 295: 572}, + {571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 209: 571, 211: 571, 243: 571, 571, 571, 247: 571, 571, 571, 571, 571, 253: 571, 571, 571, 571, 258: 571, 571, 571, 263: 571, 571, 571, 571, 571, 274: 571, 571, 571, 571, 571, 571, 571, 571, 284: 571, 571, 571, 288: 571, 571, 571, 571, 571, 571, 295: 571}, + {570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 209: 570, 211: 570, 243: 570, 570, 570, 247: 570, 570, 570, 570, 570, 253: 570, 570, 570, 570, 258: 570, 570, 570, 263: 570, 570, 570, 570, 570, 274: 570, 570, 570, 570, 570, 570, 570, 570, 284: 570, 570, 570, 288: 570, 570, 570, 570, 570, 570, 295: 570}, + {569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 209: 569, 211: 569, 243: 569, 569, 569, 247: 569, 569, 569, 569, 569, 253: 569, 569, 569, 569, 258: 569, 569, 569, 263: 569, 569, 569, 569, 569, 274: 569, 569, 569, 569, 569, 569, 569, 569, 284: 569, 569, 569, 288: 569, 569, 569, 569, 569, 569, 295: 569}, + {568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 209: 568, 211: 568, 243: 568, 568, 568, 247: 568, 568, 568, 568, 568, 253: 568, 568, 568, 568, 258: 568, 568, 568, 263: 568, 568, 568, 568, 568, 274: 568, 568, 568, 568, 568, 568, 568, 568, 284: 568, 568, 568, 288: 568, 568, 568, 568, 568, 568, 295: 568}, + // 185 + {567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 209: 567, 211: 567, 243: 567, 567, 567, 247: 567, 567, 567, 567, 567, 253: 567, 567, 567, 567, 258: 567, 567, 567, 263: 567, 567, 567, 567, 567, 274: 567, 567, 567, 567, 567, 567, 567, 567, 284: 567, 567, 567, 288: 567, 567, 567, 567, 567, 567, 295: 567}, + {566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 209: 566, 211: 566, 243: 566, 566, 566, 247: 566, 566, 566, 566, 566, 253: 566, 566, 566, 566, 258: 566, 566, 566, 263: 566, 566, 566, 566, 566, 274: 566, 566, 566, 566, 566, 566, 566, 566, 284: 566, 566, 566, 288: 566, 566, 566, 566, 566, 566, 295: 566}, + {565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 565, 209: 565, 211: 565, 243: 565, 565, 565, 247: 565, 565, 565, 565, 565, 253: 565, 565, 565, 565, 258: 565, 565, 565, 263: 565, 565, 565, 565, 565, 274: 565, 565, 565, 565, 565, 565, 565, 565, 284: 565, 565, 565, 288: 565, 565, 565, 565, 565, 565, 295: 565}, + {564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 209: 564, 211: 564, 243: 564, 564, 564, 247: 564, 564, 564, 564, 564, 253: 564, 564, 564, 564, 258: 564, 564, 564, 263: 564, 564, 564, 564, 564, 274: 564, 564, 564, 564, 564, 564, 564, 564, 284: 564, 564, 564, 288: 564, 564, 564, 564, 564, 564, 295: 564}, + {563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 209: 563, 211: 563, 243: 563, 563, 563, 247: 563, 563, 563, 563, 563, 253: 563, 563, 563, 563, 258: 563, 563, 563, 263: 563, 563, 563, 563, 563, 274: 563, 563, 563, 563, 563, 563, 563, 563, 284: 563, 563, 563, 288: 563, 563, 563, 563, 563, 563, 295: 563}, + // 190 + {562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 209: 562, 211: 562, 243: 562, 562, 562, 247: 562, 562, 562, 562, 562, 253: 562, 562, 562, 562, 258: 562, 562, 562, 263: 562, 562, 562, 562, 562, 274: 562, 562, 562, 562, 562, 562, 562, 562, 284: 562, 562, 562, 288: 562, 562, 562, 562, 562, 562, 295: 562}, + {561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 209: 561, 211: 561, 243: 561, 561, 561, 247: 561, 561, 561, 561, 561, 253: 561, 561, 561, 561, 258: 561, 561, 561, 263: 561, 561, 561, 561, 561, 274: 561, 561, 561, 561, 561, 561, 561, 561, 284: 561, 561, 561, 288: 561, 561, 561, 561, 561, 561, 295: 561}, + {560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 209: 560, 211: 560, 243: 560, 560, 560, 247: 560, 560, 560, 560, 560, 253: 560, 560, 560, 560, 258: 560, 560, 560, 263: 560, 560, 560, 560, 560, 274: 560, 560, 560, 560, 560, 560, 560, 560, 284: 560, 560, 560, 288: 560, 560, 560, 560, 560, 560, 295: 560}, + {559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 209: 559, 211: 559, 243: 559, 559, 559, 247: 559, 559, 559, 559, 559, 253: 559, 559, 559, 559, 258: 559, 559, 559, 263: 559, 559, 559, 559, 559, 274: 559, 559, 559, 559, 559, 559, 559, 559, 284: 559, 559, 559, 288: 559, 559, 559, 559, 559, 559, 295: 559}, + {558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 209: 558, 211: 558, 243: 558, 558, 558, 247: 558, 558, 558, 558, 558, 253: 558, 558, 558, 558, 258: 558, 558, 558, 263: 558, 558, 558, 558, 558, 274: 558, 558, 558, 558, 558, 558, 558, 558, 284: 558, 558, 558, 288: 558, 558, 558, 558, 558, 558, 295: 558}, + // 195 + {557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 209: 557, 211: 557, 243: 557, 557, 557, 247: 557, 557, 557, 557, 557, 253: 557, 557, 557, 557, 258: 557, 557, 557, 263: 557, 557, 557, 557, 557, 274: 557, 557, 557, 557, 557, 557, 557, 557, 284: 557, 557, 557, 288: 557, 557, 557, 557, 557, 557, 295: 557}, + {556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 209: 556, 211: 556, 243: 556, 556, 556, 247: 556, 556, 556, 556, 556, 253: 556, 556, 556, 556, 258: 556, 556, 556, 263: 556, 556, 556, 556, 556, 274: 556, 556, 556, 556, 556, 556, 556, 556, 284: 556, 556, 556, 288: 556, 556, 556, 556, 556, 556, 295: 556}, + {342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 130: 342, 132: 342, 342, 136: 342, 139: 342, 144: 342, 342, 342, 342, 342, 342, 342, 152: 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 342, 180: 342, 202: 342, 209: 342, 211: 1083, 243: 342, 248: 342, 250: 342, 258: 342, 295: 342}, + {2: 7, 7, 8: 1081}, + {250: 1078, 295: 1079, 503: 1077}, + // 200 + {2: 2, 2, 8: 2}, + {2: 6, 6, 8: 6}, + {2: 5, 5, 8: 5, 73: 1080}, + {2: 3, 3, 8: 3}, + {2: 4, 4, 8: 4}, + // 205 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 1075, 451: 1082}, + {2: 1, 1, 8: 1}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1084, 948, 947}, + {341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 130: 341, 132: 341, 341, 136: 341, 139: 341, 144: 341, 341, 341, 341, 341, 341, 341, 152: 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 341, 180: 341, 202: 341, 209: 341, 243: 341, 248: 341, 250: 341, 258: 341, 295: 341}, + {2: 8, 8}, + // 210 + {8: 1116, 130: 1115}, + {8: 32, 130: 32, 133: 1104}, + {8: 30, 130: 30}, + {8: 28, 130: 28, 133: 28}, + {8: 27, 130: 27, 133: 27}, + // 215 + {8: 26, 60: 1103, 130: 26, 133: 26}, + {8: 24, 130: 24, 133: 24}, + {8: 23, 130: 23, 133: 23}, + {8: 22, 130: 22, 133: 22}, + {8: 21, 130: 21, 133: 21}, + // 220 + {8: 20, 130: 20, 133: 20}, + {8: 19, 130: 19, 133: 19}, + {407: 1102}, + {8: 17, 130: 17, 133: 17}, + {509: 1101}, + // 225 + {8: 16, 130: 16, 133: 16}, + {8: 18, 130: 18, 133: 18}, + {8: 25, 130: 25, 133: 25}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 1106, 398: 1107}, + {844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 138: 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 211: 1111, 247: 844, 253: 844, 844, 256: 844, 259: 844, 844, 263: 844, 844, 844, 844, 844, 274: 844, 844, 844, 844, 844, 844, 844, 844, 284: 844, 844, 844, 288: 844, 844, 844, 844, 844, 844}, + // 230 + {7: 841, 841}, + {7: 1109, 1108}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 1110}, + {8: 31, 130: 31}, + {7: 840, 840}, + // 235 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1112, 948, 947}, + {843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 138: 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 211: 1113, 247: 843, 253: 843, 843, 256: 843, 259: 843, 843, 263: 843, 843, 843, 843, 843, 274: 843, 843, 843, 843, 843, 843, 843, 843, 284: 843, 843, 843, 288: 843, 843, 843, 843, 843, 843}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1114, 948, 947}, + {842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 138: 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 842, 247: 842, 253: 842, 842, 256: 842, 259: 842, 842, 263: 842, 842, 842, 842, 842, 274: 842, 842, 842, 842, 842, 842, 842, 842, 284: 842, 842, 842, 288: 842, 842, 842, 842, 842, 842}, + {15, 15, 4: 15, 15, 15, 9: 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 165: 15, 327: 1119, 506: 1118}, + // 240 + {24: 1094, 243: 1097, 245: 1095, 248: 1093, 305: 1089, 322: 1099, 329: 1092, 332: 1096, 343: 1091, 350: 1098, 355: 1090, 358: 1100, 441: 1117, 1087}, + {8: 29, 130: 29}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 165: 1121, 206: 1122, 948, 947, 516: 1120}, + {14, 14, 4: 14, 14, 14, 9: 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 165: 14}, + {255: 1128}, + // 245 + {211: 1126, 255: 13}, + {211: 1123, 255: 9}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 165: 1124, 206: 1125, 948, 947}, + {255: 11}, + {255: 10}, + // 250 + {165: 1127}, + {255: 12}, + {131: 1129, 354: 1130, 387: 1131, 457: 1132}, + {463: 1143}, + {2: 37, 37, 8: 37, 53: 1136, 464: 1135}, + // 255 + {2: 39, 39, 8: 39}, + {2: 33, 33, 8: 1133}, + {131: 1129, 354: 1130, 387: 1134}, + {2: 38, 38, 8: 38}, + {2: 40, 40, 8: 40}, + // 260 + {366: 1137}, + {10: 1140, 131: 1138, 392: 1139}, + {2: 234, 234, 7: 234, 234}, + {2: 36, 36, 8: 36}, + {131: 1142, 495: 1141}, + // 265 + {2: 35, 35, 8: 35}, + {2: 34, 34, 8: 34}, + {131: 1144}, + {2: 237, 237, 8: 237, 53: 237, 151: 237}, + {2: 793, 793, 6: 793, 136: 793, 148: 793, 793, 161: 793, 209: 793}, + // 270 + {2: 47, 47}, + {343, 343, 4: 343, 343, 343, 9: 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 133: 343, 146: 343, 313: 343, 318: 343}, + {694, 694, 4: 694, 694, 694, 9: 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 133: 694, 313: 1149, 318: 694, 359: 1150}, + {693, 693, 4: 693, 693, 693, 9: 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 693, 133: 693, 146: 693, 318: 693, 320: 693, 327: 693}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 1158, 206: 1073, 948, 947, 303: 1157, 318: 1154, 325: 1156, 1155, 328: 1153, 334: 1151, 342: 1152}, + // 275 + {2: 320, 320, 7: 320, 320, 130: 320, 139: 320, 144: 320, 320, 147: 320, 320, 150: 320, 152: 320, 320, 156: 320}, + {8: 1721, 153: 1756}, + {8: 318, 132: 1175, 153: 1729, 1177, 157: 1178, 1179, 1176, 344: 1173, 347: 1174}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1726, 948, 947}, + {2: 316, 316, 7: 316, 316, 130: 316, 132: 316, 139: 316, 144: 316, 316, 147: 316, 316, 150: 316, 152: 316, 316, 316, 156: 316, 316, 316, 316, 316}, + // 280 + {2: 315, 315, 7: 315, 315, 130: 315, 132: 315, 139: 315, 144: 315, 315, 147: 315, 315, 150: 315, 152: 315, 315, 315, 156: 315, 315, 315, 315, 315}, + {1005, 949, 310, 310, 950, 971, 957, 310, 310, 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 130: 310, 132: 310, 139: 310, 144: 310, 310, 147: 310, 310, 150: 310, 152: 310, 310, 310, 156: 310, 310, 310, 310, 310, 162: 1167, 206: 1166, 948, 947, 364: 1725, 536: 1724}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 1161, 206: 1073, 948, 947, 243: 899, 303: 1157, 307: 1162, 315: 902, 901, 1163, 1154, 325: 1156, 1155, 328: 1160, 334: 1151, 342: 1159}, + {7: 1722, 1721}, + {2: 318, 318, 7: 318, 318, 130: 318, 132: 1175, 139: 318, 144: 318, 318, 147: 318, 318, 150: 318, 152: 318, 318, 1177, 156: 318, 1178, 1179, 1176, 344: 1173, 347: 1174}, + // 285 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 1161, 206: 1073, 948, 947, 243: 899, 303: 1157, 307: 1171, 315: 902, 901, 1163, 1154, 325: 1156, 1155, 328: 1160, 334: 1151, 342: 1159}, + {7: 1169, 139: 272}, + {7: 1164}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 162: 1167, 206: 1166, 948, 947, 364: 1165}, + {2: 312, 312, 7: 312, 312, 130: 312, 132: 312, 139: 312, 144: 312, 312, 147: 312, 312, 150: 312, 152: 312, 312, 312, 156: 312, 312, 312, 312, 312}, + // 290 + {2: 308, 308, 7: 308, 308, 130: 308, 132: 308, 139: 308, 144: 308, 308, 147: 308, 308, 150: 308, 152: 308, 308, 308, 156: 308, 308, 308, 308, 308}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1168, 948, 947}, + {2: 307, 307, 7: 307, 307, 130: 307, 132: 307, 139: 307, 144: 307, 307, 147: 307, 307, 150: 307, 152: 307, 307, 307, 156: 307, 307, 307, 307, 307}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 162: 1167, 206: 1166, 948, 947, 364: 1170}, + {2: 313, 313, 7: 313, 313, 130: 313, 132: 313, 139: 313, 144: 313, 313, 147: 313, 313, 150: 313, 152: 313, 313, 313, 156: 313, 313, 313, 313, 313}, + // 295 + {7: 1172, 139: 272}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 139: 271, 162: 1167, 206: 1166, 948, 947, 364: 1170}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 1158, 206: 1073, 948, 947, 303: 1157, 325: 1156, 1155, 328: 1718}, + {154: 301, 378: 1183, 510: 1182}, + {154: 303, 378: 303}, + // 300 + {154: 302, 378: 302}, + {299, 299, 4: 299, 299, 299, 9: 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 299, 133: 299}, + {154: 1181}, + {154: 1180}, + {297, 297, 4: 297, 297, 297, 9: 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 297, 133: 297}, + // 305 + {298, 298, 4: 298, 298, 298, 9: 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 298, 133: 298}, + {154: 1184}, + {154: 300}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 1158, 206: 1073, 948, 947, 303: 1157, 325: 1156, 1155, 328: 1185}, + {130: 1186, 132: 1175, 154: 1177, 157: 1178, 1179, 1176, 344: 1173, 347: 1174}, + // 310 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1187, 1189}, + {2: 304, 304, 7: 304, 304, 130: 304, 132: 304, 138: 1303, 304, 1302, 1301, 1300, 1298, 304, 304, 147: 304, 304, 150: 304, 152: 304, 304, 304, 156: 304, 304, 304, 304, 304, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1717, 1189}, + {750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 130: 750, 750, 750, 138: 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 150: 750, 1704, 750, 750, 750, 750, 750, 750, 750, 750, 750, 162: 750, 750, 750, 166: 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 750, 181: 1701, 1699, 1698, 1696, 1700, 1702, 1703, 1705, 473: 1697}, + {737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 130: 737, 737, 737, 138: 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 150: 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 162: 737, 737, 737, 166: 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 737, 181: 737, 737, 737, 737, 737, 737, 737, 737}, + // 315 + {720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 1653, 720, 720, 720, 134: 1658, 1659, 138: 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 150: 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 715, 720, 720, 720, 1660, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 720, 715, 720, 720, 720, 720, 720, 720, 720, 720, 715, 715, 715, 1662, 1655, 1661, 1665, 1654, 198: 1663, 1656, 1664, 1657, 434: 1652}, + {677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 1648, 677, 677, 138: 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 677, 198: 677, 677, 677, 677, 211: 677}, + {666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 1645, 666, 666, 138: 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 666, 198: 666, 666, 666, 666, 211: 666}, + {631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 1642, 631, 631, 138: 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 631, 198: 631, 631, 631, 631, 211: 631}, + {629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 1639, 629, 629, 138: 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 629, 198: 629, 629, 629, 629, 211: 629}, + // 320 + {626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 1637, 626, 626, 138: 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 626, 198: 626, 626, 626, 626, 211: 626}, + {614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 1632, 614, 614, 138: 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 614, 198: 614, 614, 614, 614, 211: 614}, + {598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 1629, 598, 598, 138: 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 598, 198: 598, 598, 598, 598, 211: 598}, + {597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 413, 597, 597, 138: 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 597, 198: 597, 597, 597, 597, 211: 597}, + {595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 1626, 595, 595, 138: 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 595, 198: 595, 595, 595, 595, 211: 595}, + // 325 + {594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 1623, 594, 594, 138: 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 594, 198: 594, 594, 594, 594, 211: 594}, + {593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 1620, 593, 593, 138: 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 593, 198: 593, 593, 593, 593, 211: 593}, + {592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 1618, 592, 592, 138: 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 592, 198: 592, 592, 592, 592, 211: 592}, + {591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 1615, 591, 591, 138: 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 591, 198: 591, 591, 591, 591, 211: 591}, + {590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 1609, 590, 590, 138: 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 590, 198: 590, 590, 590, 590, 211: 590}, + // 330 + {589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 1606, 589, 589, 138: 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 589, 198: 589, 589, 589, 589, 211: 589}, + {588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 415, 588, 588, 138: 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 588, 198: 588, 588, 588, 588, 211: 588}, + {587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 414, 587, 587, 138: 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 587, 198: 587, 587, 587, 587, 211: 587}, + {586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 1603, 586, 586, 138: 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 586, 198: 586, 586, 586, 586, 211: 586}, + {585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 1600, 585, 585, 138: 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 585, 198: 585, 585, 585, 585, 211: 585}, + // 335 + {584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 1597, 584, 584, 138: 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 584, 198: 584, 584, 584, 584, 211: 584}, + {583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 1594, 583, 583, 138: 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 583, 198: 583, 583, 583, 583, 211: 583}, + {582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 1592, 582, 582, 138: 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, 198: 582, 582, 582, 582, 211: 582}, + {581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 1588, 581, 581, 138: 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 581, 198: 581, 581, 581, 581, 211: 581}, + {580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1585, 580, 580, 138: 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 198: 580, 580, 580, 580, 211: 580}, + // 340 + {579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 1582, 579, 579, 138: 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 579, 198: 579, 579, 579, 579, 211: 579}, + {578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 1579, 578, 578, 138: 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 578, 198: 578, 578, 578, 578, 211: 578}, + {577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 1571, 577, 577, 138: 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 577, 198: 577, 577, 577, 577, 211: 577}, + {576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 1567, 576, 576, 138: 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 576, 198: 576, 576, 576, 576, 211: 576}, + {575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 1564, 575, 575, 138: 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 575, 198: 575, 575, 575, 575, 211: 575}, + // 345 + {574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 1560, 574, 574, 138: 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 574, 198: 574, 574, 574, 574, 211: 574}, + {573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 1557, 573, 573, 138: 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 573, 198: 573, 573, 573, 573, 211: 573}, + {572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 1554, 572, 572, 138: 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 572, 198: 572, 572, 572, 572, 211: 572}, + {571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 1551, 571, 571, 138: 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 571, 198: 571, 571, 571, 571, 211: 571}, + {570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 1548, 570, 570, 138: 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 570, 198: 570, 570, 570, 570, 211: 570}, + // 350 + {569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 1543, 569, 569, 138: 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 569, 198: 569, 569, 569, 569, 211: 569}, + {568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 1538, 568, 568, 138: 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 568, 198: 568, 568, 568, 568, 211: 568}, + {567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 1535, 567, 567, 138: 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 567, 198: 567, 567, 567, 567, 211: 567}, + {566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 1532, 566, 566, 138: 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 566, 198: 566, 566, 566, 566, 211: 566}, + {564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 412, 564, 564, 138: 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 564, 198: 564, 564, 564, 564, 211: 564}, + // 355 + {563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 1518, 563, 563, 138: 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, 198: 563, 563, 563, 563, 211: 563}, + {562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 1511, 562, 562, 138: 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 562, 198: 562, 562, 562, 562, 211: 562}, + {561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 1504, 561, 561, 138: 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 561, 198: 561, 561, 561, 561, 211: 561}, + {560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 1487, 560, 560, 138: 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 198: 560, 560, 560, 560, 211: 560}, + {559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 481, 559, 559, 138: 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 559, 198: 559, 559, 559, 559, 211: 559}, + // 360 + {558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 1484, 558, 558, 138: 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, 198: 558, 558, 558, 558, 211: 558}, + {557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 1481, 557, 557, 138: 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 557, 198: 557, 557, 557, 557, 211: 557}, + {556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1478, 556, 556, 138: 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 198: 556, 556, 556, 556, 211: 556}, + {529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 134: 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 529, 198: 529, 529, 529, 529, 203: 529, 529, 529}, + {528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 134: 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 528, 198: 528, 528, 528, 528, 203: 528, 528, 528}, + // 365 + {527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 134: 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 527, 198: 527, 527, 527, 527, 203: 527, 527, 527}, + {526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 134: 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 526, 198: 526, 526, 526, 526, 203: 526, 526, 526}, + {525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 134: 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 525, 198: 525, 525, 525, 525, 203: 525, 525, 525}, + {524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 134: 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 524, 198: 524, 524, 524, 524, 203: 524, 524, 524}, + {131: 1477}, + // 370 + {522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 134: 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 522, 198: 522, 522, 522, 522, 203: 522, 522, 522}, + {521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 134: 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 198: 521, 521, 521, 521, 203: 521, 521, 521}, + {520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 134: 520, 520, 138: 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 198: 520, 520, 520, 520}, + {519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 134: 519, 519, 138: 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 519, 198: 519, 519, 519, 519}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1470, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 899, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1469, 1189, 307: 1459, 315: 902, 901, 1460}, + // 375 + {517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 1466, 517, 517, 138: 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, 198: 517, 517, 517, 517}, + {515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 134: 515, 515, 138: 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 515, 198: 515, 515, 515, 515}, + {514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 134: 514, 514, 138: 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 198: 514, 514, 514, 514}, + {133: 1458, 246: 1457}, + {501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 134: 501, 501, 138: 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 501, 198: 501, 501, 501, 501}, + // 380 + {500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 134: 500, 500, 138: 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 198: 500, 500, 500, 500}, + {499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 134: 499, 499, 138: 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 499, 198: 499, 499, 499, 499}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1456, 287: 1291, 294: 1252}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1455, 287: 1291, 294: 1252}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1454, 287: 1291, 294: 1252}, + // 385 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1453, 287: 1291, 294: 1252}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1452, 287: 1291, 294: 1252}, + {349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 134: 349, 349, 138: 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 1450, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 349, 198: 349, 349, 349, 349}, + {492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 134: 492, 492, 138: 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 492, 198: 492, 492, 492, 492}, + {491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 134: 491, 491, 138: 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 491, 198: 491, 491, 491, 491}, + // 390 + {490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 134: 490, 490, 138: 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 490, 198: 490, 490, 490, 490}, + {489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 134: 489, 489, 138: 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 489, 198: 489, 489, 489, 489}, + {133: 488}, + {133: 487}, + {133: 486}, + // 395 + {133: 485}, + {133: 484}, + {479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 483, 479, 479, 138: 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 198: 479, 479, 479, 479}, + {478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 482, 478, 478, 138: 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 478, 198: 478, 478, 478, 478}, + {133: 1443}, + // 400 + {133: 1438}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 164: 376, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1309, 1189, 346: 1426}, + {133: 1379}, + {133: 1376}, + {133: 1374}, + // 405 + {399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 1369, 399, 399, 138: 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 198: 399, 399, 399, 399, 423: 1373}, + {399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 1369, 399, 399, 138: 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 399, 198: 399, 399, 399, 399, 423: 1368}, + {133: 1361}, + {133: 1352}, + {133: 1327}, + // 410 + {133: 1324}, + {133: 1317}, + {133: 1312}, + {133: 1308}, + {133: 1295}, + // 415 + {241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 134: 241, 241, 138: 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 241, 198: 241, 241, 241, 241}, + {240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 134: 240, 240, 138: 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 240, 198: 240, 240, 240, 240}, + {239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 134: 239, 239, 138: 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 239, 198: 239, 239, 239, 239}, + {238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 134: 238, 238, 138: 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 238, 198: 238, 238, 238, 238}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1296, 1189}, + // 420 + {7: 1304, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1307, 1189}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1306, 1189}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1305, 1189}, + {749, 749, 4: 749, 749, 749, 9: 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 131: 749, 749, 749, 749, 749, 749, 749, 197: 749, 202: 749, 210: 749, 212: 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749, 749}, + // 425 + {748, 748, 4: 748, 748, 748, 9: 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 131: 748, 748, 748, 748, 748, 748, 748, 197: 748, 202: 748, 210: 748, 212: 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748, 748}, + {747, 747, 4: 747, 747, 747, 9: 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 131: 747, 747, 747, 747, 747, 747, 747, 197: 747, 202: 747, 210: 747, 212: 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747, 747}, + {746, 746, 4: 746, 746, 746, 9: 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 131: 746, 746, 746, 746, 746, 746, 746, 197: 746, 202: 746, 210: 746, 212: 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746, 746}, + {420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 134: 420, 420, 138: 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 198: 420, 420, 420, 420}, + {755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 130: 755, 755, 755, 138: 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 150: 755, 152: 755, 755, 755, 755, 755, 755, 755, 755, 755, 162: 755, 755, 755, 166: 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 755, 300: 1299, 1297}, + // 430 + {756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 130: 756, 756, 756, 138: 1303, 756, 1302, 756, 756, 756, 756, 756, 756, 756, 756, 150: 756, 152: 756, 756, 756, 756, 756, 756, 756, 756, 756, 162: 756, 756, 756, 166: 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 756, 300: 1299, 1297}, + {757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 130: 757, 757, 757, 138: 1303, 757, 1302, 757, 757, 1298, 757, 757, 757, 757, 757, 150: 757, 152: 757, 757, 757, 757, 757, 757, 757, 757, 757, 162: 757, 757, 757, 166: 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 757, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 376, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1309, 1189, 346: 1310}, + {7: 375, 138: 1303, 140: 1302, 1301, 1300, 1298, 164: 375, 300: 1299, 1297}, + {7: 1311}, + // 435 + {425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 134: 425, 425, 138: 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 425, 198: 425, 425, 425, 425}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1313, 1189}, + {8: 1314, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1315, 1189}, + {7: 1316, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + // 440 + {431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 134: 431, 431, 138: 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 431, 198: 431, 431, 431, 431}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1318, 1189}, + {8: 1319, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1320, 1189}, + {8: 1321, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + // 445 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1322, 1189}, + {7: 1323, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 134: 433, 433, 138: 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 433, 198: 433, 433, 433, 433}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1325, 1189}, + {7: 1326, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + // 450 + {442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 134: 442, 442, 138: 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 442, 198: 442, 442, 442, 442}, + {26: 1337, 30: 1333, 32: 1332, 34: 1329, 1331, 1335, 38: 1336, 1330, 43: 1334, 168: 1347, 1344, 1346, 1345, 1341, 1343, 1342, 1339, 1340, 1338, 1348, 384: 1328}, + {146: 1349}, + {7: 396, 146: 396}, + {7: 395, 146: 395}, + // 455 + {7: 394, 146: 394}, + {7: 393, 146: 393}, + {7: 392, 146: 392}, + {7: 391, 146: 391}, + {7: 390, 146: 390}, + // 460 + {7: 389, 146: 389}, + {7: 388, 146: 388}, + {7: 387, 146: 387}, + {7: 386, 146: 386}, + {7: 385, 146: 385}, + // 465 + {7: 384, 146: 384}, + {7: 383, 146: 383}, + {7: 382, 146: 382}, + {7: 381, 146: 381}, + {7: 380, 146: 380}, + // 470 + {7: 379, 146: 379}, + {7: 378, 146: 378}, + {7: 377, 146: 377}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1350, 1189}, + {7: 1351, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + // 475 + {449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 134: 449, 449, 138: 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 449, 198: 449, 449, 449, 449}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1353, 1189}, + {8: 1354, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1355, 1189, 427: 1357, 479: 1356}, + {7: 411, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + // 480 + {7: 1360}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1358, 1189}, + {26: 1337, 30: 1333, 32: 1332, 34: 1329, 1331, 1335, 38: 1336, 1330, 43: 1334, 138: 1303, 140: 1302, 1301, 1300, 1298, 168: 1347, 1344, 1346, 1345, 1341, 1343, 1342, 1339, 1340, 1338, 1348, 300: 1299, 1297, 384: 1359}, + {7: 410}, + {450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 134: 450, 450, 138: 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 450, 198: 450, 450, 450, 450}, + // 485 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1362, 1189}, + {8: 1363, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {427: 1364}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1365, 1189}, + {26: 1337, 30: 1333, 32: 1332, 34: 1329, 1331, 1335, 38: 1336, 1330, 43: 1334, 138: 1303, 140: 1302, 1301, 1300, 1298, 168: 1347, 1344, 1346, 1345, 1341, 1343, 1342, 1339, 1340, 1338, 1348, 300: 1299, 1297, 384: 1366}, + // 490 + {7: 1367}, + {451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 134: 451, 451, 138: 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 451, 198: 451, 451, 451, 451}, + {460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 134: 460, 460, 138: 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 198: 460, 460, 460, 460}, + {1005, 949, 4: 950, 971, 957, 1371, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1370, 1189}, + {7: 1372, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + // 495 + {398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 134: 398, 398, 138: 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, 198: 398, 398, 398, 398}, + {397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 134: 397, 397, 138: 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 397, 198: 397, 397, 397, 397}, + {461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 134: 461, 461, 138: 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 198: 461, 461, 461, 461}, + {7: 1375}, + {463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 134: 463, 463, 138: 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 463, 198: 463, 463, 463, 463}, + // 500 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 1377}, + {7: 1378}, + {467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 134: 467, 467, 138: 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 198: 467, 467, 467, 467}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1380, 1189}, + {8: 1382, 138: 1303, 140: 1302, 1301, 1300, 1298, 155: 1381, 300: 1299, 1297}, + // 505 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 131: 1420, 206: 1421, 948, 947, 321: 1424}, + {28: 1387, 1386, 40: 1389, 57: 1390, 197: 1384, 247: 1385, 253: 1388, 302: 1391, 395: 1383}, + {7: 1423}, + {7: 71, 133: 1396, 306: 1397, 312: 1422}, + {6: 71, 71, 133: 1396, 197: 71, 209: 71, 306: 1397, 312: 1411}, + // 510 + {7: 367}, + {7: 71, 133: 1396, 306: 1397, 312: 1410}, + {7: 65, 133: 1403, 306: 1404, 375: 1402, 379: 1405}, + {7: 71, 133: 1396, 306: 1397, 312: 1395}, + {7: 105, 254: 1393, 437: 1394}, + // 515 + {7: 105, 254: 1393, 437: 1392}, + {7: 362}, + {7: 104}, + {7: 363}, + {7: 364}, + // 520 + {210: 1399, 310: 1400, 1398}, + {70, 70, 70, 70, 70, 70, 70, 70, 70, 129: 70, 70, 136: 70, 70, 149: 70, 163: 70, 166: 70, 197: 70, 203: 70, 70, 70, 209: 70, 302: 70, 304: 70}, + {759, 759, 759, 759, 6: 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 759, 37: 759, 130: 759, 136: 759, 139: 759, 144: 759, 147: 759, 149: 759, 209: 759}, + {758, 758, 758, 758, 6: 758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 758, 37: 758, 130: 758, 136: 758, 139: 758, 144: 758, 147: 758, 149: 758, 209: 758}, + {7: 1401}, + // 525 + {72, 72, 72, 72, 72, 72, 72, 72, 72, 129: 72, 72, 136: 72, 72, 149: 72, 163: 72, 166: 72, 197: 72, 203: 72, 72, 72, 209: 72, 302: 72, 304: 72}, + {7: 365}, + {210: 1399, 310: 1406, 1398}, + {64, 64, 64, 64, 64, 64, 7: 64, 64, 129: 64, 64, 136: 64, 64, 203: 64, 64, 64, 302: 64, 304: 64}, + {63, 63, 63, 63, 63, 63, 7: 63, 63, 129: 63, 63, 136: 63, 63, 203: 63, 63, 63, 302: 63, 304: 63}, + // 530 + {7: 1401, 1407}, + {210: 1399, 310: 1408, 1398}, + {7: 1409}, + {62, 62, 62, 62, 62, 62, 7: 62, 62, 129: 62, 62, 136: 62, 62, 203: 62, 62, 62, 302: 62, 304: 62}, + {7: 366}, + // 535 + {6: 61, 61, 197: 1413, 209: 61, 348: 1412}, + {6: 1417, 59, 209: 1416, 323: 1415, 336: 1414}, + {60, 60, 60, 60, 60, 60, 60, 60, 60, 129: 60, 60, 136: 60, 60, 149: 60, 203: 60, 60, 60, 209: 60}, + {7: 368}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 131: 1420, 206: 1421, 948, 947, 321: 1419}, + // 540 + {153: 1418}, + {56, 56, 4: 56, 56, 56, 9: 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 131: 56, 151: 56}, + {57, 57, 4: 57, 57, 57, 9: 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 131: 57, 151: 57}, + {58, 58, 58, 58, 58, 58, 7: 58, 58, 129: 58, 58, 136: 58, 58, 149: 58, 203: 58, 58, 58}, + {51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 134: 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 198: 51, 51, 51, 51, 203: 51, 51, 51, 209: 51}, + // 545 + {50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 134: 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 198: 50, 50, 50, 50, 203: 50, 50, 50, 209: 50}, + {7: 369}, + {470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 134: 470, 470, 138: 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 470, 198: 470, 470, 470, 470}, + {7: 1425}, + {471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 134: 471, 471, 138: 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 471, 198: 471, 471, 471, 471}, + // 550 + {164: 1429, 460: 1428, 548: 1427}, + {20: 371, 164: 1429, 167: 1435, 460: 1434, 484: 1433}, + {20: 374, 164: 374, 167: 374}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1430, 1189}, + {138: 1303, 140: 1302, 1301, 1300, 1298, 179: 1431, 300: 1299, 1297}, + // 555 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1432, 1189}, + {20: 372, 138: 1303, 140: 1302, 1301, 1300, 1298, 164: 372, 167: 372, 300: 1299, 1297}, + {20: 1437}, + {20: 373, 164: 373, 167: 373}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1436, 1189}, + // 560 + {20: 370, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 134: 472, 472, 138: 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 472, 198: 472, 472, 472, 472}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1439, 1189}, + {138: 1303, 140: 1302, 1301, 1300, 1298, 162: 1440, 300: 1299, 1297}, + {28: 1387, 1386, 40: 1389, 57: 1390, 197: 1384, 247: 1385, 253: 1388, 302: 1391, 395: 1441}, + // 565 + {7: 1442}, + {473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 134: 473, 473, 138: 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 198: 473, 473, 473, 473}, + {1005, 949, 4: 950, 971, 957, 742, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 309: 1445, 486: 1446}, + {2: 744, 744, 7: 744, 744, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {7: 741, 1448}, + // 570 + {7: 1447}, + {480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 134: 480, 480, 138: 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 198: 480, 480, 480, 480}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1449, 1189}, + {2: 743, 743, 7: 743, 743, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 131: 1420, 206: 1421, 948, 947, 321: 1451}, + // 575 + {493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 134: 493, 493, 138: 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 493, 198: 493, 493, 493, 493}, + {494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 134: 494, 494, 138: 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 1450, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 494, 198: 494, 494, 494, 494}, + {495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 134: 495, 495, 138: 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 1450, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 495, 198: 495, 495, 495, 495}, + {496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 134: 496, 496, 138: 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 1450, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 496, 198: 496, 496, 496, 496}, + {497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 134: 497, 497, 138: 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 1450, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 497, 198: 497, 497, 497, 497}, + // 580 + {498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 134: 498, 498, 138: 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 1450, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 498, 198: 498, 498, 498, 498}, + {511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 134: 511, 511, 138: 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 198: 511, 511, 511, 511}, + {133: 1461, 243: 899, 307: 1459, 315: 902, 901, 1460}, + {7: 1465, 139: 272}, + {7: 1464}, + // 585 + {243: 899, 307: 1462}, + {7: 1463}, + {139: 271}, + {280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 134: 280, 280, 138: 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 280, 198: 280, 280, 280, 280}, + {281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 134: 281, 281, 138: 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 198: 281, 281, 281, 281}, + // 590 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 1467}, + {7: 1468}, + {516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 134: 516, 516, 138: 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 516, 198: 516, 516, 516, 516}, + {7: 1473, 1474, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1470, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 899, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1469, 1189, 307: 1471, 315: 902, 901, 1460}, + // 595 + {7: 1472, 139: 272}, + {2: 281, 281, 7: 281, 281, 129: 281, 134: 281, 281, 138: 281, 271, 281, 281, 281, 281, 149: 281, 151: 281, 161: 281, 165: 281, 180: 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 281, 198: 281, 281, 281, 281}, + {518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 134: 518, 518, 138: 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 518, 198: 518, 518, 518, 518}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 309: 1475}, + {7: 1476, 1448}, + // 600 + {512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 134: 512, 512, 138: 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 198: 512, 512, 512, 512}, + {523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 134: 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 198: 523, 523, 523, 523, 203: 523, 523, 523}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 309: 1479}, + {7: 1480, 1448}, + {417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 134: 417, 417, 138: 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, 198: 417, 417, 417, 417}, + // 605 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1482, 1189}, + {7: 1483, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 134: 418, 418, 138: 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 418, 198: 418, 418, 418, 418}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1485, 1189}, + {7: 1486, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + // 610 + {419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 134: 419, 419, 138: 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 198: 419, 419, 419, 419}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1488, 1189, 467: 1490, 501: 1491, 542: 1492, 1489}, + {7: 1500, 138: 1303, 140: 1302, 1301, 1300, 1298, 146: 1501, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 146: 1494, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1493, 1189}, + {409, 409, 4: 409, 409, 409, 9: 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 131: 409, 409, 409, 409, 409, 409, 409, 146: 409, 197: 409, 202: 409, 210: 409, 212: 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409, 409}, + // 615 + {408, 408, 4: 408, 408, 408, 9: 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 131: 408, 408, 408, 408, 408, 408, 408, 146: 408, 197: 408, 202: 408, 210: 408, 212: 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408, 408}, + {407, 407, 4: 407, 407, 407, 9: 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 131: 407, 407, 407, 407, 407, 407, 407, 146: 407, 197: 407, 202: 407, 210: 407, 212: 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407, 407}, + {138: 1303, 140: 1302, 1301, 1300, 1298, 146: 1497, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1495, 1189}, + {7: 1496, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + // 620 + {422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 134: 422, 422, 138: 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 422, 198: 422, 422, 422, 422}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1498, 1189}, + {7: 1499, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 134: 421, 421, 138: 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 421, 198: 421, 421, 421, 421}, + {424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 134: 424, 424, 138: 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 424, 198: 424, 424, 424, 424}, + // 625 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1502, 1189}, + {7: 1503, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 134: 423, 423, 138: 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 198: 423, 423, 423, 423}, + {477, 477, 4: 477, 477, 477, 9: 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 131: 477, 477, 477, 477, 477, 477, 477, 197: 477, 202: 477, 210: 477, 212: 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 305: 1505, 330: 1506, 339: 1507}, + {476, 476, 4: 476, 476, 476, 9: 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 131: 476, 476, 476, 476, 476, 476, 476, 165: 476, 197: 476, 202: 476, 210: 476, 212: 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476}, + // 630 + {475, 475, 4: 475, 475, 475, 9: 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 131: 475, 475, 475, 475, 475, 475, 475, 165: 475, 197: 475, 202: 475, 210: 475, 212: 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 475, 305: 1510}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1508, 1189}, + {7: 1509, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 134: 400, 400, 138: 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 400, 198: 400, 400, 400, 400}, + {474, 474, 4: 474, 474, 474, 9: 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 131: 474, 474, 474, 474, 474, 474, 474, 165: 474, 197: 474, 202: 474, 210: 474, 212: 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474, 474}, + // 635 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1512, 1189}, + {8: 1513, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1514, 1189}, + {8: 1515, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1516, 1189}, + // 640 + {7: 1517, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 134: 426, 426, 138: 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 426, 198: 426, 426, 426, 426}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1519, 1189}, + {8: 1520, 138: 1303, 140: 1302, 1301, 1300, 1298, 146: 1521, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1527, 1189}, + // 645 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1522, 1189}, + {7: 1523, 138: 1303, 140: 1302, 1301, 1300, 1298, 1524, 300: 1299, 1297}, + {429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 134: 429, 429, 138: 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 198: 429, 429, 429, 429}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1525, 1189}, + {7: 1526, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + // 650 + {427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 134: 427, 427, 138: 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 427, 198: 427, 427, 427, 427}, + {7: 1528, 1529, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 134: 430, 430, 138: 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 198: 430, 430, 430, 430}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1530, 1189}, + {7: 1531, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + // 655 + {428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 134: 428, 428, 138: 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 428, 198: 428, 428, 428, 428}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1533, 1189}, + {7: 1534, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 134: 432, 432, 138: 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 432, 198: 432, 432, 432, 432}, + {1005, 949, 4: 950, 971, 957, 376, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1309, 1189, 346: 1536}, + // 660 + {7: 1537}, + {434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 134: 434, 434, 138: 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 434, 198: 434, 434, 434, 434}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1539, 1189}, + {8: 1540, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1541, 1189}, + // 665 + {7: 1542, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 134: 435, 435, 138: 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 435, 198: 435, 435, 435, 435}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1544, 1189}, + {8: 1545, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1546, 1189}, + // 670 + {7: 1547, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 134: 436, 436, 138: 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, 198: 436, 436, 436, 436}, + {1005, 949, 4: 950, 971, 957, 376, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1309, 1189, 346: 1549}, + {7: 1550}, + {438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 134: 438, 438, 138: 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 438, 198: 438, 438, 438, 438}, + // 675 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1552, 1189}, + {7: 1553, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 134: 439, 439, 138: 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 439, 198: 439, 439, 439, 439}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 309: 1555}, + {7: 1556, 1448}, + // 680 + {437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 134: 437, 437, 138: 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 437, 198: 437, 437, 437, 437}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1558, 1189}, + {7: 1559, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 134: 440, 440, 138: 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 440, 198: 440, 440, 440, 440}, + {477, 477, 4: 477, 477, 477, 9: 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 131: 477, 477, 477, 477, 477, 477, 477, 197: 477, 202: 477, 210: 477, 212: 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 305: 1505, 330: 1506, 339: 1561}, + // 685 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1562, 1189}, + {7: 1563, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 134: 401, 401, 138: 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 401, 198: 401, 401, 401, 401}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1565, 1189}, + {7: 1566, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + // 690 + {441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 134: 441, 441, 138: 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 441, 198: 441, 441, 441, 441}, + {477, 477, 4: 477, 477, 477, 9: 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 131: 477, 477, 477, 477, 477, 477, 477, 197: 477, 202: 477, 210: 477, 212: 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 305: 1505, 330: 1506, 339: 1568}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1569, 1189}, + {7: 1570, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 134: 402, 402, 138: 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 402, 198: 402, 402, 402, 402}, + // 695 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1572, 1189}, + {8: 1573, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1574, 1189}, + {7: 1575, 1576, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 134: 444, 444, 138: 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 444, 198: 444, 444, 444, 444}, + // 700 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1577, 1189}, + {7: 1578, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 134: 443, 443, 138: 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 198: 443, 443, 443, 443}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1580, 1189}, + {7: 1581, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + // 705 + {445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 134: 445, 445, 138: 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 445, 198: 445, 445, 445, 445}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 309: 1583}, + {7: 1584, 1448}, + {446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 134: 446, 446, 138: 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 446, 198: 446, 446, 446, 446}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1586, 1189}, + // 710 + {7: 1587, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 134: 447, 447, 138: 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 447, 198: 447, 447, 447, 447}, + {477, 477, 4: 477, 477, 477, 9: 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 131: 477, 477, 477, 477, 477, 477, 477, 197: 477, 202: 477, 210: 477, 212: 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 305: 1505, 330: 1506, 339: 1589}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 309: 1590}, + {7: 1591, 1448}, + // 715 + {403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 134: 403, 403, 138: 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 403, 198: 403, 403, 403, 403}, + {7: 1593}, + {448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 134: 448, 448, 138: 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 448, 198: 448, 448, 448, 448}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1595, 1189}, + {7: 1596, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + // 720 + {452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 134: 452, 452, 138: 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 198: 452, 452, 452, 452}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1598, 1189}, + {7: 1599, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 134: 454, 454, 138: 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 454, 198: 454, 454, 454, 454}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1601, 1189}, + // 725 + {7: 1602, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 134: 453, 453, 138: 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 453, 198: 453, 453, 453, 453}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1604, 1189}, + {7: 1605, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 134: 455, 455, 138: 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 455, 198: 455, 455, 455, 455}, + // 730 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1607, 1189}, + {7: 1608, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 134: 456, 456, 138: 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 198: 456, 456, 456, 456}, + {477, 477, 4: 477, 477, 477, 9: 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 131: 477, 477, 477, 477, 477, 477, 477, 165: 477, 197: 477, 202: 477, 210: 477, 212: 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 305: 1505, 330: 1506, 339: 1610}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 165: 1612, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 309: 1611}, + // 735 + {7: 1614, 1448}, + {7: 1613}, + {404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 134: 404, 404, 138: 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 404, 198: 404, 404, 404, 404}, + {405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 134: 405, 405, 138: 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 405, 198: 405, 405, 405, 405}, + {1005, 949, 4: 950, 971, 957, 376, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1309, 1189, 346: 1616}, + // 740 + {7: 1617}, + {462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 134: 462, 462, 138: 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 198: 462, 462, 462, 462}, + {7: 1619}, + {416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 134: 416, 416, 138: 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 198: 416, 416, 416, 416}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 309: 1621}, + // 745 + {7: 1622, 1448}, + {457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 134: 457, 457, 138: 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 198: 457, 457, 457, 457}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 309: 1624}, + {7: 1625, 1448}, + {458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 134: 458, 458, 138: 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 198: 458, 458, 458, 458}, + // 750 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 309: 1627}, + {7: 1628, 1448}, + {464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 134: 464, 464, 138: 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 198: 464, 464, 464, 464}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1630, 1189}, + {7: 1631, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + // 755 + {459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 134: 459, 459, 138: 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 198: 459, 459, 459, 459}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1633, 1189}, + {8: 1634, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 309: 1635}, + {7: 1636, 1448}, + // 760 + {513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 134: 513, 513, 138: 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 198: 513, 513, 513, 513}, + {7: 1638}, + {468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 134: 468, 468, 138: 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 468, 198: 468, 468, 468, 468}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 309: 1640}, + {7: 1641, 1448}, + // 765 + {466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 134: 466, 466, 138: 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 198: 466, 466, 466, 466}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1643, 1189}, + {7: 1644, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 134: 465, 465, 138: 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 198: 465, 465, 465, 465}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1646, 1189}, + // 770 + {7: 1647, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 134: 469, 469, 138: 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 469, 198: 469, 469, 469, 469}, + {477, 477, 4: 477, 477, 477, 9: 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 131: 477, 477, 477, 477, 477, 477, 477, 197: 477, 202: 477, 210: 477, 212: 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 477, 305: 1505, 330: 1506, 339: 1649}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 309: 1650}, + {7: 1651, 1448}, + // 775 + {406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 134: 406, 406, 138: 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 406, 198: 406, 406, 406, 406}, + {161: 1680, 180: 1678, 189: 1679, 1682, 1683, 521: 1681}, + {41: 714, 137: 714, 161: 714, 180: 714, 189: 714, 714, 714, 215: 714, 714}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1677}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1676}, + // 780 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1675}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1674}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1673}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1672}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1671}, + // 785 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1670}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1669}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1668}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1667}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1666}, + // 790 + {350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 134: 350, 350, 138: 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 150: 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 198: 350, 350, 350, 350}, + {351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 134: 351, 351, 138: 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 150: 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 351, 1665, 351, 198: 351, 351, 351, 351}, + {352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 134: 352, 352, 138: 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 150: 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 352, 1665, 352, 198: 352, 352, 352, 352}, + {353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 134: 353, 353, 138: 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 150: 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 353, 1665, 353, 198: 353, 353, 353, 353}, + {354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 134: 354, 354, 138: 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 150: 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 354, 1665, 354, 198: 354, 354, 354, 354}, + // 795 + {355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 134: 355, 355, 138: 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 150: 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 355, 1665, 355, 198: 355, 355, 355, 355}, + {356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 134: 356, 356, 138: 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 150: 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 1660, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, 1662, 356, 1661, 1665, 356, 198: 1663, 356, 1664, 356}, + {357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 134: 357, 357, 138: 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 150: 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 1660, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 357, 1662, 357, 1661, 1665, 357, 198: 1663, 357, 1664, 357}, + {358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 134: 1658, 1659, 138: 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 150: 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 1660, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 358, 1662, 358, 1661, 1665, 358, 198: 1663, 358, 1664, 358}, + {359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 134: 1658, 1659, 138: 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 150: 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 1660, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 359, 1662, 359, 1661, 1665, 359, 198: 1663, 359, 1664, 359}, + // 800 + {360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 134: 1658, 1659, 138: 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 150: 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 1660, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 360, 1662, 360, 1661, 1665, 360, 198: 1663, 1656, 1664, 1657}, + {361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 134: 1658, 1659, 138: 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 150: 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 1660, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 361, 1662, 1655, 1661, 1665, 361, 198: 1663, 1656, 1664, 1657}, + {133: 1692, 246: 1693}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1689}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1685, 287: 1291, 294: 1252}, + // 805 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1684, 287: 1291, 294: 1252}, + {719, 719, 4: 719, 719, 719, 9: 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 131: 719, 719, 719, 719, 719, 719, 719, 197: 719, 202: 719, 210: 719, 212: 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, 719}, + {718, 718, 4: 718, 718, 718, 9: 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 131: 718, 718, 718, 718, 718, 718, 718, 197: 718, 202: 718, 210: 718, 212: 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718, 718}, + {721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 130: 721, 721, 721, 138: 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 1450, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 162: 721, 721, 721, 166: 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 721, 181: 721, 721, 721, 721, 721, 721, 721, 721}, + {717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 1687, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 130: 717, 717, 717, 138: 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 1450, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 162: 717, 717, 717, 166: 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 717, 181: 717, 717, 717, 717, 717, 717, 717, 717, 502: 1686}, + // 810 + {722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 130: 722, 722, 722, 138: 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 150: 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 162: 722, 722, 722, 166: 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 722, 181: 722, 722, 722, 722, 722, 722, 722, 722}, + {131: 1688}, + {716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 130: 716, 716, 716, 138: 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 150: 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 162: 716, 716, 716, 166: 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, 181: 716, 716, 716, 716, 716, 716, 716, 716}, + {134: 1658, 1659, 138: 1690, 165: 1660, 192: 1662, 1655, 1661, 1665, 1654, 198: 1663, 1656, 1664, 1657}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1691}, + // 815 + {723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 130: 723, 723, 723, 138: 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 150: 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 162: 723, 723, 723, 166: 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, 181: 723, 723, 723, 723, 723, 723, 723, 723}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1470, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 899, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 307: 1459, 309: 1694, 315: 902, 901, 1460}, + {724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 130: 724, 724, 724, 138: 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 150: 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 162: 724, 724, 724, 166: 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 724, 181: 724, 724, 724, 724, 724, 724, 724, 724}, + {7: 1695, 1448}, + {725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 130: 725, 725, 725, 138: 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 150: 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 162: 725, 725, 725, 166: 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 725, 181: 725, 725, 725, 725, 725, 725, 725, 725}, + // 820 + {41: 715, 129: 1653, 137: 715, 215: 715, 715, 434: 1712}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1708, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1709, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1706, 305: 1710, 462: 1707}, + {736, 736, 4: 736, 736, 736, 9: 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 131: 736, 736, 736, 736, 736, 736, 736, 197: 736, 202: 736, 210: 736, 212: 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 736, 305: 736}, + {735, 735, 4: 735, 735, 735, 9: 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 131: 735, 735, 735, 735, 735, 735, 735, 197: 735, 202: 735, 210: 735, 212: 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 735, 305: 735}, + {734, 734, 4: 734, 734, 734, 9: 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 131: 734, 734, 734, 734, 734, 734, 734, 197: 734, 202: 734, 210: 734, 212: 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 734, 305: 734}, + // 825 + {733, 733, 4: 733, 733, 733, 9: 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 131: 733, 733, 733, 733, 733, 733, 733, 197: 733, 202: 733, 210: 733, 212: 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 733, 305: 733}, + {732, 732, 4: 732, 732, 732, 9: 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 131: 732, 732, 732, 732, 732, 732, 732, 197: 732, 202: 732, 210: 732, 212: 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 732, 305: 732}, + {731, 731, 4: 731, 731, 731, 9: 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 131: 731, 731, 731, 731, 731, 731, 731, 197: 731, 202: 731, 210: 731, 212: 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 731, 305: 731}, + {730, 730, 4: 730, 730, 730, 9: 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 131: 730, 730, 730, 730, 730, 730, 730, 197: 730, 202: 730, 210: 730, 212: 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 730, 305: 730}, + {729, 729, 4: 729, 729, 729, 9: 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 131: 729, 729, 729, 729, 729, 729, 729, 197: 729, 202: 729, 210: 729, 212: 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 729, 305: 729}, + // 830 + {739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 130: 739, 739, 739, 138: 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 150: 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 162: 739, 739, 739, 166: 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 739, 181: 739, 739, 739, 739, 739, 739, 739, 739}, + {133: 1458, 246: 1711}, + {628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 728, 628, 628, 138: 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 628, 198: 628, 628, 628, 628, 211: 628}, + {627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 727, 627, 627, 138: 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 627, 198: 627, 627, 627, 627, 211: 627}, + {133: 726}, + // 835 + {738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 130: 738, 738, 738, 138: 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 150: 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 162: 738, 738, 738, 166: 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 738, 181: 738, 738, 738, 738, 738, 738, 738, 738}, + {41: 1715, 137: 1716, 215: 1714, 1713}, + {753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 130: 753, 753, 753, 138: 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 150: 753, 152: 753, 753, 753, 753, 753, 753, 753, 753, 753, 162: 753, 753, 753, 166: 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753, 753}, + {752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 130: 752, 752, 752, 138: 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 150: 752, 152: 752, 752, 752, 752, 752, 752, 752, 752, 752, 162: 752, 752, 752, 166: 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752, 752}, + {751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 130: 751, 751, 751, 138: 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 150: 751, 152: 751, 751, 751, 751, 751, 751, 751, 751, 751, 162: 751, 751, 751, 166: 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751, 751}, + // 840 + {740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 130: 740, 740, 740, 138: 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 150: 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 162: 740, 740, 740, 166: 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 740, 181: 740, 740, 740, 740, 740, 740, 740, 740}, + {754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 130: 754, 754, 754, 138: 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 150: 754, 152: 754, 754, 754, 754, 754, 754, 754, 754, 754, 162: 754, 754, 754, 166: 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 754, 300: 1299, 1297}, + {2: 306, 306, 7: 306, 306, 130: 1719, 132: 306, 139: 306, 144: 306, 306, 147: 306, 306, 150: 306, 152: 306, 306, 306, 156: 306, 306, 306, 306, 306, 344: 1173, 347: 1174}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1720, 1189}, + {2: 305, 305, 7: 305, 305, 130: 305, 132: 305, 138: 1303, 305, 1302, 1301, 1300, 1298, 305, 305, 147: 305, 305, 150: 305, 152: 305, 305, 305, 156: 305, 305, 305, 305, 305, 300: 1299, 1297}, + // 845 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 1158, 206: 1073, 948, 947, 303: 1157, 318: 1154, 325: 1156, 1155, 328: 1160, 334: 1723}, + {2: 311, 311, 7: 311, 311, 130: 311, 132: 311, 139: 311, 144: 311, 311, 147: 311, 311, 150: 311, 152: 311, 311, 311, 156: 311, 311, 311, 311, 311}, + {2: 319, 319, 7: 319, 319, 130: 319, 139: 319, 144: 319, 319, 147: 319, 319, 150: 319, 152: 319, 319, 156: 319}, + {2: 314, 314, 7: 314, 314, 130: 314, 132: 314, 139: 314, 144: 314, 314, 147: 314, 314, 150: 314, 152: 314, 314, 314, 156: 314, 314, 314, 314, 314}, + {2: 309, 309, 7: 309, 309, 130: 309, 132: 309, 139: 309, 144: 309, 309, 147: 309, 309, 150: 309, 152: 309, 309, 309, 156: 309, 309, 309, 309, 309}, + // 850 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 1158, 206: 1073, 948, 947, 303: 1157, 325: 1156, 1155, 328: 1727}, + {132: 1175, 154: 1177, 157: 1178, 1179, 1176, 1728, 344: 1173, 347: 1174}, + {2: 317, 317, 7: 317, 317, 130: 317, 139: 317, 144: 317, 317, 147: 317, 317, 150: 317, 152: 317, 317, 156: 317}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 1730, 356: 1731, 365: 1732}, + {151: 1754}, + // 855 + {2: 851, 851, 8: 851, 145: 851, 148: 851, 150: 851}, + {2: 45, 45, 8: 1733, 145: 45, 148: 1735, 150: 45, 337: 1736, 1734}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 1730, 356: 1753}, + {2: 503, 503, 145: 503, 150: 1738, 361: 1739, 1740}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1737, 1189}, + // 860 + {2: 44, 44, 7: 44, 130: 44, 139: 44, 144: 44, 44, 147: 44, 150: 44, 152: 44, 156: 44}, + {2: 46, 46, 7: 46, 130: 46, 138: 1303, 46, 1302, 1301, 1300, 1298, 46, 46, 147: 46, 150: 46, 152: 46, 156: 46, 300: 1299, 1297}, + {366: 1744}, + {2: 502, 502, 7: 502, 130: 502, 139: 502, 144: 502, 502, 147: 502}, + {2: 296, 296, 145: 1741, 429: 1742}, + // 865 + {210: 1399, 310: 1743, 1398}, + {2: 49, 49}, + {2: 295, 295}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1745, 1189, 367: 1747, 394: 1746}, + {2: 506, 506, 7: 506, 506, 130: 506, 138: 1303, 506, 1302, 1301, 1300, 1298, 506, 506, 147: 506, 150: 506, 152: 506, 163: 1752, 166: 1751, 300: 1299, 1297, 438: 1750}, + // 870 + {2: 510, 510, 7: 510, 1748, 130: 510, 139: 510, 144: 510, 510, 147: 510}, + {2: 509, 509, 7: 509, 509, 130: 509, 139: 509, 144: 509, 509, 147: 509, 150: 509, 152: 509}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1745, 1189, 367: 1749}, + {2: 508, 508, 7: 508, 508, 130: 508, 139: 508, 144: 508, 508, 147: 508, 150: 508, 152: 508}, + {2: 507, 507, 7: 507, 507, 130: 507, 139: 507, 144: 507, 507, 147: 507, 150: 507, 152: 507}, + // 875 + {2: 505, 505, 7: 505, 505, 130: 505, 139: 505, 144: 505, 505, 147: 505, 150: 505, 152: 505}, + {2: 504, 504, 7: 504, 504, 130: 504, 139: 504, 144: 504, 504, 147: 504, 150: 504, 152: 504}, + {2: 850, 850, 8: 850, 145: 850, 148: 850, 150: 850}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1755, 1189}, + {2: 852, 852, 8: 852, 138: 1303, 140: 1302, 1301, 1300, 1298, 145: 852, 148: 852, 150: 852, 300: 1299, 1297}, + // 880 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 1730, 356: 1731, 365: 1757}, + {2: 45, 45, 8: 1733, 148: 1735, 337: 1736, 1758}, + {2: 48, 48}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 1760}, + {2: 133, 133}, + // 885 + {2: 212, 212, 148: 1810, 161: 1809, 530: 1808}, + {327: 1806}, + {2: 229, 229, 144: 1804}, + {146: 1802}, + {2: 226, 226, 148: 226, 161: 226}, + // 890 + {2: 225, 225, 148: 225, 161: 225}, + {2: 224, 224, 148: 224, 161: 224}, + {153: 1801}, + {22: 1789, 27: 1790, 31: 1791}, + {21: 1787}, + // 895 + {2: 218, 218, 148: 218, 161: 218}, + {21: 1786, 25: 1785}, + {2: 215, 215, 148: 215, 161: 215}, + {2: 204, 204, 146: 1781, 148: 204, 161: 204, 180: 1782, 351: 1780}, + {21: 1779}, + // 900 + {21: 208, 25: 208}, + {21: 207, 25: 207}, + {22: 205, 27: 205, 31: 205}, + {2: 213, 213, 148: 213, 161: 213}, + {2: 214, 214, 148: 214, 161: 214}, + // 905 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1145, 948, 947, 345: 1784}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1145, 948, 947, 345: 1783}, + {2: 202, 202, 148: 202, 161: 202}, + {2: 203, 203, 148: 203, 161: 203}, + {2: 217, 217, 148: 217, 161: 217}, + // 910 + {2: 216, 216, 148: 216, 161: 216}, + {2: 204, 204, 146: 1781, 148: 204, 161: 204, 180: 1782, 351: 1788}, + {2: 221, 221, 148: 221, 161: 221}, + {2: 204, 204, 146: 1781, 148: 204, 161: 204, 180: 1782, 351: 1800}, + {146: 1793, 180: 1794, 446: 1798}, + // 915 + {146: 1793, 180: 1794, 446: 1792}, + {2: 204, 204, 146: 1781, 148: 204, 161: 204, 180: 1782, 351: 1797}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 1796}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 1795}, + {2: 200, 200, 146: 200, 148: 200, 161: 200, 180: 200}, + // 920 + {2: 201, 201, 146: 201, 148: 201, 161: 201, 180: 201}, + {2: 219, 219, 148: 219, 161: 219}, + {2: 204, 204, 146: 1781, 148: 204, 161: 204, 180: 1782, 351: 1799}, + {2: 220, 220, 148: 220, 161: 220}, + {2: 222, 222, 148: 222, 161: 222}, + // 925 + {2: 223, 223, 148: 223, 161: 223}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 1803}, + {2: 227, 227}, + {131: 1129, 354: 1805}, + {2: 228, 228}, + // 930 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 1807}, + {2: 230, 230}, + {2: 231, 231}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1812, 287: 1291, 294: 1252}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1811, 1189}, + // 935 + {2: 210, 210, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {2: 211, 211, 149: 1450}, + {480: 1820}, + {327: 1815}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 1816, 352: 1817}, + // 940 + {2: 340, 340, 8: 340, 146: 340}, + {2: 232, 232, 8: 1818}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 1819}, + {2: 339, 339, 8: 339, 146: 339, 155: 339}, + {2: 233, 233}, + // 945 + {56, 56, 4: 56, 56, 56, 9: 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 131: 56, 151: 671}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 151: 653, 206: 1883, 948, 947}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 131: 1420, 151: 652, 206: 1421, 948, 947, 321: 1880}, + {144: 1870, 151: 1869}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 1867, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 151: 645, 206: 1847, 948, 947}, + // 950 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 1850, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 151: 641, 206: 1844, 948, 947}, + {2: 267, 267, 8: 1840}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 131: 1420, 206: 1421, 948, 947, 321: 1839}, + {151: 1837}, + {151: 1835}, + // 955 + {151: 1833}, + {2: 243, 243, 8: 243}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1834, 1189}, + {2: 245, 245, 8: 245, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1836, 1189}, + // 960 + {2: 246, 246, 8: 246, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1838, 1189}, + {2: 250, 250, 8: 250, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {2: 264, 264}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 1842, 1018, 974, 1028, 1822, 998, 1013, 1026, 1023, 1027, 1841, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1829, 948, 947, 214: 1831, 222: 1830, 459: 1843}, + // 965 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 151: 645, 206: 1847, 948, 947}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 151: 641, 206: 1844, 948, 947}, + {2: 242, 242, 8: 242}, + {151: 1845}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1846, 1189}, + // 970 + {2: 249, 249, 8: 249, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {151: 1848}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1849, 1189}, + {2: 248, 248, 8: 248, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {33: 1853, 151: 636, 250: 1854, 385: 1852, 452: 1851}, + // 975 + {2: 261, 261, 8: 1865}, + {2: 259, 259, 8: 259}, + {72: 1857}, + {76: 1856, 295: 1855}, + {2: 256, 256, 8: 256}, + // 980 + {2: 255, 255, 8: 255}, + {77: 1859, 1861, 250: 1860, 499: 1858}, + {2: 257, 257, 8: 257}, + {250: 1864}, + {66: 1862, 84: 1863}, + // 985 + {2: 251, 251, 8: 251}, + {2: 253, 253, 8: 253}, + {2: 252, 252, 8: 252}, + {2: 254, 254, 8: 254}, + {33: 1853, 250: 1854, 385: 1866}, + // 990 + {2: 258, 258, 8: 258}, + {33: 1853, 151: 636, 250: 1854, 385: 1852, 452: 1868}, + {2: 260, 260, 8: 1865}, + {10: 1875, 131: 1874, 439: 1879}, + {131: 1129, 354: 1871}, + // 995 + {151: 1872}, + {10: 1875, 131: 1874, 439: 1873}, + {2: 262, 262}, + {2: 236, 236}, + {133: 1876}, + // 1000 + {131: 1138, 392: 1877}, + {7: 1878}, + {2: 235, 235}, + {2: 263, 263}, + {2: 266, 266, 149: 1881}, + // 1005 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 131: 1420, 206: 1421, 948, 947, 321: 1882}, + {2: 265, 265}, + {151: 1884}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1885, 1189}, + {2: 247, 247, 8: 247, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + // 1010 + {133: 270, 243: 270, 305: 1888, 330: 1889, 545: 1887}, + {133: 1891, 243: 899, 307: 1890, 315: 1892}, + {133: 269, 243: 269}, + {133: 268, 243: 268}, + {2: 276, 276, 7: 276, 130: 276, 139: 272}, + // 1015 + {243: 899, 307: 1893}, + {139: 273}, + {7: 1894}, + {2: 503, 503, 7: 503, 130: 503, 139: 271, 145: 503, 150: 1738, 361: 1739, 1895}, + {2: 294, 294, 7: 294, 130: 294, 145: 1896, 363: 1897}, + // 1020 + {210: 1399, 310: 1898, 1398}, + {2: 275, 275, 7: 275, 130: 275}, + {2: 293, 293, 7: 293, 1899, 37: 1900, 130: 293, 139: 293, 144: 293, 147: 293}, + {210: 1399, 310: 1902, 1398}, + {210: 1399, 310: 1901, 1398}, + // 1025 + {2: 291, 291, 7: 291, 130: 291, 139: 291, 144: 291, 147: 291}, + {2: 292, 292, 7: 292, 130: 292, 139: 292, 144: 292, 147: 292}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 165: 1911, 197: 1262, 202: 1279, 206: 1909, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1910, 1189, 422: 1912, 489: 1913, 526: 1914}, + {289, 289, 4: 289, 289, 289, 9: 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 131: 289, 289, 289, 289, 289, 289, 289, 165: 289, 197: 289, 202: 289, 210: 289, 212: 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289, 289}, + {288, 288, 4: 288, 288, 288, 9: 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 131: 288, 288, 288, 288, 288, 288, 288, 165: 288, 197: 288, 202: 288, 210: 288, 212: 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288, 288}, + // 1030 + {286, 286, 4: 286, 286, 286, 9: 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 1908, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 131: 286, 286, 286, 286, 286, 286, 286, 165: 286, 197: 286, 202: 286, 210: 286, 212: 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 286, 524: 1907}, + {287, 287, 4: 287, 287, 287, 9: 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 131: 287, 287, 287, 287, 287, 287, 287, 165: 287, 197: 287, 202: 287, 210: 287, 212: 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287, 287}, + {285, 285, 4: 285, 285, 285, 9: 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 131: 285, 285, 285, 285, 285, 285, 285, 165: 285, 197: 285, 202: 285, 210: 285, 212: 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285, 285}, + {844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 134: 844, 844, 138: 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 149: 844, 151: 844, 161: 844, 844, 165: 844, 180: 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 844, 198: 844, 844, 844, 844, 211: 1952}, + {1005, 949, 709, 709, 950, 971, 957, 709, 709, 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 130: 709, 1949, 138: 1303, 709, 1302, 1301, 1300, 1298, 709, 709, 709, 709, 162: 1948, 206: 1947, 948, 947, 300: 1299, 1297, 487: 1946, 1945}, + // 1035 + {2: 713, 713, 7: 713, 713, 130: 713, 139: 713, 144: 713, 713, 713, 713}, + {2: 703, 703, 7: 703, 703, 130: 703, 139: 703, 144: 703, 703, 703, 703}, + {2: 284, 284, 7: 284, 1943, 130: 284, 139: 284, 144: 284, 284, 284, 284}, + {2: 294, 294, 7: 294, 130: 294, 139: 294, 144: 294, 1896, 1917, 294, 363: 1915, 492: 1916}, + {2: 279, 279, 7: 279, 130: 279, 139: 279, 144: 1930, 147: 1931, 381: 1942}, + // 1040 + {2: 45, 45, 7: 45, 130: 45, 139: 45, 144: 45, 45, 147: 45, 1735, 337: 1736, 1939}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 1158, 206: 1073, 948, 947, 303: 1157, 318: 1154, 325: 1156, 1155, 328: 1160, 334: 1151, 342: 1920, 482: 1919, 540: 1918}, + {2: 45, 45, 7: 45, 130: 45, 139: 45, 144: 45, 45, 147: 45, 1735, 150: 45, 152: 45, 156: 45, 337: 1736, 1921}, + {2: 322, 322, 7: 322, 130: 322, 139: 322, 144: 322, 322, 147: 322, 322}, + {2: 321, 321, 7: 321, 1721, 130: 321, 139: 321, 144: 321, 321, 147: 321, 321, 150: 321, 152: 321, 156: 321}, + // 1045 + {2: 283, 283, 7: 283, 130: 283, 139: 283, 144: 283, 283, 147: 283, 150: 283, 152: 283, 156: 1922, 494: 1924, 527: 1923}, + {366: 1937}, + {2: 700, 700, 7: 700, 130: 700, 139: 700, 144: 700, 700, 147: 700, 150: 700, 152: 1925, 496: 1926}, + {2: 282, 282, 7: 282, 130: 282, 139: 282, 144: 282, 282, 147: 282, 150: 282, 152: 282}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1936, 1189}, + // 1050 + {2: 503, 503, 7: 503, 130: 503, 139: 503, 144: 503, 503, 147: 503, 150: 1738, 361: 1739, 1927}, + {2: 294, 294, 7: 294, 130: 294, 139: 294, 144: 294, 1896, 147: 294, 363: 1928}, + {2: 279, 279, 7: 279, 130: 279, 139: 279, 144: 1930, 147: 1931, 381: 1929}, + {2: 323, 323, 7: 323, 130: 323, 139: 323}, + {322: 1935}, + // 1055 + {180: 1932}, + {529: 1933}, + {74: 1934}, + {2: 277, 277, 7: 277, 130: 277, 139: 277}, + {2: 278, 278, 7: 278, 130: 278, 139: 278}, + // 1060 + {2: 699, 699, 7: 699, 130: 699, 138: 1303, 699, 1302, 1301, 1300, 1298, 699, 699, 147: 699, 150: 699, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1745, 1189, 367: 1747, 394: 1938}, + {2: 701, 701, 7: 701, 1748, 130: 701, 139: 701, 144: 701, 701, 147: 701, 150: 701, 152: 701}, + {2: 294, 294, 7: 294, 130: 294, 139: 294, 144: 294, 1896, 147: 294, 363: 1940}, + {2: 279, 279, 7: 279, 130: 279, 139: 279, 144: 1930, 147: 1931, 381: 1941}, + // 1065 + {2: 324, 324, 7: 324, 130: 324, 139: 324}, + {2: 325, 325, 7: 325, 130: 325, 139: 325}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 165: 1911, 197: 1262, 202: 1279, 206: 1909, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1910, 1189, 422: 1944}, + {2: 702, 702, 7: 702, 702, 130: 702, 139: 702, 144: 702, 702, 702, 702}, + {2: 710, 710, 7: 710, 710, 130: 710, 139: 710, 144: 710, 710, 710, 710}, + // 1070 + {2: 708, 708, 7: 708, 708, 130: 708, 139: 708, 144: 708, 708, 708, 708}, + {2: 707, 707, 7: 707, 707, 130: 707, 139: 707, 144: 707, 707, 707, 707}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 131: 1951, 206: 1950, 948, 947}, + {2: 705, 705, 7: 705, 705, 130: 705, 139: 705, 144: 705, 705, 705, 705}, + {2: 706, 706, 7: 706, 706, 130: 706, 139: 706, 144: 706, 706, 706, 706}, + // 1075 + {2: 704, 704, 7: 704, 704, 130: 704, 139: 704, 144: 704, 704, 704, 704}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 165: 1954, 206: 1953, 948, 947}, + {843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 134: 843, 843, 138: 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 149: 843, 151: 843, 161: 843, 843, 165: 843, 180: 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 843, 198: 843, 843, 843, 843, 211: 1955}, + {2: 712, 712, 7: 712, 712, 130: 712, 139: 712, 144: 712, 712, 712, 712}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 165: 1956, 206: 1114, 948, 947}, + // 1080 + {2: 711, 711, 7: 711, 711, 130: 711, 139: 711, 144: 711, 711, 711, 711}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1958, 948, 947}, + {2: 329, 329}, + {2: 333, 333, 155: 1960}, + {214: 1294, 252: 1962, 546: 1961}, + // 1085 + {2: 332, 332, 8: 1963}, + {2: 331, 331, 8: 331}, + {214: 1294, 252: 1964}, + {2: 330, 330, 8: 330}, + {146: 1966}, + // 1090 + {131: 1968, 214: 1294, 252: 1969, 513: 1967}, + {2: 336, 336}, + {2: 335, 335}, + {2: 334, 334}, + {554, 554, 4: 554, 554, 554, 9: 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 320: 1973, 428: 1974}, + // 1095 + {531, 531, 4: 531, 531, 531, 9: 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 531, 320: 531}, + {530, 530, 4: 530, 530, 530, 9: 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 530, 320: 530}, + {553, 553, 4: 553, 553, 553, 9: 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553, 553}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 1975}, + {42: 1981, 133: 1976, 153: 1980, 202: 1982, 243: 899, 307: 1978, 315: 902, 901, 1979, 388: 1977, 426: 1983}, + // 1100 + {1005, 949, 4: 950, 971, 957, 839, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 1106, 899, 307: 1462, 398: 2000, 468: 2001}, + {133: 1992, 357: 1991}, + {2: 548, 548, 130: 548, 139: 272}, + {2: 547, 547, 130: 547}, + {1005, 949, 538, 538, 950, 971, 957, 8: 538, 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 130: 538, 206: 1105, 948, 947, 242: 1985, 400: 1986, 472: 1984}, + // 1105 + {133: 545}, + {133: 544}, + {2: 533, 533}, + {2: 546, 546, 8: 1989, 130: 546}, + {151: 1987}, + // 1110 + {2: 537, 537, 8: 537, 130: 537}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1988, 1189}, + {2: 539, 539, 8: 539, 130: 539, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 1985, 400: 1990}, + {2: 536, 536, 8: 536, 130: 536}, + // 1115 + {2: 549, 549, 130: 549}, + {1005, 949, 4: 950, 971, 957, 1994, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 1444, 1189, 309: 1993}, + {7: 1997, 1448}, + {2: 543, 543, 8: 1995, 130: 543}, + {133: 1992, 357: 1996}, + // 1120 + {2: 542, 542, 130: 542}, + {2: 541, 541, 8: 1998, 130: 541}, + {133: 1992, 357: 1999}, + {2: 540, 540, 130: 540}, + {7: 838, 1108}, + // 1125 + {7: 2002}, + {42: 1981, 133: 1461, 202: 1982, 243: 899, 307: 2004, 315: 902, 901, 2005, 388: 2003}, + {133: 1992, 357: 2006}, + {2: 551, 551, 130: 551, 139: 272}, + {2: 550, 550, 130: 550}, + // 1130 + {2: 552, 552, 130: 552}, + {694, 694, 4: 694, 694, 694, 9: 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 313: 1149, 320: 694, 359: 2011}, + {347, 347, 4: 347, 347, 347, 9: 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 313: 347, 320: 347}, + {346, 346, 4: 346, 346, 346, 9: 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 313: 346, 320: 346}, + {345, 345, 4: 345, 345, 345, 9: 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 345, 313: 345, 320: 345}, + // 1135 + {554, 554, 4: 554, 554, 554, 9: 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 554, 320: 1973, 428: 2012}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 2013}, + {42: 1981, 133: 1976, 153: 1980, 202: 1982, 243: 899, 307: 1978, 315: 902, 901, 1979, 388: 1977, 426: 2014}, + {2: 535, 535, 130: 2016, 507: 2015}, + {2: 555, 555}, + // 1140 + {483: 2017}, + {244: 2018}, + {322: 2019}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 1730, 356: 1731, 365: 2020}, + {2: 534, 534, 8: 1733}, + // 1145 + {1005, 949, 762, 762, 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 2028}, + {2: 760, 760}, + {2: 167, 167}, + {2: 166, 166}, + {2: 165, 165}, + // 1150 + {2: 164, 164}, + {2: 163, 163}, + {2: 761, 761}, + {776, 776, 4: 776, 776, 776, 9: 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 776, 212: 776}, + {775, 775, 4: 775, 775, 775, 9: 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 775, 212: 775}, + // 1155 + {698, 698, 4: 698, 698, 698, 9: 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 212: 2041, 425: 2046}, + {698, 698, 4: 698, 698, 698, 9: 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 698, 212: 2041, 425: 2040}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 212: 2037, 303: 1816, 352: 2036}, + {770, 770, 4: 770, 770, 770, 9: 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 770, 212: 770}, + {769, 769, 4: 769, 769, 769, 9: 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 769, 212: 769}, + // 1160 + {2: 772, 772, 8: 1818}, + {217: 2038}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 1816, 352: 2039}, + {2: 771, 771, 8: 1818}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 2043, 948, 947}, + // 1165 + {217: 2042}, + {697, 697, 4: 697, 697, 697, 9: 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697, 697}, + {130: 2044}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 2045}, + {2: 773, 773}, + // 1170 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1145, 948, 947, 345: 2047}, + {2: 774, 774}, + {338, 338, 4: 338, 338, 338, 9: 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 2050, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 338, 146: 338, 313: 338, 518: 2049}, + {694, 694, 4: 694, 694, 694, 9: 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, 146: 694, 313: 1149, 359: 2051}, + {337, 337, 4: 337, 337, 337, 9: 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 337, 146: 337, 313: 337}, + // 1175 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 146: 2052, 206: 1073, 948, 947, 303: 1816, 352: 2053}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 2057, 352: 2058}, + {8: 1818, 146: 2054}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 1158, 206: 1073, 948, 947, 303: 1157, 318: 1154, 325: 1156, 1155, 328: 1160, 334: 1151, 342: 2055}, + {2: 45, 45, 8: 1721, 148: 1735, 337: 1736, 2056}, + // 1180 + {2: 778, 778}, + {2: 45, 45, 8: 340, 145: 45, 148: 1735, 150: 45, 155: 340, 337: 1736, 2062}, + {8: 1818, 155: 2059}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 1158, 206: 1073, 948, 947, 303: 1157, 318: 1154, 325: 1156, 1155, 328: 1160, 334: 1151, 342: 2060}, + {2: 45, 45, 8: 1721, 148: 1735, 337: 1736, 2061}, + // 1185 + {2: 777, 777}, + {2: 503, 503, 145: 503, 150: 1738, 361: 1739, 2063}, + {2: 296, 296, 145: 1741, 429: 2064}, + {2: 779, 779}, + {2: 780, 780, 8: 1448}, + // 1190 + {245: 2385}, + {245: 799}, + {696, 696, 4: 696, 696, 696, 9: 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 212: 2071, 376: 2372}, + {696, 696, 4: 696, 696, 696, 9: 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 696, 212: 2071, 376: 2076}, + {131: 696, 212: 2071, 376: 2072}, + // 1195 + {129: 2074}, + {131: 1129, 354: 1130, 387: 1131, 457: 2073}, + {2: 41, 41, 8: 1133}, + {217: 2075}, + {695, 695, 4: 695, 695, 695, 9: 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 695, 131: 695}, + // 1200 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 2077}, + {133: 2078}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 203: 856, 856, 2085, 1105, 948, 947, 242: 2080, 244: 856, 856, 249: 856, 251: 856, 368: 2083, 2079, 2084, 2082, 450: 2086, 537: 2081}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 203: 855, 855, 206: 2371, 948, 947, 244: 855, 855, 249: 855, 251: 855, 449: 2370}, + {26: 2281, 28: 2278, 2277, 40: 2280, 61: 2260, 2254, 2253, 75: 2268, 80: 2274, 2279, 153: 2267, 197: 2262, 247: 87, 253: 2255, 2251, 256: 87, 259: 2252, 2270, 263: 2259, 2266, 2237, 2238, 2257, 274: 2239, 2250, 2272, 2276, 2271, 2249, 2275, 2256, 284: 2258, 2248, 2240, 288: 2269, 2247, 2273, 2242, 2241, 2263, 465: 2246, 2264, 478: 2236, 490: 2244, 2245, 498: 2243, 504: 2261, 2234, 535: 2235, 541: 2265, 544: 2233}, + // 1205 + {7: 2170, 2171}, + {203: 2090, 2094, 244: 2093, 2092, 249: 2095, 251: 2091, 474: 2096}, + {7: 159, 159}, + {7: 158, 158}, + {133: 2087}, + // 1210 + {7: 156, 156}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 2088, 1189}, + {7: 2089, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {7: 157, 157}, + {244: 2164}, + // 1215 + {244: 2158}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 692, 155: 692, 206: 2099, 948, 947, 331: 2152}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 692, 155: 692, 206: 2099, 948, 947, 331: 2146}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 692, 155: 692, 206: 2099, 948, 947, 244: 2117, 2116, 331: 2115}, + {244: 2097}, + // 1220 + {2: 160, 160, 7: 160, 160}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 692, 206: 2099, 948, 947, 331: 2098}, + {133: 2100}, + {2: 691, 691, 8: 691, 133: 691, 155: 691}, + {1005, 949, 4: 950, 971, 957, 797, 797, 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 2102, 319: 2103, 324: 2101}, + // 1225 + {7: 2106, 2107}, + {7: 71, 71, 133: 1396, 163: 71, 166: 71, 306: 1397, 312: 2104}, + {7: 796, 796}, + {7: 506, 506, 163: 1752, 166: 1751, 438: 2105}, + {7: 798, 798}, + // 1230 + {519: 2109, 2110}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 2102, 319: 2108}, + {7: 795, 795}, + {2: 815, 815, 7: 815, 815}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 2111}, + // 1235 + {133: 2112}, + {1005, 949, 4: 950, 971, 957, 797, 797, 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 2102, 319: 2103, 324: 2113}, + {7: 2114, 2107}, + {2: 814, 814, 7: 814, 814}, + {133: 684, 155: 2120, 314: 2121, 340: 2141}, + // 1240 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 692, 155: 692, 206: 2099, 948, 947, 331: 2135}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 692, 155: 692, 206: 2099, 948, 947, 331: 2118}, + {133: 684, 155: 2120, 314: 2121, 340: 2119}, + {133: 2124}, + {64: 2122, 71: 2123}, + // 1245 + {133: 683}, + {2: 686, 686, 7: 686, 686, 133: 686}, + {2: 685, 685, 7: 685, 685, 133: 685}, + {1005, 949, 4: 950, 971, 957, 797, 797, 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 2102, 319: 2103, 324: 2125}, + {7: 2126, 2107}, + // 1250 + {2130, 2: 690, 690, 7: 690, 690, 2128, 155: 2120, 314: 2129, 335: 2127}, + {2: 816, 816, 7: 816, 816}, + {151: 2132, 210: 768, 308: 2133}, + {2: 688, 688, 7: 688, 688}, + {131: 2131}, + // 1255 + {2: 687, 687, 7: 687, 687}, + {767, 767, 4: 767, 767, 767, 9: 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 767, 131: 767, 136: 767, 210: 767}, + {210: 1399, 310: 2134, 1398}, + {2: 689, 689, 7: 689, 689}, + {133: 684, 155: 2120, 314: 2121, 340: 2136}, + // 1260 + {133: 2137}, + {1005, 949, 4: 950, 971, 957, 797, 797, 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 2102, 319: 2103, 324: 2138}, + {7: 2139, 2107}, + {2130, 2: 690, 690, 7: 690, 690, 2128, 155: 2120, 314: 2129, 335: 2140}, + {2: 817, 817, 7: 817, 817}, + // 1265 + {133: 2142}, + {1005, 949, 4: 950, 971, 957, 797, 797, 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 2102, 319: 2103, 324: 2143}, + {7: 2144, 2107}, + {2130, 2: 690, 690, 7: 690, 690, 2128, 155: 2120, 314: 2129, 335: 2145}, + {2: 818, 818, 7: 818, 818}, + // 1270 + {133: 684, 155: 2120, 314: 2121, 340: 2147}, + {133: 2148}, + {1005, 949, 4: 950, 971, 957, 797, 797, 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 2102, 319: 2103, 324: 2149}, + {7: 2150, 2107}, + {2130, 2: 690, 690, 7: 690, 690, 2128, 155: 2120, 314: 2129, 335: 2151}, + // 1275 + {2: 819, 819, 7: 819, 819}, + {133: 684, 155: 2120, 314: 2121, 340: 2153}, + {133: 2154}, + {1005, 949, 4: 950, 971, 957, 797, 797, 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 2102, 319: 2103, 324: 2155}, + {7: 2156, 2107}, + // 1280 + {2130, 2: 690, 690, 7: 690, 690, 2128, 155: 2120, 314: 2129, 335: 2157}, + {2: 820, 820, 7: 820, 820}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 133: 692, 206: 2099, 948, 947, 331: 2159}, + {133: 2160}, + {1005, 949, 4: 950, 971, 957, 797, 797, 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 2102, 319: 2103, 324: 2161}, + // 1285 + {7: 2162, 2107}, + {2130, 2: 690, 690, 7: 690, 690, 2128, 155: 2120, 314: 2129, 335: 2163}, + {2: 821, 821, 7: 821, 821}, + {133: 684, 155: 2120, 314: 2121, 340: 2165}, + {133: 2166}, + // 1290 + {1005, 949, 4: 950, 971, 957, 797, 797, 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 2102, 319: 2103, 324: 2167}, + {7: 2168, 2107}, + {2130, 2: 690, 690, 7: 690, 690, 2128, 155: 2120, 314: 2129, 335: 2169}, + {2: 822, 822, 7: 822, 822}, + {2178, 2177, 138, 138, 6: 782, 9: 2184, 2182, 2179, 2181, 2183, 2180, 2187, 2175, 2185, 2186, 2191, 136: 2174, 149: 782, 209: 782, 333: 2176, 349: 2188, 353: 2190, 382: 2189, 2173}, + // 1295 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 203: 856, 856, 2085, 1105, 948, 947, 242: 2080, 244: 856, 856, 249: 856, 251: 856, 368: 2083, 2079, 2084, 2082, 450: 2172}, + {7: 155, 155}, + {2: 786, 786}, + {6: 781, 149: 781, 209: 781}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 151: 2231, 206: 2230, 948, 947}, + // 1300 + {6: 1417, 149: 2225, 209: 1416, 323: 2224}, + {151: 2222}, + {131: 768, 151: 2132, 308: 2220}, + {151: 2132, 210: 768, 308: 2218}, + {131: 768, 151: 2132, 308: 2216}, + // 1305 + {151: 2132, 210: 768, 308: 2214}, + {131: 768, 151: 2132, 308: 2212}, + {768, 768, 4: 768, 768, 768, 9: 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 151: 2132, 308: 2210}, + {151: 2132, 210: 768, 308: 2208}, + {151: 2132, 210: 768, 308: 2206}, + // 1310 + {151: 2132, 210: 768, 308: 2204}, + {151: 2132, 210: 768, 308: 2202}, + {139, 139, 139, 139, 6: 139, 8: 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 139, 136: 139, 149: 139, 209: 139}, + {2178, 2177, 137, 137, 6: 782, 8: 2200, 2184, 2182, 2179, 2181, 2183, 2180, 2187, 2175, 2185, 2186, 2191, 136: 2174, 149: 782, 209: 782, 333: 2176, 349: 2188, 353: 2199}, + {136, 136, 136, 136, 6: 136, 8: 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136, 136: 136, 149: 136, 209: 136}, + // 1315 + {47: 768, 768, 51: 768, 768, 55: 768, 136: 768, 151: 2132, 308: 2192}, + {47: 2198, 2196, 51: 2194, 2195, 55: 2197, 136: 2193}, + {132, 132, 132, 132, 6: 132, 8: 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 132, 136: 132, 149: 132, 209: 132}, + {131, 131, 131, 131, 6: 131, 8: 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 131, 136: 131, 149: 131, 209: 131}, + {130, 130, 130, 130, 6: 130, 8: 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 136: 130, 149: 130, 209: 130}, + // 1320 + {129, 129, 129, 129, 6: 129, 8: 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 136: 129, 149: 129, 209: 129}, + {128, 128, 128, 128, 6: 128, 8: 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 136: 128, 149: 128, 209: 128}, + {127, 127, 127, 127, 6: 127, 8: 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 127, 136: 127, 149: 127, 209: 127}, + {135, 135, 135, 135, 6: 135, 8: 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 135, 136: 135, 149: 135, 209: 135}, + {2178, 2177, 6: 782, 9: 2184, 2182, 2179, 2181, 2183, 2180, 2187, 2175, 2185, 2186, 2191, 136: 2174, 149: 782, 209: 782, 333: 2176, 349: 2188, 353: 2201}, + // 1325 + {134, 134, 134, 134, 6: 134, 8: 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 134, 136: 134, 149: 134, 209: 134}, + {210: 1399, 310: 2203, 1398}, + {140, 140, 140, 140, 6: 140, 8: 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 136: 140, 149: 140, 209: 140}, + {210: 1399, 310: 2205, 1398}, + {141, 141, 141, 141, 6: 141, 8: 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 141, 136: 141, 149: 141, 209: 141}, + // 1330 + {210: 1399, 310: 2207, 1398}, + {142, 142, 142, 142, 6: 142, 8: 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 142, 136: 142, 149: 142, 209: 142}, + {210: 1399, 310: 2209, 1398}, + {143, 143, 143, 143, 6: 143, 8: 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 143, 136: 143, 149: 143, 209: 143}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 2211, 948, 947}, + // 1335 + {144, 144, 144, 144, 6: 144, 8: 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144, 136: 144, 149: 144, 209: 144}, + {131: 2213}, + {145, 145, 145, 145, 6: 145, 8: 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 136: 145, 149: 145, 209: 145}, + {210: 1399, 310: 2215, 1398}, + {146, 146, 146, 146, 6: 146, 8: 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, 136: 146, 149: 146, 209: 146}, + // 1340 + {131: 2217}, + {147, 147, 147, 147, 6: 147, 8: 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, 136: 147, 149: 147, 209: 147}, + {210: 1399, 310: 2219, 1398}, + {148, 148, 148, 148, 6: 148, 8: 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, 136: 148, 149: 148, 209: 148}, + {131: 2221}, + // 1345 + {149, 149, 149, 149, 6: 149, 8: 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 149, 136: 149, 149: 149, 209: 149}, + {210: 1399, 310: 2223, 1398}, + {150, 150, 150, 150, 6: 150, 8: 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 136: 150, 149: 150, 209: 150}, + {768, 768, 4: 768, 768, 768, 9: 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 131: 768, 151: 2132, 308: 2228}, + {768, 768, 4: 768, 768, 768, 9: 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 131: 768, 151: 2132, 308: 2226}, + // 1350 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 131: 1420, 206: 1421, 948, 947, 321: 2227}, + {151, 151, 151, 151, 6: 151, 8: 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 136: 151, 149: 151, 209: 151}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 131: 1420, 206: 1421, 948, 947, 321: 2229}, + {152, 152, 152, 152, 6: 152, 8: 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, 136: 152, 149: 152, 209: 152}, + {154, 154, 154, 154, 6: 154, 8: 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 154, 136: 154, 149: 154, 209: 154}, + // 1355 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 2232, 948, 947}, + {153, 153, 153, 153, 6: 153, 8: 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 153, 136: 153, 149: 153, 209: 153}, + {2340, 2335, 824, 824, 824, 824, 7: 824, 824, 129: 2333, 2339, 136: 2338, 2334, 203: 2336, 2337, 2341, 399: 2342, 469: 2343, 2332}, + {126, 126, 126, 126, 126, 126, 7: 126, 126, 129: 126, 126, 136: 126, 126, 203: 126, 126, 126}, + {125, 125, 125, 125, 125, 125, 7: 125, 125, 129: 125, 125, 136: 125, 125, 203: 125, 125, 125}, + // 1360 + {124, 124, 124, 124, 124, 124, 7: 124, 124, 129: 124, 124, 136: 124, 124, 203: 124, 124, 124}, + {123, 123, 123, 123, 123, 123, 7: 123, 123, 129: 123, 123, 136: 123, 123, 203: 123, 123, 123}, + {122, 122, 122, 122, 122, 122, 7: 122, 122, 129: 122, 122, 136: 122, 122, 203: 122, 122, 122}, + {121, 121, 121, 121, 121, 121, 7: 121, 121, 129: 121, 121, 136: 121, 121, 203: 121, 121, 121}, + {120, 120, 120, 120, 120, 120, 7: 120, 120, 129: 120, 120, 136: 120, 120, 203: 120, 120, 120}, + // 1365 + {119, 119, 119, 119, 119, 119, 7: 119, 119, 129: 119, 119, 136: 119, 119, 203: 119, 119, 119}, + {118, 118, 118, 118, 118, 118, 7: 118, 118, 129: 118, 118, 136: 118, 118, 203: 118, 118, 118}, + {71, 71, 71, 71, 71, 71, 7: 71, 71, 129: 71, 71, 133: 1396, 136: 71, 71, 203: 71, 71, 71, 302: 71, 304: 71, 306: 1397, 312: 2330}, + {65, 65, 65, 65, 65, 65, 7: 65, 65, 129: 65, 65, 133: 1403, 136: 65, 65, 203: 65, 65, 65, 302: 65, 304: 65, 306: 1404, 375: 2328, 379: 1405}, + {65, 65, 65, 65, 65, 65, 7: 65, 65, 129: 65, 65, 133: 1403, 136: 65, 65, 203: 65, 65, 65, 302: 65, 304: 65, 306: 1404, 375: 2323, 379: 1405}, + // 1370 + {71, 71, 71, 71, 71, 71, 7: 71, 71, 129: 71, 71, 133: 1396, 136: 71, 71, 203: 71, 71, 71, 306: 1397, 312: 2322}, + {113, 113, 113, 113, 113, 113, 7: 113, 113, 129: 113, 113, 133: 113, 136: 113, 113, 203: 113, 113, 113, 302: 113, 304: 113}, + {112, 112, 112, 112, 112, 112, 7: 112, 112, 129: 112, 112, 133: 112, 136: 112, 112, 203: 112, 112, 112, 302: 112, 304: 112}, + {111, 111, 111, 111, 111, 111, 7: 111, 111, 129: 111, 111, 133: 111, 136: 111, 111, 203: 111, 111, 111, 302: 111, 304: 111}, + {110, 110, 110, 110, 110, 110, 7: 110, 110, 129: 110, 110, 133: 110, 136: 110, 110, 203: 110, 110, 110, 302: 110, 304: 110}, + // 1375 + {109, 109, 109, 109, 109, 109, 7: 109, 109, 129: 109, 109, 133: 109, 136: 109, 109, 203: 109, 109, 109, 302: 109, 304: 109}, + {108, 108, 108, 108, 108, 108, 7: 108, 108, 129: 108, 108, 133: 108, 136: 108, 108, 203: 108, 108, 108, 302: 108, 304: 108}, + {107, 107, 107, 107, 107, 107, 7: 107, 107, 129: 107, 107, 133: 107, 136: 107, 107, 203: 107, 107, 107, 302: 107, 304: 107}, + {106, 106, 106, 106, 106, 106, 7: 106, 106, 129: 106, 106, 133: 106, 136: 106, 106, 203: 106, 106, 106, 302: 106, 304: 106}, + {103, 103, 103, 103, 103, 103, 7: 103, 103, 129: 103, 103, 133: 103, 136: 103, 103, 203: 103, 103, 103, 302: 103, 304: 103}, + // 1380 + {102, 102, 102, 102, 102, 102, 7: 102, 102, 129: 102, 102, 133: 102, 136: 102, 102, 203: 102, 102, 102, 302: 102, 304: 102}, + {101, 101, 101, 101, 101, 101, 7: 101, 101, 129: 101, 101, 133: 101, 136: 101, 101, 203: 101, 101, 101, 302: 101, 304: 101}, + {100, 100, 100, 100, 100, 100, 7: 100, 100, 129: 100, 100, 133: 100, 136: 100, 100, 203: 100, 100, 100, 302: 100, 304: 100}, + {99, 99, 99, 99, 99, 99, 7: 99, 99, 129: 99, 99, 133: 99, 136: 99, 99, 203: 99, 99, 99, 302: 99, 304: 99, 512: 2321}, + {97, 97, 97, 97, 97, 97, 7: 97, 97, 129: 97, 97, 133: 97, 136: 97, 97, 203: 97, 97, 97}, + // 1385 + {247: 2308, 256: 2309}, + {71, 71, 71, 71, 71, 71, 7: 71, 71, 129: 71, 71, 133: 1396, 136: 71, 71, 203: 71, 71, 71, 306: 1397, 312: 2307}, + {133: 1396, 306: 2306}, + {91, 91, 91, 91, 91, 91, 7: 91, 91, 129: 91, 91, 136: 91, 91, 203: 91, 91, 91}, + {61, 61, 61, 61, 61, 61, 61, 61, 61, 129: 61, 61, 136: 61, 61, 149: 61, 197: 1413, 203: 61, 61, 61, 209: 61, 348: 2303}, + // 1390 + {133: 2298}, + {133: 2288}, + {247: 86, 256: 86}, + {85, 85, 85, 85, 85, 85, 7: 85, 85, 129: 85, 85, 136: 85, 85, 203: 85, 85, 85}, + {71, 71, 71, 71, 71, 71, 7: 71, 71, 129: 71, 71, 133: 1396, 136: 71, 71, 203: 71, 71, 71, 306: 1397, 312: 2287}, + // 1395 + {83, 83, 83, 83, 83, 83, 7: 83, 83, 129: 83, 83, 136: 83, 83, 203: 83, 83, 83}, + {82, 82, 82, 82, 82, 82, 7: 82, 82, 129: 82, 82, 136: 82, 82, 203: 82, 82, 82}, + {81, 81, 81, 81, 81, 81, 81, 81, 81, 129: 81, 81, 136: 81, 81, 149: 81, 197: 81, 203: 81, 81, 81, 209: 81}, + {71, 71, 71, 71, 71, 71, 71, 71, 71, 129: 71, 71, 133: 1396, 136: 71, 71, 149: 71, 197: 71, 203: 71, 71, 71, 209: 71, 306: 1397, 312: 2286}, + {79, 79, 79, 79, 79, 79, 79, 79, 79, 129: 79, 79, 136: 79, 79, 149: 79, 197: 79, 203: 79, 79, 79, 209: 79}, + // 1400 + {78, 78, 78, 78, 78, 78, 78, 78, 78, 129: 78, 78, 136: 78, 78, 149: 78, 197: 78, 203: 78, 78, 78, 209: 78}, + {77, 77, 77, 77, 77, 77, 7: 77, 77, 129: 77, 77, 136: 77, 77, 203: 77, 77, 77}, + {71, 71, 71, 71, 71, 71, 7: 71, 71, 129: 71, 71, 133: 1396, 136: 71, 71, 203: 71, 71, 71, 306: 1397, 312: 2285}, + {71, 71, 71, 71, 71, 71, 7: 71, 71, 129: 71, 71, 133: 1396, 136: 71, 71, 203: 71, 71, 71, 306: 1397, 312: 2284}, + {71, 71, 71, 71, 71, 71, 7: 71, 71, 129: 71, 71, 133: 1396, 136: 71, 71, 203: 71, 71, 71, 306: 1397, 312: 2283}, + // 1405 + {71, 71, 71, 71, 71, 71, 7: 71, 71, 129: 71, 71, 133: 1396, 136: 71, 71, 203: 71, 71, 71, 306: 1397, 312: 2282}, + {73, 73, 73, 73, 73, 73, 7: 73, 73, 129: 73, 73, 136: 73, 73, 203: 73, 73, 73}, + {74, 74, 74, 74, 74, 74, 7: 74, 74, 129: 74, 74, 136: 74, 74, 203: 74, 74, 74}, + {75, 75, 75, 75, 75, 75, 7: 75, 75, 129: 75, 75, 136: 75, 75, 203: 75, 75, 75}, + {76, 76, 76, 76, 76, 76, 7: 76, 76, 129: 76, 76, 136: 76, 76, 203: 76, 76, 76}, + // 1410 + {80, 80, 80, 80, 80, 80, 80, 80, 80, 129: 80, 80, 136: 80, 80, 149: 80, 197: 80, 203: 80, 80, 80, 209: 80}, + {84, 84, 84, 84, 84, 84, 7: 84, 84, 129: 84, 84, 136: 84, 84, 203: 84, 84, 84}, + {131: 2290, 448: 2289}, + {7: 2291, 2292}, + {7: 53, 53}, + // 1415 + {59, 59, 59, 59, 59, 59, 1417, 59, 59, 129: 59, 59, 136: 59, 59, 149: 59, 203: 59, 59, 59, 209: 1416, 323: 1415, 336: 2294}, + {131: 2293}, + {7: 52, 52}, + {55, 55, 55, 55, 55, 55, 7: 55, 55, 129: 55, 55, 136: 55, 55, 149: 2296, 203: 55, 55, 55, 341: 2295}, + {88, 88, 88, 88, 88, 88, 7: 88, 88, 129: 88, 88, 136: 88, 88, 203: 88, 88, 88}, + // 1420 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 131: 1420, 206: 1421, 948, 947, 321: 2297}, + {54, 54, 54, 54, 54, 54, 7: 54, 54, 129: 54, 54, 136: 54, 54, 203: 54, 54, 54}, + {131: 2290, 448: 2299}, + {7: 2300, 2292}, + {59, 59, 59, 59, 59, 59, 1417, 59, 59, 129: 59, 59, 136: 59, 59, 149: 59, 203: 59, 59, 59, 209: 1416, 323: 1415, 336: 2301}, + // 1425 + {55, 55, 55, 55, 55, 55, 7: 55, 55, 129: 55, 55, 136: 55, 55, 149: 2296, 203: 55, 55, 55, 341: 2302}, + {89, 89, 89, 89, 89, 89, 7: 89, 89, 129: 89, 89, 136: 89, 89, 203: 89, 89, 89}, + {59, 59, 59, 59, 59, 59, 1417, 59, 59, 129: 59, 59, 136: 59, 59, 149: 59, 203: 59, 59, 59, 209: 1416, 323: 1415, 336: 2304}, + {55, 55, 55, 55, 55, 55, 7: 55, 55, 129: 55, 55, 136: 55, 55, 149: 2296, 203: 55, 55, 55, 341: 2305}, + {90, 90, 90, 90, 90, 90, 7: 90, 90, 129: 90, 90, 136: 90, 90, 203: 90, 90, 90}, + // 1430 + {92, 92, 92, 92, 92, 92, 7: 92, 92, 129: 92, 92, 136: 92, 92, 203: 92, 92, 92}, + {93, 93, 93, 93, 93, 93, 7: 93, 93, 129: 93, 93, 136: 93, 93, 203: 93, 93, 93}, + {61, 61, 61, 61, 61, 61, 61, 61, 61, 129: 61, 61, 133: 1396, 136: 61, 61, 149: 61, 197: 1413, 203: 61, 61, 61, 209: 61, 306: 2314, 348: 2315}, + {133: 1396, 306: 2310}, + {61, 61, 61, 61, 61, 61, 61, 61, 61, 129: 61, 61, 136: 61, 61, 149: 61, 197: 1413, 203: 61, 61, 61, 209: 61, 348: 2311}, + // 1435 + {59, 59, 59, 59, 59, 59, 1417, 59, 59, 129: 59, 59, 136: 59, 59, 149: 59, 203: 59, 59, 59, 209: 1416, 323: 1415, 336: 2312}, + {55, 55, 55, 55, 55, 55, 7: 55, 55, 129: 55, 55, 136: 55, 55, 149: 2296, 203: 55, 55, 55, 341: 2313}, + {94, 94, 94, 94, 94, 94, 7: 94, 94, 129: 94, 94, 136: 94, 94, 203: 94, 94, 94}, + {61, 61, 61, 61, 61, 61, 61, 61, 61, 129: 61, 61, 136: 61, 61, 149: 61, 197: 1413, 203: 61, 61, 61, 209: 61, 348: 2318}, + {59, 59, 59, 59, 59, 59, 1417, 59, 59, 129: 59, 59, 136: 59, 59, 149: 59, 203: 59, 59, 59, 209: 1416, 323: 1415, 336: 2316}, + // 1440 + {55, 55, 55, 55, 55, 55, 7: 55, 55, 129: 55, 55, 136: 55, 55, 149: 2296, 203: 55, 55, 55, 341: 2317}, + {95, 95, 95, 95, 95, 95, 7: 95, 95, 129: 95, 95, 136: 95, 95, 203: 95, 95, 95}, + {59, 59, 59, 59, 59, 59, 1417, 59, 59, 129: 59, 59, 136: 59, 59, 149: 59, 203: 59, 59, 59, 209: 1416, 323: 1415, 336: 2319}, + {55, 55, 55, 55, 55, 55, 7: 55, 55, 129: 55, 55, 136: 55, 55, 149: 2296, 203: 55, 55, 55, 341: 2320}, + {96, 96, 96, 96, 96, 96, 7: 96, 96, 129: 96, 96, 136: 96, 96, 203: 96, 96, 96}, + // 1445 + {98, 98, 98, 98, 98, 98, 7: 98, 98, 129: 98, 98, 133: 98, 136: 98, 98, 203: 98, 98, 98, 302: 98, 304: 98}, + {114, 114, 114, 114, 114, 114, 7: 114, 114, 129: 114, 114, 136: 114, 114, 203: 114, 114, 114}, + {67, 67, 67, 67, 67, 67, 7: 67, 67, 129: 67, 67, 136: 67, 67, 203: 67, 67, 67, 302: 67, 304: 67, 374: 2324}, + {115, 115, 115, 115, 115, 115, 7: 115, 115, 129: 115, 115, 136: 115, 115, 203: 115, 115, 115, 302: 2325, 304: 2326, 373: 2327}, + {69, 69, 69, 69, 69, 69, 7: 69, 69, 129: 69, 69, 136: 69, 69, 203: 69, 69, 69, 302: 69, 304: 69}, + // 1450 + {68, 68, 68, 68, 68, 68, 7: 68, 68, 129: 68, 68, 136: 68, 68, 203: 68, 68, 68, 302: 68, 304: 68}, + {66, 66, 66, 66, 66, 66, 7: 66, 66, 129: 66, 66, 136: 66, 66, 203: 66, 66, 66, 302: 66, 304: 66}, + {67, 67, 67, 67, 67, 67, 7: 67, 67, 129: 67, 67, 136: 67, 67, 203: 67, 67, 67, 302: 67, 304: 67, 374: 2329}, + {116, 116, 116, 116, 116, 116, 7: 116, 116, 129: 116, 116, 136: 116, 116, 203: 116, 116, 116, 302: 2325, 304: 2326, 373: 2327}, + {67, 67, 67, 67, 67, 67, 7: 67, 67, 129: 67, 67, 136: 67, 67, 203: 67, 67, 67, 302: 67, 304: 67, 374: 2331}, + // 1455 + {117, 117, 117, 117, 117, 117, 7: 117, 117, 129: 117, 117, 136: 117, 117, 203: 117, 117, 117, 302: 2325, 304: 2326, 373: 2327}, + {2: 845, 845, 845, 845, 7: 845, 845}, + {137: 2369}, + {835, 835, 835, 835, 835, 835, 7: 835, 835, 129: 835, 835, 136: 835, 835, 203: 835, 835, 835}, + {834, 834, 834, 834, 834, 834, 7: 834, 834, 129: 834, 834, 136: 834, 834, 203: 834, 834, 834}, + // 1460 + {244: 2368}, + {832, 832, 832, 832, 832, 832, 7: 832, 832, 129: 832, 832, 136: 832, 832, 203: 832, 832, 832, 244: 2367}, + {54: 2354, 131: 1244, 134: 2359, 2360, 137: 1240, 210: 1243, 215: 1239, 1241, 218: 1242, 2351, 223: 1247, 1246, 1245, 257: 2358, 430: 2352, 2353, 435: 2356, 481: 2355, 532: 2357}, + {322: 2349}, + {131: 2348}, + // 1465 + {133: 2345}, + {826, 826, 826, 826, 826, 826, 7: 826, 826, 129: 826, 826, 136: 826, 826, 203: 826, 826, 826}, + {2340, 2335, 823, 823, 823, 823, 7: 823, 823, 129: 2333, 2339, 136: 2338, 2334, 203: 2336, 2337, 2341, 399: 2344}, + {825, 825, 825, 825, 825, 825, 7: 825, 825, 129: 825, 825, 136: 825, 825, 203: 825, 825, 825}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 1194, 958, 963, 1193, 1206, 1019, 1215, 1022, 1220, 1222, 1224, 977, 1016, 1229, 990, 994, 995, 1195, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1225, 981, 982, 984, 985, 993, 1196, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1198, 1199, 1000, 1192, 1063, 1200, 1201, 1202, 1203, 1205, 1204, 1207, 1208, 1209, 1210, 1211, 1212, 1017, 1213, 1214, 946, 1216, 1217, 1218, 1219, 1221, 976, 1223, 1226, 1227, 980, 1228, 1197, 1001, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1188, 131: 1244, 1271, 1250, 1261, 1260, 1251, 1240, 197: 1262, 202: 1279, 206: 1105, 948, 947, 210: 1243, 212: 1270, 1287, 1294, 1239, 1241, 1254, 1242, 1282, 1268, 1269, 1293, 1247, 1246, 1245, 1258, 1259, 1277, 1276, 1278, 1280, 1274, 1281, 1273, 1285, 1286, 1253, 1272, 1288, 1289, 1290, 1249, 246: 1257, 252: 1292, 257: 1248, 261: 1284, 1283, 268: 1256, 1267, 1266, 1264, 1265, 1275, 282: 1255, 1263, 287: 1291, 294: 1252, 296: 1191, 1190, 2346, 1189}, + // 1470 + {7: 2347, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {827, 827, 827, 827, 827, 827, 7: 827, 827, 129: 827, 827, 136: 827, 827, 203: 827, 827, 827}, + {828, 828, 828, 828, 828, 828, 7: 828, 828, 129: 828, 828, 136: 828, 828, 203: 828, 828, 828}, + {54: 2354, 219: 2351, 430: 2352, 2353, 435: 2350}, + {829, 829, 829, 829, 829, 829, 7: 829, 829, 129: 829, 829, 136: 829, 829, 203: 829, 829, 829}, + // 1475 + {810, 810, 810, 810, 810, 810, 7: 810, 810, 129: 810, 810, 133: 810, 136: 810, 810, 203: 810, 810, 810}, + {809, 809, 809, 809, 809, 809, 7: 809, 809, 129: 809, 809, 133: 809, 136: 809, 809, 203: 809, 809, 809}, + {808, 808, 808, 808, 808, 808, 7: 808, 808, 129: 808, 808, 133: 808, 136: 808, 808, 203: 808, 808, 808}, + {807, 807, 807, 807, 807, 807, 7: 807, 807, 129: 807, 807, 133: 807, 136: 807, 807, 203: 807, 807, 807}, + {830, 830, 830, 830, 830, 830, 7: 830, 830, 129: 830, 830, 136: 830, 830, 203: 830, 830, 830}, + // 1480 + {813, 813, 813, 813, 813, 813, 7: 813, 813, 129: 813, 813, 133: 2365, 136: 813, 813, 203: 813, 813, 813}, + {811, 811, 811, 811, 811, 811, 7: 811, 811, 129: 811, 811, 136: 811, 811, 203: 811, 811, 811}, + {806, 806, 806, 806, 806, 806, 7: 806, 806, 129: 806, 806, 136: 806, 806, 203: 806, 806, 806}, + {210: 2362, 218: 2363, 436: 2364}, + {210: 2362, 218: 2363, 436: 2361}, + // 1485 + {804, 804, 804, 804, 804, 804, 7: 804, 804, 129: 804, 804, 136: 804, 804, 203: 804, 804, 804}, + {803, 803, 803, 803, 803, 803, 7: 803, 803, 129: 803, 803, 136: 803, 803, 203: 803, 803, 803}, + {802, 802, 802, 802, 802, 802, 7: 802, 802, 129: 802, 802, 136: 802, 802, 203: 802, 802, 802}, + {805, 805, 805, 805, 805, 805, 7: 805, 805, 129: 805, 805, 136: 805, 805, 203: 805, 805, 805}, + {7: 2366}, + // 1490 + {812, 812, 812, 812, 812, 812, 7: 812, 812, 129: 812, 812, 136: 812, 812, 203: 812, 812, 812}, + {831, 831, 831, 831, 831, 831, 7: 831, 831, 129: 831, 831, 136: 831, 831, 203: 831, 831, 831}, + {833, 833, 833, 833, 833, 833, 7: 833, 833, 129: 833, 833, 136: 833, 833, 203: 833, 833, 833}, + {836, 836, 836, 836, 836, 836, 7: 836, 836, 129: 836, 836, 136: 836, 836, 203: 836, 836, 836}, + {203: 854, 854, 244: 854, 854, 249: 854, 251: 854}, + // 1495 + {2: 853, 853, 8: 853, 203: 853, 853, 244: 853, 853, 249: 853, 251: 853}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1145, 948, 947, 345: 2373}, + {2: 790, 790, 6: 782, 136: 2174, 149: 782, 209: 782, 333: 2375, 406: 2377, 476: 2376, 2374}, + {2: 794, 794}, + {6: 1417, 149: 2380, 209: 1416, 323: 2379}, + // 1500 + {2: 789, 789, 6: 782, 136: 2174, 149: 782, 209: 782, 333: 2375, 406: 2378}, + {2: 788, 788, 6: 788, 136: 788, 149: 788, 209: 788}, + {2: 787, 787, 6: 787, 136: 787, 149: 787, 209: 787}, + {768, 768, 4: 768, 768, 768, 9: 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 131: 768, 151: 2132, 308: 2383}, + {768, 768, 4: 768, 768, 768, 9: 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 768, 131: 768, 151: 2132, 308: 2381}, + // 1505 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 131: 1420, 206: 1421, 948, 947, 321: 2382}, + {2: 791, 791, 6: 791, 136: 791, 149: 791, 209: 791}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 131: 1420, 206: 1421, 948, 947, 321: 2384}, + {2: 792, 792, 6: 792, 136: 792, 149: 792, 209: 792}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 2386, 948, 947}, + // 1510 + {130: 2387}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 2388}, + {133: 2389}, + {1005, 949, 4: 950, 971, 957, 797, 797, 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 2102, 319: 2103, 324: 2390}, + {7: 2391, 2107}, + // 1515 + {2: 801, 801}, + {2: 846, 846}, + {327: 2394}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1073, 948, 947, 303: 2395}, + {2178, 2177, 138, 138, 6: 782, 8: 138, 2184, 2182, 2179, 2181, 2183, 2180, 2187, 2175, 2185, 2186, 2191, 136: 2174, 149: 782, 209: 782, 248: 2399, 258: 2398, 333: 2176, 349: 2188, 353: 2190, 382: 2189, 2397, 390: 2400, 461: 2396}, + // 1520 + {2: 873, 873, 8: 2420}, + {2: 872, 872, 8: 872}, + {863, 863, 4: 863, 863, 863, 9: 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 203: 856, 856, 244: 856, 856, 249: 856, 251: 856, 369: 2079, 2414, 2082, 396: 2407, 2413}, + {863, 863, 4: 863, 863, 863, 9: 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 863, 203: 2402, 244: 2405, 2406, 249: 2404, 396: 2407, 2401, 500: 2403}, + {2: 858, 858, 8: 858}, + // 1525 + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 2412}, + {244: 2411}, + {1005, 949, 692, 692, 950, 971, 957, 8: 692, 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 2099, 948, 947, 331: 2410}, + {244: 2408}, + {865, 865, 865, 865, 865, 865, 865, 8: 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865, 865}, + // 1530 + {864, 864, 864, 864, 864, 864, 864, 8: 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864}, + {862, 862, 4: 862, 862, 862, 9: 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862, 862}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 2371, 948, 947, 449: 2409}, + {2: 866, 866, 8: 866}, + {2: 867, 867, 8: 867}, + // 1535 + {2: 868, 868, 8: 868}, + {2: 869, 869, 8: 869}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 2080, 368: 2415}, + {2: 870, 870, 8: 870}, + {2: 861, 861, 2418, 2417, 8: 861, 471: 2416}, + // 1540 + {2: 871, 871, 8: 871}, + {2: 860, 860, 8: 860}, + {1005, 949, 4: 950, 971, 957, 9: 1010, 978, 1006, 1008, 1009, 1007, 1021, 968, 1011, 1012, 1015, 967, 986, 988, 979, 970, 1029, 997, 958, 963, 962, 1039, 1019, 1048, 1022, 1053, 1055, 1057, 977, 1016, 1062, 990, 994, 995, 999, 1032, 952, 959, 960, 961, 964, 965, 966, 972, 1003, 1058, 981, 982, 984, 985, 993, 1002, 953, 955, 954, 956, 1004, 1024, 969, 973, 987, 1018, 974, 1028, 975, 998, 1013, 1026, 1023, 1027, 983, 989, 991, 992, 1020, 1025, 996, 1030, 1031, 1000, 951, 1063, 1033, 1034, 1035, 1036, 1038, 1037, 1040, 1041, 1042, 1043, 1044, 1045, 1017, 1046, 1047, 946, 1049, 1050, 1051, 1052, 1054, 976, 1056, 1059, 1060, 980, 1061, 1014, 1001, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 206: 1105, 948, 947, 242: 2419}, + {2: 859, 859, 8: 859}, + {2178, 2177, 138, 138, 6: 782, 8: 138, 2184, 2182, 2179, 2181, 2183, 2180, 2187, 2175, 2185, 2186, 2191, 136: 2174, 149: 782, 209: 782, 248: 2399, 258: 2398, 333: 2176, 349: 2188, 353: 2190, 382: 2189, 2397, 390: 2421}, + // 1545 + {2: 857, 857, 8: 857}, + {2: 874, 138: 1303, 140: 1302, 1301, 1300, 1298, 300: 1299, 1297}, + {2: 766, 766, 23: 894, 895, 44: 905, 881, 883, 49: 897, 885, 56: 898, 58: 882, 939, 133: 900, 147: 944, 153: 904, 163: 890, 213: 893, 243: 899, 246: 935, 248: 887, 307: 903, 315: 902, 901, 929, 322: 940, 329: 886, 332: 892, 343: 884, 350: 906, 355: 880, 358: 942, 372: 913, 377: 925, 380: 928, 386: 933, 389: 908, 391: 909, 393: 910, 401: 911, 916, 917, 918, 919, 409: 912, 896, 412: 889, 920, 921, 922, 923, 907, 914, 888, 915, 891, 424: 924, 432: 937, 440: 926, 443: 927, 930, 931, 447: 2424, 453: 932, 943, 936, 941, 458: 934}, + {2: 161, 161}, + } +) + +var yyDebug = 0 + +type yyLexer interface { + Lex(lval *yySymType) int + Error(s string) +} + +type yyLexerEx interface { + yyLexer + Reduced(rule, state int, lval *yySymType) bool +} + +func yySymName(c int) (s string) { + x, ok := yyXLAT[c] + if ok { + return yySymNames[x] + } + + return __yyfmt__.Sprintf("%d", c) +} + +func yylex1(yylex yyLexer, lval *yySymType) (n int) { + n = yylex.Lex(lval) + if n <= 0 { + n = yyEOFCode + } + if yyDebug >= 3 { + __yyfmt__.Printf("\nlex %s(%#x %d), lval: %+v\n", yySymName(n), n, n, lval) + } + return n +} + +func yyParse(yylex yyLexer) int { + const yyError = 556 + + yyEx, _ := yylex.(yyLexerEx) + var yyn int + var yylval yySymType + var yyVAL yySymType + yyS := make([]yySymType, 200) + + Nerrs := 0 /* number of errors */ + Errflag := 0 /* error recovery flag */ + yyerrok := func() { + if yyDebug >= 2 { + __yyfmt__.Printf("yyerrok()\n") + } + Errflag = 0 + } + _ = yyerrok + yystate := 0 + yychar := -1 + var yyxchar int + var yyshift int + yyp := -1 + goto yystack + +ret0: + return 0 + +ret1: + return 1 + +yystack: + /* put a state and value onto the stack */ + yyp++ + if yyp >= len(yyS) { + nyys := make([]yySymType, len(yyS)*2) + copy(nyys, yyS) + yyS = nyys + } + yyS[yyp] = yyVAL + yyS[yyp].yys = yystate + +yynewstate: + if yychar < 0 { + yychar = yylex1(yylex, &yylval) + var ok bool + if yyxchar, ok = yyXLAT[yychar]; !ok { + yyxchar = len(yySymNames) // > tab width + } + } + if yyDebug >= 4 { + var a []int + for _, v := range yyS[:yyp+1] { + a = append(a, v.yys) + } + __yyfmt__.Printf("state stack %v\n", a) + } + row := yyParseTab[yystate] + yyn = 0 + if yyxchar < len(row) { + if yyn = int(row[yyxchar]); yyn != 0 { + yyn += yyTabOfs + } + } + switch { + case yyn > 0: // shift + yychar = -1 + yyVAL = yylval + yystate = yyn + yyshift = yyn + if yyDebug >= 2 { + __yyfmt__.Printf("shift, and goto state %d\n", yystate) + } + if Errflag > 0 { + Errflag-- + } + goto yystack + case yyn < 0: // reduce + case yystate == 1: // accept + if yyDebug >= 2 { + __yyfmt__.Println("accept") + } + goto ret0 + } + + if yyn == 0 { + /* error ... attempt to resume parsing */ + switch Errflag { + case 0: /* brand new error */ + if yyDebug >= 1 { + __yyfmt__.Printf("no action for %s in state %d\n", yySymName(yychar), yystate) + } + msg, ok := yyXErrors[yyXError{yystate, yyxchar}] + if !ok { + msg, ok = yyXErrors[yyXError{yystate, -1}] + } + if !ok && yyshift != 0 { + msg, ok = yyXErrors[yyXError{yyshift, yyxchar}] + } + if !ok { + msg, ok = yyXErrors[yyXError{yyshift, -1}] + } + if !ok || msg == "" { + msg = "syntax error" + } + yylex.Error(msg) + Nerrs++ + fallthrough + + case 1, 2: /* incompletely recovered error ... try again */ + Errflag = 3 + + /* find a state where "error" is a legal shift action */ + for yyp >= 0 { + row := yyParseTab[yyS[yyp].yys] + if yyError < len(row) { + yyn = int(row[yyError]) + yyTabOfs + if yyn > 0 { // hit + if yyDebug >= 2 { + __yyfmt__.Printf("error recovery found error shift in state %d\n", yyS[yyp].yys) + } + yystate = yyn /* simulate a shift of "error" */ + goto yystack + } + } + + /* the current p has no shift on "error", pop stack */ + if yyDebug >= 2 { + __yyfmt__.Printf("error recovery pops state %d\n", yyS[yyp].yys) + } + yyp-- + } + /* there is no state on the stack with an error shift ... abort */ + if yyDebug >= 2 { + __yyfmt__.Printf("error recovery failed\n") + } + goto ret1 + + case 3: /* no shift yet; clobber input char */ + if yyDebug >= 2 { + __yyfmt__.Printf("error recovery discards %s\n", yySymName(yychar)) + } + if yychar == yyEOFCode { + goto ret1 + } + + yychar = -1 + goto yynewstate /* try again in the same state */ + } + } + + r := -yyn + x0 := yyReductions[r] + x, n := x0.xsym, x0.components + yypt := yyp + _ = yypt // guard against "declared and not used" + + yyp -= n + if yyp+1 >= len(yyS) { + nyys := make([]yySymType, len(yyS)*2) + copy(nyys, yyS) + yyS = nyys + } + yyVAL = yyS[yyp+1] + + /* consult goto table to find next state */ + exState := yystate + yystate = int(yyParseTab[yyS[yyp].yys][x]) + yyTabOfs + /* reduction by production r */ + if yyDebug >= 2 { + __yyfmt__.Printf("reduce using rule %v (%s), and goto state %d\n", r, yySymNames[x], yystate) + } + + switch r { + case 2: + { + yylex.(*lexer).expr = yyS[yypt-0].item.(ast.ExprNode) + } + case 3: + { + yyVAL.item = &ast.AlterTableStmt{ + Table: yyS[yypt-1].item.(*ast.TableName), + Specs: yyS[yypt-0].item.([]*ast.AlterTableSpec), + } + } + case 4: + { + yyVAL.item = &ast.AlterTableSpec{ + Tp: ast.AlterTableOption, + Options: yyS[yypt-0].item.([]*ast.TableOption), + } + } + case 5: + { + yyVAL.item = &ast.AlterTableSpec{ + Tp: ast.AlterTableAddColumn, + Column: yyS[yypt-1].item.(*ast.ColumnDef), + Position: yyS[yypt-0].item.(*ast.ColumnPosition), + } + } + case 6: + { + constraint := yyS[yypt-0].item.(*ast.Constraint) + yyVAL.item = &ast.AlterTableSpec{ + Tp: ast.AlterTableAddConstraint, + Constraint: constraint, + } + } + case 7: + { + yyVAL.item = &ast.AlterTableSpec{ + Tp: ast.AlterTableDropColumn, + DropColumn: yyS[yypt-0].item.(*ast.ColumnName), + } + } + case 8: + { + yyVAL.item = &ast.AlterTableSpec{Tp: ast.AlterTableDropPrimaryKey} + } + case 9: + { + yyVAL.item = &ast.AlterTableSpec{ + Tp: ast.AlterTableDropIndex, + Name: yyS[yypt-0].item.(string), + } + } + case 10: + { + yyVAL.item = &ast.AlterTableSpec{ + Tp: ast.AlterTableDropForeignKey, + Name: yyS[yypt-0].item.(string), + } + } + case 15: + { + yyVAL.item = &ast.ColumnPosition{Tp: ast.ColumnPositionNone} + } + case 16: + { + yyVAL.item = &ast.ColumnPosition{Tp: ast.ColumnPositionFirst} + } + case 17: + { + yyVAL.item = &ast.ColumnPosition{ + Tp: ast.ColumnPositionAfter, + RelativeColumn: yyS[yypt-0].item.(*ast.ColumnName), + } + } + case 18: + { + yyVAL.item = []*ast.AlterTableSpec{yyS[yypt-0].item.(*ast.AlterTableSpec)} + } + case 19: + { + yyVAL.item = append(yyS[yypt-2].item.([]*ast.AlterTableSpec), yyS[yypt-0].item.(*ast.AlterTableSpec)) + } + case 20: + { + yyVAL.item = nil + } + case 21: + { + yyVAL.item = nil + } + case 22: + { + yyVAL.item = yyS[yypt-0].item.(string) + } + case 24: + { + yyVAL.item = &ast.Assignment{Column: yyS[yypt-2].item.(*ast.ColumnName), Expr: yyS[yypt-0].item.(ast.ExprNode)} + } + case 25: + { + yyVAL.item = []*ast.Assignment{yyS[yypt-0].item.(*ast.Assignment)} + } + case 26: + { + yyVAL.item = append(yyS[yypt-2].item.([]*ast.Assignment), yyS[yypt-0].item.(*ast.Assignment)) + } + case 27: + { + yyVAL.item = []*ast.Assignment{} + } + case 29: + { + yyVAL.item = &ast.BeginStmt{} + } + case 30: + { + yyVAL.item = &ast.BeginStmt{} + } + case 31: + { + yyVAL.item = &ast.ColumnDef{Name: yyS[yypt-2].item.(*ast.ColumnName), Tp: yyS[yypt-1].item.(*types.FieldType), Options: yyS[yypt-0].item.([]*ast.ColumnOption)} + } + case 32: + { + yyVAL.item = &ast.ColumnName{Name: model.NewCIStr(yyS[yypt-0].item.(string))} + } + case 33: + { + yyVAL.item = &ast.ColumnName{Table: model.NewCIStr(yyS[yypt-2].item.(string)), Name: model.NewCIStr(yyS[yypt-0].item.(string))} + } + case 34: + { + yyVAL.item = &ast.ColumnName{Schema: model.NewCIStr(yyS[yypt-4].item.(string)), Table: model.NewCIStr(yyS[yypt-2].item.(string)), Name: model.NewCIStr(yyS[yypt-0].item.(string))} + } + case 35: + { + yyVAL.item = []*ast.ColumnName{yyS[yypt-0].item.(*ast.ColumnName)} + } + case 36: + { + yyVAL.item = append(yyS[yypt-2].item.([]*ast.ColumnName), yyS[yypt-0].item.(*ast.ColumnName)) + } + case 37: + { + yyVAL.item = []*ast.ColumnName{} + } + case 38: + { + yyVAL.item = yyS[yypt-0].item.([]*ast.ColumnName) + } + case 39: + { + yyVAL.item = &ast.CommitStmt{} + } + case 40: + { + yyVAL.item = &ast.ColumnOption{Tp: ast.ColumnOptionNotNull} + } + case 41: + { + yyVAL.item = &ast.ColumnOption{Tp: ast.ColumnOptionNull} + } + case 42: + { + yyVAL.item = &ast.ColumnOption{Tp: ast.ColumnOptionAutoIncrement} + } + case 43: + { + yyVAL.item = &ast.ColumnOption{Tp: ast.ColumnOptionPrimaryKey} + } + case 44: + { + yyVAL.item = &ast.ColumnOption{Tp: ast.ColumnOptionUniq} + } + case 45: + { + yyVAL.item = &ast.ColumnOption{Tp: ast.ColumnOptionUniqKey} + } + case 46: + { + yyVAL.item = &ast.ColumnOption{Tp: ast.ColumnOptionDefaultValue, Expr: yyS[yypt-0].item.(ast.ExprNode)} + } + case 47: + { + nowFunc := &ast.FuncCallExpr{FnName: model.NewCIStr("CURRENT_TIMESTAMP")} + yyVAL.item = &ast.ColumnOption{Tp: ast.ColumnOptionOnUpdate, Expr: nowFunc} + } + case 48: + { + yyVAL.item = &ast.ColumnOption{Tp: ast.ColumnOptionComment} + } + case 49: + { + // See: https://dev.mysql.com/doc/refman/5.7/en/create-table.html + // The CHECK clause is parsed but ignored by all storage engines. + yyVAL.item = &ast.ColumnOption{} + } + case 50: + { + yyVAL.item = []*ast.ColumnOption{yyS[yypt-0].item.(*ast.ColumnOption)} + } + case 51: + { + yyVAL.item = append(yyS[yypt-1].item.([]*ast.ColumnOption), yyS[yypt-0].item.(*ast.ColumnOption)) + } + case 52: + { + yyVAL.item = []*ast.ColumnOption{} + } + case 53: + { + yyVAL.item = yyS[yypt-0].item.([]*ast.ColumnOption) + } + case 54: + { + c := &ast.Constraint{ + Tp: ast.ConstraintPrimaryKey, + Keys: yyS[yypt-2].item.([]*ast.IndexColName), + } + if yyS[yypt-0].item != nil { + c.Option = yyS[yypt-0].item.(*ast.IndexOption) + } + if yyS[yypt-4].item != nil { + if c.Option == nil { + c.Option = &ast.IndexOption{} + } + c.Option.Tp = yyS[yypt-4].item.(model.IndexType) + } + yyVAL.item = c + } + case 55: + { + c := &ast.Constraint{ + Tp: ast.ConstraintFulltext, + Keys: yyS[yypt-2].item.([]*ast.IndexColName), + Name: yyS[yypt-4].item.(string), + } + if yyS[yypt-0].item != nil { + c.Option = yyS[yypt-0].item.(*ast.IndexOption) + } + yyVAL.item = c + } + case 56: + { + c := &ast.Constraint{ + Tp: ast.ConstraintIndex, + Keys: yyS[yypt-2].item.([]*ast.IndexColName), + Name: yyS[yypt-5].item.(string), + } + if yyS[yypt-0].item != nil { + c.Option = yyS[yypt-0].item.(*ast.IndexOption) + } + if yyS[yypt-4].item != nil { + if c.Option == nil { + c.Option = &ast.IndexOption{} + } + c.Option.Tp = yyS[yypt-4].item.(model.IndexType) + } + yyVAL.item = c + } + case 57: + { + c := &ast.Constraint{ + Tp: ast.ConstraintKey, + Keys: yyS[yypt-2].item.([]*ast.IndexColName), + Name: yyS[yypt-5].item.(string), + } + if yyS[yypt-0].item != nil { + c.Option = yyS[yypt-0].item.(*ast.IndexOption) + } + if yyS[yypt-4].item != nil { + if c.Option == nil { + c.Option = &ast.IndexOption{} + } + c.Option.Tp = yyS[yypt-4].item.(model.IndexType) + } + yyVAL.item = c + } + case 58: + { + c := &ast.Constraint{ + Tp: ast.ConstraintUniq, + Keys: yyS[yypt-2].item.([]*ast.IndexColName), + Name: yyS[yypt-5].item.(string), + } + if yyS[yypt-0].item != nil { + c.Option = yyS[yypt-0].item.(*ast.IndexOption) + } + if yyS[yypt-4].item != nil { + if c.Option == nil { + c.Option = &ast.IndexOption{} + } + c.Option.Tp = yyS[yypt-4].item.(model.IndexType) + } + yyVAL.item = c + } + case 59: + { + c := &ast.Constraint{ + Tp: ast.ConstraintUniqIndex, + Keys: yyS[yypt-2].item.([]*ast.IndexColName), + Name: yyS[yypt-5].item.(string), + } + if yyS[yypt-0].item != nil { + c.Option = yyS[yypt-0].item.(*ast.IndexOption) + } + if yyS[yypt-4].item != nil { + if c.Option == nil { + c.Option = &ast.IndexOption{} + } + c.Option.Tp = yyS[yypt-4].item.(model.IndexType) + } + yyVAL.item = c + } + case 60: + { + c := &ast.Constraint{ + Tp: ast.ConstraintUniqKey, + Keys: yyS[yypt-2].item.([]*ast.IndexColName), + Name: yyS[yypt-5].item.(string), + } + if yyS[yypt-0].item != nil { + c.Option = yyS[yypt-0].item.(*ast.IndexOption) + } + if yyS[yypt-4].item != nil { + if c.Option == nil { + c.Option = &ast.IndexOption{} + } + c.Option.Tp = yyS[yypt-4].item.(model.IndexType) + } + yyVAL.item = c + } + case 61: + { + yyVAL.item = &ast.Constraint{ + Tp: ast.ConstraintForeignKey, + Keys: yyS[yypt-2].item.([]*ast.IndexColName), + Name: yyS[yypt-4].item.(string), + Refer: yyS[yypt-0].item.(*ast.ReferenceDef), + } + } + case 62: + { + yyVAL.item = &ast.ReferenceDef{Table: yyS[yypt-3].item.(*ast.TableName), IndexColNames: yyS[yypt-1].item.([]*ast.IndexColName)} + } + case 63: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr("CURRENT_TIMESTAMP")} + } + case 64: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr("CURRENT_TIMESTAMP")} + } + case 70: + { + yyVAL.item = ast.NewValueExpr(yyS[yypt-0].item) + } + case 71: + { + yyVAL.item = &ast.UnaryOperationExpr{Op: opcode.Plus, V: ast.NewValueExpr(yyS[yypt-0].item)} + } + case 72: + { + yyVAL.item = &ast.UnaryOperationExpr{Op: opcode.Minus, V: ast.NewValueExpr(yyS[yypt-0].item)} + } + case 75: + { + yyVAL.item = &ast.CreateIndexStmt{ + Unique: yyS[yypt-7].item.(bool), + IndexName: yyS[yypt-5].item.(string), + Table: yyS[yypt-3].item.(*ast.TableName), + IndexColNames: yyS[yypt-1].item.([]*ast.IndexColName), + } + if yylex.(*lexer).root { + break + } + } + case 76: + { + yyVAL.item = false + } + case 77: + { + yyVAL.item = true + } + case 78: + { + //Order is parsed but just ignored as MySQL did + yyVAL.item = &ast.IndexColName{Column: yyS[yypt-2].item.(*ast.ColumnName), Length: yyS[yypt-1].item.(int)} + } + case 79: + { + yyVAL.item = []*ast.IndexColName{} + } + case 80: + { + yyVAL.item = []*ast.IndexColName{yyS[yypt-0].item.(*ast.IndexColName)} + } + case 81: + { + yyVAL.item = append(yyS[yypt-2].item.([]*ast.IndexColName), yyS[yypt-0].item.(*ast.IndexColName)) + } + case 82: + { + yyVAL.item = &ast.CreateDatabaseStmt{ + IfNotExists: yyS[yypt-2].item.(bool), + Name: yyS[yypt-1].item.(string), + Options: yyS[yypt-0].item.([]*ast.DatabaseOption), + } + + if yylex.(*lexer).root { + break + } + } + case 84: + { + yyVAL.item = &ast.DatabaseOption{Tp: ast.DatabaseOptionCharset, Value: yyS[yypt-0].item.(string)} + } + case 85: + { + yyVAL.item = &ast.DatabaseOption{Tp: ast.DatabaseOptionCollate, Value: yyS[yypt-0].item.(string)} + } + case 86: + { + yyVAL.item = []*ast.DatabaseOption{} + } + case 88: + { + yyVAL.item = []*ast.DatabaseOption{yyS[yypt-0].item.(*ast.DatabaseOption)} + } + case 89: + { + yyVAL.item = append(yyS[yypt-1].item.([]*ast.DatabaseOption), yyS[yypt-0].item.(*ast.DatabaseOption)) + } + case 90: + { + tes := yyS[yypt-2].item.([]interface{}) + var columnDefs []*ast.ColumnDef + var constraints []*ast.Constraint + for _, te := range tes { + switch te := te.(type) { + case *ast.ColumnDef: + columnDefs = append(columnDefs, te) + case *ast.Constraint: + constraints = append(constraints, te) + } + } + if len(columnDefs) == 0 { + yylex.(*lexer).err("Column Definition List can't be empty.") + return 1 + } + yyVAL.item = &ast.CreateTableStmt{ + Table: yyS[yypt-4].item.(*ast.TableName), + IfNotExists: yyS[yypt-5].item.(bool), + Cols: columnDefs, + Constraints: constraints, + Options: yyS[yypt-0].item.([]*ast.TableOption), + } + } + case 91: + { + yyVAL.item = yyS[yypt-0].item + } + case 92: + { + yyVAL.item = nil + } + case 96: + { + yyVAL.item = &ast.DoStmt{ + Exprs: yyS[yypt-0].item.([]ast.ExprNode), + } + } + case 97: + { + // Single Table + join := &ast.Join{Left: &ast.TableSource{Source: yyS[yypt-3].item.(ast.ResultSetNode)}, Right: nil} + x := &ast.DeleteStmt{ + TableRefs: &ast.TableRefsClause{TableRefs: join}, + LowPriority: yyS[yypt-7].item.(bool), + Quick: yyS[yypt-6].item.(bool), + Ignore: yyS[yypt-5].item.(bool), + } + if yyS[yypt-2].item != nil { + x.Where = yyS[yypt-2].item.(ast.ExprNode) + } + if yyS[yypt-1].item != nil { + x.Order = yyS[yypt-1].item.(*ast.OrderByClause) + } + if yyS[yypt-0].item != nil { + x.Limit = yyS[yypt-0].item.(*ast.Limit) + } + + yyVAL.item = x + if yylex.(*lexer).root { + break + } + } + case 98: + { + // Multiple Table + x := &ast.DeleteStmt{ + LowPriority: yyS[yypt-6].item.(bool), + Quick: yyS[yypt-5].item.(bool), + Ignore: yyS[yypt-4].item.(bool), + IsMultiTable: true, + BeforeFrom: true, + Tables: &ast.DeleteTableList{Tables: yyS[yypt-3].item.([]*ast.TableName)}, + TableRefs: &ast.TableRefsClause{TableRefs: yyS[yypt-1].item.(*ast.Join)}, + } + if yyS[yypt-0].item != nil { + x.Where = yyS[yypt-0].item.(ast.ExprNode) + } + yyVAL.item = x + if yylex.(*lexer).root { + break + } + } + case 99: + { + // Multiple Table + x := &ast.DeleteStmt{ + LowPriority: yyS[yypt-7].item.(bool), + Quick: yyS[yypt-6].item.(bool), + Ignore: yyS[yypt-5].item.(bool), + IsMultiTable: true, + Tables: &ast.DeleteTableList{Tables: yyS[yypt-3].item.([]*ast.TableName)}, + TableRefs: &ast.TableRefsClause{TableRefs: yyS[yypt-1].item.(*ast.Join)}, + } + if yyS[yypt-0].item != nil { + x.Where = yyS[yypt-0].item.(ast.ExprNode) + } + yyVAL.item = x + if yylex.(*lexer).root { + break + } + } + case 102: + { + yyVAL.item = &ast.DropDatabaseStmt{IfExists: yyS[yypt-1].item.(bool), Name: yyS[yypt-0].item.(string)} + if yylex.(*lexer).root { + break + } + } + case 103: + { + yyVAL.item = &ast.DropIndexStmt{IfExists: yyS[yypt-3].item.(bool), IndexName: yyS[yypt-2].item.(string), Table: yyS[yypt-0].item.(*ast.TableName)} + } + case 104: + { + yyVAL.item = &ast.DropTableStmt{Tables: yyS[yypt-0].item.([]*ast.TableName)} + if yylex.(*lexer).root { + break + } + } + case 105: + { + yyVAL.item = &ast.DropTableStmt{IfExists: true, Tables: yyS[yypt-0].item.([]*ast.TableName)} + if yylex.(*lexer).root { + break + } + } + case 110: + { + yyVAL.item = nil + } + case 114: + { + yyVAL.item = &ast.ExplainStmt{ + Stmt: &ast.ShowStmt{ + Tp: ast.ShowColumns, + Table: yyS[yypt-0].item.(*ast.TableName), + }, + } + } + case 115: + { + yyVAL.item = &ast.ExplainStmt{ + Stmt: &ast.ShowStmt{ + Tp: ast.ShowColumns, + Table: yyS[yypt-1].item.(*ast.TableName), + Column: yyS[yypt-0].item.(*ast.ColumnName), + }, + } + } + case 116: + { + yyVAL.item = &ast.ExplainStmt{Stmt: yyS[yypt-0].item.(ast.StmtNode)} + } + case 117: + { + switch v := yyS[yypt-0].item.(type) { + case int64: + yyVAL.item = uint64(v) + case uint64: + yyVAL.item = uint64(v) + } + } + case 119: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: opcode.OrOr, L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 120: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: opcode.LogicXor, L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 121: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: opcode.AndAnd, L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 122: + { + yyVAL.item = &ast.UnaryOperationExpr{Op: opcode.Not, V: yyS[yypt-0].item.(ast.ExprNode)} + } + case 123: + { + yyVAL.item = &ast.IsTruthExpr{Expr: yyS[yypt-3].item.(ast.ExprNode), Not: yyS[yypt-1].item.(bool), True: int64(1)} + } + case 124: + { + yyVAL.item = &ast.IsTruthExpr{Expr: yyS[yypt-3].item.(ast.ExprNode), Not: yyS[yypt-1].item.(bool), True: int64(0)} + } + case 125: + { + /* https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_is */ + yyVAL.item = &ast.IsNullExpr{Expr: yyS[yypt-3].item.(ast.ExprNode), Not: yyS[yypt-1].item.(bool)} + } + case 132: + { + yyVAL.item = []ast.ExprNode{yyS[yypt-0].item.(ast.ExprNode)} + } + case 133: + { + yyVAL.item = append(yyS[yypt-2].item.([]ast.ExprNode), yyS[yypt-0].item.(ast.ExprNode)) + } + case 134: + { + yyVAL.item = []ast.ExprNode{} + } + case 136: + { + yyVAL.item = &ast.IsNullExpr{Expr: yyS[yypt-3].item.(ast.ExprNode), Not: yyS[yypt-1].item.(bool)} + } + case 137: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: yyS[yypt-1].item.(opcode.Op), L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 138: + { + yyVAL.item = &ast.CompareSubqueryExpr{Op: yyS[yypt-2].item.(opcode.Op), L: yyS[yypt-3].item.(ast.ExprNode), R: yyS[yypt-0].item.(*ast.SubqueryExpr), All: yyS[yypt-1].item.(bool)} + } + case 140: + { + yyVAL.item = opcode.GE + } + case 141: + { + yyVAL.item = opcode.GT + } + case 142: + { + yyVAL.item = opcode.LE + } + case 143: + { + yyVAL.item = opcode.LT + } + case 144: + { + yyVAL.item = opcode.NE + } + case 145: + { + yyVAL.item = opcode.NE + } + case 146: + { + yyVAL.item = opcode.EQ + } + case 147: + { + yyVAL.item = opcode.NullEQ + } + case 148: + { + yyVAL.item = false + } + case 149: + { + yyVAL.item = false + } + case 150: + { + yyVAL.item = true + } + case 151: + { + yyVAL.item = &ast.PatternInExpr{Expr: yyS[yypt-5].item.(ast.ExprNode), Not: yyS[yypt-4].item.(bool), List: yyS[yypt-1].item.([]ast.ExprNode)} + } + case 152: + { + yyVAL.item = &ast.PatternInExpr{Expr: yyS[yypt-3].item.(ast.ExprNode), Not: yyS[yypt-2].item.(bool), Sel: yyS[yypt-0].item.(*ast.SubqueryExpr)} + } + case 153: + { + yyVAL.item = &ast.BetweenExpr{ + Expr: yyS[yypt-5].item.(ast.ExprNode), + Left: yyS[yypt-2].item.(ast.ExprNode), + Right: yyS[yypt-0].item.(ast.ExprNode), + Not: yyS[yypt-4].item.(bool), + } + } + case 154: + { + escape := yyS[yypt-0].item.(string) + if len(escape) > 1 { + yylex.(*lexer).errf("Incorrect arguments %s to ESCAPE", escape) + return 1 + } else if len(escape) == 0 { + escape = "\\" + } + yyVAL.item = &ast.PatternLikeExpr{ + Expr: yyS[yypt-4].item.(ast.ExprNode), + Pattern: yyS[yypt-1].item.(ast.ExprNode), + Not: yyS[yypt-3].item.(bool), + Escape: escape[0], + } + } + case 155: + { + yyVAL.item = &ast.PatternRegexpExpr{Expr: yyS[yypt-3].item.(ast.ExprNode), Pattern: yyS[yypt-0].item.(ast.ExprNode), Not: yyS[yypt-2].item.(bool)} + } + case 159: + { + yyVAL.item = "\\" + } + case 160: + { + yyVAL.item = yyS[yypt-0].item + } + case 161: + { + yyVAL.item = false + } + case 162: + { + yyVAL.item = true + } + case 163: + { + yyVAL.item = &ast.SelectField{WildCard: &ast.WildCardField{}} + } + case 164: + { + wildCard := &ast.WildCardField{Table: model.NewCIStr(yyS[yypt-2].item.(string))} + yyVAL.item = &ast.SelectField{WildCard: wildCard} + } + case 165: + { + wildCard := &ast.WildCardField{Schema: model.NewCIStr(yyS[yypt-4].item.(string)), Table: model.NewCIStr(yyS[yypt-2].item.(string))} + yyVAL.item = &ast.SelectField{WildCard: wildCard} + } + case 166: + { + expr := yyS[yypt-1].item.(ast.ExprNode) + asName := yyS[yypt-0].item.(string) + yyVAL.item = &ast.SelectField{Expr: expr, AsName: model.NewCIStr(asName)} + } + case 167: + { + yyVAL.item = "" + } + case 168: + { + yyVAL.item = yyS[yypt-0].item + } + case 169: + { + yyVAL.item = yyS[yypt-0].item + } + case 170: + { + yyVAL.item = yyS[yypt-0].item + } + case 171: + { + yyVAL.item = yyS[yypt-0].item + } + case 172: + { + yyVAL.item = yyS[yypt-0].item + } + case 173: + { + field := yyS[yypt-0].item.(*ast.SelectField) + field.Offset = yylex.(*lexer).startOffset(yyS[yypt].offset) + yyVAL.item = []*ast.SelectField{field} + } + case 174: + { + + fl := yyS[yypt-2].item.([]*ast.SelectField) + last := fl[len(fl)-1] + l := yylex.(*lexer) + if last.Expr != nil && last.AsName.O == "" { + lastEnd := l.endOffset(yyS[yypt-1].offset) + last.SetText(l.src[last.Offset:lastEnd]) + } + newField := yyS[yypt-0].item.(*ast.SelectField) + newField.Offset = l.startOffset(yyS[yypt].offset) + yyVAL.item = append(fl, newField) + } + case 175: + { + yyVAL.item = &ast.GroupByClause{Items: yyS[yypt-0].item.([]*ast.ByItem)} + } + case 176: + { + yyVAL.item = nil + } + case 177: + { + yyVAL.item = &ast.HavingClause{Expr: yyS[yypt-0].item.(ast.ExprNode)} + } + case 178: + { + yyVAL.item = false + } + case 179: + { + yyVAL.item = true + } + case 180: + { + yyVAL.item = false + } + case 181: + { + yyVAL.item = true + } + case 182: + { + yyVAL.item = false + } + case 183: + { + yyVAL.item = true + } + case 184: + { + yyVAL.item = "" + } + case 185: + { + //"index name" + yyVAL.item = yyS[yypt-0].item.(string) + } + case 186: + { + yyVAL.item = nil + } + case 187: + { + yyVAL.item = &ast.IndexOption{ + KeyBlockSize: yyS[yypt-2].item.(uint64), + } + } + case 188: + { + yyVAL.item = &ast.IndexOption{ + Tp: yyS[yypt-0].item.(model.IndexType), + } + } + case 189: + { + yyVAL.item = &ast.IndexOption{ + Comment: yyS[yypt-0].item.(string), + } + } + case 190: + { + yyVAL.item = model.IndexTypeBtree + } + case 191: + { + yyVAL.item = model.IndexTypeHash + } + case 192: + { + yyVAL.item = nil + } + case 193: + { + yyVAL.item = yyS[yypt-0].item + } + case 321: + { + x := yyS[yypt-1].item.(*ast.InsertStmt) + x.Priority = yyS[yypt-5].item.(int) + // Wraps many layers here so that it can be processed the same way as select statement. + ts := &ast.TableSource{Source: yyS[yypt-2].item.(*ast.TableName)} + x.Table = &ast.TableRefsClause{TableRefs: &ast.Join{Left: ts}} + if yyS[yypt-0].item != nil { + x.OnDuplicate = yyS[yypt-0].item.([]*ast.Assignment) + } + yyVAL.item = x + if yylex.(*lexer).root { + break + } + } + case 324: + { + yyVAL.item = &ast.InsertStmt{ + Columns: yyS[yypt-3].item.([]*ast.ColumnName), + Lists: yyS[yypt-0].item.([][]ast.ExprNode), + } + } + case 325: + { + yyVAL.item = &ast.InsertStmt{Columns: yyS[yypt-2].item.([]*ast.ColumnName), Select: yyS[yypt-0].item.(*ast.SelectStmt)} + } + case 326: + { + yyVAL.item = &ast.InsertStmt{Columns: yyS[yypt-2].item.([]*ast.ColumnName), Select: yyS[yypt-0].item.(*ast.UnionStmt)} + } + case 327: + { + yyVAL.item = &ast.InsertStmt{Lists: yyS[yypt-0].item.([][]ast.ExprNode)} + } + case 328: + { + yyVAL.item = &ast.InsertStmt{Select: yyS[yypt-0].item.(*ast.SelectStmt)} + } + case 329: + { + yyVAL.item = &ast.InsertStmt{Select: yyS[yypt-0].item.(*ast.UnionStmt)} + } + case 330: + { + yyVAL.item = &ast.InsertStmt{Setlist: yyS[yypt-0].item.([]*ast.Assignment)} + } + case 333: + { + yyVAL.item = [][]ast.ExprNode{[]ast.ExprNode{}} + } + case 334: + { + yyVAL.item = append([][]ast.ExprNode{[]ast.ExprNode{}}, yyS[yypt-0].item.([][]ast.ExprNode)...) + } + case 335: + { + yyVAL.item = [][]ast.ExprNode{yyS[yypt-1].item.([]ast.ExprNode)} + } + case 336: + { + yyVAL.item = append([][]ast.ExprNode{yyS[yypt-3].item.([]ast.ExprNode)}, yyS[yypt-0].item.([][]ast.ExprNode)...) + } + case 337: + { + yyVAL.item = &ast.Assignment{ + Column: yyS[yypt-2].item.(*ast.ColumnName), + Expr: yyS[yypt-0].item.(ast.ExprNode), + } + } + case 338: + { + yyVAL.item = []*ast.Assignment{} + } + case 339: + { + yyVAL.item = []*ast.Assignment{yyS[yypt-0].item.(*ast.Assignment)} + } + case 340: + { + yyVAL.item = append(yyS[yypt-2].item.([]*ast.Assignment), yyS[yypt-0].item.(*ast.Assignment)) + } + case 341: + { + yyVAL.item = nil + } + case 342: + { + yyVAL.item = yyS[yypt-0].item + } + case 343: + { + x := yyS[yypt-0].item.(*ast.InsertStmt) + x.IsReplace = true + x.Priority = yyS[yypt-3].item.(int) + ts := &ast.TableSource{Source: yyS[yypt-1].item.(*ast.TableName)} + x.Table = &ast.TableRefsClause{TableRefs: &ast.Join{Left: ts}} + yyVAL.item = x + } + case 344: + { + yyVAL.item = ast.NoPriority + } + case 345: + { + yyVAL.item = ast.LowPriority + } + case 346: + { + yyVAL.item = ast.DelayedPriority + } + case 347: + { + yyVAL.item = int64(0) + } + case 349: + { + yyVAL.item = int64(1) + } + case 352: + { + tp := types.NewFieldType(mysql.TypeString) + l := yylex.(*lexer) + tp.Charset, tp.Collate = l.GetCharsetInfo() + expr := ast.NewValueExpr(yyS[yypt-0].item) + expr.SetType(tp) + yyVAL.item = expr + } + case 353: + { + // See: https://dev.mysql.com/doc/refman/5.7/en/charset-literal.html + tp := types.NewFieldType(mysql.TypeString) + tp.Charset = yyS[yypt-1].item.(string) + co, err := charset.GetDefaultCollation(tp.Charset) + if err != nil { + l := yylex.(*lexer) + l.errf("Get collation error for charset: %s", tp.Charset) + return 1 + } + tp.Collate = co + expr := ast.NewValueExpr(yyS[yypt-0].item) + expr.SetType(tp) + yyVAL.item = expr + } + case 356: + { + yyVAL.item = ast.NewValueExpr(yyS[yypt-0].item) + } + case 357: + { + yyVAL.item = &ast.ColumnNameExpr{Name: yyS[yypt-0].item.(*ast.ColumnName)} + } + case 358: + { + l := yylex.(*lexer) + startOffset := l.startOffset(yyS[yypt-1].offset) + endOffset := l.endOffset(yyS[yypt].offset) + expr := yyS[yypt-1].item.(ast.ExprNode) + expr.SetText(l.src[startOffset:endOffset]) + yyVAL.item = &ast.ParenthesesExpr{Expr: expr} + } + case 359: + { + yyVAL.item = &ast.DefaultExpr{} + } + case 360: + { + yyVAL.item = &ast.DefaultExpr{Name: yyS[yypt-1].item.(*ast.ColumnName)} + } + case 361: + { + yyVAL.item = yyS[yypt-0].item + } + case 362: + { + yyVAL.item = &ast.ParamMarkerExpr{ + Offset: yyS[yypt].offset, + } + } + case 363: + { + values := append([]ast.ExprNode{yyS[yypt-3].item.(ast.ExprNode)}, yyS[yypt-1].item.([]ast.ExprNode)...) + yyVAL.item = &ast.RowExpr{Values: values} + } + case 364: + { + values := append([]ast.ExprNode{yyS[yypt-3].item.(ast.ExprNode)}, yyS[yypt-1].item.([]ast.ExprNode)...) + yyVAL.item = &ast.RowExpr{Values: values} + } + case 365: + { + yyVAL.item = &ast.ExistsSubqueryExpr{Sel: yyS[yypt-0].item.(*ast.SubqueryExpr)} + } + case 366: + { + yyVAL.item = &ast.OrderByClause{Items: yyS[yypt-0].item.([]*ast.ByItem)} + } + case 367: + { + yyVAL.item = []*ast.ByItem{yyS[yypt-0].item.(*ast.ByItem)} + } + case 368: + { + yyVAL.item = append(yyS[yypt-2].item.([]*ast.ByItem), yyS[yypt-0].item.(*ast.ByItem)) + } + case 369: + { + expr := yyS[yypt-1].item + valueExpr, ok := expr.(*ast.ValueExpr) + if ok { + position, isPosition := valueExpr.GetValue().(int64) + if isPosition { + expr = &ast.PositionExpr{N: int(position)} + } + } + yyVAL.item = &ast.ByItem{Expr: expr.(ast.ExprNode), Desc: yyS[yypt-0].item.(bool)} + } + case 370: + { + yyVAL.item = false // ASC by default + } + case 371: + { + yyVAL.item = false + } + case 372: + { + yyVAL.item = true + } + case 373: + { + yyVAL.item = nil + } + case 374: + { + yyVAL.item = yyS[yypt-0].item + } + case 378: + { + yyVAL.item = &ast.UnaryOperationExpr{Op: opcode.Not, V: yyS[yypt-0].item.(ast.ExprNode)} + } + case 379: + { + yyVAL.item = &ast.UnaryOperationExpr{Op: opcode.BitNeg, V: yyS[yypt-0].item.(ast.ExprNode)} + } + case 380: + { + yyVAL.item = &ast.UnaryOperationExpr{Op: opcode.Minus, V: yyS[yypt-0].item.(ast.ExprNode)} + } + case 381: + { + yyVAL.item = &ast.UnaryOperationExpr{Op: opcode.Plus, V: yyS[yypt-0].item.(ast.ExprNode)} + } + case 382: + { + // See: https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#operator_binary + x := types.NewFieldType(mysql.TypeString) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + yyVAL.item = &ast.FuncCastExpr{ + Expr: yyS[yypt-0].item.(ast.ExprNode), + Tp: x, + FunctionType: ast.CastBinaryOperator, + } + } + case 383: + { + // TODO: Create a builtin function hold expr and collation. When do evaluation, convert expr result using the collation. + yyVAL.item = yyS[yypt-2].item + } + case 396: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: yyS[yypt-1].item.([]ast.ExprNode)} + } + case 397: + { + // See: https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_current-user + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-0].item.(string))} + } + case 398: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-0].item.(string))} + } + case 399: + { + yyVAL.item = false + } + case 400: + { + yyVAL.item = false + } + case 401: + { + yyVAL.item = true + } + case 402: + { + yyVAL.item = true + } + case 403: + { + /* See: https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#function_cast */ + yyVAL.item = &ast.FuncCastExpr{ + Expr: yyS[yypt-3].item.(ast.ExprNode), + Tp: yyS[yypt-1].item.(*types.FieldType), + FunctionType: ast.CastFunction, + } + } + case 404: + { + x := &ast.CaseExpr{WhenClauses: yyS[yypt-2].item.([]*ast.WhenClause)} + if yyS[yypt-3].item != nil { + x.Value = yyS[yypt-3].item.(ast.ExprNode) + } + if yyS[yypt-1].item != nil { + x.ElseClause = yyS[yypt-1].item.(ast.ExprNode) + } + yyVAL.item = x + } + case 405: + { + // See: https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#function_convert + charset := ast.NewValueExpr(yyS[yypt-1].item) + yyVAL.item = &ast.FuncCallExpr{ + FnName: model.NewCIStr(yyS[yypt-5].item.(string)), + Args: []ast.ExprNode{yyS[yypt-3].item.(ast.ExprNode), charset}, + } + } + case 406: + { + // See: https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#function_convert + yyVAL.item = &ast.FuncCastExpr{ + Expr: yyS[yypt-3].item.(ast.ExprNode), + Tp: yyS[yypt-1].item.(*types.FieldType), + FunctionType: ast.CastConvertFunction, + } + } + case 407: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 408: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-2].item.(string))} + } + case 409: + { + // TODO: support qualified identifier for column_name + yyVAL.item = &ast.ValuesExpr{Column: &ast.ColumnNameExpr{Name: yyS[yypt-1].item.(*ast.ColumnName)}} + } + case 410: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: yyS[yypt-1].item.([]ast.ExprNode)} + } + case 411: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 412: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: yyS[yypt-1].item.([]ast.ExprNode)} + } + case 413: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-2].item.(string))} + } + case 414: + { + args := []ast.ExprNode{} + if yyS[yypt-1].item != nil { + args = append(args, yyS[yypt-1].item.(ast.ExprNode)) + } + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: args} + } + case 415: + { + args := []ast.ExprNode{} + if yyS[yypt-0].item != nil { + args = append(args, yyS[yypt-0].item.(ast.ExprNode)) + } + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-1].item.(string)), Args: args} + } + case 416: + { + args := []ast.ExprNode{} + if yyS[yypt-0].item != nil { + args = append(args, yyS[yypt-0].item.(ast.ExprNode)) + } + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-1].item.(string)), Args: args} + } + case 417: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 418: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: yyS[yypt-1].item.([]ast.ExprNode)} + } + case 419: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: yyS[yypt-1].item.([]ast.ExprNode)} + } + case 420: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 421: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 422: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 423: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 424: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 425: + { + op := ast.NewValueExpr(yyS[yypt-7].item) + dateArithInterval := ast.NewValueExpr( + ast.DateArithInterval{ + Unit: yyS[yypt-1].item.(string), + Interval: yyS[yypt-2].item.(ast.ExprNode), + }, + ) + + yyVAL.item = &ast.FuncCallExpr{ + FnName: model.NewCIStr("DATE_ARITH"), + Args: []ast.ExprNode{ + op, + yyS[yypt-5].item.(ast.ExprNode), + dateArithInterval, + }, + } + } + case 426: + { + op := ast.NewValueExpr(yyS[yypt-5].item) + dateArithInterval := ast.NewValueExpr(yyS[yypt-1].item) + yyVAL.item = &ast.FuncCallExpr{ + FnName: model.NewCIStr("DATE_ARITH"), + Args: []ast.ExprNode{ + op, + yyS[yypt-3].item.(ast.ExprNode), + dateArithInterval, + }, + } + } + case 427: + { + timeUnit := ast.NewValueExpr(yyS[yypt-3].item) + yyVAL.item = &ast.FuncCallExpr{ + FnName: model.NewCIStr(yyS[yypt-5].item.(string)), + Args: []ast.ExprNode{timeUnit, yyS[yypt-1].item.(ast.ExprNode)}, + } + } + case 428: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-2].item.(string))} + } + case 429: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 430: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: yyS[yypt-1].item.([]ast.ExprNode)} + } + case 431: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 432: + { + yyVAL.item = &ast.FuncCallExpr{ + FnName: model.NewCIStr(yyS[yypt-5].item.(string)), + Args: []ast.ExprNode{yyS[yypt-3].item.(ast.ExprNode), yyS[yypt-1].item.(ast.ExprNode)}, + } + } + case 433: + { + yyVAL.item = &ast.FuncCallExpr{ + FnName: model.NewCIStr(yyS[yypt-7].item.(string)), + Args: []ast.ExprNode{yyS[yypt-5].item.(ast.ExprNode), yyS[yypt-3].item.(ast.ExprNode), yyS[yypt-1].item.(ast.ExprNode)}, + } + } + case 434: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 435: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 436: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 437: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 438: + { + args := []ast.ExprNode{} + if yyS[yypt-1].item != nil { + args = append(args, yyS[yypt-1].item.(ast.ExprNode)) + } + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: args} + } + case 439: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: yyS[yypt-1].item.([]ast.ExprNode)} + } + case 440: + { + args := []ast.ExprNode{yyS[yypt-3].item.(ast.ExprNode), yyS[yypt-1].item.(ast.ExprNode)} + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-5].item.(string)), Args: args} + } + case 441: + { + args := []ast.ExprNode{yyS[yypt-3].item.(ast.ExprNode), yyS[yypt-1].item.(ast.ExprNode)} + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-5].item.(string)), Args: args} + } + case 442: + { + + args := []ast.ExprNode{} + if yyS[yypt-1].item != nil { + args = append(args, yyS[yypt-1].item.(ast.ExprNode)) + } + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: args} + } + case 443: + { + args := []ast.ExprNode{yyS[yypt-5].item.(ast.ExprNode), yyS[yypt-3].item.(ast.ExprNode), yyS[yypt-1].item.(ast.ExprNode)} + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-7].item.(string)), Args: args} + } + case 444: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 445: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-5].item.(string)), Args: []ast.ExprNode{yyS[yypt-3].item.(ast.ExprNode), yyS[yypt-1].item.(ast.ExprNode)}} + } + case 446: + { + yyVAL.item = &ast.FuncCallExpr{ + FnName: model.NewCIStr(yyS[yypt-5].item.(string)), + Args: []ast.ExprNode{yyS[yypt-3].item.(ast.ExprNode), yyS[yypt-1].item.(ast.ExprNode)}, + } + } + case 447: + { + yyVAL.item = &ast.FuncCallExpr{ + FnName: model.NewCIStr(yyS[yypt-5].item.(string)), + Args: []ast.ExprNode{yyS[yypt-3].item.(ast.ExprNode), yyS[yypt-1].item.(ast.ExprNode)}, + } + } + case 448: + { + yyVAL.item = &ast.FuncCallExpr{ + FnName: model.NewCIStr(yyS[yypt-7].item.(string)), + Args: []ast.ExprNode{yyS[yypt-5].item.(ast.ExprNode), yyS[yypt-3].item.(ast.ExprNode), yyS[yypt-1].item.(ast.ExprNode)}, + } + } + case 449: + { + yyVAL.item = &ast.FuncCallExpr{ + FnName: model.NewCIStr(yyS[yypt-7].item.(string)), + Args: []ast.ExprNode{yyS[yypt-5].item.(ast.ExprNode), yyS[yypt-3].item.(ast.ExprNode), yyS[yypt-1].item.(ast.ExprNode)}, + } + } + case 450: + { + yyVAL.item = &ast.FuncCallExpr{ + FnName: model.NewCIStr(yyS[yypt-7].item.(string)), + Args: []ast.ExprNode{yyS[yypt-5].item.(ast.ExprNode), yyS[yypt-3].item.(ast.ExprNode), yyS[yypt-1].item.(ast.ExprNode)}, + } + } + case 451: + { + args := []ast.ExprNode{} + if yyS[yypt-1].item != nil { + args = append(args, yyS[yypt-1].item.(ast.ExprNode)) + } + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: args} + } + case 452: + { + yyVAL.item = &ast.FuncCallExpr{ + FnName: model.NewCIStr(yyS[yypt-3].item.(string)), + Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}, + } + } + case 453: + { + yyVAL.item = &ast.FuncCallExpr{ + FnName: model.NewCIStr(yyS[yypt-5].item.(string)), + Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode), yyS[yypt-3].item.(ast.ExprNode)}, + } + } + case 454: + { + nilVal := ast.NewValueExpr(nil) + direction := ast.NewValueExpr(yyS[yypt-3].item) + yyVAL.item = &ast.FuncCallExpr{ + FnName: model.NewCIStr(yyS[yypt-5].item.(string)), + Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode), nilVal, direction}, + } + } + case 455: + { + direction := ast.NewValueExpr(yyS[yypt-4].item) + yyVAL.item = &ast.FuncCallExpr{ + FnName: model.NewCIStr(yyS[yypt-6].item.(string)), + Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode), yyS[yypt-3].item.(ast.ExprNode), direction}, + } + } + case 456: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 457: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 458: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}} + } + case 459: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-3].item.(string)), Args: yyS[yypt-1].item.([]ast.ExprNode)} + } + case 460: + { + yyVAL.item = &ast.FuncCallExpr{FnName: model.NewCIStr(yyS[yypt-2].item.(string))} + } + case 461: + { + yyVAL.item = ast.DateAdd + } + case 462: + { + yyVAL.item = ast.DateSub + } + case 463: + { + yyVAL.item = ast.DateAdd + } + case 464: + { + yyVAL.item = ast.DateSub + } + case 465: + { + yyVAL.item = ast.DateArithInterval{ + Unit: "day", + Interval: yyS[yypt-0].item.(ast.ExprNode), + } + } + case 466: + { + yyVAL.item = ast.DateArithInterval{Unit: yyS[yypt-0].item.(string), Interval: yyS[yypt-1].item.(ast.ExprNode)} + } + case 467: + { + yyVAL.item = ast.TrimBoth + } + case 468: + { + yyVAL.item = ast.TrimLeading + } + case 469: + { + yyVAL.item = ast.TrimTrailing + } + case 470: + { + yyVAL.item = &ast.AggregateFuncExpr{F: yyS[yypt-4].item.(string), Args: yyS[yypt-1].item.([]ast.ExprNode), Distinct: yyS[yypt-2].item.(bool)} + } + case 471: + { + yyVAL.item = &ast.AggregateFuncExpr{F: yyS[yypt-4].item.(string), Args: yyS[yypt-1].item.([]ast.ExprNode), Distinct: yyS[yypt-2].item.(bool)} + } + case 472: + { + args := []ast.ExprNode{ast.NewValueExpr(ast.UnquoteString("*"))} + yyVAL.item = &ast.AggregateFuncExpr{F: yyS[yypt-4].item.(string), Args: args, Distinct: yyS[yypt-2].item.(bool)} + } + case 473: + { + yyVAL.item = &ast.AggregateFuncExpr{F: yyS[yypt-4].item.(string), Args: yyS[yypt-1].item.([]ast.ExprNode), Distinct: yyS[yypt-2].item.(bool)} + } + case 474: + { + yyVAL.item = &ast.AggregateFuncExpr{F: yyS[yypt-4].item.(string), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}, Distinct: yyS[yypt-2].item.(bool)} + } + case 475: + { + yyVAL.item = &ast.AggregateFuncExpr{F: yyS[yypt-4].item.(string), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}, Distinct: yyS[yypt-2].item.(bool)} + } + case 476: + { + yyVAL.item = &ast.AggregateFuncExpr{F: yyS[yypt-4].item.(string), Args: []ast.ExprNode{yyS[yypt-1].item.(ast.ExprNode)}, Distinct: yyS[yypt-2].item.(bool)} + } + case 477: + { + yyVAL.item = nil + } + case 478: + { + yyVAL.item = nil + } + case 479: + { + yyVAL.item = yyS[yypt-1].item + } + case 500: + { + yyVAL.item = nil + } + case 501: + { + yyVAL.item = yyS[yypt-0].item + } + case 502: + { + yyVAL.item = []*ast.WhenClause{yyS[yypt-0].item.(*ast.WhenClause)} + } + case 503: + { + yyVAL.item = append(yyS[yypt-1].item.([]*ast.WhenClause), yyS[yypt-0].item.(*ast.WhenClause)) + } + case 504: + { + yyVAL.item = &ast.WhenClause{ + Expr: yyS[yypt-2].item.(ast.ExprNode), + Result: yyS[yypt-0].item.(ast.ExprNode), + } + } + case 505: + { + yyVAL.item = nil + } + case 506: + { + yyVAL.item = yyS[yypt-0].item + } + case 507: + { + x := types.NewFieldType(mysql.TypeString) + x.Flen = yyS[yypt-0].item.(int) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + yyVAL.item = x + } + case 508: + { + x := types.NewFieldType(mysql.TypeString) + x.Flen = yyS[yypt-2].item.(int) + if yyS[yypt-1].item.(bool) { + x.Flag |= mysql.BinaryFlag + } + x.Charset = yyS[yypt-0].item.(string) + yyVAL.item = x + } + case 509: + { + x := types.NewFieldType(mysql.TypeDate) + yyVAL.item = x + } + case 510: + { + x := types.NewFieldType(mysql.TypeDatetime) + x.Decimal = yyS[yypt-0].item.(int) + yyVAL.item = x + } + case 511: + { + fopt := yyS[yypt-0].item.(*ast.FloatOpt) + x := types.NewFieldType(mysql.TypeNewDecimal) + x.Flen = fopt.Flen + x.Decimal = fopt.Decimal + yyVAL.item = x + } + case 512: + { + x := types.NewFieldType(mysql.TypeDuration) + x.Decimal = yyS[yypt-0].item.(int) + yyVAL.item = x + } + case 513: + { + x := types.NewFieldType(mysql.TypeLonglong) + yyVAL.item = x + } + case 514: + { + x := types.NewFieldType(mysql.TypeLonglong) + x.Flag |= mysql.UnsignedFlag + yyVAL.item = x + } + case 515: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: opcode.Or, L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 516: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: opcode.And, L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 517: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: opcode.LeftShift, L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 518: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: opcode.RightShift, L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 519: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: opcode.Plus, L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 520: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: opcode.Minus, L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 521: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: opcode.Mul, L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 522: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: opcode.Div, L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 523: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: opcode.Mod, L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 524: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: opcode.IntDiv, L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 525: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: opcode.Mod, L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 526: + { + yyVAL.item = &ast.BinaryOperationExpr{Op: opcode.Xor, L: yyS[yypt-2].item.(ast.ExprNode), R: yyS[yypt-0].item.(ast.ExprNode)} + } + case 528: + { + yyVAL.item = ast.NoPriority + } + case 529: + { + yyVAL.item = ast.LowPriority + } + case 530: + { + yyVAL.item = ast.HighPriority + } + case 531: + { + yyVAL.item = ast.DelayedPriority + } + case 532: + { + yyVAL.item = false + } + case 533: + { + yyVAL.item = true + } + case 534: + { + yyVAL.item = &ast.TableName{Name: model.NewCIStr(yyS[yypt-0].item.(string))} + } + case 535: + { + yyVAL.item = &ast.TableName{Schema: model.NewCIStr(yyS[yypt-2].item.(string)), Name: model.NewCIStr(yyS[yypt-0].item.(string))} + } + case 536: + { + tbl := []*ast.TableName{yyS[yypt-0].item.(*ast.TableName)} + yyVAL.item = tbl + } + case 537: + { + yyVAL.item = append(yyS[yypt-2].item.([]*ast.TableName), yyS[yypt-0].item.(*ast.TableName)) + } + case 538: + { + yyVAL.item = false + } + case 539: + { + yyVAL.item = true + } + case 540: + { + var sqlText string + var sqlVar *ast.VariableExpr + switch yyS[yypt-0].item.(type) { + case string: + sqlText = yyS[yypt-0].item.(string) + case *ast.VariableExpr: + sqlVar = yyS[yypt-0].item.(*ast.VariableExpr) + } + yyVAL.item = &ast.PrepareStmt{ + Name: yyS[yypt-2].item.(string), + SQLText: sqlText, + SQLVar: sqlVar, + } + } + case 543: + { + yyVAL.item = &ast.ExecuteStmt{Name: yyS[yypt-0].item.(string)} + } + case 544: + { + yyVAL.item = &ast.ExecuteStmt{ + Name: yyS[yypt-2].item.(string), + UsingVars: yyS[yypt-0].item.([]ast.ExprNode), + } + } + case 545: + { + yyVAL.item = []ast.ExprNode{yyS[yypt-0].item.(ast.ExprNode)} + } + case 546: + { + yyVAL.item = append(yyS[yypt-2].item.([]ast.ExprNode), yyS[yypt-0].item.(ast.ExprNode)) + } + case 547: + { + yyVAL.item = &ast.DeallocateStmt{Name: yyS[yypt-0].item.(string)} + } + case 550: + { + yyVAL.item = &ast.RollbackStmt{} + } + case 551: + { + st := &ast.SelectStmt{ + Distinct: yyS[yypt-3].item.(bool), + Fields: yyS[yypt-2].item.(*ast.FieldList), + LockTp: yyS[yypt-0].item.(ast.SelectLockType), + } + lastField := st.Fields.Fields[len(st.Fields.Fields)-1] + if lastField.Expr != nil && lastField.AsName.O == "" { + src := yylex.(*lexer).src + var lastEnd int + if yyS[yypt-1].item != nil { + lastEnd = yyS[yypt-1].offset - 1 + } else if yyS[yypt-0].item != ast.SelectLockNone { + lastEnd = yyS[yypt].offset - 1 + } else { + lastEnd = len(src) + if src[lastEnd-1] == ';' { + lastEnd-- + } + } + lastField.SetText(src[lastField.Offset:lastEnd]) + } + if yyS[yypt-1].item != nil { + st.Limit = yyS[yypt-1].item.(*ast.Limit) + } + yyVAL.item = st + } + case 552: + { + st := &ast.SelectStmt{ + Distinct: yyS[yypt-5].item.(bool), + Fields: yyS[yypt-4].item.(*ast.FieldList), + LockTp: yyS[yypt-0].item.(ast.SelectLockType), + } + lastField := st.Fields.Fields[len(st.Fields.Fields)-1] + if lastField.Expr != nil && lastField.AsName.O == "" { + lastEnd := yyS[yypt-3].offset - 1 + lastField.SetText(yylex.(*lexer).src[lastField.Offset:lastEnd]) + } + if yyS[yypt-2].item != nil { + st.Where = yyS[yypt-2].item.(ast.ExprNode) + } + if yyS[yypt-1].item != nil { + st.Limit = yyS[yypt-1].item.(*ast.Limit) + } + yyVAL.item = st + } + case 553: + { + st := &ast.SelectStmt{ + Distinct: yyS[yypt-9].item.(bool), + Fields: yyS[yypt-8].item.(*ast.FieldList), + From: yyS[yypt-6].item.(*ast.TableRefsClause), + LockTp: yyS[yypt-0].item.(ast.SelectLockType), + } + + lastField := st.Fields.Fields[len(st.Fields.Fields)-1] + if lastField.Expr != nil && lastField.AsName.O == "" { + lastEnd := yyS[yypt-7].offset - 1 + lastField.SetText(yylex.(*lexer).src[lastField.Offset:lastEnd]) + } + + if yyS[yypt-5].item != nil { + st.Where = yyS[yypt-5].item.(ast.ExprNode) + } + + if yyS[yypt-4].item != nil { + st.GroupBy = yyS[yypt-4].item.(*ast.GroupByClause) + } + + if yyS[yypt-3].item != nil { + st.Having = yyS[yypt-3].item.(*ast.HavingClause) + } + + if yyS[yypt-2].item != nil { + st.OrderBy = yyS[yypt-2].item.(*ast.OrderByClause) + } + + if yyS[yypt-1].item != nil { + st.Limit = yyS[yypt-1].item.(*ast.Limit) + } + + yyVAL.item = st + } + case 555: + { + yyVAL.item = &ast.TableRefsClause{TableRefs: yyS[yypt-0].item.(*ast.Join)} + } + case 556: + { + if j, ok := yyS[yypt-0].item.(*ast.Join); ok { + // if $1 is Join, use it directly + yyVAL.item = j + } else { + yyVAL.item = &ast.Join{Left: yyS[yypt-0].item.(ast.ResultSetNode), Right: nil} + } + } + case 557: + { + /* from a, b is default cross join */ + yyVAL.item = &ast.Join{Left: yyS[yypt-2].item.(ast.ResultSetNode), Right: yyS[yypt-0].item.(ast.ResultSetNode), Tp: ast.CrossJoin} + } + case 558: + { + yyVAL.item = yyS[yypt-0].item + } + case 559: + { + /* + * ODBC escape syntax for outer join is { OJ join_table } + * Use an Identifier for OJ + */ + yyVAL.item = yyS[yypt-1].item + } + case 560: + { + yyVAL.item = yyS[yypt-0].item + } + case 561: + { + yyVAL.item = yyS[yypt-0].item + } + case 562: + { + yyVAL.item = &ast.TableSource{Source: yyS[yypt-1].item.(*ast.TableName), AsName: yyS[yypt-0].item.(model.CIStr)} + } + case 563: + { + st := yyS[yypt-2].item.(*ast.SelectStmt) + l := yylex.(*lexer) + endOffset := l.endOffset(yyS[yypt-1].offset) + l.SetLastSelectFieldText(st, endOffset) + yyVAL.item = &ast.TableSource{Source: yyS[yypt-2].item.(*ast.SelectStmt), AsName: yyS[yypt-0].item.(model.CIStr)} + } + case 564: + { + yyVAL.item = &ast.TableSource{Source: yyS[yypt-2].item.(*ast.UnionStmt), AsName: yyS[yypt-0].item.(model.CIStr)} + } + case 565: + { + yyVAL.item = yyS[yypt-1].item + } + case 566: + { + yyVAL.item = model.CIStr{} + } + case 567: + { + yyVAL.item = yyS[yypt-0].item + } + case 568: + { + yyVAL.item = model.NewCIStr(yyS[yypt-0].item.(string)) + } + case 569: + { + yyVAL.item = model.NewCIStr(yyS[yypt-0].item.(string)) + } + case 570: + { + yyVAL.item = &ast.Join{Left: yyS[yypt-2].item.(ast.ResultSetNode), Right: yyS[yypt-0].item.(ast.ResultSetNode), Tp: ast.CrossJoin} + } + case 571: + { + on := &ast.OnCondition{Expr: yyS[yypt-0].item.(ast.ExprNode)} + yyVAL.item = &ast.Join{Left: yyS[yypt-4].item.(ast.ResultSetNode), Right: yyS[yypt-2].item.(ast.ResultSetNode), Tp: ast.CrossJoin, On: on} + } + case 572: + { + on := &ast.OnCondition{Expr: yyS[yypt-0].item.(ast.ExprNode)} + yyVAL.item = &ast.Join{Left: yyS[yypt-6].item.(ast.ResultSetNode), Right: yyS[yypt-2].item.(ast.ResultSetNode), Tp: yyS[yypt-5].item.(ast.JoinType), On: on} + } + case 573: + { + yyVAL.item = ast.LeftJoin + } + case 574: + { + yyVAL.item = ast.RightJoin + } + case 575: + { + yyVAL.item = nil + } + case 580: + { + yyVAL.item = nil + } + case 581: + { + yyVAL.item = &ast.Limit{Count: yyS[yypt-0].item.(uint64)} + } + case 582: + { + yyVAL.item = nil + } + case 583: + { + yyVAL.item = &ast.Limit{Count: yyS[yypt-0].item.(uint64)} + } + case 584: + { + yyVAL.item = &ast.Limit{Offset: yyS[yypt-2].item.(uint64), Count: yyS[yypt-0].item.(uint64)} + } + case 585: + { + yyVAL.item = &ast.Limit{Offset: yyS[yypt-0].item.(uint64), Count: yyS[yypt-2].item.(uint64)} + } + case 586: + { + yyVAL.item = false + } + case 587: + { + yyVAL.item = false + } + case 588: + { + yyVAL.item = true + } + case 589: + { + // TODO: return calc_found_rows opt and support more other options + yyVAL.item = yyS[yypt-1].item + } + case 590: + { + yyVAL.item = false + } + case 591: + { + yyVAL.item = true + } + case 592: + { + yyVAL.item = &ast.FieldList{Fields: yyS[yypt-0].item.([]*ast.SelectField)} + } + case 593: + { + yyVAL.item = nil + } + case 595: + { + s := yyS[yypt-1].item.(*ast.SelectStmt) + l := yylex.(*lexer) + endOffset := l.endOffset(yyS[yypt].offset) + l.SetLastSelectFieldText(s, endOffset) + src := yylex.(*lexer).src + // See the implemention of yyParse function + s.SetText(src[yyS[yypt-1].offset-1 : yyS[yypt].offset-1]) + yyVAL.item = &ast.SubqueryExpr{Query: s} + } + case 596: + { + s := yyS[yypt-1].item.(*ast.UnionStmt) + src := yylex.(*lexer).src + // See the implemention of yyParse function + s.SetText(src[yyS[yypt-1].offset-1 : yyS[yypt].offset-1]) + yyVAL.item = &ast.SubqueryExpr{Query: s} + } + case 597: + { + yyVAL.item = ast.SelectLockNone + } + case 598: + { + yyVAL.item = ast.SelectLockForUpdate + } + case 599: + { + yyVAL.item = ast.SelectLockInShareMode + } + case 600: + { + union := yyS[yypt-3].item.(*ast.UnionStmt) + union.Distinct = union.Distinct || yyS[yypt-1].item.(bool) + lastSelect := union.SelectList.Selects[len(union.SelectList.Selects)-1] + l := yylex.(*lexer) + endOffset := l.endOffset(yyS[yypt-2].offset) + l.SetLastSelectFieldText(lastSelect, endOffset) + union.SelectList.Selects = append(union.SelectList.Selects, yyS[yypt-0].item.(*ast.SelectStmt)) + yyVAL.item = union + } + case 601: + { + union := yyS[yypt-7].item.(*ast.UnionStmt) + union.Distinct = union.Distinct || yyS[yypt-5].item.(bool) + lastSelect := union.SelectList.Selects[len(union.SelectList.Selects)-1] + l := yylex.(*lexer) + endOffset := l.endOffset(yyS[yypt-6].offset) + l.SetLastSelectFieldText(lastSelect, endOffset) + st := yyS[yypt-3].item.(*ast.SelectStmt) + endOffset = l.endOffset(yyS[yypt-2].offset) + l.SetLastSelectFieldText(st, endOffset) + union.SelectList.Selects = append(union.SelectList.Selects, st) + if yyS[yypt-1].item != nil { + union.OrderBy = yyS[yypt-1].item.(*ast.OrderByClause) + } + if yyS[yypt-0].item != nil { + union.Limit = yyS[yypt-0].item.(*ast.Limit) + } + yyVAL.item = union + } + case 602: + { + selectList := &ast.UnionSelectList{Selects: []*ast.SelectStmt{yyS[yypt-0].item.(*ast.SelectStmt)}} + yyVAL.item = &ast.UnionStmt{ + SelectList: selectList, + } + } + case 603: + { + union := yyS[yypt-3].item.(*ast.UnionStmt) + union.Distinct = union.Distinct || yyS[yypt-1].item.(bool) + lastSelect := union.SelectList.Selects[len(union.SelectList.Selects)-1] + l := yylex.(*lexer) + endOffset := l.endOffset(yyS[yypt-2].offset) + l.SetLastSelectFieldText(lastSelect, endOffset) + union.SelectList.Selects = append(union.SelectList.Selects, yyS[yypt-0].item.(*ast.SelectStmt)) + yyVAL.item = union + } + case 605: + { + st := yyS[yypt-1].item.(*ast.SelectStmt) + l := yylex.(*lexer) + endOffset := l.endOffset(yyS[yypt].offset) + l.SetLastSelectFieldText(st, endOffset) + yyVAL.item = st + } + case 606: + { + yyVAL.item = true + } + case 607: + { + yyVAL.item = false + } + case 608: + { + yyVAL.item = true + } + case 609: + { + yyVAL.item = &ast.SetStmt{Variables: yyS[yypt-0].item.([]*ast.VariableAssignment)} + } + case 610: + { + yyVAL.item = &ast.SetCharsetStmt{Charset: yyS[yypt-0].item.(string)} + } + case 611: + { + yyVAL.item = &ast.SetCharsetStmt{ + Charset: yyS[yypt-2].item.(string), + Collate: yyS[yypt-0].item.(string), + } + } + case 612: + { + yyVAL.item = &ast.SetCharsetStmt{Charset: yyS[yypt-0].item.(string)} + } + case 613: + { + yyVAL.item = &ast.SetPwdStmt{Password: yyS[yypt-0].item.(string)} + } + case 614: + { + yyVAL.item = &ast.SetPwdStmt{User: yyS[yypt-2].item.(string), Password: yyS[yypt-0].item.(string)} + } + case 615: + { + // Parsed but ignored + } + case 616: + { + // Parsed but ignored + } + case 626: + { + yyVAL.item = &ast.VariableAssignment{Name: yyS[yypt-2].item.(string), Value: yyS[yypt-0].item.(ast.ExprNode), IsSystem: true} + } + case 627: + { + yyVAL.item = &ast.VariableAssignment{Name: yyS[yypt-2].item.(string), Value: yyS[yypt-0].item.(ast.ExprNode), IsGlobal: true, IsSystem: true} + } + case 628: + { + yyVAL.item = &ast.VariableAssignment{Name: yyS[yypt-2].item.(string), Value: yyS[yypt-0].item.(ast.ExprNode), IsSystem: true} + } + case 629: + { + yyVAL.item = &ast.VariableAssignment{Name: yyS[yypt-2].item.(string), Value: yyS[yypt-0].item.(ast.ExprNode), IsSystem: true} + } + case 630: + { + v := strings.ToLower(yyS[yypt-2].item.(string)) + var isGlobal bool + if strings.HasPrefix(v, "@@global.") { + isGlobal = true + v = strings.TrimPrefix(v, "@@global.") + } else if strings.HasPrefix(v, "@@session.") { + v = strings.TrimPrefix(v, "@@session.") + } else if strings.HasPrefix(v, "@@local.") { + v = strings.TrimPrefix(v, "@@local.") + } else if strings.HasPrefix(v, "@@") { + v = strings.TrimPrefix(v, "@@") + } + yyVAL.item = &ast.VariableAssignment{Name: v, Value: yyS[yypt-0].item.(ast.ExprNode), IsGlobal: isGlobal, IsSystem: true} + } + case 631: + { + v := yyS[yypt-2].item.(string) + v = strings.TrimPrefix(v, "@") + yyVAL.item = &ast.VariableAssignment{Name: v, Value: yyS[yypt-0].item.(ast.ExprNode)} + } + case 632: + { + yyVAL.item = []*ast.VariableAssignment{} + } + case 633: + { + yyVAL.item = []*ast.VariableAssignment{yyS[yypt-0].item.(*ast.VariableAssignment)} + } + case 634: + { + yyVAL.item = append(yyS[yypt-2].item.([]*ast.VariableAssignment), yyS[yypt-0].item.(*ast.VariableAssignment)) + } + case 637: + { + v := strings.ToLower(yyS[yypt-0].item.(string)) + var isGlobal bool + if strings.HasPrefix(v, "@@global.") { + isGlobal = true + v = strings.TrimPrefix(v, "@@global.") + } else if strings.HasPrefix(v, "@@session.") { + v = strings.TrimPrefix(v, "@@session.") + } else if strings.HasPrefix(v, "@@local.") { + v = strings.TrimPrefix(v, "@@local.") + } else if strings.HasPrefix(v, "@@") { + v = strings.TrimPrefix(v, "@@") + } + yyVAL.item = &ast.VariableExpr{Name: v, IsGlobal: isGlobal, IsSystem: true} + } + case 638: + { + v := yyS[yypt-0].item.(string) + v = strings.TrimPrefix(v, "@") + yyVAL.item = &ast.VariableExpr{Name: v, IsGlobal: false, IsSystem: false} + } + case 639: + { + yyVAL.item = yyS[yypt-2].item.(string) + "@" + yyS[yypt-0].item.(string) + } + case 640: + { + yyVAL.item = yyS[yypt-0].item.(string) + } + case 641: + { + yyVAL.item = yyS[yypt-1].item.(string) + } + case 642: + { + yyVAL.item = yyS[yypt-0].item.(string) + } + case 643: + { + yyVAL.item = &ast.AdminStmt{Tp: ast.AdminShowDDL} + } + case 644: + { + yyVAL.item = &ast.AdminStmt{ + Tp: ast.AdminCheckTable, + Tables: yyS[yypt-0].item.([]*ast.TableName), + } + } + case 645: + { + stmt := yyS[yypt-1].item.(*ast.ShowStmt) + if yyS[yypt-0].item != nil { + if x, ok := yyS[yypt-0].item.(*ast.PatternLikeExpr); ok { + stmt.Pattern = x + } else { + stmt.Where = yyS[yypt-0].item.(ast.ExprNode) + } + } + yyVAL.item = stmt + } + case 646: + { + yyVAL.item = &ast.ShowStmt{ + Tp: ast.ShowCreateTable, + Table: yyS[yypt-0].item.(*ast.TableName), + } + } + case 647: + { + // See: https://dev.mysql.com/doc/refman/5.7/en/show-grants.html + yyVAL.item = &ast.ShowStmt{Tp: ast.ShowGrants} + } + case 648: + { + // See: https://dev.mysql.com/doc/refman/5.7/en/show-grants.html + yyVAL.item = &ast.ShowStmt{ + Tp: ast.ShowGrants, + User: yyS[yypt-0].item.(string), + } + } + case 649: + { + yyVAL.item = &ast.ShowStmt{ + Tp: ast.ShowIndex, + Table: yyS[yypt-0].item.(*ast.TableName), + } + } + case 650: + { + yyVAL.item = &ast.ShowStmt{Tp: ast.ShowEngines} + } + case 651: + { + yyVAL.item = &ast.ShowStmt{Tp: ast.ShowDatabases} + } + case 652: + { + yyVAL.item = &ast.ShowStmt{Tp: ast.ShowDatabases} + } + case 653: + { + yyVAL.item = &ast.ShowStmt{Tp: ast.ShowCharset} + } + case 654: + { + yyVAL.item = &ast.ShowStmt{ + Tp: ast.ShowTables, + DBName: yyS[yypt-0].item.(string), + Full: yyS[yypt-2].item.(bool), + } + } + case 655: + { + yyVAL.item = &ast.ShowStmt{ + Tp: ast.ShowTableStatus, + DBName: yyS[yypt-0].item.(string), + } + } + case 656: + { + yyVAL.item = &ast.ShowStmt{ + Tp: ast.ShowColumns, + Table: yyS[yypt-1].item.(*ast.TableName), + DBName: yyS[yypt-0].item.(string), + Full: yyS[yypt-3].item.(bool), + } + } + case 657: + { + // SHOW FIELDS is a synonym for SHOW COLUMNS. + yyVAL.item = &ast.ShowStmt{ + Tp: ast.ShowColumns, + Table: yyS[yypt-1].item.(*ast.TableName), + DBName: yyS[yypt-0].item.(string), + Full: yyS[yypt-3].item.(bool), + } + } + case 658: + { + yyVAL.item = &ast.ShowStmt{Tp: ast.ShowWarnings} + } + case 659: + { + yyVAL.item = &ast.ShowStmt{ + Tp: ast.ShowVariables, + GlobalScope: yyS[yypt-1].item.(bool), + } + } + case 660: + { + yyVAL.item = &ast.ShowStmt{ + Tp: ast.ShowStatus, + GlobalScope: yyS[yypt-1].item.(bool), + } + } + case 661: + { + yyVAL.item = &ast.ShowStmt{ + Tp: ast.ShowCollation, + } + } + case 662: + { + yyVAL.item = &ast.ShowStmt{ + Tp: ast.ShowTriggers, + DBName: yyS[yypt-0].item.(string), + } + } + case 663: + { + yyVAL.item = &ast.ShowStmt{ + Tp: ast.ShowProcedureStatus, + } + } + case 664: + { + yyVAL.item = nil + } + case 665: + { + yyVAL.item = &ast.PatternLikeExpr{Pattern: yyS[yypt-0].item.(ast.ExprNode)} + } + case 666: + { + yyVAL.item = yyS[yypt-0].item.(ast.ExprNode) + } + case 667: + { + yyVAL.item = false + } + case 668: + { + yyVAL.item = true + } + case 669: + { + yyVAL.item = false + } + case 670: + { + yyVAL.item = false + } + case 671: + { + yyVAL.item = true + } + case 672: + { + yyVAL.item = "" + } + case 673: + { + yyVAL.item = yyS[yypt-0].item.(string) + } + case 674: + { + yyVAL.item = yyS[yypt-0].item.(string) + } + case 675: + { + yyVAL.item = yyS[yypt-0].item.(*ast.TableName) + } + case 676: + { + yyVAL.item = yyS[yypt-0].item.(*ast.TableName) + } + case 706: + { + // `(select 1)`; is a valid select statement + // TODO: This is used to fix issue #320. There may be a better solution. + yyVAL.item = yyS[yypt-0].item.(*ast.SubqueryExpr).Query + } + case 714: + { + if yyS[yypt-0].item != nil { + s := yyS[yypt-0].item.(ast.StmtNode) + s.SetText(yylex.(*lexer).stmtText()) + yylex.(*lexer).list = append(yylex.(*lexer).list, s) + } + } + case 715: + { + if yyS[yypt-0].item != nil { + s := yyS[yypt-0].item.(ast.StmtNode) + s.SetText(yylex.(*lexer).stmtText()) + yylex.(*lexer).list = append(yylex.(*lexer).list, s) + } + } + case 716: + { + cst := yyS[yypt-0].item.(*ast.Constraint) + if yyS[yypt-1].item != nil { + cst.Name = yyS[yypt-1].item.(string) + } + yyVAL.item = cst + } + case 717: + { + yyVAL.item = yyS[yypt-0].item.(*ast.ColumnDef) + } + case 718: + { + yyVAL.item = yyS[yypt-0].item.(*ast.Constraint) + } + case 719: + { + /* Nothing to do now */ + yyVAL.item = nil + } + case 720: + { + if yyS[yypt-0].item != nil { + yyVAL.item = []interface{}{yyS[yypt-0].item.(interface{})} + } else { + yyVAL.item = []interface{}{} + } + } + case 721: + { + if yyS[yypt-0].item != nil { + yyVAL.item = append(yyS[yypt-2].item.([]interface{}), yyS[yypt-0].item) + } else { + yyVAL.item = yyS[yypt-2].item + } + } + case 722: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionEngine, StrValue: yyS[yypt-0].item.(string)} + } + case 723: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionEngine, StrValue: yyS[yypt-0].item.(string)} + } + case 724: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionCharset, StrValue: yyS[yypt-0].item.(string)} + } + case 725: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionCollate, StrValue: yyS[yypt-0].item.(string)} + } + case 726: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionAutoIncrement, UintValue: yyS[yypt-0].item.(uint64)} + } + case 727: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionComment, StrValue: yyS[yypt-0].item.(string)} + } + case 728: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionAvgRowLength, UintValue: yyS[yypt-0].item.(uint64)} + } + case 729: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionConnection, StrValue: yyS[yypt-0].item.(string)} + } + case 730: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionCheckSum, UintValue: yyS[yypt-0].item.(uint64)} + } + case 731: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionPassword, StrValue: yyS[yypt-0].item.(string)} + } + case 732: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionCompression, StrValue: yyS[yypt-0].item.(string)} + } + case 733: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionKeyBlockSize, UintValue: yyS[yypt-0].item.(uint64)} + } + case 734: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionMaxRows, UintValue: yyS[yypt-0].item.(uint64)} + } + case 735: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionMinRows, UintValue: yyS[yypt-0].item.(uint64)} + } + case 736: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionDelayKeyWrite, UintValue: yyS[yypt-0].item.(uint64)} + } + case 737: + { + yyVAL.item = &ast.TableOption{Tp: ast.TableOptionRowFormat, UintValue: yyS[yypt-0].item.(uint64)} + } + case 738: + { + yyVAL.item = []*ast.TableOption{} + } + case 740: + { + yyVAL.item = []*ast.TableOption{yyS[yypt-0].item.(*ast.TableOption)} + } + case 741: + { + yyVAL.item = append(yyS[yypt-1].item.([]*ast.TableOption), yyS[yypt-0].item.(*ast.TableOption)) + } + case 742: + { + yyVAL.item = append(yyS[yypt-2].item.([]*ast.TableOption), yyS[yypt-0].item.(*ast.TableOption)) + } + case 743: + { + yyVAL.item = &ast.TruncateTableStmt{Table: yyS[yypt-0].item.(*ast.TableName)} + } + case 744: + { + yyVAL.item = ast.RowFormatDefault + } + case 745: + { + yyVAL.item = ast.RowFormatDynamic + } + case 746: + { + yyVAL.item = ast.RowFormatFixed + } + case 747: + { + yyVAL.item = ast.RowFormatCompressed + } + case 748: + { + yyVAL.item = ast.RowFormatRedundant + } + case 749: + { + yyVAL.item = ast.RowFormatCompact + } + case 750: + { + yyVAL.item = yyS[yypt-0].item + } + case 751: + { + yyVAL.item = yyS[yypt-0].item + } + case 752: + { + yyVAL.item = yyS[yypt-0].item + } + case 753: + { + x := types.NewFieldType(yyS[yypt-0].item.(byte)) + yyVAL.item = x + } + case 754: + { + x := types.NewFieldType(yyS[yypt-0].item.(byte)) + yyVAL.item = x + } + case 755: + { + x := types.NewFieldType(yyS[yypt-0].item.(byte)) + yyVAL.item = x + } + case 756: + { + x := types.NewFieldType(yyS[yypt-0].item.(byte)) + yyVAL.item = x + } + case 757: + { + x := types.NewFieldType(yyS[yypt-0].item.(byte)) + yyVAL.item = x + } + case 758: + { + x := types.NewFieldType(yyS[yypt-0].item.(byte)) + yyVAL.item = x + } + case 759: + { + // TODO: check flen 0 + x := types.NewFieldType(yyS[yypt-2].item.(byte)) + x.Flen = yyS[yypt-1].item.(int) + for _, o := range yyS[yypt-0].item.([]*ast.TypeOpt) { + if o.IsUnsigned { + x.Flag |= mysql.UnsignedFlag + } + if o.IsZerofill { + x.Flag |= mysql.ZerofillFlag + } + } + yyVAL.item = x + } + case 760: + { + fopt := yyS[yypt-1].item.(*ast.FloatOpt) + x := types.NewFieldType(yyS[yypt-2].item.(byte)) + x.Flen = fopt.Flen + x.Decimal = fopt.Decimal + for _, o := range yyS[yypt-0].item.([]*ast.TypeOpt) { + if o.IsUnsigned { + x.Flag |= mysql.UnsignedFlag + } + if o.IsZerofill { + x.Flag |= mysql.ZerofillFlag + } + } + yyVAL.item = x + } + case 761: + { + fopt := yyS[yypt-1].item.(*ast.FloatOpt) + x := types.NewFieldType(yyS[yypt-2].item.(byte)) + x.Flen = fopt.Flen + if x.Tp == mysql.TypeFloat { + // Fix issue #312 + if x.Flen > 53 { + yylex.(*lexer).errf("Float len(%d) should not be greater than 53", x.Flen) + return 1 + } + if x.Flen > 24 { + x.Tp = mysql.TypeDouble + } + } + x.Decimal = fopt.Decimal + for _, o := range yyS[yypt-0].item.([]*ast.TypeOpt) { + if o.IsUnsigned { + x.Flag |= mysql.UnsignedFlag + } + if o.IsZerofill { + x.Flag |= mysql.ZerofillFlag + } + } + yyVAL.item = x + } + case 762: + { + x := types.NewFieldType(yyS[yypt-1].item.(byte)) + x.Flen = yyS[yypt-0].item.(int) + if x.Flen == -1 || x.Flen == 0 { + x.Flen = 1 + } else if x.Flen > 64 { + yylex.(*lexer).errf("invalid field length %d for bit type, must in [1, 64]", x.Flen) + } + yyVAL.item = x + } + case 763: + { + yyVAL.item = mysql.TypeTiny + } + case 764: + { + yyVAL.item = mysql.TypeShort + } + case 765: + { + yyVAL.item = mysql.TypeInt24 + } + case 766: + { + yyVAL.item = mysql.TypeLong + } + case 767: + { + yyVAL.item = mysql.TypeLong + } + case 768: + { + yyVAL.item = mysql.TypeLonglong + } + case 769: + { + yyVAL.item = mysql.TypeTiny + } + case 770: + { + yyVAL.item = mysql.TypeTiny + } + case 773: + { + yyVAL.item = mysql.TypeNewDecimal + } + case 774: + { + yyVAL.item = mysql.TypeNewDecimal + } + case 775: + { + yyVAL.item = mysql.TypeFloat + } + case 776: + { + yyVAL.item = mysql.TypeDouble + } + case 777: + { + yyVAL.item = mysql.TypeDouble + } + case 778: + { + yyVAL.item = mysql.TypeDouble + } + case 779: + { + yyVAL.item = mysql.TypeBit + } + case 780: + { + x := types.NewFieldType(mysql.TypeString) + x.Flen = yyS[yypt-3].item.(int) + if yyS[yypt-2].item.(bool) { + x.Flag |= mysql.BinaryFlag + } + yyVAL.item = x + } + case 781: + { + x := types.NewFieldType(mysql.TypeString) + if yyS[yypt-2].item.(bool) { + x.Flag |= mysql.BinaryFlag + } + yyVAL.item = x + } + case 782: + { + x := types.NewFieldType(mysql.TypeVarchar) + x.Flen = yyS[yypt-3].item.(int) + if yyS[yypt-2].item.(bool) { + x.Flag |= mysql.BinaryFlag + } + x.Charset = yyS[yypt-1].item.(string) + x.Collate = yyS[yypt-0].item.(string) + yyVAL.item = x + } + case 783: + { + x := types.NewFieldType(mysql.TypeString) + x.Flen = yyS[yypt-0].item.(int) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + yyVAL.item = x + } + case 784: + { + x := types.NewFieldType(mysql.TypeVarchar) + x.Flen = yyS[yypt-0].item.(int) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + yyVAL.item = x + } + case 785: + { + yyVAL.item = yyS[yypt-0].item.(*types.FieldType) + } + case 786: + { + x := yyS[yypt-3].item.(*types.FieldType) + if yyS[yypt-2].item.(bool) { + x.Flag |= mysql.BinaryFlag + } + x.Charset = yyS[yypt-1].item.(string) + x.Collate = yyS[yypt-0].item.(string) + yyVAL.item = x + } + case 787: + { + x := types.NewFieldType(mysql.TypeEnum) + x.Elems = yyS[yypt-3].item.([]string) + x.Charset = yyS[yypt-1].item.(string) + x.Collate = yyS[yypt-0].item.(string) + yyVAL.item = x + } + case 788: + { + x := types.NewFieldType(mysql.TypeSet) + x.Elems = yyS[yypt-3].item.([]string) + x.Charset = yyS[yypt-1].item.(string) + x.Collate = yyS[yypt-0].item.(string) + yyVAL.item = x + } + case 791: + { + x := types.NewFieldType(mysql.TypeTinyBlob) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + yyVAL.item = x + } + case 792: + { + x := types.NewFieldType(mysql.TypeBlob) + x.Flen = yyS[yypt-0].item.(int) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + yyVAL.item = x + } + case 793: + { + x := types.NewFieldType(mysql.TypeMediumBlob) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + yyVAL.item = x + } + case 794: + { + x := types.NewFieldType(mysql.TypeLongBlob) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + yyVAL.item = x + } + case 795: + { + x := types.NewFieldType(mysql.TypeTinyBlob) + yyVAL.item = x + + } + case 796: + { + x := types.NewFieldType(mysql.TypeBlob) + x.Flen = yyS[yypt-0].item.(int) + yyVAL.item = x + } + case 797: + { + x := types.NewFieldType(mysql.TypeMediumBlob) + yyVAL.item = x + } + case 798: + { + x := types.NewFieldType(mysql.TypeLongBlob) + yyVAL.item = x + } + case 799: + { + x := types.NewFieldType(mysql.TypeDate) + yyVAL.item = x + } + case 800: + { + x := types.NewFieldType(mysql.TypeDatetime) + x.Decimal = yyS[yypt-0].item.(int) + yyVAL.item = x + } + case 801: + { + x := types.NewFieldType(mysql.TypeTimestamp) + x.Decimal = yyS[yypt-0].item.(int) + yyVAL.item = x + } + case 802: + { + x := types.NewFieldType(mysql.TypeDuration) + x.Decimal = yyS[yypt-0].item.(int) + yyVAL.item = x + } + case 803: + { + x := types.NewFieldType(mysql.TypeYear) + x.Flen = yyS[yypt-0].item.(int) + yyVAL.item = x + } + case 804: + { + yyVAL.item = int(yyS[yypt-1].item.(uint64)) + } + case 805: + { + /* -1 means unspecified field length*/ + yyVAL.item = types.UnspecifiedLength + } + case 806: + { + yyVAL.item = yyS[yypt-0].item.(int) + } + case 807: + { + yyVAL.item = &ast.TypeOpt{IsUnsigned: true} + } + case 808: + { + yyVAL.item = &ast.TypeOpt{IsZerofill: true, IsUnsigned: true} + } + case 809: + { + yyVAL.item = []*ast.TypeOpt{} + } + case 810: + { + yyVAL.item = append(yyS[yypt-1].item.([]*ast.TypeOpt), yyS[yypt-0].item.(*ast.TypeOpt)) + } + case 811: + { + yyVAL.item = &ast.FloatOpt{Flen: types.UnspecifiedLength, Decimal: types.UnspecifiedLength} + } + case 812: + { + yyVAL.item = &ast.FloatOpt{Flen: yyS[yypt-0].item.(int), Decimal: types.UnspecifiedLength} + } + case 813: + { + yyVAL.item = yyS[yypt-0].item.(*ast.FloatOpt) + } + case 814: + { + yyVAL.item = &ast.FloatOpt{Flen: int(yyS[yypt-3].item.(uint64)), Decimal: int(yyS[yypt-1].item.(uint64))} + } + case 815: + { + yyVAL.item = false + } + case 816: + { + yyVAL.item = true + } + case 817: + { + yyVAL.item = "" + } + case 818: + { + yyVAL.item = yyS[yypt-0].item.(string) + } + case 821: + { + yyVAL.item = "" + } + case 822: + { + yyVAL.item = yyS[yypt-0].item.(string) + } + case 823: + { + yyVAL.item = []string{yyS[yypt-0].item.(string)} + } + case 824: + { + yyVAL.item = append(yyS[yypt-2].item.([]string), yyS[yypt-0].item.(string)) + } + case 825: + { + yyVAL.item = yyS[yypt-0].item.(string) + } + case 826: + { + yyVAL.item = yyS[yypt-0].item.(string) + } + case 827: + { + var refs *ast.Join + if x, ok := yyS[yypt-5].item.(*ast.Join); ok { + refs = x + } else { + refs = &ast.Join{Left: yyS[yypt-5].item.(ast.ResultSetNode)} + } + st := &ast.UpdateStmt{ + LowPriority: yyS[yypt-7].item.(bool), + TableRefs: &ast.TableRefsClause{TableRefs: refs}, + List: yyS[yypt-3].item.([]*ast.Assignment), + } + if yyS[yypt-2].item != nil { + st.Where = yyS[yypt-2].item.(ast.ExprNode) + } + if yyS[yypt-1].item != nil { + st.Order = yyS[yypt-1].item.(*ast.OrderByClause) + } + if yyS[yypt-0].item != nil { + st.Limit = yyS[yypt-0].item.(*ast.Limit) + } + yyVAL.item = st + if yylex.(*lexer).root { + break + } + } + case 828: + { + st := &ast.UpdateStmt{ + LowPriority: yyS[yypt-5].item.(bool), + TableRefs: &ast.TableRefsClause{TableRefs: yyS[yypt-3].item.(*ast.Join)}, + List: yyS[yypt-1].item.([]*ast.Assignment), + } + if yyS[yypt-0].item != nil { + st.Where = yyS[yypt-0].item.(ast.ExprNode) + } + yyVAL.item = st + if yylex.(*lexer).root { + break + } + } + case 829: + { + yyVAL.item = &ast.UseStmt{DBName: yyS[yypt-0].item.(string)} + if yylex.(*lexer).root { + break + } + } + case 830: + { + yyVAL.item = yyS[yypt-0].item.(ast.ExprNode) + } + case 831: + { + yyVAL.item = nil + } + case 832: + { + yyVAL.item = yyS[yypt-0].item + } + case 835: + { + // See: https://dev.mysql.com/doc/refman/5.7/en/create-user.html + yyVAL.item = &ast.CreateUserStmt{ + IfNotExists: yyS[yypt-1].item.(bool), + Specs: yyS[yypt-0].item.([]*ast.UserSpec), + } + } + case 836: + { + userSpec := &ast.UserSpec{ + User: yyS[yypt-1].item.(string), + } + if yyS[yypt-0].item != nil { + userSpec.AuthOpt = yyS[yypt-0].item.(*ast.AuthOption) + } + yyVAL.item = userSpec + } + case 837: + { + yyVAL.item = []*ast.UserSpec{yyS[yypt-0].item.(*ast.UserSpec)} + } + case 838: + { + yyVAL.item = append(yyS[yypt-2].item.([]*ast.UserSpec), yyS[yypt-0].item.(*ast.UserSpec)) + } + case 839: + { + yyVAL.item = nil + } + case 840: + { + yyVAL.item = &ast.AuthOption{ + AuthString: yyS[yypt-0].item.(string), + ByAuthString: true, + } + } + case 841: + { + yyVAL.item = &ast.AuthOption{ + HashString: yyS[yypt-0].item.(string), + } + } + case 843: + { + yyVAL.item = &ast.GrantStmt{ + Privs: yyS[yypt-5].item.([]*ast.PrivElem), + ObjectType: yyS[yypt-3].item.(ast.ObjectTypeType), + Level: yyS[yypt-2].item.(*ast.GrantLevel), + Users: yyS[yypt-0].item.([]*ast.UserSpec), + } + } + case 844: + { + yyVAL.item = &ast.PrivElem{ + Priv: yyS[yypt-0].item.(mysql.PrivilegeType), + } + } + case 845: + { + yyVAL.item = &ast.PrivElem{ + Priv: yyS[yypt-3].item.(mysql.PrivilegeType), + Cols: yyS[yypt-1].item.([]*ast.ColumnName), + } + } + case 846: + { + yyVAL.item = []*ast.PrivElem{yyS[yypt-0].item.(*ast.PrivElem)} + } + case 847: + { + yyVAL.item = append(yyS[yypt-2].item.([]*ast.PrivElem), yyS[yypt-0].item.(*ast.PrivElem)) + } + case 848: + { + yyVAL.item = mysql.AllPriv + } + case 849: + { + yyVAL.item = mysql.AlterPriv + } + case 850: + { + yyVAL.item = mysql.CreatePriv + } + case 851: + { + yyVAL.item = mysql.CreateUserPriv + } + case 852: + { + yyVAL.item = mysql.DeletePriv + } + case 853: + { + yyVAL.item = mysql.DropPriv + } + case 854: + { + yyVAL.item = mysql.ExecutePriv + } + case 855: + { + yyVAL.item = mysql.IndexPriv + } + case 856: + { + yyVAL.item = mysql.InsertPriv + } + case 857: + { + yyVAL.item = mysql.SelectPriv + } + case 858: + { + yyVAL.item = mysql.ShowDBPriv + } + case 859: + { + yyVAL.item = mysql.UpdatePriv + } + case 860: + { + yyVAL.item = mysql.GrantPriv + } + case 861: + { + yyVAL.item = ast.ObjectTypeNone + } + case 862: + { + yyVAL.item = ast.ObjectTypeTable + } + case 863: + { + yyVAL.item = &ast.GrantLevel{ + Level: ast.GrantLevelDB, + } + } + case 864: + { + yyVAL.item = &ast.GrantLevel{ + Level: ast.GrantLevelGlobal, + } + } + case 865: + { + yyVAL.item = &ast.GrantLevel{ + Level: ast.GrantLevelDB, + DBName: yyS[yypt-2].item.(string), + } + } + case 866: + { + yyVAL.item = &ast.GrantLevel{ + Level: ast.GrantLevelTable, + DBName: yyS[yypt-2].item.(string), + TableName: yyS[yypt-0].item.(string), + } + } + case 867: + { + yyVAL.item = &ast.GrantLevel{ + Level: ast.GrantLevelTable, + TableName: yyS[yypt-0].item.(string), + } + } + + } + + if yyEx != nil && yyEx.Reduced(r, exState, &yyVAL) { + return -1 + } + goto yystack /* stack new state and value */ +} diff --git a/vendor/github.com/pingcap/tidb/parser/parser.y b/vendor/github.com/pingcap/tidb/parser/parser.y new file mode 100644 index 000000000..f3642f24e --- /dev/null +++ b/vendor/github.com/pingcap/tidb/parser/parser.y @@ -0,0 +1,4688 @@ +%{ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +// Inital yacc source generated by ebnf2y[1] +// at 2013-10-04 23:10:47.861401015 +0200 CEST +// +// $ ebnf2y -o ql.y -oe ql.ebnf -start StatementList -pkg ql -p _ +// +// [1]: http://github.com/cznic/ebnf2y + +package parser + +import ( + "strings" + + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/parser/opcode" + "github.com/pingcap/tidb/util/charset" + "github.com/pingcap/tidb/util/types" +) + +%} + +%union { + offset int // offset + line int + col int + item interface{} + list []interface{} +} + +%token + + /*yy:token "1.%d" */ floatLit "floating-point literal" + /*yy:token "%c" */ identifier "identifier" + /*yy:token "%d" */ intLit "integer literal" + /*yy:token "\"%c\"" */ stringLit "string literal" + /*yy:token "%x" */ hexLit "hexadecimal literal" + /*yy:token "%b" */ bitLit "bit literal" + + + abs "ABS" + add "ADD" + addDate "ADDDATE" + admin "ADMIN" + after "AFTER" + all "ALL" + alter "ALTER" + and "AND" + andand "&&" + andnot "&^" + any "ANY" + as "AS" + asc "ASC" + at "AT" + autoIncrement "AUTO_INCREMENT" + avg "AVG" + avgRowLength "AVG_ROW_LENGTH" + begin "BEGIN" + between "BETWEEN" + both "BOTH" + btree "BTREE" + by "BY" + byteType "BYTE" + caseKwd "CASE" + cast "CAST" + character "CHARACTER" + charsetKwd "CHARSET" + check "CHECK" + checksum "CHECKSUM" + coalesce "COALESCE" + collate "COLLATE" + collation "COLLATION" + column "COLUMN" + columns "COLUMNS" + comment "COMMENT" + commit "COMMIT" + committed "COMMITTED" + compact "COMPACT" + compressed "COMPRESSED" + compression "COMPRESSION" + concat "CONCAT" + concatWs "CONCAT_WS" + connection "CONNECTION" + connectionID "CONNECTION_ID" + constraint "CONSTRAINT" + convert "CONVERT" + count "COUNT" + create "CREATE" + cross "CROSS" + curDate "CURDATE" + currentDate "CURRENT_DATE" + curTime "CUR_TIME" + currentTime "CURRENT_TIME" + currentUser "CURRENT_USER" + database "DATABASE" + databases "DATABASES" + dateAdd "DATE_ADD" + dateSub "DATE_SUB" + day "DAY" + dayname "DAYNAME" + dayofmonth "DAYOFMONTH" + dayofweek "DAYOFWEEK" + dayofyear "DAYOFYEAR" + ddl "DDL" + deallocate "DEALLOCATE" + defaultKwd "DEFAULT" + delayed "DELAYED" + delayKeyWrite "DELAY_KEY_WRITE" + deleteKwd "DELETE" + desc "DESC" + describe "DESCRIBE" + distinct "DISTINCT" + div "DIV" + do "DO" + drop "DROP" + dual "DUAL" + duplicate "DUPLICATE" + dynamic "DYNAMIC" + elseKwd "ELSE" + end "END" + engine "ENGINE" + engines "ENGINES" + enum "ENUM" + eq "=" + escape "ESCAPE" + execute "EXECUTE" + exists "EXISTS" + explain "EXPLAIN" + extract "EXTRACT" + falseKwd "false" + fields "FIELDS" + first "FIRST" + fixed "FIXED" + foreign "FOREIGN" + forKwd "FOR" + foundRows "FOUND_ROWS" + from "FROM" + full "FULL" + fulltext "FULLTEXT" + ge ">=" + global "GLOBAL" + grant "GRANT" + grants "GRANTS" + group "GROUP" + groupConcat "GROUP_CONCAT" + hash "HASH" + having "HAVING" + highPriority "HIGH_PRIORITY" + hour "HOUR" + identified "IDENTIFIED" + ignore "IGNORE" + ifKwd "IF" + ifNull "IFNULL" + in "IN" + index "INDEX" + inner "INNER" + insert "INSERT" + interval "INTERVAL" + into "INTO" + is "IS" + isolation "ISOLATION" + join "JOIN" + key "KEY" + keyBlockSize "KEY_BLOCK_SIZE" + le "<=" + leading "LEADING" + left "LEFT" + length "LENGTH" + level "LEVEL" + like "LIKE" + limit "LIMIT" + local "LOCAL" + locate "LOCATE" + lock "LOCK" + lower "LOWER" + lowPriority "LOW_PRIORITY" + lsh "<<" + max "MAX" + maxRows "MAX_ROWS" + microsecond "MICROSECOND" + min "MIN" + minute "MINUTE" + minRows "MIN_ROWS" + mod "MOD" + mode "MODE" + month "MONTH" + names "NAMES" + national "NATIONAL" + neq "!=" + neqSynonym "<>" + not "NOT" + null "NULL" + nulleq "<=>" + nullIf "NULLIF" + offset "OFFSET" + on "ON" + only "ONLY" + option "OPTION" + or "OR" + order "ORDER" + oror "||" + outer "OUTER" + password "PASSWORD" + placeholder "PLACEHOLDER" + pow "POW" + power "POWER" + prepare "PREPARE" + primary "PRIMARY" + procedure "PROCEDURE" + quarter "QUARTER" + quick "QUICK" + rand "RAND" + read "READ" + redundant "REDUNDANT" + references "REFERENCES" + regexpKwd "REGEXP" + repeat "REPEAT" + repeatable "REPEATABLE" + replace "REPLACE" + right "RIGHT" + rlike "RLIKE" + rollback "ROLLBACK" + row "ROW" + rowFormat "ROW_FORMAT" + rsh ">>" + schema "SCHEMA" + schemas "SCHEMAS" + second "SECOND" + selectKwd "SELECT" + serializable "SERIALIZABLE" + session "SESSION" + set "SET" + share "SHARE" + show "SHOW" + signed "SIGNED" + some "SOME" + start "START" + status "STATUS" + stringType "string" + subDate "SUBDATE" + strcmp "STRCMP" + substring "SUBSTRING" + substringIndex "SUBSTRING_INDEX" + sum "SUM" + sysVar "SYS_VAR" + sysDate "SYSDATE" + tableKwd "TABLE" + tables "TABLES" + then "THEN" + to "TO" + trailing "TRAILING" + transaction "TRANSACTION" + triggers "TRIGGERS" + trim "TRIM" + trueKwd "true" + truncate "TRUNCATE" + uncommitted "UNCOMMITTED" + underscoreCS "UNDERSCORE_CHARSET" + unknown "UNKNOWN" + union "UNION" + unique "UNIQUE" + unlock "UNLOCK" + unsigned "UNSIGNED" + update "UPDATE" + upper "UPPER" + use "USE" + user "USER" + using "USING" + userVar "USER_VAR" + value "VALUE" + values "VALUES" + variables "VARIABLES" + version "VERSION" + warnings "WARNINGS" + week "WEEK" + weekday "WEEKDAY" + weekofyear "WEEKOFYEAR" + when "WHEN" + where "WHERE" + write "WRITE" + xor "XOR" + yearweek "YEARWEEK" + zerofill "ZEROFILL" + + calcFoundRows "SQL_CALC_FOUND_ROWS" + + currentTs "CURRENT_TIMESTAMP" + localTime "LOCALTIME" + localTs "LOCALTIMESTAMP" + now "NOW" + + tinyIntType "TINYINT" + smallIntType "SMALLINT" + mediumIntType "MEDIUMINT" + intType "INT" + integerType "INTEGER" + bigIntType "BIGINT" + bitType "BIT" + + decimalType "DECIMAL" + numericType "NUMERIC" + floatType "float" + doubleType "DOUBLE" + precisionType "PRECISION" + realType "REAL" + + dateType "DATE" + timeType "TIME" + datetimeType "DATETIME" + timestampType "TIMESTAMP" + yearType "YEAR" + + charType "CHAR" + varcharType "VARCHAR" + binaryType "BINARY" + varbinaryType "VARBINARY" + tinyblobType "TINYBLOB" + blobType "BLOB" + mediumblobType "MEDIUMBLOB" + longblobType "LONGBLOB" + tinytextType "TINYTEXT" + textType "TEXT" + mediumtextType "MEDIUMTEXT" + longtextType "LONGTEXT" + + int16Type "int16" + int24Type "int24" + int32Type "int32" + int64Type "int64" + int8Type "int8" + uintType "uint" + uint16Type "uint16" + uint32Type "uint32" + uint64Type "uint64" + uint8Type "uint8", + float32Type "float32" + float64Type "float64" + boolType "BOOL" + booleanType "BOOLEAN" + + parseExpression "parse expression prefix" + + secondMicrosecond "SECOND_MICROSECOND" + minuteMicrosecond "MINUTE_MICROSECOND" + minuteSecond "MINUTE_SECOND" + hourMicrosecond "HOUR_MICROSECOND" + hourSecond "HOUR_SECOND" + hourMinute "HOUR_MINUTE" + dayMicrosecond "DAY_MICROSECOND" + daySecond "DAY_SECOND" + dayMinute "DAY_MINUTE" + dayHour "DAY_HOUR" + yearMonth "YEAR_MONTH" + +%type + AdminStmt "Check table statement or show ddl statement" + AlterTableStmt "Alter table statement" + AlterTableSpec "Alter table specification" + AlterTableSpecList "Alter table specification list" + AnyOrAll "Any or All for subquery" + Assignment "assignment" + AssignmentList "assignment list" + AssignmentListOpt "assignment list opt" + AuthOption "User auth option" + AuthString "Password string value" + BeginTransactionStmt "BEGIN TRANSACTION statement" + CastType "Cast function target type" + ColumnDef "table column definition" + ColumnName "column name" + ColumnNameList "column name list" + ColumnNameListOpt "column name list opt" + ColumnKeywordOpt "Column keyword or empty" + ColumnSetValue "insert statement set value by column name" + ColumnSetValueList "insert statement set value by column name list" + CommaOpt "optional comma" + CommitStmt "COMMIT statement" + CompareOp "Compare opcode" + ColumnOption "column definition option" + ColumnOptionList "column definition option list" + ColumnOptionListOpt "optional column definition option list" + Constraint "table constraint" + ConstraintElem "table constraint element" + ConstraintKeywordOpt "Constraint Keyword or empty" + CreateDatabaseStmt "Create Database Statement" + CreateIndexStmt "CREATE INDEX statement" + CreateIndexStmtUnique "CREATE INDEX optional UNIQUE clause" + DatabaseOption "CREATE Database specification" + DatabaseOptionList "CREATE Database specification list" + DatabaseOptionListOpt "CREATE Database specification list opt" + CreateTableStmt "CREATE TABLE statement" + CreateUserStmt "CREATE User statement" + CrossOpt "Cross join option" + DateArithOpt "Date arith dateadd or datesub option" + DateArithMultiFormsOpt "Date arith adddate or subdate option" + DateArithInterval "Date arith interval part" + DatabaseSym "DATABASE or SCHEMA" + DBName "Database Name" + DeallocateSym "Deallocate or drop" + DeallocateStmt "Deallocate prepared statement" + Default "DEFAULT clause" + DefaultOpt "optional DEFAULT clause" + DefaultKwdOpt "optional DEFAULT keyword" + DefaultValueExpr "DefaultValueExpr(Now or Signed Literal)" + DeleteFromStmt "DELETE FROM statement" + DistinctOpt "Distinct option" + DoStmt "Do statement" + DropDatabaseStmt "DROP DATABASE statement" + DropIndexStmt "DROP INDEX statement" + DropTableStmt "DROP TABLE statement" + EmptyStmt "empty statement" + EqOpt "= or empty" + EscapedTableRef "escaped table reference" + ExecuteStmt "Execute statement" + ExplainSym "EXPLAIN or DESCRIBE or DESC" + ExplainStmt "EXPLAIN statement" + Expression "expression" + ExpressionList "expression list" + ExpressionListOpt "expression list opt" + ExpressionListList "expression list list" + Factor "expression factor" + PredicateExpr "Predicate expression factor" + Field "field expression" + FieldAsName "Field alias name" + FieldAsNameOpt "Field alias name opt" + FieldList "field expression list" + TableRefsClause "Table references clause" + Function "function expr" + FunctionCallAgg "Function call on aggregate data" + FunctionCallConflict "Function call with reserved keyword as function name" + FunctionCallKeyword "Function call with keyword as function name" + FunctionCallNonKeyword "Function call with nonkeyword as function name" + FunctionNameConflict "Built-in function call names which are conflict with keywords" + FuncDatetimePrec "Function datetime precision" + GlobalScope "The scope of variable" + GrantStmt "Grant statement" + GroupByClause "GROUP BY clause" + HashString "Hashed string" + HavingClause "HAVING clause" + IfExists "If Exists" + IfNotExists "If Not Exists" + IgnoreOptional "IGNORE or empty" + IndexColName "Index column name" + IndexColNameList "List of index column name" + IndexName "index name" + IndexOption "Index Option" + IndexType "index type" + IndexTypeOpt "Optional index type" + InsertIntoStmt "INSERT INTO statement" + InsertValues "Rest part of INSERT/REPLACE INTO statement" + IntoOpt "INTO or EmptyString" + IsolationLevel "Isolation level" + JoinTable "join table" + JoinType "join type" + KeyOrIndex "{KEY|INDEX}" + LikeEscapeOpt "like escape option" + LimitClause "LIMIT clause" + Literal "literal value" + LockTablesStmt "Lock tables statement" + LockType "Table locks type" + logAnd "logical and operator" + logOr "logical or operator" + LowPriorityOptional "LOW_PRIORITY or empty" + name "name" + NationalOpt "National option" + NotOpt "optional NOT" + NowSym "CURRENT_TIMESTAMP/LOCALTIME/LOCALTIMESTAMP/NOW" + NumLiteral "Num/Int/Float/Decimal Literal" + ObjectType "Grant statement object type" + OnDuplicateKeyUpdate "ON DUPLICATE KEY UPDATE value list" + Operand "operand" + OptFull "Full or empty" + OptInteger "Optional Integer keyword" + Order "ORDER BY clause optional collation specification" + OrderBy "ORDER BY clause" + ByItem "BY item" + OrderByOptional "Optional ORDER BY clause optional" + ByList "BY list" + OuterOpt "optional OUTER clause" + QuickOptional "QUICK or empty" + PasswordOpt "Password option" + ColumnPosition "Column position [First|After ColumnName]" + PreparedStmt "PreparedStmt" + PrepareSQL "Prepare statement sql string" + PrimaryExpression "primary expression" + PrimaryFactor "primary expression factor" + Priority "insert statement priority" + PrivElem "Privilege element" + PrivElemList "Privilege element list" + PrivLevel "Privilege scope" + PrivType "Privilege type" + ReferDef "Reference definition" + RegexpSym "REGEXP or RLIKE" + ReplaceIntoStmt "REPLACE INTO statement" + ReplacePriority "replace statement priority" + RollbackStmt "ROLLBACK statement" + RowFormat "Row format option" + SelectLockOpt "FOR UPDATE or LOCK IN SHARE MODE," + SelectStmt "SELECT statement" + SelectStmtCalcFoundRows "SELECT statement optional SQL_CALC_FOUND_ROWS" + SelectStmtDistinct "SELECT statement optional DISTINCT clause" + SelectStmtFieldList "SELECT statement field list" + SelectStmtLimit "SELECT statement optional LIMIT clause" + SelectStmtOpts "Select statement options" + SelectStmtGroup "SELECT statement optional GROUP BY clause" + SetStmt "Set variable statement" + ShowStmt "Show engines/databases/tables/columns/warnings/status statement" + ShowTargetFilterable "Show target that can be filtered by WHERE or LIKE" + ShowDatabaseNameOpt "Show tables/columns statement database name option" + ShowTableAliasOpt "Show table alias option" + ShowLikeOrWhereOpt "Show like or where clause option" + SignedLiteral "Literal or NumLiteral with sign" + Statement "statement" + StatementList "statement list" + StringName "string literal or identifier" + StringList "string list" + ExplainableStmt "explainable statement" + SubSelect "Sub Select" + Symbol "Constraint Symbol" + SystemVariable "System defined variable name" + TableAsName "table alias name" + TableAsNameOpt "table alias name optional" + TableElement "table definition element" + TableElementList "table definition element list" + TableFactor "table factor" + TableLock "Table name and lock type" + TableLockList "Table lock list" + TableName "Table name" + TableNameList "Table name list" + TableOption "create table option" + TableOptionList "create table option list" + TableOptionListOpt "create table option list opt" + TableRef "table reference" + TableRefs "table references" + TimeUnit "Time unit" + TransactionChar "Transaction characteristic" + TransactionChars "Transaction characteristic list" + TrimDirection "Trim string direction" + TruncateTableStmt "TRANSACTION TABLE statement" + UnionOpt "Union Option(empty/ALL/DISTINCT)" + UnionStmt "Union select state ment" + UnionClauseList "Union select clause list" + UnionSelect "Union (select) item" + UnlockTablesStmt "Unlock tables statement" + UpdateStmt "UPDATE statement" + Username "Username" + UserSpec "Username and auth option" + UserSpecList "Username and auth option list" + UserVariable "User defined variable name" + UserVariableList "User defined variable name list" + UseStmt "USE statement" + ValueSym "Value or Values" + VariableAssignment "set variable value" + VariableAssignmentList "set variable value list" + Variable "User or system variable" + WhereClause "WHERE clause" + WhereClauseOptional "Optinal WHERE clause" + + Identifier "identifier or unreserved keyword" + UnReservedKeyword "MySQL unreserved keywords" + NotKeywordToken "Tokens not mysql keyword but treated specially" + + WhenClause "When clause" + WhenClauseList "When clause list" + ElseOpt "Optional else clause" + ExpressionOpt "Optional expression" + + Type "Types" + + NumericType "Numeric types" + IntegerType "Integer Types types" + FixedPointType "Exact value types" + FloatingPointType "Approximate value types" + BitValueType "bit value types" + + StringType "String types" + BlobType "Blob types" + TextType "Text types" + + DateAndTimeType "Date and Time types" + + OptFieldLen "Field length or empty" + FieldLen "Field length" + FieldOpts "Field type definition option list" + FieldOpt "Field type definition option" + FloatOpt "Floating-point type option" + Precision "Floating-point precision option" + OptBinary "Optional BINARY" + CharsetKw "charset or charater set" + OptCharset "Optional Character setting" + OptCollate "Optional Collate setting" + NUM "numbers" + LengthNum "Field length num(uint64)" + +%token tableRefPriority + +%precedence lowerThanCalcFoundRows +%precedence calcFoundRows + +%precedence lowerThanSetKeyword +%precedence set + +%precedence lowerThanInsertValues +%precedence insertValues + +%left join inner cross left right full +/* A dummy token to force the priority of TableRef production in a join. */ +%left tableRefPriority +%precedence on +%left oror or +%left xor +%left andand and +%left between +%precedence lowerThanEq +%left eq ge le neq neqSynonym '>' '<' is like in +%left '|' +%left '&' +%left rsh lsh +%left '-' '+' +%left '*' '/' '%' div mod +%left '^' +%left '~' neg +%right not +%right collate + +%precedence lowerThanLeftParen +%precedence '(' +%precedence lowerThanQuick +%precedence quick +%precedence lowerThanEscape +%precedence escape +%precedence lowerThanComma +%precedence ',' + +%start Start + +%% + +Start: + StatementList +| parseExpression Expression + { + yylex.(*lexer).expr = $2.(ast.ExprNode) + } + +/**************************************AlterTableStmt*************************************** + * See: https://dev.mysql.com/doc/refman/5.7/en/alter-table.html + *******************************************************************************************/ +AlterTableStmt: + "ALTER" IgnoreOptional "TABLE" TableName AlterTableSpecList + { + $$ = &ast.AlterTableStmt{ + Table: $4.(*ast.TableName), + Specs: $5.([]*ast.AlterTableSpec), + } + } + +AlterTableSpec: + TableOptionListOpt + { + $$ = &ast.AlterTableSpec{ + Tp: ast.AlterTableOption, + Options:$1.([]*ast.TableOption), + } + } +| "ADD" ColumnKeywordOpt ColumnDef ColumnPosition + { + $$ = &ast.AlterTableSpec{ + Tp: ast.AlterTableAddColumn, + Column: $3.(*ast.ColumnDef), + Position: $4.(*ast.ColumnPosition), + } + } +| "ADD" Constraint + { + constraint := $2.(*ast.Constraint) + $$ = &ast.AlterTableSpec{ + Tp: ast.AlterTableAddConstraint, + Constraint: constraint, + } + } +| "DROP" ColumnKeywordOpt ColumnName + { + $$ = &ast.AlterTableSpec{ + Tp: ast.AlterTableDropColumn, + DropColumn: $3.(*ast.ColumnName), + } + } +| "DROP" "PRIMARY" "KEY" + { + $$ = &ast.AlterTableSpec{Tp: ast.AlterTableDropPrimaryKey} + } +| "DROP" KeyOrIndex IndexName + { + $$ = &ast.AlterTableSpec{ + Tp: ast.AlterTableDropIndex, + Name: $3.(string), + } + } +| "DROP" "FOREIGN" "KEY" Symbol + { + $$ = &ast.AlterTableSpec{ + Tp: ast.AlterTableDropForeignKey, + Name: $4.(string), + } + } + +KeyOrIndex: + "KEY"|"INDEX" + +ColumnKeywordOpt: + {} +| "COLUMN" + +ColumnPosition: + { + $$ = &ast.ColumnPosition{Tp: ast.ColumnPositionNone} + } +| "FIRST" + { + $$ = &ast.ColumnPosition{Tp: ast.ColumnPositionFirst} + } +| "AFTER" ColumnName + { + $$ = &ast.ColumnPosition{ + Tp: ast.ColumnPositionAfter, + RelativeColumn: $2.(*ast.ColumnName), + } + } + +AlterTableSpecList: + AlterTableSpec + { + $$ = []*ast.AlterTableSpec{$1.(*ast.AlterTableSpec)} + } +| AlterTableSpecList ',' AlterTableSpec + { + $$ = append($1.([]*ast.AlterTableSpec), $3.(*ast.AlterTableSpec)) + } + +ConstraintKeywordOpt: + { + $$ = nil + } +| "CONSTRAINT" + { + $$ = nil + } +| "CONSTRAINT" Symbol + { + $$ = $2.(string) + } + +Symbol: + Identifier + +/*******************************************************************************************/ +Assignment: + ColumnName eq Expression + { + $$ = &ast.Assignment{Column: $1.(*ast.ColumnName), Expr:$3.(ast.ExprNode)} + } + +AssignmentList: + Assignment + { + $$ = []*ast.Assignment{$1.(*ast.Assignment)} + } +| AssignmentList ',' Assignment + { + $$ = append($1.([]*ast.Assignment), $3.(*ast.Assignment)) + } + +AssignmentListOpt: + /* EMPTY */ + { + $$ = []*ast.Assignment{} + } +| AssignmentList + +BeginTransactionStmt: + "BEGIN" + { + $$ = &ast.BeginStmt{} + } +| "START" "TRANSACTION" + { + $$ = &ast.BeginStmt{} + } + +ColumnDef: + ColumnName Type ColumnOptionListOpt + { + $$ = &ast.ColumnDef{Name: $1.(*ast.ColumnName), Tp: $2.(*types.FieldType), Options: $3.([]*ast.ColumnOption)} + } + +ColumnName: + Identifier + { + $$ = &ast.ColumnName{Name: model.NewCIStr($1.(string))} + } +| Identifier '.' Identifier + { + $$ = &ast.ColumnName{Table: model.NewCIStr($1.(string)), Name: model.NewCIStr($3.(string))} + } +| Identifier '.' Identifier '.' Identifier + { + $$ = &ast.ColumnName{Schema: model.NewCIStr($1.(string)), Table: model.NewCIStr($3.(string)), Name: model.NewCIStr($5.(string))} + } + +ColumnNameList: + ColumnName + { + $$ = []*ast.ColumnName{$1.(*ast.ColumnName)} + } +| ColumnNameList ',' ColumnName + { + $$ = append($1.([]*ast.ColumnName), $3.(*ast.ColumnName)) + } + +ColumnNameListOpt: + /* EMPTY */ + { + $$ = []*ast.ColumnName{} + } +| ColumnNameList + { + $$ = $1.([]*ast.ColumnName) + } + +CommitStmt: + "COMMIT" + { + $$ = &ast.CommitStmt{} + } + +ColumnOption: + "NOT" "NULL" + { + $$ = &ast.ColumnOption{Tp: ast.ColumnOptionNotNull} + } +| "NULL" + { + $$ = &ast.ColumnOption{Tp: ast.ColumnOptionNull} + } +| "AUTO_INCREMENT" + { + $$ = &ast.ColumnOption{Tp: ast.ColumnOptionAutoIncrement} + } +| "PRIMARY" "KEY" + { + $$ = &ast.ColumnOption{Tp: ast.ColumnOptionPrimaryKey} + } +| "UNIQUE" + { + $$ = &ast.ColumnOption{Tp: ast.ColumnOptionUniq} + } +| "UNIQUE" "KEY" + { + $$ = &ast.ColumnOption{Tp: ast.ColumnOptionUniqKey} + } +| "DEFAULT" DefaultValueExpr + { + $$ = &ast.ColumnOption{Tp: ast.ColumnOptionDefaultValue, Expr: $2.(ast.ExprNode)} + } +| "ON" "UPDATE" NowSym + { + nowFunc := &ast.FuncCallExpr{FnName: model.NewCIStr("CURRENT_TIMESTAMP")} + $$ = &ast.ColumnOption{Tp: ast.ColumnOptionOnUpdate, Expr: nowFunc} + } +| "COMMENT" stringLit + { + $$ = &ast.ColumnOption{Tp: ast.ColumnOptionComment} + } +| "CHECK" '(' Expression ')' + { + // See: https://dev.mysql.com/doc/refman/5.7/en/create-table.html + // The CHECK clause is parsed but ignored by all storage engines. + $$ = &ast.ColumnOption{} + } + +ColumnOptionList: + ColumnOption + { + $$ = []*ast.ColumnOption{$1.(*ast.ColumnOption)} + } +| ColumnOptionList ColumnOption + { + $$ = append($1.([]*ast.ColumnOption), $2.(*ast.ColumnOption)) + } + +ColumnOptionListOpt: + { + $$ = []*ast.ColumnOption{} + } +| ColumnOptionList + { + $$ = $1.([]*ast.ColumnOption) + } + +ConstraintElem: + "PRIMARY" "KEY" IndexTypeOpt '(' IndexColNameList ')' IndexOption + { + c := &ast.Constraint{ + Tp: ast.ConstraintPrimaryKey, + Keys: $5.([]*ast.IndexColName), + } + if $7 != nil { + c.Option = $7.(*ast.IndexOption) + } + if $3 != nil { + if c.Option == nil { + c.Option = &ast.IndexOption{} + } + c.Option.Tp = $3.(model.IndexType) + } + $$ = c + } +| "FULLTEXT" "KEY" IndexName '(' IndexColNameList ')' IndexOption + { + c := &ast.Constraint{ + Tp: ast.ConstraintFulltext, + Keys: $5.([]*ast.IndexColName), + Name: $3.(string), + } + if $7 != nil { + c.Option = $7.(*ast.IndexOption) + } + $$ = c + } +| "INDEX" IndexName IndexTypeOpt '(' IndexColNameList ')' IndexOption + { + c := &ast.Constraint{ + Tp: ast.ConstraintIndex, + Keys: $5.([]*ast.IndexColName), + Name: $2.(string), + } + if $7 != nil { + c.Option = $7.(*ast.IndexOption) + } + if $3 != nil { + if c.Option == nil { + c.Option = &ast.IndexOption{} + } + c.Option.Tp = $3.(model.IndexType) + } + $$ = c + } +| "KEY" IndexName IndexTypeOpt '(' IndexColNameList ')' IndexOption + { + c := &ast.Constraint{ + Tp: ast.ConstraintKey, + Keys: $5.([]*ast.IndexColName), + Name: $2.(string), + } + if $7 != nil { + c.Option = $7.(*ast.IndexOption) + } + if $3 != nil { + if c.Option == nil { + c.Option = &ast.IndexOption{} + } + c.Option.Tp = $3.(model.IndexType) + } + $$ = c + } +| "UNIQUE" IndexName IndexTypeOpt '(' IndexColNameList ')' IndexOption + { + c := &ast.Constraint{ + Tp: ast.ConstraintUniq, + Keys: $5.([]*ast.IndexColName), + Name: $2.(string), + } + if $7 != nil { + c.Option = $7.(*ast.IndexOption) + } + if $3 != nil { + if c.Option == nil { + c.Option = &ast.IndexOption{} + } + c.Option.Tp = $3.(model.IndexType) + } + $$ = c + } +| "UNIQUE" "INDEX" IndexName IndexTypeOpt '(' IndexColNameList ')' IndexOption + { + c := &ast.Constraint{ + Tp: ast.ConstraintUniqIndex, + Keys: $6.([]*ast.IndexColName), + Name: $3.(string), + } + if $8 != nil { + c.Option = $8.(*ast.IndexOption) + } + if $4 != nil { + if c.Option == nil { + c.Option = &ast.IndexOption{} + } + c.Option.Tp = $4.(model.IndexType) + } + $$ = c + } +| "UNIQUE" "KEY" IndexName IndexTypeOpt '(' IndexColNameList ')' IndexOption + { + c := &ast.Constraint{ + Tp: ast.ConstraintUniqKey, + Keys: $6.([]*ast.IndexColName), + Name: $3.(string), + } + if $8 != nil { + c.Option = $8.(*ast.IndexOption) + } + if $4 != nil { + if c.Option == nil { + c.Option = &ast.IndexOption{} + } + c.Option.Tp = $4.(model.IndexType) + } + $$ = c + } +| "FOREIGN" "KEY" IndexName '(' IndexColNameList ')' ReferDef + { + $$ = &ast.Constraint{ + Tp: ast.ConstraintForeignKey, + Keys: $5.([]*ast.IndexColName), + Name: $3.(string), + Refer: $7.(*ast.ReferenceDef), + } + } + +ReferDef: + "REFERENCES" TableName '(' IndexColNameList ')' + { + $$ = &ast.ReferenceDef{Table: $2.(*ast.TableName), IndexColNames: $4.([]*ast.IndexColName)} + } + +/* + * The DEFAULT clause specifies a default value for a column. + * With one exception, the default value must be a constant; + * it cannot be a function or an expression. This means, for example, + * that you cannot set the default for a date column to be the value of + * a function such as NOW() or CURRENT_DATE. The exception is that you + * can specify CURRENT_TIMESTAMP as the default for a TIMESTAMP or DATETIME column. + * + * See: http://dev.mysql.com/doc/refman/5.7/en/create-table.html + * https://github.com/mysql/mysql-server/blob/5.7/sql/sql_yacc.yy#L6832 + */ +DefaultValueExpr: + NowSym + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr("CURRENT_TIMESTAMP")} + } +| NowSym '(' ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr("CURRENT_TIMESTAMP")} + } +| SignedLiteral + +// TODO: Process other three keywords +NowSym: + "CURRENT_TIMESTAMP" +| "LOCALTIME" +| "LOCALTIMESTAMP" +| "NOW" + +SignedLiteral: + Literal + { + $$ = ast.NewValueExpr($1) + } +| '+' NumLiteral + { + $$ = &ast.UnaryOperationExpr{Op: opcode.Plus, V: ast.NewValueExpr($2)} + } +| '-' NumLiteral + { + $$ = &ast.UnaryOperationExpr{Op: opcode.Minus, V: ast.NewValueExpr($2)} + } + +// TODO: support decimal literal +NumLiteral: + intLit +| floatLit + + +CreateIndexStmt: + "CREATE" CreateIndexStmtUnique "INDEX" Identifier "ON" TableName '(' IndexColNameList ')' + { + $$ = &ast.CreateIndexStmt{ + Unique: $2.(bool), + IndexName: $4.(string), + Table: $6.(*ast.TableName), + IndexColNames: $8.([]*ast.IndexColName), + } + if yylex.(*lexer).root { + break + } + } + +CreateIndexStmtUnique: + { + $$ = false + } +| "UNIQUE" + { + $$ = true + } + +IndexColName: + ColumnName OptFieldLen Order + { + //Order is parsed but just ignored as MySQL did + $$ = &ast.IndexColName{Column: $1.(*ast.ColumnName), Length: $2.(int)} + } + +IndexColNameList: + { + $$ = []*ast.IndexColName{} + } +| IndexColName + { + $$ = []*ast.IndexColName{$1.(*ast.IndexColName)} + } +| IndexColNameList ',' IndexColName + { + $$ = append($1.([]*ast.IndexColName), $3.(*ast.IndexColName)) + } + + + +/******************************************************************* + * + * Create Database Statement + * CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name + * [create_specification] ... + * + * create_specification: + * [DEFAULT] CHARACTER SET [=] charset_name + * | [DEFAULT] COLLATE [=] collation_name + *******************************************************************/ +CreateDatabaseStmt: + "CREATE" DatabaseSym IfNotExists DBName DatabaseOptionListOpt + { + $$ = &ast.CreateDatabaseStmt{ + IfNotExists: $3.(bool), + Name: $4.(string), + Options: $5.([]*ast.DatabaseOption), + } + + if yylex.(*lexer).root { + break + } + } + +DBName: + Identifier + +DatabaseOption: + DefaultKwdOpt CharsetKw EqOpt StringName + { + $$ = &ast.DatabaseOption{Tp: ast.DatabaseOptionCharset, Value: $4.(string)} + } +| DefaultKwdOpt "COLLATE" EqOpt StringName + { + $$ = &ast.DatabaseOption{Tp: ast.DatabaseOptionCollate, Value: $4.(string)} + } + +DatabaseOptionListOpt: + { + $$ = []*ast.DatabaseOption{} + } +| DatabaseOptionList + +DatabaseOptionList: + DatabaseOption + { + $$ = []*ast.DatabaseOption{$1.(*ast.DatabaseOption)} + } +| DatabaseOptionList DatabaseOption + { + $$ = append($1.([]*ast.DatabaseOption), $2.(*ast.DatabaseOption)) + } + +/******************************************************************* + * + * Create Table Statement + * + * Example: + * CREATE TABLE Persons + * ( + * P_Id int NOT NULL, + * LastName varchar(255) NOT NULL, + * FirstName varchar(255), + * Address varchar(255), + * City varchar(255), + * PRIMARY KEY (P_Id) + * ) + *******************************************************************/ +CreateTableStmt: + "CREATE" "TABLE" IfNotExists TableName '(' TableElementList ')' TableOptionListOpt + { + tes := $6.([]interface {}) + var columnDefs []*ast.ColumnDef + var constraints []*ast.Constraint + for _, te := range tes { + switch te := te.(type) { + case *ast.ColumnDef: + columnDefs = append(columnDefs, te) + case *ast.Constraint: + constraints = append(constraints, te) + } + } + if len(columnDefs) == 0 { + yylex.(*lexer).err("Column Definition List can't be empty.") + return 1 + } + $$ = &ast.CreateTableStmt{ + Table: $4.(*ast.TableName), + IfNotExists: $3.(bool), + Cols: columnDefs, + Constraints: constraints, + Options: $8.([]*ast.TableOption), + } + } + +Default: + "DEFAULT" Expression + { + $$ = $2 + } + +DefaultOpt: + { + $$ = nil + } +| Default + +DefaultKwdOpt: + {} +| "DEFAULT" + +/****************************************************************** + * Do statement + * See: https://dev.mysql.com/doc/refman/5.7/en/do.html + ******************************************************************/ +DoStmt: + "DO" ExpressionList + { + $$ = &ast.DoStmt { + Exprs: $2.([]ast.ExprNode), + } + } + +/******************************************************************* + * + * Delete Statement + * + *******************************************************************/ +DeleteFromStmt: + "DELETE" LowPriorityOptional QuickOptional IgnoreOptional "FROM" TableName WhereClauseOptional OrderByOptional LimitClause + { + // Single Table + join := &ast.Join{Left: &ast.TableSource{Source: $6.(ast.ResultSetNode)}, Right: nil} + x := &ast.DeleteStmt{ + TableRefs: &ast.TableRefsClause{TableRefs: join}, + LowPriority: $2.(bool), + Quick: $3.(bool), + Ignore: $4.(bool), + } + if $7 != nil { + x.Where = $7.(ast.ExprNode) + } + if $8 != nil { + x.Order = $8.(*ast.OrderByClause) + } + if $9 != nil { + x.Limit = $9.(*ast.Limit) + } + + $$ = x + if yylex.(*lexer).root { + break + } + } +| "DELETE" LowPriorityOptional QuickOptional IgnoreOptional TableNameList "FROM" TableRefs WhereClauseOptional + { + // Multiple Table + x := &ast.DeleteStmt{ + LowPriority: $2.(bool), + Quick: $3.(bool), + Ignore: $4.(bool), + IsMultiTable: true, + BeforeFrom: true, + Tables: &ast.DeleteTableList{Tables: $5.([]*ast.TableName)}, + TableRefs: &ast.TableRefsClause{TableRefs: $7.(*ast.Join)}, + } + if $8 != nil { + x.Where = $8.(ast.ExprNode) + } + $$ = x + if yylex.(*lexer).root { + break + } + } +| "DELETE" LowPriorityOptional QuickOptional IgnoreOptional "FROM" TableNameList "USING" TableRefs WhereClauseOptional + { + // Multiple Table + x := &ast.DeleteStmt{ + LowPriority: $2.(bool), + Quick: $3.(bool), + Ignore: $4.(bool), + IsMultiTable: true, + Tables: &ast.DeleteTableList{Tables: $6.([]*ast.TableName)}, + TableRefs: &ast.TableRefsClause{TableRefs: $8.(*ast.Join)}, + } + if $9 != nil { + x.Where = $9.(ast.ExprNode) + } + $$ = x + if yylex.(*lexer).root { + break + } + } + +DatabaseSym: + "DATABASE" | "SCHEMA" + +DropDatabaseStmt: + "DROP" DatabaseSym IfExists DBName + { + $$ = &ast.DropDatabaseStmt{IfExists: $3.(bool), Name: $4.(string)} + if yylex.(*lexer).root { + break + } + } + +DropIndexStmt: + "DROP" "INDEX" IfExists Identifier "ON" TableName + { + $$ = &ast.DropIndexStmt{IfExists: $3.(bool), IndexName: $4.(string), Table: $6.(*ast.TableName)} + } + +DropTableStmt: + "DROP" TableOrTables TableNameList + { + $$ = &ast.DropTableStmt{Tables: $3.([]*ast.TableName)} + if yylex.(*lexer).root { + break + } + } +| "DROP" TableOrTables "IF" "EXISTS" TableNameList + { + $$ = &ast.DropTableStmt{IfExists: true, Tables: $5.([]*ast.TableName)} + if yylex.(*lexer).root { + break + } + } + +TableOrTables: + "TABLE" +| "TABLES" + +EqOpt: + { + } +| eq + { + } + +EmptyStmt: + /* EMPTY */ + { + $$ = nil + } + +ExplainSym: + "EXPLAIN" +| "DESCRIBE" +| "DESC" + +ExplainStmt: + ExplainSym TableName + { + $$ = &ast.ExplainStmt{ + Stmt: &ast.ShowStmt{ + Tp: ast.ShowColumns, + Table: $2.(*ast.TableName), + }, + } + } +| ExplainSym TableName ColumnName + { + $$ = &ast.ExplainStmt{ + Stmt: &ast.ShowStmt{ + Tp: ast.ShowColumns, + Table: $2.(*ast.TableName), + Column: $3.(*ast.ColumnName), + }, + } + } +| ExplainSym ExplainableStmt + { + $$ = &ast.ExplainStmt{Stmt: $2.(ast.StmtNode)} + } + +LengthNum: + NUM + { + switch v := $1.(type) { + case int64: + $$ = uint64(v) + case uint64: + $$ = uint64(v) + } + } + +NUM: + intLit + +Expression: + Expression logOr Expression %prec oror + { + $$ = &ast.BinaryOperationExpr{Op: opcode.OrOr, L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| Expression "XOR" Expression %prec xor + { + $$ = &ast.BinaryOperationExpr{Op: opcode.LogicXor, L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| Expression logAnd Expression %prec andand + { + $$ = &ast.BinaryOperationExpr{Op: opcode.AndAnd, L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| "NOT" Expression %prec not + { + $$ = &ast.UnaryOperationExpr{Op: opcode.Not, V: $2.(ast.ExprNode)} + } +| Factor "IS" NotOpt trueKwd %prec is + { + $$ = &ast.IsTruthExpr{Expr:$1.(ast.ExprNode), Not: $3.(bool), True: int64(1)} + } +| Factor "IS" NotOpt falseKwd %prec is + { + $$ = &ast.IsTruthExpr{Expr:$1.(ast.ExprNode), Not: $3.(bool), True: int64(0)} + } +| Factor "IS" NotOpt "UNKNOWN" %prec is + { + /* https://dev.mysql.com/doc/refman/5.7/en/comparison-operators.html#operator_is */ + $$ = &ast.IsNullExpr{Expr: $1.(ast.ExprNode), Not: $3.(bool)} + } +| Factor + + +logOr: + "||" + { + } +| "OR" + { + } + +logAnd: + "&&" + { + } +| "AND" + { + } + +name: + Identifier + +ExpressionList: + Expression + { + $$ = []ast.ExprNode{$1.(ast.ExprNode)} + } +| ExpressionList ',' Expression + { + $$ = append($1.([]ast.ExprNode), $3.(ast.ExprNode)) + } + +ExpressionListOpt: + { + $$ = []ast.ExprNode{} + } +| ExpressionList + +Factor: + Factor "IS" NotOpt "NULL" %prec is + { + $$ = &ast.IsNullExpr{Expr: $1.(ast.ExprNode), Not: $3.(bool)} + } +| Factor CompareOp PredicateExpr %prec eq + { + $$ = &ast.BinaryOperationExpr{Op: $2.(opcode.Op), L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| Factor CompareOp AnyOrAll SubSelect %prec eq + { + $$ = &ast.CompareSubqueryExpr{Op: $2.(opcode.Op), L: $1.(ast.ExprNode), R: $4.(*ast.SubqueryExpr), All: $3.(bool)} + } +| PredicateExpr + +CompareOp: + ">=" + { + $$ = opcode.GE + } +| '>' + { + $$ = opcode.GT + } +| "<=" + { + $$ = opcode.LE + } +| '<' + { + $$ = opcode.LT + } +| "!=" + { + $$ = opcode.NE + } +| "<>" + { + $$ = opcode.NE + } +| "=" + { + $$ = opcode.EQ + } +| "<=>" + { + $$ = opcode.NullEQ + } + +AnyOrAll: + "ANY" + { + $$ = false + } +| "SOME" + { + $$ = false + } +| "ALL" + { + $$ = true + } + +PredicateExpr: + PrimaryFactor NotOpt "IN" '(' ExpressionList ')' + { + $$ = &ast.PatternInExpr{Expr: $1.(ast.ExprNode), Not: $2.(bool), List: $5.([]ast.ExprNode)} + } +| PrimaryFactor NotOpt "IN" SubSelect + { + $$ = &ast.PatternInExpr{Expr: $1.(ast.ExprNode), Not: $2.(bool), Sel: $4.(*ast.SubqueryExpr)} + } +| PrimaryFactor NotOpt "BETWEEN" PrimaryFactor "AND" PredicateExpr + { + $$ = &ast.BetweenExpr{ + Expr: $1.(ast.ExprNode), + Left: $4.(ast.ExprNode), + Right: $6.(ast.ExprNode), + Not: $2.(bool), + } + } +| PrimaryFactor NotOpt "LIKE" PrimaryExpression LikeEscapeOpt + { + escape := $5.(string) + if len(escape) > 1 { + yylex.(*lexer).errf("Incorrect arguments %s to ESCAPE", escape) + return 1 + } else if len(escape) == 0 { + escape = "\\" + } + $$ = &ast.PatternLikeExpr{ + Expr: $1.(ast.ExprNode), + Pattern: $4.(ast.ExprNode), + Not: $2.(bool), + Escape: escape[0], + } + } +| PrimaryFactor NotOpt RegexpSym PrimaryExpression + { + $$ = &ast.PatternRegexpExpr{Expr: $1.(ast.ExprNode), Pattern: $4.(ast.ExprNode), Not: $2.(bool)} + } +| PrimaryFactor + +RegexpSym: + "REGEXP" +| "RLIKE" + +LikeEscapeOpt: + %prec lowerThanEscape + { + $$ = "\\" + } +| "ESCAPE" stringLit + { + $$ = $2 + } + +NotOpt: + { + $$ = false + } +| "NOT" + { + $$ = true + } + +Field: + '*' + { + $$ = &ast.SelectField{WildCard: &ast.WildCardField{}} + } +| Identifier '.' '*' + { + wildCard := &ast.WildCardField{Table: model.NewCIStr($1.(string))} + $$ = &ast.SelectField{WildCard: wildCard} + } +| Identifier '.' Identifier '.' '*' + { + wildCard := &ast.WildCardField{Schema: model.NewCIStr($1.(string)), Table: model.NewCIStr($3.(string))} + $$ = &ast.SelectField{WildCard: wildCard} + } +| Expression FieldAsNameOpt + { + expr := $1.(ast.ExprNode) + asName := $2.(string) + $$ = &ast.SelectField{Expr: expr, AsName: model.NewCIStr(asName)} + } + +FieldAsNameOpt: + /* EMPTY */ + { + $$ = "" + } +| FieldAsName + { + $$ = $1 + } + +FieldAsName: + Identifier + { + $$ = $1 + } +| "AS" Identifier + { + $$ = $2 + } +| stringLit + { + $$ = $1 + } +| "AS" stringLit + { + $$ = $2 + } + +FieldList: + Field + { + field := $1.(*ast.SelectField) + field.Offset = yylex.(*lexer).startOffset(yyS[yypt].offset) + $$ = []*ast.SelectField{field} + } +| FieldList ',' Field + { + + fl := $1.([]*ast.SelectField) + last := fl[len(fl)-1] + l := yylex.(*lexer) + if last.Expr != nil && last.AsName.O == "" { + lastEnd := l.endOffset(yyS[yypt-1].offset) + last.SetText(l.src[last.Offset:lastEnd]) + } + newField := $3.(*ast.SelectField) + newField.Offset = l.startOffset(yyS[yypt].offset) + $$ = append(fl, newField) + } + +GroupByClause: + "GROUP" "BY" ByList + { + $$ = &ast.GroupByClause{Items: $3.([]*ast.ByItem)} + } + +HavingClause: + { + $$ = nil + } +| "HAVING" Expression + { + $$ = &ast.HavingClause{Expr: $2.(ast.ExprNode)} + } + +IfExists: + { + $$ = false + } +| "IF" "EXISTS" + { + $$ = true + } + +IfNotExists: + { + $$ = false + } +| "IF" "NOT" "EXISTS" + { + $$ = true + } + + +IgnoreOptional: + { + $$ = false + } +| "IGNORE" + { + $$ = true + } + +IndexName: + { + $$ = "" + } +| Identifier + { + //"index name" + $$ = $1.(string) + } + +IndexOption: + { + $$ = nil + } +| "KEY_BLOCK_SIZE" EqOpt LengthNum + { + $$ = &ast.IndexOption{ + KeyBlockSize: $1.(uint64), + } + } +| IndexType + { + $$ = &ast.IndexOption { + Tp: $1.(model.IndexType), + } + } +| "COMMENT" stringLit + { + $$ = &ast.IndexOption { + Comment: $2.(string), + } + } + +IndexType: + "USING" "BTREE" + { + $$ = model.IndexTypeBtree + } +| "USING" "HASH" + { + $$ = model.IndexTypeHash + } + +IndexTypeOpt: + { + $$ = nil + } +| IndexType + { + $$ = $1 + } + +/**********************************Identifier********************************************/ +Identifier: + identifier | UnReservedKeyword | NotKeywordToken + +UnReservedKeyword: + "AUTO_INCREMENT" | "AFTER" | "AVG" | "BEGIN" | "BIT" | "BOOL" | "BOOLEAN" | "BTREE" | "CHARSET" | "COLUMNS" | "COMMIT" | "COMPACT" | "COMPRESSED" +| "DATE" | "DATETIME" | "DEALLOCATE" | "DO" | "DYNAMIC" | "END" | "ENGINE" | "ENGINES" | "EXECUTE" | "FIRST" | "FIXED" | "FULL" | "HASH" +| "LOCAL" | "NAMES" | "OFFSET" | "PASSWORD" %prec lowerThanEq | "PREPARE" | "QUICK" | "REDUNDANT" | "ROLLBACK" | "SESSION" | "SIGNED" +| "START" | "STATUS" | "GLOBAL" | "TABLES"| "TEXT" | "TIME" | "TIMESTAMP" | "TRANSACTION" | "TRUNCATE" | "UNKNOWN" +| "VALUE" | "WARNINGS" | "YEAR" | "MODE" | "WEEK" | "ANY" | "SOME" | "USER" | "IDENTIFIED" | "COLLATION" +| "COMMENT" | "AVG_ROW_LENGTH" | "CONNECTION" | "CHECKSUM" | "COMPRESSION" | "KEY_BLOCK_SIZE" | "MAX_ROWS" | "MIN_ROWS" +| "NATIONAL" | "ROW" | "ROW_FORMAT" | "QUARTER" | "ESCAPE" | "GRANTS" | "FIELDS" | "TRIGGERS" | "DELAY_KEY_WRITE" | "ISOLATION" +| "REPEATABLE" | "COMMITTED" | "UNCOMMITTED" | "ONLY" | "SERIALIZABLE" | "LEVEL" | "VARIABLES" + +NotKeywordToken: + "ABS" | "ADDDATE" | "ADMIN" | "COALESCE" | "CONCAT" | "CONCAT_WS" | "CONNECTION_ID" | "CUR_TIME"| "COUNT" | "DAY" +| "DATE_ADD" | "DATE_SUB" | "DAYNAME" | "DAYOFMONTH" | "DAYOFWEEK" | "DAYOFYEAR" | "FOUND_ROWS" | "GROUP_CONCAT"| "HOUR" +| "IFNULL" | "LENGTH" | "LOCATE" | "MAX" | "MICROSECOND" | "MIN" | "MINUTE" | "NULLIF" | "MONTH" | "NOW" | "POW" +| "POWER" | "RAND" | "SECOND" | "SQL_CALC_FOUND_ROWS" | "SUBDATE" | "SUBSTRING" %prec lowerThanLeftParen +| "SUBSTRING_INDEX" | "SUM" | "TRIM" | "VERSION" | "WEEKDAY" | "WEEKOFYEAR" | "YEARWEEK" + +/************************************************************************************ + * + * Insert Statments + * + * TODO: support PARTITION + **********************************************************************************/ +InsertIntoStmt: + "INSERT" Priority IgnoreOptional IntoOpt TableName InsertValues OnDuplicateKeyUpdate + { + x := $6.(*ast.InsertStmt) + x.Priority = $2.(int) + // Wraps many layers here so that it can be processed the same way as select statement. + ts := &ast.TableSource{Source: $5.(*ast.TableName)} + x.Table = &ast.TableRefsClause{TableRefs: &ast.Join{Left: ts}} + if $7 != nil { + x.OnDuplicate = $7.([]*ast.Assignment) + } + $$ = x + if yylex.(*lexer).root { + break + } + } + +IntoOpt: + { + } +| "INTO" + { + } + +InsertValues: + '(' ColumnNameListOpt ')' ValueSym ExpressionListList + { + $$ = &ast.InsertStmt{ + Columns: $2.([]*ast.ColumnName), + Lists: $5.([][]ast.ExprNode), + } + } +| '(' ColumnNameListOpt ')' SelectStmt + { + $$ = &ast.InsertStmt{Columns: $2.([]*ast.ColumnName), Select: $4.(*ast.SelectStmt)} + } +| '(' ColumnNameListOpt ')' UnionStmt + { + $$ = &ast.InsertStmt{Columns: $2.([]*ast.ColumnName), Select: $4.(*ast.UnionStmt)} + } +| ValueSym ExpressionListList %prec insertValues + { + $$ = &ast.InsertStmt{Lists: $2.([][]ast.ExprNode)} + } +| SelectStmt + { + $$ = &ast.InsertStmt{Select: $1.(*ast.SelectStmt)} + } +| UnionStmt + { + $$ = &ast.InsertStmt{Select: $1.(*ast.UnionStmt)} + } +| "SET" ColumnSetValueList + { + $$ = &ast.InsertStmt{Setlist: $2.([]*ast.Assignment)} + } + +ValueSym: + "VALUE" +| "VALUES" + +ExpressionListList: + '(' ')' + { + $$ = [][]ast.ExprNode{[]ast.ExprNode{}} + } +| '(' ')' ',' ExpressionListList + { + $$ = append([][]ast.ExprNode{[]ast.ExprNode{}}, $4.([][]ast.ExprNode)...) + } +| '(' ExpressionList ')' + { + $$ = [][]ast.ExprNode{$2.([]ast.ExprNode)} + } +| '(' ExpressionList ')' ',' ExpressionListList + { + $$ = append([][]ast.ExprNode{$2.([]ast.ExprNode)}, $5.([][]ast.ExprNode)...) + } + +ColumnSetValue: + ColumnName eq Expression + { + $$ = &ast.Assignment{ + Column: $1.(*ast.ColumnName), + Expr: $3.(ast.ExprNode), + } + } + +ColumnSetValueList: + { + $$ = []*ast.Assignment{} + } +| ColumnSetValue + { + $$ = []*ast.Assignment{$1.(*ast.Assignment)} + } +| ColumnSetValueList ',' ColumnSetValue + { + $$ = append($1.([]*ast.Assignment), $3.(*ast.Assignment)) + } + +/* + * ON DUPLICATE KEY UPDATE col_name=expr [, col_name=expr] ... + * See: https://dev.mysql.com/doc/refman/5.7/en/insert-on-duplicate.html + */ +OnDuplicateKeyUpdate: + { + $$ = nil + } +| "ON" "DUPLICATE" "KEY" "UPDATE" AssignmentList + { + $$ = $5 + } + +/***********************************Insert Statements END************************************/ + +/************************************************************************************ + * Replace Statements + * See: https://dev.mysql.com/doc/refman/5.7/en/replace.html + * + * TODO: support PARTITION + **********************************************************************************/ +ReplaceIntoStmt: + "REPLACE" ReplacePriority IntoOpt TableName InsertValues + { + x := $5.(*ast.InsertStmt) + x.IsReplace = true + x.Priority = $2.(int) + ts := &ast.TableSource{Source: $4.(*ast.TableName)} + x.Table = &ast.TableRefsClause{TableRefs: &ast.Join{Left: ts}} + $$ = x + } + +ReplacePriority: + { + $$ = ast.NoPriority + } +| "LOW_PRIORITY" + { + $$ = ast.LowPriority + } +| "DELAYED" + { + $$ = ast.DelayedPriority + } + +/***********************************Replace Statments END************************************/ + +Literal: + "false" + { + $$ = int64(0) + } +| "NULL" +| "true" + { + $$ = int64(1) + } +| floatLit +| intLit +| stringLit + { + tp := types.NewFieldType(mysql.TypeString) + l := yylex.(*lexer) + tp.Charset, tp.Collate = l.GetCharsetInfo() + expr := ast.NewValueExpr($1) + expr.SetType(tp) + $$ = expr + } +| "UNDERSCORE_CHARSET" stringLit + { + // See: https://dev.mysql.com/doc/refman/5.7/en/charset-literal.html + tp := types.NewFieldType(mysql.TypeString) + tp.Charset = $1.(string) + co, err := charset.GetDefaultCollation(tp.Charset) + if err != nil { + l := yylex.(*lexer) + l.errf("Get collation error for charset: %s", tp.Charset) + return 1 + } + tp.Collate = co + expr := ast.NewValueExpr($2) + expr.SetType(tp) + $$ = expr + } +| hexLit +| bitLit + +Operand: + Literal + { + $$ = ast.NewValueExpr($1) + } +| ColumnName + { + $$ = &ast.ColumnNameExpr{Name: $1.(*ast.ColumnName)} + } +| '(' Expression ')' + { + l := yylex.(*lexer) + startOffset := l.startOffset(yyS[yypt-1].offset) + endOffset := l.endOffset(yyS[yypt].offset) + expr := $2.(ast.ExprNode) + expr.SetText(l.src[startOffset:endOffset]) + $$ = &ast.ParenthesesExpr{Expr: expr} + } +| "DEFAULT" %prec lowerThanLeftParen + { + $$ = &ast.DefaultExpr{} + } +| "DEFAULT" '(' ColumnName ')' + { + $$ = &ast.DefaultExpr{Name: $3.(*ast.ColumnName)} + } +| Variable + { + $$ = $1 + } +| "PLACEHOLDER" + { + $$ = &ast.ParamMarkerExpr{ + Offset: yyS[yypt].offset, + } + } +| "ROW" '(' Expression ',' ExpressionList ')' + { + values := append([]ast.ExprNode{$3.(ast.ExprNode)}, $5.([]ast.ExprNode)...) + $$ = &ast.RowExpr{Values: values} + } +| '(' Expression ',' ExpressionList ')' + { + values := append([]ast.ExprNode{$2.(ast.ExprNode)}, $4.([]ast.ExprNode)...) + $$ = &ast.RowExpr{Values: values} + } +| "EXISTS" SubSelect + { + $$ = &ast.ExistsSubqueryExpr{Sel: $2.(*ast.SubqueryExpr)} + } + +OrderBy: + "ORDER" "BY" ByList + { + $$ = &ast.OrderByClause{Items: $3.([]*ast.ByItem)} + } + +ByList: + ByItem + { + $$ = []*ast.ByItem{$1.(*ast.ByItem)} + } +| ByList ',' ByItem + { + $$ = append($1.([]*ast.ByItem), $3.(*ast.ByItem)) + } + +ByItem: + Expression Order + { + expr := $1 + valueExpr, ok := expr.(*ast.ValueExpr) + if ok { + position, isPosition := valueExpr.GetValue().(int64) + if isPosition { + expr = &ast.PositionExpr{N: int(position)} + } + } + $$ = &ast.ByItem{Expr: expr.(ast.ExprNode), Desc: $2.(bool)} + } + +Order: + /* EMPTY */ + { + $$ = false // ASC by default + } +| "ASC" + { + $$ = false + } +| "DESC" + { + $$ = true + } + +OrderByOptional: + { + $$ = nil + } +| OrderBy + { + $$ = $1 + } + +PrimaryExpression: + Operand +| Function +| SubSelect +| '!' PrimaryExpression %prec neg + { + $$ = &ast.UnaryOperationExpr{Op: opcode.Not, V: $2.(ast.ExprNode)} + } +| '~' PrimaryExpression %prec neg + { + $$ = &ast.UnaryOperationExpr{Op: opcode.BitNeg, V: $2.(ast.ExprNode)} + } +| '-' PrimaryExpression %prec neg + { + $$ = &ast.UnaryOperationExpr{Op: opcode.Minus, V: $2.(ast.ExprNode)} + } +| '+' PrimaryExpression %prec neg + { + $$ = &ast.UnaryOperationExpr{Op: opcode.Plus, V: $2.(ast.ExprNode)} + } +| "BINARY" PrimaryExpression %prec neg + { + // See: https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#operator_binary + x := types.NewFieldType(mysql.TypeString) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + $$ = &ast.FuncCastExpr{ + Expr: $2.(ast.ExprNode), + Tp: x, + FunctionType: ast.CastBinaryOperator, + } + } +| PrimaryExpression "COLLATE" StringName %prec neg + { + // TODO: Create a builtin function hold expr and collation. When do evaluation, convert expr result using the collation. + $$ = $1 + } + +Function: + FunctionCallKeyword +| FunctionCallNonKeyword +| FunctionCallConflict +| FunctionCallAgg + +FunctionNameConflict: + "DATABASE" | "SCHEMA" | "IF" | "LEFT" | "REPEAT" | "CURRENT_USER" | "CURRENT_DATE" | "VERSION" + +FunctionCallConflict: + FunctionNameConflict '(' ExpressionListOpt ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: $3.([]ast.ExprNode)} + } +| "CURRENT_USER" + { + // See: https://dev.mysql.com/doc/refman/5.7/en/information-functions.html#function_current-user + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string))} + } +| "CURRENT_DATE" + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string))} + } + +DistinctOpt: + { + $$ = false + } +| "ALL" + { + $$ = false + } +| "DISTINCT" + { + $$ = true + } +| "DISTINCT" "ALL" + { + $$ = true + } + +FunctionCallKeyword: + "CAST" '(' Expression "AS" CastType ')' + { + /* See: https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#function_cast */ + $$ = &ast.FuncCastExpr{ + Expr: $3.(ast.ExprNode), + Tp: $5.(*types.FieldType), + FunctionType: ast.CastFunction, + } + } +| "CASE" ExpressionOpt WhenClauseList ElseOpt "END" + { + x := &ast.CaseExpr{WhenClauses: $3.([]*ast.WhenClause)} + if $2 != nil { + x.Value = $2.(ast.ExprNode) + } + if $4 != nil { + x.ElseClause = $4.(ast.ExprNode) + } + $$ = x + } +| "CONVERT" '(' Expression "USING" StringName ')' + { + // See: https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#function_convert + charset := ast.NewValueExpr($5) + $$ = &ast.FuncCallExpr{ + FnName: model.NewCIStr($1.(string)), + Args: []ast.ExprNode{$3.(ast.ExprNode), charset}, + } + } +| "CONVERT" '(' Expression ',' CastType ')' + { + // See: https://dev.mysql.com/doc/refman/5.7/en/cast-functions.html#function_convert + $$ = &ast.FuncCastExpr{ + Expr: $3.(ast.ExprNode), + Tp: $5.(*types.FieldType), + FunctionType: ast.CastConvertFunction, + } + } +| "DATE" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "USER" '(' ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string))} + } +| "VALUES" '(' ColumnName ')' %prec lowerThanInsertValues + { + // TODO: support qualified identifier for column_name + $$ = &ast.ValuesExpr{Column: &ast.ColumnNameExpr{Name: $3.(*ast.ColumnName)}} + } +| "WEEK" '(' ExpressionList ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: $3.([]ast.ExprNode)} + } +| "YEAR" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName:model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } + +FunctionCallNonKeyword: + "COALESCE" '(' ExpressionList ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: $3.([]ast.ExprNode)} + } +| "CURDATE" '(' ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string))} + } +| "CUR_TIME" '(' ExpressionOpt ')' + { + args := []ast.ExprNode{} + if $3 != nil { + args = append(args, $3.(ast.ExprNode)) + } + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: args} + } +| "CURRENT_TIME" FuncDatetimePrec + { + args := []ast.ExprNode{} + if $2 != nil { + args = append(args, $2.(ast.ExprNode)) + } + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: args} + } +| "CURRENT_TIMESTAMP" FuncDatetimePrec + { + args := []ast.ExprNode{} + if $2 != nil { + args = append(args, $2.(ast.ExprNode)) + } + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: args} + } +| "ABS" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "CONCAT" '(' ExpressionList ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: $3.([]ast.ExprNode)} + } +| "CONCAT_WS" '(' ExpressionList ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: $3.([]ast.ExprNode)} + } +| "DAY" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "DAYNAME" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "DAYOFWEEK" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "DAYOFMONTH" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "DAYOFYEAR" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| DateArithOpt '(' Expression ',' "INTERVAL" Expression TimeUnit ')' + { + op := ast.NewValueExpr($1) + dateArithInterval := ast.NewValueExpr( + ast.DateArithInterval{ + Unit: $7.(string), + Interval: $6.(ast.ExprNode), + }, + ) + + $$ = &ast.FuncCallExpr{ + FnName: model.NewCIStr("DATE_ARITH"), + Args: []ast.ExprNode{ + op, + $3.(ast.ExprNode), + dateArithInterval, + }, + } + } +| DateArithMultiFormsOpt '(' Expression ',' DateArithInterval')' + { + op := ast.NewValueExpr($1) + dateArithInterval := ast.NewValueExpr($5) + $$ = &ast.FuncCallExpr{ + FnName: model.NewCIStr("DATE_ARITH"), + Args: []ast.ExprNode{ + op, + $3.(ast.ExprNode), + dateArithInterval, + }, + } + } +| "EXTRACT" '(' TimeUnit "FROM" Expression ')' + { + timeUnit := ast.NewValueExpr($3) + $$ = &ast.FuncCallExpr{ + FnName: model.NewCIStr($1.(string)), + Args: []ast.ExprNode{timeUnit, $5.(ast.ExprNode)}, + } + } +| "FOUND_ROWS" '(' ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string))} + } +| "HOUR" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "IFNULL" '(' ExpressionList ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: $3.([]ast.ExprNode)} + } +| "LENGTH" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "LOCATE" '(' Expression ',' Expression ')' + { + $$ = &ast.FuncCallExpr{ + FnName: model.NewCIStr($1.(string)), + Args: []ast.ExprNode{$3.(ast.ExprNode), $5.(ast.ExprNode)}, + } + } +| "LOCATE" '(' Expression ',' Expression ',' Expression ')' + { + $$ = &ast.FuncCallExpr{ + FnName: model.NewCIStr($1.(string)), + Args: []ast.ExprNode{$3.(ast.ExprNode), $5.(ast.ExprNode), $7.(ast.ExprNode)}, + } + } +| "LOWER" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "MICROSECOND" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "MINUTE" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "MONTH" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "NOW" '(' ExpressionOpt ')' + { + args := []ast.ExprNode{} + if $3 != nil { + args = append(args, $3.(ast.ExprNode)) + } + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: args} + } +| "NULLIF" '(' ExpressionList ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: $3.([]ast.ExprNode)} + } +| "POW" '(' Expression ',' Expression ')' + { + args := []ast.ExprNode{$3.(ast.ExprNode), $5.(ast.ExprNode)} + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: args} + } +| "POWER" '(' Expression ',' Expression ')' + { + args := []ast.ExprNode{$3.(ast.ExprNode), $5.(ast.ExprNode)} + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: args} + } +| "RAND" '(' ExpressionOpt ')' + { + + args := []ast.ExprNode{} + if $3 != nil { + args = append(args, $3.(ast.ExprNode)) + } + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: args} + } +| "REPLACE" '(' Expression ',' Expression ',' Expression ')' + { + args := []ast.ExprNode{$3.(ast.ExprNode), $5.(ast.ExprNode), $7.(ast.ExprNode)} + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: args} + } +| "SECOND" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "STRCMP" '(' Expression ',' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode), $5.(ast.ExprNode)}} + } +| "SUBSTRING" '(' Expression ',' Expression ')' + { + $$ = &ast.FuncCallExpr{ + FnName: model.NewCIStr($1.(string)), + Args: []ast.ExprNode{$3.(ast.ExprNode), $5.(ast.ExprNode)}, + } + } +| "SUBSTRING" '(' Expression "FROM" Expression ')' + { + $$ = &ast.FuncCallExpr{ + FnName: model.NewCIStr($1.(string)), + Args: []ast.ExprNode{$3.(ast.ExprNode), $5.(ast.ExprNode)}, + } + } +| "SUBSTRING" '(' Expression ',' Expression ',' Expression ')' + { + $$ = &ast.FuncCallExpr{ + FnName: model.NewCIStr($1.(string)), + Args: []ast.ExprNode{$3.(ast.ExprNode), $5.(ast.ExprNode), $7.(ast.ExprNode)}, + } + } +| "SUBSTRING" '(' Expression "FROM" Expression "FOR" Expression ')' + { + $$ = &ast.FuncCallExpr{ + FnName: model.NewCIStr($1.(string)), + Args: []ast.ExprNode{$3.(ast.ExprNode), $5.(ast.ExprNode), $7.(ast.ExprNode)}, + } + } +| "SUBSTRING_INDEX" '(' Expression ',' Expression ',' Expression ')' + { + $$ = &ast.FuncCallExpr{ + FnName: model.NewCIStr($1.(string)), + Args: []ast.ExprNode{$3.(ast.ExprNode), $5.(ast.ExprNode), $7.(ast.ExprNode)}, + } + } +| "SYSDATE" '(' ExpressionOpt ')' + { + args := []ast.ExprNode{} + if $3 != nil { + args = append(args, $3.(ast.ExprNode)) + } + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: args} + } +| "TRIM" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{ + FnName: model.NewCIStr($1.(string)), + Args: []ast.ExprNode{$3.(ast.ExprNode)}, + } + } +| "TRIM" '(' Expression "FROM" Expression ')' + { + $$ = &ast.FuncCallExpr{ + FnName: model.NewCIStr($1.(string)), + Args: []ast.ExprNode{$5.(ast.ExprNode), $3.(ast.ExprNode)}, + } + } +| "TRIM" '(' TrimDirection "FROM" Expression ')' + { + nilVal := ast.NewValueExpr(nil) + direction := ast.NewValueExpr($3) + $$ = &ast.FuncCallExpr{ + FnName: model.NewCIStr($1.(string)), + Args: []ast.ExprNode{$5.(ast.ExprNode), nilVal, direction}, + } + } +| "TRIM" '(' TrimDirection Expression "FROM" Expression ')' + { + direction := ast.NewValueExpr($3) + $$ = &ast.FuncCallExpr{ + FnName: model.NewCIStr($1.(string)), + Args: []ast.ExprNode{$6.(ast.ExprNode),$4.(ast.ExprNode), direction}, + } + } +| "UPPER" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "WEEKDAY" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "WEEKOFYEAR" '(' Expression ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: []ast.ExprNode{$3.(ast.ExprNode)}} + } +| "YEARWEEK" '(' ExpressionList ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string)), Args: $3.([]ast.ExprNode)} + } +| "CONNECTION_ID" '(' ')' + { + $$ = &ast.FuncCallExpr{FnName: model.NewCIStr($1.(string))} + } + +DateArithOpt: + "DATE_ADD" + { + $$ = ast.DateAdd + } +| "DATE_SUB" + { + $$ = ast.DateSub + } + +DateArithMultiFormsOpt: + "ADDDATE" + { + $$ = ast.DateAdd + } +| "SUBDATE" + { + $$ = ast.DateSub + } + +DateArithInterval: + Expression + { + $$ = ast.DateArithInterval{ + Unit: "day", + Interval: $1.(ast.ExprNode), + } + } +| "INTERVAL" Expression TimeUnit + { + $$ = ast.DateArithInterval{Unit: $3.(string), Interval: $2.(ast.ExprNode)} + } + +TrimDirection: + "BOTH" + { + $$ = ast.TrimBoth + } +| "LEADING" + { + $$ = ast.TrimLeading + } +| "TRAILING" + { + $$ = ast.TrimTrailing + } + +FunctionCallAgg: + "AVG" '(' DistinctOpt ExpressionList ')' + { + $$ = &ast.AggregateFuncExpr{F: $1.(string), Args: $4.([]ast.ExprNode), Distinct: $3.(bool)} + } +| "COUNT" '(' DistinctOpt ExpressionList ')' + { + $$ = &ast.AggregateFuncExpr{F: $1.(string), Args: $4.([]ast.ExprNode), Distinct: $3.(bool)} + } +| "COUNT" '(' DistinctOpt '*' ')' + { + args := []ast.ExprNode{ast.NewValueExpr(ast.UnquoteString("*"))} + $$ = &ast.AggregateFuncExpr{F: $1.(string), Args: args, Distinct: $3.(bool)} + } +| "GROUP_CONCAT" '(' DistinctOpt ExpressionList ')' + { + $$ = &ast.AggregateFuncExpr{F: $1.(string), Args: $4.([]ast.ExprNode), Distinct: $3.(bool)} + } +| "MAX" '(' DistinctOpt Expression ')' + { + $$ = &ast.AggregateFuncExpr{F: $1.(string), Args: []ast.ExprNode{$4.(ast.ExprNode)}, Distinct: $3.(bool)} + } +| "MIN" '(' DistinctOpt Expression ')' + { + $$ = &ast.AggregateFuncExpr{F: $1.(string), Args: []ast.ExprNode{$4.(ast.ExprNode)}, Distinct: $3.(bool)} + } +| "SUM" '(' DistinctOpt Expression ')' + { + $$ = &ast.AggregateFuncExpr{F: $1.(string), Args: []ast.ExprNode{$4.(ast.ExprNode)}, Distinct: $3.(bool)} + } + +FuncDatetimePrec: + { + $$ = nil + } +| '(' ')' + { + $$ = nil + } +| '(' Expression ')' + { + $$ = $2 + } + +TimeUnit: + "MICROSECOND" | "SECOND" | "MINUTE" | "HOUR" | "DAY" | "WEEK" +| "MONTH" | "QUARTER" | "YEAR" | "SECOND_MICROSECOND" | "MINUTE_MICROSECOND" +| "MINUTE_SECOND" | "HOUR_MICROSECOND" | "HOUR_SECOND" | "HOUR_MINUTE" +| "DAY_MICROSECOND" | "DAY_SECOND" | "DAY_MINUTE" | "DAY_HOUR" | "YEAR_MONTH" + +ExpressionOpt: + { + $$ = nil + } +| Expression + { + $$ = $1 + } + +WhenClauseList: + WhenClause + { + $$ = []*ast.WhenClause{$1.(*ast.WhenClause)} + } +| WhenClauseList WhenClause + { + $$ = append($1.([]*ast.WhenClause), $2.(*ast.WhenClause)) + } + +WhenClause: + "WHEN" Expression "THEN" Expression + { + $$ = &ast.WhenClause{ + Expr: $2.(ast.ExprNode), + Result: $4.(ast.ExprNode), + } + } + +ElseOpt: + /* empty */ + { + $$ = nil + } +| "ELSE" Expression + { + $$ = $2 + } + +CastType: + "BINARY" OptFieldLen + { + x := types.NewFieldType(mysql.TypeString) + x.Flen = $2.(int) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + $$ = x + } +| "CHAR" OptFieldLen OptBinary OptCharset + { + x := types.NewFieldType(mysql.TypeString) + x.Flen = $2.(int) + if $3.(bool) { + x.Flag |= mysql.BinaryFlag + } + x.Charset = $4.(string) + $$ = x + } +| "DATE" + { + x := types.NewFieldType(mysql.TypeDate) + $$ = x + } +| "DATETIME" OptFieldLen + { + x := types.NewFieldType(mysql.TypeDatetime) + x.Decimal = $2.(int) + $$ = x + } +| "DECIMAL" FloatOpt + { + fopt := $2.(*ast.FloatOpt) + x := types.NewFieldType(mysql.TypeNewDecimal) + x.Flen = fopt.Flen + x.Decimal = fopt.Decimal + $$ = x + } +| "TIME" OptFieldLen + { + x := types.NewFieldType(mysql.TypeDuration) + x.Decimal = $2.(int) + $$ = x + } +| "SIGNED" OptInteger + { + x := types.NewFieldType(mysql.TypeLonglong) + $$ = x + } +| "UNSIGNED" OptInteger + { + x := types.NewFieldType(mysql.TypeLonglong) + x.Flag |= mysql.UnsignedFlag + $$ = x + } + + +PrimaryFactor: + PrimaryFactor '|' PrimaryFactor %prec '|' + { + $$ = &ast.BinaryOperationExpr{Op: opcode.Or, L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| PrimaryFactor '&' PrimaryFactor %prec '&' + { + $$ = &ast.BinaryOperationExpr{Op: opcode.And, L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| PrimaryFactor "<<" PrimaryFactor %prec lsh + { + $$ = &ast.BinaryOperationExpr{Op: opcode.LeftShift, L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| PrimaryFactor ">>" PrimaryFactor %prec rsh + { + $$ = &ast.BinaryOperationExpr{Op: opcode.RightShift, L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| PrimaryFactor '+' PrimaryFactor %prec '+' + { + $$ = &ast.BinaryOperationExpr{Op: opcode.Plus, L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| PrimaryFactor '-' PrimaryFactor %prec '-' + { + $$ = &ast.BinaryOperationExpr{Op: opcode.Minus, L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| PrimaryFactor '*' PrimaryFactor %prec '*' + { + $$ = &ast.BinaryOperationExpr{Op: opcode.Mul, L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| PrimaryFactor '/' PrimaryFactor %prec '/' + { + $$ = &ast.BinaryOperationExpr{Op: opcode.Div, L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| PrimaryFactor '%' PrimaryFactor %prec '%' + { + $$ = &ast.BinaryOperationExpr{Op: opcode.Mod, L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| PrimaryFactor "DIV" PrimaryFactor %prec div + { + $$ = &ast.BinaryOperationExpr{Op: opcode.IntDiv, L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| PrimaryFactor "MOD" PrimaryFactor %prec mod + { + $$ = &ast.BinaryOperationExpr{Op: opcode.Mod, L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| PrimaryFactor '^' PrimaryFactor + { + $$ = &ast.BinaryOperationExpr{Op: opcode.Xor, L: $1.(ast.ExprNode), R: $3.(ast.ExprNode)} + } +| PrimaryExpression + + +Priority: + { + $$ = ast.NoPriority + } +| "LOW_PRIORITY" + { + $$ = ast.LowPriority + } +| "HIGH_PRIORITY" + { + $$ = ast.HighPriority + } +| "DELAYED" + { + $$ = ast.DelayedPriority + } + +LowPriorityOptional: + { + $$ = false + } +| "LOW_PRIORITY" + { + $$ = true + } + +TableName: + Identifier + { + $$ = &ast.TableName{Name:model.NewCIStr($1.(string))} + } +| Identifier '.' Identifier + { + $$ = &ast.TableName{Schema:model.NewCIStr($1.(string)), Name:model.NewCIStr($3.(string))} + } + +TableNameList: + TableName + { + tbl := []*ast.TableName{$1.(*ast.TableName)} + $$ = tbl + } +| TableNameList ',' TableName + { + $$ = append($1.([]*ast.TableName), $3.(*ast.TableName)) + } + +QuickOptional: + %prec lowerThanQuick + { + $$ = false + } +| "QUICK" + { + $$ = true + } + +/***************************Prepared Statement Start****************************** + * See: https://dev.mysql.com/doc/refman/5.7/en/prepare.html + * Example: + * PREPARE stmt_name FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse'; + * OR + * SET @s = 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse'; + * PREPARE stmt_name FROM @s; + */ + +PreparedStmt: + "PREPARE" Identifier "FROM" PrepareSQL + { + var sqlText string + var sqlVar *ast.VariableExpr + switch $4.(type) { + case string: + sqlText = $4.(string) + case *ast.VariableExpr: + sqlVar = $4.(*ast.VariableExpr) + } + $$ = &ast.PrepareStmt{ + Name: $2.(string), + SQLText: sqlText, + SQLVar: sqlVar, + } + } + +PrepareSQL: + stringLit +| UserVariable + + +/* + * See: https://dev.mysql.com/doc/refman/5.7/en/execute.html + * Example: + * EXECUTE stmt1 USING @a, @b; + * OR + * EXECUTE stmt1; + */ +ExecuteStmt: + "EXECUTE" Identifier + { + $$ = &ast.ExecuteStmt{Name: $2.(string)} + } +| "EXECUTE" Identifier "USING" UserVariableList + { + $$ = &ast.ExecuteStmt{ + Name: $2.(string), + UsingVars: $4.([]ast.ExprNode), + } + } + +UserVariableList: + UserVariable + { + $$ = []ast.ExprNode{$1.(ast.ExprNode)} + } +| UserVariableList ',' UserVariable + { + $$ = append($1.([]ast.ExprNode), $3.(ast.ExprNode)) + } + +/* + * See: https://dev.mysql.com/doc/refman/5.0/en/deallocate-prepare.html + */ + +DeallocateStmt: + DeallocateSym "PREPARE" Identifier + { + $$ = &ast.DeallocateStmt{Name: $3.(string)} + } + +DeallocateSym: + "DEALLOCATE" | "DROP" + +/****************************Prepared Statement End*******************************/ + + +RollbackStmt: + "ROLLBACK" + { + $$ = &ast.RollbackStmt{} + } + +SelectStmt: + "SELECT" SelectStmtOpts SelectStmtFieldList SelectStmtLimit SelectLockOpt + { + st := &ast.SelectStmt { + Distinct: $2.(bool), + Fields: $3.(*ast.FieldList), + LockTp: $5.(ast.SelectLockType), + } + lastField := st.Fields.Fields[len(st.Fields.Fields)-1] + if lastField.Expr != nil && lastField.AsName.O == "" { + src := yylex.(*lexer).src + var lastEnd int + if $4 != nil { + lastEnd = yyS[yypt-1].offset-1 + } else if $5 != ast.SelectLockNone { + lastEnd = yyS[yypt].offset-1 + } else { + lastEnd = len(src) + if src[lastEnd-1] == ';' { + lastEnd-- + } + } + lastField.SetText(src[lastField.Offset:lastEnd]) + } + if $4 != nil { + st.Limit = $4.(*ast.Limit) + } + $$ = st + } +| "SELECT" SelectStmtOpts SelectStmtFieldList FromDual WhereClauseOptional SelectStmtLimit SelectLockOpt + { + st := &ast.SelectStmt { + Distinct: $2.(bool), + Fields: $3.(*ast.FieldList), + LockTp: $7.(ast.SelectLockType), + } + lastField := st.Fields.Fields[len(st.Fields.Fields)-1] + if lastField.Expr != nil && lastField.AsName.O == "" { + lastEnd := yyS[yypt-3].offset-1 + lastField.SetText(yylex.(*lexer).src[lastField.Offset:lastEnd]) + } + if $5 != nil { + st.Where = $5.(ast.ExprNode) + } + if $6 != nil { + st.Limit = $6.(*ast.Limit) + } + $$ = st + } +| "SELECT" SelectStmtOpts SelectStmtFieldList "FROM" + TableRefsClause WhereClauseOptional SelectStmtGroup HavingClause OrderByOptional + SelectStmtLimit SelectLockOpt + { + st := &ast.SelectStmt{ + Distinct: $2.(bool), + Fields: $3.(*ast.FieldList), + From: $5.(*ast.TableRefsClause), + LockTp: $11.(ast.SelectLockType), + } + + lastField := st.Fields.Fields[len(st.Fields.Fields)-1] + if lastField.Expr != nil && lastField.AsName.O == "" { + lastEnd := yyS[yypt-7].offset-1 + lastField.SetText(yylex.(*lexer).src[lastField.Offset:lastEnd]) + } + + if $6 != nil { + st.Where = $6.(ast.ExprNode) + } + + if $7 != nil { + st.GroupBy = $7.(*ast.GroupByClause) + } + + if $8 != nil { + st.Having = $8.(*ast.HavingClause) + } + + if $9 != nil { + st.OrderBy = $9.(*ast.OrderByClause) + } + + if $10 != nil { + st.Limit = $10.(*ast.Limit) + } + + $$ = st + } + +FromDual: + "FROM" "DUAL" + + +TableRefsClause: + TableRefs + { + $$ = &ast.TableRefsClause{TableRefs: $1.(*ast.Join)} + } + +TableRefs: + EscapedTableRef + { + if j, ok := $1.(*ast.Join); ok { + // if $1 is Join, use it directly + $$ = j + } else { + $$ = &ast.Join{Left: $1.(ast.ResultSetNode), Right: nil} + } + } +| TableRefs ',' EscapedTableRef + { + /* from a, b is default cross join */ + $$ = &ast.Join{Left: $1.(ast.ResultSetNode), Right: $3.(ast.ResultSetNode), Tp: ast.CrossJoin} + } + +EscapedTableRef: + TableRef %prec lowerThanSetKeyword + { + $$ = $1 + } +| '{' Identifier TableRef '}' + { + /* + * ODBC escape syntax for outer join is { OJ join_table } + * Use an Identifier for OJ + */ + $$ = $3 + } + +TableRef: + TableFactor + { + $$ = $1 + } +| JoinTable + { + $$ = $1 + } + +TableFactor: + TableName TableAsNameOpt + { + $$ = &ast.TableSource{Source: $1.(*ast.TableName), AsName: $2.(model.CIStr)} + } +| '(' SelectStmt ')' TableAsName + { + st := $2.(*ast.SelectStmt) + l := yylex.(*lexer) + endOffset := l.endOffset(yyS[yypt-1].offset) + l.SetLastSelectFieldText(st, endOffset) + $$ = &ast.TableSource{Source: $2.(*ast.SelectStmt), AsName: $4.(model.CIStr)} + } +| '(' UnionStmt ')' TableAsName + { + $$ = &ast.TableSource{Source: $2.(*ast.UnionStmt), AsName: $4.(model.CIStr)} + } +| '(' TableRefs ')' + { + $$ = $2 + } + +TableAsNameOpt: + { + $$ = model.CIStr{} + } +| TableAsName + { + $$ = $1 + } + +TableAsName: + Identifier + { + $$ = model.NewCIStr($1.(string)) + } +| "AS" Identifier + { + $$ = model.NewCIStr($2.(string)) + } + +JoinTable: + /* Use %prec to evaluate production TableRef before cross join */ + TableRef CrossOpt TableRef %prec tableRefPriority + { + $$ = &ast.Join{Left: $1.(ast.ResultSetNode), Right: $3.(ast.ResultSetNode), Tp: ast.CrossJoin} + } +| TableRef CrossOpt TableRef "ON" Expression + { + on := &ast.OnCondition{Expr: $5.(ast.ExprNode)} + $$ = &ast.Join{Left: $1.(ast.ResultSetNode), Right: $3.(ast.ResultSetNode), Tp: ast.CrossJoin, On: on} + } +| TableRef JoinType OuterOpt "JOIN" TableRef "ON" Expression + { + on := &ast.OnCondition{Expr: $7.(ast.ExprNode)} + $$ = &ast.Join{Left: $1.(ast.ResultSetNode), Right: $5.(ast.ResultSetNode), Tp: $2.(ast.JoinType), On: on} + } + /* Support Using */ + +JoinType: + "LEFT" + { + $$ = ast.LeftJoin + } +| "RIGHT" + { + $$ = ast.RightJoin + } + +OuterOpt: + { + $$ = nil + } +| "OUTER" + + +CrossOpt: + "JOIN" +| "CROSS" "JOIN" +| "INNER" "JOIN" + + +LimitClause: + { + $$ = nil + } +| "LIMIT" LengthNum + { + $$ = &ast.Limit{Count: $2.(uint64)} + } + +SelectStmtLimit: + { + $$ = nil + } +| "LIMIT" LengthNum + { + $$ = &ast.Limit{Count: $2.(uint64)} + } +| "LIMIT" LengthNum ',' LengthNum + { + $$ = &ast.Limit{Offset: $2.(uint64), Count: $4.(uint64)} + } +| "LIMIT" LengthNum "OFFSET" LengthNum + { + $$ = &ast.Limit{Offset: $4.(uint64), Count: $2.(uint64)} + } + +SelectStmtDistinct: + /* EMPTY */ + { + $$ = false + } +| "ALL" + { + $$ = false + } +| "DISTINCT" + { + $$ = true + } + +SelectStmtOpts: + SelectStmtDistinct SelectStmtCalcFoundRows + { + // TODO: return calc_found_rows opt and support more other options + $$ = $1 + } + +SelectStmtCalcFoundRows: + %prec lowerThanCalcFoundRows + { + $$ = false + } +| "SQL_CALC_FOUND_ROWS" + { + $$ = true + } + +SelectStmtFieldList: + FieldList + { + $$ = &ast.FieldList{Fields: $1.([]*ast.SelectField)} + } + +SelectStmtGroup: + /* EMPTY */ + { + $$ = nil + } +| GroupByClause + +// See: https://dev.mysql.com/doc/refman/5.7/en/subqueries.html +SubSelect: + '(' SelectStmt ')' + { + s := $2.(*ast.SelectStmt) + l := yylex.(*lexer) + endOffset := l.endOffset(yyS[yypt].offset) + l.SetLastSelectFieldText(s, endOffset) + src := yylex.(*lexer).src + // See the implemention of yyParse function + s.SetText(src[yyS[yypt-1].offset-1:yyS[yypt].offset-1]) + $$ = &ast.SubqueryExpr{Query: s} + } +| '(' UnionStmt ')' + { + s := $2.(*ast.UnionStmt) + src := yylex.(*lexer).src + // See the implemention of yyParse function + s.SetText(src[yyS[yypt-1].offset-1:yyS[yypt].offset-1]) + $$ = &ast.SubqueryExpr{Query: s} + } + +// See: https://dev.mysql.com/doc/refman/5.7/en/innodb-locking-reads.html +SelectLockOpt: + /* empty */ + { + $$ = ast.SelectLockNone + } +| "FOR" "UPDATE" + { + $$ = ast.SelectLockForUpdate + } +| "LOCK" "IN" "SHARE" "MODE" + { + $$ = ast.SelectLockInShareMode + } + +// See: https://dev.mysql.com/doc/refman/5.7/en/union.html +UnionStmt: + UnionClauseList "UNION" UnionOpt SelectStmt + { + union := $1.(*ast.UnionStmt) + union.Distinct = union.Distinct || $3.(bool) + lastSelect := union.SelectList.Selects[len(union.SelectList.Selects)-1] + l := yylex.(*lexer) + endOffset := l.endOffset(yyS[yypt-2].offset) + l.SetLastSelectFieldText(lastSelect, endOffset) + union.SelectList.Selects = append(union.SelectList.Selects, $4.(*ast.SelectStmt)) + $$ = union + } +| UnionClauseList "UNION" UnionOpt '(' SelectStmt ')' OrderByOptional SelectStmtLimit + { + union := $1.(*ast.UnionStmt) + union.Distinct = union.Distinct || $3.(bool) + lastSelect := union.SelectList.Selects[len(union.SelectList.Selects)-1] + l := yylex.(*lexer) + endOffset := l.endOffset(yyS[yypt-6].offset) + l.SetLastSelectFieldText(lastSelect, endOffset) + st := $5.(*ast.SelectStmt) + endOffset = l.endOffset(yyS[yypt-2].offset) + l.SetLastSelectFieldText(st, endOffset) + union.SelectList.Selects = append(union.SelectList.Selects, st) + if $7 != nil { + union.OrderBy = $7.(*ast.OrderByClause) + } + if $8 != nil { + union.Limit = $8.(*ast.Limit) + } + $$ = union + } + +UnionClauseList: + UnionSelect + { + selectList := &ast.UnionSelectList{Selects: []*ast.SelectStmt{$1.(*ast.SelectStmt)}} + $$ = &ast.UnionStmt{ + SelectList: selectList, + } + } +| UnionClauseList "UNION" UnionOpt UnionSelect + { + union := $1.(*ast.UnionStmt) + union.Distinct = union.Distinct || $3.(bool) + lastSelect := union.SelectList.Selects[len(union.SelectList.Selects)-1] + l := yylex.(*lexer) + endOffset := l.endOffset(yyS[yypt-2].offset) + l.SetLastSelectFieldText(lastSelect, endOffset) + union.SelectList.Selects = append(union.SelectList.Selects, $4.(*ast.SelectStmt)) + $$ = union + } + +UnionSelect: + SelectStmt +| '(' SelectStmt ')' + { + st := $2.(*ast.SelectStmt) + l := yylex.(*lexer) + endOffset := l.endOffset(yyS[yypt].offset) + l.SetLastSelectFieldText(st, endOffset) + $$ = st + } + +UnionOpt: + { + $$ = true + } +| "ALL" + { + $$ = false + } +| "DISTINCT" + { + $$ = true + } + + +/********************Set Statement*******************************/ +SetStmt: + "SET" VariableAssignmentList + { + $$ = &ast.SetStmt{Variables: $2.([]*ast.VariableAssignment)} + } +| "SET" "NAMES" StringName + { + $$ = &ast.SetCharsetStmt{Charset: $3.(string)} + } +| "SET" "NAMES" StringName "COLLATE" StringName + { + $$ = &ast.SetCharsetStmt{ + Charset: $3.(string), + Collate: $5.(string), + } + } +| "SET" CharsetKw StringName + { + $$ = &ast.SetCharsetStmt{Charset: $3.(string)} + } +| "SET" "PASSWORD" eq PasswordOpt + { + $$ = &ast.SetPwdStmt{Password: $4.(string)} + } +| "SET" "PASSWORD" "FOR" Username eq PasswordOpt + { + $$ = &ast.SetPwdStmt{User: $4.(string), Password: $6.(string)} + } +| "SET" "GLOBAL" "TRANSACTION" TransactionChars + { + // Parsed but ignored + } +| "SET" "SESSION" "TRANSACTION" TransactionChars + { + // Parsed but ignored + } + +TransactionChars: + TransactionChar +| TransactionChars ',' TransactionChar + +TransactionChar: + "ISOLATION" "LEVEL" IsolationLevel +| "READ" "WRITE" +| "READ" "ONLY" + +IsolationLevel: + "REPEATABLE" "READ" +| "READ" "COMMITTED" +| "READ" "UNCOMMITTED" +| "SERIALIZABLE" + +VariableAssignment: + Identifier eq Expression + { + $$ = &ast.VariableAssignment{Name: $1.(string), Value: $3.(ast.ExprNode), IsSystem: true} + } +| "GLOBAL" Identifier eq Expression + { + $$ = &ast.VariableAssignment{Name: $2.(string), Value: $4.(ast.ExprNode), IsGlobal: true, IsSystem: true} + } +| "SESSION" Identifier eq Expression + { + $$ = &ast.VariableAssignment{Name: $2.(string), Value: $4.(ast.ExprNode), IsSystem: true} + } +| "LOCAL" Identifier eq Expression + { + $$ = &ast.VariableAssignment{Name: $2.(string), Value: $4.(ast.ExprNode), IsSystem: true} + } +| "SYS_VAR" eq Expression + { + v := strings.ToLower($1.(string)) + var isGlobal bool + if strings.HasPrefix(v, "@@global.") { + isGlobal = true + v = strings.TrimPrefix(v, "@@global.") + } else if strings.HasPrefix(v, "@@session.") { + v = strings.TrimPrefix(v, "@@session.") + } else if strings.HasPrefix(v, "@@local.") { + v = strings.TrimPrefix(v, "@@local.") + } else if strings.HasPrefix(v, "@@") { + v = strings.TrimPrefix(v, "@@") + } + $$ = &ast.VariableAssignment{Name: v, Value: $3.(ast.ExprNode), IsGlobal: isGlobal, IsSystem: true} + } +| "USER_VAR" eq Expression + { + v := $1.(string) + v = strings.TrimPrefix(v, "@") + $$ = &ast.VariableAssignment{Name: v, Value: $3.(ast.ExprNode)} + } + +VariableAssignmentList: + { + $$ = []*ast.VariableAssignment{} + } +| VariableAssignment + { + $$ = []*ast.VariableAssignment{$1.(*ast.VariableAssignment)} + } +| VariableAssignmentList ',' VariableAssignment + { + $$ = append($1.([]*ast.VariableAssignment), $3.(*ast.VariableAssignment)) + } + +Variable: + SystemVariable | UserVariable + +SystemVariable: + "SYS_VAR" + { + v := strings.ToLower($1.(string)) + var isGlobal bool + if strings.HasPrefix(v, "@@global.") { + isGlobal = true + v = strings.TrimPrefix(v, "@@global.") + } else if strings.HasPrefix(v, "@@session.") { + v = strings.TrimPrefix(v, "@@session.") + } else if strings.HasPrefix(v, "@@local.") { + v = strings.TrimPrefix(v, "@@local.") + } else if strings.HasPrefix(v, "@@") { + v = strings.TrimPrefix(v, "@@") + } + $$ = &ast.VariableExpr{Name: v, IsGlobal: isGlobal, IsSystem: true} + } + +UserVariable: + "USER_VAR" + { + v := $1.(string) + v = strings.TrimPrefix(v, "@") + $$ = &ast.VariableExpr{Name: v, IsGlobal: false, IsSystem: false} + } + +Username: + stringLit "AT" stringLit + { + $$ = $1.(string) + "@" + $3.(string) + } + +PasswordOpt: + stringLit + { + $$ = $1.(string) + } +| "PASSWORD" '(' AuthString ')' + { + $$ = $3.(string) + } + +AuthString: + stringLit + { + $$ = $1.(string) + } + +/****************************Admin Statement*******************************/ +AdminStmt: + "ADMIN" "SHOW" "DDL" + { + $$ = &ast.AdminStmt{Tp: ast.AdminShowDDL} + } +| "ADMIN" "CHECK" "TABLE" TableNameList + { + $$ = &ast.AdminStmt{ + Tp: ast.AdminCheckTable, + Tables: $4.([]*ast.TableName), + } + } + +/****************************Show Statement*******************************/ +ShowStmt: + "SHOW" ShowTargetFilterable ShowLikeOrWhereOpt + { + stmt := $2.(*ast.ShowStmt) + if $3 != nil { + if x, ok := $3.(*ast.PatternLikeExpr); ok { + stmt.Pattern = x + } else { + stmt.Where = $3.(ast.ExprNode) + } + } + $$ = stmt + } +| "SHOW" "CREATE" "TABLE" TableName + { + $$ = &ast.ShowStmt{ + Tp: ast.ShowCreateTable, + Table: $4.(*ast.TableName), + } + } +| "SHOW" "GRANTS" + { + // See: https://dev.mysql.com/doc/refman/5.7/en/show-grants.html + $$ = &ast.ShowStmt{Tp: ast.ShowGrants} + } +| "SHOW" "GRANTS" "FOR" Username + { + // See: https://dev.mysql.com/doc/refman/5.7/en/show-grants.html + $$ = &ast.ShowStmt{ + Tp: ast.ShowGrants, + User: $4.(string), + } + } +| "SHOW" "INDEX" "FROM" TableName + { + $$ = &ast.ShowStmt{ + Tp: ast.ShowIndex, + Table: $4.(*ast.TableName), + } + } + +ShowTargetFilterable: + "ENGINES" + { + $$ = &ast.ShowStmt{Tp: ast.ShowEngines} + } +| "DATABASES" + { + $$ = &ast.ShowStmt{Tp: ast.ShowDatabases} + } +| "SCHEMAS" + { + $$ = &ast.ShowStmt{Tp: ast.ShowDatabases} + } +| "CHARACTER" "SET" + { + $$ = &ast.ShowStmt{Tp: ast.ShowCharset} + } +| OptFull "TABLES" ShowDatabaseNameOpt + { + $$ = &ast.ShowStmt{ + Tp: ast.ShowTables, + DBName: $3.(string), + Full: $1.(bool), + } + } +| "TABLE" "STATUS" ShowDatabaseNameOpt + { + $$ = &ast.ShowStmt{ + Tp: ast.ShowTableStatus, + DBName: $3.(string), + } + } +| OptFull "COLUMNS" ShowTableAliasOpt ShowDatabaseNameOpt + { + $$ = &ast.ShowStmt{ + Tp: ast.ShowColumns, + Table: $3.(*ast.TableName), + DBName: $4.(string), + Full: $1.(bool), + } + } +| OptFull "FIELDS" ShowTableAliasOpt ShowDatabaseNameOpt + { + // SHOW FIELDS is a synonym for SHOW COLUMNS. + $$ = &ast.ShowStmt{ + Tp: ast.ShowColumns, + Table: $3.(*ast.TableName), + DBName: $4.(string), + Full: $1.(bool), + } + } +| "WARNINGS" + { + $$ = &ast.ShowStmt{Tp: ast.ShowWarnings} + } +| GlobalScope "VARIABLES" + { + $$ = &ast.ShowStmt{ + Tp: ast.ShowVariables, + GlobalScope: $1.(bool), + } + } +| GlobalScope "STATUS" + { + $$ = &ast.ShowStmt{ + Tp: ast.ShowStatus, + GlobalScope: $1.(bool), + } + } +| "COLLATION" + { + $$ = &ast.ShowStmt{ + Tp: ast.ShowCollation, + } + } +| "TRIGGERS" ShowDatabaseNameOpt + { + $$ = &ast.ShowStmt{ + Tp: ast.ShowTriggers, + DBName: $2.(string), + } + } +| "PROCEDURE" "STATUS" + { + $$ = &ast.ShowStmt { + Tp: ast.ShowProcedureStatus, + } + } + +ShowLikeOrWhereOpt: + { + $$ = nil + } +| "LIKE" PrimaryExpression + { + $$ = &ast.PatternLikeExpr{Pattern: $2.(ast.ExprNode)} + } +| "WHERE" Expression + { + $$ = $2.(ast.ExprNode) + } + +GlobalScope: + { + $$ = false + } +| "GLOBAL" + { + $$ = true + } +| "SESSION" + { + $$ = false + } + +OptFull: + { + $$ = false + } +| "FULL" + { + $$ = true + } + +ShowDatabaseNameOpt: + { + $$ = "" + } +| "FROM" DBName + { + $$ = $2.(string) + } +| "IN" DBName + { + $$ = $2.(string) + } + +ShowTableAliasOpt: + "FROM" TableName + { + $$ = $2.(*ast.TableName) + } +| "IN" TableName + { + $$ = $2.(*ast.TableName) + } + +Statement: + EmptyStmt +| AdminStmt +| AlterTableStmt +| BeginTransactionStmt +| CommitStmt +| DeallocateStmt +| DeleteFromStmt +| ExecuteStmt +| ExplainStmt +| CreateDatabaseStmt +| CreateIndexStmt +| CreateTableStmt +| CreateUserStmt +| DoStmt +| DropDatabaseStmt +| DropIndexStmt +| DropTableStmt +| GrantStmt +| InsertIntoStmt +| PreparedStmt +| RollbackStmt +| ReplaceIntoStmt +| SelectStmt +| UnionStmt +| SetStmt +| ShowStmt +| TruncateTableStmt +| UpdateStmt +| UseStmt +| SubSelect + { + // `(select 1)`; is a valid select statement + // TODO: This is used to fix issue #320. There may be a better solution. + $$ = $1.(*ast.SubqueryExpr).Query + } +| UnlockTablesStmt +| LockTablesStmt + +ExplainableStmt: + SelectStmt +| DeleteFromStmt +| UpdateStmt +| InsertIntoStmt +| ReplaceIntoStmt + +StatementList: + Statement + { + if $1 != nil { + s := $1.(ast.StmtNode) + s.SetText(yylex.(*lexer).stmtText()) + yylex.(*lexer).list = append(yylex.(*lexer).list, s) + } + } +| StatementList ';' Statement + { + if $3 != nil { + s := $3.(ast.StmtNode) + s.SetText(yylex.(*lexer).stmtText()) + yylex.(*lexer).list = append(yylex.(*lexer).list, s) + } + } + +Constraint: + ConstraintKeywordOpt ConstraintElem + { + cst := $2.(*ast.Constraint) + if $1 != nil { + cst.Name = $1.(string) + } + $$ = cst + } + +TableElement: + ColumnDef + { + $$ = $1.(*ast.ColumnDef) + } +| Constraint + { + $$ = $1.(*ast.Constraint) + } +| "CHECK" '(' Expression ')' + { + /* Nothing to do now */ + $$ = nil + } + +TableElementList: + TableElement + { + if $1 != nil { + $$ = []interface{}{$1.(interface{})} + } else { + $$ = []interface{}{} + } + } +| TableElementList ',' TableElement + { + if $3 != nil { + $$ = append($1.([]interface{}), $3) + } else { + $$ = $1 + } + } + +TableOption: + "ENGINE" Identifier + { + $$ = &ast.TableOption{Tp: ast.TableOptionEngine, StrValue: $2.(string)} + } +| "ENGINE" eq Identifier + { + $$ = &ast.TableOption{Tp: ast.TableOptionEngine, StrValue: $3.(string)} + } +| DefaultKwdOpt CharsetKw EqOpt StringName + { + $$ = &ast.TableOption{Tp: ast.TableOptionCharset, StrValue: $4.(string)} + } +| DefaultKwdOpt "COLLATE" EqOpt StringName + { + $$ = &ast.TableOption{Tp: ast.TableOptionCollate, StrValue: $4.(string)} + } +| "AUTO_INCREMENT" eq LengthNum + { + $$ = &ast.TableOption{Tp: ast.TableOptionAutoIncrement, UintValue: $3.(uint64)} + } +| "COMMENT" EqOpt stringLit + { + $$ = &ast.TableOption{Tp: ast.TableOptionComment, StrValue: $3.(string)} + } +| "AVG_ROW_LENGTH" EqOpt LengthNum + { + $$ = &ast.TableOption{Tp: ast.TableOptionAvgRowLength, UintValue: $3.(uint64)} + } +| "CONNECTION" EqOpt stringLit + { + $$ = &ast.TableOption{Tp: ast.TableOptionConnection, StrValue: $3.(string)} + } +| "CHECKSUM" EqOpt LengthNum + { + $$ = &ast.TableOption{Tp: ast.TableOptionCheckSum, UintValue: $3.(uint64)} + } +| "PASSWORD" EqOpt stringLit + { + $$ = &ast.TableOption{Tp: ast.TableOptionPassword, StrValue: $3.(string)} + } +| "COMPRESSION" EqOpt Identifier + { + $$ = &ast.TableOption{Tp: ast.TableOptionCompression, StrValue: $3.(string)} + } +| "KEY_BLOCK_SIZE" EqOpt LengthNum + { + $$ = &ast.TableOption{Tp: ast.TableOptionKeyBlockSize, UintValue: $3.(uint64)} + } +| "MAX_ROWS" EqOpt LengthNum + { + $$ = &ast.TableOption{Tp: ast.TableOptionMaxRows, UintValue: $3.(uint64)} + } +| "MIN_ROWS" EqOpt LengthNum + { + $$ = &ast.TableOption{Tp: ast.TableOptionMinRows, UintValue: $3.(uint64)} + } +| "DELAY_KEY_WRITE" EqOpt LengthNum + { + $$ = &ast.TableOption{Tp: ast.TableOptionDelayKeyWrite, UintValue: $3.(uint64)} + } +| RowFormat + { + $$ = &ast.TableOption{Tp: ast.TableOptionRowFormat, UintValue: $1.(uint64)} + } + + +TableOptionListOpt: + { + $$ = []*ast.TableOption{} + } +| TableOptionList %prec lowerThanComma + +TableOptionList: + TableOption + { + $$ = []*ast.TableOption{$1.(*ast.TableOption)} + } +| TableOptionList TableOption + { + $$ = append($1.([]*ast.TableOption), $2.(*ast.TableOption)) + } +| TableOptionList ',' TableOption + { + $$ = append($1.([]*ast.TableOption), $3.(*ast.TableOption)) + } + + +TruncateTableStmt: + "TRUNCATE" "TABLE" TableName + { + $$ = &ast.TruncateTableStmt{Table: $3.(*ast.TableName)} + } + +RowFormat: + "ROW_FORMAT" EqOpt "DEFAULT" + { + $$ = ast.RowFormatDefault + } +| "ROW_FORMAT" EqOpt "DYNAMIC" + { + $$ = ast.RowFormatDynamic + } +| "ROW_FORMAT" EqOpt "FIXED" + { + $$ = ast.RowFormatFixed + } +| "ROW_FORMAT" EqOpt "COMPRESSED" + { + $$ = ast.RowFormatCompressed + } +| "ROW_FORMAT" EqOpt "REDUNDANT" + { + $$ = ast.RowFormatRedundant + } +| "ROW_FORMAT" EqOpt "COMPACT" + { + $$ = ast.RowFormatCompact + } + +/*************************************Type Begin***************************************/ +Type: + NumericType + { + $$ = $1 + } +| StringType + { + $$ = $1 + } +| DateAndTimeType + { + $$ = $1 + } +| "float32" + { + x := types.NewFieldType($1.(byte)) + $$ = x + } +| "float64" + { + x := types.NewFieldType($1.(byte)) + $$ = x + } +| "int64" + { + x := types.NewFieldType($1.(byte)) + $$ = x + } +| "string" + { + x := types.NewFieldType($1.(byte)) + $$ = x + } +| "uint" + { + x := types.NewFieldType($1.(byte)) + $$ = x + } +| "uint64" + { + x := types.NewFieldType($1.(byte)) + $$ = x + } + +NumericType: + IntegerType OptFieldLen FieldOpts + { + // TODO: check flen 0 + x := types.NewFieldType($1.(byte)) + x.Flen = $2.(int) + for _, o := range $3.([]*ast.TypeOpt) { + if o.IsUnsigned { + x.Flag |= mysql.UnsignedFlag + } + if o.IsZerofill { + x.Flag |= mysql.ZerofillFlag + } + } + $$ = x + } +| FixedPointType FloatOpt FieldOpts + { + fopt := $2.(*ast.FloatOpt) + x := types.NewFieldType($1.(byte)) + x.Flen = fopt.Flen + x.Decimal = fopt.Decimal + for _, o := range $3.([]*ast.TypeOpt) { + if o.IsUnsigned { + x.Flag |= mysql.UnsignedFlag + } + if o.IsZerofill { + x.Flag |= mysql.ZerofillFlag + } + } + $$ = x + } +| FloatingPointType FloatOpt FieldOpts + { + fopt := $2.(*ast.FloatOpt) + x := types.NewFieldType($1.(byte)) + x.Flen = fopt.Flen + if x.Tp == mysql.TypeFloat { + // Fix issue #312 + if x.Flen > 53 { + yylex.(*lexer).errf("Float len(%d) should not be greater than 53", x.Flen) + return 1 + } + if x.Flen > 24 { + x.Tp = mysql.TypeDouble + } + } + x.Decimal =fopt.Decimal + for _, o := range $3.([]*ast.TypeOpt) { + if o.IsUnsigned { + x.Flag |= mysql.UnsignedFlag + } + if o.IsZerofill { + x.Flag |= mysql.ZerofillFlag + } + } + $$ = x + } +| BitValueType OptFieldLen + { + x := types.NewFieldType($1.(byte)) + x.Flen = $2.(int) + if x.Flen == -1 || x.Flen == 0 { + x.Flen = 1 + } else if x.Flen > 64 { + yylex.(*lexer).errf("invalid field length %d for bit type, must in [1, 64]", x.Flen) + } + $$ = x + } + +IntegerType: + "TINYINT" + { + $$ = mysql.TypeTiny + } +| "SMALLINT" + { + $$ = mysql.TypeShort + } +| "MEDIUMINT" + { + $$ = mysql.TypeInt24 + } +| "INT" + { + $$ = mysql.TypeLong + } +| "INTEGER" + { + $$ = mysql.TypeLong + } +| "BIGINT" + { + $$ = mysql.TypeLonglong + } +| "BOOL" + { + $$ = mysql.TypeTiny + } +| "BOOLEAN" + { + $$ = mysql.TypeTiny + } + +OptInteger: + {} | "INTEGER" + +FixedPointType: + "DECIMAL" + { + $$ = mysql.TypeNewDecimal + } +| "NUMERIC" + { + $$ = mysql.TypeNewDecimal + } + +FloatingPointType: + "float" + { + $$ = mysql.TypeFloat + } +| "REAL" + { + $$ = mysql.TypeDouble + } +| "DOUBLE" + { + $$ = mysql.TypeDouble + } +| "DOUBLE" "PRECISION" + { + $$ = mysql.TypeDouble + } + +BitValueType: + "BIT" + { + $$ = mysql.TypeBit + } + +StringType: + NationalOpt "CHAR" FieldLen OptBinary OptCharset OptCollate + { + x := types.NewFieldType(mysql.TypeString) + x.Flen = $3.(int) + if $4.(bool) { + x.Flag |= mysql.BinaryFlag + } + $$ = x + } +| NationalOpt "CHAR" OptBinary OptCharset OptCollate + { + x := types.NewFieldType(mysql.TypeString) + if $3.(bool) { + x.Flag |= mysql.BinaryFlag + } + $$ = x + } +| NationalOpt "VARCHAR" FieldLen OptBinary OptCharset OptCollate + { + x := types.NewFieldType(mysql.TypeVarchar) + x.Flen = $3.(int) + if $4.(bool) { + x.Flag |= mysql.BinaryFlag + } + x.Charset = $5.(string) + x.Collate = $6.(string) + $$ = x + } +| "BINARY" OptFieldLen + { + x := types.NewFieldType(mysql.TypeString) + x.Flen = $2.(int) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + $$ = x + } +| "VARBINARY" FieldLen + { + x := types.NewFieldType(mysql.TypeVarchar) + x.Flen = $2.(int) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + $$ = x + } +| BlobType + { + $$ = $1.(*types.FieldType) + } +| TextType OptBinary OptCharset OptCollate + { + x := $1.(*types.FieldType) + if $2.(bool) { + x.Flag |= mysql.BinaryFlag + } + x.Charset = $3.(string) + x.Collate = $4.(string) + $$ = x + } +| "ENUM" '(' StringList ')' OptCharset OptCollate + { + x := types.NewFieldType(mysql.TypeEnum) + x.Elems = $3.([]string) + x.Charset = $5.(string) + x.Collate = $6.(string) + $$ = x + } +| "SET" '(' StringList ')' OptCharset OptCollate + { + x := types.NewFieldType(mysql.TypeSet) + x.Elems = $3.([]string) + x.Charset = $5.(string) + x.Collate = $6.(string) + $$ = x + } + +NationalOpt: + { + + } +| "NATIONAL" + { + + } + +BlobType: + "TINYBLOB" + { + x := types.NewFieldType(mysql.TypeTinyBlob) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + $$ = x + } +| "BLOB" OptFieldLen + { + x := types.NewFieldType(mysql.TypeBlob) + x.Flen = $2.(int) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + $$ = x + } +| "MEDIUMBLOB" + { + x := types.NewFieldType(mysql.TypeMediumBlob) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + $$ = x + } +| "LONGBLOB" + { + x := types.NewFieldType(mysql.TypeLongBlob) + x.Charset = charset.CharsetBin + x.Collate = charset.CharsetBin + $$ = x + } + +TextType: + "TINYTEXT" + { + x := types.NewFieldType(mysql.TypeTinyBlob) + $$ = x + + } +| "TEXT" OptFieldLen + { + x := types.NewFieldType(mysql.TypeBlob) + x.Flen = $2.(int) + $$ = x + } +| "MEDIUMTEXT" + { + x := types.NewFieldType(mysql.TypeMediumBlob) + $$ = x + } +| "LONGTEXT" + { + x := types.NewFieldType(mysql.TypeLongBlob) + $$ = x + } + + +DateAndTimeType: + "DATE" + { + x := types.NewFieldType(mysql.TypeDate) + $$ = x + } +| "DATETIME" OptFieldLen + { + x := types.NewFieldType(mysql.TypeDatetime) + x.Decimal = $2.(int) + $$ = x + } +| "TIMESTAMP" OptFieldLen + { + x := types.NewFieldType(mysql.TypeTimestamp) + x.Decimal = $2.(int) + $$ = x + } +| "TIME" OptFieldLen + { + x := types.NewFieldType(mysql.TypeDuration) + x.Decimal = $2.(int) + $$ = x + } +| "YEAR" OptFieldLen + { + x := types.NewFieldType(mysql.TypeYear) + x.Flen = $2.(int) + $$ = x + } + +FieldLen: + '(' LengthNum ')' + { + $$ = int($2.(uint64)) + } + +OptFieldLen: + { + /* -1 means unspecified field length*/ + $$ = types.UnspecifiedLength + } +| FieldLen + { + $$ = $1.(int) + } + +FieldOpt: + "UNSIGNED" + { + $$ = &ast.TypeOpt{IsUnsigned: true} + } +| "ZEROFILL" + { + $$ = &ast.TypeOpt{IsZerofill: true, IsUnsigned: true} + } + +FieldOpts: + { + $$ = []*ast.TypeOpt{} + } +| FieldOpts FieldOpt + { + $$ = append($1.([]*ast.TypeOpt), $2.(*ast.TypeOpt)) + } + +FloatOpt: + { + $$ = &ast.FloatOpt{Flen: types.UnspecifiedLength, Decimal: types.UnspecifiedLength} + } +| FieldLen + { + $$ = &ast.FloatOpt{Flen: $1.(int), Decimal: types.UnspecifiedLength} + } +| Precision + { + $$ = $1.(*ast.FloatOpt) + } + +Precision: + '(' LengthNum ',' LengthNum ')' + { + $$ = &ast.FloatOpt{Flen: int($2.(uint64)), Decimal: int($4.(uint64))} + } + +OptBinary: + { + $$ = false + } +| "BINARY" + { + $$ = true + } + +OptCharset: + { + $$ = "" + } +| CharsetKw StringName + { + $$ = $2.(string) + } + +CharsetKw: + "CHARACTER" "SET" +| "CHARSET" + +OptCollate: + { + $$ = "" + } +| "COLLATE" StringName + { + $$ = $2.(string) + } + +StringList: + stringLit + { + $$ = []string{$1.(string)} + } +| StringList ',' stringLit + { + $$ = append($1.([]string), $3.(string)) + } + +StringName: + stringLit + { + $$ = $1.(string) + } +| Identifier + { + $$ = $1.(string) + } + +/*********************************************************************************** + * Update Statement + * See: https://dev.mysql.com/doc/refman/5.7/en/update.html + ***********************************************************************************/ +UpdateStmt: + "UPDATE" LowPriorityOptional IgnoreOptional TableRef "SET" AssignmentList WhereClauseOptional OrderByOptional LimitClause + { + var refs *ast.Join + if x, ok := $4.(*ast.Join); ok { + refs = x + } else { + refs = &ast.Join{Left: $4.(ast.ResultSetNode)} + } + st := &ast.UpdateStmt{ + LowPriority: $2.(bool), + TableRefs: &ast.TableRefsClause{TableRefs: refs}, + List: $6.([]*ast.Assignment), + } + if $7 != nil { + st.Where = $7.(ast.ExprNode) + } + if $8 != nil { + st.Order = $8.(*ast.OrderByClause) + } + if $9 != nil { + st.Limit = $9.(*ast.Limit) + } + $$ = st + if yylex.(*lexer).root { + break + } + } +| "UPDATE" LowPriorityOptional IgnoreOptional TableRefs "SET" AssignmentList WhereClauseOptional + { + st := &ast.UpdateStmt{ + LowPriority: $2.(bool), + TableRefs: &ast.TableRefsClause{TableRefs: $4.(*ast.Join)}, + List: $6.([]*ast.Assignment), + } + if $7 != nil { + st.Where = $7.(ast.ExprNode) + } + $$ = st + if yylex.(*lexer).root { + break + } + } + +UseStmt: + "USE" DBName + { + $$ = &ast.UseStmt{DBName: $2.(string)} + if yylex.(*lexer).root { + break + } + } + +WhereClause: + "WHERE" Expression + { + $$ = $2.(ast.ExprNode) + } + +WhereClauseOptional: + { + $$ = nil + } +| WhereClause + { + $$ = $1 + } + +CommaOpt: + { + } +| ',' + { + } + +/************************************************************************************ + * Account Management Statements + * https://dev.mysql.com/doc/refman/5.7/en/account-management-sql.html + ************************************************************************************/ +CreateUserStmt: + "CREATE" "USER" IfNotExists UserSpecList + { + // See: https://dev.mysql.com/doc/refman/5.7/en/create-user.html + $$ = &ast.CreateUserStmt{ + IfNotExists: $3.(bool), + Specs: $4.([]*ast.UserSpec), + } + } + +UserSpec: + Username AuthOption + { + userSpec := &ast.UserSpec{ + User: $1.(string), + } + if $2 != nil { + userSpec.AuthOpt = $2.(*ast.AuthOption) + } + $$ = userSpec + } + +UserSpecList: + UserSpec + { + $$ = []*ast.UserSpec{$1.(*ast.UserSpec)} + } +| UserSpecList ',' UserSpec + { + $$ = append($1.([]*ast.UserSpec), $3.(*ast.UserSpec)) + } + +AuthOption: + { + $$ = nil + } +| "IDENTIFIED" "BY" AuthString + { + $$ = &ast.AuthOption { + AuthString: $3.(string), + ByAuthString: true, + } + } +| "IDENTIFIED" "BY" "PASSWORD" HashString + { + $$ = &ast.AuthOption{ + HashString: $4.(string), + } + } + +HashString: + stringLit + +/************************************************************************************* + * Grant statement + * See: https://dev.mysql.com/doc/refman/5.7/en/grant.html + *************************************************************************************/ +GrantStmt: + "GRANT" PrivElemList "ON" ObjectType PrivLevel "TO" UserSpecList + { + $$ = &ast.GrantStmt{ + Privs: $2.([]*ast.PrivElem), + ObjectType: $4.(ast.ObjectTypeType), + Level: $5.(*ast.GrantLevel), + Users: $7.([]*ast.UserSpec), + } + } + +PrivElem: + PrivType + { + $$ = &ast.PrivElem{ + Priv: $1.(mysql.PrivilegeType), + } + } +| PrivType '(' ColumnNameList ')' + { + $$ = &ast.PrivElem{ + Priv: $1.(mysql.PrivilegeType), + Cols: $3.([]*ast.ColumnName), + } + } + +PrivElemList: + PrivElem + { + $$ = []*ast.PrivElem{$1.(*ast.PrivElem)} + } +| PrivElemList ',' PrivElem + { + $$ = append($1.([]*ast.PrivElem), $3.(*ast.PrivElem)) + } + +PrivType: + "ALL" + { + $$ = mysql.AllPriv + } +| "ALTER" + { + $$ = mysql.AlterPriv + } +| "CREATE" + { + $$ = mysql.CreatePriv + } +| "CREATE" "USER" + { + $$ = mysql.CreateUserPriv + } +| "DELETE" + { + $$ = mysql.DeletePriv + } +| "DROP" + { + $$ = mysql.DropPriv + } +| "EXECUTE" + { + $$ = mysql.ExecutePriv + } +| "INDEX" + { + $$ = mysql.IndexPriv + } +| "INSERT" + { + $$ = mysql.InsertPriv + } +| "SELECT" + { + $$ = mysql.SelectPriv + } +| "SHOW" "DATABASES" + { + $$ = mysql.ShowDBPriv + } +| "UPDATE" + { + $$ = mysql.UpdatePriv + } +| "GRANT" "OPTION" + { + $$ = mysql.GrantPriv + } + +ObjectType: + { + $$ = ast.ObjectTypeNone + } +| "TABLE" + { + $$ = ast.ObjectTypeTable + } + +PrivLevel: + '*' + { + $$ = &ast.GrantLevel { + Level: ast.GrantLevelDB, + } + } +| '*' '.' '*' + { + $$ = &ast.GrantLevel { + Level: ast.GrantLevelGlobal, + } + } +| Identifier '.' '*' + { + $$ = &ast.GrantLevel { + Level: ast.GrantLevelDB, + DBName: $1.(string), + } + } +| Identifier '.' Identifier + { + $$ = &ast.GrantLevel { + Level: ast.GrantLevelTable, + DBName: $1.(string), + TableName: $3.(string), + } + } +| Identifier + { + $$ = &ast.GrantLevel { + Level: ast.GrantLevelTable, + TableName: $1.(string), + } + } + +/********************************************************************* + * Lock/Unlock Tables + * See: http://dev.mysql.com/doc/refman/5.7/en/lock-tables.html + * All the statement leaves empty. This is used to prevent mysqldump error. + *********************************************************************/ + +UnlockTablesStmt: + "UNLOCK" "TABLES" + +LockTablesStmt: + "LOCK" "TABLES" TableLockList + +TableLock: + TableName LockType + +LockType: + "READ" +| "READ" "LOCAL" +| "WRITE" + +TableLockList: + TableLock +| TableLockList ',' TableLock + +%% diff --git a/vendor/github.com/pingcap/tidb/parser/scanner.go b/vendor/github.com/pingcap/tidb/parser/scanner.go new file mode 100644 index 000000000..5f952c29b --- /dev/null +++ b/vendor/github.com/pingcap/tidb/parser/scanner.go @@ -0,0 +1,15707 @@ +// Code generated by goyacc +// CAUTION: Generated file - DO NOT EDIT. + +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +import ( + "fmt" + "math" + "strconv" + "strings" + "unicode" + + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/util/charset" + "github.com/pingcap/tidb/util/stringutil" +) + +type lexer struct { + c int + col int + errs []error + expr ast.ExprNode + i int + inj int + lcol int + line int + list []ast.StmtNode + ncol int + nline int + sc int + src string + val []byte + ungetBuf []byte + root bool + prepare bool + stmtStartPos int + stringLit []byte + + // record token's offset of the input + tokenEndOffset int + tokenStartOffset int + + // Charset information + charset string + collation string +} + +// NewLexer builds a new lexer. +func NewLexer(src string) (l *lexer) { + l = &lexer{ + src: src, + nline: 1, + ncol: 0, + } + l.next() + return +} + +func (l *lexer) Errors() []error { + return l.errs +} + +func (l *lexer) Stmts() []ast.StmtNode { + return l.list +} + +func (l *lexer) Expr() ast.ExprNode { + return l.expr +} + +func (l *lexer) Inj() int { + return l.inj +} + +func (l *lexer) SetInj(inj int) { + l.inj = inj +} + +func (l *lexer) SetPrepare() { + l.prepare = true +} + +func (l *lexer) IsPrepare() bool { + return l.prepare +} + +func (l *lexer) Root() bool { + return l.root +} + +func (l *lexer) SetRoot(root bool) { + l.root = root +} + +func (l *lexer) SetCharsetInfo(charset, collation string) { + l.charset = charset + l.collation = collation +} + +func (l *lexer) GetCharsetInfo() (string, string) { + return l.charset, l.collation +} + +// The select statement is not at the end of the whole statement, if the last +// field text was set from its offset to the end of the src string, update +// the last field text. +func (l *lexer) SetLastSelectFieldText(st *ast.SelectStmt, lastEnd int) { + lastField := st.Fields.Fields[len(st.Fields.Fields)-1] + if lastField.Offset+len(lastField.Text()) >= len(l.src)-1 { + lastField.SetText(l.src[lastField.Offset:lastEnd]) + } +} + +func (l *lexer) startOffset(offset int) int { + offset-- + for unicode.IsSpace(rune(l.src[offset])) { + offset++ + } + return offset +} + +func (l *lexer) endOffset(offset int) int { + offset-- + for offset > 0 && unicode.IsSpace(rune(l.src[offset-1])) { + offset-- + } + return offset +} + +func (l *lexer) unget(b byte) { + l.ungetBuf = append(l.ungetBuf, b) + l.i-- + l.ncol-- + l.tokenEndOffset-- +} + +func (l *lexer) next() int { + if un := len(l.ungetBuf); un > 0 { + nc := l.ungetBuf[0] + l.ungetBuf = l.ungetBuf[1:] + l.c = int(nc) + return l.c + } + + if l.c != 0 { + l.val = append(l.val, byte(l.c)) + } + l.c = 0 + if l.i < len(l.src) { + l.c = int(l.src[l.i]) + l.i++ + } + switch l.c { + case '\n': + l.lcol = l.ncol + l.nline++ + l.ncol = 0 + default: + l.ncol++ + } + l.tokenEndOffset++ + return l.c +} + +func (l *lexer) err0(ln, c int, arg interface{}) { + var argStr string + if arg != nil { + argStr = fmt.Sprintf(" %v", arg) + } + + err := fmt.Errorf("line %d column %d near \"%s\"%s", ln, c, l.val, argStr) + l.errs = append(l.errs, err) +} + +func (l *lexer) err(arg interface{}) { + l.err0(l.line, l.col, arg) +} + +func (l *lexer) errf(format string, args ...interface{}) { + s := fmt.Sprintf(format, args...) + l.err0(l.line, l.col, s) +} + +func (l *lexer) Error(s string) { + // Notice: ignore origin error info. + l.err(nil) +} + +func (l *lexer) stmtText() string { + endPos := l.i + if l.src[l.i-1] == '\n' { + endPos = l.i - 1 // trim new line + } + if l.src[l.stmtStartPos] == '\n' { + l.stmtStartPos++ + } + + text := l.src[l.stmtStartPos:endPos] + + l.stmtStartPos = l.i + return text +} + +func (l *lexer) Lex(lval *yySymType) (r int) { + defer func() { + lval.line, lval.col, lval.offset = l.line, l.col, l.tokenStartOffset + l.tokenStartOffset = l.tokenEndOffset + }() + const ( + INITIAL = iota + S1 + S2 + S3 + S4 + ) + + if n := l.inj; n != 0 { + l.inj = 0 + return n + } + + c0, c := 0, l.c + +yystate0: + + l.val = l.val[:0] + c0, l.line, l.col = l.c, l.nline, l.ncol + + switch yyt := l.sc; yyt { + default: + panic(fmt.Errorf(`invalid start condition %d`, yyt)) + case 0: // start condition: INITIAL + goto yystart1 + case 1: // start condition: S1 + goto yystart1254 + case 2: // start condition: S2 + goto yystart1260 + case 3: // start condition: S3 + goto yystart1266 + case 4: // start condition: S4 + goto yystart1269 + } + + goto yystate0 // silence unused label error + goto yystate1 // silence unused label error +yystate1: + c = l.next() +yystart1: + switch { + default: + goto yystate3 // c >= '\x01' && c <= '\b' || c == '\v' || c == '\f' || c >= '\x0e' && c <= '\x1f' || c == '$' || c == '%%' || c >= '(' && c <= ',' || c == ':' || c == ';' || c >= '[' && c <= '^' || c == '{' || c >= '}' && c <= 'ÿ' + case c == '!': + goto yystate6 + case c == '"': + goto yystate8 + case c == '#': + goto yystate9 + case c == '&': + goto yystate11 + case c == '-': + goto yystate15 + case c == '.': + goto yystate17 + case c == '/': + goto yystate22 + case c == '0': + goto yystate27 + case c == '<': + goto yystate36 + case c == '=': + goto yystate41 + case c == '>': + goto yystate42 + case c == '?': + goto yystate45 + case c == '@': + goto yystate46 + case c == 'A' || c == 'a': + goto yystate65 + case c == 'B' || c == 'b': + goto yystate118 + case c == 'C' || c == 'c': + goto yystate159 + case c == 'D' || c == 'd': + goto yystate294 + case c == 'E' || c == 'e': + goto yystate438 + case c == 'F' || c == 'f': + goto yystate476 + case c == 'G' || c == 'g': + goto yystate520 + case c == 'H' || c == 'h': + goto yystate541 + case c == 'I' || c == 'i': + goto yystate586 + case c == 'J' || c == 'j': + goto yystate635 + case c == 'K' || c == 'k': + goto yystate639 + case c == 'L' || c == 'l': + goto yystate653 + case c == 'M' || c == 'm': + goto yystate713 + case c == 'N' || c == 'n': + goto yystate780 + case c == 'O' || c == 'o': + goto yystate804 + case c == 'P' || c == 'p': + goto yystate826 + case c == 'Q' || c == 'q': + goto yystate862 + case c == 'R': + goto yystate872 + case c == 'S' || c == 's': + goto yystate927 + case c == 'T' || c == 't': + goto yystate1046 + case c == 'U' || c == 'u': + goto yystate1109 + case c == 'V' || c == 'v': + goto yystate1155 + case c == 'W' || c == 'w': + goto yystate1184 + case c == 'X' || c == 'x': + goto yystate1213 + case c == 'Y' || c == 'y': + goto yystate1219 + case c == 'Z' || c == 'z': + goto yystate1233 + case c == '\'': + goto yystate14 + case c == '\n': + goto yystate5 + case c == '\t' || c == '\r' || c == ' ': + goto yystate4 + case c == '\x00': + goto yystate2 + case c == '_': + goto yystate1241 + case c == '`': + goto yystate1242 + case c == 'r': + goto yystate1243 + case c == '|': + goto yystate1252 + case c >= '1' && c <= '9': + goto yystate34 + } + +yystate2: + c = l.next() + goto yyrule1 + +yystate3: + c = l.next() + goto yyrule319 + +yystate4: + c = l.next() + switch { + default: + goto yyrule2 + case c == '\t' || c == '\n' || c == '\r' || c == ' ': + goto yystate5 + } + +yystate5: + c = l.next() + switch { + default: + goto yyrule2 + case c == '\t' || c == '\n' || c == '\r' || c == ' ': + goto yystate5 + } + +yystate6: + c = l.next() + switch { + default: + goto yyrule319 + case c == '=': + goto yystate7 + } + +yystate7: + c = l.next() + goto yyrule33 + +yystate8: + c = l.next() + goto yyrule13 + +yystate9: + c = l.next() + switch { + default: + goto yyrule3 + case c >= '\x01' && c <= '\t' || c >= '\v' && c <= 'ÿ': + goto yystate10 + } + +yystate10: + c = l.next() + switch { + default: + goto yyrule3 + case c >= '\x01' && c <= '\t' || c >= '\v' && c <= 'ÿ': + goto yystate10 + } + +yystate11: + c = l.next() + switch { + default: + goto yyrule319 + case c == '&': + goto yystate12 + case c == '^': + goto yystate13 + } + +yystate12: + c = l.next() + goto yyrule27 + +yystate13: + c = l.next() + goto yyrule28 + +yystate14: + c = l.next() + goto yyrule14 + +yystate15: + c = l.next() + switch { + default: + goto yyrule319 + case c == '-': + goto yystate16 + } + +yystate16: + c = l.next() + goto yyrule6 + +yystate17: + c = l.next() + switch { + default: + goto yyrule319 + case c >= '0' && c <= '9': + goto yystate18 + } + +yystate18: + c = l.next() + switch { + default: + goto yyrule10 + case c == 'E' || c == 'e': + goto yystate19 + case c >= '0' && c <= '9': + goto yystate18 + } + +yystate19: + c = l.next() + switch { + default: + goto yyabort + case c == '+' || c == '-': + goto yystate20 + case c >= '0' && c <= '9': + goto yystate21 + } + +yystate20: + c = l.next() + switch { + default: + goto yyabort + case c >= '0' && c <= '9': + goto yystate21 + } + +yystate21: + c = l.next() + switch { + default: + goto yyrule10 + case c >= '0' && c <= '9': + goto yystate21 + } + +yystate22: + c = l.next() + switch { + default: + goto yyrule319 + case c == '*': + goto yystate23 + case c == '/': + goto yystate26 + } + +yystate23: + c = l.next() + switch { + default: + goto yyabort + case c == '*': + goto yystate24 + case c >= '\x01' && c <= ')' || c >= '+' && c <= 'ÿ': + goto yystate23 + } + +yystate24: + c = l.next() + switch { + default: + goto yyabort + case c == '*': + goto yystate24 + case c == '/': + goto yystate25 + case c >= '\x01' && c <= ')' || c >= '+' && c <= '.' || c >= '0' && c <= 'ÿ': + goto yystate23 + } + +yystate25: + c = l.next() + goto yyrule5 + +yystate26: + c = l.next() + switch { + default: + goto yyrule4 + case c >= '\x01' && c <= '\t' || c >= '\v' && c <= 'ÿ': + goto yystate26 + } + +yystate27: + c = l.next() + switch { + default: + goto yyrule9 + case c == '.': + goto yystate18 + case c == '8' || c == '9': + goto yystate29 + case c == 'B' || c == 'b': + goto yystate30 + case c == 'E' || c == 'e': + goto yystate19 + case c == 'X' || c == 'x': + goto yystate32 + case c >= '0' && c <= '7': + goto yystate28 + } + +yystate28: + c = l.next() + switch { + default: + goto yyrule9 + case c == '.': + goto yystate18 + case c == '8' || c == '9': + goto yystate29 + case c == 'E' || c == 'e': + goto yystate19 + case c >= '0' && c <= '7': + goto yystate28 + } + +yystate29: + c = l.next() + switch { + default: + goto yyabort + case c == '.': + goto yystate18 + case c == 'E' || c == 'e': + goto yystate19 + case c >= '0' && c <= '9': + goto yystate29 + } + +yystate30: + c = l.next() + switch { + default: + goto yyabort + case c == '0' || c == '1': + goto yystate31 + } + +yystate31: + c = l.next() + switch { + default: + goto yyrule12 + case c == '0' || c == '1': + goto yystate31 + } + +yystate32: + c = l.next() + switch { + default: + goto yyabort + case c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'a' && c <= 'f': + goto yystate33 + } + +yystate33: + c = l.next() + switch { + default: + goto yyrule11 + case c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'a' && c <= 'f': + goto yystate33 + } + +yystate34: + c = l.next() + switch { + default: + goto yyrule9 + case c == '.': + goto yystate18 + case c == 'E' || c == 'e': + goto yystate19 + case c >= '0' && c <= '9': + goto yystate35 + } + +yystate35: + c = l.next() + switch { + default: + goto yyrule9 + case c == '.': + goto yystate18 + case c == 'E' || c == 'e': + goto yystate19 + case c >= '0' && c <= '9': + goto yystate35 + } + +yystate36: + c = l.next() + switch { + default: + goto yyrule319 + case c == '<': + goto yystate37 + case c == '=': + goto yystate38 + case c == '>': + goto yystate40 + } + +yystate37: + c = l.next() + goto yyrule29 + +yystate38: + c = l.next() + switch { + default: + goto yyrule30 + case c == '>': + goto yystate39 + } + +yystate39: + c = l.next() + goto yyrule37 + +yystate40: + c = l.next() + goto yyrule34 + +yystate41: + c = l.next() + goto yyrule31 + +yystate42: + c = l.next() + switch { + default: + goto yyrule319 + case c == '=': + goto yystate43 + case c == '>': + goto yystate44 + } + +yystate43: + c = l.next() + goto yyrule32 + +yystate44: + c = l.next() + goto yyrule36 + +yystate45: + c = l.next() + goto yyrule39 + +yystate46: + c = l.next() + switch { + default: + goto yyrule38 + case c == '@': + goto yystate47 + case c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate64 + } + +yystate47: + c = l.next() + switch { + default: + goto yyabort + case c == 'G' || c == 'g': + goto yystate49 + case c == 'L' || c == 'l': + goto yystate56 + case c == 'S' || c == 's': + goto yystate58 + case c >= 'A' && c <= 'F' || c >= 'H' && c <= 'K' || c >= 'M' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'k' || c >= 'm' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate48 + } + +yystate48: + c = l.next() + switch { + default: + goto yyrule224 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate48 + } + +yystate49: + c = l.next() + switch { + default: + goto yyrule224 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate48 + case c == 'L' || c == 'l': + goto yystate50 + } + +yystate50: + c = l.next() + switch { + default: + goto yyrule224 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate48 + case c == 'O' || c == 'o': + goto yystate51 + } + +yystate51: + c = l.next() + switch { + default: + goto yyrule224 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate48 + case c == 'B' || c == 'b': + goto yystate52 + } + +yystate52: + c = l.next() + switch { + default: + goto yyrule224 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate48 + case c == 'A' || c == 'a': + goto yystate53 + } + +yystate53: + c = l.next() + switch { + default: + goto yyrule224 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate48 + case c == 'L' || c == 'l': + goto yystate54 + } + +yystate54: + c = l.next() + switch { + default: + goto yyrule224 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate48 + case c == '.': + goto yystate55 + } + +yystate55: + c = l.next() + switch { + default: + goto yyabort + case c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate48 + } + +yystate56: + c = l.next() + switch { + default: + goto yyrule224 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate48 + case c == 'O' || c == 'o': + goto yystate57 + } + +yystate57: + c = l.next() + switch { + default: + goto yyrule224 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate48 + case c == 'C' || c == 'c': + goto yystate52 + } + +yystate58: + c = l.next() + switch { + default: + goto yyrule224 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate48 + case c == 'E' || c == 'e': + goto yystate59 + } + +yystate59: + c = l.next() + switch { + default: + goto yyrule224 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate48 + case c == 'S' || c == 's': + goto yystate60 + } + +yystate60: + c = l.next() + switch { + default: + goto yyrule224 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate48 + case c == 'S' || c == 's': + goto yystate61 + } + +yystate61: + c = l.next() + switch { + default: + goto yyrule224 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate48 + case c == 'I' || c == 'i': + goto yystate62 + } + +yystate62: + c = l.next() + switch { + default: + goto yyrule224 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate48 + case c == 'O' || c == 'o': + goto yystate63 + } + +yystate63: + c = l.next() + switch { + default: + goto yyrule224 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate48 + case c == 'N' || c == 'n': + goto yystate54 + } + +yystate64: + c = l.next() + switch { + default: + goto yyrule225 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate64 + } + +yystate65: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'C' || c == 'E' || c >= 'G' && c <= 'K' || c == 'M' || c >= 'O' && c <= 'R' || c == 'T' || c >= 'W' && c <= 'Z' || c == '_' || c == 'a' || c == 'c' || c == 'e' || c >= 'g' && c <= 'k' || c == 'm' || c >= 'o' && c <= 'r' || c == 't' || c >= 'w' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate67 + case c == 'D' || c == 'd': + goto yystate69 + case c == 'F' || c == 'f': + goto yystate78 + case c == 'L' || c == 'l': + goto yystate82 + case c == 'N' || c == 'n': + goto yystate87 + case c == 'S' || c == 's': + goto yystate90 + case c == 'U' || c == 'u': + goto yystate92 + case c == 'V' || c == 'v': + goto yystate105 + } + +yystate66: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate67: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate68 + } + +yystate68: + c = l.next() + switch { + default: + goto yyrule40 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate69: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate70 + case c == 'M' || c == 'm': + goto yystate75 + } + +yystate70: + c = l.next() + switch { + default: + goto yyrule41 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate71 + } + +yystate71: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate72 + } + +yystate72: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate73 + } + +yystate73: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate74 + } + +yystate74: + c = l.next() + switch { + default: + goto yyrule42 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate75: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate76 + } + +yystate76: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate77 + } + +yystate77: + c = l.next() + switch { + default: + goto yyrule43 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate78: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate79 + } + +yystate79: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate80 + } + +yystate80: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate81 + } + +yystate81: + c = l.next() + switch { + default: + goto yyrule44 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate82: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate83 + case c == 'T' || c == 't': + goto yystate84 + } + +yystate83: + c = l.next() + switch { + default: + goto yyrule45 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate84: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate85 + } + +yystate85: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate86 + } + +yystate86: + c = l.next() + switch { + default: + goto yyrule46 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate87: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate88 + case c == 'Y' || c == 'y': + goto yystate89 + } + +yystate88: + c = l.next() + switch { + default: + goto yyrule47 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate89: + c = l.next() + switch { + default: + goto yyrule48 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate90: + c = l.next() + switch { + default: + goto yyrule50 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate91 + } + +yystate91: + c = l.next() + switch { + default: + goto yyrule49 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate92: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate93 + } + +yystate93: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate94 + } + +yystate94: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate95 + } + +yystate95: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate96 + } + +yystate96: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate97 + } + +yystate97: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate98 + } + +yystate98: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate99 + } + +yystate99: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate100 + } + +yystate100: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate101 + } + +yystate101: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate102 + } + +yystate102: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate103 + } + +yystate103: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate104 + } + +yystate104: + c = l.next() + switch { + default: + goto yyrule51 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate105: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate106 + } + +yystate106: + c = l.next() + switch { + default: + goto yyrule52 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate107 + } + +yystate107: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate108 + } + +yystate108: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate109 + } + +yystate109: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'V' || c >= 'X' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'W' || c == 'w': + goto yystate110 + } + +yystate110: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate111 + } + +yystate111: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate112 + } + +yystate112: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate113 + } + +yystate113: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate114 + } + +yystate114: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate115 + } + +yystate115: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate116 + } + +yystate116: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'G' || c >= 'I' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'g' || c >= 'i' && c <= 'z': + goto yystate66 + case c == 'H' || c == 'h': + goto yystate117 + } + +yystate117: + c = l.next() + switch { + default: + goto yyrule53 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate118: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'H' || c == 'J' || c == 'K' || c == 'M' || c == 'N' || c >= 'P' && c <= 'S' || c >= 'U' && c <= 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'h' || c == 'j' || c == 'k' || c == 'm' || c == 'n' || c >= 'p' && c <= 's' || c >= 'u' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate122 + case c == 'I' || c == 'i': + goto yystate131 + case c == 'L' || c == 'l': + goto yystate141 + case c == 'O' || c == 'o': + goto yystate144 + case c == 'T' || c == 't': + goto yystate152 + case c == 'Y' || c == 'y': + goto yystate156 + case c == '\'': + goto yystate119 + } + +yystate119: + c = l.next() + switch { + default: + goto yyabort + case c == '0' || c == '1': + goto yystate120 + } + +yystate120: + c = l.next() + switch { + default: + goto yyabort + case c == '0' || c == '1': + goto yystate120 + case c == '\'': + goto yystate121 + } + +yystate121: + c = l.next() + goto yyrule12 + +yystate122: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate123 + case c == 'T' || c == 't': + goto yystate126 + } + +yystate123: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate124 + } + +yystate124: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate125 + } + +yystate125: + c = l.next() + switch { + default: + goto yyrule54 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate126: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'V' || c >= 'X' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'W' || c == 'w': + goto yystate127 + } + +yystate127: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate128 + } + +yystate128: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate129 + } + +yystate129: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate130 + } + +yystate130: + c = l.next() + switch { + default: + goto yyrule55 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate131: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'M' || c >= 'O' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'm' || c >= 'o' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate132 + case c == 'N' || c == 'n': + goto yystate136 + case c == 'T' || c == 't': + goto yystate140 + } + +yystate132: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate133 + } + +yystate133: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate134 + } + +yystate134: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate135 + } + +yystate135: + c = l.next() + switch { + default: + goto yyrule289 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate136: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate137 + } + +yystate137: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate138 + } + +yystate138: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'Y' || c == 'y': + goto yystate139 + } + +yystate139: + c = l.next() + switch { + default: + goto yyrule303 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate140: + c = l.next() + switch { + default: + goto yyrule284 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate141: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate142 + } + +yystate142: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate143 + } + +yystate143: + c = l.next() + switch { + default: + goto yyrule306 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate144: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate145 + case c == 'T' || c == 't': + goto yystate150 + } + +yystate145: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate146 + } + +yystate146: + c = l.next() + switch { + default: + goto yyrule313 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate147 + } + +yystate147: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate148 + } + +yystate148: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate149 + } + +yystate149: + c = l.next() + switch { + default: + goto yyrule314 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate150: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'G' || c >= 'I' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'g' || c >= 'i' && c <= 'z': + goto yystate66 + case c == 'H' || c == 'h': + goto yystate151 + } + +yystate151: + c = l.next() + switch { + default: + goto yyrule56 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate152: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate153 + } + +yystate153: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate154 + } + +yystate154: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate155 + } + +yystate155: + c = l.next() + switch { + default: + goto yyrule57 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate156: + c = l.next() + switch { + default: + goto yyrule58 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate157 + } + +yystate157: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate158 + } + +yystate158: + c = l.next() + switch { + default: + goto yyrule315 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate159: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'G' || c >= 'I' && c <= 'N' || c == 'P' || c == 'Q' || c == 'S' || c == 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'g' || c >= 'i' && c <= 'n' || c == 'p' || c == 'q' || c == 's' || c == 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate160 + case c == 'H' || c == 'h': + goto yystate164 + case c == 'O' || c == 'o': + goto yystate181 + case c == 'R' || c == 'r': + goto yystate254 + case c == 'U' || c == 'u': + goto yystate262 + } + +yystate160: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate161 + } + +yystate161: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate162 + case c == 'T' || c == 't': + goto yystate163 + } + +yystate162: + c = l.next() + switch { + default: + goto yyrule59 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate163: + c = l.next() + switch { + default: + goto yyrule60 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate164: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate165 + case c == 'E' || c == 'e': + goto yystate175 + } + +yystate165: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate166 + } + +yystate166: + c = l.next() + switch { + default: + goto yyrule301 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate167 + case c == 'S' || c == 's': + goto yystate172 + } + +yystate167: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate168 + } + +yystate168: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate169 + } + +yystate169: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate170 + } + +yystate170: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate171 + } + +yystate171: + c = l.next() + switch { + default: + goto yyrule61 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate172: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate173 + } + +yystate173: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate174 + } + +yystate174: + c = l.next() + switch { + default: + goto yyrule62 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate175: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate176 + } + +yystate176: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'J' || c >= 'L' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'j' || c >= 'l' && c <= 'z': + goto yystate66 + case c == 'K' || c == 'k': + goto yystate177 + } + +yystate177: + c = l.next() + switch { + default: + goto yyrule63 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate178 + } + +yystate178: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate179 + } + +yystate179: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate180 + } + +yystate180: + c = l.next() + switch { + default: + goto yyrule64 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate181: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'K' || c >= 'O' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'k' || c >= 'o' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate182 + case c == 'L' || c == 'l': + goto yystate188 + case c == 'M' || c == 'm': + goto yystate200 + case c == 'N' || c == 'n': + goto yystate223 + case c == 'U' || c == 'u': + goto yystate251 + } + +yystate182: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate183 + } + +yystate183: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate184 + } + +yystate184: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate185 + } + +yystate185: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate186 + } + +yystate186: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate187 + } + +yystate187: + c = l.next() + switch { + default: + goto yyrule65 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate188: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate189 + case c == 'U' || c == 'u': + goto yystate196 + } + +yystate189: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate190 + } + +yystate190: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate191 + } + +yystate191: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate192 + case c == 'I' || c == 'i': + goto yystate193 + } + +yystate192: + c = l.next() + switch { + default: + goto yyrule66 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate193: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate194 + } + +yystate194: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate195 + } + +yystate195: + c = l.next() + switch { + default: + goto yyrule67 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate196: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate197 + } + +yystate197: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate198 + } + +yystate198: + c = l.next() + switch { + default: + goto yyrule68 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate199 + } + +yystate199: + c = l.next() + switch { + default: + goto yyrule69 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate200: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c == 'N' || c == 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c == 'n' || c == 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate201 + case c == 'P' || c == 'p': + goto yystate210 + } + +yystate201: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate202 + case c == 'I' || c == 'i': + goto yystate205 + } + +yystate202: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate203 + } + +yystate203: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate204 + } + +yystate204: + c = l.next() + switch { + default: + goto yyrule70 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate205: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate206 + } + +yystate206: + c = l.next() + switch { + default: + goto yyrule71 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate207 + } + +yystate207: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate208 + } + +yystate208: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate209 + } + +yystate209: + c = l.next() + switch { + default: + goto yyrule72 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate210: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate211 + case c == 'R' || c == 'r': + goto yystate214 + } + +yystate211: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate212 + } + +yystate212: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate213 + } + +yystate213: + c = l.next() + switch { + default: + goto yyrule73 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate214: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate215 + } + +yystate215: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate216 + } + +yystate216: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate217 + } + +yystate217: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate218 + case c == 'I' || c == 'i': + goto yystate220 + } + +yystate218: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate219 + } + +yystate219: + c = l.next() + switch { + default: + goto yyrule74 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate220: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate221 + } + +yystate221: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate222 + } + +yystate222: + c = l.next() + switch { + default: + goto yyrule75 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate223: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'M' || c >= 'O' && c <= 'R' || c == 'T' || c == 'U' || c >= 'W' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'm' || c >= 'o' && c <= 'r' || c == 't' || c == 'u' || c >= 'w' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate224 + case c == 'N' || c == 'n': + goto yystate230 + case c == 'S' || c == 's': + goto yystate240 + case c == 'V' || c == 'v': + goto yystate247 + } + +yystate224: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate225 + } + +yystate225: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate226 + } + +yystate226: + c = l.next() + switch { + default: + goto yyrule76 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate227 + } + +yystate227: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'V' || c >= 'X' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'W' || c == 'w': + goto yystate228 + } + +yystate228: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate229 + } + +yystate229: + c = l.next() + switch { + default: + goto yyrule77 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate230: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate231 + } + +yystate231: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate232 + } + +yystate232: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate233 + } + +yystate233: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate234 + } + +yystate234: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate235 + } + +yystate235: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate236 + } + +yystate236: + c = l.next() + switch { + default: + goto yyrule78 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate237 + } + +yystate237: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate238 + } + +yystate238: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate239 + } + +yystate239: + c = l.next() + switch { + default: + goto yyrule79 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate240: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate241 + } + +yystate241: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate242 + } + +yystate242: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate243 + } + +yystate243: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate244 + } + +yystate244: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate245 + } + +yystate245: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate246 + } + +yystate246: + c = l.next() + switch { + default: + goto yyrule80 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate247: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate248 + } + +yystate248: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate249 + } + +yystate249: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate250 + } + +yystate250: + c = l.next() + switch { + default: + goto yyrule81 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate251: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate252 + } + +yystate252: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate253 + } + +yystate253: + c = l.next() + switch { + default: + goto yyrule82 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate254: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate255 + case c == 'O' || c == 'o': + goto yystate259 + } + +yystate255: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate256 + } + +yystate256: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate257 + } + +yystate257: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate258 + } + +yystate258: + c = l.next() + switch { + default: + goto yyrule83 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate259: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate260 + } + +yystate260: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate261 + } + +yystate261: + c = l.next() + switch { + default: + goto yyrule84 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate262: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate263 + } + +yystate263: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Q' || c == 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'q' || c == 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate264 + case c == 'R' || c == 'r': + goto yystate268 + case c == 'T' || c == 't': + goto yystate290 + } + +yystate264: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate265 + } + +yystate265: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate266 + } + +yystate266: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate267 + } + +yystate267: + c = l.next() + switch { + default: + goto yyrule85 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate268: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate269 + } + +yystate269: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate270 + } + +yystate270: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate271 + } + +yystate271: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate272 + } + +yystate272: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'S' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 's' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate273 + case c == 'T' || c == 't': + goto yystate277 + case c == 'U' || c == 'u': + goto yystate286 + } + +yystate273: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate274 + } + +yystate274: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate275 + } + +yystate275: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate276 + } + +yystate276: + c = l.next() + switch { + default: + goto yyrule86 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate277: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate278 + } + +yystate278: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate279 + } + +yystate279: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate280 + } + +yystate280: + c = l.next() + switch { + default: + goto yyrule88 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate281 + } + +yystate281: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate282 + } + +yystate282: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate283 + } + +yystate283: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate284 + } + +yystate284: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'P' || c == 'p': + goto yystate285 + } + +yystate285: + c = l.next() + switch { + default: + goto yyrule280 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate286: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate287 + } + +yystate287: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate288 + } + +yystate288: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate289 + } + +yystate289: + c = l.next() + switch { + default: + goto yyrule89 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate290: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate291 + } + +yystate291: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate292 + } + +yystate292: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate293 + } + +yystate293: + c = l.next() + switch { + default: + goto yyrule87 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate294: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'B' || c == 'C' || c >= 'F' && c <= 'H' || c >= 'J' && c <= 'N' || c == 'P' || c == 'Q' || c == 'S' || c == 'T' || c >= 'V' && c <= 'X' || c == 'Z' || c == '_' || c == 'b' || c == 'c' || c >= 'f' && c <= 'h' || c >= 'j' && c <= 'n' || c == 'p' || c == 'q' || c == 's' || c == 't' || c >= 'v' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate295 + case c == 'D' || c == 'd': + goto yystate361 + case c == 'E' || c == 'e': + goto yystate363 + case c == 'I' || c == 'i': + goto yystate406 + case c == 'O' || c == 'o': + goto yystate414 + case c == 'R' || c == 'r': + goto yystate419 + case c == 'U' || c == 'u': + goto yystate422 + case c == 'Y' || c == 'y': + goto yystate432 + } + +yystate295: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate296 + case c == 'Y' || c == 'y': + goto yystate315 + } + +yystate296: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate297 + case c == 'E' || c == 'e': + goto yystate303 + } + +yystate297: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate298 + } + +yystate298: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate299 + } + +yystate299: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate300 + } + +yystate300: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate301 + } + +yystate301: + c = l.next() + switch { + default: + goto yyrule90 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate302 + } + +yystate302: + c = l.next() + switch { + default: + goto yyrule91 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate303: + c = l.next() + switch { + default: + goto yyrule296 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate304 + case c == '_': + goto yystate308 + } + +yystate304: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate305 + } + +yystate305: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate306 + } + +yystate306: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate307 + } + +yystate307: + c = l.next() + switch { + default: + goto yyrule299 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate308: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate309 + case c == 'S' || c == 's': + goto yystate312 + } + +yystate309: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate310 + } + +yystate310: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate311 + } + +yystate311: + c = l.next() + switch { + default: + goto yyrule92 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate312: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate313 + } + +yystate313: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate314 + } + +yystate314: + c = l.next() + switch { + default: + goto yyrule93 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate315: + c = l.next() + switch { + default: + goto yyrule94 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'P' && c <= 'Z' || c >= 'a' && c <= 'm' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate316 + case c == 'O' || c == 'o': + goto yystate320 + case c == '_': + goto yystate335 + } + +yystate316: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate317 + } + +yystate317: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate318 + } + +yystate318: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate319 + } + +yystate319: + c = l.next() + switch { + default: + goto yyrule95 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate320: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'E' || c >= 'G' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'e' || c >= 'g' && c <= 'z': + goto yystate66 + case c == 'F' || c == 'f': + goto yystate321 + } + +yystate321: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'V' || c == 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'v' || c == 'x' || c == 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate322 + case c == 'W' || c == 'w': + goto yystate327 + case c == 'Y' || c == 'y': + goto yystate331 + } + +yystate322: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate323 + } + +yystate323: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate324 + } + +yystate324: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate325 + } + +yystate325: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'G' || c >= 'I' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'g' || c >= 'i' && c <= 'z': + goto yystate66 + case c == 'H' || c == 'h': + goto yystate326 + } + +yystate326: + c = l.next() + switch { + default: + goto yyrule97 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate327: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate328 + } + +yystate328: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate329 + } + +yystate329: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'J' || c >= 'L' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'j' || c >= 'l' && c <= 'z': + goto yystate66 + case c == 'K' || c == 'k': + goto yystate330 + } + +yystate330: + c = l.next() + switch { + default: + goto yyrule96 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate331: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate332 + } + +yystate332: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate333 + } + +yystate333: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate334 + } + +yystate334: + c = l.next() + switch { + default: + goto yyrule98 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate335: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'G' || c >= 'I' && c <= 'L' || c >= 'N' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'g' || c >= 'i' && c <= 'l' || c >= 'n' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'H' || c == 'h': + goto yystate336 + case c == 'M' || c == 'm': + goto yystate340 + case c == 'S' || c == 's': + goto yystate355 + } + +yystate336: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate337 + } + +yystate337: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate338 + } + +yystate338: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate339 + } + +yystate339: + c = l.next() + switch { + default: + goto yyrule99 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate340: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate341 + } + +yystate341: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate342 + case c == 'N' || c == 'n': + goto yystate351 + } + +yystate342: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate343 + } + +yystate343: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate344 + } + +yystate344: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate345 + } + +yystate345: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate346 + } + +yystate346: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate347 + } + +yystate347: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate348 + } + +yystate348: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate349 + } + +yystate349: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate350 + } + +yystate350: + c = l.next() + switch { + default: + goto yyrule100 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate351: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate352 + } + +yystate352: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate353 + } + +yystate353: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate354 + } + +yystate354: + c = l.next() + switch { + default: + goto yyrule101 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate355: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate356 + } + +yystate356: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate357 + } + +yystate357: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate358 + } + +yystate358: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate359 + } + +yystate359: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate360 + } + +yystate360: + c = l.next() + switch { + default: + goto yyrule102 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate361: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate362 + } + +yystate362: + c = l.next() + switch { + default: + goto yyrule103 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate363: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'B' || c == 'D' || c == 'E' || c >= 'G' && c <= 'K' || c >= 'M' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c == 'b' || c == 'd' || c == 'e' || c >= 'g' && c <= 'k' || c >= 'm' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate364 + case c == 'C' || c == 'c': + goto yystate372 + case c == 'F' || c == 'f': + goto yystate377 + case c == 'L' || c == 'l': + goto yystate382 + case c == 'S' || c == 's': + goto yystate400 + } + +yystate364: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate365 + } + +yystate365: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate366 + } + +yystate366: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate367 + } + +yystate367: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate368 + } + +yystate368: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate369 + } + +yystate369: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate370 + } + +yystate370: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate371 + } + +yystate371: + c = l.next() + switch { + default: + goto yyrule104 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate372: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate373 + } + +yystate373: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate374 + } + +yystate374: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate375 + } + +yystate375: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate376 + } + +yystate376: + c = l.next() + switch { + default: + goto yyrule290 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate377: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate378 + } + +yystate378: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate379 + } + +yystate379: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate380 + } + +yystate380: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate381 + } + +yystate381: + c = l.next() + switch { + default: + goto yyrule105 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate382: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate383 + case c == 'E' || c == 'e': + goto yystate397 + } + +yystate383: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'Y' || c == 'y': + goto yystate384 + } + +yystate384: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate385 + case c == '_': + goto yystate387 + } + +yystate385: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate386 + } + +yystate386: + c = l.next() + switch { + default: + goto yyrule106 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate387: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'J' || c >= 'L' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'j' || c >= 'l' && c <= 'z': + goto yystate66 + case c == 'K' || c == 'k': + goto yystate388 + } + +yystate388: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate389 + } + +yystate389: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'Y' || c == 'y': + goto yystate390 + } + +yystate390: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate391 + } + +yystate391: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'V' || c >= 'X' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'W' || c == 'w': + goto yystate392 + } + +yystate392: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate393 + } + +yystate393: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate394 + } + +yystate394: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate395 + } + +yystate395: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate396 + } + +yystate396: + c = l.next() + switch { + default: + goto yyrule107 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate397: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate398 + } + +yystate398: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate399 + } + +yystate399: + c = l.next() + switch { + default: + goto yyrule108 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate400: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate401 + } + +yystate401: + c = l.next() + switch { + default: + goto yyrule109 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate402 + } + +yystate402: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate403 + } + +yystate403: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate404 + } + +yystate404: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate405 + } + +yystate405: + c = l.next() + switch { + default: + goto yyrule110 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate406: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c == 'T' || c == 'U' || c >= 'W' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c == 't' || c == 'u' || c >= 'w' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate407 + case c == 'V' || c == 'v': + goto yystate413 + } + +yystate407: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate408 + } + +yystate408: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate409 + } + +yystate409: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate410 + } + +yystate410: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate411 + } + +yystate411: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate412 + } + +yystate412: + c = l.next() + switch { + default: + goto yyrule112 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate413: + c = l.next() + switch { + default: + goto yyrule113 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate414: + c = l.next() + switch { + default: + goto yyrule114 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate415 + } + +yystate415: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate416 + } + +yystate416: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate417 + } + +yystate417: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate418 + } + +yystate418: + c = l.next() + switch { + default: + goto yyrule293 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate419: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate420 + } + +yystate420: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'P' || c == 'p': + goto yystate421 + } + +yystate421: + c = l.next() + switch { + default: + goto yyrule111 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate422: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate423 + case c == 'P' || c == 'p': + goto yystate425 + } + +yystate423: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate424 + } + +yystate424: + c = l.next() + switch { + default: + goto yyrule115 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate425: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate426 + } + +yystate426: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate427 + } + +yystate427: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate428 + } + +yystate428: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate429 + } + +yystate429: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate430 + } + +yystate430: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate431 + } + +yystate431: + c = l.next() + switch { + default: + goto yyrule116 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate432: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate433 + } + +yystate433: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate434 + } + +yystate434: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate435 + } + +yystate435: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate436 + } + +yystate436: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate437 + } + +yystate437: + c = l.next() + switch { + default: + goto yyrule117 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate438: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c == 'M' || c >= 'O' && c <= 'R' || c >= 'T' && c <= 'W' || c == 'Y' || c == 'Z' || c == '_' || c >= 'a' && c <= 'k' || c == 'm' || c >= 'o' && c <= 'r' || c >= 't' && c <= 'w' || c == 'y' || c == 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate439 + case c == 'N' || c == 'n': + goto yystate442 + case c == 'S' || c == 's': + goto yystate451 + case c == 'X' || c == 'x': + goto yystate456 + } + +yystate439: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate440 + } + +yystate440: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate441 + } + +yystate441: + c = l.next() + switch { + default: + goto yyrule118 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate442: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c == 'E' || c == 'F' || c >= 'H' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c == 'e' || c == 'f' || c >= 'h' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate443 + case c == 'G' || c == 'g': + goto yystate444 + case c == 'U' || c == 'u': + goto yystate449 + } + +yystate443: + c = l.next() + switch { + default: + goto yyrule119 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate444: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate445 + } + +yystate445: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate446 + } + +yystate446: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate447 + } + +yystate447: + c = l.next() + switch { + default: + goto yyrule120 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate448 + } + +yystate448: + c = l.next() + switch { + default: + goto yyrule121 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate449: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate450 + } + +yystate450: + c = l.next() + switch { + default: + goto yyrule123 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate451: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate452 + } + +yystate452: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate453 + } + +yystate453: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'P' || c == 'p': + goto yystate454 + } + +yystate454: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate455 + } + +yystate455: + c = l.next() + switch { + default: + goto yyrule124 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate456: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'H' || c >= 'J' && c <= 'O' || c >= 'Q' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'h' || c >= 'j' && c <= 'o' || c >= 'q' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate457 + case c == 'I' || c == 'i': + goto yystate462 + case c == 'P' || c == 'p': + goto yystate466 + case c == 'T' || c == 't': + goto yystate471 + } + +yystate457: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate458 + } + +yystate458: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate459 + } + +yystate459: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate460 + } + +yystate460: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate461 + } + +yystate461: + c = l.next() + switch { + default: + goto yyrule122 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate462: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate463 + } + +yystate463: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate464 + } + +yystate464: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate465 + } + +yystate465: + c = l.next() + switch { + default: + goto yyrule125 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate466: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate467 + } + +yystate467: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate468 + } + +yystate468: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate469 + } + +yystate469: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate470 + } + +yystate470: + c = l.next() + switch { + default: + goto yyrule126 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate471: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate472 + } + +yystate472: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate473 + } + +yystate473: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate474 + } + +yystate474: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate475 + } + +yystate475: + c = l.next() + switch { + default: + goto yyrule127 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate476: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'H' || c == 'J' || c == 'K' || c == 'M' || c == 'N' || c == 'P' || c == 'Q' || c == 'S' || c == 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'h' || c == 'j' || c == 'k' || c == 'm' || c == 'n' || c == 'p' || c == 'q' || c == 's' || c == 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate477 + case c == 'I' || c == 'i': + goto yystate481 + case c == 'L' || c == 'l': + goto yystate492 + case c == 'O' || c == 'o': + goto yystate496 + case c == 'R' || c == 'r': + goto yystate510 + case c == 'U' || c == 'u': + goto yystate513 + } + +yystate477: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate478 + } + +yystate478: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate479 + } + +yystate479: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate480 + } + +yystate480: + c = l.next() + switch { + default: + goto yyrule277 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate481: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Q' || c >= 'S' && c <= 'W' || c == 'Y' || c == 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'q' || c >= 's' && c <= 'w' || c == 'y' || c == 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate482 + case c == 'R' || c == 'r': + goto yystate486 + case c == 'X' || c == 'x': + goto yystate489 + } + +yystate482: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate483 + } + +yystate483: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate484 + } + +yystate484: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate485 + } + +yystate485: + c = l.next() + switch { + default: + goto yyrule128 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate486: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate487 + } + +yystate487: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate488 + } + +yystate488: + c = l.next() + switch { + default: + goto yyrule129 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate489: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate490 + } + +yystate490: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate491 + } + +yystate491: + c = l.next() + switch { + default: + goto yyrule130 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate492: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate493 + } + +yystate493: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate494 + } + +yystate494: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate495 + } + +yystate495: + c = l.next() + switch { + default: + goto yyrule292 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate496: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c == 'S' || c == 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c == 's' || c == 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate497 + case c == 'U' || c == 'u': + goto yystate502 + } + +yystate497: + c = l.next() + switch { + default: + goto yyrule131 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate498 + } + +yystate498: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate499 + } + +yystate499: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate500 + } + +yystate500: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate501 + } + +yystate501: + c = l.next() + switch { + default: + goto yyrule132 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate502: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate503 + } + +yystate503: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate504 + } + +yystate504: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate505 + } + +yystate505: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate506 + } + +yystate506: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate507 + } + +yystate507: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'V' || c >= 'X' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'W' || c == 'w': + goto yystate508 + } + +yystate508: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate509 + } + +yystate509: + c = l.next() + switch { + default: + goto yyrule133 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate510: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate511 + } + +yystate511: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate512 + } + +yystate512: + c = l.next() + switch { + default: + goto yyrule134 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate513: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate514 + } + +yystate514: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate515 + } + +yystate515: + c = l.next() + switch { + default: + goto yyrule135 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate516 + } + +yystate516: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate517 + } + +yystate517: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'W' || c == 'Y' || c == 'Z' || c == '_' || c >= 'a' && c <= 'w' || c == 'y' || c == 'z': + goto yystate66 + case c == 'X' || c == 'x': + goto yystate518 + } + +yystate518: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate519 + } + +yystate519: + c = l.next() + switch { + default: + goto yyrule136 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate520: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate521 + case c == 'R' || c == 'r': + goto yystate526 + } + +yystate521: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate522 + } + +yystate522: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate523 + } + +yystate523: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate524 + } + +yystate524: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate525 + } + +yystate525: + c = l.next() + switch { + default: + goto yyrule215 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate526: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate527 + case c == 'O' || c == 'o': + goto yystate531 + } + +yystate527: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate528 + } + +yystate528: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate529 + } + +yystate529: + c = l.next() + switch { + default: + goto yyrule137 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate530 + } + +yystate530: + c = l.next() + switch { + default: + goto yyrule138 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate531: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate532 + } + +yystate532: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'P' || c == 'p': + goto yystate533 + } + +yystate533: + c = l.next() + switch { + default: + goto yyrule139 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate534 + } + +yystate534: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate535 + } + +yystate535: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate536 + } + +yystate536: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate537 + } + +yystate537: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate538 + } + +yystate538: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate539 + } + +yystate539: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate540 + } + +yystate540: + c = l.next() + switch { + default: + goto yyrule140 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate541: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'H' || c >= 'J' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'h' || c >= 'j' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate542 + case c == 'I' || c == 'i': + goto yystate549 + case c == 'O' || c == 'o': + goto yystate561 + } + +yystate542: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c == 'T' || c == 'U' || c >= 'W' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c == 't' || c == 'u' || c >= 'w' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate543 + case c == 'V' || c == 'v': + goto yystate545 + } + +yystate543: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'G' || c >= 'I' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'g' || c >= 'i' && c <= 'z': + goto yystate66 + case c == 'H' || c == 'h': + goto yystate544 + } + +yystate544: + c = l.next() + switch { + default: + goto yyrule141 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate545: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate546 + } + +yystate546: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate547 + } + +yystate547: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate548 + } + +yystate548: + c = l.next() + switch { + default: + goto yyrule142 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate549: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate550 + } + +yystate550: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'G' || c >= 'I' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'g' || c >= 'i' && c <= 'z': + goto yystate66 + case c == 'H' || c == 'h': + goto yystate551 + } + +yystate551: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate552 + } + +yystate552: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'P' || c == 'p': + goto yystate553 + } + +yystate553: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate554 + } + +yystate554: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate555 + } + +yystate555: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate556 + } + +yystate556: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate557 + } + +yystate557: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate558 + } + +yystate558: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate559 + } + +yystate559: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'Y' || c == 'y': + goto yystate560 + } + +yystate560: + c = l.next() + switch { + default: + goto yyrule143 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate561: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate562 + } + +yystate562: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate563 + } + +yystate563: + c = l.next() + switch { + default: + goto yyrule144 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate564 + } + +yystate564: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate565 + case c == 'S' || c == 's': + goto yystate580 + } + +yystate565: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate566 + } + +yystate566: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate567 + case c == 'N' || c == 'n': + goto yystate576 + } + +yystate567: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate568 + } + +yystate568: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate569 + } + +yystate569: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate570 + } + +yystate570: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate571 + } + +yystate571: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate572 + } + +yystate572: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate573 + } + +yystate573: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate574 + } + +yystate574: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate575 + } + +yystate575: + c = l.next() + switch { + default: + goto yyrule145 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate576: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate577 + } + +yystate577: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate578 + } + +yystate578: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate579 + } + +yystate579: + c = l.next() + switch { + default: + goto yyrule146 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate580: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate581 + } + +yystate581: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate582 + } + +yystate582: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate583 + } + +yystate583: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate584 + } + +yystate584: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate585 + } + +yystate585: + c = l.next() + switch { + default: + goto yyrule147 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate586: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c == 'E' || c >= 'H' && c <= 'M' || c >= 'O' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c == 'e' || c >= 'h' && c <= 'm' || c >= 'o' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate587 + case c == 'F' || c == 'f': + goto yystate596 + case c == 'G' || c == 'g': + goto yystate601 + case c == 'N' || c == 'n': + goto yystate606 + case c == 'S' || c == 's': + goto yystate627 + } + +yystate587: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate588 + } + +yystate588: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate589 + } + +yystate589: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate590 + } + +yystate590: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate591 + } + +yystate591: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'E' || c >= 'G' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'e' || c >= 'g' && c <= 'z': + goto yystate66 + case c == 'F' || c == 'f': + goto yystate592 + } + +yystate592: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate593 + } + +yystate593: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate594 + } + +yystate594: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate595 + } + +yystate595: + c = l.next() + switch { + default: + goto yyrule148 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate596: + c = l.next() + switch { + default: + goto yyrule149 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate597 + } + +yystate597: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate598 + } + +yystate598: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate599 + } + +yystate599: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate600 + } + +yystate600: + c = l.next() + switch { + default: + goto yyrule150 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate601: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate602 + } + +yystate602: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate603 + } + +yystate603: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate604 + } + +yystate604: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate605 + } + +yystate605: + c = l.next() + switch { + default: + goto yyrule151 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate606: + c = l.next() + switch { + default: + goto yyrule157 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'M' || c >= 'O' && c <= 'R' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'm' || c >= 'o' && c <= 'r' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate607 + case c == 'N' || c == 'n': + goto yystate610 + case c == 'S' || c == 's': + goto yystate613 + case c == 'T' || c == 't': + goto yystate617 + } + +yystate607: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate608 + } + +yystate608: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'W' || c == 'Y' || c == 'Z' || c == '_' || c >= 'a' && c <= 'w' || c == 'y' || c == 'z': + goto yystate66 + case c == 'X' || c == 'x': + goto yystate609 + } + +yystate609: + c = l.next() + switch { + default: + goto yyrule152 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate610: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate611 + } + +yystate611: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate612 + } + +yystate612: + c = l.next() + switch { + default: + goto yyrule153 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate613: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate614 + } + +yystate614: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate615 + } + +yystate615: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate616 + } + +yystate616: + c = l.next() + switch { + default: + goto yyrule154 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate617: + c = l.next() + switch { + default: + goto yyrule316 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate618 + case c == 'O' || c == 'o': + goto yystate626 + } + +yystate618: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate619 + case c == 'R' || c == 'r': + goto yystate622 + } + +yystate619: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate620 + } + +yystate620: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate621 + } + +yystate621: + c = l.next() + switch { + default: + goto yyrule317 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate622: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'U' || c >= 'W' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'u' || c >= 'w' && c <= 'z': + goto yystate66 + case c == 'V' || c == 'v': + goto yystate623 + } + +yystate623: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate624 + } + +yystate624: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate625 + } + +yystate625: + c = l.next() + switch { + default: + goto yyrule155 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate626: + c = l.next() + switch { + default: + goto yyrule156 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate627: + c = l.next() + switch { + default: + goto yyrule158 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate628 + } + +yystate628: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate629 + } + +yystate629: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate630 + } + +yystate630: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate631 + } + +yystate631: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate632 + } + +yystate632: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate633 + } + +yystate633: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate634 + } + +yystate634: + c = l.next() + switch { + default: + goto yyrule159 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate635: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate636 + } + +yystate636: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate637 + } + +yystate637: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate638 + } + +yystate638: + c = l.next() + switch { + default: + goto yyrule160 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate639: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate640 + } + +yystate640: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'Y' || c == 'y': + goto yystate641 + } + +yystate641: + c = l.next() + switch { + default: + goto yyrule161 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate642 + } + +yystate642: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate643 + } + +yystate643: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate644 + } + +yystate644: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate645 + } + +yystate645: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate646 + } + +yystate646: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'J' || c >= 'L' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'j' || c >= 'l' && c <= 'z': + goto yystate66 + case c == 'K' || c == 'k': + goto yystate647 + } + +yystate647: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate648 + } + +yystate648: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate649 + } + +yystate649: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate650 + } + +yystate650: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Y' || c == '_' || c >= 'a' && c <= 'y': + goto yystate66 + case c == 'Z' || c == 'z': + goto yystate651 + } + +yystate651: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate652 + } + +yystate652: + c = l.next() + switch { + default: + goto yyrule162 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate653: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'H' || c >= 'J' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'h' || c >= 'j' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate654 + case c == 'I' || c == 'i': + goto yystate669 + case c == 'O' || c == 'o': + goto yystate675 + } + +yystate654: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'E' || c >= 'G' && c <= 'M' || c >= 'O' && c <= 'U' || c >= 'W' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'e' || c >= 'g' && c <= 'm' || c >= 'o' && c <= 'u' || c >= 'w' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate655 + case c == 'F' || c == 'f': + goto yystate660 + case c == 'N' || c == 'n': + goto yystate662 + case c == 'V' || c == 'v': + goto yystate666 + } + +yystate655: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate656 + } + +yystate656: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate657 + } + +yystate657: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate658 + } + +yystate658: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate659 + } + +yystate659: + c = l.next() + switch { + default: + goto yyrule163 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate660: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate661 + } + +yystate661: + c = l.next() + switch { + default: + goto yyrule164 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate662: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate663 + } + +yystate663: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate664 + } + +yystate664: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'G' || c >= 'I' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'g' || c >= 'i' && c <= 'z': + goto yystate66 + case c == 'H' || c == 'h': + goto yystate665 + } + +yystate665: + c = l.next() + switch { + default: + goto yyrule165 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate666: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate667 + } + +yystate667: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate668 + } + +yystate668: + c = l.next() + switch { + default: + goto yyrule166 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate669: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'J' || c == 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'j' || c == 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'K' || c == 'k': + goto yystate670 + case c == 'M' || c == 'm': + goto yystate672 + } + +yystate670: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate671 + } + +yystate671: + c = l.next() + switch { + default: + goto yyrule167 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate672: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate673 + } + +yystate673: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate674 + } + +yystate674: + c = l.next() + switch { + default: + goto yyrule168 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate675: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'M' || c >= 'O' && c <= 'V' || c >= 'X' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'm' || c >= 'o' && c <= 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate676 + case c == 'N' || c == 'n': + goto yystate691 + case c == 'W' || c == 'w': + goto yystate701 + } + +yystate676: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'J' || c >= 'L' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'j' || c >= 'l' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate677 + case c == 'K' || c == 'k': + goto yystate690 + } + +yystate677: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate678 + case c == 'T' || c == 't': + goto yystate688 + } + +yystate678: + c = l.next() + switch { + default: + goto yyrule169 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate679 + } + +yystate679: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate680 + } + +yystate680: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate681 + } + +yystate681: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate682 + } + +yystate682: + c = l.next() + switch { + default: + goto yyrule281 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate683 + } + +yystate683: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate684 + } + +yystate684: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate685 + } + +yystate685: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate686 + } + +yystate686: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'P' || c == 'p': + goto yystate687 + } + +yystate687: + c = l.next() + switch { + default: + goto yyrule282 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate688: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate689 + } + +yystate689: + c = l.next() + switch { + default: + goto yyrule170 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate690: + c = l.next() + switch { + default: + goto yyrule171 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate691: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate692 + } + +yystate692: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate693 + case c == 'T' || c == 't': + goto yystate697 + } + +yystate693: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate694 + } + +yystate694: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate695 + } + +yystate695: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate696 + } + +yystate696: + c = l.next() + switch { + default: + goto yyrule308 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate697: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate698 + } + +yystate698: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'W' || c == 'Y' || c == 'Z' || c == '_' || c >= 'a' && c <= 'w' || c == 'y' || c == 'z': + goto yystate66 + case c == 'X' || c == 'x': + goto yystate699 + } + +yystate699: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate700 + } + +yystate700: + c = l.next() + switch { + default: + goto yyrule312 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate701: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate702 + case c == '_': + goto yystate704 + } + +yystate702: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate703 + } + +yystate703: + c = l.next() + switch { + default: + goto yyrule172 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate704: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'P' || c == 'p': + goto yystate705 + } + +yystate705: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate706 + } + +yystate706: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate707 + } + +yystate707: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate708 + } + +yystate708: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate709 + } + +yystate709: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate710 + } + +yystate710: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate711 + } + +yystate711: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'Y' || c == 'y': + goto yystate712 + } + +yystate712: + c = l.next() + switch { + default: + goto yyrule173 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate713: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'D' || c >= 'F' && c <= 'H' || c >= 'J' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'd' || c >= 'f' && c <= 'h' || c >= 'j' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate714 + case c == 'E' || c == 'e': + goto yystate721 + case c == 'I' || c == 'i': + goto yystate737 + case c == 'O' || c == 'o': + goto yystate774 + } + +yystate714: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'W' || c == 'Y' || c == 'Z' || c == '_' || c >= 'a' && c <= 'w' || c == 'y' || c == 'z': + goto yystate66 + case c == 'X' || c == 'x': + goto yystate715 + } + +yystate715: + c = l.next() + switch { + default: + goto yyrule174 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate716 + } + +yystate716: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate717 + } + +yystate717: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate718 + } + +yystate718: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'V' || c >= 'X' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'W' || c == 'w': + goto yystate719 + } + +yystate719: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate720 + } + +yystate720: + c = l.next() + switch { + default: + goto yyrule175 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate721: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate722 + } + +yystate722: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate723 + } + +yystate723: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate724 + } + +yystate724: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate725 + } + +yystate725: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'H' || c >= 'J' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'h' || c >= 'j' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate726 + case c == 'I' || c == 'i': + goto yystate730 + case c == 'T' || c == 't': + goto yystate733 + } + +yystate726: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate727 + } + +yystate727: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate728 + } + +yystate728: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate729 + } + +yystate729: + c = l.next() + switch { + default: + goto yyrule307 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate730: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate731 + } + +yystate731: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate732 + } + +yystate732: + c = l.next() + switch { + default: + goto yyrule288 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate733: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate734 + } + +yystate734: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'W' || c == 'Y' || c == 'Z' || c == '_' || c >= 'a' && c <= 'w' || c == 'y' || c == 'z': + goto yystate66 + case c == 'X' || c == 'x': + goto yystate735 + } + +yystate735: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate736 + } + +yystate736: + c = l.next() + switch { + default: + goto yyrule310 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate737: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate738 + case c == 'N' || c == 'n': + goto yystate747 + } + +yystate738: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate739 + } + +yystate739: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate740 + } + +yystate740: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate741 + } + +yystate741: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate742 + } + +yystate742: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate743 + } + +yystate743: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate744 + } + +yystate744: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate745 + } + +yystate745: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate746 + } + +yystate746: + c = l.next() + switch { + default: + goto yyrule176 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate747: + c = l.next() + switch { + default: + goto yyrule177 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate748 + case c == '_': + goto yystate769 + } + +yystate748: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate749 + } + +yystate749: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate750 + } + +yystate750: + c = l.next() + switch { + default: + goto yyrule178 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate751 + } + +yystate751: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate752 + case c == 'S' || c == 's': + goto yystate763 + } + +yystate752: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate753 + } + +yystate753: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate754 + } + +yystate754: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate755 + } + +yystate755: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate756 + } + +yystate756: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate757 + } + +yystate757: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate758 + } + +yystate758: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate759 + } + +yystate759: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate760 + } + +yystate760: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate761 + } + +yystate761: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate762 + } + +yystate762: + c = l.next() + switch { + default: + goto yyrule179 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate763: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate764 + } + +yystate764: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate765 + } + +yystate765: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate766 + } + +yystate766: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate767 + } + +yystate767: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate768 + } + +yystate768: + c = l.next() + switch { + default: + goto yyrule180 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate769: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate770 + } + +yystate770: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate771 + } + +yystate771: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'V' || c >= 'X' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'W' || c == 'w': + goto yystate772 + } + +yystate772: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate773 + } + +yystate773: + c = l.next() + switch { + default: + goto yyrule181 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate774: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate775 + case c == 'N' || c == 'n': + goto yystate777 + } + +yystate775: + c = l.next() + switch { + default: + goto yyrule182 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate776 + } + +yystate776: + c = l.next() + switch { + default: + goto yyrule183 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate777: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate778 + } + +yystate778: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'G' || c >= 'I' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'g' || c >= 'i' && c <= 'z': + goto yystate66 + case c == 'H' || c == 'h': + goto yystate779 + } + +yystate779: + c = l.next() + switch { + default: + goto yyrule184 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate780: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'N' || c >= 'P' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'n' || c >= 'p' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate781 + case c == 'O' || c == 'o': + goto yystate791 + case c == 'U' || c == 'u': + goto yystate794 + } + +yystate781: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate782 + case c == 'T' || c == 't': + goto yystate785 + } + +yystate782: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate783 + } + +yystate783: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate784 + } + +yystate784: + c = l.next() + switch { + default: + goto yyrule185 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate785: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate786 + } + +yystate786: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate787 + } + +yystate787: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate788 + } + +yystate788: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate789 + } + +yystate789: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate790 + } + +yystate790: + c = l.next() + switch { + default: + goto yyrule186 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate791: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c == 'U' || c == 'V' || c >= 'X' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c == 'u' || c == 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate792 + case c == 'W' || c == 'w': + goto yystate793 + } + +yystate792: + c = l.next() + switch { + default: + goto yyrule187 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate793: + c = l.next() + switch { + default: + goto yyrule283 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate794: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate795 + case c == 'M' || c == 'm': + goto yystate799 + } + +yystate795: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate796 + } + +yystate796: + c = l.next() + switch { + default: + goto yyrule276 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate797 + } + +yystate797: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'E' || c >= 'G' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'e' || c >= 'g' && c <= 'z': + goto yystate66 + case c == 'F' || c == 'f': + goto yystate798 + } + +yystate798: + c = l.next() + switch { + default: + goto yyrule252 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate799: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate800 + } + +yystate800: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate801 + } + +yystate801: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate802 + } + +yystate802: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate803 + } + +yystate803: + c = l.next() + switch { + default: + goto yyrule291 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate804: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'E' || c >= 'G' && c <= 'M' || c == 'O' || c == 'Q' || c == 'S' || c == 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'e' || c >= 'g' && c <= 'm' || c == 'o' || c == 'q' || c == 's' || c == 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'F' || c == 'f': + goto yystate805 + case c == 'N' || c == 'n': + goto yystate810 + case c == 'P' || c == 'p': + goto yystate813 + case c == 'R' || c == 'r': + goto yystate818 + case c == 'U' || c == 'u': + goto yystate822 + } + +yystate805: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'E' || c >= 'G' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'e' || c >= 'g' && c <= 'z': + goto yystate66 + case c == 'F' || c == 'f': + goto yystate806 + } + +yystate806: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate807 + } + +yystate807: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate808 + } + +yystate808: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate809 + } + +yystate809: + c = l.next() + switch { + default: + goto yyrule188 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate810: + c = l.next() + switch { + default: + goto yyrule189 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate811 + } + +yystate811: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'Y' || c == 'y': + goto yystate812 + } + +yystate812: + c = l.next() + switch { + default: + goto yyrule190 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate813: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate814 + } + +yystate814: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate815 + } + +yystate815: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate816 + } + +yystate816: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate817 + } + +yystate817: + c = l.next() + switch { + default: + goto yyrule191 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate818: + c = l.next() + switch { + default: + goto yyrule193 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate819 + } + +yystate819: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate820 + } + +yystate820: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate821 + } + +yystate821: + c = l.next() + switch { + default: + goto yyrule192 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate822: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate823 + } + +yystate823: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate824 + } + +yystate824: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate825 + } + +yystate825: + c = l.next() + switch { + default: + goto yyrule194 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate826: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'N' || c == 'P' || c == 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'n' || c == 'p' || c == 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate827 + case c == 'O' || c == 'o': + goto yystate834 + case c == 'R' || c == 'r': + goto yystate838 + } + +yystate827: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate828 + } + +yystate828: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate829 + } + +yystate829: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'V' || c >= 'X' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'W' || c == 'w': + goto yystate830 + } + +yystate830: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate831 + } + +yystate831: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate832 + } + +yystate832: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate833 + } + +yystate833: + c = l.next() + switch { + default: + goto yyrule195 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate834: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'V' || c >= 'X' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'W' || c == 'w': + goto yystate835 + } + +yystate835: + c = l.next() + switch { + default: + goto yyrule196 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate836 + } + +yystate836: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate837 + } + +yystate837: + c = l.next() + switch { + default: + goto yyrule197 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate838: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'H' || c >= 'J' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'h' || c >= 'j' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate839 + case c == 'I' || c == 'i': + goto yystate850 + case c == 'O' || c == 'o': + goto yystate855 + } + +yystate839: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate840 + case c == 'P' || c == 'p': + goto yystate846 + } + +yystate840: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate841 + } + +yystate841: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate842 + } + +yystate842: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate843 + } + +yystate843: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate844 + } + +yystate844: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate845 + } + +yystate845: + c = l.next() + switch { + default: + goto yyrule294 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate846: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate847 + } + +yystate847: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate848 + } + +yystate848: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate849 + } + +yystate849: + c = l.next() + switch { + default: + goto yyrule198 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate850: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate851 + } + +yystate851: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate852 + } + +yystate852: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate853 + } + +yystate853: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'Y' || c == 'y': + goto yystate854 + } + +yystate854: + c = l.next() + switch { + default: + goto yyrule199 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate855: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate856 + } + +yystate856: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate857 + } + +yystate857: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate858 + } + +yystate858: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate859 + } + +yystate859: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate860 + } + +yystate860: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate861 + } + +yystate861: + c = l.next() + switch { + default: + goto yyrule200 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate862: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate863 + } + +yystate863: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate864 + case c == 'I' || c == 'i': + goto yystate869 + } + +yystate864: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate865 + } + +yystate865: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate866 + } + +yystate866: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate867 + } + +yystate867: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate868 + } + +yystate868: + c = l.next() + switch { + default: + goto yyrule201 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate869: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate870 + } + +yystate870: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'J' || c >= 'L' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'j' || c >= 'l' && c <= 'z': + goto yystate66 + case c == 'K' || c == 'k': + goto yystate871 + } + +yystate871: + c = l.next() + switch { + default: + goto yyrule202 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate872: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'D' || c >= 'F' && c <= 'H' || c == 'J' || c == 'K' || c == 'M' || c == 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'd' || c >= 'f' && c <= 'h' || c == 'j' || c == 'k' || c == 'm' || c == 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate873 + case c == 'E' || c == 'e': + goto yystate876 + case c == 'I' || c == 'i': + goto yystate904 + case c == 'L' || c == 'l': + goto yystate908 + case c == 'O' || c == 'o': + goto yystate912 + } + +yystate873: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate874 + } + +yystate874: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate875 + } + +yystate875: + c = l.next() + switch { + default: + goto yyrule216 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate876: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'E' || c >= 'H' && c <= 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'e' || c >= 'h' && c <= 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate877 + case c == 'F' || c == 'f': + goto yystate880 + case c == 'G' || c == 'g': + goto yystate888 + case c == 'P' || c == 'p': + goto yystate892 + } + +yystate877: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate878 + case c == 'L' || c == 'l': + goto yystate879 + } + +yystate878: + c = l.next() + switch { + default: + goto yyrule217 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate879: + c = l.next() + switch { + default: + goto yyrule295 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate880: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate881 + } + +yystate881: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate882 + } + +yystate882: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate883 + } + +yystate883: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate884 + } + +yystate884: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate885 + } + +yystate885: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate886 + } + +yystate886: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate887 + } + +yystate887: + c = l.next() + switch { + default: + goto yyrule222 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate888: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate889 + } + +yystate889: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'W' || c == 'Y' || c == 'Z' || c == '_' || c >= 'a' && c <= 'w' || c == 'y' || c == 'z': + goto yystate66 + case c == 'X' || c == 'x': + goto yystate890 + } + +yystate890: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'P' || c == 'p': + goto yystate891 + } + +yystate891: + c = l.next() + switch { + default: + goto yyrule220 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate892: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate893 + case c == 'L' || c == 'l': + goto yystate900 + } + +yystate893: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate894 + } + +yystate894: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate895 + } + +yystate895: + c = l.next() + switch { + default: + goto yyrule218 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate896 + } + +yystate896: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate897 + } + +yystate897: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate898 + } + +yystate898: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate899 + } + +yystate899: + c = l.next() + switch { + default: + goto yyrule219 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate900: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate901 + } + +yystate901: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate902 + } + +yystate902: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate903 + } + +yystate903: + c = l.next() + switch { + default: + goto yyrule221 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate904: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate905 + } + +yystate905: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'G' || c >= 'I' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'g' || c >= 'i' && c <= 'z': + goto yystate66 + case c == 'H' || c == 'h': + goto yystate906 + } + +yystate906: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate907 + } + +yystate907: + c = l.next() + switch { + default: + goto yyrule204 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate908: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate909 + } + +yystate909: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'J' || c >= 'L' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'j' || c >= 'l' && c <= 'z': + goto yystate66 + case c == 'K' || c == 'k': + goto yystate910 + } + +yystate910: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate911 + } + +yystate911: + c = l.next() + switch { + default: + goto yyrule223 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate912: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'V' || c >= 'X' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate913 + case c == 'W' || c == 'w': + goto yystate919 + } + +yystate913: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate914 + } + +yystate914: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate915 + } + +yystate915: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate916 + } + +yystate916: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate917 + } + +yystate917: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'J' || c >= 'L' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'j' || c >= 'l' && c <= 'z': + goto yystate66 + case c == 'K' || c == 'k': + goto yystate918 + } + +yystate918: + c = l.next() + switch { + default: + goto yyrule205 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate919: + c = l.next() + switch { + default: + goto yyrule206 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate920 + } + +yystate920: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'E' || c >= 'G' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'e' || c >= 'g' && c <= 'z': + goto yystate66 + case c == 'F' || c == 'f': + goto yystate921 + } + +yystate921: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate922 + } + +yystate922: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate923 + } + +yystate923: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate924 + } + +yystate924: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate925 + } + +yystate925: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate926 + } + +yystate926: + c = l.next() + switch { + default: + goto yyrule207 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate927: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c == 'D' || c == 'F' || c == 'G' || c >= 'J' && c <= 'L' || c == 'N' || c == 'P' || c == 'R' || c == 'S' || c >= 'V' && c <= 'X' || c == 'Z' || c == '_' || c == 'a' || c == 'b' || c == 'd' || c == 'f' || c == 'g' || c >= 'j' && c <= 'l' || c == 'n' || c == 'p' || c == 'r' || c == 's' || c >= 'v' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate928 + case c == 'E' || c == 'e': + goto yystate934 + case c == 'H' || c == 'h': + goto yystate971 + case c == 'I' || c == 'i': + goto yystate977 + case c == 'M' || c == 'm': + goto yystate982 + case c == 'O' || c == 'o': + goto yystate989 + case c == 'Q' || c == 'q': + goto yystate992 + case c == 'T' || c == 't': + goto yystate1010 + case c == 'U' || c == 'u': + goto yystate1021 + case c == 'Y' || c == 'y': + goto yystate1040 + } + +yystate928: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'G' || c >= 'I' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'g' || c >= 'i' && c <= 'z': + goto yystate66 + case c == 'H' || c == 'h': + goto yystate929 + } + +yystate929: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate930 + } + +yystate930: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate931 + } + +yystate931: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate932 + } + +yystate932: + c = l.next() + switch { + default: + goto yyrule208 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate933 + } + +yystate933: + c = l.next() + switch { + default: + goto yyrule209 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate934: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'K' || c >= 'M' && c <= 'Q' || c >= 'U' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'k' || c >= 'm' && c <= 'q' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate935 + case c == 'L' || c == 'l': + goto yystate951 + case c == 'R' || c == 'r': + goto yystate955 + case c == 'S' || c == 's': + goto yystate965 + case c == 'T' || c == 't': + goto yystate970 + } + +yystate935: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate936 + } + +yystate936: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate937 + } + +yystate937: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate938 + } + +yystate938: + c = l.next() + switch { + default: + goto yyrule226 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate939 + } + +yystate939: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate940 + } + +yystate940: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate941 + } + +yystate941: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate942 + } + +yystate942: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate943 + } + +yystate943: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate944 + } + +yystate944: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate945 + } + +yystate945: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate946 + } + +yystate946: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate947 + } + +yystate947: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate948 + } + +yystate948: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate949 + } + +yystate949: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate950 + } + +yystate950: + c = l.next() + switch { + default: + goto yyrule227 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate951: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate952 + } + +yystate952: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate953 + } + +yystate953: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate954 + } + +yystate954: + c = l.next() + switch { + default: + goto yyrule228 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate955: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate956 + } + +yystate956: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate957 + } + +yystate957: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate958 + } + +yystate958: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate959 + } + +yystate959: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Y' || c == '_' || c >= 'a' && c <= 'y': + goto yystate66 + case c == 'Z' || c == 'z': + goto yystate960 + } + +yystate960: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate961 + } + +yystate961: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate962 + } + +yystate962: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate963 + } + +yystate963: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate964 + } + +yystate964: + c = l.next() + switch { + default: + goto yyrule210 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate965: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate966 + } + +yystate966: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate967 + } + +yystate967: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate968 + } + +yystate968: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate969 + } + +yystate969: + c = l.next() + switch { + default: + goto yyrule211 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate970: + c = l.next() + switch { + default: + goto yyrule229 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate971: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate972 + case c == 'O' || c == 'o': + goto yystate975 + } + +yystate972: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate973 + } + +yystate973: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate974 + } + +yystate974: + c = l.next() + switch { + default: + goto yyrule230 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate975: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'V' || c >= 'X' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'W' || c == 'w': + goto yystate976 + } + +yystate976: + c = l.next() + switch { + default: + goto yyrule231 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate977: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate978 + } + +yystate978: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate979 + } + +yystate979: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate980 + } + +yystate980: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate981 + } + +yystate981: + c = l.next() + switch { + default: + goto yyrule273 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate982: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate983 + } + +yystate983: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate984 + } + +yystate984: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate985 + } + +yystate985: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate986 + } + +yystate986: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate987 + } + +yystate987: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate988 + } + +yystate988: + c = l.next() + switch { + default: + goto yyrule287 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate989: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate990 + } + +yystate990: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate991 + } + +yystate991: + c = l.next() + switch { + default: + goto yyrule212 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate992: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate993 + } + +yystate993: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate994 + } + +yystate994: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate995 + } + +yystate995: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate996 + } + +yystate996: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate997 + } + +yystate997: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate998 + } + +yystate998: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate999 + } + +yystate999: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'E' || c >= 'G' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'e' || c >= 'g' && c <= 'z': + goto yystate66 + case c == 'F' || c == 'f': + goto yystate1000 + } + +yystate1000: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate1001 + } + +yystate1001: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate1002 + } + +yystate1002: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1003 + } + +yystate1003: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate1004 + } + +yystate1004: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate1005 + } + +yystate1005: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate1006 + } + +yystate1006: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate1007 + } + +yystate1007: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'V' || c >= 'X' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'W' || c == 'w': + goto yystate1008 + } + +yystate1008: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate1009 + } + +yystate1009: + c = l.next() + switch { + default: + goto yyrule279 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1010: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1011 + case c == 'R' || c == 'r': + goto yystate1017 + } + +yystate1011: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c == 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c == 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate1012 + case c == 'T' || c == 't': + goto yystate1014 + } + +yystate1012: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate1013 + } + +yystate1013: + c = l.next() + switch { + default: + goto yyrule213 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1014: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate1015 + } + +yystate1015: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate1016 + } + +yystate1016: + c = l.next() + switch { + default: + goto yyrule214 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1017: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate1018 + } + +yystate1018: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate1019 + } + +yystate1019: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'P' || c == 'p': + goto yystate1020 + } + +yystate1020: + c = l.next() + switch { + default: + goto yyrule233 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1021: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate1022 + case c == 'M' || c == 'm': + goto yystate1039 + } + +yystate1022: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate1023 + case c == 'S' || c == 's': + goto yystate1027 + } + +yystate1023: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1024 + } + +yystate1024: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate1025 + } + +yystate1025: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1026 + } + +yystate1026: + c = l.next() + switch { + default: + goto yyrule232 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1027: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate1028 + } + +yystate1028: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate1029 + } + +yystate1029: + c = l.next() + switch { + default: + goto yyrule234 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate1030 + } + +yystate1030: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1031 + } + +yystate1031: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate1032 + } + +yystate1032: + c = l.next() + switch { + default: + goto yyrule235 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c >= 'a' && c <= 'z': + goto yystate66 + case c == '_': + goto yystate1033 + } + +yystate1033: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate1034 + } + +yystate1034: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1035 + } + +yystate1035: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate1036 + } + +yystate1036: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1037 + } + +yystate1037: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'W' || c == 'Y' || c == 'Z' || c == '_' || c >= 'a' && c <= 'w' || c == 'y' || c == 'z': + goto yystate66 + case c == 'X' || c == 'x': + goto yystate1038 + } + +yystate1038: + c = l.next() + switch { + default: + goto yyrule236 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1039: + c = l.next() + switch { + default: + goto yyrule237 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1040: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate1041 + } + +yystate1041: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate1042 + } + +yystate1042: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1043 + } + +yystate1043: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate1044 + } + +yystate1044: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1045 + } + +yystate1045: + c = l.next() + switch { + default: + goto yyrule238 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1046: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'D' || c == 'F' || c == 'G' || c >= 'J' && c <= 'N' || c == 'P' || c == 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'd' || c == 'f' || c == 'g' || c >= 'j' && c <= 'n' || c == 'p' || c == 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1047 + case c == 'E' || c == 'e': + goto yystate1052 + case c == 'H' || c == 'h': + goto yystate1055 + case c == 'I' || c == 'i': + goto yystate1058 + case c == 'O' || c == 'o': + goto yystate1079 + case c == 'R' || c == 'r': + goto yystate1080 + } + +yystate1047: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate1048 + } + +yystate1048: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate1049 + } + +yystate1049: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1050 + } + +yystate1050: + c = l.next() + switch { + default: + goto yyrule239 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate1051 + } + +yystate1051: + c = l.next() + switch { + default: + goto yyrule240 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1052: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'W' || c == 'Y' || c == 'Z' || c == '_' || c >= 'a' && c <= 'w' || c == 'y' || c == 'z': + goto yystate66 + case c == 'X' || c == 'x': + goto yystate1053 + } + +yystate1053: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate1054 + } + +yystate1054: + c = l.next() + switch { + default: + goto yyrule311 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1055: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1056 + } + +yystate1056: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1057 + } + +yystate1057: + c = l.next() + switch { + default: + goto yyrule241 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1058: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate1059 + case c == 'N' || c == 'n': + goto yystate1066 + } + +yystate1059: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1060 + } + +yystate1060: + c = l.next() + switch { + default: + goto yyrule297 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate1061 + } + +yystate1061: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate1062 + } + +yystate1062: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1063 + } + +yystate1063: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate1064 + } + +yystate1064: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'P' || c == 'p': + goto yystate1065 + } + +yystate1065: + c = l.next() + switch { + default: + goto yyrule298 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1066: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'Y' || c == 'y': + goto yystate1067 + } + +yystate1067: + c = l.next() + switch { + default: + goto yyrule285 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'H' || c >= 'J' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'h' || c >= 'j' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate1068 + case c == 'I' || c == 'i': + goto yystate1072 + case c == 'T' || c == 't': + goto yystate1075 + } + +yystate1068: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate1069 + } + +yystate1069: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate1070 + } + +yystate1070: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate1071 + } + +yystate1071: + c = l.next() + switch { + default: + goto yyrule305 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1072: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1073 + } + +yystate1073: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate1074 + } + +yystate1074: + c = l.next() + switch { + default: + goto yyrule286 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1075: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1076 + } + +yystate1076: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'W' || c == 'Y' || c == 'Z' || c == '_' || c >= 'a' && c <= 'w' || c == 'y' || c == 'z': + goto yystate66 + case c == 'X' || c == 'x': + goto yystate1077 + } + +yystate1077: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate1078 + } + +yystate1078: + c = l.next() + switch { + default: + goto yyrule309 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1079: + c = l.next() + switch { + default: + goto yyrule242 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1080: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'H' || c >= 'J' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'h' || c >= 'j' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1081 + case c == 'I' || c == 'i': + goto yystate1095 + case c == 'U' || c == 'u': + goto yystate1102 + } + +yystate1081: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate1082 + case c == 'N' || c == 'n': + goto yystate1087 + } + +yystate1082: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate1083 + } + +yystate1083: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate1084 + } + +yystate1084: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1085 + } + +yystate1085: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate1086 + } + +yystate1086: + c = l.next() + switch { + default: + goto yyrule243 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1087: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate1088 + } + +yystate1088: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1089 + } + +yystate1089: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate1090 + } + +yystate1090: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate1091 + } + +yystate1091: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate1092 + } + +yystate1092: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate1093 + } + +yystate1093: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1094 + } + +yystate1094: + c = l.next() + switch { + default: + goto yyrule244 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1095: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate1096 + case c == 'M' || c == 'm': + goto yystate1101 + } + +yystate1096: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate1097 + } + +yystate1097: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1098 + } + +yystate1098: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate1099 + } + +yystate1099: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate1100 + } + +yystate1100: + c = l.next() + switch { + default: + goto yyrule245 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1101: + c = l.next() + switch { + default: + goto yyrule246 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1102: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1103 + case c == 'N' || c == 'n': + goto yystate1104 + } + +yystate1103: + c = l.next() + switch { + default: + goto yyrule278 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1104: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate1105 + } + +yystate1105: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1106 + } + +yystate1106: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate1107 + } + +yystate1107: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1108 + } + +yystate1108: + c = l.next() + switch { + default: + goto yyrule247 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1109: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c == 'O' || c == 'Q' || c == 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c == 'o' || c == 'q' || c == 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1110 + case c == 'P' || c == 'p': + goto yystate1141 + case c == 'S' || c == 's': + goto yystate1149 + } + +yystate1110: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'H' || c == 'J' || c >= 'M' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'h' || c == 'j' || c >= 'm' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate1111 + case c == 'I' || c == 'i': + goto yystate1120 + case c == 'K' || c == 'k': + goto yystate1126 + case c == 'L' || c == 'l': + goto yystate1131 + case c == 'S' || c == 's': + goto yystate1135 + } + +yystate1111: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate1112 + } + +yystate1112: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate1113 + } + +yystate1113: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate1114 + } + +yystate1114: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate1115 + } + +yystate1115: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate1116 + } + +yystate1116: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate1117 + } + +yystate1117: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1118 + } + +yystate1118: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate1119 + } + +yystate1119: + c = l.next() + switch { + default: + goto yyrule248 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1120: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c == 'P' || c >= 'R' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c == 'p' || c >= 'r' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate1121 + case c == 'Q' || c == 'q': + goto yystate1123 + } + +yystate1121: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1122 + } + +yystate1122: + c = l.next() + switch { + default: + goto yyrule249 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1123: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate1124 + } + +yystate1124: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1125 + } + +yystate1125: + c = l.next() + switch { + default: + goto yyrule250 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1126: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1127 + } + +yystate1127: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate1128 + } + +yystate1128: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'V' || c >= 'X' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'W' || c == 'w': + goto yystate1129 + } + +yystate1129: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1130 + } + +yystate1130: + c = l.next() + switch { + default: + goto yyrule251 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1131: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate1132 + } + +yystate1132: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c == 'B' || c >= 'D' && c <= 'Z' || c == '_' || c == 'a' || c == 'b' || c >= 'd' && c <= 'z': + goto yystate66 + case c == 'C' || c == 'c': + goto yystate1133 + } + +yystate1133: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'J' || c >= 'L' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'j' || c >= 'l' && c <= 'z': + goto yystate66 + case c == 'K' || c == 'k': + goto yystate1134 + } + +yystate1134: + c = l.next() + switch { + default: + goto yyrule253 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1135: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate1136 + } + +yystate1136: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate1137 + } + +yystate1137: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1138 + } + +yystate1138: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1139 + } + +yystate1139: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate1140 + } + +yystate1140: + c = l.next() + switch { + default: + goto yyrule274 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1141: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate1142 + case c == 'P' || c == 'p': + goto yystate1146 + } + +yystate1142: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1143 + } + +yystate1143: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate1144 + } + +yystate1144: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1145 + } + +yystate1145: + c = l.next() + switch { + default: + goto yyrule254 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1146: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1147 + } + +yystate1147: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate1148 + } + +yystate1148: + c = l.next() + switch { + default: + goto yyrule255 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1149: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1150 + case c == 'I' || c == 'i': + goto yystate1152 + } + +yystate1150: + c = l.next() + switch { + default: + goto yyrule256 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate1151 + } + +yystate1151: + c = l.next() + switch { + default: + goto yyrule257 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1152: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1153 + } + +yystate1153: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate1154 + } + +yystate1154: + c = l.next() + switch { + default: + goto yyrule258 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1155: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1156 + case c == 'E' || c == 'e': + goto yystate1178 + } + +yystate1156: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate1157 + case c == 'R' || c == 'r': + goto yystate1161 + } + +yystate1157: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'T' || c >= 'V' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'U' || c == 'u': + goto yystate1158 + } + +yystate1158: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1159 + } + +yystate1159: + c = l.next() + switch { + default: + goto yyrule259 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate1160 + } + +yystate1160: + c = l.next() + switch { + default: + goto yyrule260 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1161: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'D' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c == 'a' || c >= 'd' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate1162 + case c == 'C' || c == 'c': + goto yystate1168 + case c == 'I' || c == 'i': + goto yystate1172 + } + +yystate1162: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate1163 + } + +yystate1163: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1164 + } + +yystate1164: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1165 + } + +yystate1165: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate1166 + } + +yystate1166: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'Y' || c == 'y': + goto yystate1167 + } + +yystate1167: + c = l.next() + switch { + default: + goto yyrule304 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1168: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'G' || c >= 'I' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'g' || c >= 'i' && c <= 'z': + goto yystate66 + case c == 'H' || c == 'h': + goto yystate1169 + } + +yystate1169: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1170 + } + +yystate1170: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate1171 + } + +yystate1171: + c = l.next() + switch { + default: + goto yyrule302 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1172: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1173 + } + +yystate1173: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c == 'A' || c >= 'C' && c <= 'Z' || c == '_' || c == 'a' || c >= 'c' && c <= 'z': + goto yystate66 + case c == 'B' || c == 'b': + goto yystate1174 + } + +yystate1174: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate1175 + } + +yystate1175: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1176 + } + +yystate1176: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate1177 + } + +yystate1177: + c = l.next() + switch { + default: + goto yyrule261 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1178: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate1179 + } + +yystate1179: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate1180 + } + +yystate1180: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate1181 + } + +yystate1181: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate1182 + } + +yystate1182: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1183 + } + +yystate1183: + c = l.next() + switch { + default: + goto yyrule262 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1184: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'D' || c == 'F' || c == 'G' || c >= 'I' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'd' || c == 'f' || c == 'g' || c >= 'i' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1185 + case c == 'E' || c == 'e': + goto yystate1192 + case c == 'H' || c == 'h': + goto yystate1204 + case c == 'R' || c == 'r': + goto yystate1209 + } + +yystate1185: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate1186 + } + +yystate1186: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1187 + } + +yystate1187: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate1188 + } + +yystate1188: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1189 + } + +yystate1189: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'H' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'f' || c >= 'h' && c <= 'z': + goto yystate66 + case c == 'G' || c == 'g': + goto yystate1190 + } + +yystate1190: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'R' || c >= 'T' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'r' || c >= 't' && c <= 'z': + goto yystate66 + case c == 'S' || c == 's': + goto yystate1191 + } + +yystate1191: + c = l.next() + switch { + default: + goto yyrule263 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1192: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1193 + } + +yystate1193: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'J' || c >= 'L' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'j' || c >= 'l' && c <= 'z': + goto yystate66 + case c == 'K' || c == 'k': + goto yystate1194 + } + +yystate1194: + c = l.next() + switch { + default: + goto yyrule264 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'C' || c >= 'E' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'D' || c == 'd': + goto yystate1195 + case c == 'O' || c == 'o': + goto yystate1198 + } + +yystate1195: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1196 + } + +yystate1196: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'Y' || c == 'y': + goto yystate1197 + } + +yystate1197: + c = l.next() + switch { + default: + goto yyrule265 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1198: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'E' || c >= 'G' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'e' || c >= 'g' && c <= 'z': + goto yystate66 + case c == 'F' || c == 'f': + goto yystate1199 + } + +yystate1199: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'X' || c == 'Z' || c == '_' || c >= 'a' && c <= 'x' || c == 'z': + goto yystate66 + case c == 'Y' || c == 'y': + goto yystate1200 + } + +yystate1200: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1201 + } + +yystate1201: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1202 + } + +yystate1202: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate1203 + } + +yystate1203: + c = l.next() + switch { + default: + goto yyrule266 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1204: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1205 + } + +yystate1205: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1206 + case c == 'R' || c == 'r': + goto yystate1207 + } + +yystate1206: + c = l.next() + switch { + default: + goto yyrule267 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1207: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1208 + } + +yystate1208: + c = l.next() + switch { + default: + goto yyrule268 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1209: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate1210 + } + +yystate1210: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate1211 + } + +yystate1211: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1212 + } + +yystate1212: + c = l.next() + switch { + default: + goto yyrule269 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1213: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate1217 + case c == '\'': + goto yystate1214 + } + +yystate1214: + c = l.next() + switch { + default: + goto yyabort + case c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'a' && c <= 'f': + goto yystate1215 + } + +yystate1215: + c = l.next() + switch { + default: + goto yyabort + case c == '\'': + goto yystate1216 + case c >= '0' && c <= '9' || c >= 'A' && c <= 'F' || c >= 'a' && c <= 'f': + goto yystate1215 + } + +yystate1216: + c = l.next() + goto yyrule11 + +yystate1217: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate1218 + } + +yystate1218: + c = l.next() + switch { + default: + goto yyrule270 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1219: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1220 + } + +yystate1220: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate1221 + } + +yystate1221: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate1222 + } + +yystate1222: + c = l.next() + switch { + default: + goto yyrule300 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'V' || c >= 'X' && c <= 'Z' || c >= 'a' && c <= 'v' || c >= 'x' && c <= 'z': + goto yystate66 + case c == 'W' || c == 'w': + goto yystate1223 + case c == '_': + goto yystate1227 + } + +yystate1223: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1224 + } + +yystate1224: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1225 + } + +yystate1225: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'J' || c >= 'L' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'j' || c >= 'l' && c <= 'z': + goto yystate66 + case c == 'K' || c == 'k': + goto yystate1226 + } + +yystate1226: + c = l.next() + switch { + default: + goto yyrule271 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1227: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'L' || c >= 'N' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'l' || c >= 'n' && c <= 'z': + goto yystate66 + case c == 'M' || c == 'm': + goto yystate1228 + } + +yystate1228: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate1229 + } + +yystate1229: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'M' || c >= 'O' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'N' || c == 'n': + goto yystate1230 + } + +yystate1230: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'S' || c >= 'U' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 'T' || c == 't': + goto yystate1231 + } + +yystate1231: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'G' || c >= 'I' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'g' || c >= 'i' && c <= 'z': + goto yystate66 + case c == 'H' || c == 'h': + goto yystate1232 + } + +yystate1232: + c = l.next() + switch { + default: + goto yyrule272 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1233: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'D' || c >= 'F' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'd' || c >= 'f' && c <= 'z': + goto yystate66 + case c == 'E' || c == 'e': + goto yystate1234 + } + +yystate1234: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Q' || c >= 'S' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'q' || c >= 's' && c <= 'z': + goto yystate66 + case c == 'R' || c == 'r': + goto yystate1235 + } + +yystate1235: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'O' || c == 'o': + goto yystate1236 + } + +yystate1236: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'E' || c >= 'G' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'e' || c >= 'g' && c <= 'z': + goto yystate66 + case c == 'F' || c == 'f': + goto yystate1237 + } + +yystate1237: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'H' || c >= 'J' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'h' || c >= 'j' && c <= 'z': + goto yystate66 + case c == 'I' || c == 'i': + goto yystate1238 + } + +yystate1238: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate1239 + } + +yystate1239: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'K' || c >= 'M' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'k' || c >= 'm' && c <= 'z': + goto yystate66 + case c == 'L' || c == 'l': + goto yystate1240 + } + +yystate1240: + c = l.next() + switch { + default: + goto yyrule275 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1241: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1242: + c = l.next() + goto yyrule15 + +yystate1243: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'D' || c >= 'F' && c <= 'H' || c == 'J' || c == 'K' || c == 'M' || c == 'N' || c >= 'P' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'd' || c >= 'f' && c <= 'h' || c == 'j' || c == 'k' || c == 'm' || c == 'n' || c >= 'p' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate873 + case c == 'E': + goto yystate876 + case c == 'I' || c == 'i': + goto yystate904 + case c == 'L' || c == 'l': + goto yystate908 + case c == 'O' || c == 'o': + goto yystate912 + case c == 'e': + goto yystate1244 + } + +yystate1244: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'B' && c <= 'E' || c >= 'H' && c <= 'O' || c >= 'Q' && c <= 'Z' || c == '_' || c == 'b' || c == 'c' || c == 'e' || c >= 'h' && c <= 'o' || c >= 'q' && c <= 'z': + goto yystate66 + case c == 'A' || c == 'a': + goto yystate877 + case c == 'F' || c == 'f': + goto yystate880 + case c == 'G' || c == 'g': + goto yystate888 + case c == 'P' || c == 'p': + goto yystate892 + case c == 'd': + goto yystate1245 + } + +yystate1245: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 't' || c >= 'v' && c <= 'z': + goto yystate66 + case c == 'u': + goto yystate1246 + } + +yystate1246: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'n': + goto yystate1247 + } + +yystate1247: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'c' || c >= 'e' && c <= 'z': + goto yystate66 + case c == 'd': + goto yystate1248 + } + +yystate1248: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'b' && c <= 'z': + goto yystate66 + case c == 'a': + goto yystate1249 + } + +yystate1249: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'm' || c >= 'o' && c <= 'z': + goto yystate66 + case c == 'n': + goto yystate1250 + } + +yystate1250: + c = l.next() + switch { + default: + goto yyrule318 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 's' || c >= 'u' && c <= 'z': + goto yystate66 + case c == 't': + goto yystate1251 + } + +yystate1251: + c = l.next() + switch { + default: + goto yyrule203 + case c == '$' || c >= '0' && c <= '9' || c >= 'A' && c <= 'Z' || c == '_' || c >= 'a' && c <= 'z': + goto yystate66 + } + +yystate1252: + c = l.next() + switch { + default: + goto yyrule319 + case c == '|': + goto yystate1253 + } + +yystate1253: + c = l.next() + goto yyrule35 + + goto yystate1254 // silence unused label error +yystate1254: + c = l.next() +yystart1254: + switch { + default: + goto yyrule16 + case c == '"': + goto yystate1256 + case c == '\\': + goto yystate1258 + case c == '\x00': + goto yystate2 + case c >= '\x01' && c <= '!' || c >= '#' && c <= '[' || c >= ']' && c <= 'ÿ': + goto yystate1255 + } + +yystate1255: + c = l.next() + switch { + default: + goto yyrule16 + case c >= '\x01' && c <= '!' || c >= '#' && c <= '[' || c >= ']' && c <= 'ÿ': + goto yystate1255 + } + +yystate1256: + c = l.next() + switch { + default: + goto yyrule19 + case c == '"': + goto yystate1257 + } + +yystate1257: + c = l.next() + goto yyrule18 + +yystate1258: + c = l.next() + switch { + default: + goto yyabort + case c >= '\x01' && c <= '\t' || c >= '\v' && c <= 'ÿ': + goto yystate1259 + } + +yystate1259: + c = l.next() + goto yyrule17 + + goto yystate1260 // silence unused label error +yystate1260: + c = l.next() +yystart1260: + switch { + default: + goto yyrule20 + case c == '\'': + goto yystate1262 + case c == '\\': + goto yystate1264 + case c == '\x00': + goto yystate2 + case c >= '\x01' && c <= '&' || c >= '(' && c <= '[' || c >= ']' && c <= 'ÿ': + goto yystate1261 + } + +yystate1261: + c = l.next() + switch { + default: + goto yyrule20 + case c >= '\x01' && c <= '&' || c >= '(' && c <= '[' || c >= ']' && c <= 'ÿ': + goto yystate1261 + } + +yystate1262: + c = l.next() + switch { + default: + goto yyrule23 + case c == '\'': + goto yystate1263 + } + +yystate1263: + c = l.next() + goto yyrule22 + +yystate1264: + c = l.next() + switch { + default: + goto yyabort + case c >= '\x01' && c <= '\t' || c >= '\v' && c <= 'ÿ': + goto yystate1265 + } + +yystate1265: + c = l.next() + goto yyrule21 + + goto yystate1266 // silence unused label error +yystate1266: + c = l.next() +yystart1266: + switch { + default: + goto yystate1267 // c >= '\x01' && c <= '\b' || c >= '\n' && c <= '\x1f' || c >= '!' && c <= 'ÿ' + case c == '\t' || c == ' ': + goto yystate1268 + case c == '\x00': + goto yystate2 + } + +yystate1267: + c = l.next() + goto yyrule8 + +yystate1268: + c = l.next() + switch { + default: + goto yyrule7 + case c >= '\x01' && c <= '\t' || c >= '\v' && c <= 'ÿ': + goto yystate1268 + } + + goto yystate1269 // silence unused label error +yystate1269: + c = l.next() +yystart1269: + switch { + default: + goto yyrule24 + case c == '\x00': + goto yystate2 + case c == '`': + goto yystate1271 + case c >= '\x01' && c <= '_' || c >= 'a' && c <= 'ÿ': + goto yystate1270 + } + +yystate1270: + c = l.next() + switch { + default: + goto yyrule24 + case c >= '\x01' && c <= '_' || c >= 'a' && c <= 'ÿ': + goto yystate1270 + } + +yystate1271: + c = l.next() + switch { + default: + goto yyrule26 + case c == '`': + goto yystate1272 + } + +yystate1272: + c = l.next() + goto yyrule25 + +yyrule1: // \0 + { + return 0 + } +yyrule2: // [ \t\n\r]+ + + goto yystate0 +yyrule3: // #.* + + goto yystate0 +yyrule4: // \/\/.* + + goto yystate0 +yyrule5: // \/\*([^*]|\*+[^*/])*\*+\/ + + goto yystate0 +yyrule6: // -- + { + l.sc = S3 + goto yystate0 + } +yyrule7: // [ \t]+.* + { + { + l.sc = 0 + } + goto yystate0 + } +yyrule8: // [^ \t] + { + { + l.sc = 0 + l.c = '-' + n := len(l.val) + l.unget(l.val[n-1]) + return '-' + } + goto yystate0 + } +yyrule9: // {int_lit} + { + return l.int(lval) + } +yyrule10: // {float_lit} + { + return l.float(lval) + } +yyrule11: // {hex_lit} + { + return l.hex(lval) + } +yyrule12: // {bit_lit} + { + return l.bit(lval) + } +yyrule13: // \" + { + l.sc = S1 + goto yystate0 + } +yyrule14: // ' + { + l.sc = S2 + goto yystate0 + } +yyrule15: // ` + { + l.sc = S4 + goto yystate0 + } +yyrule16: // [^\"\\]* + { + l.stringLit = append(l.stringLit, l.val...) + goto yystate0 + } +yyrule17: // \\. + { + l.stringLit = append(l.stringLit, l.val...) + goto yystate0 + } +yyrule18: // \"\" + { + l.stringLit = append(l.stringLit, '"') + goto yystate0 + } +yyrule19: // \" + { + l.stringLit = append(l.stringLit, '"') + l.sc = 0 + return l.str(lval, "\"") + } +yyrule20: // [^'\\]* + { + l.stringLit = append(l.stringLit, l.val...) + goto yystate0 + } +yyrule21: // \\. + { + l.stringLit = append(l.stringLit, l.val...) + goto yystate0 + } +yyrule22: // '' + { + l.stringLit = append(l.stringLit, '\'') + goto yystate0 + } +yyrule23: // ' + { + l.stringLit = append(l.stringLit, '\'') + l.sc = 0 + return l.str(lval, "'") + } +yyrule24: // [^`]* + { + l.stringLit = append(l.stringLit, l.val...) + goto yystate0 + } +yyrule25: // `` + { + l.stringLit = append(l.stringLit, '`') + goto yystate0 + } +yyrule26: // ` + { + l.sc = 0 + lval.item = string(l.stringLit) + l.stringLit = l.stringLit[0:0] + return identifier + } +yyrule27: // "&&" + { + return andand + } +yyrule28: // "&^" + { + return andnot + } +yyrule29: // "<<" + { + return lsh + } +yyrule30: // "<=" + { + return le + } +yyrule31: // "=" + { + return eq + } +yyrule32: // ">=" + { + return ge + } +yyrule33: // "!=" + { + return neq + } +yyrule34: // "<>" + { + return neq + } +yyrule35: // "||" + { + return oror + } +yyrule36: // ">>" + { + return rsh + } +yyrule37: // "<=>" + { + return nulleq + } +yyrule38: // "@" + { + return at + } +yyrule39: // "?" + { + return placeholder + } +yyrule40: // {abs} + { + lval.item = string(l.val) + return abs + } +yyrule41: // {add} + { + return add + } +yyrule42: // {adddate} + { + lval.item = string(l.val) + return addDate + } +yyrule43: // {admin} + { + lval.item = string(l.val) + return admin + } +yyrule44: // {after} + { + lval.item = string(l.val) + return after + } +yyrule45: // {all} + { + return all + } +yyrule46: // {alter} + { + return alter + } +yyrule47: // {and} + { + return and + } +yyrule48: // {any} + { + lval.item = string(l.val) + return any + } +yyrule49: // {asc} + { + return asc + } +yyrule50: // {as} + { + return as + } +yyrule51: // {auto_increment} + { + lval.item = string(l.val) + return autoIncrement + } +yyrule52: // {avg} + { + lval.item = string(l.val) + return avg + } +yyrule53: // {avg_row_length} + { + lval.item = string(l.val) + return avgRowLength + } +yyrule54: // {begin} + { + lval.item = string(l.val) + return begin + } +yyrule55: // {between} + { + return between + } +yyrule56: // {both} + { + return both + } +yyrule57: // {btree} + { + lval.item = string(l.val) + return btree + } +yyrule58: // {by} + { + return by + } +yyrule59: // {case} + { + return caseKwd + } +yyrule60: // {cast} + { + lval.item = string(l.val) + return cast + } +yyrule61: // {character} + { + return character + } +yyrule62: // {charset} + { + lval.item = string(l.val) + return charsetKwd + } +yyrule63: // {check} + { + return check + } +yyrule64: // {checksum} + { + lval.item = string(l.val) + return checksum + } +yyrule65: // {coalesce} + { + lval.item = string(l.val) + return coalesce + } +yyrule66: // {collate} + { + return collate + } +yyrule67: // {collation} + { + lval.item = string(l.val) + return collation + } +yyrule68: // {column} + { + return column + } +yyrule69: // {columns} + { + lval.item = string(l.val) + return columns + } +yyrule70: // {comment} + { + lval.item = string(l.val) + return comment + } +yyrule71: // {commit} + { + lval.item = string(l.val) + return commit + } +yyrule72: // {committed} + { + lval.item = string(l.val) + return committed + } +yyrule73: // {compact} + { + lval.item = string(l.val) + return compact + } +yyrule74: // {compressed} + { + lval.item = string(l.val) + return compressed + } +yyrule75: // {compression} + { + lval.item = string(l.val) + return compression + } +yyrule76: // {concat} + { + lval.item = string(l.val) + return concat + } +yyrule77: // {concat_ws} + { + lval.item = string(l.val) + return concatWs + } +yyrule78: // {connection} + { + lval.item = string(l.val) + return connection + } +yyrule79: // {connection_id} + { + lval.item = string(l.val) + return connectionID + } +yyrule80: // {constraint} + { + return constraint + } +yyrule81: // {convert} + { + lval.item = string(l.val) + return convert + } +yyrule82: // {count} + { + lval.item = string(l.val) + return count + } +yyrule83: // {create} + { + return create + } +yyrule84: // {cross} + { + return cross + } +yyrule85: // {curdate} + { + lval.item = string(l.val) + return curDate + } +yyrule86: // {current_date} + { + lval.item = string(l.val) + return currentDate + } +yyrule87: // {curtime} + { + lval.item = string(l.val) + return curTime + } +yyrule88: // {current_time} + { + lval.item = string(l.val) + return currentTime + } +yyrule89: // {current_user} + { + lval.item = string(l.val) + return currentUser + } +yyrule90: // {database} + { + lval.item = string(l.val) + return database + } +yyrule91: // {databases} + { + return databases + } +yyrule92: // {date_add} + { + lval.item = string(l.val) + return dateAdd + } +yyrule93: // {date_sub} + { + lval.item = string(l.val) + return dateSub + } +yyrule94: // {day} + { + lval.item = string(l.val) + return day + } +yyrule95: // {dayname} + { + lval.item = string(l.val) + return dayname + } +yyrule96: // {dayofweek} + { + lval.item = string(l.val) + return dayofweek + } +yyrule97: // {dayofmonth} + { + lval.item = string(l.val) + return dayofmonth + } +yyrule98: // {dayofyear} + { + lval.item = string(l.val) + return dayofyear + } +yyrule99: // {day_hour} + { + lval.item = string(l.val) + return dayHour + } +yyrule100: // {day_microsecond} + { + lval.item = string(l.val) + return dayMicrosecond + } +yyrule101: // {day_minute} + { + lval.item = string(l.val) + return dayMinute + } +yyrule102: // {day_second} + { + lval.item = string(l.val) + return daySecond + } +yyrule103: // {ddl} + { + return ddl + } +yyrule104: // {deallocate} + { + lval.item = string(l.val) + return deallocate + } +yyrule105: // {default} + { + return defaultKwd + } +yyrule106: // {delayed} + { + return delayed + } +yyrule107: // {delay_key_write} + { + lval.item = string(l.val) + return delayKeyWrite + } +yyrule108: // {delete} + { + return deleteKwd + } +yyrule109: // {desc} + { + return desc + } +yyrule110: // {describe} + { + return describe + } +yyrule111: // {drop} + { + return drop + } +yyrule112: // {distinct} + { + return distinct + } +yyrule113: // {div} + { + return div + } +yyrule114: // {do} + { + lval.item = string(l.val) + return do + } +yyrule115: // {dual} + { + return dual + } +yyrule116: // {duplicate} + { + lval.item = string(l.val) + return duplicate + } +yyrule117: // {dynamic} + { + lval.item = string(l.val) + return dynamic + } +yyrule118: // {else} + { + return elseKwd + } +yyrule119: // {end} + { + lval.item = string(l.val) + return end + } +yyrule120: // {engine} + { + lval.item = string(l.val) + return engine + } +yyrule121: // {engines} + { + lval.item = string(l.val) + return engines + } +yyrule122: // {execute} + { + lval.item = string(l.val) + return execute + } +yyrule123: // {enum} + { + return enum + } +yyrule124: // {escape} + { + lval.item = string(l.val) + return escape + } +yyrule125: // {exists} + { + return exists + } +yyrule126: // {explain} + { + return explain + } +yyrule127: // {extract} + { + lval.item = string(l.val) + return extract + } +yyrule128: // {fields} + { + lval.item = string(l.val) + return fields + } +yyrule129: // {first} + { + lval.item = string(l.val) + return first + } +yyrule130: // {fixed} + { + lval.item = string(l.val) + return fixed + } +yyrule131: // {for} + { + return forKwd + } +yyrule132: // {foreign} + { + return foreign + } +yyrule133: // {found_rows} + { + lval.item = string(l.val) + return foundRows + } +yyrule134: // {from} + { + return from + } +yyrule135: // {full} + { + lval.item = string(l.val) + return full + } +yyrule136: // {fulltext} + { + return fulltext + } +yyrule137: // {grant} + { + return grant + } +yyrule138: // {grants} + { + lval.item = string(l.val) + return grants + } +yyrule139: // {group} + { + return group + } +yyrule140: // {group_concat} + { + lval.item = string(l.val) + return groupConcat + } +yyrule141: // {hash} + { + lval.item = string(l.val) + return hash + } +yyrule142: // {having} + { + return having + } +yyrule143: // {high_priority} + { + return highPriority + } +yyrule144: // {hour} + { + lval.item = string(l.val) + return hour + } +yyrule145: // {hour_microsecond} + { + lval.item = string(l.val) + return hourMicrosecond + } +yyrule146: // {hour_minute} + { + lval.item = string(l.val) + return hourMinute + } +yyrule147: // {hour_second} + { + lval.item = string(l.val) + return hourSecond + } +yyrule148: // {identified} + { + lval.item = string(l.val) + return identified + } +yyrule149: // {if} + { + lval.item = string(l.val) + return ifKwd + } +yyrule150: // {ifnull} + { + lval.item = string(l.val) + return ifNull + } +yyrule151: // {ignore} + { + return ignore + } +yyrule152: // {index} + { + return index + } +yyrule153: // {inner} + { + return inner + } +yyrule154: // {insert} + { + return insert + } +yyrule155: // {interval} + { + return interval + } +yyrule156: // {into} + { + return into + } +yyrule157: // {in} + { + return in + } +yyrule158: // {is} + { + return is + } +yyrule159: // {isolation} + { + lval.item = string(l.val) + return isolation + } +yyrule160: // {join} + { + return join + } +yyrule161: // {key} + { + return key + } +yyrule162: // {key_block_size} + { + lval.item = string(l.val) + return keyBlockSize + } +yyrule163: // {leading} + { + return leading + } +yyrule164: // {left} + { + lval.item = string(l.val) + return left + } +yyrule165: // {length} + { + lval.item = string(l.val) + return length + } +yyrule166: // {level} + { + lval.item = string(l.val) + return level + } +yyrule167: // {like} + { + return like + } +yyrule168: // {limit} + { + return limit + } +yyrule169: // {local} + { + lval.item = string(l.val) + return local + } +yyrule170: // {locate} + { + lval.item = string(l.val) + return locate + } +yyrule171: // {lock} + { + return lock + } +yyrule172: // {lower} + { + lval.item = string(l.val) + return lower + } +yyrule173: // {low_priority} + { + return lowPriority + } +yyrule174: // {max} + { + lval.item = string(l.val) + return max + } +yyrule175: // {max_rows} + { + lval.item = string(l.val) + return maxRows + } +yyrule176: // {microsecond} + { + lval.item = string(l.val) + return microsecond + } +yyrule177: // {min} + { + lval.item = string(l.val) + return min + } +yyrule178: // {minute} + { + lval.item = string(l.val) + return minute + } +yyrule179: // {minute_microsecond} + { + lval.item = string(l.val) + return minuteMicrosecond + } +yyrule180: // {minute_second} + { + lval.item = string(l.val) + return minuteSecond + } +yyrule181: // {min_rows} + { + lval.item = string(l.val) + return minRows + } +yyrule182: // {mod} + { + return mod + } +yyrule183: // {mode} + { + lval.item = string(l.val) + return mode + } +yyrule184: // {month} + { + lval.item = string(l.val) + return month + } +yyrule185: // {names} + { + lval.item = string(l.val) + return names + } +yyrule186: // {national} + { + lval.item = string(l.val) + return national + } +yyrule187: // {not} + { + return not + } +yyrule188: // {offset} + { + lval.item = string(l.val) + return offset + } +yyrule189: // {on} + { + return on + } +yyrule190: // {only} + { + lval.item = string(l.val) + return only + } +yyrule191: // {option} + { + return option + } +yyrule192: // {order} + { + return order + } +yyrule193: // {or} + { + return or + } +yyrule194: // {outer} + { + return outer + } +yyrule195: // {password} + { + lval.item = string(l.val) + return password + } +yyrule196: // {pow} + { + lval.item = string(l.val) + return pow + } +yyrule197: // {power} + { + lval.item = string(l.val) + return power + } +yyrule198: // {prepare} + { + lval.item = string(l.val) + return prepare + } +yyrule199: // {primary} + { + return primary + } +yyrule200: // {procedure} + { + return procedure + } +yyrule201: // {quarter} + { + lval.item = string(l.val) + return quarter + } +yyrule202: // {quick} + { + lval.item = string(l.val) + return quick + } +yyrule203: // redundant + { + lval.item = string(l.val) + return redundant + } +yyrule204: // {right} + { + return right + } +yyrule205: // {rollback} + { + lval.item = string(l.val) + return rollback + } +yyrule206: // {row} + { + lval.item = string(l.val) + return row + } +yyrule207: // {row_format} + { + lval.item = string(l.val) + return rowFormat + } +yyrule208: // {schema} + { + lval.item = string(l.val) + return schema + } +yyrule209: // {schemas} + { + return schemas + } +yyrule210: // {serializable} + { + lval.item = string(l.val) + return serializable + } +yyrule211: // {session} + { + lval.item = string(l.val) + return session + } +yyrule212: // {some} + { + lval.item = string(l.val) + return some + } +yyrule213: // {start} + { + lval.item = string(l.val) + return start + } +yyrule214: // {status} + { + lval.item = string(l.val) + return status + } +yyrule215: // {global} + { + lval.item = string(l.val) + return global + } +yyrule216: // {rand} + { + lval.item = string(l.val) + return rand + } +yyrule217: // {read} + { + return read + } +yyrule218: // {repeat} + { + lval.item = string(l.val) + return repeat + } +yyrule219: // {repeatable} + { + lval.item = string(l.val) + return repeatable + } +yyrule220: // {regexp} + { + return regexpKwd + } +yyrule221: // {replace} + { + lval.item = string(l.val) + return replace + } +yyrule222: // {references} + { + return references + } +yyrule223: // {rlike} + { + return rlike + } +yyrule224: // {sys_var} + { + lval.item = string(l.val) + return sysVar + } +yyrule225: // {user_var} + { + lval.item = string(l.val) + return userVar + } +yyrule226: // {second} + { + lval.item = string(l.val) + return second + } +yyrule227: // {second_microsecond} + { + lval.item = string(l.val) + return secondMicrosecond + } +yyrule228: // {select} + { + return selectKwd + } +yyrule229: // {set} + { + return set + } +yyrule230: // {share} + { + return share + } +yyrule231: // {show} + { + return show + } +yyrule232: // {subdate} + { + lval.item = string(l.val) + return subDate + } +yyrule233: // {strcmp} + { + lval.item = string(l.val) + return strcmp + } +yyrule234: // {substr} + { + lval.item = string(l.val) + return substring + } +yyrule235: // {substring} + { + lval.item = string(l.val) + return substring + } +yyrule236: // {substring_index} + { + lval.item = string(l.val) + return substringIndex + } +yyrule237: // {sum} + { + lval.item = string(l.val) + return sum + } +yyrule238: // {sysdate} + { + lval.item = string(l.val) + return sysDate + } +yyrule239: // {table} + { + return tableKwd + } +yyrule240: // {tables} + { + lval.item = string(l.val) + return tables + } +yyrule241: // {then} + { + return then + } +yyrule242: // {to} + { + return to + } +yyrule243: // {trailing} + { + return trailing + } +yyrule244: // {transaction} + { + lval.item = string(l.val) + return transaction + } +yyrule245: // {triggers} + { + lval.item = string(l.val) + return triggers + } +yyrule246: // {trim} + { + lval.item = string(l.val) + return trim + } +yyrule247: // {truncate} + { + lval.item = string(l.val) + return truncate + } +yyrule248: // {uncommitted} + { + lval.item = string(l.val) + return uncommitted + } +yyrule249: // {union} + { + return union + } +yyrule250: // {unique} + { + return unique + } +yyrule251: // {unknown} + { + lval.item = string(l.val) + return unknown + } +yyrule252: // {nullif} + { + lval.item = string(l.val) + return nullIf + } +yyrule253: // {unlock} + { + return unlock + } +yyrule254: // {update} + { + return update + } +yyrule255: // {upper} + { + lval.item = string(l.val) + return upper + } +yyrule256: // {use} + { + return use + } +yyrule257: // {user} + { + lval.item = string(l.val) + return user + } +yyrule258: // {using} + { + return using + } +yyrule259: // {value} + { + lval.item = string(l.val) + return value + } +yyrule260: // {values} + { + return values + } +yyrule261: // {variables} + { + lval.item = string(l.val) + return variables + } +yyrule262: // {version} + { + lval.item = string(l.val) + return version + } +yyrule263: // {warnings} + { + lval.item = string(l.val) + return warnings + } +yyrule264: // {week} + { + lval.item = string(l.val) + return week + } +yyrule265: // {weekday} + { + lval.item = string(l.val) + return weekday + } +yyrule266: // {weekofyear} + { + lval.item = string(l.val) + return weekofyear + } +yyrule267: // {when} + { + return when + } +yyrule268: // {where} + { + return where + } +yyrule269: // {write} + { + return write + } +yyrule270: // {xor} + { + return xor + } +yyrule271: // {yearweek} + { + lval.item = string(l.val) + return yearweek + } +yyrule272: // {year_month} + { + lval.item = string(l.val) + return yearMonth + + } +yyrule273: // {signed} + { + lval.item = string(l.val) + return signed + } +yyrule274: // {unsigned} + { + return unsigned + } +yyrule275: // {zerofill} + { + return zerofill + } +yyrule276: // {null} + { + lval.item = nil + return null + } +yyrule277: // {false} + { + return falseKwd + } +yyrule278: // {true} + { + return trueKwd + } +yyrule279: // {calc_found_rows} + { + lval.item = string(l.val) + return calcFoundRows + } +yyrule280: // {current_ts} + { + lval.item = string(l.val) + return currentTs + } +yyrule281: // {localtime} + { + return localTime + } +yyrule282: // {localts} + { + return localTs + } +yyrule283: // {now} + { + lval.item = string(l.val) + return now + } +yyrule284: // {bit} + { + lval.item = string(l.val) + return bitType + } +yyrule285: // {tiny} + { + lval.item = string(l.val) + return tinyIntType + } +yyrule286: // {tinyint} + { + lval.item = string(l.val) + return tinyIntType + } +yyrule287: // {smallint} + { + lval.item = string(l.val) + return smallIntType + } +yyrule288: // {mediumint} + { + lval.item = string(l.val) + return mediumIntType + } +yyrule289: // {bigint} + { + lval.item = string(l.val) + return bigIntType + } +yyrule290: // {decimal} + { + lval.item = string(l.val) + return decimalType + } +yyrule291: // {numeric} + { + lval.item = string(l.val) + return numericType + } +yyrule292: // {float} + { + lval.item = string(l.val) + return floatType + } +yyrule293: // {double} + { + lval.item = string(l.val) + return doubleType + } +yyrule294: // {precision} + { + lval.item = string(l.val) + return precisionType + } +yyrule295: // {real} + { + lval.item = string(l.val) + return realType + } +yyrule296: // {date} + { + lval.item = string(l.val) + return dateType + } +yyrule297: // {time} + { + lval.item = string(l.val) + return timeType + } +yyrule298: // {timestamp} + { + lval.item = string(l.val) + return timestampType + } +yyrule299: // {datetime} + { + lval.item = string(l.val) + return datetimeType + } +yyrule300: // {year} + { + lval.item = string(l.val) + return yearType + } +yyrule301: // {char} + { + lval.item = string(l.val) + return charType + } +yyrule302: // {varchar} + { + lval.item = string(l.val) + return varcharType + } +yyrule303: // {binary} + { + lval.item = string(l.val) + return binaryType + } +yyrule304: // {varbinary} + { + lval.item = string(l.val) + return varbinaryType + } +yyrule305: // {tinyblob} + { + lval.item = string(l.val) + return tinyblobType + } +yyrule306: // {blob} + { + lval.item = string(l.val) + return blobType + } +yyrule307: // {mediumblob} + { + lval.item = string(l.val) + return mediumblobType + } +yyrule308: // {longblob} + { + lval.item = string(l.val) + return longblobType + } +yyrule309: // {tinytext} + { + lval.item = string(l.val) + return tinytextType + } +yyrule310: // {mediumtext} + { + lval.item = string(l.val) + return mediumtextType + } +yyrule311: // {text} + { + lval.item = string(l.val) + return textType + } +yyrule312: // {longtext} + { + lval.item = string(l.val) + return longtextType + } +yyrule313: // {bool} + { + lval.item = string(l.val) + return boolType + } +yyrule314: // {boolean} + { + lval.item = string(l.val) + return booleanType + } +yyrule315: // {byte} + { + lval.item = string(l.val) + return byteType + } +yyrule316: // {int} + { + lval.item = string(l.val) + return intType + } +yyrule317: // {integer} + { + lval.item = string(l.val) + return integerType + } +yyrule318: // {ident} + { + lval.item = string(l.val) + return l.handleIdent(lval) + } +yyrule319: // . + { + return c0 + } + panic("unreachable") + + goto yyabort // silence unused label error + +yyabort: // no lexem recognized + return int(unicode.ReplacementChar) +} + +func (l *lexer) npos() (line, col int) { + if line, col = l.nline, l.ncol; col == 0 { + line-- + col = l.lcol + 1 + } + return +} + +func (l *lexer) str(lval *yySymType, pref string) int { + l.sc = 0 + // TODO: performance issue. + s := string(l.stringLit) + l.stringLit = l.stringLit[0:0] + if pref == "'" { + s = strings.Replace(s, "\\'", "'", -1) + s = strings.TrimSuffix(s, "'") + "\"" + pref = "\"" + } + v := stringutil.RemoveUselessBackslash(pref + s) + v, err := strconv.Unquote(v) + if err != nil { + v = strings.TrimSuffix(s, pref) + } + lval.item = v + return stringLit +} + +func (l *lexer) trimIdent(idt string) string { + idt = strings.TrimPrefix(idt, "`") + idt = strings.TrimSuffix(idt, "`") + return idt +} + +func (l *lexer) int(lval *yySymType) int { + n, err := strconv.ParseUint(string(l.val), 0, 64) + if err != nil { + l.errf("integer literal: %v", err) + return int(unicode.ReplacementChar) + } + + switch { + case n < math.MaxInt64: + lval.item = int64(n) + default: + lval.item = uint64(n) + } + return intLit +} + +func (l *lexer) float(lval *yySymType) int { + n, err := strconv.ParseFloat(string(l.val), 64) + if err != nil { + l.errf("float literal: %v", err) + return int(unicode.ReplacementChar) + } + + lval.item = float64(n) + return floatLit +} + +// https://dev.mysql.com/doc/refman/5.7/en/hexadecimal-literals.html +func (l *lexer) hex(lval *yySymType) int { + s := string(l.val) + h, err := mysql.ParseHex(s) + if err != nil { + l.errf("hexadecimal literal: %v", err) + return int(unicode.ReplacementChar) + } + lval.item = h + return hexLit +} + +// https://dev.mysql.com/doc/refman/5.7/en/bit-type.html +func (l *lexer) bit(lval *yySymType) int { + s := string(l.val) + b, err := mysql.ParseBit(s, -1) + if err != nil { + l.errf("bit literal: %v", err) + return int(unicode.ReplacementChar) + } + lval.item = b + return bitLit +} + +func (l *lexer) handleIdent(lval *yySymType) int { + s := lval.item.(string) + // A character string literal may have an optional character set introducer and COLLATE clause: + // [_charset_name]'string' [COLLATE collation_name] + // See: https://dev.mysql.com/doc/refman/5.7/en/charset-literal.html + if !strings.HasPrefix(s, "_") { + return identifier + } + cs, _, err := charset.GetCharsetInfo(s[1:]) + if err != nil { + return identifier + } + lval.item = cs + return underscoreCS +} diff --git a/vendor/github.com/pingcap/tidb/parser/scanner.l b/vendor/github.com/pingcap/tidb/parser/scanner.l new file mode 100644 index 000000000..a322b4080 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/parser/scanner.l @@ -0,0 +1,1259 @@ +%{ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +import ( + "fmt" + "math" + "strconv" + "strings" + "unicode" + + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/util/charset" + "github.com/pingcap/tidb/util/stringutil" +) + +type lexer struct { + c int + col int + errs []error + expr ast.ExprNode + i int + inj int + lcol int + line int + list []ast.StmtNode + ncol int + nline int + sc int + src string + val []byte + ungetBuf []byte + root bool + prepare bool + stmtStartPos int + stringLit []byte + + // record token's offset of the input + tokenEndOffset int + tokenStartOffset int + + // Charset information + charset string + collation string +} + + +// NewLexer builds a new lexer. +func NewLexer(src string) (l *lexer) { + l = &lexer{ + src: src, + nline: 1, + ncol: 0, + } + l.next() + return +} + +func (l *lexer) Errors() []error { + return l.errs +} + +func (l *lexer) Stmts() []ast.StmtNode { + return l.list +} + +func (l *lexer) Expr() ast.ExprNode { + return l.expr +} + +func (l *lexer) Inj() int { + return l.inj +} + +func (l *lexer) SetInj(inj int) { + l.inj = inj +} + +func (l *lexer) SetPrepare() { + l.prepare = true +} + +func (l *lexer) IsPrepare() bool { + return l.prepare +} + +func (l *lexer) Root() bool { + return l.root +} + +func (l *lexer) SetRoot(root bool) { + l.root = root +} + +func (l *lexer) SetCharsetInfo(charset, collation string) { + l.charset = charset + l.collation = collation +} + +func (l *lexer) GetCharsetInfo() (string, string) { + return l.charset, l.collation +} + +// The select statement is not at the end of the whole statement, if the last +// field text was set from its offset to the end of the src string, update +// the last field text. +func (l *lexer) SetLastSelectFieldText(st *ast.SelectStmt, lastEnd int) { + lastField := st.Fields.Fields[len(st.Fields.Fields)-1] + if lastField.Offset + len(lastField.Text()) >= len(l.src)-1 { + lastField.SetText(l.src[lastField.Offset:lastEnd]) + } +} + +func (l *lexer) startOffset(offset int) int { + offset-- + for unicode.IsSpace(rune(l.src[offset])) { + offset++ + } + return offset +} + +func (l *lexer) endOffset(offset int) int { + offset-- + for offset > 0 && unicode.IsSpace(rune(l.src[offset-1])) { + offset-- + } + return offset +} + +func (l *lexer) unget(b byte) { + l.ungetBuf = append(l.ungetBuf, b) + l.i-- + l.ncol-- + l.tokenEndOffset-- +} + +func (l *lexer) next() int { + if un := len(l.ungetBuf); un > 0 { + nc := l.ungetBuf[0] + l.ungetBuf = l.ungetBuf[1:] + l.c = int(nc) + return l.c + } + + if l.c != 0 { + l.val = append(l.val, byte(l.c)) + } + l.c = 0 + if l.i < len(l.src) { + l.c = int(l.src[l.i]) + l.i++ + } + switch l.c { + case '\n': + l.lcol = l.ncol + l.nline++ + l.ncol = 0 + default: + l.ncol++ + } + l.tokenEndOffset++ + return l.c +} + +func (l *lexer) err0(ln, c int, arg interface{}) { + var argStr string + if arg != nil { + argStr = fmt.Sprintf(" %v", arg) + } + + err := fmt.Errorf("line %d column %d near \"%s\"%s", ln, c, l.val, argStr) + l.errs = append(l.errs, err) +} + +func (l *lexer) err(arg interface{}) { + l.err0(l.line, l.col, arg) +} + +func (l *lexer) errf(format string, args ...interface{}) { + s := fmt.Sprintf(format, args...) + l.err0(l.line, l.col, s) +} + +func (l *lexer) Error(s string) { + // Notice: ignore origin error info. + l.err(nil) +} + +func (l *lexer) stmtText() string { + endPos := l.i + if l.src[l.i-1] == '\n' { + endPos = l.i-1 // trim new line + } + if l.src[l.stmtStartPos] == '\n' { + l.stmtStartPos++ + } + + text := l.src[l.stmtStartPos:endPos] + + l.stmtStartPos = l.i + return text +} + + +func (l *lexer) Lex(lval *yySymType) (r int) { + defer func() { + lval.line, lval.col, lval.offset = l.line, l.col, l.tokenStartOffset + l.tokenStartOffset = l.tokenEndOffset + }() + const ( + INITIAL = iota + S1 + S2 + S3 + S4 + ) + + if n := l.inj; n != 0 { + l.inj = 0 + return n + } + + c0, c := 0, l.c +%} + +int_lit {decimal_lit}|{octal_lit} +decimal_lit [1-9][0-9]* +octal_lit 0[0-7]* +hex_lit 0[xX][0-9a-fA-F]+|[xX]"'"[0-9a-fA-F]+"'" +bit_lit 0[bB][01]+|[bB]"'"[01]+"'" + +float_lit {D}"."{D}?{E}?|{D}{E}|"."{D}{E}? +D [0-9]+ +E [eE][-+]?[0-9]+ + +imaginary_ilit {D}i +imaginary_lit {float_lit}i + +a [aA] +b [bB] +c [cC] +d [dD] +e [eE] +f [fF] +g [gG] +h [hH] +i [iI] +j [jJ] +k [kK] +l [lL] +m [mM] +n [nN] +o [oO] +p [pP] +q [qQ] +r [rR] +s [sS] +t [tT] +u [uU] +v [vV] +w [wW] +x [xX] +y [yY] +z [zZ] + +abs {a}{b}{s} +add {a}{d}{d} +adddate {a}{d}{d}{d}{a}{t}{e} +admin {a}{d}{m}{i}{n} +after {a}{f}{t}{e}{r} +all {a}{l}{l} +alter {a}{l}{t}{e}{r} +and {a}{n}{d} +any {a}{n}{y} +as {a}{s} +asc {a}{s}{c} +auto_increment {a}{u}{t}{o}_{i}{n}{c}{r}{e}{m}{e}{n}{t} +avg {a}{v}{g} +avg_row_length {a}{v}{g}_{r}{o}{w}_{l}{e}{n}{g}{t}{h} +begin {b}{e}{g}{i}{n} +between {b}{e}{t}{w}{e}{e}{n} +both {b}{o}{t}{h} +btree {b}{t}{r}{e}{e} +by {b}{y} +case {c}{a}{s}{e} +cast {c}{a}{s}{t} +character {c}{h}{a}{r}{a}{c}{t}{e}{r} +charset {c}{h}{a}{r}{s}{e}{t} +check {c}{h}{e}{c}{k} +checksum {c}{h}{e}{c}{k}{s}{u}{m} +coalesce {c}{o}{a}{l}{e}{s}{c}{e} +collate {c}{o}{l}{l}{a}{t}{e} +collation {c}{o}{l}{l}{a}{t}{i}{o}{n} +column {c}{o}{l}{u}{m}{n} +columns {c}{o}{l}{u}{m}{n}{s} +comment {c}{o}{m}{m}{e}{n}{t} +commit {c}{o}{m}{m}{i}{t} +committed {c}{o}{m}{m}{i}{t}{t}{e}{d} +compact {c}{o}{m}{p}{a}{c}{t} +compressed {c}{o}{m}{p}{r}{e}{s}{s}{e}{d} +compression {c}{o}{m}{p}{r}{e}{s}{s}{i}{o}{n} +concat {c}{o}{n}{c}{a}{t} +concat_ws {c}{o}{n}{c}{a}{t}_{w}{s} +connection {c}{o}{n}{n}{e}{c}{t}{i}{o}{n} +connection_id {c}{o}{n}{n}{e}{c}{t}{i}{o}{n}_{i}{d} +constraint {c}{o}{n}{s}{t}{r}{a}{i}{n}{t} +convert {c}{o}{n}{v}{e}{r}{t} +count {c}{o}{u}{n}{t} +create {c}{r}{e}{a}{t}{e} +cross {c}{r}{o}{s}{s} +curdate {c}{u}{r}{d}{a}{t}{e} +current_date {c}{u}{r}{r}{e}{n}{t}_{d}{a}{t}{e} +curtime {c}{u}{r}{t}{i}{m}{e} +current_time {c}{u}{r}{r}{e}{n}{t}_{t}{i}{m}{e} +current_user {c}{u}{r}{r}{e}{n}{t}_{u}{s}{e}{r} +database {d}{a}{t}{a}{b}{a}{s}{e} +databases {d}{a}{t}{a}{b}{a}{s}{e}{s} +date_add {d}{a}{t}{e}_{a}{d}{d} +date_sub {d}{a}{t}{e}_{s}{u}{b} +day {d}{a}{y} +dayname {d}{a}{y}{n}{a}{m}{e} +dayofweek {d}{a}{y}{o}{f}{w}{e}{e}{k} +dayofmonth {d}{a}{y}{o}{f}{m}{o}{n}{t}{h} +dayofyear {d}{a}{y}{o}{f}{y}{e}{a}{r} +ddl {d}{d}{l} +deallocate {d}{e}{a}{l}{l}{o}{c}{a}{t}{e} +default {d}{e}{f}{a}{u}{l}{t} +delayed {d}{e}{l}{a}{y}{e}{d} +delay_key_write {d}{e}{l}{a}{y}_{k}{e}{y}_{w}{r}{i}{t}{e} +delete {d}{e}{l}{e}{t}{e} +drop {d}{r}{o}{p} +desc {d}{e}{s}{c} +describe {d}{e}{s}{c}{r}{i}{b}{e} +distinct {d}{i}{s}{t}{i}{n}{c}{t} +div {d}{i}{v} +do {d}{o} +dual {d}{u}{a}{l} +duplicate {d}{u}{p}{l}{i}{c}{a}{t}{e} +dynamic {d}{y}{n}{a}{m}{i}{c} +else {e}{l}{s}{e} +end {e}{n}{d} +engine {e}{n}{g}{i}{n}{e} +engines {e}{n}{g}{i}{n}{e}{s} +escape {e}{s}{c}{a}{p}{e} +execute {e}{x}{e}{c}{u}{t}{e} +exists {e}{x}{i}{s}{t}{s} +explain {e}{x}{p}{l}{a}{i}{n} +extract {e}{x}{t}{r}{a}{c}{t} +fields {f}{i}{e}{l}{d}{s} +first {f}{i}{r}{s}{t} +fixed {f}{i}{x}{e}{d} +for {f}{o}{r} +foreign {f}{o}{r}{e}{i}{g}{n} +found_rows {f}{o}{u}{n}{d}_{r}{o}{w}{s} +from {f}{r}{o}{m} +full {f}{u}{l}{l} +fulltext {f}{u}{l}{l}{t}{e}{x}{t} +global {g}{l}{o}{b}{a}{l} +grant {g}{r}{a}{n}{t} +grants {g}{r}{a}{n}{t}{s} +group {g}{r}{o}{u}{p} +group_concat {g}{r}{o}{u}{p}_{c}{o}{n}{c}{a}{t} +hash {h}{a}{s}{h} +having {h}{a}{v}{i}{n}{g} +high_priority {h}{i}{g}{h}_{p}{r}{i}{o}{r}{i}{t}{y} +hour {h}{o}{u}{r} +identified {i}{d}{e}{n}{t}{i}{f}{i}{e}{d} +if {i}{f} +ifnull {i}{f}{n}{u}{l}{l} +ignore {i}{g}{n}{o}{r}{e} +in {i}{n} +index {i}{n}{d}{e}{x} +inner {i}{n}{n}{e}{r} +insert {i}{n}{s}{e}{r}{t} +interval {i}{n}{t}{e}{r}{v}{a}{l} +into {i}{n}{t}{o} +is {i}{s} +isolation {i}{s}{o}{l}{a}{t}{i}{o}{n} +join {j}{o}{i}{n} +key {k}{e}{y} +key_block_size {k}{e}{y}_{b}{l}{o}{c}{k}_{s}{i}{z}{e} +leading {l}{e}{a}{d}{i}{n}{g} +left {l}{e}{f}{t} +length {l}{e}{n}{g}{t}{h} +level {l}{e}{v}{e}{l} +like {l}{i}{k}{e} +limit {l}{i}{m}{i}{t} +local {l}{o}{c}{a}{l} +locate {l}{o}{c}{a}{t}{e} +lock {l}{o}{c}{k} +lower {l}{o}{w}{e}{r} +low_priority {l}{o}{w}_{p}{r}{i}{o}{r}{i}{t}{y} +max_rows {m}{a}{x}_{r}{o}{w}{s} +microsecond {m}{i}{c}{r}{o}{s}{e}{c}{o}{n}{d} +minute {m}{i}{n}{u}{t}{e} +min_rows {m}{i}{n}_{r}{o}{w}{s} +mod {m}{o}{d} +mode {m}{o}{d}{e} +month {m}{o}{n}{t}{h} +names {n}{a}{m}{e}{s} +national {n}{a}{t}{i}{o}{n}{a}{l} +not {n}{o}{t} +offset {o}{f}{f}{s}{e}{t} +on {o}{n} +only {o}{n}{l}{y} +option {o}{p}{t}{i}{o}{n} +or {o}{r} +order {o}{r}{d}{e}{r} +outer {o}{u}{t}{e}{r} +password {p}{a}{s}{s}{w}{o}{r}{d} +pow {p}{o}{w} +power {p}{o}{w}{e}{r} +prepare {p}{r}{e}{p}{a}{r}{e} +primary {p}{r}{i}{m}{a}{r}{y} +procedure {p}{r}{o}{c}{e}{d}{u}{r}{e} +quarter {q}{u}{a}{r}{t}{e}{r} +quick {q}{u}{i}{c}{k} +rand {r}{a}{n}{d} +read {r}{e}{a}{d} +repeat {r}{e}{p}{e}{a}{t} +repeatable {r}{e}{p}{e}{a}{t}{a}{b}{l}{e} +references {r}{e}{f}{e}{r}{e}{n}{c}{e}{s} +regexp {r}{e}{g}{e}{x}{p} +replace {r}{e}{p}{l}{a}{c}{e} +redundant {r}{e}{d}{u}{n}{d}{a}{n}{t} +right {r}{i}{g}{h}{t} +rlike {r}{l}{i}{k}{e} +rollback {r}{o}{l}{l}{b}{a}{c}{k} +row {r}{o}{w} +row_format {r}{o}{w}_{f}{o}{r}{m}{a}{t} +schema {s}{c}{h}{e}{m}{a} +schemas {s}{c}{h}{e}{m}{a}{s} +second {s}{e}{c}{o}{n}{d} +select {s}{e}{l}{e}{c}{t} +serializable {s}{e}{r}{i}{a}{l}{i}{z}{a}{b}{l}{e} +session {s}{e}{s}{s}{i}{o}{n} +set {s}{e}{t} +share {s}{h}{a}{r}{e} +show {s}{h}{o}{w} +some {s}{o}{m}{e} +start {s}{t}{a}{r}{t} +status {s}{t}{a}{t}{u}{s} +subdate {s}{u}{b}{d}{a}{t}{e} +strcmp {s}{t}{r}{c}{m}{p} +substr {s}{u}{b}{s}{t}{r} +substring {s}{u}{b}{s}{t}{r}{i}{n}{g} +substring_index {s}{u}{b}{s}{t}{r}{i}{n}{g}_{i}{n}{d}{e}{x} +sum {s}{u}{m} +sysdate {s}{y}{s}{d}{a}{t}{e} +table {t}{a}{b}{l}{e} +tables {t}{a}{b}{l}{e}{s} +then {t}{h}{e}{n} +to {t}{o} +trailing {t}{r}{a}{i}{l}{i}{n}{g} +transaction {t}{r}{a}{n}{s}{a}{c}{t}{i}{o}{n} +triggers {t}{r}{i}{g}{g}{e}{r}{s} +trim {t}{r}{i}{m} +truncate {t}{r}{u}{n}{c}{a}{t}{e} +max {m}{a}{x} +min {m}{i}{n} +uncommitted {u}{n}{c}{o}{m}{m}{i}{t}{t}{e}{d} +unknown {u}{n}{k}{n}{o}{w}{n} +union {u}{n}{i}{o}{n} +unique {u}{n}{i}{q}{u}{e} +unlock {u}{n}{l}{o}{c}{k} +nullif {n}{u}{l}{l}{i}{f} +update {u}{p}{d}{a}{t}{e} +upper {u}{p}{p}{e}{r} +value {v}{a}{l}{u}{e} +values {v}{a}{l}{u}{e}{s} +variables {v}{a}{r}{i}{a}{b}{l}{e}{s} +version {v}{e}{r}{s}{i}{o}{n} +warnings {w}{a}{r}{n}{i}{n}{g}{s} +week {w}{e}{e}{k} +weekday {w}{e}{e}{k}{d}{a}{y} +weekofyear {w}{e}{e}{k}{o}{f}{y}{e}{a}{r} +where {w}{h}{e}{r}{e} +when {w}{h}{e}{n} +write {w}{r}{i}{t}{e} +xor {x}{o}{r} +yearweek {y}{e}{a}{r}{w}{e}{e}{k} + +null {n}{u}{l}{l} +false {f}{a}{l}{s}{e} +true {t}{r}{u}{e} + +calc_found_rows {s}{q}{l}_{c}{a}{l}{c}_{f}{o}{u}{n}{d}_{r}{o}{w}{s} + +current_ts {c}{u}{r}{r}{e}{n}{t}_{t}{i}{m}{e}{s}{t}{a}{m}{p} +localtime {l}{o}{c}{a}{l}{t}{i}{m}{e} +localts {l}{o}{c}{a}{l}{t}{i}{m}{e}{s}{t}{a}{m}{p} +now {n}{o}{w} + +bit {b}{i}{t} +tiny {t}{i}{n}{y} +tinyint {t}{i}{n}{y}{i}{n}{t} +smallint {s}{m}{a}{l}{l}{i}{n}{t} +mediumint {m}{e}{d}{i}{u}{m}{i}{n}{t} +int {i}{n}{t} +integer {i}{n}{t}{e}{g}{e}{r} +bigint {b}{i}{g}{i}{n}{t} +real {r}{e}{a}{l} +double {d}{o}{u}{b}{l}{e} +float {f}{l}{o}{a}{t} +decimal {d}{e}{c}{i}{m}{a}{l} +numeric {n}{u}{m}{e}{r}{i}{c} +date {d}{a}{t}{e} +time {t}{i}{m}{e} +timestamp {t}{i}{m}{e}{s}{t}{a}{m}{p} +datetime {d}{a}{t}{e}{t}{i}{m}{e} +year {y}{e}{a}{r} +char {c}{h}{a}{r} +varchar {v}{a}{r}{c}{h}{a}{r} +binary {b}{i}{n}{a}{r}{y} +varbinary {v}{a}{r}{b}{i}{n}{a}{r}{y} +tinyblob {t}{i}{n}{y}{b}{l}{o}{b} +blob {b}{l}{o}{b} +mediumblob {m}{e}{d}{i}{u}{m}{b}{l}{o}{b} +longblob {l}{o}{n}{g}{b}{l}{o}{b} +tinytext {t}{i}{n}{y}{t}{e}{x}{t} +text {t}{e}{x}{t} +mediumtext {m}{e}{d}{i}{u}{m}{t}{e}{x}{t} +longtext {l}{o}{n}{g}{t}{e}{x}{t} +enum {e}{n}{u}{m} +precision {p}{r}{e}{c}{i}{s}{i}{o}{n} + +signed {s}{i}{g}{n}{e}{d} +unsigned {u}{n}{s}{i}{g}{n}{e}{d} +zerofill {z}{e}{r}{o}{f}{i}{l}{l} + +bigrat {b}{i}{g}{r}{a}{t} +bool {b}{o}{o}{l} +boolean {b}{o}{o}{l}{e}{a}{n} +byte {b}{y}{t}{e} +duration {d}{u}{r}{a}{t}{i}{o}{n} +rune {r}{u}{n}{e} +string {s}{t}{r}{i}{n}{g} +use {u}{s}{e} +user {u}{s}{e}{r} +using {u}{s}{i}{n}{g} + +idchar0 [a-zA-Z_] +idchars {idchar0}|[0-9$] // See: https://dev.mysql.com/doc/refman/5.7/en/identifiers.html +ident {idchar0}{idchars}* + +user_var "@"{ident} +sys_var "@@"(({global}".")|({session}".")|{local}".")?{ident} + +second_microsecond {s}{e}{c}{o}{n}{d}_{m}{i}{c}{r}{o}{s}{e}{c}{o}{n}{d} +minute_microsecond {m}{i}{n}{u}{t}{e}_{m}{i}{c}{r}{o}{s}{e}{c}{o}{n}{d} +minute_second {m}{i}{n}{u}{t}{e}_{s}{e}{c}{o}{n}{d} +hour_microsecond {h}{o}{u}{r}_{m}{i}{c}{r}{o}{s}{e}{c}{o}{n}{d} +hour_second {h}{o}{u}{r}_{s}{e}{c}{o}{n}{d} +hour_minute {h}{o}{u}{r}_{m}{i}{n}{u}{t}{e} +day_microsecond {d}{a}{y}_{m}{i}{c}{r}{o}{s}{e}{c}{o}{n}{d} +day_second {d}{a}{y}_{s}{e}{c}{o}{n}{d} +day_minute {d}{a}{y}_{m}{i}{n}{u}{t}{e} +day_hour {d}{a}{y}_{h}{o}{u}{r} +year_month {y}{e}{a}{r}_{m}{o}{n}{t}{h} + +%yyc c +%yyn c = l.next() +%yyt l.sc + +%x S1 S2 S3 S4 + +%% + l.val = l.val[:0] + c0, l.line, l.col = l.c, l.nline, l.ncol + +<*>\0 return 0 + +[ \t\n\r]+ +#.* +\/\/.* +\/\*([^*]|\*+[^*/])*\*+\/ +-- l.sc = S3 +[ \t]+.* {l.sc = 0} +[^ \t] { + l.sc = 0 + l.c = '-' + n := len(l.val) + l.unget(l.val[n-1]) + return '-' + } + +{int_lit} return l.int(lval) +{float_lit} return l.float(lval) +{hex_lit} return l.hex(lval) +{bit_lit} return l.bit(lval) + +\" l.sc = S1 +' l.sc = S2 +` l.sc = S4 + +[^\"\\]* l.stringLit = append(l.stringLit, l.val...) +\\. l.stringLit = append(l.stringLit, l.val...) +\"\" l.stringLit = append(l.stringLit, '"') +\" l.stringLit = append(l.stringLit, '"') + l.sc = 0 + return l.str(lval, "\"") +[^'\\]* l.stringLit = append(l.stringLit, l.val...) +\\. l.stringLit = append(l.stringLit, l.val...) +'' l.stringLit = append(l.stringLit, '\'') +' l.stringLit = append(l.stringLit, '\'') + l.sc = 0 + return l.str(lval, "'") +[^`]* l.stringLit = append(l.stringLit, l.val...) +`` l.stringLit = append(l.stringLit, '`') +` l.sc = 0 + lval.item = string(l.stringLit) + l.stringLit = l.stringLit[0:0] + return identifier + +"&&" return andand +"&^" return andnot +"<<" return lsh +"<=" return le +"=" return eq +">=" return ge +"!=" return neq +"<>" return neq +"||" return oror +">>" return rsh +"<=>" return nulleq + +"@" return at +"?" return placeholder + +{abs} lval.item = string(l.val) + return abs +{add} return add +{adddate} lval.item = string(l.val) + return addDate +{admin} lval.item = string(l.val) + return admin +{after} lval.item = string(l.val) + return after +{all} return all +{alter} return alter +{and} return and +{any} lval.item = string(l.val) + return any +{asc} return asc +{as} return as +{auto_increment} lval.item = string(l.val) + return autoIncrement +{avg} lval.item = string(l.val) + return avg +{avg_row_length} lval.item = string(l.val) + return avgRowLength +{begin} lval.item = string(l.val) + return begin +{between} return between +{both} return both +{btree} lval.item = string(l.val) + return btree +{by} return by +{case} return caseKwd +{cast} lval.item = string(l.val) + return cast +{character} return character +{charset} lval.item = string(l.val) + return charsetKwd +{check} return check +{checksum} lval.item = string(l.val) + return checksum +{coalesce} lval.item = string(l.val) + return coalesce +{collate} return collate +{collation} lval.item = string(l.val) + return collation +{column} return column +{columns} lval.item = string(l.val) + return columns +{comment} lval.item = string(l.val) + return comment +{commit} lval.item = string(l.val) + return commit +{committed} lval.item = string(l.val) + return committed +{compact} lval.item = string(l.val) + return compact +{compressed} lval.item = string(l.val) + return compressed +{compression} lval.item = string(l.val) + return compression +{concat} lval.item = string(l.val) + return concat +{concat_ws} lval.item = string(l.val) + return concatWs +{connection} lval.item = string(l.val) + return connection +{connection_id} lval.item = string(l.val) + return connectionID +{constraint} return constraint +{convert} lval.item = string(l.val) + return convert +{count} lval.item = string(l.val) + return count +{create} return create +{cross} return cross +{curdate} lval.item = string(l.val) + return curDate +{current_date} lval.item = string(l.val) + return currentDate +{curtime} lval.item = string(l.val) + return curTime +{current_time} lval.item = string(l.val) + return currentTime +{current_user} lval.item = string(l.val) + return currentUser +{database} lval.item = string(l.val) + return database +{databases} return databases +{date_add} lval.item = string(l.val) + return dateAdd +{date_sub} lval.item = string(l.val) + return dateSub +{day} lval.item = string(l.val) + return day +{dayname} lval.item = string(l.val) + return dayname +{dayofweek} lval.item = string(l.val) + return dayofweek +{dayofmonth} lval.item = string(l.val) + return dayofmonth +{dayofyear} lval.item = string(l.val) + return dayofyear +{day_hour} lval.item = string(l.val) + return dayHour +{day_microsecond} lval.item = string(l.val) + return dayMicrosecond +{day_minute} lval.item = string(l.val) + return dayMinute +{day_second} lval.item = string(l.val) + return daySecond +{ddl} return ddl +{deallocate} lval.item = string(l.val) + return deallocate +{default} return defaultKwd +{delayed} return delayed +{delay_key_write} lval.item = string(l.val) + return delayKeyWrite +{delete} return deleteKwd +{desc} return desc +{describe} return describe +{drop} return drop +{distinct} return distinct +{div} return div +{do} lval.item = string(l.val) + return do +{dual} return dual +{duplicate} lval.item = string(l.val) + return duplicate +{dynamic} lval.item = string(l.val) + return dynamic +{else} return elseKwd +{end} lval.item = string(l.val) + return end +{engine} lval.item = string(l.val) + return engine +{engines} lval.item = string(l.val) + return engines +{execute} lval.item = string(l.val) + return execute +{enum} return enum +{escape} lval.item = string(l.val) + return escape +{exists} return exists +{explain} return explain +{extract} lval.item = string(l.val) + return extract +{fields} lval.item = string(l.val) + return fields +{first} lval.item = string(l.val) + return first +{fixed} lval.item = string(l.val) + return fixed +{for} return forKwd +{foreign} return foreign +{found_rows} lval.item = string(l.val) + return foundRows +{from} return from +{full} lval.item = string(l.val) + return full +{fulltext} return fulltext +{grant} return grant +{grants} lval.item = string(l.val) + return grants +{group} return group +{group_concat} lval.item = string(l.val) + return groupConcat +{hash} lval.item = string(l.val) + return hash +{having} return having +{high_priority} return highPriority +{hour} lval.item = string(l.val) + return hour +{hour_microsecond} lval.item = string(l.val) + return hourMicrosecond +{hour_minute} lval.item = string(l.val) + return hourMinute +{hour_second} lval.item = string(l.val) + return hourSecond +{identified} lval.item = string(l.val) + return identified +{if} lval.item = string(l.val) + return ifKwd +{ifnull} lval.item = string(l.val) + return ifNull +{ignore} return ignore +{index} return index +{inner} return inner +{insert} return insert +{interval} return interval +{into} return into +{in} return in +{is} return is +{isolation} lval.item = string(l.val) + return isolation +{join} return join +{key} return key +{key_block_size} lval.item = string(l.val) + return keyBlockSize +{leading} return leading +{left} lval.item = string(l.val) + return left +{length} lval.item = string(l.val) + return length +{level} lval.item = string(l.val) + return level +{like} return like +{limit} return limit +{local} lval.item = string(l.val) + return local +{locate} lval.item = string(l.val) + return locate +{lock} return lock +{lower} lval.item = string(l.val) + return lower +{low_priority} return lowPriority +{max} lval.item = string(l.val) + return max +{max_rows} lval.item = string(l.val) + return maxRows +{microsecond} lval.item = string(l.val) + return microsecond +{min} lval.item = string(l.val) + return min +{minute} lval.item = string(l.val) + return minute +{minute_microsecond} lval.item = string(l.val) + return minuteMicrosecond +{minute_second} lval.item = string(l.val) + return minuteSecond +{min_rows} lval.item = string(l.val) + return minRows +{mod} return mod +{mode} lval.item = string(l.val) + return mode +{month} lval.item = string(l.val) + return month +{names} lval.item = string(l.val) + return names +{national} lval.item = string(l.val) + return national +{not} return not +{offset} lval.item = string(l.val) + return offset +{on} return on +{only} lval.item = string(l.val) + return only +{option} return option +{order} return order +{or} return or +{outer} return outer +{password} lval.item = string(l.val) + return password +{pow} lval.item = string(l.val) + return pow +{power} lval.item = string(l.val) + return power +{prepare} lval.item = string(l.val) + return prepare +{primary} return primary +{procedure} return procedure +{quarter} lval.item = string(l.val) + return quarter +{quick} lval.item = string(l.val) + return quick +redundant lval.item = string(l.val) + return redundant +{right} return right +{rollback} lval.item = string(l.val) + return rollback +{row} lval.item = string(l.val) + return row +{row_format} lval.item = string(l.val) + return rowFormat +{schema} lval.item = string(l.val) + return schema +{schemas} return schemas +{serializable} lval.item = string(l.val) + return serializable +{session} lval.item = string(l.val) + return session +{some} lval.item = string(l.val) + return some +{start} lval.item = string(l.val) + return start +{status} lval.item = string(l.val) + return status +{global} lval.item = string(l.val) + return global +{rand} lval.item = string(l.val) + return rand +{read} return read +{repeat} lval.item = string(l.val) + return repeat +{repeatable} lval.item = string(l.val) + return repeatable +{regexp} return regexpKwd +{replace} lval.item = string(l.val) + return replace +{references} return references +{rlike} return rlike + +{sys_var} lval.item = string(l.val) + return sysVar + +{user_var} lval.item = string(l.val) + return userVar +{second} lval.item = string(l.val) + return second +{second_microsecond} lval.item= string(l.val) + return secondMicrosecond +{select} return selectKwd + +{set} return set +{share} return share +{show} return show +{subdate} lval.item = string(l.val) + return subDate +{strcmp} lval.item = string(l.val) + return strcmp +{substr} lval.item = string(l.val) + return substring +{substring} lval.item = string(l.val) + return substring +{substring_index} lval.item = string(l.val) + return substringIndex +{sum} lval.item = string(l.val) + return sum +{sysdate} lval.item = string(l.val) + return sysDate +{table} return tableKwd +{tables} lval.item = string(l.val) + return tables +{then} return then +{to} return to +{trailing} return trailing +{transaction} lval.item = string(l.val) + return transaction +{triggers} lval.item = string(l.val) + return triggers +{trim} lval.item = string(l.val) + return trim +{truncate} lval.item = string(l.val) + return truncate +{uncommitted} lval.item = string(l.val) + return uncommitted +{union} return union +{unique} return unique +{unknown} lval.item = string(l.val) + return unknown +{nullif} lval.item = string(l.val) + return nullIf +{unlock} return unlock +{update} return update +{upper} lval.item = string(l.val) + return upper +{use} return use +{user} lval.item = string(l.val) + return user +{using} return using +{value} lval.item = string(l.val) + return value +{values} return values +{variables} lval.item = string(l.val) + return variables +{version} lval.item = string(l.val) + return version +{warnings} lval.item = string(l.val) + return warnings +{week} lval.item = string(l.val) + return week +{weekday} lval.item = string(l.val) + return weekday +{weekofyear} lval.item = string(l.val) + return weekofyear +{when} return when +{where} return where +{write} return write +{xor} return xor +{yearweek} lval.item = string(l.val) + return yearweek +{year_month} lval.item = string(l.val) + return yearMonth + +{signed} lval.item = string(l.val) + return signed +{unsigned} return unsigned +{zerofill} return zerofill + +{null} lval.item = nil + return null + +{false} return falseKwd + +{true} return trueKwd + +{calc_found_rows} lval.item = string(l.val) + return calcFoundRows + +{current_ts} lval.item = string(l.val) + return currentTs +{localtime} return localTime +{localts} return localTs +{now} lval.item = string(l.val) + return now + +{bit} lval.item = string(l.val) + return bitType + +{tiny} lval.item = string(l.val) + return tinyIntType + +{tinyint} lval.item = string(l.val) + return tinyIntType + +{smallint} lval.item = string(l.val) + return smallIntType + +{mediumint} lval.item = string(l.val) + return mediumIntType + +{bigint} lval.item = string(l.val) + return bigIntType + +{decimal} lval.item = string(l.val) + return decimalType + +{numeric} lval.item = string(l.val) + return numericType + +{float} lval.item = string(l.val) + return floatType + +{double} lval.item = string(l.val) + return doubleType + +{precision} lval.item = string(l.val) + return precisionType + +{real} lval.item = string(l.val) + return realType + +{date} lval.item = string(l.val) + return dateType + +{time} lval.item = string(l.val) + return timeType + +{timestamp} lval.item = string(l.val) + return timestampType + +{datetime} lval.item = string(l.val) + return datetimeType + +{year} lval.item = string(l.val) + return yearType + +{char} lval.item = string(l.val) + return charType + +{varchar} lval.item = string(l.val) + return varcharType + +{binary} lval.item = string(l.val) + return binaryType + +{varbinary} lval.item = string(l.val) + return varbinaryType + +{tinyblob} lval.item = string(l.val) + return tinyblobType + +{blob} lval.item = string(l.val) + return blobType + +{mediumblob} lval.item = string(l.val) + return mediumblobType + +{longblob} lval.item = string(l.val) + return longblobType + +{tinytext} lval.item = string(l.val) + return tinytextType + +{mediumtext} lval.item = string(l.val) + return mediumtextType + +{text} lval.item = string(l.val) + return textType + +{longtext} lval.item = string(l.val) + return longtextType + +{bool} lval.item = string(l.val) + return boolType + +{boolean} lval.item = string(l.val) + return booleanType + +{byte} lval.item = string(l.val) + return byteType + +{int} lval.item = string(l.val) + return intType + +{integer} lval.item = string(l.val) + return integerType + +{ident} lval.item = string(l.val) + return l.handleIdent(lval) + +. return c0 + +%% + return int(unicode.ReplacementChar) +} + +func (l *lexer) npos() (line, col int) { + if line, col = l.nline, l.ncol; col == 0 { + line-- + col = l.lcol+1 + } + return +} + +func (l *lexer) str(lval *yySymType, pref string) int { + l.sc = 0 + // TODO: performance issue. + s := string(l.stringLit) + l.stringLit = l.stringLit[0:0] + if pref == "'" { + s = strings.Replace(s, "\\'", "'", -1) + s = strings.TrimSuffix(s, "'") + "\"" + pref = "\"" + } + v := stringutil.RemoveUselessBackslash(pref+s) + v, err := strconv.Unquote(v) + if err != nil { + v = strings.TrimSuffix(s, pref) + } + lval.item = v + return stringLit +} + +func (l *lexer) trimIdent(idt string) string { + idt = strings.TrimPrefix(idt, "`") + idt = strings.TrimSuffix(idt, "`") + return idt +} + +func (l *lexer) int(lval *yySymType) int { + n, err := strconv.ParseUint(string(l.val), 0, 64) + if err != nil { + l.errf("integer literal: %v", err) + return int(unicode.ReplacementChar) + } + + switch { + case n < math.MaxInt64: + lval.item = int64(n) + default: + lval.item = uint64(n) + } + return intLit +} + +func (l *lexer) float(lval *yySymType) int { + n, err := strconv.ParseFloat(string(l.val), 64) + if err != nil { + l.errf("float literal: %v", err) + return int(unicode.ReplacementChar) + } + + lval.item = float64(n) + return floatLit +} + +// https://dev.mysql.com/doc/refman/5.7/en/hexadecimal-literals.html +func (l *lexer) hex(lval *yySymType) int { + s := string(l.val) + h, err := mysql.ParseHex(s) + if err != nil { + l.errf("hexadecimal literal: %v", err) + return int(unicode.ReplacementChar) + } + lval.item = h + return hexLit +} + +// https://dev.mysql.com/doc/refman/5.7/en/bit-type.html +func (l *lexer) bit(lval *yySymType) int { + s := string(l.val) + b, err := mysql.ParseBit(s, -1) + if err != nil { + l.errf("bit literal: %v", err) + return int(unicode.ReplacementChar) + } + lval.item = b + return bitLit +} + +func (l *lexer) handleIdent(lval *yySymType) int { + s := lval.item.(string) + // A character string literal may have an optional character set introducer and COLLATE clause: + // [_charset_name]'string' [COLLATE collation_name] + // See: https://dev.mysql.com/doc/refman/5.7/en/charset-literal.html + if !strings.HasPrefix(s, "_") { + return identifier + } + cs, _, err := charset.GetCharsetInfo(s[1:]) + if err != nil { + return identifier + } + lval.item = cs + return underscoreCS +} diff --git a/vendor/github.com/pingcap/tidb/parser/yy_parser.go b/vendor/github.com/pingcap/tidb/parser/yy_parser.go new file mode 100644 index 000000000..c56f639f8 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/parser/yy_parser.go @@ -0,0 +1,91 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package parser + +import ( + "regexp" + "strings" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/terror" +) + +// Error instances. +var ( + ErrSyntax = terror.ClassParser.New(CodeSyntaxErr, "syntax error") +) + +// Error codes. +const ( + CodeSyntaxErr terror.ErrCode = 1 +) + +var ( + specCodePattern = regexp.MustCompile(`\/\*!(M?[0-9]{5,6})?([^*]|\*+[^*/])*\*+\/`) + specCodeStart = regexp.MustCompile(`^\/\*!(M?[0-9]{5,6} )?[ \t]*`) + specCodeEnd = regexp.MustCompile(`[ \t]*\*\/$`) +) + +func trimComment(txt string) string { + txt = specCodeStart.ReplaceAllString(txt, "") + return specCodeEnd.ReplaceAllString(txt, "") +} + +// See: http://dev.mysql.com/doc/refman/5.7/en/comments.html +// Convert "/*!VersionNumber MySQL-specific-code */" to "MySQL-specific-code". +// TODO: Find a better way: +// 1. RegExpr is slow. +// 2. Handle nested comment. +func handleMySQLSpecificCode(sql string) string { + if strings.Index(sql, "/*!") == -1 { + // Fast way to check if text contains MySQL-specific code. + return sql + } + // SQL text contains MySQL-specific code. We should convert it to normal SQL text. + return specCodePattern.ReplaceAllStringFunc(sql, trimComment) +} + +// Parse parses a query string to raw ast.StmtNode. +// If charset or collation is "", default charset and collation will be used. +func Parse(sql, charset, collation string) ([]ast.StmtNode, error) { + if charset == "" { + charset = mysql.DefaultCharset + } + if collation == "" { + collation = mysql.DefaultCollationName + } + sql = handleMySQLSpecificCode(sql) + l := NewLexer(sql) + l.SetCharsetInfo(charset, collation) + yyParse(l) + if len(l.Errors()) != 0 { + return nil, errors.Trace(l.Errors()[0]) + } + return l.Stmts(), nil +} + +// ParseOneStmt parses a query and returns an ast.StmtNode. +// The query must have one statement, otherwise ErrSyntax is returned. +func ParseOneStmt(sql, charset, collation string) (ast.StmtNode, error) { + stmts, err := Parse(sql, charset, collation) + if err != nil { + return nil, errors.Trace(err) + } + if len(stmts) != 1 { + return nil, ErrSyntax + } + return stmts[0], nil +} diff --git a/vendor/github.com/pingcap/tidb/perfschema/const.go b/vendor/github.com/pingcap/tidb/perfschema/const.go new file mode 100644 index 000000000..f0e789063 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/perfschema/const.go @@ -0,0 +1,692 @@ +// Copyright 2016 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package perfschema + +// Performance Schema Name. +const ( + Name = "PERFORMANCE_SCHEMA" +) + +// Definition order same as MySQL's reference manual, so don't bother to +// adjust according to alphabetical order. +const ( + TableSetupActors = "SETUP_ACTORS" + TableSetupObjects = "SETUP_OBJECTS" + TableSetupInstruments = "SETUP_INSTRUMENTS" + TableSetupConsumers = "SETUP_CONSUMERS" + TableSetupTimers = "SETUP_TIMERS" + TableStmtsCurrent = "EVENTS_STATEMENTS_CURRENT" + TableStmtsHistory = "EVENTS_STATEMENTS_HISTORY" + TableStmtsHistoryLong = "EVENTS_STATEMENTS_HISTORY_LONG" + TablePreparedStmtsInstances = "PREPARED_STATEMENTS_INSTANCES" + TableTransCurrent = "EVENTS_TRANSACTIONS_CURRENT" + TableTransHistory = "EVENTS_TRANSACTIONS_HISTORY" + TableTransHistoryLong = "EVENTS_TRANSACTIONS_HISTORY_LONG" + TableStagesCurrent = "EVENTS_STAGES_CURRENT" + TableStagesHistory = "EVENTS_STAGES_HISTORY" + TableStagesHistoryLong = "EVENTS_STAGES_HISTORY_LONG" +) + +// PerfSchemaTables is a shortcut to involve all table names. +var PerfSchemaTables = []string{ + TableSetupActors, + TableSetupObjects, + TableSetupInstruments, + TableSetupConsumers, + TableSetupTimers, + TableStmtsCurrent, + TableStmtsHistory, + TableStmtsHistoryLong, + TablePreparedStmtsInstances, + TableTransCurrent, + TableTransHistory, + TableTransHistoryLong, + TableStagesCurrent, + TableStagesHistory, + TableStagesHistoryLong, +} + +// ColumnSetupActors contains the column name definitions for table setup_actors, same as MySQL. +// +// CREATE TABLE if not exists performance_schema.setup_actors ( +// HOST CHAR(60) NOT NULL DEFAULT '%', +// USER CHAR(32) NOT NULL DEFAULT '%', +// ROLE CHAR(16) NOT NULL DEFAULT '%', +// ENABLED ENUM('YES','NO') NOT NULL DEFAULT 'YES', +// HISTORY ENUM('YES','NO') NOT NULL DEFAULT 'YES'); +var ColumnSetupActors = []string{"HOST", "USER", "ROLE", "ENABLED", "HISTORY"} + +// ColumnSetupObjects contains the column name definitions for table setup_objects, same as MySQL. +// +// CREATE TABLE if not exists performance_schema.setup_objects ( +// OBJECT_TYPE ENUM('EVENT','FUNCTION','TABLE') NOT NULL DEFAULT 'TABLE', +// OBJECT_SCHEMA VARCHAR(64) DEFAULT '%', +// OBJECT_NAME VARCHAR(64) NOT NULL DEFAULT '%', +// ENABLED ENUM('YES','NO') NOT NULL DEFAULT 'YES', +// TIMED ENUM('YES','NO') NOT NULL DEFAULT 'YES'); +var ColumnSetupObjects = []string{"OBJECT_TYPE", "OBJECT_SCHEMA", "OBJECT_NAME", "ENABLED", "TIMED"} + +// ColumnSetupInstruments contains the column name definitions for table setup_instruments, same as MySQL. +// +// CREATE TABLE if not exists performance_schema.setup_instruments ( +// NAME VARCHAR(128) NOT NULL, +// ENABLED ENUM('YES','NO') NOT NULL, +// TIMED ENUM('YES','NO') NOT NULL); +var ColumnSetupInstruments = []string{"NAMED", "ENABLED", "TIMED"} + +// ColumnSetupConsumers contains the column name definitions for table setup_consumers, same as MySQL. +// +// CREATE TABLE if not exists performance_schema.setup_consumers ( +// NAME VARCHAR(64) NOT NULL, +// ENABLED ENUM('YES','NO') NOT NULL); +var ColumnSetupConsumers = []string{"NAMED", "ENABLED"} + +// ColumnSetupTimers contains the column name definitions for table setup_timers, same as MySQL. +// +// CREATE TABLE if not exists performance_schema.setup_timers ( +// NAME VARCHAR(64) NOT NULL, +// TIMER_NAME ENUM('NANOSECOND','MICROSECOND','MILLISECOND') NOT NULL); +var ColumnSetupTimers = []string{"NAME", "TIMER_NAME"} + +// ColumnStmtsCurrent contains the column name definitions for table events_statements_current, same as MySQL. +// +// CREATE TABLE if not exists performance_schema.events_statements_current ( +// THREAD_ID BIGINT(20) UNSIGNED NOT NULL, +// EVENT_ID BIGINT(20) UNSIGNED NOT NULL, +// END_EVENT_ID BIGINT(20) UNSIGNED, +// EVENT_NAME VARCHAR(128) NOT NULL, +// SOURCE VARCHAR(64), +// TIMER_START BIGINT(20) UNSIGNED, +// TIMER_END BIGINT(20) UNSIGNED, +// TIMER_WAIT BIGINT(20) UNSIGNED, +// LOCK_TIME BIGINT(20) UNSIGNED NOT NULL, +// SQL_TEXT LONGTEXT, +// DIGEST VARCHAR(32), +// DIGEST_TEXT LONGTEXT, +// CURRENT_SCHEMA VARCHAR(64), +// OBJECT_TYPE VARCHAR(64), +// OBJECT_SCHEMA VARCHAR(64), +// OBJECT_NAME VARCHAR(64), +// OBJECT_INSTANCE_BEGIN BIGINT(20) UNSIGNED, +// MYSQL_ERRNO INT(11), +// RETURNED_SQLSTATE VARCHAR(5), +// MESSAGE_TEXT VARCHAR(128), +// ERRORS BIGINT(20) UNSIGNED NOT NULL, +// WARNINGS BIGINT(20) UNSIGNED NOT NULL, +// ROWS_AFFECTED BIGINT(20) UNSIGNED NOT NULL, +// ROWS_SENT BIGINT(20) UNSIGNED NOT NULL, +// ROWS_EXAMINED BIGINT(20) UNSIGNED NOT NULL, +// CREATED_TMP_DISK_TABLES BIGINT(20) UNSIGNED NOT NULL, +// CREATED_TMP_TABLES BIGINT(20) UNSIGNED NOT NULL, +// SELECT_FULL_JOIN BIGINT(20) UNSIGNED NOT NULL, +// SELECT_FULL_RANGE_JOIN BIGINT(20) UNSIGNED NOT NULL, +// SELECT_RANGE BIGINT(20) UNSIGNED NOT NULL, +// SELECT_RANGE_CHECK BIGINT(20) UNSIGNED NOT NULL, +// SELECT_SCAN BIGINT(20) UNSIGNED NOT NULL, +// SORT_MERGE_PASSES BIGINT(20) UNSIGNED NOT NULL, +// SORT_RANGE BIGINT(20) UNSIGNED NOT NULL, +// SORT_ROWS BIGINT(20) UNSIGNED NOT NULL, +// SORT_SCAN BIGINT(20) UNSIGNED NOT NULL, +// NO_INDEX_USED BIGINT(20) UNSIGNED NOT NULL, +// NO_GOOD_INDEX_USED BIGINT(20) UNSIGNED NOT NULL, +// NESTING_EVENT_ID BIGINT(20) UNSIGNED, +// NESTING_EVENT_TYPE ENUM('TRANSACTION','STATEMENT','STAGE'), +// NESTING_EVENT_LEVEL INT(11)); +var ColumnStmtsCurrent = []string{ + "THREAD_ID", + "EVENT_ID", + "END_EVENT_ID", + "EVENT_NAME", + "SOURCE", + "TIMER_START", + "TIMER_END", + "TIMER_WAIT", + "LOCK_TIME", + "SQL_TEXT", + "DIGEST", + "DIGEST_TEXT", + "CURRENT_SCHEMA", + "OBJECT_TYPE", + "OBJECT_SCHEMA", + "OBJECT_NAME", + "OBJECT_INSTANCE_BEGIN", + "MYSQL_ERRNO", + "RETURNED_SQLSTATE", + "MESSAGE_TEXT", + "ERRORS", + "WARNINGS", + "ROWS_AFFECTED", + "ROWS_SENT", + "ROWS_EXAMINED", + "CREATED_TMP_DISK_TABLES", + "CREATED_TMP_TABLES", + "SELECT_FULL_JOIN", + "SELECT_FULL_RANGE_JOIN", + "SELECT_RANGE", + "SELECT_RANGE_CHECK", + "SELECT_SCAN", + "SORT_MERGE_PASSES", + "SORT_RANGE", + "SORT_ROWS", + "SORT_SCAN", + "NO_INDEX_USED", + "NO_GOOD_INDEX_USED", + "NESTING_EVENT_ID", + "NESTING_EVENT_TYPE", + "NESTING_EVENT_LEVEL", +} + +// ColumnStmtsHistory contains the column name definitions for table events_statements_history, same as MySQL. +// +// CREATE TABLE if not exists performance_schema.events_statements_history ( +// THREAD_ID BIGINT(20) UNSIGNED NOT NULL, +// EVENT_ID BIGINT(20) UNSIGNED NOT NULL, +// END_EVENT_ID BIGINT(20) UNSIGNED, +// EVENT_NAME VARCHAR(128) NOT NULL, +// SOURCE VARCHAR(64), +// TIMER_START BIGINT(20) UNSIGNED, +// TIMER_END BIGINT(20) UNSIGNED, +// TIMER_WAIT BIGINT(20) UNSIGNED, +// LOCK_TIME BIGINT(20) UNSIGNED NOT NULL, +// SQL_TEXT LONGTEXT, +// DIGEST VARCHAR(32), +// DIGEST_TEXT LONGTEXT, +// CURRENT_SCHEMA VARCHAR(64), +// OBJECT_TYPE VARCHAR(64), +// OBJECT_SCHEMA VARCHAR(64), +// OBJECT_NAME VARCHAR(64), +// OBJECT_INSTANCE_BEGIN BIGINT(20) UNSIGNED, +// MYSQL_ERRNO INT(11), +// RETURNED_SQLSTATE VARCHAR(5), +// MESSAGE_TEXT VARCHAR(128), +// ERRORS BIGINT(20) UNSIGNED NOT NULL, +// WARNINGS BIGINT(20) UNSIGNED NOT NULL, +// ROWS_AFFECTED BIGINT(20) UNSIGNED NOT NULL, +// ROWS_SENT BIGINT(20) UNSIGNED NOT NULL, +// ROWS_EXAMINED BIGINT(20) UNSIGNED NOT NULL, +// CREATED_TMP_DISK_TABLES BIGINT(20) UNSIGNED NOT NULL, +// CREATED_TMP_TABLES BIGINT(20) UNSIGNED NOT NULL, +// SELECT_FULL_JOIN BIGINT(20) UNSIGNED NOT NULL, +// SELECT_FULL_RANGE_JOIN BIGINT(20) UNSIGNED NOT NULL, +// SELECT_RANGE BIGINT(20) UNSIGNED NOT NULL, +// SELECT_RANGE_CHECK BIGINT(20) UNSIGNED NOT NULL, +// SELECT_SCAN BIGINT(20) UNSIGNED NOT NULL, +// SORT_MERGE_PASSES BIGINT(20) UNSIGNED NOT NULL, +// SORT_RANGE BIGINT(20) UNSIGNED NOT NULL, +// SORT_ROWS BIGINT(20) UNSIGNED NOT NULL, +// SORT_SCAN BIGINT(20) UNSIGNED NOT NULL, +// NO_INDEX_USED BIGINT(20) UNSIGNED NOT NULL, +// NO_GOOD_INDEX_USED BIGINT(20) UNSIGNED NOT NULL, +// NESTING_EVENT_ID BIGINT(20) UNSIGNED, +// NESTING_EVENT_TYPE ENUM('TRANSACTION','STATEMENT','STAGE'), +// NESTING_EVENT_LEVEL INT(11)); +var ColumnStmtsHistory = []string{ + "THREAD_ID", + "EVENT_ID", + "END_EVENT_ID", + "EVENT_NAME", + "SOURCE", + "TIMER_START", + "TIMER_END", + "TIMER_WAIT", + "LOCK_TIME", + "SQL_TEXT", + "DIGEST", + "DIGEST_TEXT", + "CURRENT_SCHEMA", + "OBJECT_TYPE", + "OBJECT_SCHEMA", + "OBJECT_NAME", + "OBJECT_INSTANCE_BEGIN", + "MYSQL_ERRNO", + "RETURNED_SQLSTATE", + "MESSAGE_TEXT", + "ERRORS", + "WARNINGS", + "ROWS_AFFECTED", + "ROWS_SENT", + "ROWS_EXAMINED", + "CREATED_TMP_DISK_TABLES", + "CREATED_TMP_TABLES", + "SELECT_FULL_JOIN", + "SELECT_FULL_RANGE_JOIN", + "SELECT_RANGE", + "SELECT_RANGE_CHECK", + "SELECT_SCAN", + "SORT_MERGE_PASSES", + "SORT_RANGE", + "SORT_ROWS", + "SORT_SCAN", + "NO_INDEX_USED", + "NO_GOOD_INDEX_USED", + "NESTING_EVENT_ID", + "NESTING_EVENT_TYPE", + "NESTING_EVENT_LEVEL", +} + +// ColumnStmtsHistoryLong contains the column name definitions for table events_statements_history_long, same as MySQL. +// +// CREATE TABLE if not exists performance_schema.events_statements_history_long ( +// THREAD_ID BIGINT(20) UNSIGNED NOT NULL, +// EVENT_ID BIGINT(20) UNSIGNED NOT NULL, +// END_EVENT_ID BIGINT(20) UNSIGNED, +// EVENT_NAME VARCHAR(128) NOT NULL, +// SOURCE VARCHAR(64), +// TIMER_START BIGINT(20) UNSIGNED, +// TIMER_END BIGINT(20) UNSIGNED, +// TIMER_WAIT BIGINT(20) UNSIGNED, +// LOCK_TIME BIGINT(20) UNSIGNED NOT NULL, +// SQL_TEXT LONGTEXT, +// DIGEST VARCHAR(32), +// DIGEST_TEXT LONGTEXT, +// CURRENT_SCHEMA VARCHAR(64), +// OBJECT_TYPE VARCHAR(64), +// OBJECT_SCHEMA VARCHAR(64), +// OBJECT_NAME VARCHAR(64), +// OBJECT_INSTANCE_BEGIN BIGINT(20) UNSIGNED, +// MYSQL_ERRNO INT(11), +// RETURNED_SQLSTATE VARCHAR(5), +// MESSAGE_TEXT VARCHAR(128), +// ERRORS BIGINT(20) UNSIGNED NOT NULL, +// WARNINGS BIGINT(20) UNSIGNED NOT NULL, +// ROWS_AFFECTED BIGINT(20) UNSIGNED NOT NULL, +// ROWS_SENT BIGINT(20) UNSIGNED NOT NULL, +// ROWS_EXAMINED BIGINT(20) UNSIGNED NOT NULL, +// CREATED_TMP_DISK_TABLES BIGINT(20) UNSIGNED NOT NULL, +// CREATED_TMP_TABLES BIGINT(20) UNSIGNED NOT NULL, +// SELECT_FULL_JOIN BIGINT(20) UNSIGNED NOT NULL, +// SELECT_FULL_RANGE_JOIN BIGINT(20) UNSIGNED NOT NULL, +// SELECT_RANGE BIGINT(20) UNSIGNED NOT NULL, +// SELECT_RANGE_CHECK BIGINT(20) UNSIGNED NOT NULL, +// SELECT_SCAN BIGINT(20) UNSIGNED NOT NULL, +// SORT_MERGE_PASSES BIGINT(20) UNSIGNED NOT NULL, +// SORT_RANGE BIGINT(20) UNSIGNED NOT NULL, +// SORT_ROWS BIGINT(20) UNSIGNED NOT NULL, +// SORT_SCAN BIGINT(20) UNSIGNED NOT NULL, +// NO_INDEX_USED BIGINT(20) UNSIGNED NOT NULL, +// NO_GOOD_INDEX_USED BIGINT(20) UNSIGNED NOT NULL, +// NESTING_EVENT_ID BIGINT(20) UNSIGNED, +// NESTING_EVENT_TYPE ENUM('TRANSACTION','STATEMENT','STAGE'), +// NESTING_EVENT_LEVEL INT(11)); +var ColumnStmtsHistoryLong = []string{ + "THREAD_ID", + "EVENT_ID", + "END_EVENT_ID", + "EVENT_NAME", + "SOURCE", + "TIMER_START", + "TIMER_END", + "TIMER_WAIT", + "LOCK_TIME", + "SQL_TEXT", + "DIGEST", + "DIGEST_TEXT", + "CURRENT_SCHEMA", + "OBJECT_TYPE", + "OBJECT_SCHEMA", + "OBJECT_NAME", + "OBJECT_INSTANCE_BEGIN", + "MYSQL_ERRNO", + "RETURNED_SQLSTATE", + "MESSAGE_TEXT", + "ERRORS", + "WARNINGS", + "ROWS_AFFECTED", + "ROWS_SENT", + "ROWS_EXAMINED", + "CREATED_TMP_DISK_TABLES", + "CREATED_TMP_TABLES", + "SELECT_FULL_JOIN", + "SELECT_FULL_RANGE_JOIN", + "SELECT_RANGE", + "SELECT_RANGE_CHECK", + "SELECT_SCAN", + "SORT_MERGE_PASSES", + "SORT_RANGE", + "SORT_ROWS", + "SORT_SCAN", + "NO_INDEX_USED", + "NO_GOOD_INDEX_USED", + "NESTING_EVENT_ID", + "NESTING_EVENT_TYPE", + "NESTING_EVENT_LEVEL", +} + +// ColumnPreparedStmtsInstances contains the column name definitions for table prepared_statements_instances, same as MySQL. +// +// CREATE TABLE if not exists performance_schema.prepared_statements_instances ( +// OBJECT_INSTANCE_BEGIN BIGINT(20) UNSIGNED NOT NULL, +// STATEMENT_ID BIGINT(20) UNSIGNED NOT NULL, +// STATEMENT_NAME VARCHAR(64), +// SQL_TEXT LONGTEXT NOT NULL, +// OWNER_THREAD_ID BIGINT(20) UNSIGNED NOT NULL, +// OWNER_EVENT_ID BIGINT(20) UNSIGNED NOT NULL, +// OWNER_OBJECT_TYPE ENUM('EVENT','FUNCTION','TABLE'), +// OWNER_OBJECT_SCHEMA VARCHAR(64), +// OWNER_OBJECT_NAME VARCHAR(64), +// TIMER_PREPARE BIGINT(20) UNSIGNED NOT NULL, +// COUNT_REPREPARE BIGINT(20) UNSIGNED NOT NULL, +// COUNT_EXECUTE BIGINT(20) UNSIGNED NOT NULL, +// SUM_TIMER_EXECUTE BIGINT(20) UNSIGNED NOT NULL, +// MIN_TIMER_EXECUTE BIGINT(20) UNSIGNED NOT NULL, +// AVG_TIMER_EXECUTE BIGINT(20) UNSIGNED NOT NULL, +// MAX_TIMER_EXECUTE BIGINT(20) UNSIGNED NOT NULL, +// SUM_LOCK_TIME BIGINT(20) UNSIGNED NOT NULL, +// SUM_ERRORS BIGINT(20) UNSIGNED NOT NULL, +// SUM_WARNINGS BIGINT(20) UNSIGNED NOT NULL, +// SUM_ROWS_AFFECTED BIGINT(20) UNSIGNED NOT NULL, +// SUM_ROWS_SENT BIGINT(20) UNSIGNED NOT NULL, +// SUM_ROWS_EXAMINED BIGINT(20) UNSIGNED NOT NULL, +// SUM_CREATED_TMP_DISK_TABLES BIGINT(20) UNSIGNED NOT NULL, +// SUM_CREATED_TMP_TABLES BIGINT(20) UNSIGNED NOT NULL, +// SUM_SELECT_FULL_JOIN BIGINT(20) UNSIGNED NOT NULL, +// SUM_SELECT_FULL_RANGE_JOIN BIGINT(20) UNSIGNED NOT NULL, +// SUM_SELECT_RANGE BIGINT(20) UNSIGNED NOT NULL, +// SUM_SELECT_RANGE_CHECK BIGINT(20) UNSIGNED NOT NULL, +// SUM_SELECT_SCAN BIGINT(20) UNSIGNED NOT NULL, +// SUM_SORT_MERGE_PASSES BIGINT(20) UNSIGNED NOT NULL, +// SUM_SORT_RANGE BIGINT(20) UNSIGNED NOT NULL, +// SUM_SORT_ROWS BIGINT(20) UNSIGNED NOT NULL, +// SUM_SORT_SCAN BIGINT(20) UNSIGNED NOT NULL, +// SUM_NO_INDEX_USED BIGINT(20) UNSIGNED NOT NULL, +// SUM_NO_GOOD_INDEX_USED BIGINT(20) UNSIGNED NOT NULL); +var ColumnPreparedStmtsInstances = []string{ + "OBJECT_INSTANCE_BEGIN", + "STATEMENT_ID", + "STATEMENT_NAME", + "SQL_TEXT", + "OWNER_THREAD_ID", + "OWNER_EVENT_ID", + "OWNER_OBJECT_TYPE", + "OWNER_OBJECT_SCHEMA", + "OWNER_OBJECT_NAME", + "TIMER_PREPARE", + "COUNT_REPREPARE", + "COUNT_EXECUTE", + "SUM_TIMER_EXECUTE", + "MIN_TIMER_EXECUTE", + "AVG_TIMER_EXECUTE", + "MAX_TIMER_EXECUTE", + "SUM_LOCK_TIME", + "SUM_ERRORS", + "SUM_WARNINGS", + "SUM_ROWS_AFFECTED", + "SUM_ROWS_SENT", + "SUM_ROWS_EXAMINED", + "SUM_CREATED_TMP_DISK_TABLES", + "SUM_CREATED_TMP_TABLES", + "SUM_SELECT_FULL_JOIN", + "SUM_SELECT_FULL_RANGE_JOIN", + "SUM_SELECT_RANGE", + "SUM_SELECT_RANGE_CHECK", + "SUM_SELECT_SCAN", + "SUM_SORT_MERGE_PASSES", + "SUM_SORT_RANGE", + "SUM_SORT_ROWS", + "SUM_SORT_SCAN", + "SUM_NO_INDEX_USED", + "SUM_NO_GOOD_INDEX_USED", +} + +// ColumnTransCurrent contains the column name definitions for table events_transactions_current, same as MySQL. +// +// CREATE TABLE if not exists performance_schema.events_transactions_current ( +// THREAD_ID BIGINT(20) UNSIGNED NOT NULL, +// EVENT_ID BIGINT(20) UNSIGNED NOT NULL, +// END_EVENT_ID BIGINT(20) UNSIGNED, +// EVENT_NAME VARCHAR(128) NOT NULL, +// STATE ENUM('ACTIVE','COMMITTED',"ROLLED BACK"), +// TRX_ID BIGINT(20) UNSIGNED, +// GTID VARCHAR(64), +// XID_FORMAT_ID INT(11), +// XID_GTRID VARCHAR(130), +// XID_BQUAL VARCHAR(130), +// XA_STATE VARCHAR(64), +// SOURCE VARCHAR(64), +// TIMER_START BIGINT(20) UNSIGNED, +// TIMER_END BIGINT(20) UNSIGNED, +// TIMER_WAIT BIGINT(20) UNSIGNED, +// ACCESS_MODE ENUM('READ ONLY','READ WRITE'), +// ISOLATION_LEVEL VARCHAR(64), +// AUTOCOMMIT ENUM('YES','NO') NOT NULL, +// NUMBER_OF_SAVEPOINTS BIGINT(20) UNSIGNED, +// NUMBER_OF_ROLLBACK_TO_SAVEPOINT BIGINT(20) UNSIGNED, +// NUMBER_OF_RELEASE_SAVEPOINT BIGINT(20) UNSIGNED, +// OBJECT_INSTANCE_BEGIN BIGINT(20) UNSIGNED, +// NESTING_EVENT_ID BIGINT(20) UNSIGNED, +// NESTING_EVENT_TYPE ENUM('TRANSACTION','STATEMENT','STAGE')); +var ColumnTransCurrent = []string{ + "THREAD_ID", + "EVENT_ID", + "END_EVENT_ID", + "EVENT_NAME", + "STATE", + "TRX_ID", + "GTID", + "XID_FORMAT_ID", + "XID_GTRID", + "XID_BQUAL", + "XA_STATE", + "SOURCE", + "TIMER_START", + "TIMER_END", + "TIMER_WAIT", + "ACCESS_MODE", + "ISOLATION_LEVEL", + "AUTOCOMMIT", + "NUMBER_OF_SAVEPOINTS", + "NUMBER_OF_ROLLBACK_TO_SAVEPOINT", + "NUMBER_OF_RELEASE_SAVEPOINT", + "OBJECT_INSTANCE_BEGIN", + "NESTING_EVENT_ID", + "NESTING_EVENT_TYPE", +} + +// ColumnTransHistory contains the column name definitions for table events_transactions_history, same as MySQL. +// +// CREATE TABLE if not exists performance_schema.events_transactions_history ( +// THREAD_ID BIGINT(20) UNSIGNED NOT NULL, +// EVENT_ID BIGINT(20) UNSIGNED NOT NULL, +// END_EVENT_ID BIGINT(20) UNSIGNED, +// EVENT_NAME VARCHAR(128) NOT NULL, +// STATE ENUM('ACTIVE','COMMITTED',"ROLLED BACK"), +// TRX_ID BIGINT(20) UNSIGNED, +// GTID VARCHAR(64), +// XID_FORMAT_ID INT(11), +// XID_GTRID VARCHAR(130), +// XID_BQUAL VARCHAR(130), +// XA_STATE VARCHAR(64), +// SOURCE VARCHAR(64), +// TIMER_START BIGINT(20) UNSIGNED, +// TIMER_END BIGINT(20) UNSIGNED, +// TIMER_WAIT BIGINT(20) UNSIGNED, +// ACCESS_MODE ENUM('READ ONLY','READ WRITE'), +// ISOLATION_LEVEL VARCHAR(64), +// AUTOCOMMIT ENUM('YES','NO') NOT NULL, +// NUMBER_OF_SAVEPOINTS BIGINT(20) UNSIGNED, +// NUMBER_OF_ROLLBACK_TO_SAVEPOINT BIGINT(20) UNSIGNED, +// NUMBER_OF_RELEASE_SAVEPOINT BIGINT(20) UNSIGNED, +// OBJECT_INSTANCE_BEGIN BIGINT(20) UNSIGNED, +// NESTING_EVENT_ID BIGINT(20) UNSIGNED, +// NESTING_EVENT_TYPE ENUM('TRANSACTION','STATEMENT','STAGE')); +var ColumnTransHistory = []string{ + "THREAD_ID", + "EVENT_ID", + "END_EVENT_ID", + "EVENT_NAME", + "STATE", + "TRX_ID", + "GTID", + "XID_FORMAT_ID", + "XID_GTRID", + "XID_BQUAL", + "XA_STATE", + "SOURCE", + "TIMER_START", + "TIMER_END", + "TIMER_WAIT", + "ACCESS_MODE", + "ISOLATION_LEVEL", + "AUTOCOMMIT", + "NUMBER_OF_SAVEPOINTS", + "NUMBER_OF_ROLLBACK_TO_SAVEPOINT", + "NUMBER_OF_RELEASE_SAVEPOINT", + "OBJECT_INSTANCE_BEGIN", + "NESTING_EVENT_ID", + "NESTING_EVENT_TYPE", +} + +// ColumnTransHistoryLong contains the column name definitions for table events_transactions_history_long, same as MySQL. +// +// CREATE TABLE if not exists performance_schema.events_transactions_history_long ( +// THREAD_ID BIGINT(20) UNSIGNED NOT NULL, +// EVENT_ID BIGINT(20) UNSIGNED NOT NULL, +// END_EVENT_ID BIGINT(20) UNSIGNED, +// EVENT_NAME VARCHAR(128) NOT NULL, +// STATE ENUM('ACTIVE','COMMITTED',"ROLLED BACK"), +// TRX_ID BIGINT(20) UNSIGNED, +// GTID VARCHAR(64), +// XID_FORMAT_ID INT(11), +// XID_GTRID VARCHAR(130), +// XID_BQUAL VARCHAR(130), +// XA_STATE VARCHAR(64), +// SOURCE VARCHAR(64), +// TIMER_START BIGINT(20) UNSIGNED, +// TIMER_END BIGINT(20) UNSIGNED, +// TIMER_WAIT BIGINT(20) UNSIGNED, +// ACCESS_MODE ENUM('READ ONLY','READ WRITE'), +// ISOLATION_LEVEL VARCHAR(64), +// AUTOCOMMIT ENUM('YES','NO') NOT NULL, +// NUMBER_OF_SAVEPOINTS BIGINT(20) UNSIGNED, +// NUMBER_OF_ROLLBACK_TO_SAVEPOINT BIGINT(20) UNSIGNED, +// NUMBER_OF_RELEASE_SAVEPOINT BIGINT(20) UNSIGNED, +// OBJECT_INSTANCE_BEGIN BIGINT(20) UNSIGNED, +// NESTING_EVENT_ID BIGINT(20) UNSIGNED, +// NESTING_EVENT_TYPE ENUM('TRANSACTION','STATEMENT','STAGE')); +var ColumnTransHistoryLong = []string{ + "THREAD_ID", + "EVENT_ID", + "END_EVENT_ID", + "EVENT_NAME", + "STATE", + "TRX_ID", + "GTID", + "XID_FORMAT_ID", + "XID_GTRID", + "XID_BQUAL", + "XA_STATE", + "SOURCE", + "TIMER_START", + "TIMER_END", + "TIMER_WAIT", + "ACCESS_MODE", + "ISOLATION_LEVEL", + "AUTOCOMMIT", + "NUMBER_OF_SAVEPOINTS", + "NUMBER_OF_ROLLBACK_TO_SAVEPOINT", + "NUMBER_OF_RELEASE_SAVEPOINT", + "OBJECT_INSTANCE_BEGIN", + "NESTING_EVENT_ID", + "NESTING_EVENT_TYPE", +} + +// ColumnStagesCurrent contains the column name definitions for table events_stages_current, same as MySQL. +// +// CREATE TABLE if not exists performance_schema.events_stages_current ( +// THREAD_ID BIGINT(20) UNSIGNED NOT NULL, +// EVENT_ID BIGINT(20) UNSIGNED NOT NULL, +// END_EVENT_ID BIGINT(20) UNSIGNED, +// EVENT_NAME VARCHAR(128) NOT NULL, +// SOURCE VARCHAR(64), +// TIMER_START BIGINT(20) UNSIGNED, +// TIMER_END BIGINT(20) UNSIGNED, +// TIMER_WAIT BIGINT(20) UNSIGNED, +// WORK_COMPLETED BIGINT(20) UNSIGNED, +// WORK_ESTIMATED BIGINT(20) UNSIGNED, +// NESTING_EVENT_ID BIGINT(20) UNSIGNED, +// NESTING_EVENT_TYPE ENUM('TRANSACTION','STATEMENT','STAGE')); +var ColumnStagesCurrent = []string{ + "THREAD_ID", + "EVENT_ID", + "END_EVENT_ID", + "EVENT_NAME", + "SOURCE", + "TIMER_START", + "TIMER_END", + "TIMER_WAIT", + "WORK_COMPLETED", + "WORK_ESTIMATED", + "NESTING_EVENT_ID", + "NESTING_EVENT_TYPE", +} + +// ColumnStagesHistory contains the column name definitions for table events_stages_history, same as MySQL. +// +// CREATE TABLE if not exists performance_schema.events_stages_history ( +// THREAD_ID BIGINT(20) UNSIGNED NOT NULL, +// EVENT_ID BIGINT(20) UNSIGNED NOT NULL, +// END_EVENT_ID BIGINT(20) UNSIGNED, +// EVENT_NAME VARCHAR(128) NOT NULL, +// SOURCE VARCHAR(64), +// TIMER_START BIGINT(20) UNSIGNED, +// TIMER_END BIGINT(20) UNSIGNED, +// TIMER_WAIT BIGINT(20) UNSIGNED, +// WORK_COMPLETED BIGINT(20) UNSIGNED, +// WORK_ESTIMATED BIGINT(20) UNSIGNED, +// NESTING_EVENT_ID BIGINT(20) UNSIGNED, +// NESTING_EVENT_TYPE ENUM('TRANSACTION','STATEMENT','STAGE')); +var ColumnStagesHistory = []string{ + "THREAD_ID", + "EVENT_ID", + "END_EVENT_ID", + "EVENT_NAME", + "SOURCE", + "TIMER_START", + "TIMER_END", + "TIMER_WAIT", + "WORK_COMPLETED", + "WORK_ESTIMATED", + "NESTING_EVENT_ID", + "NESTING_EVENT_TYPE", +} + +// ColumnStagesHistoryLong contains the column name definitions for table events_stages_history_long, same as MySQL. +// +// CREATE TABLE if not exists performance_schema.events_stages_history_long ( +// THREAD_ID BIGINT(20) UNSIGNED NOT NULL, +// EVENT_ID BIGINT(20) UNSIGNED NOT NULL, +// END_EVENT_ID BIGINT(20) UNSIGNED, +// EVENT_NAME VARCHAR(128) NOT NULL, +// SOURCE VARCHAR(64), +// TIMER_START BIGINT(20) UNSIGNED, +// TIMER_END BIGINT(20) UNSIGNED, +// TIMER_WAIT BIGINT(20) UNSIGNED, +// WORK_COMPLETED BIGINT(20) UNSIGNED, +// WORK_ESTIMATED BIGINT(20) UNSIGNED, +// NESTING_EVENT_ID BIGINT(20) UNSIGNED, +// NESTING_EVENT_TYPE ENUM('TRANSACTION','STATEMENT','STAGE')); +var ColumnStagesHistoryLong = []string{ + "THREAD_ID", + "EVENT_ID", + "END_EVENT_ID", + "EVENT_NAME", + "SOURCE", + "TIMER_START", + "TIMER_END", + "TIMER_WAIT", + "WORK_COMPLETED", + "WORK_ESTIMATED", + "NESTING_EVENT_ID", + "NESTING_EVENT_TYPE", +} diff --git a/vendor/github.com/pingcap/tidb/perfschema/init.go b/vendor/github.com/pingcap/tidb/perfschema/init.go new file mode 100644 index 000000000..39e41035b --- /dev/null +++ b/vendor/github.com/pingcap/tidb/perfschema/init.go @@ -0,0 +1,461 @@ +// Copyright 2016 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package perfschema + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/meta" + "github.com/pingcap/tidb/meta/autoid" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/table" + "github.com/pingcap/tidb/table/tables" + "github.com/pingcap/tidb/util/charset" + "github.com/pingcap/tidb/util/types" +) + +type columnInfo struct { + tp byte + size int + flag uint + deflt interface{} + elems []string +} + +var setupActorsCols = []columnInfo{ + {mysql.TypeString, 60, mysql.NotNullFlag, `%`, nil}, + {mysql.TypeString, 32, mysql.NotNullFlag, `%`, nil}, + {mysql.TypeString, 16, mysql.NotNullFlag, `%`, nil}, + {mysql.TypeEnum, -1, mysql.NotNullFlag, "YES", []string{"YES", "NO"}}, + {mysql.TypeEnum, -1, mysql.NotNullFlag, "YES", []string{"YES", "NO"}}, +} + +var setupObjectsCols = []columnInfo{ + {mysql.TypeEnum, -1, mysql.NotNullFlag, "TABLE", []string{"EVENT", "FUNCTION", "TABLE"}}, + {mysql.TypeVarchar, 64, 0, `%`, nil}, + {mysql.TypeVarchar, 64, mysql.NotNullFlag, `%`, nil}, + {mysql.TypeEnum, -1, mysql.NotNullFlag, "YES", []string{"YES", "NO"}}, + {mysql.TypeEnum, -1, mysql.NotNullFlag, "YES", []string{"YES", "NO"}}, +} + +var setupInstrumentsCols = []columnInfo{ + {mysql.TypeVarchar, 128, mysql.NotNullFlag, nil, nil}, + {mysql.TypeEnum, -1, mysql.NotNullFlag, nil, []string{"YES", "NO"}}, + {mysql.TypeEnum, -1, mysql.NotNullFlag, nil, []string{"YES", "NO"}}, +} + +var setupConsumersCols = []columnInfo{ + {mysql.TypeVarchar, 64, mysql.NotNullFlag, nil, nil}, + {mysql.TypeEnum, -1, mysql.NotNullFlag, nil, []string{"YES", "NO"}}, +} + +var setupTimersCols = []columnInfo{ + {mysql.TypeVarchar, 64, mysql.NotNullFlag, nil, nil}, + {mysql.TypeEnum, -1, mysql.NotNullFlag, nil, []string{"NANOSECOND", "MICROSECOND", "MILLISECOND"}}, +} + +var stmtsCurrentCols = []columnInfo{ + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeVarchar, 128, mysql.NotNullFlag, nil, nil}, + {mysql.TypeVarchar, 64, 0, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLongBlob, -1, 0, nil, nil}, + {mysql.TypeVarchar, 32, 0, nil, nil}, + {mysql.TypeLongBlob, -1, 0, nil, nil}, + {mysql.TypeVarchar, 64, 0, nil, nil}, + {mysql.TypeVarchar, 64, 0, nil, nil}, + {mysql.TypeVarchar, 64, 0, nil, nil}, + {mysql.TypeVarchar, 64, 0, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLong, 11, 0, nil, nil}, + {mysql.TypeVarchar, 5, 0, nil, nil}, + {mysql.TypeVarchar, 128, 0, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeEnum, -1, 0, nil, []string{"TRANSACTION", "STATEMENT", "STAGE"}}, + {mysql.TypeLong, 11, 0, nil, nil}, +} + +var preparedStmtsInstancesCols = []columnInfo{ + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeVarchar, 64, 0, nil, nil}, + {mysql.TypeLongBlob, -1, mysql.NotNullFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeEnum, -1, 0, nil, []string{"EVENT", "FUNCTION", "TABLE"}}, + {mysql.TypeVarchar, 64, 0, nil, nil}, + {mysql.TypeVarchar, 64, 0, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, +} + +var transCurrentCols = []columnInfo{ + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeVarchar, 128, mysql.NotNullFlag, nil, nil}, + {mysql.TypeEnum, -1, 0, nil, []string{"ACTIVE", "COMMITTED", "ROLLED BACK"}}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeVarchar, 64, 0, nil, nil}, + {mysql.TypeLong, 11, 0, nil, nil}, + {mysql.TypeVarchar, 130, 0, nil, nil}, + {mysql.TypeVarchar, 130, 0, nil, nil}, + {mysql.TypeVarchar, 64, 0, nil, nil}, + {mysql.TypeVarchar, 64, 0, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeEnum, -1, 0, nil, []string{"READ ONLY", "READ WRITE"}}, + {mysql.TypeVarchar, 64, 0, nil, nil}, + {mysql.TypeEnum, -1, mysql.NotNullFlag, nil, []string{"YES", "NO"}}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeEnum, -1, 0, nil, []string{"TRANSACTION", "STATEMENT", "STAGE"}}, +} + +var stagesCurrentCols = []columnInfo{ + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.NotNullFlag | mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeVarchar, 128, mysql.NotNullFlag, nil, nil}, + {mysql.TypeVarchar, 64, 0, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeLonglong, 20, mysql.UnsignedFlag, nil, nil}, + {mysql.TypeEnum, -1, 0, nil, []string{"TRANSACTION", "STATEMENT", "STAGE"}}, +} + +func setColumnID(meta *model.TableInfo, store kv.Storage) error { + var err error + for _, c := range meta.Columns { + c.ID, err = genGlobalID(store) + if err != nil { + return errors.Trace(err) + } + } + return nil +} + +func genGlobalID(store kv.Storage) (int64, error) { + var globalID int64 + err := kv.RunInNewTxn(store, true, func(txn kv.Transaction) error { + var err error + globalID, err = meta.NewMeta(txn).GenGlobalID() + return errors.Trace(err) + }) + return globalID, errors.Trace(err) +} + +func createMemoryTable(meta *model.TableInfo, alloc autoid.Allocator) (table.Table, error) { + tbl, _ := tables.MemoryTableFromMeta(alloc, meta) + return tbl, nil +} + +func (ps *perfSchema) buildTables() error { + tbls := make([]*model.TableInfo, 0, len(ps.tables)) + ps.mTables = make(map[string]table.Table, len(ps.tables)) + dbID, err := genGlobalID(ps.store) + if err != nil { + return errors.Trace(err) + } + // Set PKIsHandle + // TableStmtsCurrent use THREAD_ID as PK and handle + tb := ps.tables[TableStmtsHistory] + tb.PKIsHandle = true + tb.Columns[0].Flag = tb.Columns[0].Flag | mysql.PriKeyFlag + + var tbl table.Table + for name, meta := range ps.tables { + tbls = append(tbls, meta) + meta.ID, err = genGlobalID(ps.store) + if err != nil { + return errors.Trace(err) + } + err = setColumnID(meta, ps.store) + if err != nil { + return errors.Trace(err) + } + alloc := autoid.NewMemoryAllocator(dbID) + tbl, err = createMemoryTable(meta, alloc) + if err != nil { + return errors.Trace(err) + } + ps.mTables[name] = tbl + } + ps.dbInfo = &model.DBInfo{ + ID: dbID, + Name: model.NewCIStr(Name), + Charset: mysql.DefaultCharset, + Collate: mysql.DefaultCollationName, + Tables: tbls, + } + return nil +} + +func (ps *perfSchema) buildModel(tbName string, colNames []string, cols []columnInfo) { + rcols := make([]*model.ColumnInfo, len(cols)) + for i, col := range cols { + var ci *model.ColumnInfo + if col.elems == nil { + ci = buildUsualColumnInfo(i, colNames[i], col.tp, col.size, col.flag, col.deflt) + } else { + ci = buildEnumColumnInfo(i, colNames[i], col.elems, col.flag, col.deflt) + } + rcols[i] = ci + } + + ps.tables[tbName] = &model.TableInfo{ + Name: model.NewCIStr(tbName), + Charset: "utf8", + Collate: "utf8", + Columns: rcols, + } +} + +func buildUsualColumnInfo(offset int, name string, tp byte, size int, flag uint, def interface{}) *model.ColumnInfo { + mCharset := charset.CharsetBin + mCollation := charset.CharsetBin + if tp == mysql.TypeString || tp == mysql.TypeVarchar || tp == mysql.TypeBlob || tp == mysql.TypeLongBlob { + mCharset = mysql.DefaultCharset + mCollation = mysql.DefaultCollationName + } + if def == nil { + flag |= mysql.NoDefaultValueFlag + } + // TODO: does TypeLongBlob need size? + fieldType := types.FieldType{ + Charset: mCharset, + Collate: mCollation, + Tp: tp, + Flen: size, + Flag: uint(flag), + } + colInfo := &model.ColumnInfo{ + Name: model.NewCIStr(name), + Offset: offset, + FieldType: fieldType, + DefaultValue: def, + State: model.StatePublic, + } + return colInfo +} + +func buildEnumColumnInfo(offset int, name string, elems []string, flag uint, def interface{}) *model.ColumnInfo { + mCharset := charset.CharsetBin + mCollation := charset.CharsetBin + if def == nil { + flag |= mysql.NoDefaultValueFlag + } + fieldType := types.FieldType{ + Charset: mCharset, + Collate: mCollation, + Tp: mysql.TypeEnum, + Flag: uint(flag), + Elems: elems, + } + colInfo := &model.ColumnInfo{ + Name: model.NewCIStr(name), + Offset: offset, + FieldType: fieldType, + DefaultValue: def, + State: model.StatePublic, + } + return colInfo +} + +func (ps *perfSchema) initRecords(tbName string, records [][]types.Datum) error { + tbl, ok := ps.mTables[tbName] + if !ok { + return errors.Errorf("Unknown PerformanceSchema table: %s", tbName) + } + for _, rec := range records { + _, err := tbl.AddRecord(nil, rec) + if err != nil { + return errors.Trace(err) + } + } + return nil +} + +var setupTimersRecords [][]types.Datum + +func (ps *perfSchema) initialize() (err error) { + ps.tables = make(map[string]*model.TableInfo) + + allColDefs := [][]columnInfo{ + setupActorsCols, + setupObjectsCols, + setupInstrumentsCols, + setupConsumersCols, + setupTimersCols, + stmtsCurrentCols, + stmtsCurrentCols, // same as above + stmtsCurrentCols, // same as above + preparedStmtsInstancesCols, + transCurrentCols, + transCurrentCols, // same as above + transCurrentCols, // same as above + stagesCurrentCols, + stagesCurrentCols, // same as above + stagesCurrentCols, // same as above + } + + allColNames := [][]string{ + ColumnSetupActors, + ColumnSetupObjects, + ColumnSetupInstruments, + ColumnSetupConsumers, + ColumnSetupTimers, + ColumnStmtsCurrent, + ColumnStmtsHistory, + ColumnStmtsHistoryLong, + ColumnPreparedStmtsInstances, + ColumnStmtsCurrent, + ColumnStmtsHistory, + ColumnStmtsHistoryLong, + ColumnStagesCurrent, + ColumnStagesHistory, + ColumnStagesHistoryLong, + } + + // initialize all table, column and result field definitions + for i, def := range allColDefs { + ps.buildModel(PerfSchemaTables[i], allColNames[i], def) + } + err = ps.buildTables() + if err != nil { + return errors.Trace(err) + } + + setupActorsRecords := [][]types.Datum{ + types.MakeDatums(`%`, `%`, `%`, mysql.Enum{Name: "YES", Value: 1}, mysql.Enum{Name: "YES", Value: 1}), + } + err = ps.initRecords(TableSetupActors, setupActorsRecords) + if err != nil { + return errors.Trace(err) + } + + setupObjectsRecords := [][]types.Datum{ + types.MakeDatums(mysql.Enum{Name: "EVENT", Value: 1}, "mysql", `%`, mysql.Enum{Name: "NO", Value: 2}, mysql.Enum{Name: "NO", Value: 2}), + types.MakeDatums(mysql.Enum{Name: "EVENT", Value: 1}, "performance_schema", `%`, mysql.Enum{Name: "NO", Value: 2}, mysql.Enum{Name: "NO", Value: 2}), + types.MakeDatums(mysql.Enum{Name: "EVENT", Value: 1}, "information_schema", `%`, mysql.Enum{Name: "NO", Value: 2}, mysql.Enum{Name: "NO", Value: 2}), + types.MakeDatums(mysql.Enum{Name: "EVENT", Value: 1}, `%`, `%`, mysql.Enum{Name: "YES", Value: 1}, mysql.Enum{Name: "YES", Value: 1}), + types.MakeDatums(mysql.Enum{Name: "FUNCTION", Value: 2}, "mysql", `%`, mysql.Enum{Name: "NO", Value: 2}, mysql.Enum{Name: "NO", Value: 2}), + types.MakeDatums(mysql.Enum{Name: "FUNCTION", Value: 2}, "performance_schema", `%`, mysql.Enum{Name: "NO", Value: 2}, mysql.Enum{Name: "NO", Value: 2}), + types.MakeDatums(mysql.Enum{Name: "FUNCTION", Value: 2}, "information_schema", `%`, mysql.Enum{Name: "NO", Value: 2}, mysql.Enum{Name: "NO", Value: 2}), + types.MakeDatums(mysql.Enum{Name: "FUNCTION", Value: 2}, `%`, `%`, mysql.Enum{Name: "YES", Value: 1}, mysql.Enum{Name: "YES", Value: 1}), + types.MakeDatums(mysql.Enum{Name: "TABLE", Value: 3}, "mysql", `%`, mysql.Enum{Name: "NO", Value: 2}, mysql.Enum{Name: "NO", Value: 2}), + types.MakeDatums(mysql.Enum{Name: "TABLE", Value: 3}, "performance_schema", `%`, mysql.Enum{Name: "NO", Value: 2}, mysql.Enum{Name: "NO", Value: 2}), + types.MakeDatums(mysql.Enum{Name: "TABLE", Value: 3}, "information_schema", `%`, mysql.Enum{Name: "NO", Value: 2}, mysql.Enum{Name: "NO", Value: 2}), + types.MakeDatums(mysql.Enum{Name: "TABLE", Value: 3}, `%`, `%`, mysql.Enum{Name: "YES", Value: 1}, mysql.Enum{Name: "YES", Value: 1}), + } + err = ps.initRecords(TableSetupObjects, setupObjectsRecords) + if err != nil { + return errors.Trace(err) + } + + setupConsumersRecords := [][]types.Datum{ + types.MakeDatums("events_stages_current", mysql.Enum{Name: "NO", Value: 2}), + types.MakeDatums("events_stages_history", mysql.Enum{Name: "NO", Value: 2}), + types.MakeDatums("events_stages_history_long", mysql.Enum{Name: "NO", Value: 2}), + types.MakeDatums("events_statements_current", mysql.Enum{Name: "YES", Value: 1}), + types.MakeDatums("events_statements_history", mysql.Enum{Name: "YES", Value: 1}), + types.MakeDatums("events_statements_history_long", mysql.Enum{Name: "NO", Value: 2}), + types.MakeDatums("events_transactions_current", mysql.Enum{Name: "YES", Value: 1}), + types.MakeDatums("events_transactions_history", mysql.Enum{Name: "YES", Value: 1}), + types.MakeDatums("events_transactions_history_long", mysql.Enum{Name: "YES", Value: 1}), + types.MakeDatums("global_instrumentation", mysql.Enum{Name: "YES", Value: 1}), + types.MakeDatums("thread_instrumentation", mysql.Enum{Name: "YES", Value: 1}), + types.MakeDatums("statements_digest", mysql.Enum{Name: "YES", Value: 1}), + } + err = ps.initRecords(TableSetupConsumers, setupConsumersRecords) + if err != nil { + return errors.Trace(err) + } + + setupTimersRecords = [][]types.Datum{ + types.MakeDatums("stage", mysql.Enum{Name: "NANOSECOND", Value: 1}), + types.MakeDatums("statement", mysql.Enum{Name: "NANOSECOND", Value: 1}), + types.MakeDatums("transaction", mysql.Enum{Name: "NANOSECOND", Value: 1}), + } + err = ps.initRecords(TableSetupTimers, setupTimersRecords) + if err != nil { + return errors.Trace(err) + } + + return nil +} + +func (ps *perfSchema) GetDBMeta() *model.DBInfo { + return ps.dbInfo +} + +func (ps *perfSchema) GetTable(name string) (table.Table, bool) { + tbl, ok := ps.mTables[name] + return tbl, ok +} diff --git a/vendor/github.com/pingcap/tidb/perfschema/instrument.go b/vendor/github.com/pingcap/tidb/perfschema/instrument.go new file mode 100644 index 000000000..43014225e --- /dev/null +++ b/vendor/github.com/pingcap/tidb/perfschema/instrument.go @@ -0,0 +1,85 @@ +// Copyright 2016 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package perfschema + +import ( + "fmt" + + "github.com/juju/errors" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/util/types" +) + +// EnumCallerName is used as a parameter to avoid calling runtime.Caller(1) since +// it is too expensive (500ns+ per call), we don't want to invoke it repeatedly for +// each instrument. +type EnumCallerName int + +const ( + // CallerNameSessionExecute is for session.go:Execute() method. + CallerNameSessionExecute EnumCallerName = iota + 1 +) + +const ( + stageInstrumentPrefix = "stage/" + statementInstrumentPrefix = "statement/" + transactionInstrumentPrefix = "transaction" +) + +// Flag indicators for table setup_timers. +const ( + flagStage = iota + 1 + flagStatement + flagTransaction +) + +type enumTimerName int + +// Enum values for the TIMER_NAME columns. +// This enum is found in the following tables: +// - performance_schema.setup_timer (TIMER_NAME) +const ( + timerNameNone enumTimerName = iota + timerNameNanosec + timerNameMicrosec + timerNameMillisec +) + +var ( + callerNames = make(map[EnumCallerName]string) +) + +// addInstrument is used to add an item to setup_instruments table. +func (ps *perfSchema) addInstrument(name string) (uint64, error) { + record := types.MakeDatums(name, mysql.Enum{Name: "YES", Value: 1}, mysql.Enum{Name: "YES", Value: 1}) + tbl := ps.mTables[TableSetupInstruments] + handle, err := tbl.AddRecord(nil, record) + return uint64(handle), errors.Trace(err) +} + +func (ps *perfSchema) getTimerName(flag int) (enumTimerName, error) { + if flag < 0 || flag >= len(setupTimersRecords) { + return timerNameNone, errors.Errorf("Unknown timerName flag %d", flag) + } + timerName := fmt.Sprintf("%s", setupTimersRecords[flag][1].GetString()) + switch timerName { + case "NANOSECOND": + return timerNameNanosec, nil + case "MICROSECOND": + return timerNameMicrosec, nil + case "MILLISECOND": + return timerNameMillisec, nil + } + return timerNameNone, nil +} diff --git a/vendor/github.com/pingcap/tidb/perfschema/perfschema.go b/vendor/github.com/pingcap/tidb/perfschema/perfschema.go new file mode 100644 index 000000000..91915a548 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/perfschema/perfschema.go @@ -0,0 +1,74 @@ +// Copyright 2016 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package perfschema + +import ( + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/table" +) + +// StatementInstrument defines the methods for statement instrumentation points +type StatementInstrument interface { + RegisterStatement(category, name string, elem interface{}) + + StartStatement(sql string, connID uint64, callerName EnumCallerName, elem interface{}) *StatementState + + EndStatement(state *StatementState) +} + +// PerfSchema defines the methods to be invoked by the executor +type PerfSchema interface { + + // For statement instrumentation only. + StatementInstrument + + // GetDBMeta returns db info for PerformanceSchema. + GetDBMeta() *model.DBInfo + // GetTable returns table instance for name. + GetTable(name string) (table.Table, bool) +} + +type perfSchema struct { + store kv.Storage + dbInfo *model.DBInfo + tables map[string]*model.TableInfo + mTables map[string]table.Table // MemoryTables for perfSchema + + // Used for TableStmtsHistory + historyHandles []int64 + historyCursor int +} + +var _ PerfSchema = (*perfSchema)(nil) + +// PerfHandle is the only access point for the in-memory performance schema information +var ( + PerfHandle PerfSchema +) + +// NewPerfHandle creates a new perfSchema on store. +func NewPerfHandle(store kv.Storage) PerfSchema { + schema := PerfHandle.(*perfSchema) + schema.store = store + schema.historyHandles = make([]int64, 0, stmtsHistoryElemMax) + _ = schema.initialize() + registerStatements() + return PerfHandle +} + +func init() { + schema := &perfSchema{} + PerfHandle = schema +} diff --git a/vendor/github.com/pingcap/tidb/perfschema/statement.go b/vendor/github.com/pingcap/tidb/perfschema/statement.go new file mode 100644 index 000000000..0e2717c3d --- /dev/null +++ b/vendor/github.com/pingcap/tidb/perfschema/statement.go @@ -0,0 +1,328 @@ +// Copyright 2016 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package perfschema + +import ( + "fmt" + "reflect" + "runtime" + "time" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/terror" + "github.com/pingcap/tidb/util/types" +) + +// statementInfo defines statement instrument information. +type statementInfo struct { + // The registered statement key + key uint64 + // The name of the statement instrument to register + name string +} + +// StatementState provides temporary storage to a statement runtime statistics. +// TODO: +// 1. support statement digest. +// 2. support prepared statement. +type StatementState struct { + // Connection identifier + connID uint64 + // Statement information + info *statementInfo + // Statement type + stmtType reflect.Type + // Source file and line number + source string + // Timer name + timerName enumTimerName + // Timer start + timerStart int64 + // Timer end + timerEnd int64 + // Locked time + lockTime int64 + // SQL statement string + sqlText string + // Current schema name + schemaName string + // Number of errors + errNum uint32 + // Number of warnings + warnNum uint32 + // Rows affected + rowsAffected uint64 + // Rows sent + rowsSent uint64 + // Rows examined + rowsExamined uint64 + // Metric, temporary tables created on disk + createdTmpDiskTables uint32 + // Metric, temproray tables created + createdTmpTables uint32 + // Metric, number of select full join + selectFullJoin uint32 + // Metric, number of select full range join + selectFullRangeJoin uint32 + // Metric, number of select range + selectRange uint32 + // Metric, number of select range check + selectRangeCheck uint32 + // Metric, number of select scan + selectScan uint32 + // Metric, number of sort merge passes + sortMergePasses uint32 + // Metric, number of sort merge + sortRange uint32 + // Metric, number of sort rows + sortRows uint32 + // Metric, number of sort scans + sortScan uint32 + // Metric, no index used flag + noIndexUsed uint8 + // Metric, no good index used flag + noGoodIndexUsed uint8 +} + +const ( + // Maximum allowed number of elements in table events_statements_history. + // TODO: make it configurable? + stmtsHistoryElemMax int = 1024 +) + +var ( + stmtInfos = make(map[reflect.Type]*statementInfo) +) + +func (ps *perfSchema) RegisterStatement(category, name string, elem interface{}) { + instrumentName := fmt.Sprintf("%s%s/%s", statementInstrumentPrefix, category, name) + key, err := ps.addInstrument(instrumentName) + if err != nil { + // just ignore, do nothing else. + log.Errorf("Unable to register instrument %s", instrumentName) + return + } + + stmtInfos[reflect.TypeOf(elem)] = &statementInfo{ + key: key, + name: instrumentName, + } +} + +func (ps *perfSchema) StartStatement(sql string, connID uint64, callerName EnumCallerName, elem interface{}) *StatementState { + stmtType := reflect.TypeOf(elem) + info, ok := stmtInfos[stmtType] + if !ok { + // just ignore, do nothing else. + log.Errorf("No instrument registered for statement %s", stmtType) + return nil + } + + // check and apply the configuration parameter in table setup_timers. + timerName, err := ps.getTimerName(flagStatement) + if err != nil { + // just ignore, do nothing else. + log.Error("Unable to check setup_timers table") + return nil + } + var timerStart int64 + switch timerName { + case timerNameNanosec: + timerStart = time.Now().UnixNano() + case timerNameMicrosec: + timerStart = time.Now().UnixNano() / int64(time.Microsecond) + case timerNameMillisec: + timerStart = time.Now().UnixNano() / int64(time.Millisecond) + default: + return nil + } + + // TODO: check and apply the additional configuration parameters in: + // - table setup_actors + // - table setup_setup_consumers + // - table setup_instruments + // - table setup_objects + + var source string + source, ok = callerNames[callerName] + if !ok { + _, fileName, fileLine, ok := runtime.Caller(1) + if !ok { + // just ignore, do nothing else. + log.Error("Unable to get runtime.Caller(1)") + return nil + } + source = fmt.Sprintf("%s:%d", fileName, fileLine) + callerNames[callerName] = source + } + + return &StatementState{ + connID: connID, + info: info, + stmtType: stmtType, + source: source, + timerName: timerName, + timerStart: timerStart, + sqlText: sql, + } +} + +func (ps *perfSchema) EndStatement(state *StatementState) { + if state == nil { + return + } + + switch state.timerName { + case timerNameNanosec: + state.timerEnd = time.Now().UnixNano() + case timerNameMicrosec: + state.timerEnd = time.Now().UnixNano() / int64(time.Microsecond) + case timerNameMillisec: + state.timerEnd = time.Now().UnixNano() / int64(time.Millisecond) + default: + return + } + + log.Debugf("EndStatement: sql %s, connection id %d, type %s", state.sqlText, state.connID, state.stmtType) + + record := state2Record(state) + err := ps.updateEventsStmtsCurrent(state.connID, record) + if err != nil { + log.Error("Unable to update events_statements_current table") + } + err = ps.appendEventsStmtsHistory(record) + if err != nil { + log.Errorf("Unable to append to events_statements_history table %v", errors.ErrorStack(err)) + } +} + +func state2Record(state *StatementState) []types.Datum { + return types.MakeDatums( + state.connID, // THREAD_ID + state.info.key, // EVENT_ID + nil, // END_EVENT_ID + state.info.name, // EVENT_NAME + state.source, // SOURCE + uint64(state.timerStart), // TIMER_START + uint64(state.timerEnd), // TIMER_END + nil, // TIMER_WAIT + uint64(state.lockTime), // LOCK_TIME + state.sqlText, // SQL_TEXT + nil, // DIGEST + nil, // DIGEST_TEXT + state.schemaName, // CURRENT_SCHEMA + nil, // OBJECT_TYPE + nil, // OBJECT_SCHEMA + nil, // OBJECT_NAME + nil, // OBJECT_INSTANCE_BEGIN + nil, // MYSQL_ERRNO, + nil, // RETURNED_SQLSTATE + nil, // MESSAGE_TEXT + uint64(state.errNum), // ERRORS + uint64(state.warnNum), // WARNINGS + state.rowsAffected, // ROWS_AFFECTED + state.rowsSent, // ROWS_SENT + state.rowsExamined, // ROWS_EXAMINED + uint64(state.createdTmpDiskTables), // CREATED_TMP_DISK_TABLES + uint64(state.createdTmpTables), // CREATED_TMP_TABLES + uint64(state.selectFullJoin), // SELECT_FULL_JOIN + uint64(state.selectFullRangeJoin), // SELECT_FULL_RANGE_JOIN + uint64(state.selectRange), // SELECT_RANGE + uint64(state.selectRangeCheck), // SELECT_RANGE_CHECK + uint64(state.selectScan), // SELECT_SCAN + uint64(state.sortMergePasses), // SORT_MERGE_PASSES + uint64(state.sortRange), // SORT_RANGE + uint64(state.sortRows), // SORT_ROWS + uint64(state.sortScan), // SORT_SCAN + uint64(state.noIndexUsed), // NO_INDEX_USED + uint64(state.noGoodIndexUsed), // NO_GOOD_INDEX_USED + nil, // NESTING_EVENT_ID + nil, // NESTING_EVENT_TYPE + nil, // NESTING_EVENT_LEVEL + ) +} + +func (ps *perfSchema) updateEventsStmtsCurrent(connID uint64, record []types.Datum) error { + // Try AddRecord + tbl := ps.mTables[TableStmtsCurrent] + _, err := tbl.AddRecord(nil, record) + if err == nil { + return nil + } + if terror.ErrorNotEqual(err, kv.ErrKeyExists) { + return errors.Trace(err) + } + // Update it + handle := int64(connID) + err = tbl.UpdateRecord(nil, handle, nil, record, nil) + return errors.Trace(err) +} + +func (ps *perfSchema) appendEventsStmtsHistory(record []types.Datum) error { + tbl := ps.mTables[TableStmtsHistory] + if len(ps.historyHandles) < stmtsHistoryElemMax { + h, err := tbl.AddRecord(nil, record) + if err == nil { + ps.historyHandles = append(ps.historyHandles, h) + return nil + } + if terror.ErrorNotEqual(err, kv.ErrKeyExists) { + return errors.Trace(err) + } + // THREAD_ID is PK + handle := int64(record[0].GetUint64()) + err = tbl.UpdateRecord(nil, handle, nil, record, nil) + return errors.Trace(err) + + } + // If histroy is full, replace old data + if ps.historyCursor >= len(ps.historyHandles) { + ps.historyCursor = 0 + } + h := ps.historyHandles[ps.historyCursor] + ps.historyCursor++ + err := tbl.UpdateRecord(nil, h, nil, record, nil) + return errors.Trace(err) +} + +func registerStatements() { + // Existing instrument names are the same as MySQL 5.7 + PerfHandle.RegisterStatement("sql", "alter_table", (*ast.AlterTableStmt)(nil)) + PerfHandle.RegisterStatement("sql", "begin", (*ast.BeginStmt)(nil)) + PerfHandle.RegisterStatement("sql", "commit", (*ast.CommitStmt)(nil)) + PerfHandle.RegisterStatement("sql", "create_db", (*ast.CreateDatabaseStmt)(nil)) + PerfHandle.RegisterStatement("sql", "create_index", (*ast.CreateIndexStmt)(nil)) + PerfHandle.RegisterStatement("sql", "create_table", (*ast.CreateTableStmt)(nil)) + PerfHandle.RegisterStatement("sql", "deallocate", (*ast.DeallocateStmt)(nil)) + PerfHandle.RegisterStatement("sql", "delete", (*ast.DeleteStmt)(nil)) + PerfHandle.RegisterStatement("sql", "do", (*ast.DoStmt)(nil)) + PerfHandle.RegisterStatement("sql", "drop_db", (*ast.DropDatabaseStmt)(nil)) + PerfHandle.RegisterStatement("sql", "drop_table", (*ast.DropTableStmt)(nil)) + PerfHandle.RegisterStatement("sql", "drop_index", (*ast.DropIndexStmt)(nil)) + PerfHandle.RegisterStatement("sql", "execute", (*ast.ExecuteStmt)(nil)) + PerfHandle.RegisterStatement("sql", "explain", (*ast.ExplainStmt)(nil)) + PerfHandle.RegisterStatement("sql", "insert", (*ast.InsertStmt)(nil)) + PerfHandle.RegisterStatement("sql", "prepare", (*ast.PrepareStmt)(nil)) + PerfHandle.RegisterStatement("sql", "rollback", (*ast.RollbackStmt)(nil)) + PerfHandle.RegisterStatement("sql", "select", (*ast.SelectStmt)(nil)) + PerfHandle.RegisterStatement("sql", "set", (*ast.SetStmt)(nil)) + PerfHandle.RegisterStatement("sql", "show", (*ast.ShowStmt)(nil)) + PerfHandle.RegisterStatement("sql", "truncate", (*ast.TruncateTableStmt)(nil)) + PerfHandle.RegisterStatement("sql", "union", (*ast.UnionStmt)(nil)) + PerfHandle.RegisterStatement("sql", "update", (*ast.UpdateStmt)(nil)) + PerfHandle.RegisterStatement("sql", "use", (*ast.UseStmt)(nil)) +} diff --git a/vendor/github.com/pingcap/tidb/privilege/privilege.go b/vendor/github.com/pingcap/tidb/privilege/privilege.go new file mode 100644 index 000000000..653baedc8 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/privilege/privilege.go @@ -0,0 +1,51 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package privilege + +import ( + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" +) + +type keyType int + +func (k keyType) String() string { + return "privilege-key" +} + +// Checker is the interface for check privileges. +type Checker interface { + // Check checks privilege. + // If tbl is nil, only check global/db scope privileges. + // If tbl is not nil, check global/db/table scope privileges. + Check(ctx context.Context, db *model.DBInfo, tbl *model.TableInfo, privilege mysql.PrivilegeType) (bool, error) + // Show granted privileges for user. + ShowGrants(ctx context.Context, user string) ([]string, error) +} + +const key keyType = 0 + +// BindPrivilegeChecker binds Checker to context. +func BindPrivilegeChecker(ctx context.Context, pc Checker) { + ctx.SetValue(key, pc) +} + +// GetPrivilegeChecker gets Checker from context. +func GetPrivilegeChecker(ctx context.Context) Checker { + if v, ok := ctx.Value(key).(Checker); ok { + return v + } + return nil +} diff --git a/vendor/github.com/pingcap/tidb/privilege/privileges/privileges.go b/vendor/github.com/pingcap/tidb/privilege/privileges/privileges.go new file mode 100644 index 000000000..7ff658806 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/privilege/privileges/privileges.go @@ -0,0 +1,381 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package privileges + +import ( + "fmt" + "strings" + + "github.com/juju/errors" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/privilege" + "github.com/pingcap/tidb/sessionctx/variable" + "github.com/pingcap/tidb/util/sqlexec" + "github.com/pingcap/tidb/util/types" +) + +var _ privilege.Checker = (*UserPrivileges)(nil) + +type privileges struct { + Level ast.GrantLevelType + privs map[mysql.PrivilegeType]bool +} + +func (ps *privileges) contain(p mysql.PrivilegeType) bool { + if ps.privs == nil { + return false + } + _, ok := ps.privs[p] + return ok +} + +func (ps *privileges) add(p mysql.PrivilegeType) { + if ps.privs == nil { + ps.privs = make(map[mysql.PrivilegeType]bool) + } + ps.privs[p] = true +} + +func (ps *privileges) String() string { + switch ps.Level { + case ast.GrantLevelGlobal: + return ps.globalPrivToString() + case ast.GrantLevelDB: + return ps.dbPrivToString() + case ast.GrantLevelTable: + return ps.tablePrivToString() + } + return "" +} + +func (ps *privileges) globalPrivToString() string { + if len(ps.privs) == len(mysql.AllGlobalPrivs) { + return mysql.AllPrivilegeLiteral + } + pstrs := make([]string, 0, len(ps.privs)) + // Iterate AllGlobalPrivs to get stable order result. + for _, p := range mysql.AllGlobalPrivs { + _, ok := ps.privs[p] + if !ok { + continue + } + s, _ := mysql.Priv2Str[p] + pstrs = append(pstrs, s) + } + return strings.Join(pstrs, ",") +} + +func (ps *privileges) dbPrivToString() string { + if len(ps.privs) == len(mysql.AllDBPrivs) { + return mysql.AllPrivilegeLiteral + } + pstrs := make([]string, 0, len(ps.privs)) + // Iterate AllDBPrivs to get stable order result. + for _, p := range mysql.AllDBPrivs { + _, ok := ps.privs[p] + if !ok { + continue + } + s, _ := mysql.Priv2SetStr[p] + pstrs = append(pstrs, s) + } + return strings.Join(pstrs, ",") +} + +func (ps *privileges) tablePrivToString() string { + if len(ps.privs) == len(mysql.AllTablePrivs) { + return mysql.AllPrivilegeLiteral + } + pstrs := make([]string, 0, len(ps.privs)) + // Iterate AllTablePrivs to get stable order result. + for _, p := range mysql.AllTablePrivs { + _, ok := ps.privs[p] + if !ok { + continue + } + s, _ := mysql.Priv2Str[p] + pstrs = append(pstrs, s) + } + return strings.Join(pstrs, ",") +} + +type userPrivileges struct { + User string + Host string + // Global privileges + GlobalPrivs *privileges + // DBName-privileges + DBPrivs map[string]*privileges + // DBName-TableName-privileges + TablePrivs map[string]map[string]*privileges +} + +func (ps *userPrivileges) ShowGrants() []string { + gs := []string{} + // Show global grants + g := ps.GlobalPrivs.String() + if len(g) > 0 { + s := fmt.Sprintf(`GRANT %s ON *.* TO '%s'@'%s'`, g, ps.User, ps.Host) + gs = append(gs, s) + } + // Show db scope grants + for d, p := range ps.DBPrivs { + g := p.String() + if len(g) > 0 { + s := fmt.Sprintf(`GRANT %s ON %s.* TO '%s'@'%s'`, g, d, ps.User, ps.Host) + gs = append(gs, s) + } + } + // Show table scope grants + for d, dps := range ps.TablePrivs { + for t, p := range dps { + g := p.String() + if len(g) > 0 { + s := fmt.Sprintf(`GRANT %s ON %s.%s TO '%s'@'%s'`, g, d, t, ps.User, ps.Host) + gs = append(gs, s) + } + } + } + return gs +} + +// UserPrivileges implements privilege.Checker interface. +// This is used to check privilege for the current user. +type UserPrivileges struct { + User string + privs *userPrivileges +} + +// Check implements Checker.Check interface. +func (p *UserPrivileges) Check(ctx context.Context, db *model.DBInfo, tbl *model.TableInfo, privilege mysql.PrivilegeType) (bool, error) { + if p.privs == nil { + // Lazy load + if len(p.User) == 0 { + // User current user + p.User = variable.GetSessionVars(ctx).User + if len(p.User) == 0 { + // In embedded db mode, user does not need to login. So we do not have username. + // TODO: remove this check latter. + return true, nil + } + } + err := p.loadPrivileges(ctx) + if err != nil { + return false, errors.Trace(err) + } + } + // Check global scope privileges. + ok := p.privs.GlobalPrivs.contain(privilege) + if ok { + return true, nil + } + // Check db scope privileges. + dbp, ok := p.privs.DBPrivs[db.Name.O] + if ok { + ok = dbp.contain(privilege) + if ok { + return true, nil + } + } + if tbl == nil { + return false, nil + } + // Check table scope privileges. + dbTbl, ok := p.privs.TablePrivs[db.Name.O] + if !ok { + return false, nil + } + tblp, ok := dbTbl[tbl.Name.O] + if !ok { + return false, nil + } + return tblp.contain(privilege), nil +} + +func (p *UserPrivileges) loadPrivileges(ctx context.Context) error { + strs := strings.Split(p.User, "@") + if len(strs) != 2 { + return errors.Errorf("Wrong username format: %s", p.User) + } + username, host := strs[0], strs[1] + p.privs = &userPrivileges{ + User: username, + Host: host, + } + // Load privileges from mysql.User/DB/Table_privs/Column_privs table + err := p.loadGlobalPrivileges(ctx) + if err != nil { + return errors.Trace(err) + } + err = p.loadDBScopePrivileges(ctx) + if err != nil { + return errors.Trace(err) + } + err = p.loadTableScopePrivileges(ctx) + if err != nil { + return errors.Trace(err) + } + // TODO: consider column scope privilege latter. + return nil +} + +// mysql.User/mysql.DB table privilege columns start from index 3. +// See: booststrap.go CreateUserTable/CreateDBPrivTable +const userTablePrivColumnStartIndex = 3 +const dbTablePrivColumnStartIndex = 3 + +func (p *UserPrivileges) loadGlobalPrivileges(ctx context.Context) error { + sql := fmt.Sprintf(`SELECT * FROM %s.%s WHERE User="%s" AND (Host="%s" OR Host="%%");`, + mysql.SystemDB, mysql.UserTable, p.privs.User, p.privs.Host) + rs, err := ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(ctx, sql) + if err != nil { + return errors.Trace(err) + } + defer rs.Close() + ps := &privileges{Level: ast.GrantLevelGlobal} + fs, err := rs.Fields() + if err != nil { + return errors.Trace(err) + } + for { + row, err := rs.Next() + if err != nil { + return errors.Trace(err) + } + if row == nil { + break + } + for i := userTablePrivColumnStartIndex; i < len(fs); i++ { + d := row.Data[i] + if d.Kind() != types.KindMysqlEnum { + return errors.Errorf("Privilege should be mysql.Enum: %v(%T)", d, d) + } + ed := d.GetMysqlEnum() + if ed.String() != "Y" { + continue + } + f := fs[i] + p, ok := mysql.Col2PrivType[f.ColumnAsName.O] + if !ok { + return errors.New("Unknown Privilege Type!") + } + ps.add(p) + } + } + p.privs.GlobalPrivs = ps + return nil +} + +func (p *UserPrivileges) loadDBScopePrivileges(ctx context.Context) error { + sql := fmt.Sprintf(`SELECT * FROM %s.%s WHERE User="%s" AND (Host="%s" OR Host="%%");`, + mysql.SystemDB, mysql.DBTable, p.privs.User, p.privs.Host) + rs, err := ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(ctx, sql) + if err != nil { + return errors.Trace(err) + } + defer rs.Close() + ps := make(map[string]*privileges) + fs, err := rs.Fields() + if err != nil { + return errors.Trace(err) + } + for { + row, err := rs.Next() + if err != nil { + return errors.Trace(err) + } + if row == nil { + break + } + // DB + dbStr := row.Data[1].GetString() + ps[dbStr] = &privileges{Level: ast.GrantLevelDB} + for i := dbTablePrivColumnStartIndex; i < len(fs); i++ { + d := row.Data[i] + if d.Kind() != types.KindMysqlEnum { + return errors.Errorf("Privilege should be mysql.Enum: %v(%T)", d, d) + } + ed := d.GetMysqlEnum() + if ed.String() != "Y" { + continue + } + f := fs[i] + p, ok := mysql.Col2PrivType[f.ColumnAsName.O] + if !ok { + return errors.New("Unknown Privilege Type!") + } + ps[dbStr].add(p) + } + } + p.privs.DBPrivs = ps + return nil +} + +func (p *UserPrivileges) loadTableScopePrivileges(ctx context.Context) error { + sql := fmt.Sprintf(`SELECT * FROM %s.%s WHERE User="%s" AND (Host="%s" OR Host="%%");`, + mysql.SystemDB, mysql.TablePrivTable, p.privs.User, p.privs.Host) + rs, err := ctx.(sqlexec.RestrictedSQLExecutor).ExecRestrictedSQL(ctx, sql) + if err != nil { + return errors.Trace(err) + } + defer rs.Close() + ps := make(map[string]map[string]*privileges) + for { + row, err := rs.Next() + if err != nil { + return errors.Trace(err) + } + if row == nil { + break + } + // DB + dbStr := row.Data[1].GetString() + // Table_name + tblStr := row.Data[3].GetString() + _, ok := ps[dbStr] + if !ok { + ps[dbStr] = make(map[string]*privileges) + } + ps[dbStr][tblStr] = &privileges{Level: ast.GrantLevelTable} + // Table_priv + tblPrivs := row.Data[6].GetMysqlSet() + pvs := strings.Split(tblPrivs.Name, ",") + for _, d := range pvs { + p, ok := mysql.SetStr2Priv[d] + if !ok { + return errors.New("Unknown Privilege Type!") + } + ps[dbStr][tblStr].add(p) + } + } + p.privs.TablePrivs = ps + return nil +} + +// ShowGrants implements privilege.Checker ShowGrants interface. +func (p *UserPrivileges) ShowGrants(ctx context.Context, user string) ([]string, error) { + // If user is current user + if user == p.User { + return p.privs.ShowGrants(), nil + } + userp := &UserPrivileges{User: user} + err := userp.loadPrivileges(ctx) + if err != nil { + return nil, errors.Trace(err) + } + return userp.privs.ShowGrants(), nil +} diff --git a/vendor/github.com/pingcap/tidb/session.go b/vendor/github.com/pingcap/tidb/session.go new file mode 100644 index 000000000..691558ff3 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/session.go @@ -0,0 +1,660 @@ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package tidb + +import ( + "bytes" + "encoding/json" + "fmt" + "strings" + "sync" + "sync/atomic" + "time" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/executor" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/meta" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/perfschema" + "github.com/pingcap/tidb/privilege" + "github.com/pingcap/tidb/privilege/privileges" + "github.com/pingcap/tidb/sessionctx" + "github.com/pingcap/tidb/sessionctx/autocommit" + "github.com/pingcap/tidb/sessionctx/db" + "github.com/pingcap/tidb/sessionctx/forupdate" + "github.com/pingcap/tidb/sessionctx/variable" + "github.com/pingcap/tidb/store/localstore" + "github.com/pingcap/tidb/terror" + "github.com/pingcap/tidb/util" + "github.com/pingcap/tidb/util/types" +) + +// Session context +type Session interface { + Status() uint16 // Flag of current status, such as autocommit + LastInsertID() uint64 // Last inserted auto_increment id + AffectedRows() uint64 // Affected rows by lastest executed stmt + Execute(sql string) ([]ast.RecordSet, error) // Execute a sql statement + String() string // For debug + FinishTxn(rollback bool) error + // For execute prepare statement in binary protocol + PrepareStmt(sql string) (stmtID uint32, paramCount int, fields []*ast.ResultField, err error) + // Execute a prepared statement + ExecutePreparedStmt(stmtID uint32, param ...interface{}) (ast.RecordSet, error) + DropPreparedStmt(stmtID uint32) error + SetClientCapability(uint32) // Set client capability flags + SetConnectionID(uint64) + Close() error + Retry() error + Auth(user string, auth []byte, salt []byte) bool +} + +var ( + _ Session = (*session)(nil) + sessionID int64 + sessionMu sync.Mutex +) + +type stmtRecord struct { + stmtID uint32 + st ast.Statement + params []interface{} +} + +type stmtHistory struct { + history []*stmtRecord +} + +func (h *stmtHistory) add(stmtID uint32, st ast.Statement, params ...interface{}) { + s := &stmtRecord{ + stmtID: stmtID, + st: st, + params: append(([]interface{})(nil), params...), + } + h.history = append(h.history, s) +} + +func (h *stmtHistory) reset() { + if len(h.history) > 0 { + h.history = h.history[:0] + } +} + +func (h *stmtHistory) clone() *stmtHistory { + nh := *h + nh.history = make([]*stmtRecord, len(h.history)) + copy(nh.history, h.history) + return &nh +} + +const unlimitedRetryCnt = -1 + +type session struct { + txn kv.Transaction // Current transaction + args []interface{} // Statment execution args, this should be cleaned up after exec + values map[fmt.Stringer]interface{} + store kv.Storage + sid int64 + history stmtHistory + initing bool // Running bootstrap using this session. + retrying bool + maxRetryCnt int // Max retry times. If maxRetryCnt <=0, there is no limitation for retry times. + + debugInfos map[string]interface{} // Vars for debug and unit tests. + + // For performance_schema only. + stmtState *perfschema.StatementState +} + +func (s *session) Status() uint16 { + return variable.GetSessionVars(s).Status +} + +func (s *session) LastInsertID() uint64 { + return variable.GetSessionVars(s).LastInsertID +} + +func (s *session) AffectedRows() uint64 { + return variable.GetSessionVars(s).AffectedRows +} + +func (s *session) resetHistory() { + s.ClearValue(forupdate.ForUpdateKey) + s.history.reset() +} + +func (s *session) SetClientCapability(capability uint32) { + variable.GetSessionVars(s).ClientCapability = capability +} + +func (s *session) SetConnectionID(connectionID uint64) { + variable.GetSessionVars(s).ConnectionID = connectionID +} + +func (s *session) FinishTxn(rollback bool) error { + // transaction has already been committed or rolled back + if s.txn == nil { + return nil + } + defer func() { + s.txn = nil + variable.GetSessionVars(s).SetStatusFlag(mysql.ServerStatusInTrans, false) + }() + + if rollback { + s.resetHistory() + return s.txn.Rollback() + } + + err := s.txn.Commit() + if err != nil { + if !s.retrying && kv.IsRetryableError(err) { + err = s.Retry() + } + if err != nil { + log.Warnf("txn:%s, %v", s.txn, err) + return errors.Trace(err) + } + } + + s.resetHistory() + return nil +} + +func (s *session) String() string { + // TODO: how to print binded context in values appropriately? + data := map[string]interface{}{ + "currDBName": db.GetCurrentSchema(s), + "sid": s.sid, + } + + if s.txn != nil { + // if txn is committed or rolled back, txn is nil. + data["txn"] = s.txn.String() + } + + b, _ := json.MarshalIndent(data, "", " ") + return string(b) +} + +func (s *session) Retry() error { + s.retrying = true + nh := s.history.clone() + // Debug infos. + if len(nh.history) == 0 { + s.debugInfos[retryEmptyHistoryList] = true + } else { + s.debugInfos[retryEmptyHistoryList] = false + } + defer func() { + s.history.history = nh.history + s.retrying = false + }() + + if forUpdate := s.Value(forupdate.ForUpdateKey); forUpdate != nil { + return errors.Errorf("can not retry select for update statement") + } + var err error + retryCnt := 0 + for { + s.resetHistory() + s.FinishTxn(true) + success := true + for _, sr := range nh.history { + st := sr.st + log.Warnf("Retry %s", st.OriginText()) + _, err = runStmt(s, st) + if err != nil { + if kv.IsRetryableError(err) { + success = false + break + } + log.Warnf("session:%v, err:%v", s, err) + return errors.Trace(err) + } + } + if success { + err = s.FinishTxn(false) + if !kv.IsRetryableError(err) { + break + } + } + retryCnt++ + if (s.maxRetryCnt != unlimitedRetryCnt) && (retryCnt >= s.maxRetryCnt) { + return errors.Trace(err) + } + kv.BackOff(retryCnt) + } + return err +} + +// ExecRestrictedSQL implements SQLHelper interface. +// This is used for executing some restricted sql statements. +func (s *session) ExecRestrictedSQL(ctx context.Context, sql string) (ast.RecordSet, error) { + rawStmts, err := Parse(ctx, sql) + if err != nil { + return nil, errors.Trace(err) + } + if len(rawStmts) != 1 { + log.Errorf("ExecRestrictedSQL only executes one statement. Too many/few statement in %s", sql) + return nil, errors.New("Wrong number of statement.") + } + st, err := Compile(s, rawStmts[0]) + if err != nil { + log.Errorf("Compile %s with error: %v", sql, err) + return nil, errors.Trace(err) + } + // Check statement for some restriction + // For example only support DML on system meta table. + // TODO: Add more restrictions. + log.Debugf("Executing %s [%s]", st.OriginText(), sql) + rs, err := st.Exec(ctx) + return rs, errors.Trace(err) +} + +// getExecRet executes restricted sql and the result is one column. +// It returns a string value. +func (s *session) getExecRet(ctx context.Context, sql string) (string, error) { + cleanTxn := s.txn == nil + rs, err := s.ExecRestrictedSQL(ctx, sql) + if err != nil { + return "", errors.Trace(err) + } + defer rs.Close() + row, err := rs.Next() + if err != nil { + return "", errors.Trace(err) + } + if row == nil { + return "", terror.ExecResultIsEmpty + } + value, err := types.ToString(row.Data[0].GetValue()) + if err != nil { + return "", errors.Trace(err) + } + if cleanTxn { + // This function has some side effect. Run select may create new txn. + // We should make environment unchanged. + s.txn = nil + } + return value, nil +} + +// GetGlobalSysVar implements GlobalVarAccessor.GetGlobalSysVar interface. +func (s *session) GetGlobalSysVar(ctx context.Context, name string) (string, error) { + sql := fmt.Sprintf(`SELECT VARIABLE_VALUE FROM %s.%s WHERE VARIABLE_NAME="%s";`, + mysql.SystemDB, mysql.GlobalVariablesTable, name) + sysVar, err := s.getExecRet(ctx, sql) + if err != nil { + if terror.ExecResultIsEmpty.Equal(err) { + return "", variable.UnknownSystemVar.Gen("unknown sys variable:%s", name) + } + return "", errors.Trace(err) + } + return sysVar, nil +} + +// SetGlobalSysVar implements GlobalVarAccessor.SetGlobalSysVar interface. +func (s *session) SetGlobalSysVar(ctx context.Context, name string, value string) error { + sql := fmt.Sprintf(`UPDATE %s.%s SET VARIABLE_VALUE="%s" WHERE VARIABLE_NAME="%s";`, + mysql.SystemDB, mysql.GlobalVariablesTable, value, strings.ToLower(name)) + _, err := s.ExecRestrictedSQL(ctx, sql) + return errors.Trace(err) +} + +// IsAutocommit checks if it is in the auto-commit mode. +func (s *session) isAutocommit(ctx context.Context) bool { + autocommit, ok := variable.GetSessionVars(ctx).Systems["autocommit"] + if !ok { + if s.initing { + return false + } + var err error + autocommit, err = s.GetGlobalSysVar(ctx, "autocommit") + if err != nil { + log.Errorf("Get global sys var error: %v", err) + return false + } + variable.GetSessionVars(ctx).Systems["autocommit"] = autocommit + ok = true + } + if ok && (autocommit == "ON" || autocommit == "on" || autocommit == "1") { + variable.GetSessionVars(ctx).SetStatusFlag(mysql.ServerStatusAutocommit, true) + return true + } + variable.GetSessionVars(ctx).SetStatusFlag(mysql.ServerStatusAutocommit, false) + return false +} + +func (s *session) ShouldAutocommit(ctx context.Context) bool { + // With START TRANSACTION, autocommit remains disabled until you end + // the transaction with COMMIT or ROLLBACK. + if variable.GetSessionVars(ctx).Status&mysql.ServerStatusInTrans == 0 && s.isAutocommit(ctx) { + return true + } + return false +} + +func (s *session) Execute(sql string) ([]ast.RecordSet, error) { + rawStmts, err := Parse(s, sql) + if err != nil { + return nil, errors.Trace(err) + } + var rs []ast.RecordSet + for i, rst := range rawStmts { + st, err1 := Compile(s, rst) + if err1 != nil { + log.Errorf("Syntax error: %s", sql) + log.Errorf("Error occurs at %s.", err1) + return nil, errors.Trace(err1) + } + id := variable.GetSessionVars(s).ConnectionID + s.stmtState = perfschema.PerfHandle.StartStatement(sql, id, perfschema.CallerNameSessionExecute, rawStmts[i]) + r, err := runStmt(s, st) + perfschema.PerfHandle.EndStatement(s.stmtState) + if err != nil { + log.Warnf("session:%v, err:%v", s, err) + return nil, errors.Trace(err) + } + if r != nil { + rs = append(rs, r) + } + } + return rs, nil +} + +// For execute prepare statement in binary protocol +func (s *session) PrepareStmt(sql string) (stmtID uint32, paramCount int, fields []*ast.ResultField, err error) { + prepareExec := &executor.PrepareExec{ + IS: sessionctx.GetDomain(s).InfoSchema(), + Ctx: s, + SQLText: sql, + } + prepareExec.DoPrepare() + return prepareExec.ID, prepareExec.ParamCount, prepareExec.ResultFields, prepareExec.Err +} + +// checkArgs makes sure all the arguments' types are known and can be handled. +// integer types are converted to int64 and uint64, time.Time is converted to mysql.Time. +// time.Duration is converted to mysql.Duration, other known types are leaved as it is. +func checkArgs(args ...interface{}) error { + for i, v := range args { + switch x := v.(type) { + case bool: + if x { + args[i] = int64(1) + } else { + args[i] = int64(0) + } + case int8: + args[i] = int64(x) + case int16: + args[i] = int64(x) + case int32: + args[i] = int64(x) + case int: + args[i] = int64(x) + case uint8: + args[i] = uint64(x) + case uint16: + args[i] = uint64(x) + case uint32: + args[i] = uint64(x) + case uint: + args[i] = uint64(x) + case int64: + case uint64: + case float32: + case float64: + case string: + case []byte: + case time.Duration: + args[i] = mysql.Duration{Duration: x} + case time.Time: + args[i] = mysql.Time{Time: x, Type: mysql.TypeDatetime} + case nil: + default: + return errors.Errorf("cannot use arg[%d] (type %T):unsupported type", i, v) + } + } + return nil +} + +// Execute a prepared statement +func (s *session) ExecutePreparedStmt(stmtID uint32, args ...interface{}) (ast.RecordSet, error) { + err := checkArgs(args...) + if err != nil { + return nil, err + } + st := executor.CompileExecutePreparedStmt(s, stmtID, args...) + r, err := runStmt(s, st, args...) + return r, errors.Trace(err) +} + +func (s *session) DropPreparedStmt(stmtID uint32) error { + vars := variable.GetSessionVars(s) + if _, ok := vars.PreparedStmts[stmtID]; !ok { + return executor.ErrStmtNotFound + } + delete(vars.PreparedStmts, stmtID) + return nil +} + +// If forceNew is true, GetTxn() must return a new transaction. +// In this situation, if current transaction is still in progress, +// there will be an implicit commit and create a new transaction. +func (s *session) GetTxn(forceNew bool) (kv.Transaction, error) { + var err error + if s.txn == nil { + s.resetHistory() + s.txn, err = s.store.Begin() + if err != nil { + return nil, errors.Trace(err) + } + if !s.isAutocommit(s) { + variable.GetSessionVars(s).SetStatusFlag(mysql.ServerStatusInTrans, true) + } + log.Infof("New txn:%s in session:%d", s.txn, s.sid) + return s.txn, nil + } + if forceNew { + err = s.FinishTxn(false) + if err != nil { + return nil, errors.Trace(err) + } + s.txn, err = s.store.Begin() + if err != nil { + return nil, errors.Trace(err) + } + if !s.isAutocommit(s) { + variable.GetSessionVars(s).SetStatusFlag(mysql.ServerStatusInTrans, true) + } + log.Warnf("Force new txn:%s in session:%d", s.txn, s.sid) + } + return s.txn, nil +} + +func (s *session) SetValue(key fmt.Stringer, value interface{}) { + s.values[key] = value +} + +func (s *session) Value(key fmt.Stringer) interface{} { + value := s.values[key] + return value +} + +func (s *session) ClearValue(key fmt.Stringer) { + delete(s.values, key) +} + +// Close function does some clean work when session end. +func (s *session) Close() error { + return s.FinishTxn(true) +} + +func (s *session) getPassword(name, host string) (string, error) { + // Get password for name and host. + authSQL := fmt.Sprintf("SELECT Password FROM %s.%s WHERE User='%s' and Host='%s';", mysql.SystemDB, mysql.UserTable, name, host) + pwd, err := s.getExecRet(s, authSQL) + if err == nil { + return pwd, nil + } else if !terror.ExecResultIsEmpty.Equal(err) { + return "", errors.Trace(err) + } + //Try to get user password for name with any host(%). + authSQL = fmt.Sprintf("SELECT Password FROM %s.%s WHERE User='%s' and Host='%%';", mysql.SystemDB, mysql.UserTable, name) + pwd, err = s.getExecRet(s, authSQL) + return pwd, errors.Trace(err) +} + +func (s *session) Auth(user string, auth []byte, salt []byte) bool { + strs := strings.Split(user, "@") + if len(strs) != 2 { + log.Warnf("Invalid format for user: %s", user) + return false + } + // Get user password. + name := strs[0] + host := strs[1] + pwd, err := s.getPassword(name, host) + if err != nil { + if terror.ExecResultIsEmpty.Equal(err) { + log.Errorf("User [%s] not exist %v", name, err) + } else { + log.Errorf("Get User [%s] password from SystemDB error %v", name, err) + } + return false + } + if len(pwd) != 0 && len(pwd) != 40 { + log.Errorf("User [%s] password from SystemDB not like a sha1sum", name) + return false + } + hpwd, err := util.DecodePassword(pwd) + if err != nil { + log.Errorf("Decode password string error %v", err) + return false + } + checkAuth := util.CalcPassword(salt, hpwd) + if !bytes.Equal(auth, checkAuth) { + return false + } + variable.GetSessionVars(s).SetCurrentUser(user) + return true +} + +// Some vars name for debug. +const ( + retryEmptyHistoryList = "RetryEmptyHistoryList" +) + +// CreateSession creates a new session environment. +func CreateSession(store kv.Storage) (Session, error) { + s := &session{ + values: make(map[fmt.Stringer]interface{}), + store: store, + sid: atomic.AddInt64(&sessionID, 1), + debugInfos: make(map[string]interface{}), + retrying: false, + maxRetryCnt: 10, + } + domain, err := domap.Get(store) + if err != nil { + return nil, err + } + sessionctx.BindDomain(s, domain) + + variable.BindSessionVars(s) + variable.GetSessionVars(s).SetStatusFlag(mysql.ServerStatusAutocommit, true) + + // session implements variable.GlobalVarAccessor. Bind it to ctx. + variable.BindGlobalVarAccessor(s, s) + + // session implements autocommit.Checker. Bind it to ctx + autocommit.BindAutocommitChecker(s, s) + sessionMu.Lock() + defer sessionMu.Unlock() + + ok := isBoostrapped(store) + if !ok { + // if no bootstrap and storage is remote, we must use a little lease time to + // bootstrap quickly, after bootstrapped, we will reset the lease time. + // TODO: Using a bootstap tool for doing this may be better later. + if !localstore.IsLocalStore(store) { + sessionctx.GetDomain(s).SetLease(100 * time.Millisecond) + } + + s.initing = true + bootstrap(s) + s.initing = false + + if !localstore.IsLocalStore(store) { + sessionctx.GetDomain(s).SetLease(schemaLease) + } + + finishBoostrap(store) + } + + // TODO: Add auth here + privChecker := &privileges.UserPrivileges{} + privilege.BindPrivilegeChecker(s, privChecker) + return s, nil +} + +func isBoostrapped(store kv.Storage) bool { + // check in memory + _, ok := storeBootstrapped[store.UUID()] + if ok { + return true + } + + // check in kv store + err := kv.RunInNewTxn(store, false, func(txn kv.Transaction) error { + var err error + t := meta.NewMeta(txn) + ok, err = t.IsBootstrapped() + return errors.Trace(err) + }) + + if err != nil { + log.Fatalf("check bootstrapped err %v", err) + } + + if ok { + // here mean memory is not ok, but other server has already finished it + storeBootstrapped[store.UUID()] = true + } + + return ok +} + +func finishBoostrap(store kv.Storage) { + storeBootstrapped[store.UUID()] = true + + err := kv.RunInNewTxn(store, true, func(txn kv.Transaction) error { + t := meta.NewMeta(txn) + err := t.FinishBootstrap() + return errors.Trace(err) + }) + if err != nil { + log.Fatalf("finish bootstrap err %v", err) + } +} diff --git a/vendor/github.com/pingcap/tidb/sessionctx/autocommit/autocommit.go b/vendor/github.com/pingcap/tidb/sessionctx/autocommit/autocommit.go new file mode 100644 index 000000000..089acbb04 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/sessionctx/autocommit/autocommit.go @@ -0,0 +1,49 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package autocommit + +import ( + "github.com/pingcap/tidb/context" +) + +// Checker is the interface checks if it should autocommit in the context. +// TODO: Choose a better name. +type Checker interface { + // ShouldAutocommit returns true if it should autocommit in the context. + ShouldAutocommit(ctx context.Context) bool +} + +// keyType is a dummy type to avoid naming collision in context. +type keyType int + +// String defines a Stringer function for debugging and pretty printing. +func (k keyType) String() string { + return "autocommit_checker" +} + +const key keyType = 0 + +// BindAutocommitChecker binds autocommit checker to context. +func BindAutocommitChecker(ctx context.Context, checker Checker) { + ctx.SetValue(key, checker) +} + +// ShouldAutocommit gets checker from ctx and checks if it should autocommit. +func ShouldAutocommit(ctx context.Context) bool { + v, ok := ctx.Value(key).(Checker) + if !ok { + panic("Miss autocommit checker") + } + return v.ShouldAutocommit(ctx) +} diff --git a/vendor/github.com/pingcap/tidb/sessionctx/db/db.go b/vendor/github.com/pingcap/tidb/sessionctx/db/db.go new file mode 100644 index 000000000..1917ce9a1 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/sessionctx/db/db.go @@ -0,0 +1,42 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package db + +import ( + "github.com/pingcap/tidb/context" +) + +// currentDBKeyType is a dummy type to avoid naming collision in context. +type currentDBKeyType int + +// String defines a Stringer function for debugging and pretty printing. +func (k currentDBKeyType) String() string { + return "current_db" +} + +const currentDBKey currentDBKeyType = 0 + +// BindCurrentSchema saves parameter schema as current schema name value into context. +func BindCurrentSchema(ctx context.Context, schema string) { + ctx.SetValue(currentDBKey, schema) +} + +// GetCurrentSchema gets current schema name from context. +func GetCurrentSchema(ctx context.Context) string { + v, ok := ctx.Value(currentDBKey).(string) + if !ok { + return "" + } + return v +} diff --git a/vendor/github.com/pingcap/tidb/sessionctx/domainctx.go b/vendor/github.com/pingcap/tidb/sessionctx/domainctx.go new file mode 100644 index 000000000..dfbbe5cb7 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/sessionctx/domainctx.go @@ -0,0 +1,43 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package sessionctx + +import ( + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/domain" +) + +// A dummy type to avoid naming collision in context. +type domainKeyType int + +// String defines a Stringer function for debugging and pretty printing. +func (k domainKeyType) String() string { + return "domain" +} + +const domainKey domainKeyType = 0 + +// BindDomain binds domain to context. +func BindDomain(ctx context.Context, domain *domain.Domain) { + ctx.SetValue(domainKey, domain) +} + +// GetDomain gets domain from context. +func GetDomain(ctx context.Context) *domain.Domain { + v, ok := ctx.Value(domainKey).(*domain.Domain) + if !ok { + return nil + } + return v +} diff --git a/vendor/github.com/pingcap/tidb/sessionctx/forupdate/for_update_ctx.go b/vendor/github.com/pingcap/tidb/sessionctx/forupdate/for_update_ctx.go new file mode 100644 index 000000000..f413bd1c5 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/sessionctx/forupdate/for_update_ctx.go @@ -0,0 +1,33 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +// Package forupdate record information for "select ... for update" statement +package forupdate + +import "github.com/pingcap/tidb/context" + +// A dummy type to avoid naming collision in context. +type forupdateKeyType int + +// String defines a Stringer function for debugging and pretty printing. +func (k forupdateKeyType) String() string { + return "for update" +} + +// ForUpdateKey is used to retrive "select for update" statement information +const ForUpdateKey forupdateKeyType = 0 + +// SetForUpdate set "select for update" flag. +func SetForUpdate(ctx context.Context) { + ctx.SetValue(ForUpdateKey, true) +} diff --git a/vendor/github.com/pingcap/tidb/sessionctx/variable/session.go b/vendor/github.com/pingcap/tidb/sessionctx/variable/session.go new file mode 100644 index 000000000..908733032 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/sessionctx/variable/session.go @@ -0,0 +1,144 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package variable + +import ( + "github.com/pingcap/tidb/context" +) + +// SessionVars is to handle user-defined or global variables in current session. +type SessionVars struct { + // user-defined variables + Users map[string]string + // system variables + Systems map[string]string + // prepared statement + PreparedStmts map[uint32]interface{} + + PreparedStmtNameToID map[string]uint32 + // prepared statement auto increment id + preparedStmtID uint32 + + // following variables are special for current session + Status uint16 + LastInsertID uint64 + AffectedRows uint64 + + // Client capability + ClientCapability uint32 + + // Connection ID + ConnectionID uint64 + + // Found rows + FoundRows uint64 + + // Current user + User string +} + +// sessionVarsKeyType is a dummy type to avoid naming collision in context. +type sessionVarsKeyType int + +// String defines a Stringer function for debugging and pretty printing. +func (k sessionVarsKeyType) String() string { + return "session_vars" +} + +const sessionVarsKey sessionVarsKeyType = 0 + +// BindSessionVars creates a session vars object and binds it to context. +func BindSessionVars(ctx context.Context) { + v := &SessionVars{ + Users: make(map[string]string), + Systems: make(map[string]string), + PreparedStmts: make(map[uint32]interface{}), + PreparedStmtNameToID: make(map[string]uint32), + } + + ctx.SetValue(sessionVarsKey, v) +} + +// GetSessionVars gets the session vars from context. +func GetSessionVars(ctx context.Context) *SessionVars { + v, ok := ctx.Value(sessionVarsKey).(*SessionVars) + if !ok { + return nil + } + return v +} + +const ( + characterSetConnection = "character_set_connection" + collationConnection = "collation_connection" +) + +// GetCharsetInfo gets charset and collation for current context. +// What character set should the server translate a statement to after receiving it? +// For this, the server uses the character_set_connection and collation_connection system variables. +// It converts statements sent by the client from character_set_client to character_set_connection +// (except for string literals that have an introducer such as _latin1 or _utf8). +// collation_connection is important for comparisons of literal strings. +// For comparisons of strings with column values, collation_connection does not matter because columns +// have their own collation, which has a higher collation precedence. +// See: https://dev.mysql.com/doc/refman/5.7/en/charset-connection.html +func GetCharsetInfo(ctx context.Context) (charset, collation string) { + sessionVars := GetSessionVars(ctx) + charset = sessionVars.Systems[characterSetConnection] + collation = sessionVars.Systems[collationConnection] + return +} + +// SetLastInsertID saves the last insert id to the session context. +// TODO: we may store the result for last_insert_id sys var later. +func (s *SessionVars) SetLastInsertID(insertID uint64) { + s.LastInsertID = insertID +} + +// SetAffectedRows saves the affected rows to the session context. +func (s *SessionVars) SetAffectedRows(affectedRows uint64) { + s.AffectedRows = affectedRows +} + +// AddAffectedRows adds affected rows with the argument rows. +func (s *SessionVars) AddAffectedRows(rows uint64) { + s.AffectedRows += rows +} + +// AddFoundRows adds found rows with the argument rows. +func (s *SessionVars) AddFoundRows(rows uint64) { + s.FoundRows += rows +} + +// SetStatusFlag sets the session server status variable. +// If on is ture sets the flag in session status, +// otherwise removes the flag. +func (s *SessionVars) SetStatusFlag(flag uint16, on bool) { + if on { + s.Status |= flag + return + } + s.Status &= (^flag) +} + +// GetNextPreparedStmtID generates and returns the next session scope prepared statement id. +func (s *SessionVars) GetNextPreparedStmtID() uint32 { + s.preparedStmtID++ + return s.preparedStmtID +} + +// SetCurrentUser saves the current user to the session context. +func (s *SessionVars) SetCurrentUser(user string) { + s.User = user +} diff --git a/vendor/github.com/pingcap/tidb/sessionctx/variable/statusvar.go b/vendor/github.com/pingcap/tidb/sessionctx/variable/statusvar.go new file mode 100644 index 000000000..c2753e905 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/sessionctx/variable/statusvar.go @@ -0,0 +1,62 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package variable + +import ( + "github.com/juju/errors" +) + +var statisticsList []Statistics +var globalStatusScopes = make(map[string]ScopeFlag) + +// DefaultScopeFlag is the status default scope. +var DefaultScopeFlag = ScopeGlobal | ScopeSession + +// StatusVal is the value of the corresponding status variable. +type StatusVal struct { + Scope ScopeFlag + Value interface{} +} + +// Statistics is the interface of statistics. +type Statistics interface { + // GetScope gets the status variables scope. + GetScope(status string) ScopeFlag + // Stats returns the statistics status variables. + Stats() (map[string]interface{}, error) +} + +// RegisterStatistics registers statistics. +func RegisterStatistics(s Statistics) { + statisticsList = append(statisticsList, s) +} + +// GetStatusVars gets registered statistics status variables. +func GetStatusVars() (map[string]*StatusVal, error) { + statusVars := make(map[string]*StatusVal) + + for _, statistics := range statisticsList { + vals, err := statistics.Stats() + if err != nil { + return nil, errors.Trace(err) + } + + for name, val := range vals { + scope := statistics.GetScope(name) + statusVars[name] = &StatusVal{Value: val, Scope: scope} + } + } + + return statusVars, nil +} diff --git a/vendor/github.com/pingcap/tidb/sessionctx/variable/sysvar.go b/vendor/github.com/pingcap/tidb/sessionctx/variable/sysvar.go new file mode 100644 index 000000000..1f281ce19 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/sessionctx/variable/sysvar.go @@ -0,0 +1,631 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package variable + +import ( + "strings" + + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/terror" +) + +// ScopeFlag is for system variable whether can be changed in global/session dynamically or not. +type ScopeFlag uint8 + +const ( + // ScopeNone means the system variable can not be changed dynamically. + ScopeNone ScopeFlag = iota << 0 + // ScopeGlobal means the system variable can be changed globally. + ScopeGlobal + // ScopeSession means the system variable can only be changed in current session. + ScopeSession +) + +// SysVar is for system variable. +type SysVar struct { + // Scope is for whether can be changed or not + Scope ScopeFlag + + // Variable name + Name string + + // Variable value + Value string +} + +// SysVars is global sys vars map. +var SysVars map[string]*SysVar + +// GetSysVar returns sys var info for name as key. +func GetSysVar(name string) *SysVar { + name = strings.ToLower(name) + return SysVars[name] +} + +// Variable error codes. +const ( + CodeUnknownStatusVar terror.ErrCode = 1 + CodeUnknownSystemVar terror.ErrCode = 1193 +) + +// Variable errors +var ( + UnknownStatusVar = terror.ClassVariable.New(CodeUnknownStatusVar, "unknown status variable") + UnknownSystemVar = terror.ClassVariable.New(CodeUnknownSystemVar, "unknown system variable") +) + +func init() { + SysVars = make(map[string]*SysVar) + for _, v := range defaultSysVars { + SysVars[v.Name] = v + } + + // Register terror to mysql error map. + mySQLErrCodes := map[terror.ErrCode]uint16{ + CodeUnknownSystemVar: mysql.ErrUnknownSystemVariable, + } + terror.ErrClassToMySQLCodes[terror.ClassVariable] = mySQLErrCodes +} + +// we only support MySQL now +var defaultSysVars = []*SysVar{ + {ScopeGlobal, "gtid_mode", "OFF"}, + {ScopeGlobal, "flush_time", "0"}, + {ScopeSession, "pseudo_slave_mode", ""}, + {ScopeNone, "performance_schema_max_mutex_classes", "200"}, + {ScopeGlobal | ScopeSession, "low_priority_updates", "OFF"}, + {ScopeGlobal | ScopeSession, "session_track_gtids", ""}, + {ScopeGlobal | ScopeSession, "ndbinfo_max_rows", ""}, + {ScopeGlobal | ScopeSession, "ndb_index_stat_option", ""}, + {ScopeGlobal | ScopeSession, "old_passwords", "0"}, + {ScopeNone, "innodb_version", "5.6.25"}, + {ScopeGlobal, "max_connections", "151"}, + {ScopeGlobal | ScopeSession, "big_tables", "OFF"}, + {ScopeNone, "skip_external_locking", "ON"}, + {ScopeGlobal, "slave_pending_jobs_size_max", "16777216"}, + {ScopeNone, "innodb_sync_array_size", "1"}, + {ScopeSession, "rand_seed2", ""}, + {ScopeGlobal, "validate_password_number_count", ""}, + {ScopeSession, "gtid_next", ""}, + {ScopeGlobal | ScopeSession, "sql_select_limit", "18446744073709551615"}, + {ScopeGlobal, "ndb_show_foreign_key_mock_tables", ""}, + {ScopeNone, "multi_range_count", "256"}, + {ScopeGlobal | ScopeSession, "default_week_format", "0"}, + {ScopeGlobal | ScopeSession, "binlog_error_action", "IGNORE_ERROR"}, + {ScopeGlobal, "slave_transaction_retries", "10"}, + {ScopeGlobal | ScopeSession, "default_storage_engine", "InnoDB"}, + {ScopeNone, "ft_query_expansion_limit", "20"}, + {ScopeGlobal, "max_connect_errors", "100"}, + {ScopeGlobal, "sync_binlog", "0"}, + {ScopeNone, "max_digest_length", "1024"}, + {ScopeNone, "innodb_force_load_corrupted", "OFF"}, + {ScopeNone, "performance_schema_max_table_handles", "4000"}, + {ScopeGlobal, "innodb_fast_shutdown", "1"}, + {ScopeNone, "ft_max_word_len", "84"}, + {ScopeGlobal, "log_backward_compatible_user_definitions", ""}, + {ScopeNone, "lc_messages_dir", "/usr/local/mysql-5.6.25-osx10.8-x86_64/share/"}, + {ScopeGlobal, "ft_boolean_syntax", "+ -><()~*:\"\"&|"}, + {ScopeGlobal, "table_definition_cache", "1400"}, + {ScopeNone, "skip_name_resolve", "OFF"}, + {ScopeNone, "performance_schema_max_file_handles", "32768"}, + {ScopeSession, "transaction_allow_batching", ""}, + {ScopeGlobal | ScopeSession, "sql_mode", "NO_ENGINE_SUBSTITUTION"}, + {ScopeNone, "performance_schema_max_statement_classes", "168"}, + {ScopeGlobal, "server_id", "0"}, + {ScopeGlobal, "innodb_flushing_avg_loops", "30"}, + {ScopeGlobal | ScopeSession, "tmp_table_size", "16777216"}, + {ScopeGlobal, "innodb_max_purge_lag", "0"}, + {ScopeGlobal | ScopeSession, "preload_buffer_size", "32768"}, + {ScopeGlobal, "slave_checkpoint_period", "300"}, + {ScopeGlobal, "check_proxy_users", ""}, + {ScopeNone, "have_query_cache", "YES"}, + {ScopeGlobal, "innodb_flush_log_at_timeout", "1"}, + {ScopeGlobal, "innodb_max_undo_log_size", ""}, + {ScopeGlobal | ScopeSession, "range_alloc_block_size", "4096"}, + {ScopeGlobal, "connect_timeout", "10"}, + {ScopeGlobal | ScopeSession, "collation_server", "latin1_swedish_ci"}, + {ScopeNone, "have_rtree_keys", "YES"}, + {ScopeGlobal, "innodb_old_blocks_pct", "37"}, + {ScopeGlobal, "innodb_file_format", "Antelope"}, + {ScopeGlobal, "innodb_compression_failure_threshold_pct", "5"}, + {ScopeNone, "performance_schema_events_waits_history_long_size", "10000"}, + {ScopeGlobal, "innodb_checksum_algorithm", "innodb"}, + {ScopeNone, "innodb_ft_sort_pll_degree", "2"}, + {ScopeNone, "thread_stack", "262144"}, + {ScopeGlobal, "relay_log_info_repository", "FILE"}, + {ScopeGlobal | ScopeSession, "sql_log_bin", "ON"}, + {ScopeGlobal, "super_read_only", ""}, + {ScopeGlobal | ScopeSession, "max_delayed_threads", "20"}, + {ScopeNone, "protocol_version", "10"}, + {ScopeGlobal | ScopeSession, "new", "OFF"}, + {ScopeGlobal | ScopeSession, "myisam_sort_buffer_size", "8388608"}, + {ScopeGlobal | ScopeSession, "optimizer_trace_offset", "-1"}, + {ScopeGlobal, "innodb_buffer_pool_dump_at_shutdown", "OFF"}, + {ScopeGlobal | ScopeSession, "sql_notes", "ON"}, + {ScopeGlobal, "innodb_cmp_per_index_enabled", "OFF"}, + {ScopeGlobal, "innodb_ft_server_stopword_table", ""}, + {ScopeNone, "performance_schema_max_file_instances", "7693"}, + {ScopeNone, "log_output", "FILE"}, + {ScopeGlobal, "binlog_group_commit_sync_delay", ""}, + {ScopeGlobal, "binlog_group_commit_sync_no_delay_count", ""}, + {ScopeNone, "have_crypt", "YES"}, + {ScopeGlobal, "innodb_log_write_ahead_size", ""}, + {ScopeNone, "innodb_log_group_home_dir", "./"}, + {ScopeNone, "performance_schema_events_statements_history_size", "10"}, + {ScopeGlobal, "general_log", "OFF"}, + {ScopeGlobal, "validate_password_dictionary_file", ""}, + {ScopeGlobal, "binlog_order_commits", "ON"}, + {ScopeGlobal, "master_verify_checksum", "OFF"}, + {ScopeGlobal, "key_cache_division_limit", "100"}, + {ScopeGlobal, "rpl_semi_sync_master_trace_level", ""}, + {ScopeGlobal | ScopeSession, "max_insert_delayed_threads", "20"}, + {ScopeNone, "performance_schema_session_connect_attrs_size", "512"}, + {ScopeGlobal | ScopeSession, "time_zone", "SYSTEM"}, + {ScopeGlobal, "innodb_max_dirty_pages_pct", "75"}, + {ScopeGlobal, "innodb_file_per_table", "ON"}, + {ScopeGlobal, "innodb_log_compressed_pages", "ON"}, + {ScopeGlobal, "master_info_repository", "FILE"}, + {ScopeGlobal, "rpl_stop_slave_timeout", "31536000"}, + {ScopeNone, "skip_networking", "OFF"}, + {ScopeGlobal, "innodb_monitor_reset", ""}, + {ScopeNone, "have_ssl", "DISABLED"}, + {ScopeNone, "system_time_zone", "CST"}, + {ScopeGlobal, "innodb_print_all_deadlocks", "OFF"}, + {ScopeNone, "innodb_autoinc_lock_mode", "1"}, + {ScopeGlobal, "slave_net_timeout", "3600"}, + {ScopeGlobal, "key_buffer_size", "8388608"}, + {ScopeGlobal | ScopeSession, "foreign_key_checks", "ON"}, + {ScopeGlobal, "host_cache_size", "279"}, + {ScopeGlobal, "delay_key_write", "ON"}, + {ScopeNone, "metadata_locks_cache_size", "1024"}, + {ScopeNone, "innodb_force_recovery", "0"}, + {ScopeGlobal, "innodb_file_format_max", "Antelope"}, + {ScopeGlobal | ScopeSession, "debug", ""}, + {ScopeGlobal, "log_warnings", "1"}, + {ScopeGlobal, "offline_mode", ""}, + {ScopeGlobal | ScopeSession, "innodb_strict_mode", "OFF"}, + {ScopeGlobal, "innodb_rollback_segments", "128"}, + {ScopeGlobal | ScopeSession, "join_buffer_size", "262144"}, + {ScopeNone, "innodb_mirrored_log_groups", "1"}, + {ScopeGlobal, "max_binlog_size", "1073741824"}, + {ScopeGlobal, "sync_master_info", "10000"}, + {ScopeGlobal, "concurrent_insert", "AUTO"}, + {ScopeGlobal, "innodb_adaptive_hash_index", "ON"}, + {ScopeGlobal, "innodb_ft_enable_stopword", "ON"}, + {ScopeGlobal, "general_log_file", "/usr/local/mysql/data/localhost.log"}, + {ScopeGlobal | ScopeSession, "innodb_support_xa", "ON"}, + {ScopeGlobal, "innodb_compression_level", "6"}, + {ScopeNone, "innodb_file_format_check", "ON"}, + {ScopeNone, "myisam_mmap_size", "18446744073709551615"}, + {ScopeGlobal, "init_slave", ""}, + {ScopeNone, "innodb_buffer_pool_instances", "8"}, + {ScopeGlobal | ScopeSession, "block_encryption_mode", "aes-128-ecb"}, + {ScopeGlobal | ScopeSession, "max_length_for_sort_data", "1024"}, + {ScopeNone, "character_set_system", "utf8"}, + {ScopeGlobal | ScopeSession, "interactive_timeout", "28800"}, + {ScopeGlobal, "innodb_optimize_fulltext_only", "OFF"}, + {ScopeNone, "character_sets_dir", "/usr/local/mysql-5.6.25-osx10.8-x86_64/share/charsets/"}, + {ScopeGlobal | ScopeSession, "query_cache_type", "OFF"}, + {ScopeNone, "innodb_rollback_on_timeout", "OFF"}, + {ScopeGlobal | ScopeSession, "query_alloc_block_size", "8192"}, + {ScopeGlobal, "slave_compressed_protocol", "OFF"}, + {ScopeGlobal, "init_connect", ""}, + {ScopeGlobal, "rpl_semi_sync_slave_trace_level", ""}, + {ScopeNone, "have_compress", "YES"}, + {ScopeNone, "thread_concurrency", "10"}, + {ScopeGlobal | ScopeSession, "query_prealloc_size", "8192"}, + {ScopeNone, "relay_log_space_limit", "0"}, + {ScopeGlobal | ScopeSession, "max_user_connections", "0"}, + {ScopeNone, "performance_schema_max_thread_classes", "50"}, + {ScopeGlobal, "innodb_api_trx_level", "0"}, + {ScopeNone, "disconnect_on_expired_password", "ON"}, + {ScopeNone, "performance_schema_max_file_classes", "50"}, + {ScopeGlobal, "expire_logs_days", "0"}, + {ScopeGlobal | ScopeSession, "binlog_rows_query_log_events", "OFF"}, + {ScopeGlobal, "validate_password_policy", ""}, + {ScopeGlobal, "default_password_lifetime", ""}, + {ScopeNone, "pid_file", "/usr/local/mysql/data/localhost.pid"}, + {ScopeNone, "innodb_undo_tablespaces", "0"}, + {ScopeGlobal, "innodb_status_output_locks", "OFF"}, + {ScopeNone, "performance_schema_accounts_size", "100"}, + {ScopeGlobal | ScopeSession, "max_error_count", "64"}, + {ScopeGlobal, "max_write_lock_count", "18446744073709551615"}, + {ScopeNone, "performance_schema_max_socket_instances", "322"}, + {ScopeNone, "performance_schema_max_table_instances", "12500"}, + {ScopeGlobal, "innodb_stats_persistent_sample_pages", "20"}, + {ScopeGlobal, "show_compatibility_56", ""}, + {ScopeGlobal, "log_slow_slave_statements", "OFF"}, + {ScopeNone, "innodb_open_files", "2000"}, + {ScopeGlobal, "innodb_spin_wait_delay", "6"}, + {ScopeGlobal, "thread_cache_size", "9"}, + {ScopeGlobal, "log_slow_admin_statements", "OFF"}, + {ScopeNone, "innodb_checksums", "ON"}, + {ScopeNone, "hostname", "localhost"}, + {ScopeGlobal | ScopeSession, "auto_increment_offset", "1"}, + {ScopeNone, "ft_stopword_file", "(built-in)"}, + {ScopeGlobal, "innodb_max_dirty_pages_pct_lwm", "0"}, + {ScopeGlobal, "log_queries_not_using_indexes", "OFF"}, + {ScopeSession, "timestamp", ""}, + {ScopeGlobal | ScopeSession, "query_cache_wlock_invalidate", "OFF"}, + {ScopeGlobal | ScopeSession, "sql_buffer_result", "OFF"}, + {ScopeGlobal | ScopeSession, "character_set_filesystem", "binary"}, + {ScopeGlobal | ScopeSession, "collation_database", "latin1_swedish_ci"}, + {ScopeGlobal | ScopeSession, "auto_increment_increment", "1"}, + {ScopeGlobal | ScopeSession, "max_heap_table_size", "16777216"}, + {ScopeGlobal | ScopeSession, "div_precision_increment", "4"}, + {ScopeGlobal, "innodb_lru_scan_depth", "1024"}, + {ScopeGlobal, "innodb_purge_rseg_truncate_frequency", ""}, + {ScopeGlobal | ScopeSession, "sql_auto_is_null", "OFF"}, + {ScopeNone, "innodb_api_enable_binlog", "OFF"}, + {ScopeGlobal | ScopeSession, "innodb_ft_user_stopword_table", ""}, + {ScopeNone, "server_id_bits", "32"}, + {ScopeGlobal, "innodb_log_checksum_algorithm", ""}, + {ScopeNone, "innodb_buffer_pool_load_at_startup", "OFF"}, + {ScopeGlobal | ScopeSession, "sort_buffer_size", "262144"}, + {ScopeGlobal, "innodb_flush_neighbors", "1"}, + {ScopeNone, "innodb_use_sys_malloc", "ON"}, + {ScopeNone, "plugin_dir", "/usr/local/mysql/lib/plugin/"}, + {ScopeNone, "performance_schema_max_socket_classes", "10"}, + {ScopeNone, "performance_schema_max_stage_classes", "150"}, + {ScopeGlobal, "innodb_purge_batch_size", "300"}, + {ScopeNone, "have_profiling", "YES"}, + {ScopeGlobal, "slave_checkpoint_group", "512"}, + {ScopeGlobal | ScopeSession, "character_set_client", "latin1"}, + {ScopeNone, "slave_load_tmpdir", "/var/tmp/"}, + {ScopeGlobal, "innodb_buffer_pool_dump_now", "OFF"}, + {ScopeGlobal, "relay_log_purge", "ON"}, + {ScopeGlobal, "ndb_distribution", ""}, + {ScopeGlobal, "myisam_data_pointer_size", "6"}, + {ScopeGlobal, "ndb_optimization_delay", ""}, + {ScopeGlobal, "innodb_ft_num_word_optimize", "2000"}, + {ScopeGlobal | ScopeSession, "max_join_size", "18446744073709551615"}, + {ScopeNone, "core_file", "OFF"}, + {ScopeGlobal | ScopeSession, "max_seeks_for_key", "18446744073709551615"}, + {ScopeNone, "innodb_log_buffer_size", "8388608"}, + {ScopeGlobal, "delayed_insert_timeout", "300"}, + {ScopeGlobal, "max_relay_log_size", "0"}, + {ScopeGlobal | ScopeSession, "max_sort_length", "1024"}, + {ScopeNone, "metadata_locks_hash_instances", "8"}, + {ScopeGlobal, "ndb_eventbuffer_free_percent", ""}, + {ScopeNone, "large_files_support", "ON"}, + {ScopeGlobal, "binlog_max_flush_queue_time", "0"}, + {ScopeGlobal, "innodb_fill_factor", ""}, + {ScopeGlobal, "log_syslog_facility", ""}, + {ScopeNone, "innodb_ft_min_token_size", "3"}, + {ScopeGlobal | ScopeSession, "transaction_write_set_extraction", ""}, + {ScopeGlobal | ScopeSession, "ndb_blob_write_batch_bytes", ""}, + {ScopeGlobal, "automatic_sp_privileges", "ON"}, + {ScopeGlobal, "innodb_flush_sync", ""}, + {ScopeNone, "performance_schema_events_statements_history_long_size", "10000"}, + {ScopeGlobal, "innodb_monitor_disable", ""}, + {ScopeNone, "innodb_doublewrite", "ON"}, + {ScopeGlobal, "slave_parallel_type", ""}, + {ScopeNone, "log_bin_use_v1_row_events", "OFF"}, + {ScopeSession, "innodb_optimize_point_storage", ""}, + {ScopeNone, "innodb_api_disable_rowlock", "OFF"}, + {ScopeGlobal, "innodb_adaptive_flushing_lwm", "10"}, + {ScopeNone, "innodb_log_files_in_group", "2"}, + {ScopeGlobal, "innodb_buffer_pool_load_now", "OFF"}, + {ScopeNone, "performance_schema_max_rwlock_classes", "40"}, + {ScopeNone, "binlog_gtid_simple_recovery", "OFF"}, + {ScopeNone, "port", "3306"}, + {ScopeNone, "performance_schema_digests_size", "10000"}, + {ScopeGlobal | ScopeSession, "profiling", "OFF"}, + {ScopeNone, "lower_case_table_names", "2"}, + {ScopeSession, "rand_seed1", ""}, + {ScopeGlobal, "sha256_password_proxy_users", ""}, + {ScopeGlobal | ScopeSession, "sql_quote_show_create", "ON"}, + {ScopeGlobal | ScopeSession, "binlogging_impossible_mode", "IGNORE_ERROR"}, + {ScopeGlobal, "query_cache_size", "1048576"}, + {ScopeGlobal, "innodb_stats_transient_sample_pages", "8"}, + {ScopeGlobal, "innodb_stats_on_metadata", "OFF"}, + {ScopeNone, "server_uuid", "d530594e-1c86-11e5-878b-6b36ce6799ca"}, + {ScopeNone, "open_files_limit", "5000"}, + {ScopeGlobal | ScopeSession, "ndb_force_send", ""}, + {ScopeNone, "skip_show_database", "OFF"}, + {ScopeGlobal, "log_timestamps", ""}, + {ScopeNone, "version_compile_machine", "x86_64"}, + {ScopeGlobal, "slave_parallel_workers", "0"}, + {ScopeGlobal, "event_scheduler", "OFF"}, + {ScopeGlobal | ScopeSession, "ndb_deferred_constraints", ""}, + {ScopeGlobal, "log_syslog_include_pid", ""}, + {ScopeSession, "last_insert_id", ""}, + {ScopeNone, "innodb_ft_cache_size", "8000000"}, + {ScopeNone, "log_bin", "OFF"}, + {ScopeGlobal, "innodb_disable_sort_file_cache", "OFF"}, + {ScopeGlobal, "log_error_verbosity", ""}, + {ScopeNone, "performance_schema_hosts_size", "100"}, + {ScopeGlobal, "innodb_replication_delay", "0"}, + {ScopeGlobal, "slow_query_log", "OFF"}, + {ScopeSession, "debug_sync", ""}, + {ScopeGlobal, "innodb_stats_auto_recalc", "ON"}, + {ScopeGlobal, "timed_mutexes", "OFF"}, + {ScopeGlobal | ScopeSession, "lc_messages", "en_US"}, + {ScopeGlobal | ScopeSession, "bulk_insert_buffer_size", "8388608"}, + {ScopeGlobal | ScopeSession, "binlog_direct_non_transactional_updates", "OFF"}, + {ScopeGlobal, "innodb_change_buffering", "all"}, + {ScopeGlobal | ScopeSession, "sql_big_selects", "ON"}, + {ScopeGlobal | ScopeSession, "character_set_results", "latin1"}, + {ScopeGlobal, "innodb_max_purge_lag_delay", "0"}, + {ScopeGlobal | ScopeSession, "session_track_schema", ""}, + {ScopeGlobal, "innodb_io_capacity_max", "2000"}, + {ScopeGlobal, "innodb_autoextend_increment", "64"}, + {ScopeGlobal | ScopeSession, "binlog_format", "STATEMENT"}, + {ScopeGlobal | ScopeSession, "optimizer_trace", "enabled=off,one_line=off"}, + {ScopeGlobal | ScopeSession, "read_rnd_buffer_size", "262144"}, + {ScopeNone, "version_comment", "MySQL Community Server (GPL)"}, + {ScopeGlobal | ScopeSession, "net_write_timeout", "60"}, + {ScopeGlobal, "innodb_buffer_pool_load_abort", "OFF"}, + {ScopeGlobal | ScopeSession, "tx_isolation", "REPEATABLE-READ"}, + {ScopeGlobal | ScopeSession, "collation_connection", "latin1_swedish_ci"}, + {ScopeGlobal, "rpl_semi_sync_master_timeout", ""}, + {ScopeGlobal | ScopeSession, "transaction_prealloc_size", "4096"}, + {ScopeNone, "slave_skip_errors", "OFF"}, + {ScopeNone, "performance_schema_setup_objects_size", "100"}, + {ScopeGlobal, "sync_relay_log", "10000"}, + {ScopeGlobal, "innodb_ft_result_cache_limit", "2000000000"}, + {ScopeNone, "innodb_sort_buffer_size", "1048576"}, + {ScopeGlobal, "innodb_ft_enable_diag_print", "OFF"}, + {ScopeNone, "thread_handling", "one-thread-per-connection"}, + {ScopeGlobal, "stored_program_cache", "256"}, + {ScopeNone, "performance_schema_max_mutex_instances", "15906"}, + {ScopeGlobal, "innodb_adaptive_max_sleep_delay", "150000"}, + {ScopeNone, "large_pages", "OFF"}, + {ScopeGlobal | ScopeSession, "session_track_system_variables", ""}, + {ScopeGlobal, "innodb_change_buffer_max_size", "25"}, + {ScopeGlobal, "log_bin_trust_function_creators", "OFF"}, + {ScopeNone, "innodb_write_io_threads", "4"}, + {ScopeGlobal, "mysql_native_password_proxy_users", ""}, + {ScopeGlobal, "read_only", "OFF"}, + {ScopeNone, "large_page_size", "0"}, + {ScopeNone, "table_open_cache_instances", "1"}, + {ScopeGlobal, "innodb_stats_persistent", "ON"}, + {ScopeGlobal | ScopeSession, "session_track_state_change", ""}, + {ScopeNone, "optimizer_switch", "index_merge=on,index_merge_union=on,index_merge_sort_union=on,index_merge_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=on,block_nested_loop=on,batched_key_access=off,materialization=on,semijoin=on,loosescan=on,firstmatch=on,subquery_materialization_cost_based=on,use_index_extensions=on"}, + {ScopeGlobal, "delayed_queue_size", "1000"}, + {ScopeNone, "innodb_read_only", "OFF"}, + {ScopeNone, "datetime_format", "%Y-%m-%d %H:%i:%s"}, + {ScopeGlobal, "log_syslog", ""}, + {ScopeNone, "version", "5.6.25"}, + {ScopeGlobal | ScopeSession, "transaction_alloc_block_size", "8192"}, + {ScopeGlobal, "sql_slave_skip_counter", "0"}, + {ScopeNone, "have_openssl", "DISABLED"}, + {ScopeGlobal, "innodb_large_prefix", "OFF"}, + {ScopeNone, "performance_schema_max_cond_classes", "80"}, + {ScopeGlobal, "innodb_io_capacity", "200"}, + {ScopeGlobal, "max_binlog_cache_size", "18446744073709547520"}, + {ScopeGlobal | ScopeSession, "ndb_index_stat_enable", ""}, + {ScopeGlobal, "executed_gtids_compression_period", ""}, + {ScopeNone, "time_format", "%H:%i:%s"}, + {ScopeGlobal | ScopeSession, "old_alter_table", "OFF"}, + {ScopeGlobal | ScopeSession, "long_query_time", "10.000000"}, + {ScopeNone, "innodb_use_native_aio", "OFF"}, + {ScopeGlobal, "log_throttle_queries_not_using_indexes", "0"}, + {ScopeNone, "locked_in_memory", "OFF"}, + {ScopeNone, "innodb_api_enable_mdl", "OFF"}, + {ScopeGlobal, "binlog_cache_size", "32768"}, + {ScopeGlobal, "innodb_compression_pad_pct_max", "50"}, + {ScopeGlobal, "innodb_commit_concurrency", "0"}, + {ScopeNone, "ft_min_word_len", "4"}, + {ScopeGlobal, "enforce_gtid_consistency", "OFF"}, + {ScopeGlobal, "secure_auth", "ON"}, + {ScopeNone, "max_tmp_tables", "32"}, + {ScopeGlobal, "innodb_random_read_ahead", "OFF"}, + {ScopeGlobal | ScopeSession, "unique_checks", "ON"}, + {ScopeGlobal, "internal_tmp_disk_storage_engine", ""}, + {ScopeGlobal | ScopeSession, "myisam_repair_threads", "1"}, + {ScopeGlobal, "ndb_eventbuffer_max_alloc", ""}, + {ScopeGlobal, "innodb_read_ahead_threshold", "56"}, + {ScopeGlobal, "key_cache_block_size", "1024"}, + {ScopeGlobal, "rpl_semi_sync_slave_enabled", ""}, + {ScopeNone, "ndb_recv_thread_cpu_mask", ""}, + {ScopeGlobal, "gtid_purged", ""}, + {ScopeGlobal, "max_binlog_stmt_cache_size", "18446744073709547520"}, + {ScopeGlobal | ScopeSession, "lock_wait_timeout", "31536000"}, + {ScopeGlobal | ScopeSession, "read_buffer_size", "131072"}, + {ScopeNone, "innodb_read_io_threads", "4"}, + {ScopeGlobal | ScopeSession, "max_sp_recursion_depth", "0"}, + {ScopeNone, "ignore_builtin_innodb", "OFF"}, + {ScopeGlobal, "rpl_semi_sync_master_enabled", ""}, + {ScopeGlobal, "slow_query_log_file", "/usr/local/mysql/data/localhost-slow.log"}, + {ScopeGlobal, "innodb_thread_sleep_delay", "10000"}, + {ScopeNone, "license", "GPL"}, + {ScopeGlobal, "innodb_ft_aux_table", ""}, + {ScopeGlobal | ScopeSession, "sql_warnings", "OFF"}, + {ScopeGlobal | ScopeSession, "keep_files_on_create", "OFF"}, + {ScopeGlobal, "slave_preserve_commit_order", ""}, + {ScopeNone, "innodb_data_file_path", "ibdata1:12M:autoextend"}, + {ScopeNone, "performance_schema_setup_actors_size", "100"}, + {ScopeNone, "innodb_additional_mem_pool_size", "8388608"}, + {ScopeNone, "log_error", "/usr/local/mysql/data/localhost.err"}, + {ScopeGlobal, "slave_exec_mode", "STRICT"}, + {ScopeGlobal, "binlog_stmt_cache_size", "32768"}, + {ScopeNone, "relay_log_info_file", "relay-log.info"}, + {ScopeNone, "innodb_ft_total_cache_size", "640000000"}, + {ScopeNone, "performance_schema_max_rwlock_instances", "9102"}, + {ScopeGlobal, "table_open_cache", "2000"}, + {ScopeNone, "log_slave_updates", "OFF"}, + {ScopeNone, "performance_schema_events_stages_history_long_size", "10000"}, + {ScopeGlobal | ScopeSession, "autocommit", "ON"}, + {ScopeSession, "insert_id", ""}, + {ScopeGlobal | ScopeSession, "default_tmp_storage_engine", "InnoDB"}, + {ScopeGlobal | ScopeSession, "optimizer_search_depth", "62"}, + {ScopeGlobal, "max_points_in_geometry", ""}, + {ScopeGlobal, "innodb_stats_sample_pages", "8"}, + {ScopeGlobal | ScopeSession, "profiling_history_size", "15"}, + {ScopeGlobal | ScopeSession, "character_set_database", "latin1"}, + {ScopeNone, "have_symlink", "YES"}, + {ScopeGlobal | ScopeSession, "storage_engine", "InnoDB"}, + {ScopeGlobal | ScopeSession, "sql_log_off", "OFF"}, + {ScopeNone, "explicit_defaults_for_timestamp", "OFF"}, + {ScopeNone, "performance_schema_events_waits_history_size", "10"}, + {ScopeGlobal, "log_syslog_tag", ""}, + {ScopeGlobal | ScopeSession, "tx_read_only", "OFF"}, + {ScopeGlobal, "rpl_semi_sync_master_wait_point", ""}, + {ScopeGlobal, "innodb_undo_log_truncate", ""}, + {ScopeNone, "simplified_binlog_gtid_recovery", "OFF"}, + {ScopeSession, "innodb_create_intrinsic", ""}, + {ScopeGlobal, "gtid_executed_compression_period", ""}, + {ScopeGlobal, "ndb_log_empty_epochs", ""}, + {ScopeGlobal, "max_prepared_stmt_count", "16382"}, + {ScopeNone, "have_geometry", "YES"}, + {ScopeGlobal | ScopeSession, "optimizer_trace_max_mem_size", "16384"}, + {ScopeGlobal | ScopeSession, "net_retry_count", "10"}, + {ScopeSession, "ndb_table_no_logging", ""}, + {ScopeGlobal | ScopeSession, "optimizer_trace_features", "greedy_search=on,range_optimizer=on,dynamic_range=on,repeated_subselect=on"}, + {ScopeGlobal, "innodb_flush_log_at_trx_commit", "1"}, + {ScopeGlobal, "rewriter_enabled", ""}, + {ScopeGlobal, "query_cache_min_res_unit", "4096"}, + {ScopeGlobal | ScopeSession, "updatable_views_with_limit", "YES"}, + {ScopeGlobal | ScopeSession, "optimizer_prune_level", "1"}, + {ScopeGlobal, "slave_sql_verify_checksum", "ON"}, + {ScopeGlobal | ScopeSession, "completion_type", "NO_CHAIN"}, + {ScopeGlobal, "binlog_checksum", "CRC32"}, + {ScopeNone, "report_port", "3306"}, + {ScopeGlobal | ScopeSession, "show_old_temporals", "OFF"}, + {ScopeGlobal, "query_cache_limit", "1048576"}, + {ScopeGlobal, "innodb_buffer_pool_size", "134217728"}, + {ScopeGlobal, "innodb_adaptive_flushing", "ON"}, + {ScopeNone, "datadir", "/usr/local/mysql/data/"}, + {ScopeGlobal | ScopeSession, "wait_timeout", "28800"}, + {ScopeGlobal, "innodb_monitor_enable", ""}, + {ScopeNone, "date_format", "%Y-%m-%d"}, + {ScopeGlobal, "innodb_buffer_pool_filename", "ib_buffer_pool"}, + {ScopeGlobal, "slow_launch_time", "2"}, + {ScopeGlobal, "slave_max_allowed_packet", "1073741824"}, + {ScopeGlobal | ScopeSession, "ndb_use_transactions", ""}, + {ScopeNone, "innodb_purge_threads", "1"}, + {ScopeGlobal, "innodb_concurrency_tickets", "5000"}, + {ScopeGlobal, "innodb_monitor_reset_all", ""}, + {ScopeNone, "performance_schema_users_size", "100"}, + {ScopeGlobal, "ndb_log_updated_only", ""}, + {ScopeNone, "basedir", "/usr/local/mysql"}, + {ScopeGlobal, "innodb_old_blocks_time", "1000"}, + {ScopeGlobal, "innodb_stats_method", "nulls_equal"}, + {ScopeGlobal | ScopeSession, "innodb_lock_wait_timeout", "50"}, + {ScopeGlobal, "local_infile", "ON"}, + {ScopeGlobal | ScopeSession, "myisam_stats_method", "nulls_unequal"}, + {ScopeNone, "version_compile_os", "osx10.8"}, + {ScopeNone, "relay_log_recovery", "OFF"}, + {ScopeNone, "old", "OFF"}, + {ScopeGlobal | ScopeSession, "innodb_table_locks", "ON"}, + {ScopeNone, "performance_schema", "ON"}, + {ScopeNone, "myisam_recover_options", "OFF"}, + {ScopeGlobal | ScopeSession, "net_buffer_length", "16384"}, + {ScopeGlobal, "rpl_semi_sync_master_wait_for_slave_count", ""}, + {ScopeGlobal | ScopeSession, "binlog_row_image", "FULL"}, + {ScopeNone, "innodb_locks_unsafe_for_binlog", "OFF"}, + {ScopeSession, "rbr_exec_mode", ""}, + {ScopeGlobal, "myisam_max_sort_file_size", "9223372036853727232"}, + {ScopeNone, "back_log", "80"}, + {ScopeNone, "lower_case_file_system", "ON"}, + {ScopeGlobal, "rpl_semi_sync_master_wait_no_slave", ""}, + {ScopeGlobal | ScopeSession, "group_concat_max_len", "1024"}, + {ScopeSession, "pseudo_thread_id", ""}, + {ScopeNone, "socket", "/tmp/myssock"}, + {ScopeNone, "have_dynamic_loading", "YES"}, + {ScopeGlobal, "rewriter_verbose", ""}, + {ScopeGlobal, "innodb_undo_logs", "128"}, + {ScopeNone, "performance_schema_max_cond_instances", "3504"}, + {ScopeGlobal, "delayed_insert_limit", "100"}, + {ScopeGlobal, "flush", "OFF"}, + {ScopeGlobal | ScopeSession, "eq_range_index_dive_limit", "10"}, + {ScopeNone, "performance_schema_events_stages_history_size", "10"}, + {ScopeGlobal | ScopeSession, "character_set_connection", "latin1"}, + {ScopeGlobal, "myisam_use_mmap", "OFF"}, + {ScopeGlobal | ScopeSession, "ndb_join_pushdown", ""}, + {ScopeGlobal | ScopeSession, "character_set_server", "latin1"}, + {ScopeGlobal, "validate_password_special_char_count", ""}, + {ScopeNone, "performance_schema_max_thread_instances", "402"}, + {ScopeGlobal, "slave_rows_search_algorithms", "TABLE_SCAN,INDEX_SCAN"}, + {ScopeGlobal | ScopeSession, "ndbinfo_show_hidden", ""}, + {ScopeGlobal | ScopeSession, "net_read_timeout", "30"}, + {ScopeNone, "innodb_page_size", "16384"}, + {ScopeGlobal, "max_allowed_packet", "4194304"}, + {ScopeNone, "innodb_log_file_size", "50331648"}, + {ScopeGlobal, "sync_relay_log_info", "10000"}, + {ScopeGlobal | ScopeSession, "optimizer_trace_limit", "1"}, + {ScopeNone, "innodb_ft_max_token_size", "84"}, + {ScopeGlobal, "validate_password_length", ""}, + {ScopeGlobal, "ndb_log_binlog_index", ""}, + {ScopeGlobal, "validate_password_mixed_case_count", ""}, + {ScopeGlobal, "innodb_api_bk_commit_interval", "5"}, + {ScopeNone, "innodb_undo_directory", "."}, + {ScopeNone, "bind_address", "*"}, + {ScopeGlobal, "innodb_sync_spin_loops", "30"}, + {ScopeGlobal | ScopeSession, "sql_safe_updates", "OFF"}, + {ScopeNone, "tmpdir", "/var/tmp/"}, + {ScopeGlobal, "innodb_thread_concurrency", "0"}, + {ScopeGlobal, "slave_allow_batching", "OFF"}, + {ScopeGlobal, "innodb_buffer_pool_dump_pct", ""}, + {ScopeGlobal | ScopeSession, "lc_time_names", "en_US"}, + {ScopeGlobal | ScopeSession, "max_statement_time", ""}, + {ScopeGlobal | ScopeSession, "end_markers_in_json", "OFF"}, + {ScopeGlobal, "avoid_temporal_upgrade", "OFF"}, + {ScopeGlobal, "key_cache_age_threshold", "300"}, + {ScopeGlobal, "innodb_status_output", "OFF"}, + {ScopeSession, "identity", ""}, + {ScopeGlobal | ScopeSession, "min_examined_row_limit", "0"}, + {ScopeGlobal, "sync_frm", "ON"}, + {ScopeGlobal, "innodb_online_alter_log_max_size", "134217728"}, +} + +// SetNamesVariables is the system variable names related to set names statements. +var SetNamesVariables = []string{ + "character_set_client", + "character_set_connection", + "character_set_results", +} + +const ( + // CollationConnection is the name for collation_connection system variable. + CollationConnection = "collation_connection" + // CharsetDatabase is the name for charactor_set_database system variable. + CharsetDatabase = "character_set_database" + // CollationDatabase is the name for collation_database system variable. + CollationDatabase = "collation_database" +) + +// GlobalVarAccessor is the interface for accessing global scope system and status variables. +type GlobalVarAccessor interface { + // GetGlobalSysVar gets the global system variable value for name. + GetGlobalSysVar(ctx context.Context, name string) (string, error) + // SetGlobalSysVar sets the global system variable name to value. + SetGlobalSysVar(ctx context.Context, name string, value string) error +} + +// globalSysVarAccessorKeyType is a dummy type to avoid naming collision in context. +type globalSysVarAccessorKeyType int + +// String defines a Stringer function for debugging and pretty printing. +func (k globalSysVarAccessorKeyType) String() string { + return "global_sysvar_accessor" +} + +const accessorKey globalSysVarAccessorKeyType = 0 + +// BindGlobalVarAccessor binds global var accessor to context. +func BindGlobalVarAccessor(ctx context.Context, accessor GlobalVarAccessor) { + ctx.SetValue(accessorKey, accessor) +} + +// GetGlobalVarAccessor gets accessor from ctx. +func GetGlobalVarAccessor(ctx context.Context) GlobalVarAccessor { + v, ok := ctx.Value(accessorKey).(GlobalVarAccessor) + if !ok { + panic("Miss global sysvar accessor") + } + return v +} diff --git a/vendor/github.com/pingcap/tidb/store/hbase/kv.go b/vendor/github.com/pingcap/tidb/store/hbase/kv.go new file mode 100644 index 000000000..6ceaff305 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/store/hbase/kv.go @@ -0,0 +1,238 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package hbasekv + +import ( + "fmt" + "math/rand" + "net/url" + "path/filepath" + "strings" + "sync" + "time" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/go-hbase" + "github.com/pingcap/go-themis" + "github.com/pingcap/go-themis/oracle" + "github.com/pingcap/go-themis/oracle/oracles" + "github.com/pingcap/tidb/kv" +) + +const ( + // hbaseColFamily is the hbase column family name. + hbaseColFamily = "f" + // hbaseQualifier is the hbase column name. + hbaseQualifier = "q" + // hbaseFmlAndQual is a shortcut. + hbaseFmlAndQual = hbaseColFamily + ":" + hbaseQualifier + // fix length conn pool + hbaseConnPoolSize = 10 +) + +var ( + hbaseColFamilyBytes = []byte(hbaseColFamily) + hbaseQualifierBytes = []byte(hbaseQualifier) +) + +var ( + _ kv.Storage = (*hbaseStore)(nil) +) + +var ( + // ErrInvalidDSN is returned when store dsn is invalid. + ErrInvalidDSN = errors.New("invalid dsn") +) + +type storeCache struct { + mu sync.Mutex + cache map[string]*hbaseStore +} + +var mc storeCache + +func init() { + mc.cache = make(map[string]*hbaseStore) + rand.Seed(time.Now().UnixNano()) +} + +type hbaseStore struct { + mu sync.Mutex + uuid string + storeName string + oracle oracle.Oracle + conns []hbase.HBaseClient +} + +func (s *hbaseStore) getHBaseClient() hbase.HBaseClient { + // return hbase connection randomly + return s.conns[rand.Intn(hbaseConnPoolSize)] +} + +func (s *hbaseStore) Begin() (kv.Transaction, error) { + s.mu.Lock() + defer s.mu.Unlock() + hbaseCli := s.getHBaseClient() + t, err := themis.NewTxn(hbaseCli, s.oracle) + if err != nil { + return nil, errors.Trace(err) + } + txn := newHbaseTxn(t, s.storeName) + return txn, nil +} + +func (s *hbaseStore) GetSnapshot(ver kv.Version) (kv.Snapshot, error) { + hbaseCli := s.getHBaseClient() + t, err := themis.NewTxn(hbaseCli, s.oracle) + if err != nil { + return nil, errors.Trace(err) + } + return newHbaseSnapshot(t, s.storeName), nil +} + +func (s *hbaseStore) Close() error { + mc.mu.Lock() + defer mc.mu.Unlock() + + delete(mc.cache, s.uuid) + + var err error + for _, conn := range s.conns { + err = conn.Close() + if err != nil { + log.Error(err) + } + } + // return last error + return err +} + +func (s *hbaseStore) UUID() string { + return s.uuid +} + +func (s *hbaseStore) CurrentVersion() (kv.Version, error) { + hbaseCli := s.getHBaseClient() + t, err := themis.NewTxn(hbaseCli, s.oracle) + if err != nil { + return kv.Version{Ver: 0}, errors.Trace(err) + } + defer t.Release() + + return kv.Version{Ver: t.GetStartTS()}, nil +} + +// Driver implements engine Driver. +type Driver struct { +} + +const ( + tsoTypeLocal = "local" + tsoTypeZK = "zk" + + tsoZKPath = "/zk/tso" +) + +// Open opens or creates an HBase storage with given path. +// +// The format of path should be 'hbase://zk1,zk2,zk3/table[?tso=local|zk]'. +// If tso is not provided, it will use a local oracle instead. (for test only) +func (d Driver) Open(path string) (kv.Storage, error) { + mc.mu.Lock() + defer mc.mu.Unlock() + + zks, tso, tableName, err := parsePath(path) + if err != nil { + return nil, errors.Trace(err) + } + if tso != tsoTypeLocal && tso != tsoTypeZK { + return nil, errors.Trace(ErrInvalidDSN) + } + + uuid := fmt.Sprintf("hbase-%v-%v", zks, tableName) + if tso == tsoTypeLocal { + log.Warnf("hbase: store(%s) is using local oracle(for test only)", uuid) + } + if store, ok := mc.cache[uuid]; ok { + return store, nil + } + + // create buffered HBase connections, HBaseClient is goroutine-safe, so + // it's OK to redistribute to transactions. + conns := make([]hbase.HBaseClient, 0, hbaseConnPoolSize) + for i := 0; i < hbaseConnPoolSize; i++ { + var c hbase.HBaseClient + c, err = hbase.NewClient(strings.Split(zks, ","), "/hbase") + if err != nil { + return nil, errors.Trace(err) + } + conns = append(conns, c) + } + + c := conns[0] + var b bool + b, err = c.TableExists(tableName) + if err != nil { + return nil, errors.Trace(err) + } + if !b { + // Create new hbase table for store. + t := hbase.NewTableDesciptor(tableName) + cf := hbase.NewColumnFamilyDescriptor(hbaseColFamily) + cf.AddAttr("THEMIS_ENABLE", "true") + t.AddColumnDesc(cf) + //TODO: specify split? + if err := c.CreateTable(t, nil); err != nil { + return nil, errors.Trace(err) + } + } + + var ora oracle.Oracle + switch tso { + case tsoTypeLocal: + ora = oracles.NewLocalOracle() + case tsoTypeZK: + ora = oracles.NewRemoteOracle(zks, tsoZKPath) + } + + s := &hbaseStore{ + uuid: uuid, + storeName: tableName, + oracle: ora, + conns: conns, + } + mc.cache[uuid] = s + return s, nil +} + +func parsePath(path string) (zks, tso, tableName string, err error) { + u, err := url.Parse(path) + if err != nil { + return "", "", "", errors.Trace(err) + } + if strings.ToLower(u.Scheme) != "hbase" { + return "", "", "", errors.Trace(ErrInvalidDSN) + } + p, tableName := filepath.Split(u.Path) + if p != "/" { + return "", "", "", errors.Trace(ErrInvalidDSN) + } + zks = u.Host + tso = u.Query().Get("tso") + if tso == "" { + tso = tsoTypeLocal + } + return zks, tso, tableName, nil +} diff --git a/vendor/github.com/pingcap/tidb/store/hbase/snapshot.go b/vendor/github.com/pingcap/tidb/store/hbase/snapshot.go new file mode 100644 index 000000000..8efe2a06b --- /dev/null +++ b/vendor/github.com/pingcap/tidb/store/hbase/snapshot.go @@ -0,0 +1,143 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package hbasekv + +import ( + "github.com/juju/errors" + "github.com/pingcap/go-hbase" + "github.com/pingcap/go-themis" + "github.com/pingcap/tidb/kv" +) + +var ( + _ kv.Snapshot = (*hbaseSnapshot)(nil) + _ kv.Iterator = (*hbaseIter)(nil) +) + +// hbaseBatchSize is used for go-themis Scanner. +const hbaseBatchSize = 1000 + +// hbaseSnapshot implements MvccSnapshot interface. +type hbaseSnapshot struct { + txn themis.Txn + storeName string +} + +// newHBaseSnapshot creates a snapshot of an HBase store. +func newHbaseSnapshot(txn themis.Txn, storeName string) *hbaseSnapshot { + return &hbaseSnapshot{ + txn: txn, + storeName: storeName, + } +} + +// Get gets the value for key k from snapshot. +func (s *hbaseSnapshot) Get(k kv.Key) ([]byte, error) { + g := hbase.NewGet([]byte(k)) + g.AddColumn(hbaseColFamilyBytes, hbaseQualifierBytes) + v, err := internalGet(s, g) + if err != nil { + return nil, errors.Trace(err) + } + return v, nil +} + +// BatchGet implements kv.Snapshot.BatchGet interface. +func (s *hbaseSnapshot) BatchGet(keys []kv.Key) (map[string][]byte, error) { + gets := make([]*hbase.Get, len(keys)) + for i, key := range keys { + g := hbase.NewGet(key) + g.AddColumn(hbaseColFamilyBytes, hbaseQualifierBytes) + gets[i] = g + } + rows, err := s.txn.Gets(s.storeName, gets) + if err != nil { + return nil, errors.Trace(err) + } + + m := make(map[string][]byte, len(rows)) + for _, r := range rows { + k := string(r.Row) + v := r.Columns[hbaseFmlAndQual].Value + m[k] = v + } + return m, nil +} + +func internalGet(s *hbaseSnapshot, g *hbase.Get) ([]byte, error) { + r, err := s.txn.Get(s.storeName, g) + if err != nil { + return nil, errors.Trace(err) + } + if r == nil || len(r.Columns) == 0 { + return nil, errors.Trace(kv.ErrNotExist) + } + return r.Columns[hbaseFmlAndQual].Value, nil +} + +func (s *hbaseSnapshot) Seek(k kv.Key) (kv.Iterator, error) { + scanner := s.txn.GetScanner([]byte(s.storeName), []byte(k), nil, hbaseBatchSize) + return newInnerScanner(scanner), nil +} + +func newInnerScanner(scanner *themis.ThemisScanner) kv.Iterator { + it := &hbaseIter{ + ThemisScanner: scanner, + } + it.Next() + return it +} + +func (s *hbaseSnapshot) Release() { + if s.txn != nil { + s.txn.Release() + s.txn = nil + } +} + +type hbaseIter struct { + *themis.ThemisScanner + rs *hbase.ResultRow +} + +func (it *hbaseIter) Next() error { + it.rs = it.ThemisScanner.Next() + return nil +} + +func (it *hbaseIter) Valid() bool { + if it.rs == nil || len(it.rs.Columns) == 0 { + return false + } + if it.ThemisScanner.Closed() { + return false + } + return true +} + +func (it *hbaseIter) Key() kv.Key { + return it.rs.Row +} + +func (it *hbaseIter) Value() []byte { + return it.rs.Columns[hbaseFmlAndQual].Value +} + +func (it *hbaseIter) Close() { + if it.ThemisScanner != nil { + it.ThemisScanner.Close() + it.ThemisScanner = nil + } + it.rs = nil +} diff --git a/vendor/github.com/pingcap/tidb/store/hbase/txn.go b/vendor/github.com/pingcap/tidb/store/hbase/txn.go new file mode 100644 index 000000000..0fa4262e8 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/store/hbase/txn.go @@ -0,0 +1,182 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package hbasekv + +import ( + "fmt" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/go-hbase" + "github.com/pingcap/go-themis" + "github.com/pingcap/tidb/kv" +) + +var ( + _ kv.Transaction = (*hbaseTxn)(nil) +) + +// dbTxn implements kv.Transacton. It is not thread safe. +type hbaseTxn struct { + us kv.UnionStore + txn themis.Txn + store *hbaseStore // for commit + storeName string + tid uint64 + valid bool + version kv.Version // commit version + dirty bool +} + +func newHbaseTxn(t themis.Txn, storeName string) *hbaseTxn { + return &hbaseTxn{ + txn: t, + valid: true, + storeName: storeName, + tid: t.GetStartTS(), + us: kv.NewUnionStore(newHbaseSnapshot(t, storeName)), + } +} + +// Implement transaction interface + +func (txn *hbaseTxn) Get(k kv.Key) ([]byte, error) { + log.Debugf("[kv] get key:%q, txn:%d", k, txn.tid) + return txn.us.Get(k) +} + +func (txn *hbaseTxn) Set(k kv.Key, v []byte) error { + log.Debugf("[kv] set %q txn:%d", k, txn.tid) + txn.dirty = true + return txn.us.Set(k, v) +} + +func (txn *hbaseTxn) String() string { + return fmt.Sprintf("%d", txn.tid) +} + +func (txn *hbaseTxn) Seek(k kv.Key) (kv.Iterator, error) { + log.Debugf("[kv] seek %q txn:%d", k, txn.tid) + return txn.us.Seek(k) +} + +func (txn *hbaseTxn) Delete(k kv.Key) error { + log.Debugf("[kv] delete %q txn:%d", k, txn.tid) + txn.dirty = true + return txn.us.Delete(k) +} + +func (txn *hbaseTxn) SetOption(opt kv.Option, val interface{}) { + txn.us.SetOption(opt, val) +} + +func (txn *hbaseTxn) DelOption(opt kv.Option) { + txn.us.DelOption(opt) +} + +func (txn *hbaseTxn) doCommit() error { + if err := txn.us.CheckLazyConditionPairs(); err != nil { + return errors.Trace(err) + } + + err := txn.us.WalkBuffer(func(k kv.Key, v []byte) error { + row := append([]byte(nil), k...) + if len(v) == 0 { // Deleted marker + d := hbase.NewDelete(row) + d.AddStringColumn(hbaseColFamily, hbaseQualifier) + err := txn.txn.Delete(txn.storeName, d) + if err != nil { + return errors.Trace(err) + } + } else { + val := append([]byte(nil), v...) + p := hbase.NewPut(row) + p.AddValue(hbaseColFamilyBytes, hbaseQualifierBytes, val) + txn.txn.Put(txn.storeName, p) + } + return nil + }) + + if err != nil { + return errors.Trace(err) + } + + err = txn.txn.Commit() + if err != nil { + log.Error(err) + return errors.Trace(err) + } + + txn.version = kv.NewVersion(txn.txn.GetCommitTS()) + log.Debugf("[kv] commit successfully, txn.version:%d", txn.version.Ver) + return nil +} + +func (txn *hbaseTxn) Commit() error { + if !txn.valid { + return kv.ErrInvalidTxn + } + log.Debugf("[kv] start to commit txn %d", txn.tid) + defer func() { + txn.close() + }() + return txn.doCommit() +} + +func (txn *hbaseTxn) close() error { + txn.us.Release() + txn.valid = false + return nil +} + +//if fail, themis auto rollback +func (txn *hbaseTxn) Rollback() error { + if !txn.valid { + return kv.ErrInvalidTxn + } + log.Warnf("[kv] Rollback txn %d", txn.tid) + return txn.close() +} + +func (txn *hbaseTxn) LockKeys(keys ...kv.Key) error { + for _, key := range keys { + if err := txn.txn.LockRow(txn.storeName, key); err != nil { + return errors.Trace(err) + } + } + return nil +} + +func (txn *hbaseTxn) IsReadOnly() bool { + return !txn.dirty +} + +func (txn *hbaseTxn) StartTS() int64 { + return int64(txn.tid) +} + +func (txn *hbaseTxn) GetClient() kv.Client { + return nil +} + +type hbaseClient struct { +} + +func (c *hbaseClient) SupportRequestType(reqType, subType int64) bool { + return false +} + +func (c *hbaseClient) Send(req *kv.Request) kv.Response { + return nil +} diff --git a/vendor/github.com/pingcap/tidb/store/localstore/boltdb/boltdb.go b/vendor/github.com/pingcap/tidb/store/localstore/boltdb/boltdb.go new file mode 100644 index 000000000..4095f9c2f --- /dev/null +++ b/vendor/github.com/pingcap/tidb/store/localstore/boltdb/boltdb.go @@ -0,0 +1,202 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package boltdb + +import ( + "os" + "path" + + "github.com/boltdb/bolt" + "github.com/juju/errors" + "github.com/pingcap/tidb/store/localstore/engine" + "github.com/pingcap/tidb/util/bytes" +) + +var ( + _ engine.DB = (*db)(nil) +) + +var ( + bucketName = []byte("tidb") +) + +type db struct { + *bolt.DB +} + +func (d *db) Get(key []byte) ([]byte, error) { + var value []byte + + err := d.DB.View(func(tx *bolt.Tx) error { + b := tx.Bucket(bucketName) + v := b.Get(key) + if v == nil { + return errors.Trace(engine.ErrNotFound) + } + value = bytes.CloneBytes(v) + return nil + }) + + return value, errors.Trace(err) +} + +func (d *db) MultiSeek(keys [][]byte) []*engine.MSeekResult { + res := make([]*engine.MSeekResult, 0, len(keys)) + d.DB.View(func(tx *bolt.Tx) error { + b := tx.Bucket(bucketName) + c := b.Cursor() + for _, key := range keys { + var k, v []byte + if key == nil { + k, v = c.First() + } else { + k, v = c.Seek(key) + } + + r := &engine.MSeekResult{} + if k == nil { + r.Err = engine.ErrNotFound + } else { + r.Key, r.Value, r.Err = bytes.CloneBytes(k), bytes.CloneBytes(v), nil + } + + res = append(res, r) + } + return nil + }) + + return res +} + +func (d *db) Seek(startKey []byte) ([]byte, []byte, error) { + var key, value []byte + err := d.DB.View(func(tx *bolt.Tx) error { + b := tx.Bucket(bucketName) + c := b.Cursor() + var k, v []byte + if startKey == nil { + k, v = c.First() + } else { + k, v = c.Seek(startKey) + } + if k != nil { + key, value = bytes.CloneBytes(k), bytes.CloneBytes(v) + } + return nil + }) + + if err != nil { + return nil, nil, errors.Trace(err) + } + if key == nil { + return nil, nil, errors.Trace(engine.ErrNotFound) + } + return key, value, nil +} + +func (d *db) NewBatch() engine.Batch { + return &batch{} +} + +func (d *db) Commit(b engine.Batch) error { + bt, ok := b.(*batch) + if !ok { + return errors.Errorf("invalid batch type %T", b) + } + err := d.DB.Update(func(tx *bolt.Tx) error { + b := tx.Bucket(bucketName) + // err1 is used for passing `go tool vet --shadow` check. + var err1 error + for _, w := range bt.writes { + if !w.isDelete { + err1 = b.Put(w.key, w.value) + } else { + err1 = b.Delete(w.key) + } + + if err1 != nil { + return errors.Trace(err1) + } + } + + return nil + }) + return errors.Trace(err) +} + +func (d *db) Close() error { + return d.DB.Close() +} + +type write struct { + key []byte + value []byte + isDelete bool +} + +type batch struct { + writes []write +} + +func (b *batch) Put(key []byte, value []byte) { + w := write{ + key: append([]byte(nil), key...), + value: append([]byte(nil), value...), + } + b.writes = append(b.writes, w) +} + +func (b *batch) Delete(key []byte) { + w := write{ + key: append([]byte(nil), key...), + value: nil, + isDelete: true, + } + b.writes = append(b.writes, w) +} + +func (b *batch) Len() int { + return len(b.writes) +} + +// Driver implements engine Driver. +type Driver struct { +} + +// Open opens or creates a local storage database with given path. +func (driver Driver) Open(dbPath string) (engine.DB, error) { + base := path.Dir(dbPath) + os.MkdirAll(base, 0755) + + d, err := bolt.Open(dbPath, 0600, nil) + if err != nil { + return nil, err + } + + tx, err := d.Begin(true) + if err != nil { + return nil, err + } + + if _, err = tx.CreateBucketIfNotExists(bucketName); err != nil { + tx.Rollback() + return nil, err + } + + if err = tx.Commit(); err != nil { + return nil, err + } + + return &db{d}, nil +} diff --git a/vendor/github.com/pingcap/tidb/store/localstore/compactor.go b/vendor/github.com/pingcap/tidb/store/localstore/compactor.go new file mode 100644 index 000000000..29e21910e --- /dev/null +++ b/vendor/github.com/pingcap/tidb/store/localstore/compactor.go @@ -0,0 +1,215 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package localstore + +import ( + "sync" + "time" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/store/localstore/engine" + "github.com/pingcap/tidb/terror" + "github.com/pingcap/tidb/util/bytes" +) + +const ( + deleteWorkerCnt = 3 +) + +// compactPolicy defines gc policy of MVCC storage. +type compactPolicy struct { + // SafePoint specifies + SafePoint int + // TriggerInterval specifies how often should the compactor + // scans outdated data. + TriggerInterval time.Duration + // BatchDeleteCnt specifies the batch size for + // deleting outdated data transaction. + BatchDeleteCnt int +} + +var localCompactDefaultPolicy = compactPolicy{ + SafePoint: 20 * 1000, // in ms + TriggerInterval: 10 * time.Second, + BatchDeleteCnt: 100, +} + +type localstoreCompactor struct { + mu sync.Mutex + recentKeys map[string]struct{} + stopCh chan struct{} + delCh chan kv.EncodedKey + workerWaitGroup *sync.WaitGroup + ticker *time.Ticker + db engine.DB + policy compactPolicy +} + +func (gc *localstoreCompactor) OnSet(k kv.Key) { + gc.mu.Lock() + defer gc.mu.Unlock() + gc.recentKeys[string(k)] = struct{}{} +} + +func (gc *localstoreCompactor) OnDelete(k kv.Key) { + gc.mu.Lock() + defer gc.mu.Unlock() + gc.recentKeys[string(k)] = struct{}{} +} + +func (gc *localstoreCompactor) getAllVersions(key kv.Key) ([]kv.EncodedKey, error) { + var keys []kv.EncodedKey + k := key + for ver := kv.MaxVersion; ver.Ver > 0; ver.Ver-- { + mvccK, _, err := gc.db.Seek(MvccEncodeVersionKey(key, ver)) + if terror.ErrorEqual(err, engine.ErrNotFound) { + break + } + if err != nil { + return nil, errors.Trace(err) + } + k, ver, err = MvccDecode(mvccK) + if k.Cmp(key) != 0 { + break + } + if err != nil { + return nil, errors.Trace(err) + } + keys = append(keys, bytes.CloneBytes(mvccK)) + } + return keys, nil +} + +func (gc *localstoreCompactor) deleteWorker() { + defer gc.workerWaitGroup.Done() + cnt := 0 + batch := gc.db.NewBatch() + for { + select { + case <-gc.stopCh: + return + case key := <-gc.delCh: + cnt++ + batch.Delete(key) + // Batch delete. + if cnt == gc.policy.BatchDeleteCnt { + log.Debugf("[kv] GC delete commit %d keys", batch.Len()) + err := gc.db.Commit(batch) + if err != nil { + log.Error(err) + } + batch = gc.db.NewBatch() + cnt = 0 + } + } + } +} + +func (gc *localstoreCompactor) checkExpiredKeysWorker() { + defer gc.workerWaitGroup.Done() + for { + select { + case <-gc.stopCh: + log.Debug("[kv] GC stopped") + return + case <-gc.ticker.C: + gc.mu.Lock() + m := gc.recentKeys + if len(m) == 0 { + gc.mu.Unlock() + continue + } + gc.recentKeys = make(map[string]struct{}) + gc.mu.Unlock() + for k := range m { + err := gc.Compact([]byte(k)) + if err != nil { + log.Error(err) + } + } + } + } +} + +func (gc *localstoreCompactor) filterExpiredKeys(keys []kv.EncodedKey) []kv.EncodedKey { + var ret []kv.EncodedKey + first := true + currentTS := time.Now().UnixNano() / int64(time.Millisecond) + // keys are always in descending order. + for _, k := range keys { + _, ver, err := MvccDecode(k) + if err != nil { + // Should not happen. + panic(err) + } + ts := localVersionToTimestamp(ver) + // Check timeout keys. + if currentTS-int64(ts) >= int64(gc.policy.SafePoint) { + // Skip first version. + if first { + first = false + continue + } + ret = append(ret, k) + } + } + return ret +} + +func (gc *localstoreCompactor) Compact(k kv.Key) error { + keys, err := gc.getAllVersions(k) + if err != nil { + return errors.Trace(err) + } + filteredKeys := gc.filterExpiredKeys(keys) + if len(filteredKeys) > 0 { + log.Debugf("[kv] GC send %d keys to delete worker", len(filteredKeys)) + } + for _, key := range filteredKeys { + gc.delCh <- key + } + return nil +} + +func (gc *localstoreCompactor) Start() { + // Start workers. + gc.workerWaitGroup.Add(deleteWorkerCnt) + for i := 0; i < deleteWorkerCnt; i++ { + go gc.deleteWorker() + } + + gc.workerWaitGroup.Add(1) + go gc.checkExpiredKeysWorker() +} + +func (gc *localstoreCompactor) Stop() { + gc.ticker.Stop() + close(gc.stopCh) + // Wait for all workers to finish. + gc.workerWaitGroup.Wait() +} + +func newLocalCompactor(policy compactPolicy, db engine.DB) *localstoreCompactor { + return &localstoreCompactor{ + recentKeys: make(map[string]struct{}), + stopCh: make(chan struct{}), + delCh: make(chan kv.EncodedKey, 100), + ticker: time.NewTicker(policy.TriggerInterval), + policy: policy, + db: db, + workerWaitGroup: &sync.WaitGroup{}, + } +} diff --git a/vendor/github.com/pingcap/tidb/store/localstore/engine/engine.go b/vendor/github.com/pingcap/tidb/store/localstore/engine/engine.go new file mode 100644 index 000000000..5628f4a05 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/store/localstore/engine/engine.go @@ -0,0 +1,60 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package engine + +import "github.com/juju/errors" + +// ErrNotFound indicates no key is found when trying Get or Seek an entry from DB. +var ErrNotFound = errors.New("local engine: key not found") + +// Driver is the interface that must be implemented by a local storage db engine. +type Driver interface { + // Open opens or creates a local storage DB. + // The schema is a string for a local storage DB specific format. + Open(schema string) (DB, error) +} + +// MSeekResult is used to get multiple seek results. +type MSeekResult struct { + Key []byte + Value []byte + Err error +} + +// DB is the interface for local storage. +type DB interface { + // Get gets the associated value with key, returns (nil, ErrNotFound) if no value found. + Get(key []byte) ([]byte, error) + // Seek searches for the first key in the engine which is >= key in byte order, returns (nil, nil, ErrNotFound) + // if such key is not found. + Seek(key []byte) ([]byte, []byte, error) + // MultiSeek seeks multiple keys from the engine. + MultiSeek(keys [][]byte) []*MSeekResult + // NewBatch creates a Batch for writing. + NewBatch() Batch + // Commit writes the changed data in Batch. + Commit(b Batch) error + // Close closes database. + Close() error +} + +// Batch is the interface for local storage. +type Batch interface { + // Put appends 'put operation' of the key/value to the batch. + Put(key []byte, value []byte) + // Delete appends 'delete operation' of the key/value to the batch. + Delete(key []byte) + // Len return length of the batch + Len() int +} diff --git a/vendor/github.com/pingcap/tidb/store/localstore/goleveldb/goleveldb.go b/vendor/github.com/pingcap/tidb/store/localstore/goleveldb/goleveldb.go new file mode 100644 index 000000000..26f3dfc81 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/store/localstore/goleveldb/goleveldb.go @@ -0,0 +1,118 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package goleveldb + +import ( + "sync" + + "github.com/juju/errors" + "github.com/pingcap/tidb/store/localstore/engine" + "github.com/syndtr/goleveldb/leveldb" + "github.com/syndtr/goleveldb/leveldb/opt" + "github.com/syndtr/goleveldb/leveldb/storage" + "github.com/syndtr/goleveldb/leveldb/util" +) + +var ( + _ engine.DB = (*db)(nil) + _ engine.Batch = (*leveldb.Batch)(nil) +) + +var ( + p = sync.Pool{ + New: func() interface{} { + return &leveldb.Batch{} + }, + } +) + +type db struct { + *leveldb.DB +} + +func (d *db) Get(key []byte) ([]byte, error) { + v, err := d.DB.Get(key, nil) + if err == leveldb.ErrNotFound { + return nil, errors.Trace(engine.ErrNotFound) + } + return v, err +} + +func (d *db) NewBatch() engine.Batch { + b := p.Get().(*leveldb.Batch) + return b +} + +func (d *db) Seek(startKey []byte) ([]byte, []byte, error) { + iter := d.DB.NewIterator(&util.Range{Start: startKey}, nil) + defer iter.Release() + if ok := iter.First(); !ok { + return nil, nil, errors.Trace(engine.ErrNotFound) + } + return iter.Key(), iter.Value(), nil +} + +func (d *db) MultiSeek(keys [][]byte) []*engine.MSeekResult { + iter := d.DB.NewIterator(&util.Range{Start: []byte{0x0}}, nil) + defer iter.Release() + + res := make([]*engine.MSeekResult, 0, len(keys)) + for _, k := range keys { + if ok := iter.Seek(k); !ok { + res = append(res, &engine.MSeekResult{Err: engine.ErrNotFound}) + } else { + res = append(res, &engine.MSeekResult{ + Key: append([]byte(nil), iter.Key()...), + Value: append([]byte(nil), iter.Value()...), + }) + } + } + return res +} + +func (d *db) Commit(b engine.Batch) error { + batch, ok := b.(*leveldb.Batch) + if !ok { + return errors.Errorf("invalid batch type %T", b) + } + err := d.DB.Write(batch, nil) + batch.Reset() + p.Put(batch) + return err +} + +func (d *db) Close() error { + return d.DB.Close() +} + +// Driver implements engine Driver. +type Driver struct { +} + +// Open opens or creates a local storage database for the given path. +func (driver Driver) Open(path string) (engine.DB, error) { + d, err := leveldb.OpenFile(path, &opt.Options{BlockCacheCapacity: 600 * 1024 * 1024}) + + return &db{d}, err +} + +// MemoryDriver implements engine Driver +type MemoryDriver struct { +} + +// Open opens a memory storage database. +func (driver MemoryDriver) Open(path string) (engine.DB, error) { + d, err := leveldb.Open(storage.NewMemStorage(), nil) + return &db{d}, err +} diff --git a/vendor/github.com/pingcap/tidb/store/localstore/kv.go b/vendor/github.com/pingcap/tidb/store/localstore/kv.go new file mode 100644 index 000000000..88979bc5a --- /dev/null +++ b/vendor/github.com/pingcap/tidb/store/localstore/kv.go @@ -0,0 +1,466 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package localstore + +import ( + "net/url" + "path/filepath" + "runtime/debug" + "sync" + "time" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/store/localstore/engine" + "github.com/pingcap/tidb/util/segmentmap" + "github.com/twinj/uuid" +) + +var ( + _ kv.Storage = (*dbStore)(nil) +) + +type op int + +const ( + opSeek = iota + 1 + opCommit +) + +const ( + maxSeekWorkers = 3 + + lowerWaterMark = 10 // second +) + +type command struct { + op op + txn *dbTxn + args interface{} + reply interface{} + done chan error +} + +type seekReply struct { + key []byte + value []byte +} + +type commitReply struct { + err error +} + +type seekArgs struct { + key []byte +} + +type commitArgs struct { +} + +// Seek searches for the first key in the engine which is >= key in byte order, returns (nil, nil, ErrNotFound) +// if such key is not found. +func (s *dbStore) Seek(key []byte) ([]byte, []byte, error) { + c := &command{ + op: opSeek, + args: &seekArgs{key: key}, + done: make(chan error, 1), + } + + s.commandCh <- c + err := <-c.done + if err != nil { + return nil, nil, errors.Trace(err) + } + + reply := c.reply.(*seekReply) + return reply.key, reply.value, nil +} + +// Commit writes the changed data in Batch. +func (s *dbStore) CommitTxn(txn *dbTxn) error { + if len(txn.lockedKeys) == 0 { + return nil + } + c := &command{ + op: opCommit, + txn: txn, + args: &commitArgs{}, + done: make(chan error, 1), + } + + s.commandCh <- c + err := <-c.done + return errors.Trace(err) +} + +func (s *dbStore) seekWorker(wg *sync.WaitGroup, seekCh chan *command) { + defer wg.Done() + for { + var pending []*command + select { + case cmd, ok := <-seekCh: + if !ok { + return + } + pending = append(pending, cmd) + L: + for { + select { + case cmd, ok := <-seekCh: + if !ok { + break L + } + pending = append(pending, cmd) + default: + break L + } + } + } + + s.doSeek(pending) + } +} + +func (s *dbStore) scheduler() { + closed := false + seekCh := make(chan *command, 1000) + wgSeekWorkers := &sync.WaitGroup{} + wgSeekWorkers.Add(maxSeekWorkers) + for i := 0; i < maxSeekWorkers; i++ { + go s.seekWorker(wgSeekWorkers, seekCh) + } + + segmentIndex := int64(0) + + tick := time.NewTicker(time.Second) + defer tick.Stop() + + for { + select { + case cmd := <-s.commandCh: + if closed { + cmd.done <- ErrDBClosed + continue + } + switch cmd.op { + case opSeek: + seekCh <- cmd + case opCommit: + s.doCommit(cmd) + } + case <-s.closeCh: + closed = true + // notify seek worker to exit + close(seekCh) + wgSeekWorkers.Wait() + s.wg.Done() + case <-tick.C: + segmentIndex = segmentIndex % s.recentUpdates.SegmentCount() + s.cleanRecentUpdates(segmentIndex) + segmentIndex++ + } + } +} + +func (s *dbStore) cleanRecentUpdates(segmentIndex int64) { + m, err := s.recentUpdates.GetSegment(segmentIndex) + if err != nil { + log.Error(err) + return + } + + now := time.Now().Unix() + for k, v := range m { + dis := now - version2Second(v.(kv.Version)) + if dis > lowerWaterMark { + delete(m, k) + } + } +} + +func (s *dbStore) tryLock(txn *dbTxn) (err error) { + // check conflict + for k := range txn.lockedKeys { + if _, ok := s.keysLocked[k]; ok { + return errors.Trace(kv.ErrLockConflict) + } + + lastVer, ok := s.recentUpdates.Get([]byte(k)) + if !ok { + continue + } + // If there's newer version of this key, returns error. + if lastVer.(kv.Version).Cmp(kv.Version{Ver: txn.tid}) > 0 { + return errors.Trace(kv.ErrConditionNotMatch) + } + } + + // record + for k := range txn.lockedKeys { + s.keysLocked[k] = txn.tid + } + + return nil +} + +func (s *dbStore) doCommit(cmd *command) { + txn := cmd.txn + curVer, err := globalVersionProvider.CurrentVersion() + if err != nil { + log.Fatal(err) + } + err = s.tryLock(txn) + if err != nil { + cmd.done <- errors.Trace(err) + return + } + // Update commit version. + txn.version = curVer + b := s.db.NewBatch() + txn.us.WalkBuffer(func(k kv.Key, value []byte) error { + mvccKey := MvccEncodeVersionKey(kv.Key(k), curVer) + if len(value) == 0 { // Deleted marker + b.Put(mvccKey, nil) + s.compactor.OnDelete(k) + } else { + b.Put(mvccKey, value) + s.compactor.OnSet(k) + } + return nil + }) + err = s.writeBatch(b) + s.unLockKeys(txn) + cmd.done <- errors.Trace(err) +} + +func (s *dbStore) doSeek(seekCmds []*command) { + keys := make([][]byte, 0, len(seekCmds)) + for _, cmd := range seekCmds { + keys = append(keys, cmd.args.(*seekArgs).key) + } + + results := s.db.MultiSeek(keys) + + for i, cmd := range seekCmds { + reply := &seekReply{} + var err error + reply.key, reply.value, err = results[i].Key, results[i].Value, results[i].Err + cmd.reply = reply + cmd.done <- errors.Trace(err) + } +} + +func (s *dbStore) NewBatch() engine.Batch { + return s.db.NewBatch() +} + +type dbStore struct { + db engine.DB + + txns map[uint64]*dbTxn + keysLocked map[string]uint64 + // TODO: clean up recentUpdates + recentUpdates *segmentmap.SegmentMap + uuid string + path string + compactor *localstoreCompactor + wg *sync.WaitGroup + + commandCh chan *command + closeCh chan struct{} + + mu sync.Mutex + closed bool +} + +type storeCache struct { + mu sync.Mutex + cache map[string]*dbStore +} + +var ( + globalVersionProvider kv.VersionProvider + mc storeCache + + // ErrDBClosed is the error meaning db is closed and we can use it anymore. + ErrDBClosed = errors.New("db is closed") +) + +func init() { + mc.cache = make(map[string]*dbStore) + globalVersionProvider = &LocalVersionProvider{} +} + +// Driver implements kv.Driver interface. +type Driver struct { + // engine.Driver is the engine driver for different local db engine. + engine.Driver +} + +// IsLocalStore checks whether a storage is local or not. +func IsLocalStore(s kv.Storage) bool { + _, ok := s.(*dbStore) + return ok +} + +// Open opens or creates a storage with specific format for a local engine Driver. +// The path should be a URL format which is described in tidb package. +func (d Driver) Open(path string) (kv.Storage, error) { + mc.mu.Lock() + defer mc.mu.Unlock() + + u, err := url.Parse(path) + if err != nil { + return nil, errors.Trace(err) + } + + engineSchema := filepath.Join(u.Host, u.Path) + if store, ok := mc.cache[engineSchema]; ok { + // TODO: check the cache store has the same engine with this Driver. + log.Info("[kv] cache store", engineSchema) + return store, nil + } + + db, err := d.Driver.Open(engineSchema) + if err != nil { + return nil, errors.Trace(err) + } + + log.Info("[kv] New store", engineSchema) + s := &dbStore{ + txns: make(map[uint64]*dbTxn), + keysLocked: make(map[string]uint64), + uuid: uuid.NewV4().String(), + path: engineSchema, + db: db, + compactor: newLocalCompactor(localCompactDefaultPolicy, db), + commandCh: make(chan *command, 1000), + closed: false, + closeCh: make(chan struct{}), + wg: &sync.WaitGroup{}, + } + s.recentUpdates, err = segmentmap.NewSegmentMap(100) + if err != nil { + return nil, errors.Trace(err) + + } + mc.cache[engineSchema] = s + s.compactor.Start() + s.wg.Add(1) + go s.scheduler() + return s, nil +} + +func (s *dbStore) UUID() string { + return s.uuid +} + +func (s *dbStore) GetSnapshot(ver kv.Version) (kv.Snapshot, error) { + s.mu.Lock() + if s.closed { + s.mu.Unlock() + return nil, ErrDBClosed + } + s.mu.Unlock() + + currentVer, err := globalVersionProvider.CurrentVersion() + if err != nil { + return nil, errors.Trace(err) + } + + if ver.Cmp(currentVer) > 0 { + ver = currentVer + } + + return &dbSnapshot{ + store: s, + version: ver, + }, nil +} + +func (s *dbStore) CurrentVersion() (kv.Version, error) { + return globalVersionProvider.CurrentVersion() +} + +// Begin transaction +func (s *dbStore) Begin() (kv.Transaction, error) { + s.mu.Lock() + if s.closed { + s.mu.Unlock() + return nil, ErrDBClosed + } + s.mu.Unlock() + + beginVer, err := globalVersionProvider.CurrentVersion() + if err != nil { + return nil, errors.Trace(err) + } + + return newTxn(s, beginVer), nil +} + +func (s *dbStore) Close() error { + s.mu.Lock() + if s.closed { + s.mu.Unlock() + return ErrDBClosed + } + + s.closed = true + s.mu.Unlock() + + mc.mu.Lock() + defer mc.mu.Unlock() + s.compactor.Stop() + s.closeCh <- struct{}{} + s.wg.Wait() + delete(mc.cache, s.path) + return s.db.Close() +} + +func (s *dbStore) writeBatch(b engine.Batch) error { + if b.Len() == 0 { + return nil + } + + if s.closed { + return errors.Trace(ErrDBClosed) + } + + err := s.db.Commit(b) + if err != nil { + log.Error(err) + return errors.Trace(err) + } + + return nil +} + +func (s *dbStore) newBatch() engine.Batch { + return s.db.NewBatch() +} +func (s *dbStore) unLockKeys(txn *dbTxn) error { + for k := range txn.lockedKeys { + if tid, ok := s.keysLocked[k]; !ok || tid != txn.tid { + debug.PrintStack() + log.Fatalf("should never happend:%v, %v", tid, txn.tid) + } + + delete(s.keysLocked, k) + s.recentUpdates.Set([]byte(k), txn.version, true) + } + + return nil +} diff --git a/vendor/github.com/pingcap/tidb/store/localstore/local_version_provider.go b/vendor/github.com/pingcap/tidb/store/localstore/local_version_provider.go new file mode 100644 index 000000000..6a2cdb8cd --- /dev/null +++ b/vendor/github.com/pingcap/tidb/store/localstore/local_version_provider.go @@ -0,0 +1,67 @@ +package localstore + +import ( + "errors" + "sync" + "time" + + "github.com/ngaut/log" + "github.com/pingcap/tidb/kv" +) + +// ErrOverflow is the error returned by CurrentVersion, it describes if +// there're too many versions allocations in a very short period of time, ID +// may conflict. +var ErrOverflow = errors.New("overflow when allocating new version") + +// LocalVersionProvider uses local timestamp for version. +type LocalVersionProvider struct { + mu sync.Mutex + lastTimestamp uint64 + // logical guaranteed version's monotonic increasing for calls when lastTimestamp + // are equal. + logical uint64 +} + +const ( + timePrecisionOffset = 18 +) + +func time2TsPhysical(t time.Time) uint64 { + return uint64((t.UnixNano() / int64(time.Millisecond)) << timePrecisionOffset) +} + +func version2Second(v kv.Version) int64 { + return int64(v.Ver>>timePrecisionOffset) / 1000 +} + +// CurrentVersion implements the VersionProvider's GetCurrentVer interface. +func (l *LocalVersionProvider) CurrentVersion() (kv.Version, error) { + l.mu.Lock() + defer l.mu.Unlock() + + for { + var ts uint64 + ts = time2TsPhysical(time.Now()) + + if l.lastTimestamp > ts { + log.Error("[kv] invalid physical time stamp") + continue + } + + if l.lastTimestamp == uint64(ts) { + l.logical++ + if l.logical >= 1<> timePrecisionOffset +} diff --git a/vendor/github.com/pingcap/tidb/store/localstore/mvcc.go b/vendor/github.com/pingcap/tidb/store/localstore/mvcc.go new file mode 100644 index 000000000..f61296eee --- /dev/null +++ b/vendor/github.com/pingcap/tidb/store/localstore/mvcc.go @@ -0,0 +1,59 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package localstore + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/util/codec" +) + +// ErrInvalidEncodedKey describes parsing an invalid format of EncodedKey. +var ErrInvalidEncodedKey = errors.New("invalid encoded key") + +func isTombstone(v []byte) bool { + return len(v) == 0 +} + +// MvccEncodeVersionKey returns the encoded key. +func MvccEncodeVersionKey(key kv.Key, ver kv.Version) kv.EncodedKey { + b := codec.EncodeBytes(nil, key) + ret := codec.EncodeUintDesc(b, ver.Ver) + return ret +} + +// MvccDecode parses the origin key and version of an encoded key, if the encoded key is a meta key, +// just returns the origin key. +func MvccDecode(encodedKey kv.EncodedKey) (kv.Key, kv.Version, error) { + // Skip DataPrefix + remainBytes, key, err := codec.DecodeBytes([]byte(encodedKey)) + if err != nil { + // should never happen + return nil, kv.Version{}, errors.Trace(err) + } + // if it's meta key + if len(remainBytes) == 0 { + return key, kv.Version{}, nil + } + var ver uint64 + remainBytes, ver, err = codec.DecodeUintDesc(remainBytes) + if err != nil { + // should never happen + return nil, kv.Version{}, errors.Trace(err) + } + if len(remainBytes) != 0 { + return nil, kv.Version{}, ErrInvalidEncodedKey + } + return key, kv.Version{Ver: ver}, nil +} diff --git a/vendor/github.com/pingcap/tidb/store/localstore/snapshot.go b/vendor/github.com/pingcap/tidb/store/localstore/snapshot.go new file mode 100644 index 000000000..ac436a6cf --- /dev/null +++ b/vendor/github.com/pingcap/tidb/store/localstore/snapshot.go @@ -0,0 +1,178 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package localstore + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/store/localstore/engine" + "github.com/pingcap/tidb/terror" +) + +var ( + _ kv.Snapshot = (*dbSnapshot)(nil) + _ kv.Iterator = (*dbIter)(nil) +) + +// dbSnapshot implements MvccSnapshot interface. +type dbSnapshot struct { + store *dbStore + version kv.Version // transaction begin version +} + +func newSnapshot(store *dbStore, ver kv.Version) *dbSnapshot { + ss := &dbSnapshot{ + store: store, + version: ver, + } + + return ss +} + +// mvccSeek seeks for the first key in db which has a k >= key and a version <= +// snapshot's version, returns kv.ErrNotExist if such key is not found. If exact +// is true, only k == key can be returned. +func (s *dbSnapshot) mvccSeek(key kv.Key, exact bool) (kv.Key, []byte, error) { + // Key layout: + // ... + // Key_verMax -- (1) + // ... + // Key_ver+1 -- (2) + // Key_ver -- (3) + // Key_ver-1 -- (4) + // ... + // Key_0 -- (5) + // NextKey_verMax -- (6) + // ... + // NextKey_ver+1 -- (7) + // NextKey_ver -- (8) + // NextKey_ver-1 -- (9) + // ... + // NextKey_0 -- (10) + // ... + // EOF + for { + mvccKey := MvccEncodeVersionKey(key, s.version) + mvccK, v, err := s.store.Seek([]byte(mvccKey)) // search for [3...EOF) + if err != nil { + if terror.ErrorEqual(err, engine.ErrNotFound) { // EOF + return nil, nil, errors.Trace(kv.ErrNotExist) + } + return nil, nil, errors.Trace(err) + } + k, ver, err := MvccDecode(mvccK) + if err != nil { + return nil, nil, errors.Trace(err) + } + // quick test for exact mode + if exact { + if key.Cmp(k) != 0 || isTombstone(v) { + return nil, nil, errors.Trace(kv.ErrNotExist) + } + return k, v, nil + } + if ver.Ver > s.version.Ver { + // currently on [6...7] + key = k // search for [8...EOF) next loop + continue + } + // currently on [3...5] or [8...10] + if isTombstone(v) { + key = k.Next() // search for (5...EOF) or (10..EOF) next loop + continue + } + // target found + return k, v, nil + } +} + +func (s *dbSnapshot) Get(key kv.Key) ([]byte, error) { + _, v, err := s.mvccSeek(key, true) + if err != nil { + return nil, errors.Trace(err) + } + return v, nil +} + +func (s *dbSnapshot) BatchGet(keys []kv.Key) (map[string][]byte, error) { + m := make(map[string][]byte) + for _, k := range keys { + v, err := s.Get(k) + if err != nil && !kv.IsErrNotFound(err) { + return nil, errors.Trace(err) + } + if len(v) > 0 { + m[string(k)] = v + } + } + return m, nil +} + +func (s *dbSnapshot) Seek(k kv.Key) (kv.Iterator, error) { + it, err := newDBIter(s, k) + return it, errors.Trace(err) +} + +func (s *dbSnapshot) Release() { +} + +type dbIter struct { + s *dbSnapshot + valid bool + k kv.Key + v []byte +} + +func newDBIter(s *dbSnapshot, startKey kv.Key) (*dbIter, error) { + k, v, err := s.mvccSeek(startKey, false) + if err != nil { + if terror.ErrorEqual(err, kv.ErrNotExist) { + err = nil + } + return &dbIter{valid: false}, errors.Trace(err) + } + + return &dbIter{ + s: s, + valid: true, + k: k, + v: v, + }, nil +} + +func (it *dbIter) Next() error { + k, v, err := it.s.mvccSeek(it.k.Next(), false) + if err != nil { + it.valid = false + if !terror.ErrorEqual(err, kv.ErrNotExist) { + return errors.Trace(err) + } + } + it.k, it.v = k, v + return nil +} + +func (it *dbIter) Valid() bool { + return it.valid +} + +func (it *dbIter) Key() kv.Key { + return it.k +} + +func (it *dbIter) Value() []byte { + return it.v +} + +func (it *dbIter) Close() {} diff --git a/vendor/github.com/pingcap/tidb/store/localstore/txn.go b/vendor/github.com/pingcap/tidb/store/localstore/txn.go new file mode 100644 index 000000000..2b7d696dd --- /dev/null +++ b/vendor/github.com/pingcap/tidb/store/localstore/txn.go @@ -0,0 +1,160 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package localstore + +import ( + "fmt" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/kv" +) + +var ( + _ kv.Transaction = (*dbTxn)(nil) +) + +// dbTxn is not thread safe +type dbTxn struct { + us kv.UnionStore + store *dbStore // for commit + tid uint64 + valid bool + version kv.Version // commit version + lockedKeys map[string]struct{} // origin version in snapshot + dirty bool +} + +func newTxn(s *dbStore, ver kv.Version) *dbTxn { + txn := &dbTxn{ + us: kv.NewUnionStore(newSnapshot(s, ver)), + store: s, + tid: ver.Ver, + valid: true, + version: kv.MinVersion, + lockedKeys: make(map[string]struct{}), + } + log.Debugf("[kv] Begin txn:%d", txn.tid) + return txn +} + +// Implement transaction interface + +func (txn *dbTxn) Get(k kv.Key) ([]byte, error) { + log.Debugf("[kv] get key:%q, txn:%d", k, txn.tid) + return txn.us.Get(k) +} + +func (txn *dbTxn) Set(k kv.Key, data []byte) error { + log.Debugf("[kv] set key:%q, txn:%d", k, txn.tid) + txn.dirty = true + return txn.us.Set(k, data) +} + +func (txn *dbTxn) String() string { + return fmt.Sprintf("%d", txn.tid) +} + +func (txn *dbTxn) Seek(k kv.Key) (kv.Iterator, error) { + log.Debugf("[kv] seek key:%q, txn:%d", k, txn.tid) + return txn.us.Seek(k) +} + +func (txn *dbTxn) Delete(k kv.Key) error { + log.Debugf("[kv] delete key:%q, txn:%d", k, txn.tid) + txn.dirty = true + return txn.us.Delete(k) +} + +func (txn *dbTxn) SetOption(opt kv.Option, val interface{}) { + txn.us.SetOption(opt, val) +} + +func (txn *dbTxn) DelOption(opt kv.Option) { + txn.us.DelOption(opt) +} + +func (txn *dbTxn) doCommit() error { + // check lazy condition pairs + if err := txn.us.CheckLazyConditionPairs(); err != nil { + return errors.Trace(err) + } + + err := txn.us.WalkBuffer(func(k kv.Key, v []byte) error { + e := txn.LockKeys(k) + return errors.Trace(e) + }) + if err != nil { + return errors.Trace(err) + } + + return txn.store.CommitTxn(txn) +} + +func (txn *dbTxn) Commit() error { + if !txn.valid { + return errors.Trace(kv.ErrInvalidTxn) + } + log.Debugf("[kv] commit txn %d", txn.tid) + defer func() { + txn.close() + }() + + return errors.Trace(txn.doCommit()) +} + +func (txn *dbTxn) close() error { + txn.us.Release() + txn.lockedKeys = nil + txn.valid = false + return nil +} + +func (txn *dbTxn) Rollback() error { + if !txn.valid { + return errors.Trace(kv.ErrInvalidTxn) + } + log.Warnf("[kv] Rollback txn %d", txn.tid) + return txn.close() +} + +func (txn *dbTxn) LockKeys(keys ...kv.Key) error { + for _, key := range keys { + txn.lockedKeys[string(key)] = struct{}{} + } + return nil +} + +func (txn *dbTxn) IsReadOnly() bool { + return !txn.dirty +} + +func (txn *dbTxn) StartTS() int64 { + return int64(txn.tid) +} + +func (txn *dbTxn) GetClient() kv.Client { + return nil +} + +type dbClient struct { +} + +func (c *dbClient) SupportRequestType(reqType, subType int64) bool { + return false +} + +func (c *dbClient) Send(req *kv.Request) kv.Response { + return nil +} diff --git a/vendor/github.com/pingcap/tidb/structure/hash.go b/vendor/github.com/pingcap/tidb/structure/hash.go new file mode 100644 index 000000000..9c0f80aed --- /dev/null +++ b/vendor/github.com/pingcap/tidb/structure/hash.go @@ -0,0 +1,285 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package structure + +import ( + "bytes" + "encoding/binary" + "strconv" + + "github.com/juju/errors" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/terror" +) + +// HashPair is the pair for (field, value) in a hash. +type HashPair struct { + Field []byte + Value []byte +} + +type hashMeta struct { + FieldCount int64 +} + +func (meta hashMeta) Value() []byte { + buf := make([]byte, 8) + binary.BigEndian.PutUint64(buf[0:8], uint64(meta.FieldCount)) + return buf +} + +func (meta hashMeta) IsEmpty() bool { + return meta.FieldCount <= 0 +} + +// HSet sets the string value of a hash field. +func (t *TxStructure) HSet(key []byte, field []byte, value []byte) error { + return t.updateHash(key, field, func([]byte) ([]byte, error) { + return value, nil + }) +} + +// HGet gets the value of a hash field. +func (t *TxStructure) HGet(key []byte, field []byte) ([]byte, error) { + dataKey := t.encodeHashDataKey(key, field) + value, err := t.txn.Get(dataKey) + if terror.ErrorEqual(err, kv.ErrNotExist) { + err = nil + } + return value, errors.Trace(err) +} + +// HInc increments the integer value of a hash field, by step, returns +// the value after the increment. +func (t *TxStructure) HInc(key []byte, field []byte, step int64) (int64, error) { + base := int64(0) + err := t.updateHash(key, field, func(oldValue []byte) ([]byte, error) { + if oldValue != nil { + var err error + base, err = strconv.ParseInt(string(oldValue), 10, 64) + if err != nil { + return nil, errors.Trace(err) + } + } + base += step + return []byte(strconv.FormatInt(base, 10)), nil + }) + + return base, errors.Trace(err) +} + +// HGetInt64 gets int64 value of a hash field. +func (t *TxStructure) HGetInt64(key []byte, field []byte) (int64, error) { + value, err := t.HGet(key, field) + if err != nil || value == nil { + return 0, errors.Trace(err) + } + + var n int64 + n, err = strconv.ParseInt(string(value), 10, 64) + return n, errors.Trace(err) +} + +func (t *TxStructure) updateHash(key []byte, field []byte, fn func(oldValue []byte) ([]byte, error)) error { + dataKey := t.encodeHashDataKey(key, field) + oldValue, err := t.loadHashValue(dataKey) + if err != nil { + return errors.Trace(err) + } + + newValue, err := fn(oldValue) + if err != nil { + return errors.Trace(err) + } + + // Check if new value is equal to old value. + if bytes.Equal(oldValue, newValue) { + return nil + } + + if err = t.txn.Set(dataKey, newValue); err != nil { + return errors.Trace(err) + } + + metaKey := t.encodeHashMetaKey(key) + meta, err := t.loadHashMeta(metaKey) + if err != nil { + return errors.Trace(err) + } + + if oldValue == nil { + meta.FieldCount++ + if err = t.txn.Set(metaKey, meta.Value()); err != nil { + return errors.Trace(err) + } + } + + return nil +} + +// HLen gets the number of fields in a hash. +func (t *TxStructure) HLen(key []byte) (int64, error) { + metaKey := t.encodeHashMetaKey(key) + meta, err := t.loadHashMeta(metaKey) + if err != nil { + return 0, errors.Trace(err) + } + return meta.FieldCount, nil +} + +// HDel deletes one or more hash fields. +func (t *TxStructure) HDel(key []byte, fields ...[]byte) error { + metaKey := t.encodeHashMetaKey(key) + meta, err := t.loadHashMeta(metaKey) + if err != nil || meta.IsEmpty() { + return errors.Trace(err) + } + + var value []byte + for _, field := range fields { + dataKey := t.encodeHashDataKey(key, field) + + value, err = t.loadHashValue(dataKey) + if err != nil { + return errors.Trace(err) + } + + if value != nil { + if err = t.txn.Delete(dataKey); err != nil { + return errors.Trace(err) + } + + meta.FieldCount-- + } + } + + if meta.IsEmpty() { + err = t.txn.Delete(metaKey) + } else { + err = t.txn.Set(metaKey, meta.Value()) + } + + return errors.Trace(err) +} + +// HKeys gets all the fields in a hash. +func (t *TxStructure) HKeys(key []byte) ([][]byte, error) { + var keys [][]byte + err := t.iterateHash(key, func(field []byte, value []byte) error { + keys = append(keys, append([]byte{}, field...)) + return nil + }) + + return keys, errors.Trace(err) +} + +// HGetAll gets all the fields and values in a hash. +func (t *TxStructure) HGetAll(key []byte) ([]HashPair, error) { + var res []HashPair + err := t.iterateHash(key, func(field []byte, value []byte) error { + pair := HashPair{ + Field: append([]byte{}, field...), + Value: append([]byte{}, value...), + } + res = append(res, pair) + return nil + }) + + return res, errors.Trace(err) +} + +// HClear removes the hash value of the key. +func (t *TxStructure) HClear(key []byte) error { + metaKey := t.encodeHashMetaKey(key) + meta, err := t.loadHashMeta(metaKey) + if err != nil || meta.IsEmpty() { + return errors.Trace(err) + } + + err = t.iterateHash(key, func(field []byte, value []byte) error { + k := t.encodeHashDataKey(key, field) + return errors.Trace(t.txn.Delete(k)) + }) + + if err != nil { + return errors.Trace(err) + } + + return errors.Trace(t.txn.Delete(metaKey)) +} + +func (t *TxStructure) iterateHash(key []byte, fn func(k []byte, v []byte) error) error { + dataPrefix := t.hashDataKeyPrefix(key) + it, err := t.txn.Seek(dataPrefix) + if err != nil { + return errors.Trace(err) + } + + var field []byte + + for it.Valid() { + if !it.Key().HasPrefix(dataPrefix) { + break + } + + _, field, err = t.decodeHashDataKey(it.Key()) + if err != nil { + return errors.Trace(err) + } + + if err = fn(field, it.Value()); err != nil { + return errors.Trace(err) + } + + err = it.Next() + if err != nil { + return errors.Trace(err) + } + } + + return nil +} + +func (t *TxStructure) loadHashMeta(metaKey []byte) (hashMeta, error) { + v, err := t.txn.Get(metaKey) + if terror.ErrorEqual(err, kv.ErrNotExist) { + err = nil + } else if err != nil { + return hashMeta{}, errors.Trace(err) + } + + meta := hashMeta{FieldCount: 0} + if v == nil { + return meta, nil + } + + if len(v) != 8 { + return meta, errors.New("invalid list meta data") + } + + meta.FieldCount = int64(binary.BigEndian.Uint64(v[0:8])) + return meta, nil +} + +func (t *TxStructure) loadHashValue(dataKey []byte) ([]byte, error) { + v, err := t.txn.Get(dataKey) + if terror.ErrorEqual(err, kv.ErrNotExist) { + err = nil + v = nil + } else if err != nil { + return nil, errors.Trace(err) + } + + return v, nil +} diff --git a/vendor/github.com/pingcap/tidb/structure/list.go b/vendor/github.com/pingcap/tidb/structure/list.go new file mode 100644 index 000000000..b6e01cefe --- /dev/null +++ b/vendor/github.com/pingcap/tidb/structure/list.go @@ -0,0 +1,212 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package structure + +import ( + "encoding/binary" + + "github.com/juju/errors" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/terror" +) + +type listMeta struct { + LIndex int64 + RIndex int64 +} + +func (meta listMeta) Value() []byte { + buf := make([]byte, 16) + binary.BigEndian.PutUint64(buf[0:8], uint64(meta.LIndex)) + binary.BigEndian.PutUint64(buf[8:16], uint64(meta.RIndex)) + return buf +} + +func (meta listMeta) IsEmpty() bool { + return meta.LIndex >= meta.RIndex +} + +// LPush prepends one or multiple values to a list. +func (t *TxStructure) LPush(key []byte, values ...[]byte) error { + return t.listPush(key, true, values...) +} + +// RPush appends one or multiple values to a list. +func (t *TxStructure) RPush(key []byte, values ...[]byte) error { + return t.listPush(key, false, values...) +} + +func (t *TxStructure) listPush(key []byte, left bool, values ...[]byte) error { + if len(values) == 0 { + return nil + } + + metaKey := t.encodeListMetaKey(key) + meta, err := t.loadListMeta(metaKey) + if err != nil { + return errors.Trace(err) + } + + index := int64(0) + for _, v := range values { + if left { + meta.LIndex-- + index = meta.LIndex + } else { + index = meta.RIndex + meta.RIndex++ + } + + dataKey := t.encodeListDataKey(key, index) + if err = t.txn.Set(dataKey, v); err != nil { + return errors.Trace(err) + } + } + + return t.txn.Set(metaKey, meta.Value()) +} + +// LPop removes and gets the first element in a list. +func (t *TxStructure) LPop(key []byte) ([]byte, error) { + return t.listPop(key, true) +} + +// RPop removes and gets the last element in a list. +func (t *TxStructure) RPop(key []byte) ([]byte, error) { + return t.listPop(key, false) +} + +func (t *TxStructure) listPop(key []byte, left bool) ([]byte, error) { + metaKey := t.encodeListMetaKey(key) + meta, err := t.loadListMeta(metaKey) + if err != nil || meta.IsEmpty() { + return nil, errors.Trace(err) + } + + index := int64(0) + if left { + index = meta.LIndex + meta.LIndex++ + } else { + meta.RIndex-- + index = meta.RIndex + } + + dataKey := t.encodeListDataKey(key, index) + + var data []byte + data, err = t.txn.Get(dataKey) + if err != nil { + return nil, errors.Trace(err) + } + + if err = t.txn.Delete(dataKey); err != nil { + return nil, errors.Trace(err) + } + + if !meta.IsEmpty() { + err = t.txn.Set(metaKey, meta.Value()) + } else { + err = t.txn.Delete(metaKey) + } + + return data, errors.Trace(err) +} + +// LLen gets the length of a list. +func (t *TxStructure) LLen(key []byte) (int64, error) { + metaKey := t.encodeListMetaKey(key) + meta, err := t.loadListMeta(metaKey) + return meta.RIndex - meta.LIndex, errors.Trace(err) +} + +// LIndex gets an element from a list by its index. +func (t *TxStructure) LIndex(key []byte, index int64) ([]byte, error) { + metaKey := t.encodeListMetaKey(key) + meta, err := t.loadListMeta(metaKey) + if err != nil || meta.IsEmpty() { + return nil, errors.Trace(err) + } + + index = adjustIndex(index, meta.LIndex, meta.RIndex) + + if index >= meta.LIndex && index < meta.RIndex { + return t.txn.Get(t.encodeListDataKey(key, index)) + } + return nil, nil +} + +// LSet updates an element in the list by its index. +func (t *TxStructure) LSet(key []byte, index int64, value []byte) error { + metaKey := t.encodeListMetaKey(key) + meta, err := t.loadListMeta(metaKey) + if err != nil || meta.IsEmpty() { + return errors.Trace(err) + } + + index = adjustIndex(index, meta.LIndex, meta.RIndex) + + if index >= meta.LIndex && index < meta.RIndex { + return t.txn.Set(t.encodeListDataKey(key, index), value) + } + return errors.Errorf("invalid index %d", index) +} + +// LClear removes the list of the key. +func (t *TxStructure) LClear(key []byte) error { + metaKey := t.encodeListMetaKey(key) + meta, err := t.loadListMeta(metaKey) + if err != nil || meta.IsEmpty() { + return errors.Trace(err) + } + + for index := meta.LIndex; index < meta.RIndex; index++ { + dataKey := t.encodeListDataKey(key, index) + if err = t.txn.Delete(dataKey); err != nil { + return errors.Trace(err) + } + } + + return t.txn.Delete(metaKey) +} + +func (t *TxStructure) loadListMeta(metaKey []byte) (listMeta, error) { + v, err := t.txn.Get(metaKey) + if terror.ErrorEqual(err, kv.ErrNotExist) { + err = nil + } else if err != nil { + return listMeta{}, errors.Trace(err) + } + + meta := listMeta{0, 0} + if v == nil { + return meta, nil + } + + if len(v) != 16 { + return meta, errors.Errorf("invalid list meta data") + } + + meta.LIndex = int64(binary.BigEndian.Uint64(v[0:8])) + meta.RIndex = int64(binary.BigEndian.Uint64(v[8:16])) + return meta, nil +} + +func adjustIndex(index int64, min, max int64) int64 { + if index >= 0 { + return index + min + } + + return index + max +} diff --git a/vendor/github.com/pingcap/tidb/structure/string.go b/vendor/github.com/pingcap/tidb/structure/string.go new file mode 100644 index 000000000..ecd730a2b --- /dev/null +++ b/vendor/github.com/pingcap/tidb/structure/string.go @@ -0,0 +1,72 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package structure + +import ( + "strconv" + + "github.com/juju/errors" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/terror" +) + +// Set sets the string value of the key. +func (t *TxStructure) Set(key []byte, value []byte) error { + ek := t.encodeStringDataKey(key) + + return t.txn.Set(ek, value) +} + +// Get gets the string value of a key. +func (t *TxStructure) Get(key []byte) ([]byte, error) { + ek := t.encodeStringDataKey(key) + value, err := t.txn.Get(ek) + if terror.ErrorEqual(err, kv.ErrNotExist) { + err = nil + } + return value, errors.Trace(err) +} + +// GetInt64 gets the int64 value of a key. +func (t *TxStructure) GetInt64(key []byte) (int64, error) { + v, err := t.Get(key) + if err != nil || v == nil { + return 0, errors.Trace(err) + } + + n, err := strconv.ParseInt(string(v), 10, 64) + return n, errors.Trace(err) +} + +// Inc increments the integer value of a key by step, returns +// the value after the increment. +func (t *TxStructure) Inc(key []byte, step int64) (int64, error) { + ek := t.encodeStringDataKey(key) + // txn Inc will lock this key, so we don't lock it here. + n, err := kv.IncInt64(t.txn, ek, step) + if terror.ErrorEqual(err, kv.ErrNotExist) { + err = nil + } + return n, errors.Trace(err) +} + +// Clear removes the string value of the key. +func (t *TxStructure) Clear(key []byte) error { + ek := t.encodeStringDataKey(key) + err := t.txn.Delete(ek) + if terror.ErrorEqual(err, kv.ErrNotExist) { + err = nil + } + return errors.Trace(err) +} diff --git a/vendor/github.com/pingcap/tidb/structure/structure.go b/vendor/github.com/pingcap/tidb/structure/structure.go new file mode 100644 index 000000000..61fe269f8 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/structure/structure.go @@ -0,0 +1,31 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package structure + +import "github.com/pingcap/tidb/kv" + +// NewStructure creates a TxStructure in transaction txn and with key prefix. +func NewStructure(txn kv.Transaction, prefix []byte) *TxStructure { + return &TxStructure{ + txn: txn, + prefix: prefix, + } +} + +// TxStructure supports some simple data structures like string, hash, list, etc... and +// you can use these in a transaction. +type TxStructure struct { + txn kv.Transaction + prefix []byte +} diff --git a/vendor/github.com/pingcap/tidb/structure/type.go b/vendor/github.com/pingcap/tidb/structure/type.go new file mode 100644 index 000000000..5e8c87cd1 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/structure/type.go @@ -0,0 +1,116 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package structure + +import ( + "bytes" + + "github.com/juju/errors" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/util/codec" +) + +// TypeFlag is for data structure meta/data flag. +type TypeFlag byte + +const ( + // StringMeta is the flag for string meta. + StringMeta TypeFlag = 'S' + // StringData is the flag for string data. + StringData TypeFlag = 's' + // HashMeta is the flag for hash meta. + HashMeta TypeFlag = 'H' + // HashData is the flag for hash data. + HashData TypeFlag = 'h' + // ListMeta is the flag for list meta. + ListMeta TypeFlag = 'L' + // ListData is the flag for list data. + ListData TypeFlag = 'l' +) + +func (t *TxStructure) encodeStringDataKey(key []byte) kv.Key { + // for codec Encode, we may add extra bytes data, so here and following encode + // we will use extra length like 4 for a little optimization. + ek := make([]byte, 0, len(t.prefix)+len(key)+24) + ek = append(ek, t.prefix...) + ek = codec.EncodeBytes(ek, key) + return codec.EncodeUint(ek, uint64(StringData)) +} + +func (t *TxStructure) encodeHashMetaKey(key []byte) kv.Key { + ek := make([]byte, 0, len(t.prefix)+len(key)+24) + ek = append(ek, t.prefix...) + ek = codec.EncodeBytes(ek, key) + return codec.EncodeUint(ek, uint64(HashMeta)) +} + +func (t *TxStructure) encodeHashDataKey(key []byte, field []byte) kv.Key { + ek := make([]byte, 0, len(t.prefix)+len(key)+len(field)+30) + ek = append(ek, t.prefix...) + ek = codec.EncodeBytes(ek, key) + ek = codec.EncodeUint(ek, uint64(HashData)) + return codec.EncodeBytes(ek, field) +} + +func (t *TxStructure) decodeHashDataKey(ek kv.Key) ([]byte, []byte, error) { + var ( + key []byte + field []byte + err error + tp uint64 + ) + + if !bytes.HasPrefix(ek, t.prefix) { + return nil, nil, errors.New("invalid encoded hash data key prefix") + } + + ek = ek[len(t.prefix):] + + ek, key, err = codec.DecodeBytes(ek) + if err != nil { + return nil, nil, errors.Trace(err) + } + + ek, tp, err = codec.DecodeUint(ek) + if err != nil { + return nil, nil, errors.Trace(err) + } else if TypeFlag(tp) != HashData { + return nil, nil, errors.Errorf("invalid encoded hash data key flag %c", byte(tp)) + } + + _, field, err = codec.DecodeBytes(ek) + return key, field, errors.Trace(err) +} + +func (t *TxStructure) hashDataKeyPrefix(key []byte) kv.Key { + ek := make([]byte, 0, len(t.prefix)+len(key)+24) + ek = append(ek, t.prefix...) + ek = codec.EncodeBytes(ek, key) + return codec.EncodeUint(ek, uint64(HashData)) +} + +func (t *TxStructure) encodeListMetaKey(key []byte) kv.Key { + ek := make([]byte, 0, len(t.prefix)+len(key)+24) + ek = append(ek, t.prefix...) + ek = codec.EncodeBytes(ek, key) + return codec.EncodeUint(ek, uint64(ListMeta)) +} + +func (t *TxStructure) encodeListDataKey(key []byte, index int64) kv.Key { + ek := make([]byte, 0, len(t.prefix)+len(key)+36) + ek = append(ek, t.prefix...) + ek = codec.EncodeBytes(ek, key) + ek = codec.EncodeUint(ek, uint64(ListData)) + return codec.EncodeInt(ek, index) +} diff --git a/vendor/github.com/pingcap/tidb/table/table.go b/vendor/github.com/pingcap/tidb/table/table.go new file mode 100644 index 000000000..7c547ed53 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/table/table.go @@ -0,0 +1,125 @@ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package table + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/column" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/evaluator" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/meta/autoid" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/util/types" +) + +// RecordIterFunc is used for low-level record iteration. +type RecordIterFunc func(h int64, rec []types.Datum, cols []*column.Col) (more bool, err error) + +// Table is used to retrieve and modify rows in table. +type Table interface { + // IterRecords iterates records in the table and calls fn. + IterRecords(ctx context.Context, startKey kv.Key, cols []*column.Col, fn RecordIterFunc) error + + // RowWithCols returns a row that contains the given cols. + RowWithCols(ctx context.Context, h int64, cols []*column.Col) ([]types.Datum, error) + + // Row returns a row for all columns. + Row(ctx context.Context, h int64) ([]types.Datum, error) + + // Cols returns the columns of the table which is used in select. + Cols() []*column.Col + + // Indices returns the indices of the table. + Indices() []*column.IndexedCol + + // RecordPrefix returns the record key prefix. + RecordPrefix() kv.Key + + // IndexPrefix returns the index key prefix. + IndexPrefix() kv.Key + + // FirstKey returns the first key. + FirstKey() kv.Key + + // RecordKey returns the key in KV storage for the column. + RecordKey(h int64, col *column.Col) kv.Key + + // Truncate truncates the table. + Truncate(ctx context.Context) (err error) + + // AddRecord inserts a row into the table. + AddRecord(ctx context.Context, r []types.Datum) (recordID int64, err error) + + // UpdateRecord updates a row in the table. + UpdateRecord(ctx context.Context, h int64, currData []types.Datum, newData []types.Datum, touched map[int]bool) error + + // RemoveRecord removes a row in the table. + RemoveRecord(ctx context.Context, h int64, r []types.Datum) error + + // AllocAutoID allocates an auto_increment ID for a new row. + AllocAutoID() (int64, error) + + // RebaseAutoID rebases the auto_increment ID base. + // If allocIDs is true, it will allocate some IDs and save to the cache. + // If allocIDs is false, it will not allocate IDs. + RebaseAutoID(newBase int64, allocIDs bool) error + + // Meta returns TableInfo. + Meta() *model.TableInfo + + // LockRow locks a row. + LockRow(ctx context.Context, h int64, forRead bool) error + + // Seek returns the handle greater or equal to h. + Seek(ctx context.Context, h int64) (handle int64, found bool, err error) +} + +// TableFromMeta builds a table.Table from *model.TableInfo. +// Currently, it is assigned to tables.TableFromMeta in tidb package's init function. +var TableFromMeta func(alloc autoid.Allocator, tblInfo *model.TableInfo) (Table, error) + +// GetColDefaultValue gets default value of the column. +func GetColDefaultValue(ctx context.Context, col *model.ColumnInfo) (types.Datum, bool, error) { + // Check no default value flag. + if mysql.HasNoDefaultValueFlag(col.Flag) && col.Tp != mysql.TypeEnum { + return types.Datum{}, false, errors.Errorf("Field '%s' doesn't have a default value", col.Name) + } + + // Check and get timestamp/datetime default value. + if col.Tp == mysql.TypeTimestamp || col.Tp == mysql.TypeDatetime { + if col.DefaultValue == nil { + return types.Datum{}, true, nil + } + + value, err := evaluator.GetTimeValue(ctx, col.DefaultValue, col.Tp, col.Decimal) + if err != nil { + return types.Datum{}, true, errors.Errorf("Field '%s' get default value fail - %s", col.Name, errors.Trace(err)) + } + return types.NewDatum(value), true, nil + } else if col.Tp == mysql.TypeEnum { + // For enum type, if no default value and not null is set, + // the default value is the first element of the enum list + if col.DefaultValue == nil && mysql.HasNotNullFlag(col.Flag) { + return types.NewDatum(col.FieldType.Elems[0]), true, nil + } + } + + return types.NewDatum(col.DefaultValue), true, nil +} diff --git a/vendor/github.com/pingcap/tidb/table/tables/memory_tables.go b/vendor/github.com/pingcap/tidb/table/tables/memory_tables.go new file mode 100644 index 000000000..118781b35 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/table/tables/memory_tables.go @@ -0,0 +1,260 @@ +// Copyright 2016 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package tables + +import ( + "sync" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/petar/GoLLRB/llrb" + "github.com/pingcap/tidb/column" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/meta/autoid" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/table" + "github.com/pingcap/tidb/util/types" +) + +var ( + errRowNotFound = errors.New("Can not find the row") +) + +type itemKey int64 + +type itemPair struct { + handle itemKey + data []types.Datum +} + +func (r *itemPair) Less(item llrb.Item) bool { + switch x := item.(type) { + case itemKey: + return r.handle < x + case *itemPair: + return r.handle < x.handle + } + log.Errorf("invalid type %T", item) + return true +} + +func (k itemKey) Less(item llrb.Item) bool { + switch x := item.(type) { + case itemKey: + return k < x + case *itemPair: + return k < x.handle + } + log.Errorf("invalid type %T", item) + return true +} + +// MemoryTable implements table.Table interface. +type MemoryTable struct { + ID int64 + Name model.CIStr + Columns []*column.Col + pkHandleCol *column.Col + + recordPrefix kv.Key + alloc autoid.Allocator + meta *model.TableInfo + + tree *llrb.LLRB + mu sync.RWMutex +} + +// MemoryTableFromMeta creates a Table instance from model.TableInfo. +func MemoryTableFromMeta(alloc autoid.Allocator, tblInfo *model.TableInfo) (table.Table, error) { + columns := make([]*column.Col, 0, len(tblInfo.Columns)) + var pkHandleColumn *column.Col + for _, colInfo := range tblInfo.Columns { + col := &column.Col{ColumnInfo: *colInfo} + columns = append(columns, col) + if col.IsPKHandleColumn(tblInfo) { + pkHandleColumn = col + } + } + t := newMemoryTable(tblInfo.ID, tblInfo.Name.O, columns, alloc) + t.pkHandleCol = pkHandleColumn + t.meta = tblInfo + return t, nil +} + +// newMemoryTable constructs a MemoryTable instance. +func newMemoryTable(tableID int64, tableName string, cols []*column.Col, alloc autoid.Allocator) *MemoryTable { + name := model.NewCIStr(tableName) + t := &MemoryTable{ + ID: tableID, + Name: name, + alloc: alloc, + Columns: cols, + recordPrefix: genTableRecordPrefix(tableID), + tree: llrb.New(), + } + return t +} + +// Seek seeks the handle +func (t *MemoryTable) Seek(ctx context.Context, handle int64) (int64, bool, error) { + var found bool + var result int64 + t.mu.RLock() + t.tree.AscendGreaterOrEqual(itemKey(handle), func(item llrb.Item) bool { + found = true + result = int64(item.(*itemPair).handle) + return false + }) + t.mu.RUnlock() + return result, found, nil +} + +// Indices implements table.Table Indices interface. +func (t *MemoryTable) Indices() []*column.IndexedCol { + return nil +} + +// Meta implements table.Table Meta interface. +func (t *MemoryTable) Meta() *model.TableInfo { + return t.meta +} + +// Cols implements table.Table Cols interface. +func (t *MemoryTable) Cols() []*column.Col { + return t.Columns +} + +// RecordPrefix implements table.Table RecordPrefix interface. +func (t *MemoryTable) RecordPrefix() kv.Key { + return t.recordPrefix +} + +// IndexPrefix implements table.Table IndexPrefix interface. +func (t *MemoryTable) IndexPrefix() kv.Key { + return nil +} + +// RecordKey implements table.Table RecordKey interface. +func (t *MemoryTable) RecordKey(h int64, col *column.Col) kv.Key { + colID := int64(0) + if col != nil { + colID = col.ID + } + return encodeRecordKey(t.recordPrefix, h, colID) +} + +// FirstKey implements table.Table FirstKey interface. +func (t *MemoryTable) FirstKey() kv.Key { + return t.RecordKey(0, nil) +} + +// Truncate implements table.Table Truncate interface. +func (t *MemoryTable) Truncate(ctx context.Context) error { + t.tree = llrb.New() + return nil +} + +// UpdateRecord implements table.Table UpdateRecord interface. +func (t *MemoryTable) UpdateRecord(ctx context.Context, h int64, oldData []types.Datum, newData []types.Datum, touched map[int]bool) error { + t.mu.Lock() + defer t.mu.Unlock() + item := t.tree.Get(itemKey(h)) + if item == nil { + return errRowNotFound + } + pair := item.(*itemPair) + pair.data = newData + return nil +} + +// AddRecord implements table.Table AddRecord interface. +func (t *MemoryTable) AddRecord(ctx context.Context, r []types.Datum) (recordID int64, err error) { + if t.pkHandleCol != nil { + recordID, err = types.ToInt64(r[t.pkHandleCol.Offset].GetValue()) + if err != nil { + return 0, errors.Trace(err) + } + } else { + recordID, err = t.alloc.Alloc(t.ID) + if err != nil { + return 0, errors.Trace(err) + } + } + item := &itemPair{ + handle: itemKey(recordID), + data: r, + } + t.mu.Lock() + defer t.mu.Unlock() + if t.tree.Get(itemKey(recordID)) != nil { + return 0, kv.ErrKeyExists + } + t.tree.ReplaceOrInsert(item) + return +} + +// RowWithCols implements table.Table RowWithCols interface. +func (t *MemoryTable) RowWithCols(ctx context.Context, h int64, cols []*column.Col) ([]types.Datum, error) { + t.mu.RLock() + defer t.mu.RUnlock() + item := t.tree.Get(itemKey(h)) + if item == nil { + return nil, errRowNotFound + } + row := item.(*itemPair).data + v := make([]types.Datum, len(cols)) + for i, col := range cols { + v[i] = row[col.Offset] + } + return v, nil +} + +// Row implements table.Table Row interface. +func (t *MemoryTable) Row(ctx context.Context, h int64) ([]types.Datum, error) { + r, err := t.RowWithCols(nil, h, t.Cols()) + if err != nil { + return nil, errors.Trace(err) + } + return r, nil +} + +// LockRow implements table.Table LockRow interface. +func (t *MemoryTable) LockRow(ctx context.Context, h int64, forRead bool) error { + return nil +} + +// RemoveRecord implements table.Table RemoveRecord interface. +func (t *MemoryTable) RemoveRecord(ctx context.Context, h int64, r []types.Datum) error { + t.mu.Lock() + t.tree.Delete(itemKey(h)) + t.mu.Unlock() + return nil +} + +// AllocAutoID implements table.Table AllocAutoID interface. +func (t *MemoryTable) AllocAutoID() (int64, error) { + return t.alloc.Alloc(t.ID) +} + +// RebaseAutoID implements table.Table RebaseAutoID interface. +func (t *MemoryTable) RebaseAutoID(newBase int64, isSetStep bool) error { + return t.alloc.Rebase(t.ID, newBase, isSetStep) +} + +// IterRecords implements table.Table IterRecords interface. +func (t *MemoryTable) IterRecords(ctx context.Context, startKey kv.Key, cols []*column.Col, + fn table.RecordIterFunc) error { + return nil +} diff --git a/vendor/github.com/pingcap/tidb/table/tables/tables.go b/vendor/github.com/pingcap/tidb/table/tables/tables.go new file mode 100644 index 000000000..9c038a91d --- /dev/null +++ b/vendor/github.com/pingcap/tidb/table/tables/tables.go @@ -0,0 +1,875 @@ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package tables + +import ( + "strings" + "time" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/column" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/evaluator" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/meta/autoid" + "github.com/pingcap/tidb/model" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/sessionctx/variable" + "github.com/pingcap/tidb/table" + "github.com/pingcap/tidb/terror" + "github.com/pingcap/tidb/util" + "github.com/pingcap/tidb/util/codec" + "github.com/pingcap/tidb/util/types" +) + +// TablePrefix is the prefix for table record and index key. +var TablePrefix = []byte{'t'} + +// Table implements table.Table interface. +type Table struct { + ID int64 + Name model.CIStr + Columns []*column.Col + + publicColumns []*column.Col + writableColumns []*column.Col + indices []*column.IndexedCol + recordPrefix kv.Key + indexPrefix kv.Key + alloc autoid.Allocator + meta *model.TableInfo +} + +// TableFromMeta creates a Table instance from model.TableInfo. +func TableFromMeta(alloc autoid.Allocator, tblInfo *model.TableInfo) (table.Table, error) { + if tblInfo.State == model.StateNone { + return nil, errors.Errorf("table %s can't be in none state", tblInfo.Name) + } + + columns := make([]*column.Col, 0, len(tblInfo.Columns)) + for _, colInfo := range tblInfo.Columns { + if colInfo.State == model.StateNone { + return nil, errors.Errorf("column %s can't be in none state", colInfo.Name) + } + + col := &column.Col{ColumnInfo: *colInfo} + columns = append(columns, col) + } + + t := newTable(tblInfo.ID, columns, alloc) + + for _, idxInfo := range tblInfo.Indices { + if idxInfo.State == model.StateNone { + return nil, errors.Errorf("index %s can't be in none state", idxInfo.Name) + } + + idx := &column.IndexedCol{ + IndexInfo: *idxInfo, + } + + idx.X = kv.NewKVIndex(t.IndexPrefix(), idxInfo.Name.L, idxInfo.ID, idxInfo.Unique) + + t.indices = append(t.indices, idx) + } + t.meta = tblInfo + return t, nil +} + +// newTable constructs a Table instance. +func newTable(tableID int64, cols []*column.Col, alloc autoid.Allocator) *Table { + t := &Table{ + ID: tableID, + recordPrefix: genTableRecordPrefix(tableID), + indexPrefix: genTableIndexPrefix(tableID), + alloc: alloc, + Columns: cols, + } + + t.publicColumns = t.Cols() + t.writableColumns = t.writableCols() + return t +} + +// Indices implements table.Table Indices interface. +func (t *Table) Indices() []*column.IndexedCol { + return t.indices +} + +// Meta implements table.Table Meta interface. +func (t *Table) Meta() *model.TableInfo { + return t.meta +} + +// Cols implements table.Table Cols interface. +func (t *Table) Cols() []*column.Col { + if len(t.publicColumns) > 0 { + return t.publicColumns + } + + t.publicColumns = make([]*column.Col, 0, len(t.Columns)) + for _, col := range t.Columns { + if col.State == model.StatePublic { + t.publicColumns = append(t.publicColumns, col) + } + } + + return t.publicColumns +} + +func (t *Table) writableCols() []*column.Col { + if len(t.writableColumns) > 0 { + return t.writableColumns + } + + t.writableColumns = make([]*column.Col, 0, len(t.Columns)) + for _, col := range t.Columns { + if col.State == model.StateDeleteOnly || col.State == model.StateDeleteReorganization { + continue + } + + t.writableColumns = append(t.writableColumns, col) + } + + return t.writableColumns +} + +// RecordPrefix implements table.Table RecordPrefix interface. +func (t *Table) RecordPrefix() kv.Key { + return t.recordPrefix +} + +// IndexPrefix implements table.Table IndexPrefix interface. +func (t *Table) IndexPrefix() kv.Key { + return t.indexPrefix +} + +// RecordKey implements table.Table RecordKey interface. +func (t *Table) RecordKey(h int64, col *column.Col) kv.Key { + colID := int64(0) + if col != nil { + colID = col.ID + } + return encodeRecordKey(t.recordPrefix, h, colID) +} + +// FirstKey implements table.Table FirstKey interface. +func (t *Table) FirstKey() kv.Key { + return t.RecordKey(0, nil) +} + +// Truncate implements table.Table Truncate interface. +func (t *Table) Truncate(ctx context.Context) error { + txn, err := ctx.GetTxn(false) + if err != nil { + return errors.Trace(err) + } + err = util.DelKeyWithPrefix(txn, t.RecordPrefix()) + if err != nil { + return errors.Trace(err) + } + return util.DelKeyWithPrefix(txn, t.IndexPrefix()) +} + +// UpdateRecord implements table.Table UpdateRecord interface. +func (t *Table) UpdateRecord(ctx context.Context, h int64, oldData []types.Datum, newData []types.Datum, touched map[int]bool) error { + // We should check whether this table has on update column which state is write only. + currentData := make([]types.Datum, len(t.writableCols())) + copy(currentData, newData) + + // If they are not set, and other data are changed, they will be updated by current timestamp too. + err := t.setOnUpdateData(ctx, touched, currentData) + if err != nil { + return errors.Trace(err) + } + + txn, err := ctx.GetTxn(false) + if err != nil { + return errors.Trace(err) + } + + bs := kv.NewBufferStore(txn) + defer bs.Release() + + // set new value + if err = t.setNewData(bs, h, touched, currentData); err != nil { + return errors.Trace(err) + } + + // rebuild index + if err = t.rebuildIndices(bs, h, touched, oldData, currentData); err != nil { + return errors.Trace(err) + } + + err = bs.SaveTo(txn) + if err != nil { + return errors.Trace(err) + } + + return nil +} + +func (t *Table) setOnUpdateData(ctx context.Context, touched map[int]bool, data []types.Datum) error { + ucols := column.FindOnUpdateCols(t.writableCols()) + for _, col := range ucols { + if !touched[col.Offset] { + value, err := evaluator.GetTimeValue(ctx, evaluator.CurrentTimestamp, col.Tp, col.Decimal) + if err != nil { + return errors.Trace(err) + } + + data[col.Offset] = types.NewDatum(value) + touched[col.Offset] = true + } + } + return nil +} +func (t *Table) setNewData(rm kv.RetrieverMutator, h int64, touched map[int]bool, data []types.Datum) error { + for _, col := range t.Cols() { + if !touched[col.Offset] { + continue + } + + k := t.RecordKey(h, col) + if err := SetColValue(rm, k, data[col.Offset]); err != nil { + return errors.Trace(err) + } + } + + return nil +} + +func (t *Table) rebuildIndices(rm kv.RetrieverMutator, h int64, touched map[int]bool, oldData []types.Datum, newData []types.Datum) error { + for _, idx := range t.Indices() { + idxTouched := false + for _, ic := range idx.Columns { + if touched[ic.Offset] { + idxTouched = true + break + } + } + if !idxTouched { + continue + } + + oldVs, err := idx.FetchValues(oldData) + if err != nil { + return errors.Trace(err) + } + + if t.removeRowIndex(rm, h, oldVs, idx); err != nil { + return errors.Trace(err) + } + + newVs, err := idx.FetchValues(newData) + if err != nil { + return errors.Trace(err) + } + + if err := t.buildIndexForRow(rm, h, newVs, idx); err != nil { + return errors.Trace(err) + } + } + return nil +} + +// AddRecord implements table.Table AddRecord interface. +func (t *Table) AddRecord(ctx context.Context, r []types.Datum) (recordID int64, err error) { + var hasRecordID bool + for _, col := range t.Cols() { + if col.IsPKHandleColumn(t.meta) { + recordID = r[col.Offset].GetInt64() + hasRecordID = true + break + } + } + if !hasRecordID { + recordID, err = t.alloc.Alloc(t.ID) + if err != nil { + return 0, errors.Trace(err) + } + } + txn, err := ctx.GetTxn(false) + if err != nil { + return 0, errors.Trace(err) + } + bs := kv.NewBufferStore(txn) + defer bs.Release() + // Insert new entries into indices. + h, err := t.addIndices(ctx, recordID, r, bs) + if err != nil { + return h, errors.Trace(err) + } + + if err = t.LockRow(ctx, recordID, false); err != nil { + return 0, errors.Trace(err) + } + // Set public and write only column value. + for _, col := range t.writableCols() { + if col.IsPKHandleColumn(t.meta) { + continue + } + var value types.Datum + if col.State == model.StateWriteOnly || col.State == model.StateWriteReorganization { + // if col is in write only or write reorganization state, we must add it with its default value. + value, _, err = table.GetColDefaultValue(ctx, &col.ColumnInfo) + if err != nil { + return 0, errors.Trace(err) + } + value, err = value.ConvertTo(&col.FieldType) + if err != nil { + return 0, errors.Trace(err) + } + } else { + value = r[col.Offset] + } + + key := t.RecordKey(recordID, col) + err = SetColValue(txn, key, value) + if err != nil { + return 0, errors.Trace(err) + } + } + if err = bs.SaveTo(txn); err != nil { + return 0, errors.Trace(err) + } + + variable.GetSessionVars(ctx).AddAffectedRows(1) + return recordID, nil +} + +// Generate index content string representation. +func (t *Table) genIndexKeyStr(colVals []types.Datum) (string, error) { + // Pass pre-composed error to txn. + strVals := make([]string, 0, len(colVals)) + for _, cv := range colVals { + cvs := "NULL" + var err error + if cv.Kind() != types.KindNull { + cvs, err = types.ToString(cv.GetValue()) + if err != nil { + return "", errors.Trace(err) + } + } + strVals = append(strVals, cvs) + } + return strings.Join(strVals, "-"), nil +} + +// Add data into indices. +func (t *Table) addIndices(ctx context.Context, recordID int64, r []types.Datum, bs *kv.BufferStore) (int64, error) { + txn, err := ctx.GetTxn(false) + if err != nil { + return 0, errors.Trace(err) + } + // Clean up lazy check error environment + defer txn.DelOption(kv.PresumeKeyNotExistsError) + if t.meta.PKIsHandle { + // Check key exists. + recordKey := t.RecordKey(recordID, nil) + e := kv.ErrKeyExists.Gen("Duplicate entry '%d' for key 'PRIMARY'", recordID) + txn.SetOption(kv.PresumeKeyNotExistsError, e) + _, err = txn.Get(recordKey) + if err == nil { + return recordID, errors.Trace(e) + } else if !terror.ErrorEqual(err, kv.ErrNotExist) { + return 0, errors.Trace(err) + } + txn.DelOption(kv.PresumeKeyNotExistsError) + } + + for _, v := range t.indices { + if v == nil || v.State == model.StateDeleteOnly || v.State == model.StateDeleteReorganization { + // if index is in delete only or delete reorganization state, we can't add it. + continue + } + colVals, _ := v.FetchValues(r) + var dupKeyErr error + if v.Unique || v.Primary { + entryKey, err1 := t.genIndexKeyStr(colVals) + if err1 != nil { + return 0, errors.Trace(err1) + } + dupKeyErr = kv.ErrKeyExists.Gen("Duplicate entry '%s' for key '%s'", entryKey, v.Name) + txn.SetOption(kv.PresumeKeyNotExistsError, dupKeyErr) + } + if err = v.X.Create(bs, colVals, recordID); err != nil { + if terror.ErrorEqual(err, kv.ErrKeyExists) { + // Get the duplicate row handle + // For insert on duplicate syntax, we should update the row + iter, _, err1 := v.X.Seek(bs, colVals) + if err1 != nil { + return 0, errors.Trace(err1) + } + _, h, err1 := iter.Next() + if err1 != nil { + return 0, errors.Trace(err1) + } + return h, errors.Trace(dupKeyErr) + } + return 0, errors.Trace(err) + } + txn.DelOption(kv.PresumeKeyNotExistsError) + } + return 0, nil +} + +// RowWithCols implements table.Table RowWithCols interface. +func (t *Table) RowWithCols(ctx context.Context, h int64, cols []*column.Col) ([]types.Datum, error) { + txn, err := ctx.GetTxn(false) + if err != nil { + return nil, errors.Trace(err) + } + v := make([]types.Datum, len(cols)) + for i, col := range cols { + if col.State != model.StatePublic { + return nil, errors.Errorf("Cannot use none public column - %v", cols) + } + if col.IsPKHandleColumn(t.meta) { + v[i].SetInt64(h) + continue + } + + k := t.RecordKey(h, col) + data, err := txn.Get(k) + if err != nil { + return nil, errors.Trace(err) + } + + v[i], err = DecodeValue(data, &col.FieldType) + if err != nil { + return nil, errors.Trace(err) + } + } + return v, nil +} + +// Row implements table.Table Row interface. +func (t *Table) Row(ctx context.Context, h int64) ([]types.Datum, error) { + // TODO: we only interested in mentioned cols + r, err := t.RowWithCols(ctx, h, t.Cols()) + if err != nil { + return nil, errors.Trace(err) + } + return r, nil +} + +// LockRow implements table.Table LockRow interface. +func (t *Table) LockRow(ctx context.Context, h int64, forRead bool) error { + txn, err := ctx.GetTxn(false) + if err != nil { + return errors.Trace(err) + } + // Get row lock key + lockKey := t.RecordKey(h, nil) + if forRead { + err = txn.LockKeys(lockKey) + } else { + // set row lock key to current txn + err = txn.Set(lockKey, []byte(txn.String())) + } + return errors.Trace(err) +} + +// RemoveRecord implements table.Table RemoveRecord interface. +func (t *Table) RemoveRecord(ctx context.Context, h int64, r []types.Datum) error { + err := t.removeRowData(ctx, h) + if err != nil { + return errors.Trace(err) + } + + err = t.removeRowIndices(ctx, h, r) + if err != nil { + return errors.Trace(err) + } + + return nil +} + +func (t *Table) removeRowData(ctx context.Context, h int64) error { + if err := t.LockRow(ctx, h, false); err != nil { + return errors.Trace(err) + } + txn, err := ctx.GetTxn(false) + if err != nil { + return errors.Trace(err) + } + // Remove row's colume one by one + for _, col := range t.Columns { + k := t.RecordKey(h, col) + err = txn.Delete([]byte(k)) + if err != nil { + if col.State != model.StatePublic && terror.ErrorEqual(err, kv.ErrNotExist) { + // If the column is not in public state, we may have not added the column, + // or already deleted the column, so skip ErrNotExist error. + continue + } + + return errors.Trace(err) + } + } + // Remove row lock + err = txn.Delete([]byte(t.RecordKey(h, nil))) + if err != nil { + return errors.Trace(err) + } + return nil +} + +// removeRowAllIndex removes all the indices of a row. +func (t *Table) removeRowIndices(ctx context.Context, h int64, rec []types.Datum) error { + for _, v := range t.indices { + vals, err := v.FetchValues(rec) + if vals == nil { + // TODO: check this + continue + } + txn, err := ctx.GetTxn(false) + if err != nil { + return errors.Trace(err) + } + if err = v.X.Delete(txn, vals, h); err != nil { + if v.State != model.StatePublic && terror.ErrorEqual(err, kv.ErrNotExist) { + // If the index is not in public state, we may have not created the index, + // or already deleted the index, so skip ErrNotExist error. + continue + } + + return errors.Trace(err) + } + } + return nil +} + +// RemoveRowIndex implements table.Table RemoveRowIndex interface. +func (t *Table) removeRowIndex(rm kv.RetrieverMutator, h int64, vals []types.Datum, idx *column.IndexedCol) error { + if err := idx.X.Delete(rm, vals, h); err != nil { + return errors.Trace(err) + } + return nil +} + +// BuildIndexForRow implements table.Table BuildIndexForRow interface. +func (t *Table) buildIndexForRow(rm kv.RetrieverMutator, h int64, vals []types.Datum, idx *column.IndexedCol) error { + if idx.State == model.StateDeleteOnly || idx.State == model.StateDeleteReorganization { + // If the index is in delete only or write reorganization state, we can not add index. + return nil + } + + if err := idx.X.Create(rm, vals, h); err != nil { + return errors.Trace(err) + } + return nil +} + +// IterRecords implements table.Table IterRecords interface. +func (t *Table) IterRecords(ctx context.Context, startKey kv.Key, cols []*column.Col, + fn table.RecordIterFunc) error { + txn, err := ctx.GetTxn(false) + if err != nil { + return errors.Trace(err) + } + it, err := txn.Seek(startKey) + if err != nil { + return errors.Trace(err) + } + defer it.Close() + + if !it.Valid() { + return nil + } + + log.Debugf("startKey:%q, key:%q, value:%q", startKey, it.Key(), it.Value()) + + prefix := t.RecordPrefix() + for it.Valid() && it.Key().HasPrefix(prefix) { + // first kv pair is row lock information. + // TODO: check valid lock + // get row handle + handle, err := DecodeRecordKeyHandle(it.Key()) + if err != nil { + return errors.Trace(err) + } + + data, err := t.RowWithCols(ctx, handle, cols) + if err != nil { + return errors.Trace(err) + } + more, err := fn(handle, data, cols) + if !more || err != nil { + return errors.Trace(err) + } + + rk := t.RecordKey(handle, nil) + err = kv.NextUntil(it, util.RowKeyPrefixFilter(rk)) + if err != nil { + return errors.Trace(err) + } + } + + return nil +} + +// AllocAutoID implements table.Table AllocAutoID interface. +func (t *Table) AllocAutoID() (int64, error) { + return t.alloc.Alloc(t.ID) +} + +// RebaseAutoID implements table.Table RebaseAutoID interface. +func (t *Table) RebaseAutoID(newBase int64, isSetStep bool) error { + return t.alloc.Rebase(t.ID, newBase, isSetStep) +} + +// Seek implements table.Table Seek interface. +func (t *Table) Seek(ctx context.Context, h int64) (int64, bool, error) { + seekKey := EncodeRecordKey(t.ID, h, 0) + txn, err := ctx.GetTxn(false) + if err != nil { + return 0, false, errors.Trace(err) + } + iter, err := txn.Seek(seekKey) + if !iter.Valid() || !iter.Key().HasPrefix(t.RecordPrefix()) { + // No more records in the table, skip to the end. + return 0, false, nil + } + handle, err := DecodeRecordKeyHandle(iter.Key()) + if err != nil { + return 0, false, errors.Trace(err) + } + return handle, true, nil +} + +var ( + recordPrefixSep = []byte("_r") + indexPrefixSep = []byte("_i") +) + +// record prefix is "t[tableID]_r" +func genTableRecordPrefix(tableID int64) kv.Key { + buf := make([]byte, 0, len(TablePrefix)+8+len(recordPrefixSep)) + buf = append(buf, TablePrefix...) + buf = codec.EncodeInt(buf, tableID) + buf = append(buf, recordPrefixSep...) + return buf +} + +// index prefix is "t[tableID]_i" +func genTableIndexPrefix(tableID int64) kv.Key { + buf := make([]byte, 0, len(TablePrefix)+8+len(indexPrefixSep)) + buf = append(buf, TablePrefix...) + buf = codec.EncodeInt(buf, tableID) + buf = append(buf, indexPrefixSep...) + return buf +} + +func encodeRecordKey(recordPrefix kv.Key, h int64, columnID int64) kv.Key { + buf := make([]byte, 0, len(recordPrefix)+16) + buf = append(buf, recordPrefix...) + buf = codec.EncodeInt(buf, h) + + if columnID != 0 { + buf = codec.EncodeInt(buf, columnID) + } + return buf +} + +// EncodeRecordKey encodes the record key for a table column. +func EncodeRecordKey(tableID int64, h int64, columnID int64) kv.Key { + prefix := genTableRecordPrefix(tableID) + return encodeRecordKey(prefix, h, columnID) +} + +// DecodeRecordKey decodes the key and gets the tableID, handle and columnID. +func DecodeRecordKey(key kv.Key) (tableID int64, handle int64, columnID int64, err error) { + k := key + if !key.HasPrefix(TablePrefix) { + return 0, 0, 0, errors.Errorf("invalid record key - %q", k) + } + + key = key[len(TablePrefix):] + key, tableID, err = codec.DecodeInt(key) + if err != nil { + return 0, 0, 0, errors.Trace(err) + } + + if !key.HasPrefix(recordPrefixSep) { + return 0, 0, 0, errors.Errorf("invalid record key - %q", k) + } + + key = key[len(recordPrefixSep):] + + key, handle, err = codec.DecodeInt(key) + if err != nil { + return 0, 0, 0, errors.Trace(err) + } + if len(key) == 0 { + return + } + + key, columnID, err = codec.DecodeInt(key) + if err != nil { + return 0, 0, 0, errors.Trace(err) + } + + return +} + +// EncodeValue encodes a go value to bytes. +func EncodeValue(raw types.Datum) ([]byte, error) { + v, err := flatten(raw) + if err != nil { + return nil, errors.Trace(err) + } + b, err := codec.EncodeValue(nil, v) + return b, errors.Trace(err) +} + +// DecodeValue implements table.Table DecodeValue interface. +func DecodeValue(data []byte, tp *types.FieldType) (types.Datum, error) { + values, err := codec.Decode(data) + if err != nil { + return types.Datum{}, errors.Trace(err) + } + return unflatten(values[0], tp) +} + +func flatten(data types.Datum) (types.Datum, error) { + switch data.Kind() { + case types.KindMysqlTime: + // for mysql datetime, timestamp and date type + b, err := data.GetMysqlTime().Marshal() + if err != nil { + return types.NewDatum(nil), errors.Trace(err) + } + return types.NewDatum(b), nil + case types.KindMysqlDuration: + // for mysql time type + data.SetInt64(int64(data.GetMysqlDuration().Duration)) + return data, nil + case types.KindMysqlDecimal: + data.SetString(data.GetMysqlDecimal().String()) + return data, nil + case types.KindMysqlEnum: + data.SetUint64(data.GetMysqlEnum().Value) + return data, nil + case types.KindMysqlSet: + data.SetUint64(data.GetMysqlSet().Value) + return data, nil + case types.KindMysqlBit: + data.SetUint64(data.GetMysqlBit().Value) + return data, nil + case types.KindMysqlHex: + data.SetInt64(data.GetMysqlHex().Value) + return data, nil + default: + return data, nil + } +} + +func unflatten(datum types.Datum, tp *types.FieldType) (types.Datum, error) { + if datum.Kind() == types.KindNull { + return datum, nil + } + switch tp.Tp { + case mysql.TypeFloat: + datum.SetFloat32(float32(datum.GetFloat64())) + return datum, nil + case mysql.TypeTiny, mysql.TypeShort, mysql.TypeYear, mysql.TypeInt24, mysql.TypeLong, mysql.TypeLonglong, + mysql.TypeDouble, mysql.TypeTinyBlob, mysql.TypeMediumBlob, mysql.TypeBlob, mysql.TypeLongBlob, + mysql.TypeVarchar, mysql.TypeString: + return datum, nil + case mysql.TypeDate, mysql.TypeDatetime, mysql.TypeTimestamp: + var t mysql.Time + t.Type = tp.Tp + t.Fsp = tp.Decimal + err := t.Unmarshal(datum.GetBytes()) + if err != nil { + return datum, errors.Trace(err) + } + datum.SetValue(t) + return datum, nil + case mysql.TypeDuration: + dur := mysql.Duration{Duration: time.Duration(datum.GetInt64())} + datum.SetValue(dur) + return datum, nil + case mysql.TypeNewDecimal, mysql.TypeDecimal: + dec, err := mysql.ParseDecimal(datum.GetString()) + if err != nil { + return datum, errors.Trace(err) + } + datum.SetValue(dec) + return datum, nil + case mysql.TypeEnum: + enum, err := mysql.ParseEnumValue(tp.Elems, datum.GetUint64()) + if err != nil { + return datum, errors.Trace(err) + } + datum.SetValue(enum) + return datum, nil + case mysql.TypeSet: + set, err := mysql.ParseSetValue(tp.Elems, datum.GetUint64()) + if err != nil { + return datum, errors.Trace(err) + } + datum.SetValue(set) + return datum, nil + case mysql.TypeBit: + bit := mysql.Bit{Value: datum.GetUint64(), Width: tp.Flen} + datum.SetValue(bit) + return datum, nil + } + log.Error(tp.Tp, datum) + return datum, nil +} + +// SetColValue implements table.Table SetColValue interface. +func SetColValue(rm kv.RetrieverMutator, key []byte, data types.Datum) error { + v, err := EncodeValue(data) + if err != nil { + return errors.Trace(err) + } + if err := rm.Set(key, v); err != nil { + return errors.Trace(err) + } + return nil +} + +// DecodeRecordKeyHandle decodes the key and gets the record handle. +func DecodeRecordKeyHandle(key kv.Key) (int64, error) { + _, handle, _, err := DecodeRecordKey(key) + return handle, errors.Trace(err) +} + +// FindIndexByColName implements table.Table FindIndexByColName interface. +func FindIndexByColName(t table.Table, name string) *column.IndexedCol { + for _, idx := range t.Indices() { + // only public index can be read. + if idx.State != model.StatePublic { + continue + } + + if len(idx.Columns) == 1 && strings.EqualFold(idx.Columns[0].Name.L, name) { + return idx + } + } + return nil +} + +func init() { + table.TableFromMeta = TableFromMeta +} diff --git a/vendor/github.com/pingcap/tidb/terror/terror.go b/vendor/github.com/pingcap/tidb/terror/terror.go new file mode 100644 index 000000000..46ce78e5f --- /dev/null +++ b/vendor/github.com/pingcap/tidb/terror/terror.go @@ -0,0 +1,240 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package terror + +import ( + "fmt" + "runtime" + "strconv" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/mysql" +) + +// Common base error instances. +var ( + CommitNotInTransaction = ClassExecutor.New(CodeCommitNotInTransaction, "commit not in transaction") + RollbackNotInTransaction = ClassExecutor.New(CodeRollbackNotInTransaction, "rollback not in transaction") + ExecResultIsEmpty = ClassExecutor.New(CodeExecResultIsEmpty, "exec result is empty") + + MissConnectionID = ClassExpression.New(CodeMissConnectionID, "miss connection id information") +) + +// ErrCode represents a specific error type in a error class. +// Same error code can be used in different error classes. +type ErrCode int + +// Executor error codes. +const ( + CodeCommitNotInTransaction ErrCode = 1 + CodeRollbackNotInTransaction = 2 + CodeExecResultIsEmpty = 3 +) + +// Expression error codes. +const ( + CodeMissConnectionID ErrCode = iota + 1 +) + +// ErrClass represents a class of errors. +type ErrClass int + +// Error classes. +const ( + ClassParser ErrClass = iota + 1 + ClassSchema + ClassOptimizer + ClassOptimizerPlan + ClassExecutor + ClassEvaluator + ClassKV + ClassServer + ClassVariable + ClassExpression + // Add more as needed. +) + +// String implements fmt.Stringer interface. +func (ec ErrClass) String() string { + switch ec { + case ClassParser: + return "parser" + case ClassSchema: + return "schema" + case ClassOptimizer: + return "optimizer" + case ClassExecutor: + return "executor" + case ClassKV: + return "kv" + case ClassServer: + return "server" + case ClassVariable: + return "variable" + case ClassExpression: + return "expression" + } + return strconv.Itoa(int(ec)) +} + +// EqualClass returns true if err is *Error with the same class. +func (ec ErrClass) EqualClass(err error) bool { + e := errors.Cause(err) + if e == nil { + return false + } + if te, ok := e.(*Error); ok { + return te.class == ec + } + return false +} + +// NotEqualClass returns true if err is not *Error with the same class. +func (ec ErrClass) NotEqualClass(err error) bool { + return !ec.EqualClass(err) +} + +// New creates an *Error with an error code and an error message. +// Usually used to create base *Error. +func (ec ErrClass) New(code ErrCode, message string) *Error { + return &Error{ + class: ec, + code: code, + message: message, + } +} + +// Error implements error interface and adds integer Class and Code, so +// errors with different message can be compared. +type Error struct { + class ErrClass + code ErrCode + message string + file string + line int +} + +// Class returns ErrClass +func (e *Error) Class() ErrClass { + return e.class +} + +// Code returns ErrCode +func (e *Error) Code() ErrCode { + return e.code +} + +// Location returns the location where the error is created, +// implements juju/errors locationer interface. +func (e *Error) Location() (file string, line int) { + return e.file, e.line +} + +// Error implements error interface. +func (e *Error) Error() string { + return fmt.Sprintf("[%s:%d]%s", e.class, e.code, e.message) +} + +// Gen generates a new *Error with the same class and code, and a new formatted message. +func (e *Error) Gen(format string, args ...interface{}) *Error { + err := *e + err.message = fmt.Sprintf(format, args...) + _, err.file, err.line, _ = runtime.Caller(1) + return &err +} + +// Equal checks if err is equal to e. +func (e *Error) Equal(err error) bool { + originErr := errors.Cause(err) + if originErr == nil { + return false + } + inErr, ok := originErr.(*Error) + return ok && e.class == inErr.class && e.code == inErr.code +} + +// NotEqual checks if err is not equal to e. +func (e *Error) NotEqual(err error) bool { + return !e.Equal(err) +} + +// ToSQLError convert Error to mysql.SQLError. +func (e *Error) ToSQLError() *mysql.SQLError { + code := e.getMySQLErrorCode() + return mysql.NewErrf(code, e.message) +} + +var defaultMySQLErrorCode uint16 + +func (e *Error) getMySQLErrorCode() uint16 { + codeMap, ok := ErrClassToMySQLCodes[e.class] + if !ok { + log.Warnf("Unknown error class: %v", e.class) + return defaultMySQLErrorCode + } + code, ok := codeMap[e.code] + if !ok { + log.Warnf("Unknown error class: %v code: %v", e.class, e.code) + return defaultMySQLErrorCode + } + return code +} + +var ( + // ErrCode to mysql error code map. + parserMySQLErrCodes = map[ErrCode]uint16{} + executorMySQLErrCodes = map[ErrCode]uint16{} + serverMySQLErrCodes = map[ErrCode]uint16{} + expressionMySQLErrCodes = map[ErrCode]uint16{} + + // ErrClassToMySQLCodes is the map of ErrClass to code-map. + ErrClassToMySQLCodes map[ErrClass](map[ErrCode]uint16) +) + +func init() { + ErrClassToMySQLCodes = make(map[ErrClass](map[ErrCode]uint16)) + ErrClassToMySQLCodes[ClassParser] = parserMySQLErrCodes + ErrClassToMySQLCodes[ClassExecutor] = executorMySQLErrCodes + ErrClassToMySQLCodes[ClassServer] = serverMySQLErrCodes + ErrClassToMySQLCodes[ClassExpression] = expressionMySQLErrCodes + defaultMySQLErrorCode = mysql.ErrUnknown +} + +// ErrorEqual returns a boolean indicating whether err1 is equal to err2. +func ErrorEqual(err1, err2 error) bool { + e1 := errors.Cause(err1) + e2 := errors.Cause(err2) + + if e1 == e2 { + return true + } + + if e1 == nil || e2 == nil { + return e1 == e2 + } + + te1, ok1 := e1.(*Error) + te2, ok2 := e2.(*Error) + if ok1 && ok2 { + return te1.class == te2.class && te1.code == te2.code + } + + return e1.Error() == e2.Error() +} + +// ErrorNotEqual returns a boolean indicating whether err1 isn't equal to err2. +func ErrorNotEqual(err1, err2 error) bool { + return !ErrorEqual(err1, err2) +} diff --git a/vendor/github.com/pingcap/tidb/tidb.go b/vendor/github.com/pingcap/tidb/tidb.go new file mode 100644 index 000000000..faa1a0b5a --- /dev/null +++ b/vendor/github.com/pingcap/tidb/tidb.go @@ -0,0 +1,296 @@ +// Copyright 2013 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package tidb + +import ( + "net/http" + "time" + // For pprof + _ "net/http/pprof" + "net/url" + "os" + "strings" + "sync" + + "github.com/juju/errors" + "github.com/ngaut/log" + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" + "github.com/pingcap/tidb/domain" + "github.com/pingcap/tidb/executor" + "github.com/pingcap/tidb/kv" + "github.com/pingcap/tidb/parser" + "github.com/pingcap/tidb/sessionctx/autocommit" + "github.com/pingcap/tidb/sessionctx/variable" + "github.com/pingcap/tidb/store/hbase" + "github.com/pingcap/tidb/store/localstore" + "github.com/pingcap/tidb/store/localstore/boltdb" + "github.com/pingcap/tidb/store/localstore/engine" + "github.com/pingcap/tidb/store/localstore/goleveldb" + "github.com/pingcap/tidb/util/types" +) + +// Engine prefix name +const ( + EngineGoLevelDBMemory = "memory://" + EngineGoLevelDBPersistent = "goleveldb://" + EngineBoltDB = "boltdb://" + EngineHBase = "hbase://" + defaultMaxRetries = 30 + retrySleepInterval = 500 * time.Millisecond +) + +type domainMap struct { + domains map[string]*domain.Domain + mu sync.Mutex +} + +func (dm *domainMap) Get(store kv.Storage) (d *domain.Domain, err error) { + key := store.UUID() + dm.mu.Lock() + defer dm.mu.Unlock() + d = dm.domains[key] + if d != nil { + return + } + + lease := time.Duration(0) + if !localstore.IsLocalStore(store) { + lease = schemaLease + } + d, err = domain.NewDomain(store, lease) + if err != nil { + return nil, errors.Trace(err) + } + dm.domains[key] = d + return +} + +var ( + domap = &domainMap{ + domains: map[string]*domain.Domain{}, + } + stores = make(map[string]kv.Driver) + // EnablePprof indicates whether to enable HTTP Pprof or not. + EnablePprof = os.Getenv("TIDB_PPROF") != "0" + // PprofAddr is the pprof url. + PprofAddr = "localhost:8888" + // store.UUID()-> IfBootstrapped + storeBootstrapped = make(map[string]bool) + + // schemaLease is the time for re-updating remote schema. + // In online DDL, we must wait 2 * SchemaLease time to guarantee + // all servers get the neweset schema. + // Default schema lease time is 1 second, you can change it with a proper time, + // but you must know that too little may cause badly performance degradation. + // For production, you should set a big schema lease, like 300s+. + schemaLease = 1 * time.Second +) + +// SetSchemaLease changes the default schema lease time for DDL. +// This function is very dangerous, don't use it if you really know what you do. +// SetSchemaLease only affects not local storage after bootstrapped. +func SetSchemaLease(lease time.Duration) { + schemaLease = lease +} + +// What character set should the server translate a statement to after receiving it? +// For this, the server uses the character_set_connection and collation_connection system variables. +// It converts statements sent by the client from character_set_client to character_set_connection +// (except for string literals that have an introducer such as _latin1 or _utf8). +// collation_connection is important for comparisons of literal strings. +// For comparisons of strings with column values, collation_connection does not matter because columns +// have their own collation, which has a higher collation precedence. +// See: https://dev.mysql.com/doc/refman/5.7/en/charset-connection.html +func getCtxCharsetInfo(ctx context.Context) (string, string) { + sessionVars := variable.GetSessionVars(ctx) + charset := sessionVars.Systems["character_set_connection"] + collation := sessionVars.Systems["collation_connection"] + return charset, collation +} + +// Parse parses a query string to raw ast.StmtNode. +func Parse(ctx context.Context, src string) ([]ast.StmtNode, error) { + log.Debug("compiling", src) + charset, collation := getCtxCharsetInfo(ctx) + stmts, err := parser.Parse(src, charset, collation) + if err != nil { + log.Warnf("compiling %s, error: %v", src, err) + return nil, errors.Trace(err) + } + return stmts, nil +} + +// Compile is safe for concurrent use by multiple goroutines. +func Compile(ctx context.Context, rawStmt ast.StmtNode) (ast.Statement, error) { + compiler := &executor.Compiler{} + st, err := compiler.Compile(ctx, rawStmt) + if err != nil { + return nil, errors.Trace(err) + } + return st, nil +} + +func runStmt(ctx context.Context, s ast.Statement, args ...interface{}) (ast.RecordSet, error) { + var err error + var rs ast.RecordSet + // before every execution, we must clear affectedrows. + variable.GetSessionVars(ctx).SetAffectedRows(0) + if s.IsDDL() { + err = ctx.FinishTxn(false) + if err != nil { + return nil, errors.Trace(err) + } + } + rs, err = s.Exec(ctx) + // All the history should be added here. + se := ctx.(*session) + se.history.add(0, s) + // MySQL DDL should be auto-commit + if s.IsDDL() || autocommit.ShouldAutocommit(ctx) { + if err != nil { + ctx.FinishTxn(true) + } else { + err = ctx.FinishTxn(false) + } + } + return rs, errors.Trace(err) +} + +// GetRows gets all the rows from a RecordSet. +func GetRows(rs ast.RecordSet) ([][]types.Datum, error) { + if rs == nil { + return nil, nil + } + var rows [][]types.Datum + defer rs.Close() + // Negative limit means no limit. + for { + row, err := rs.Next() + if err != nil { + return nil, errors.Trace(err) + } + if row == nil { + break + } + rows = append(rows, row.Data) + } + return rows, nil +} + +// RegisterStore registers a kv storage with unique name and its associated Driver. +func RegisterStore(name string, driver kv.Driver) error { + name = strings.ToLower(name) + + if _, ok := stores[name]; ok { + return errors.Errorf("%s is already registered", name) + } + + stores[name] = driver + return nil +} + +// RegisterLocalStore registers a local kv storage with unique name and its associated engine Driver. +func RegisterLocalStore(name string, driver engine.Driver) error { + d := localstore.Driver{Driver: driver} + return RegisterStore(name, d) +} + +// NewStore creates a kv Storage with path. +// +// The path must be a URL format 'engine://path?params' like the one for +// tidb.Open() but with the dbname cut off. +// Examples: +// goleveldb://relative/path +// boltdb:///absolute/path +// hbase://zk1,zk2,zk3/hbasetbl?tso=127.0.0.1:1234 +// +// The engine should be registered before creating storage. +func NewStore(path string) (kv.Storage, error) { + return newStoreWithRetry(path, defaultMaxRetries) +} + +func newStoreWithRetry(path string, maxRetries int) (kv.Storage, error) { + url, err := url.Parse(path) + if err != nil { + return nil, errors.Trace(err) + } + + name := strings.ToLower(url.Scheme) + d, ok := stores[name] + if !ok { + return nil, errors.Errorf("invalid uri format, storage %s is not registered", name) + } + + var s kv.Storage + for i := 1; i <= maxRetries; i++ { + s, err = d.Open(path) + if err == nil || !kv.IsRetryableError(err) { + break + } + sleepTime := time.Duration(uint64(retrySleepInterval) * uint64(i)) + log.Warnf("Waiting store to get ready, sleep %v and try again...", sleepTime) + time.Sleep(sleepTime) + } + return s, errors.Trace(err) +} + +var queryStmtTable = []string{"explain", "select", "show", "execute", "describe", "desc", "admin"} + +func trimSQL(sql string) string { + // Trim space. + sql = strings.TrimSpace(sql) + // Trim leading /*comment*/ + // There may be multiple comments + for strings.HasPrefix(sql, "/*") { + i := strings.Index(sql, "*/") + if i != -1 && i < len(sql)+1 { + sql = sql[i+2:] + sql = strings.TrimSpace(sql) + continue + } + break + } + // Trim leading '('. For `(select 1);` is also a query. + return strings.TrimLeft(sql, "( ") +} + +// IsQuery checks if a sql statement is a query statement. +func IsQuery(sql string) bool { + sqlText := strings.ToLower(trimSQL(sql)) + for _, key := range queryStmtTable { + if strings.HasPrefix(sqlText, key) { + return true + } + } + + return false +} + +func init() { + // Register default memory and goleveldb storage + RegisterLocalStore("memory", goleveldb.MemoryDriver{}) + RegisterLocalStore("goleveldb", goleveldb.Driver{}) + RegisterLocalStore("boltdb", boltdb.Driver{}) + RegisterStore("hbase", hbasekv.Driver{}) + + // start pprof handlers + if EnablePprof { + go http.ListenAndServe(PprofAddr, nil) + } +} diff --git a/vendor/github.com/pingcap/tidb/util/auth.go b/vendor/github.com/pingcap/tidb/util/auth.go new file mode 100644 index 000000000..7b6cf6baf --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/auth.go @@ -0,0 +1,68 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package util + +import ( + "crypto/sha1" + "encoding/hex" + + "github.com/juju/errors" +) + +// CalcPassword is the algorithm convert hashed password to auth string. +// See: https://dev.mysql.com/doc/internals/en/secure-password-authentication.html +// SHA1( password ) XOR SHA1( "20-bytes random data from server" SHA1( SHA1( password ) ) ) +func CalcPassword(scramble, sha1pwd []byte) []byte { + if len(sha1pwd) == 0 { + return nil + } + // scrambleHash = SHA1(scramble + SHA1(sha1pwd)) + // inner Hash + hash := Sha1Hash(sha1pwd) + // outer Hash + crypt := sha1.New() + crypt.Write(scramble) + crypt.Write(hash) + scramble = crypt.Sum(nil) + // token = scrambleHash XOR stage1Hash + for i := range scramble { + scramble[i] ^= sha1pwd[i] + } + return scramble +} + +// Sha1Hash is an util function to calculate sha1 hash. +func Sha1Hash(bs []byte) []byte { + crypt := sha1.New() + crypt.Write(bs) + return crypt.Sum(nil) +} + +// EncodePassword converts plaintext password to hashed hex string. +func EncodePassword(pwd string) string { + if len(pwd) == 0 { + return "" + } + hash := Sha1Hash([]byte(pwd)) + return hex.EncodeToString(hash) +} + +// DecodePassword converts hex string password to byte array. +func DecodePassword(pwd string) ([]byte, error) { + x, err := hex.DecodeString(pwd) + if err != nil { + return nil, errors.Trace(err) + } + return x, nil +} diff --git a/vendor/github.com/pingcap/tidb/util/bytes/bytes.go b/vendor/github.com/pingcap/tidb/util/bytes/bytes.go new file mode 100644 index 000000000..6c3de37a9 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/bytes/bytes.go @@ -0,0 +1,6 @@ +package bytes + +// CloneBytes returns a deep copy of slice b. +func CloneBytes(b []byte) []byte { + return append([]byte(nil), b...) +} diff --git a/vendor/github.com/pingcap/tidb/util/charset/charset.go b/vendor/github.com/pingcap/tidb/util/charset/charset.go new file mode 100644 index 000000000..719465b25 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/charset/charset.go @@ -0,0 +1,369 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package charset + +import ( + "strings" + + "github.com/juju/errors" +) + +// Charset is a charset. +// Now we only support MySQL. +type Charset struct { + Name string + DefaultCollation *Collation + Collations map[string]*Collation + Desc string + Maxlen int +} + +// Collation is a collation. +// Now we only support MySQL. +type Collation struct { + ID int + CharsetName string + Name string + IsDefault bool +} + +var charsets = make(map[string]*Charset) + +// All the supported charsets should be in the following table. +var charsetInfos = []*Charset{ + {"utf8", nil, make(map[string]*Collation), "UTF-8 Unicode", 3}, + {"latin1", nil, make(map[string]*Collation), "cp1252 West European", 1}, + {"utf8mb4", nil, make(map[string]*Collation), "UTF-8 Unicode", 4}, + {"ascii", nil, make(map[string]*Collation), "US ASCII", 1}, +} + +func init() { + for _, c := range charsetInfos { + charsets[c.Name] = c + } + for _, c := range collations { + charset, ok := charsets[c.CharsetName] + if !ok { + continue + } + charset.Collations[c.Name] = c + if c.IsDefault { + charset.DefaultCollation = c + } + } +} + +// Desc is a charset description. +type Desc struct { + Name string + Desc string + DefaultCollation string + Maxlen int +} + +// GetAllCharsets gets all charset descriptions in the local charsets. +func GetAllCharsets() []*Desc { + descs := make([]*Desc, 0, len(charsets)) + // The charsetInfos is an array, so the iterate order will be stable. + for _, ci := range charsetInfos { + c, ok := charsets[ci.Name] + if !ok { + continue + } + desc := &Desc{ + Name: c.Name, + DefaultCollation: c.DefaultCollation.Name, + Desc: c.Desc, + Maxlen: c.Maxlen, + } + descs = append(descs, desc) + } + return descs +} + +// ValidCharsetAndCollation checks the charset and the collation validity +// and retuns a boolean. +func ValidCharsetAndCollation(cs string, co string) bool { + // We will use utf8 as a default charset. + if cs == "" { + cs = "utf8" + } + + c, ok := charsets[cs] + if !ok { + return false + } + + if co == "" { + return true + } + _, ok = c.Collations[co] + if !ok { + return false + } + + return true +} + +// GetDefaultCollation returns the default collation for charset +func GetDefaultCollation(charset string) (string, error) { + c, ok := charsets[charset] + if !ok { + return "", errors.Errorf("Unkown charset %s", charset) + } + return c.DefaultCollation.Name, nil +} + +// GetCharsetInfo returns charset and collation for cs as name. +func GetCharsetInfo(cs string) (string, string, error) { + c, ok := charsets[strings.ToLower(cs)] + if !ok { + return "", "", errors.Errorf("Unknown charset %s", cs) + } + return c.Name, c.DefaultCollation.Name, nil +} + +// GetCollations returns a list for all collations. +func GetCollations() []*Collation { + return collations +} + +const ( + // CharsetBin is used for marking binary charset. + CharsetBin = "binary" + // CollationBin is the default collation for CharsetBin. + CollationBin = "binary" +) + +var collations = []*Collation{ + {1, "big5", "big5_chinese_ci", true}, + {2, "latin2", "latin2_czech_cs", false}, + {3, "dec8", "dec8_swedish_ci", true}, + {4, "cp850", "cp850_general_ci", true}, + {5, "latin1", "latin1_german1_ci", false}, + {6, "hp8", "hp8_english_ci", true}, + {7, "koi8r", "koi8r_general_ci", true}, + {8, "latin1", "latin1_swedish_ci", true}, + {9, "latin2", "latin2_general_ci", true}, + {10, "swe7", "swe7_swedish_ci", true}, + {11, "ascii", "ascii_general_ci", true}, + {12, "ujis", "ujis_japanese_ci", true}, + {13, "sjis", "sjis_japanese_ci", true}, + {14, "cp1251", "cp1251_bulgarian_ci", false}, + {15, "latin1", "latin1_danish_ci", false}, + {16, "hebrew", "hebrew_general_ci", true}, + {18, "tis620", "tis620_thai_ci", true}, + {19, "euckr", "euckr_korean_ci", true}, + {20, "latin7", "latin7_estonian_cs", false}, + {21, "latin2", "latin2_hungarian_ci", false}, + {22, "koi8u", "koi8u_general_ci", true}, + {23, "cp1251", "cp1251_ukrainian_ci", false}, + {24, "gb2312", "gb2312_chinese_ci", true}, + {25, "greek", "greek_general_ci", true}, + {26, "cp1250", "cp1250_general_ci", true}, + {27, "latin2", "latin2_croatian_ci", false}, + {28, "gbk", "gbk_chinese_ci", true}, + {29, "cp1257", "cp1257_lithuanian_ci", false}, + {30, "latin5", "latin5_turkish_ci", true}, + {31, "latin1", "latin1_german2_ci", false}, + {32, "armscii8", "armscii8_general_ci", true}, + {33, "utf8", "utf8_general_ci", true}, + {34, "cp1250", "cp1250_czech_cs", false}, + {35, "ucs2", "ucs2_general_ci", true}, + {36, "cp866", "cp866_general_ci", true}, + {37, "keybcs2", "keybcs2_general_ci", true}, + {38, "macce", "macce_general_ci", true}, + {39, "macroman", "macroman_general_ci", true}, + {40, "cp852", "cp852_general_ci", true}, + {41, "latin7", "latin7_general_ci", true}, + {42, "latin7", "latin7_general_cs", false}, + {43, "macce", "macce_bin", false}, + {44, "cp1250", "cp1250_croatian_ci", false}, + {45, "utf8mb4", "utf8mb4_general_ci", true}, + {46, "utf8mb4", "utf8mb4_bin", false}, + {47, "latin1", "latin1_bin", false}, + {48, "latin1", "latin1_general_ci", false}, + {49, "latin1", "latin1_general_cs", false}, + {50, "cp1251", "cp1251_bin", false}, + {51, "cp1251", "cp1251_general_ci", true}, + {52, "cp1251", "cp1251_general_cs", false}, + {53, "macroman", "macroman_bin", false}, + {54, "utf16", "utf16_general_ci", true}, + {55, "utf16", "utf16_bin", false}, + {56, "utf16le", "utf16le_general_ci", true}, + {57, "cp1256", "cp1256_general_ci", true}, + {58, "cp1257", "cp1257_bin", false}, + {59, "cp1257", "cp1257_general_ci", true}, + {60, "utf32", "utf32_general_ci", true}, + {61, "utf32", "utf32_bin", false}, + {62, "utf16le", "utf16le_bin", false}, + {63, "binary", "binary", true}, + {64, "armscii8", "armscii8_bin", false}, + {65, "ascii", "ascii_bin", false}, + {66, "cp1250", "cp1250_bin", false}, + {67, "cp1256", "cp1256_bin", false}, + {68, "cp866", "cp866_bin", false}, + {69, "dec8", "dec8_bin", false}, + {70, "greek", "greek_bin", false}, + {71, "hebrew", "hebrew_bin", false}, + {72, "hp8", "hp8_bin", false}, + {73, "keybcs2", "keybcs2_bin", false}, + {74, "koi8r", "koi8r_bin", false}, + {75, "koi8u", "koi8u_bin", false}, + {77, "latin2", "latin2_bin", false}, + {78, "latin5", "latin5_bin", false}, + {79, "latin7", "latin7_bin", false}, + {80, "cp850", "cp850_bin", false}, + {81, "cp852", "cp852_bin", false}, + {82, "swe7", "swe7_bin", false}, + {83, "utf8", "utf8_bin", false}, + {84, "big5", "big5_bin", false}, + {85, "euckr", "euckr_bin", false}, + {86, "gb2312", "gb2312_bin", false}, + {87, "gbk", "gbk_bin", false}, + {88, "sjis", "sjis_bin", false}, + {89, "tis620", "tis620_bin", false}, + {90, "ucs2", "ucs2_bin", false}, + {91, "ujis", "ujis_bin", false}, + {92, "geostd8", "geostd8_general_ci", true}, + {93, "geostd8", "geostd8_bin", false}, + {94, "latin1", "latin1_spanish_ci", false}, + {95, "cp932", "cp932_japanese_ci", true}, + {96, "cp932", "cp932_bin", false}, + {97, "eucjpms", "eucjpms_japanese_ci", true}, + {98, "eucjpms", "eucjpms_bin", false}, + {99, "cp1250", "cp1250_polish_ci", false}, + {101, "utf16", "utf16_unicode_ci", false}, + {102, "utf16", "utf16_icelandic_ci", false}, + {103, "utf16", "utf16_latvian_ci", false}, + {104, "utf16", "utf16_romanian_ci", false}, + {105, "utf16", "utf16_slovenian_ci", false}, + {106, "utf16", "utf16_polish_ci", false}, + {107, "utf16", "utf16_estonian_ci", false}, + {108, "utf16", "utf16_spanish_ci", false}, + {109, "utf16", "utf16_swedish_ci", false}, + {110, "utf16", "utf16_turkish_ci", false}, + {111, "utf16", "utf16_czech_ci", false}, + {112, "utf16", "utf16_danish_ci", false}, + {113, "utf16", "utf16_lithuanian_ci", false}, + {114, "utf16", "utf16_slovak_ci", false}, + {115, "utf16", "utf16_spanish2_ci", false}, + {116, "utf16", "utf16_roman_ci", false}, + {117, "utf16", "utf16_persian_ci", false}, + {118, "utf16", "utf16_esperanto_ci", false}, + {119, "utf16", "utf16_hungarian_ci", false}, + {120, "utf16", "utf16_sinhala_ci", false}, + {121, "utf16", "utf16_german2_ci", false}, + {122, "utf16", "utf16_croatian_ci", false}, + {123, "utf16", "utf16_unicode_520_ci", false}, + {124, "utf16", "utf16_vietnamese_ci", false}, + {128, "ucs2", "ucs2_unicode_ci", false}, + {129, "ucs2", "ucs2_icelandic_ci", false}, + {130, "ucs2", "ucs2_latvian_ci", false}, + {131, "ucs2", "ucs2_romanian_ci", false}, + {132, "ucs2", "ucs2_slovenian_ci", false}, + {133, "ucs2", "ucs2_polish_ci", false}, + {134, "ucs2", "ucs2_estonian_ci", false}, + {135, "ucs2", "ucs2_spanish_ci", false}, + {136, "ucs2", "ucs2_swedish_ci", false}, + {137, "ucs2", "ucs2_turkish_ci", false}, + {138, "ucs2", "ucs2_czech_ci", false}, + {139, "ucs2", "ucs2_danish_ci", false}, + {140, "ucs2", "ucs2_lithuanian_ci", false}, + {141, "ucs2", "ucs2_slovak_ci", false}, + {142, "ucs2", "ucs2_spanish2_ci", false}, + {143, "ucs2", "ucs2_roman_ci", false}, + {144, "ucs2", "ucs2_persian_ci", false}, + {145, "ucs2", "ucs2_esperanto_ci", false}, + {146, "ucs2", "ucs2_hungarian_ci", false}, + {147, "ucs2", "ucs2_sinhala_ci", false}, + {148, "ucs2", "ucs2_german2_ci", false}, + {149, "ucs2", "ucs2_croatian_ci", false}, + {150, "ucs2", "ucs2_unicode_520_ci", false}, + {151, "ucs2", "ucs2_vietnamese_ci", false}, + {159, "ucs2", "ucs2_general_mysql500_ci", false}, + {160, "utf32", "utf32_unicode_ci", false}, + {161, "utf32", "utf32_icelandic_ci", false}, + {162, "utf32", "utf32_latvian_ci", false}, + {163, "utf32", "utf32_romanian_ci", false}, + {164, "utf32", "utf32_slovenian_ci", false}, + {165, "utf32", "utf32_polish_ci", false}, + {166, "utf32", "utf32_estonian_ci", false}, + {167, "utf32", "utf32_spanish_ci", false}, + {168, "utf32", "utf32_swedish_ci", false}, + {169, "utf32", "utf32_turkish_ci", false}, + {170, "utf32", "utf32_czech_ci", false}, + {171, "utf32", "utf32_danish_ci", false}, + {172, "utf32", "utf32_lithuanian_ci", false}, + {173, "utf32", "utf32_slovak_ci", false}, + {174, "utf32", "utf32_spanish2_ci", false}, + {175, "utf32", "utf32_roman_ci", false}, + {176, "utf32", "utf32_persian_ci", false}, + {177, "utf32", "utf32_esperanto_ci", false}, + {178, "utf32", "utf32_hungarian_ci", false}, + {179, "utf32", "utf32_sinhala_ci", false}, + {180, "utf32", "utf32_german2_ci", false}, + {181, "utf32", "utf32_croatian_ci", false}, + {182, "utf32", "utf32_unicode_520_ci", false}, + {183, "utf32", "utf32_vietnamese_ci", false}, + {192, "utf8", "utf8_unicode_ci", false}, + {193, "utf8", "utf8_icelandic_ci", false}, + {194, "utf8", "utf8_latvian_ci", false}, + {195, "utf8", "utf8_romanian_ci", false}, + {196, "utf8", "utf8_slovenian_ci", false}, + {197, "utf8", "utf8_polish_ci", false}, + {198, "utf8", "utf8_estonian_ci", false}, + {199, "utf8", "utf8_spanish_ci", false}, + {200, "utf8", "utf8_swedish_ci", false}, + {201, "utf8", "utf8_turkish_ci", false}, + {202, "utf8", "utf8_czech_ci", false}, + {203, "utf8", "utf8_danish_ci", false}, + {204, "utf8", "utf8_lithuanian_ci", false}, + {205, "utf8", "utf8_slovak_ci", false}, + {206, "utf8", "utf8_spanish2_ci", false}, + {207, "utf8", "utf8_roman_ci", false}, + {208, "utf8", "utf8_persian_ci", false}, + {209, "utf8", "utf8_esperanto_ci", false}, + {210, "utf8", "utf8_hungarian_ci", false}, + {211, "utf8", "utf8_sinhala_ci", false}, + {212, "utf8", "utf8_german2_ci", false}, + {213, "utf8", "utf8_croatian_ci", false}, + {214, "utf8", "utf8_unicode_520_ci", false}, + {215, "utf8", "utf8_vietnamese_ci", false}, + {223, "utf8", "utf8_general_mysql500_ci", false}, + {224, "utf8mb4", "utf8mb4_unicode_ci", false}, + {225, "utf8mb4", "utf8mb4_icelandic_ci", false}, + {226, "utf8mb4", "utf8mb4_latvian_ci", false}, + {227, "utf8mb4", "utf8mb4_romanian_ci", false}, + {228, "utf8mb4", "utf8mb4_slovenian_ci", false}, + {229, "utf8mb4", "utf8mb4_polish_ci", false}, + {230, "utf8mb4", "utf8mb4_estonian_ci", false}, + {231, "utf8mb4", "utf8mb4_spanish_ci", false}, + {232, "utf8mb4", "utf8mb4_swedish_ci", false}, + {233, "utf8mb4", "utf8mb4_turkish_ci", false}, + {234, "utf8mb4", "utf8mb4_czech_ci", false}, + {235, "utf8mb4", "utf8mb4_danish_ci", false}, + {236, "utf8mb4", "utf8mb4_lithuanian_ci", false}, + {237, "utf8mb4", "utf8mb4_slovak_ci", false}, + {238, "utf8mb4", "utf8mb4_spanish2_ci", false}, + {239, "utf8mb4", "utf8mb4_roman_ci", false}, + {240, "utf8mb4", "utf8mb4_persian_ci", false}, + {241, "utf8mb4", "utf8mb4_esperanto_ci", false}, + {242, "utf8mb4", "utf8mb4_hungarian_ci", false}, + {243, "utf8mb4", "utf8mb4_sinhala_ci", false}, + {244, "utf8mb4", "utf8mb4_german2_ci", false}, + {245, "utf8mb4", "utf8mb4_croatian_ci", false}, + {246, "utf8mb4", "utf8mb4_unicode_520_ci", false}, + {247, "utf8mb4", "utf8mb4_vietnamese_ci", false}, +} diff --git a/vendor/github.com/pingcap/tidb/util/charset/encoding_table.go b/vendor/github.com/pingcap/tidb/util/charset/encoding_table.go new file mode 100644 index 000000000..93c24d20c --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/charset/encoding_table.go @@ -0,0 +1,258 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package charset + +import ( + "strings" + + "golang.org/x/text/encoding" + "golang.org/x/text/encoding/charmap" + "golang.org/x/text/encoding/japanese" + "golang.org/x/text/encoding/korean" + "golang.org/x/text/encoding/simplifiedchinese" + "golang.org/x/text/encoding/traditionalchinese" + "golang.org/x/text/encoding/unicode" +) + +// Lookup returns the encoding with the specified label, and its canonical +// name. It returns nil and the empty string if label is not one of the +// standard encodings for HTML. Matching is case-insensitive and ignores +// leading and trailing whitespace. +func Lookup(label string) (e encoding.Encoding, name string) { + label = strings.ToLower(strings.Trim(label, "\t\n\r\f ")) + enc := encodings[label] + return enc.e, enc.name +} + +var encodings = map[string]struct { + e encoding.Encoding + name string +}{ + "unicode-1-1-utf-8": {encoding.Nop, "utf-8"}, + "utf-8": {encoding.Nop, "utf-8"}, + "utf8": {encoding.Nop, "utf-8"}, + "866": {charmap.CodePage866, "ibm866"}, + "cp866": {charmap.CodePage866, "ibm866"}, + "csibm866": {charmap.CodePage866, "ibm866"}, + "ibm866": {charmap.CodePage866, "ibm866"}, + "csisolatin2": {charmap.ISO8859_2, "iso-8859-2"}, + "iso-8859-2": {charmap.ISO8859_2, "iso-8859-2"}, + "iso-ir-101": {charmap.ISO8859_2, "iso-8859-2"}, + "iso8859-2": {charmap.ISO8859_2, "iso-8859-2"}, + "iso88592": {charmap.ISO8859_2, "iso-8859-2"}, + "iso_8859-2": {charmap.ISO8859_2, "iso-8859-2"}, + "iso_8859-2:1987": {charmap.ISO8859_2, "iso-8859-2"}, + "l2": {charmap.ISO8859_2, "iso-8859-2"}, + "latin2": {charmap.ISO8859_2, "iso-8859-2"}, + "csisolatin3": {charmap.ISO8859_3, "iso-8859-3"}, + "iso-8859-3": {charmap.ISO8859_3, "iso-8859-3"}, + "iso-ir-109": {charmap.ISO8859_3, "iso-8859-3"}, + "iso8859-3": {charmap.ISO8859_3, "iso-8859-3"}, + "iso88593": {charmap.ISO8859_3, "iso-8859-3"}, + "iso_8859-3": {charmap.ISO8859_3, "iso-8859-3"}, + "iso_8859-3:1988": {charmap.ISO8859_3, "iso-8859-3"}, + "l3": {charmap.ISO8859_3, "iso-8859-3"}, + "latin3": {charmap.ISO8859_3, "iso-8859-3"}, + "csisolatin4": {charmap.ISO8859_4, "iso-8859-4"}, + "iso-8859-4": {charmap.ISO8859_4, "iso-8859-4"}, + "iso-ir-110": {charmap.ISO8859_4, "iso-8859-4"}, + "iso8859-4": {charmap.ISO8859_4, "iso-8859-4"}, + "iso88594": {charmap.ISO8859_4, "iso-8859-4"}, + "iso_8859-4": {charmap.ISO8859_4, "iso-8859-4"}, + "iso_8859-4:1988": {charmap.ISO8859_4, "iso-8859-4"}, + "l4": {charmap.ISO8859_4, "iso-8859-4"}, + "latin4": {charmap.ISO8859_4, "iso-8859-4"}, + "csisolatincyrillic": {charmap.ISO8859_5, "iso-8859-5"}, + "cyrillic": {charmap.ISO8859_5, "iso-8859-5"}, + "iso-8859-5": {charmap.ISO8859_5, "iso-8859-5"}, + "iso-ir-144": {charmap.ISO8859_5, "iso-8859-5"}, + "iso8859-5": {charmap.ISO8859_5, "iso-8859-5"}, + "iso88595": {charmap.ISO8859_5, "iso-8859-5"}, + "iso_8859-5": {charmap.ISO8859_5, "iso-8859-5"}, + "iso_8859-5:1988": {charmap.ISO8859_5, "iso-8859-5"}, + "arabic": {charmap.ISO8859_6, "iso-8859-6"}, + "asmo-708": {charmap.ISO8859_6, "iso-8859-6"}, + "csiso88596e": {charmap.ISO8859_6, "iso-8859-6"}, + "csiso88596i": {charmap.ISO8859_6, "iso-8859-6"}, + "csisolatinarabic": {charmap.ISO8859_6, "iso-8859-6"}, + "ecma-114": {charmap.ISO8859_6, "iso-8859-6"}, + "iso-8859-6": {charmap.ISO8859_6, "iso-8859-6"}, + "iso-8859-6-e": {charmap.ISO8859_6, "iso-8859-6"}, + "iso-8859-6-i": {charmap.ISO8859_6, "iso-8859-6"}, + "iso-ir-127": {charmap.ISO8859_6, "iso-8859-6"}, + "iso8859-6": {charmap.ISO8859_6, "iso-8859-6"}, + "iso88596": {charmap.ISO8859_6, "iso-8859-6"}, + "iso_8859-6": {charmap.ISO8859_6, "iso-8859-6"}, + "iso_8859-6:1987": {charmap.ISO8859_6, "iso-8859-6"}, + "csisolatingreek": {charmap.ISO8859_7, "iso-8859-7"}, + "ecma-118": {charmap.ISO8859_7, "iso-8859-7"}, + "elot_928": {charmap.ISO8859_7, "iso-8859-7"}, + "greek": {charmap.ISO8859_7, "iso-8859-7"}, + "greek8": {charmap.ISO8859_7, "iso-8859-7"}, + "iso-8859-7": {charmap.ISO8859_7, "iso-8859-7"}, + "iso-ir-126": {charmap.ISO8859_7, "iso-8859-7"}, + "iso8859-7": {charmap.ISO8859_7, "iso-8859-7"}, + "iso88597": {charmap.ISO8859_7, "iso-8859-7"}, + "iso_8859-7": {charmap.ISO8859_7, "iso-8859-7"}, + "iso_8859-7:1987": {charmap.ISO8859_7, "iso-8859-7"}, + "sun_eu_greek": {charmap.ISO8859_7, "iso-8859-7"}, + "csiso88598e": {charmap.ISO8859_8, "iso-8859-8"}, + "csisolatinhebrew": {charmap.ISO8859_8, "iso-8859-8"}, + "hebrew": {charmap.ISO8859_8, "iso-8859-8"}, + "iso-8859-8": {charmap.ISO8859_8, "iso-8859-8"}, + "iso-8859-8-e": {charmap.ISO8859_8, "iso-8859-8"}, + "iso-ir-138": {charmap.ISO8859_8, "iso-8859-8"}, + "iso8859-8": {charmap.ISO8859_8, "iso-8859-8"}, + "iso88598": {charmap.ISO8859_8, "iso-8859-8"}, + "iso_8859-8": {charmap.ISO8859_8, "iso-8859-8"}, + "iso_8859-8:1988": {charmap.ISO8859_8, "iso-8859-8"}, + "visual": {charmap.ISO8859_8, "iso-8859-8"}, + "csiso88598i": {charmap.ISO8859_8, "iso-8859-8-i"}, + "iso-8859-8-i": {charmap.ISO8859_8, "iso-8859-8-i"}, + "logical": {charmap.ISO8859_8, "iso-8859-8-i"}, + "csisolatin6": {charmap.ISO8859_10, "iso-8859-10"}, + "iso-8859-10": {charmap.ISO8859_10, "iso-8859-10"}, + "iso-ir-157": {charmap.ISO8859_10, "iso-8859-10"}, + "iso8859-10": {charmap.ISO8859_10, "iso-8859-10"}, + "iso885910": {charmap.ISO8859_10, "iso-8859-10"}, + "l6": {charmap.ISO8859_10, "iso-8859-10"}, + "latin6": {charmap.ISO8859_10, "iso-8859-10"}, + "iso-8859-13": {charmap.ISO8859_13, "iso-8859-13"}, + "iso8859-13": {charmap.ISO8859_13, "iso-8859-13"}, + "iso885913": {charmap.ISO8859_13, "iso-8859-13"}, + "iso-8859-14": {charmap.ISO8859_14, "iso-8859-14"}, + "iso8859-14": {charmap.ISO8859_14, "iso-8859-14"}, + "iso885914": {charmap.ISO8859_14, "iso-8859-14"}, + "csisolatin9": {charmap.ISO8859_15, "iso-8859-15"}, + "iso-8859-15": {charmap.ISO8859_15, "iso-8859-15"}, + "iso8859-15": {charmap.ISO8859_15, "iso-8859-15"}, + "iso885915": {charmap.ISO8859_15, "iso-8859-15"}, + "iso_8859-15": {charmap.ISO8859_15, "iso-8859-15"}, + "l9": {charmap.ISO8859_15, "iso-8859-15"}, + "iso-8859-16": {charmap.ISO8859_16, "iso-8859-16"}, + "cskoi8r": {charmap.KOI8R, "koi8-r"}, + "koi": {charmap.KOI8R, "koi8-r"}, + "koi8": {charmap.KOI8R, "koi8-r"}, + "koi8-r": {charmap.KOI8R, "koi8-r"}, + "koi8_r": {charmap.KOI8R, "koi8-r"}, + "koi8-u": {charmap.KOI8U, "koi8-u"}, + "csmacintosh": {charmap.Macintosh, "macintosh"}, + "mac": {charmap.Macintosh, "macintosh"}, + "macintosh": {charmap.Macintosh, "macintosh"}, + "x-mac-roman": {charmap.Macintosh, "macintosh"}, + "dos-874": {charmap.Windows874, "windows-874"}, + "iso-8859-11": {charmap.Windows874, "windows-874"}, + "iso8859-11": {charmap.Windows874, "windows-874"}, + "iso885911": {charmap.Windows874, "windows-874"}, + "tis-620": {charmap.Windows874, "windows-874"}, + "windows-874": {charmap.Windows874, "windows-874"}, + "cp1250": {charmap.Windows1250, "windows-1250"}, + "windows-1250": {charmap.Windows1250, "windows-1250"}, + "x-cp1250": {charmap.Windows1250, "windows-1250"}, + "cp1251": {charmap.Windows1251, "windows-1251"}, + "windows-1251": {charmap.Windows1251, "windows-1251"}, + "x-cp1251": {charmap.Windows1251, "windows-1251"}, + "ansi_x3.4-1968": {charmap.Windows1252, "windows-1252"}, + "ascii": {charmap.Windows1252, "windows-1252"}, + "cp1252": {charmap.Windows1252, "windows-1252"}, + "cp819": {charmap.Windows1252, "windows-1252"}, + "csisolatin1": {charmap.Windows1252, "windows-1252"}, + "ibm819": {charmap.Windows1252, "windows-1252"}, + "iso-8859-1": {charmap.Windows1252, "windows-1252"}, + "iso-ir-100": {charmap.Windows1252, "windows-1252"}, + "iso8859-1": {charmap.Windows1252, "windows-1252"}, + "iso88591": {charmap.Windows1252, "windows-1252"}, + "iso_8859-1": {charmap.Windows1252, "windows-1252"}, + "iso_8859-1:1987": {charmap.Windows1252, "windows-1252"}, + "l1": {charmap.Windows1252, "windows-1252"}, + "latin1": {charmap.Windows1252, "windows-1252"}, + "us-ascii": {charmap.Windows1252, "windows-1252"}, + "windows-1252": {charmap.Windows1252, "windows-1252"}, + "x-cp1252": {charmap.Windows1252, "windows-1252"}, + "cp1253": {charmap.Windows1253, "windows-1253"}, + "windows-1253": {charmap.Windows1253, "windows-1253"}, + "x-cp1253": {charmap.Windows1253, "windows-1253"}, + "cp1254": {charmap.Windows1254, "windows-1254"}, + "csisolatin5": {charmap.Windows1254, "windows-1254"}, + "iso-8859-9": {charmap.Windows1254, "windows-1254"}, + "iso-ir-148": {charmap.Windows1254, "windows-1254"}, + "iso8859-9": {charmap.Windows1254, "windows-1254"}, + "iso88599": {charmap.Windows1254, "windows-1254"}, + "iso_8859-9": {charmap.Windows1254, "windows-1254"}, + "iso_8859-9:1989": {charmap.Windows1254, "windows-1254"}, + "l5": {charmap.Windows1254, "windows-1254"}, + "latin5": {charmap.Windows1254, "windows-1254"}, + "windows-1254": {charmap.Windows1254, "windows-1254"}, + "x-cp1254": {charmap.Windows1254, "windows-1254"}, + "cp1255": {charmap.Windows1255, "windows-1255"}, + "windows-1255": {charmap.Windows1255, "windows-1255"}, + "x-cp1255": {charmap.Windows1255, "windows-1255"}, + "cp1256": {charmap.Windows1256, "windows-1256"}, + "windows-1256": {charmap.Windows1256, "windows-1256"}, + "x-cp1256": {charmap.Windows1256, "windows-1256"}, + "cp1257": {charmap.Windows1257, "windows-1257"}, + "windows-1257": {charmap.Windows1257, "windows-1257"}, + "x-cp1257": {charmap.Windows1257, "windows-1257"}, + "cp1258": {charmap.Windows1258, "windows-1258"}, + "windows-1258": {charmap.Windows1258, "windows-1258"}, + "x-cp1258": {charmap.Windows1258, "windows-1258"}, + "x-mac-cyrillic": {charmap.MacintoshCyrillic, "x-mac-cyrillic"}, + "x-mac-ukrainian": {charmap.MacintoshCyrillic, "x-mac-cyrillic"}, + "chinese": {simplifiedchinese.GBK, "gbk"}, + "csgb2312": {simplifiedchinese.GBK, "gbk"}, + "csiso58gb231280": {simplifiedchinese.GBK, "gbk"}, + "gb2312": {simplifiedchinese.GBK, "gbk"}, + "gb_2312": {simplifiedchinese.GBK, "gbk"}, + "gb_2312-80": {simplifiedchinese.GBK, "gbk"}, + "gbk": {simplifiedchinese.GBK, "gbk"}, + "iso-ir-58": {simplifiedchinese.GBK, "gbk"}, + "x-gbk": {simplifiedchinese.GBK, "gbk"}, + "gb18030": {simplifiedchinese.GB18030, "gb18030"}, + "hz-gb-2312": {simplifiedchinese.HZGB2312, "hz-gb-2312"}, + "big5": {traditionalchinese.Big5, "big5"}, + "big5-hkscs": {traditionalchinese.Big5, "big5"}, + "cn-big5": {traditionalchinese.Big5, "big5"}, + "csbig5": {traditionalchinese.Big5, "big5"}, + "x-x-big5": {traditionalchinese.Big5, "big5"}, + "cseucpkdfmtjapanese": {japanese.EUCJP, "euc-jp"}, + "euc-jp": {japanese.EUCJP, "euc-jp"}, + "x-euc-jp": {japanese.EUCJP, "euc-jp"}, + "csiso2022jp": {japanese.ISO2022JP, "iso-2022-jp"}, + "iso-2022-jp": {japanese.ISO2022JP, "iso-2022-jp"}, + "csshiftjis": {japanese.ShiftJIS, "shift_jis"}, + "ms_kanji": {japanese.ShiftJIS, "shift_jis"}, + "shift-jis": {japanese.ShiftJIS, "shift_jis"}, + "shift_jis": {japanese.ShiftJIS, "shift_jis"}, + "sjis": {japanese.ShiftJIS, "shift_jis"}, + "windows-31j": {japanese.ShiftJIS, "shift_jis"}, + "x-sjis": {japanese.ShiftJIS, "shift_jis"}, + "cseuckr": {korean.EUCKR, "euc-kr"}, + "csksc56011987": {korean.EUCKR, "euc-kr"}, + "euc-kr": {korean.EUCKR, "euc-kr"}, + "iso-ir-149": {korean.EUCKR, "euc-kr"}, + "korean": {korean.EUCKR, "euc-kr"}, + "ks_c_5601-1987": {korean.EUCKR, "euc-kr"}, + "ks_c_5601-1989": {korean.EUCKR, "euc-kr"}, + "ksc5601": {korean.EUCKR, "euc-kr"}, + "ksc_5601": {korean.EUCKR, "euc-kr"}, + "windows-949": {korean.EUCKR, "euc-kr"}, + "csiso2022kr": {encoding.Replacement, "replacement"}, + "iso-2022-kr": {encoding.Replacement, "replacement"}, + "iso-2022-cn": {encoding.Replacement, "replacement"}, + "iso-2022-cn-ext": {encoding.Replacement, "replacement"}, + "utf-16be": {unicode.UTF16(unicode.BigEndian, unicode.IgnoreBOM), "utf-16be"}, + "utf-16": {unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM), "utf-16le"}, + "utf-16le": {unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM), "utf-16le"}, + "x-user-defined": {charmap.XUserDefined, "x-user-defined"}, +} diff --git a/vendor/github.com/pingcap/tidb/util/codec/bytes.go b/vendor/github.com/pingcap/tidb/util/codec/bytes.go new file mode 100644 index 000000000..068614e8e --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/codec/bytes.go @@ -0,0 +1,197 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package codec + +import ( + "bytes" + "encoding/binary" + "runtime" + "unsafe" + + "github.com/juju/errors" +) + +const ( + encGroupSize = 8 + encMarker = byte(0xFF) + encPad = byte(0x0) +) + +var ( + pads = make([]byte, encGroupSize) + encPads = []byte{encPad} +) + +// EncodeBytes guarantees the encoded value is in ascending order for comparison, +// encoding with the following rule: +// [group1][marker1]...[groupN][markerN] +// group is 8 bytes slice which is padding with 0. +// marker is `0xFF - padding 0 count` +// For example: +// [] -> [0, 0, 0, 0, 0, 0, 0, 0, 247] +// [1, 2, 3] -> [1, 2, 3, 0, 0, 0, 0, 0, 250] +// [1, 2, 3, 0] -> [1, 2, 3, 0, 0, 0, 0, 0, 251] +// [1, 2, 3, 4, 5, 6, 7, 8] -> [1, 2, 3, 4, 5, 6, 7, 8, 255, 0, 0, 0, 0, 0, 0, 0, 0, 247] +// Refer: https://github.com/facebook/mysql-5.6/wiki/MyRocks-record-format#memcomparable-format +func EncodeBytes(b []byte, data []byte) []byte { + // Allocate more space to avoid unnecessary slice growing. + // Assume that the byte slice size is about `(len(data) / encGroupSize + 1) * (encGroupSize + 1)` bytes, + // that is `(len(data) / 8 + 1) * 9` in our implement. + dLen := len(data) + reallocSize := (dLen/encGroupSize + 1) * (encGroupSize + 1) + result := reallocBytes(b, reallocSize) + for idx := 0; idx <= dLen; idx += encGroupSize { + remain := dLen - idx + padCount := 0 + if remain >= encGroupSize { + result = append(result, data[idx:idx+encGroupSize]...) + } else { + padCount = encGroupSize - remain + result = append(result, data[idx:]...) + result = append(result, pads[:padCount]...) + } + + marker := encMarker - byte(padCount) + result = append(result, marker) + } + + return result +} + +func decodeBytes(b []byte, reverse bool) ([]byte, []byte, error) { + data := make([]byte, 0, len(b)) + for { + if len(b) < encGroupSize+1 { + return nil, nil, errors.New("insufficient bytes to decode value") + } + + groupBytes := b[:encGroupSize+1] + if reverse { + reverseBytes(groupBytes) + } + + group := groupBytes[:encGroupSize] + marker := groupBytes[encGroupSize] + + // Check validity of marker. + padCount := encMarker - marker + realGroupSize := encGroupSize - padCount + if padCount > encGroupSize { + return nil, nil, errors.Errorf("invalid marker byte, group bytes %q", groupBytes) + } + + data = append(data, group[:realGroupSize]...) + b = b[encGroupSize+1:] + + if marker != encMarker { + // Check validity of padding bytes. + if bytes.Count(group[realGroupSize:], encPads) != int(padCount) { + return nil, nil, errors.Errorf("invalid padding byte, group bytes %q", groupBytes) + } + + break + } + } + + return b, data, nil +} + +// DecodeBytes decodes bytes which is encoded by EncodeBytes before, +// returns the leftover bytes and decoded value if no error. +func DecodeBytes(b []byte) ([]byte, []byte, error) { + return decodeBytes(b, false) +} + +// EncodeBytesDesc first encodes bytes using EncodeBytes, then bitwise reverses +// encoded value to guarantee the encoded value is in descending order for comparison. +func EncodeBytesDesc(b []byte, data []byte) []byte { + n := len(b) + b = EncodeBytes(b, data) + reverseBytes(b[n:]) + return b +} + +// DecodeBytesDesc decodes bytes which is encoded by EncodeBytesDesc before, +// returns the leftover bytes and decoded value if no error. +func DecodeBytesDesc(b []byte) ([]byte, []byte, error) { + return decodeBytes(b, true) +} + +// EncodeCompactBytes joins bytes with its length into a byte slice. It is more +// efficient in both space and time compare to EncodeBytes. Note that the encoded +// result is not memcomparable. +func EncodeCompactBytes(b []byte, data []byte) []byte { + b = reallocBytes(b, binary.MaxVarintLen64+len(data)) + b = EncodeVarint(b, int64(len(data))) + return append(b, data...) +} + +// DecodeCompactBytes decodes bytes which is encoded by EncodeCompactBytes before. +func DecodeCompactBytes(b []byte) ([]byte, []byte, error) { + b, n, err := DecodeVarint(b) + if err != nil { + return nil, nil, errors.Trace(err) + } + if int64(len(b)) < n { + return nil, nil, errors.Errorf("insufficient bytes to decode value, expected length: %v", n) + } + return b[n:], b[:n], nil +} + +// See https://golang.org/src/crypto/cipher/xor.go +const wordSize = int(unsafe.Sizeof(uintptr(0))) +const supportsUnaligned = runtime.GOARCH == "386" || runtime.GOARCH == "amd64" + +func fastReverseBytes(b []byte) { + n := len(b) + w := n / wordSize + if w > 0 { + bw := *(*[]uintptr)(unsafe.Pointer(&b)) + for i := 0; i < w; i++ { + bw[i] = ^bw[i] + } + } + + for i := w * wordSize; i < n; i++ { + b[i] = ^b[i] + } +} + +func safeReverseBytes(b []byte) { + for i := range b { + b[i] = ^b[i] + } +} + +func reverseBytes(b []byte) { + if supportsUnaligned { + fastReverseBytes(b) + return + } + + safeReverseBytes(b) +} + +// like realloc. +func reallocBytes(b []byte, n int) []byte { + newSize := len(b) + n + if cap(b) < newSize { + bs := make([]byte, len(b), newSize) + copy(bs, b) + return bs + } + + // slice b has capability to store n bytes + return b +} diff --git a/vendor/github.com/pingcap/tidb/util/codec/codec.go b/vendor/github.com/pingcap/tidb/util/codec/codec.go new file mode 100644 index 000000000..bf100fc18 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/codec/codec.go @@ -0,0 +1,165 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package codec + +import ( + "time" + + "github.com/juju/errors" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/util/types" +) + +const ( + nilFlag byte = iota + bytesFlag + compactBytesFlag + intFlag + uintFlag + floatFlag + decimalFlag + durationFlag +) + +func encode(b []byte, vals []types.Datum, comparable bool) ([]byte, error) { + for _, val := range vals { + switch val.Kind() { + case types.KindInt64: + b = append(b, intFlag) + b = EncodeInt(b, val.GetInt64()) + case types.KindUint64: + b = append(b, uintFlag) + b = EncodeUint(b, val.GetUint64()) + case types.KindFloat32, types.KindFloat64: + b = append(b, floatFlag) + b = EncodeFloat(b, val.GetFloat64()) + case types.KindString, types.KindBytes: + b = encodeBytes(b, val.GetBytes(), comparable) + case types.KindMysqlTime: + b = encodeBytes(b, []byte(val.GetMysqlTime().String()), comparable) + case types.KindMysqlDuration: + // duration may have negative value, so we cannot use String to encode directly. + b = append(b, durationFlag) + b = EncodeInt(b, int64(val.GetMysqlDuration().Duration)) + case types.KindMysqlDecimal: + b = append(b, decimalFlag) + b = EncodeDecimal(b, val.GetMysqlDecimal()) + case types.KindMysqlHex: + b = append(b, intFlag) + b = EncodeInt(b, int64(val.GetMysqlHex().ToNumber())) + case types.KindMysqlBit: + b = append(b, uintFlag) + b = EncodeUint(b, uint64(val.GetMysqlBit().ToNumber())) + case types.KindMysqlEnum: + b = append(b, uintFlag) + b = EncodeUint(b, uint64(val.GetMysqlEnum().ToNumber())) + case types.KindMysqlSet: + b = append(b, uintFlag) + b = EncodeUint(b, uint64(val.GetMysqlSet().ToNumber())) + case types.KindNull: + b = append(b, nilFlag) + default: + return nil, errors.Errorf("unsupport encode type %d", val.Kind()) + } + } + + return b, nil +} + +func encodeBytes(b []byte, v []byte, comparable bool) []byte { + if comparable { + b = append(b, bytesFlag) + b = EncodeBytes(b, v) + } else { + b = append(b, compactBytesFlag) + b = EncodeCompactBytes(b, v) + } + return b +} + +// EncodeKey appends the encoded values to byte slice b, returns the appended +// slice. It guarantees the encoded value is in ascending order for comparison. +func EncodeKey(b []byte, v ...types.Datum) ([]byte, error) { + return encode(b, v, true) +} + +// EncodeValue appends the encoded values to byte slice b, returning the appended +// slice. It does not guarantee the order for comparison. +func EncodeValue(b []byte, v ...types.Datum) ([]byte, error) { + return encode(b, v, false) +} + +// Decode decodes values from a byte slice generated with EncodeKey or EncodeValue +// before. +func Decode(b []byte) ([]types.Datum, error) { + if len(b) < 1 { + return nil, errors.New("invalid encoded key") + } + + var ( + flag byte + err error + values = make([]types.Datum, 0, 1) + ) + + for len(b) > 0 { + flag = b[0] + b = b[1:] + var d types.Datum + switch flag { + case intFlag: + var v int64 + b, v, err = DecodeInt(b) + d.SetInt64(v) + case uintFlag: + var v uint64 + b, v, err = DecodeUint(b) + d.SetUint64(v) + case floatFlag: + var v float64 + b, v, err = DecodeFloat(b) + d.SetFloat64(v) + case bytesFlag: + var v []byte + b, v, err = DecodeBytes(b) + d.SetBytes(v) + case compactBytesFlag: + var v []byte + b, v, err = DecodeCompactBytes(b) + d.SetBytes(v) + case decimalFlag: + var v mysql.Decimal + b, v, err = DecodeDecimal(b) + d.SetValue(v) + case durationFlag: + var r int64 + b, r, err = DecodeInt(b) + if err == nil { + // use max fsp, let outer to do round manually. + v := mysql.Duration{Duration: time.Duration(r), Fsp: mysql.MaxFsp} + d.SetValue(v) + } + case nilFlag: + default: + return nil, errors.Errorf("invalid encoded key flag %v", flag) + } + if err != nil { + return nil, errors.Trace(err) + } + + values = append(values, d) + } + + return values, nil +} diff --git a/vendor/github.com/pingcap/tidb/util/codec/decimal.go b/vendor/github.com/pingcap/tidb/util/codec/decimal.go new file mode 100644 index 000000000..fb0e2fd1f --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/codec/decimal.go @@ -0,0 +1,183 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package codec + +import ( + "bytes" + "math/big" + + "github.com/juju/errors" + "github.com/pingcap/tidb/mysql" +) + +const ( + negativeSign int64 = 8 + zeroSign int64 = 16 + positiveSign int64 = 24 +) + +func codecSign(value int64) int64 { + if value < 0 { + return negativeSign + } + + return positiveSign +} + +func encodeExp(expValue int64, expSign int64, valSign int64) int64 { + if expSign == negativeSign { + expValue = -expValue + } + + if expSign != valSign { + expValue = ^expValue + } + + return expValue +} + +func decodeExp(expValue int64, expSign int64, valSign int64) int64 { + if expSign != valSign { + expValue = ^expValue + } + + if expSign == negativeSign { + expValue = -expValue + } + + return expValue +} + +func codecValue(value []byte, valSign int64) { + if valSign == negativeSign { + reverseBytes(value) + } +} + +// EncodeDecimal encodes a decimal d into a byte slice which can be sorted lexicographically later. +// EncodeDecimal guarantees that the encoded value is in ascending order for comparison. +// Decimal encoding: +// Byte -> value sign +// Byte -> exp sign +// EncodeInt -> exp value +// EncodeBytes -> abs value bytes +func EncodeDecimal(b []byte, d mysql.Decimal) []byte { + if d.Equals(mysql.ZeroDecimal) { + return append(b, byte(zeroSign)) + } + + v := d.BigIntValue() + valSign := codecSign(int64(v.Sign())) + + absVal := new(big.Int) + absVal.Abs(v) + + value := []byte(absVal.String()) + + // Trim right side "0", like "12.34000" -> "12.34" or "0.1234000" -> "0.1234". + if d.Exponent() != 0 { + value = bytes.TrimRight(value, "0") + } + + // Get exp and value, format is "value":"exp". + // like "12.34" -> "0.1234":"2". + // like "-0.01234" -> "-0.1234":"-1". + exp := int64(0) + div := big.NewInt(10) + for ; ; exp++ { + if absVal.Sign() == 0 { + break + } + absVal = absVal.Div(absVal, div) + } + + expVal := exp + int64(d.Exponent()) + expSign := codecSign(expVal) + + // For negtive exp, do bit reverse for exp. + // For negtive decimal, do bit reverse for exp and value. + expVal = encodeExp(expVal, expSign, valSign) + codecValue(value, valSign) + + b = append(b, byte(valSign)) + b = append(b, byte(expSign)) + b = EncodeInt(b, expVal) + b = EncodeBytes(b, value) + return b +} + +// DecodeDecimal decodes bytes to decimal. +// DecodeFloat decodes a float from a byte slice +// Decimal decoding: +// Byte -> value sign +// Byte -> exp sign +// DecodeInt -> exp value +// DecodeBytes -> abs value bytes +func DecodeDecimal(b []byte) ([]byte, mysql.Decimal, error) { + var ( + r = b + d mysql.Decimal + err error + ) + + // Decode value sign. + valSign := int64(r[0]) + r = r[1:] + if valSign == zeroSign { + d, err = mysql.ParseDecimal("0") + return r, d, errors.Trace(err) + } + + // Decode exp sign. + expSign := int64(r[0]) + r = r[1:] + + // Decode exp value. + expVal := int64(0) + r, expVal, err = DecodeInt(r) + if err != nil { + return r, d, errors.Trace(err) + } + expVal = decodeExp(expVal, expSign, valSign) + + // Decode abs value bytes. + value := []byte{} + r, value, err = DecodeBytes(r) + if err != nil { + return r, d, errors.Trace(err) + } + codecValue(value, valSign) + + // Generate decimal string value. + var decimalStr []byte + if valSign == negativeSign { + decimalStr = append(decimalStr, '-') + } + + if expVal <= 0 { + // Like decimal "0.1234" or "0.01234". + decimalStr = append(decimalStr, '0') + decimalStr = append(decimalStr, '.') + decimalStr = append(decimalStr, bytes.Repeat([]byte{'0'}, -int(expVal))...) + decimalStr = append(decimalStr, value...) + } else { + // Like decimal "12.34". + decimalStr = append(decimalStr, value[:expVal]...) + decimalStr = append(decimalStr, '.') + decimalStr = append(decimalStr, value[expVal:]...) + } + + d, err = mysql.ParseDecimal(string(decimalStr)) + return r, d, errors.Trace(err) +} diff --git a/vendor/github.com/pingcap/tidb/util/codec/float.go b/vendor/github.com/pingcap/tidb/util/codec/float.go new file mode 100644 index 000000000..c2107f166 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/codec/float.go @@ -0,0 +1,65 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package codec + +import ( + "math" + + "github.com/juju/errors" +) + +func encodeFloatToCmpUint64(f float64) uint64 { + u := math.Float64bits(f) + if f >= 0 { + u |= signMask + } else { + u = ^u + } + return u +} + +func decodeCmpUintToFloat(u uint64) float64 { + if u&signMask > 0 { + u &= ^signMask + } else { + u = ^u + } + return math.Float64frombits(u) +} + +// EncodeFloat encodes a float v into a byte slice which can be sorted lexicographically later. +// EncodeFloat guarantees that the encoded value is in ascending order for comparison. +func EncodeFloat(b []byte, v float64) []byte { + u := encodeFloatToCmpUint64(v) + return EncodeUint(b, u) +} + +// DecodeFloat decodes a float from a byte slice generated with EncodeFloat before. +func DecodeFloat(b []byte) ([]byte, float64, error) { + b, u, err := DecodeUint(b) + return b, decodeCmpUintToFloat(u), errors.Trace(err) +} + +// EncodeFloatDesc encodes a float v into a byte slice which can be sorted lexicographically later. +// EncodeFloatDesc guarantees that the encoded value is in descending order for comparison. +func EncodeFloatDesc(b []byte, v float64) []byte { + u := encodeFloatToCmpUint64(v) + return EncodeUintDesc(b, u) +} + +// DecodeFloatDesc decodes a float from a byte slice generated with EncodeFloatDesc before. +func DecodeFloatDesc(b []byte) ([]byte, float64, error) { + b, u, err := DecodeUintDesc(b) + return b, decodeCmpUintToFloat(u), errors.Trace(err) +} diff --git a/vendor/github.com/pingcap/tidb/util/codec/number.go b/vendor/github.com/pingcap/tidb/util/codec/number.go new file mode 100644 index 000000000..cad729c31 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/codec/number.go @@ -0,0 +1,170 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package codec + +import ( + "encoding/binary" + + "github.com/juju/errors" +) + +const signMask uint64 = 0x8000000000000000 + +func encodeIntToCmpUint(v int64) uint64 { + u := uint64(v) + if u&signMask > 0 { + u &= ^signMask + } else { + u |= signMask + } + + return u +} + +func decodeCmpUintToInt(u uint64) int64 { + if u&signMask > 0 { + u &= ^signMask + } else { + u |= signMask + } + + return int64(u) +} + +// EncodeInt appends the encoded value to slice b and returns the appended slice. +// EncodeInt guarantees that the encoded value is in ascending order for comparison. +func EncodeInt(b []byte, v int64) []byte { + var data [8]byte + u := encodeIntToCmpUint(v) + binary.BigEndian.PutUint64(data[:], u) + return append(b, data[:]...) +} + +// EncodeIntDesc appends the encoded value to slice b and returns the appended slice. +// EncodeIntDesc guarantees that the encoded value is in descending order for comparison. +func EncodeIntDesc(b []byte, v int64) []byte { + var data [8]byte + u := encodeIntToCmpUint(v) + binary.BigEndian.PutUint64(data[:], ^u) + return append(b, data[:]...) +} + +// DecodeInt decodes value encoded by EncodeInt before. +// It returns the leftover un-decoded slice, decoded value if no error. +func DecodeInt(b []byte) ([]byte, int64, error) { + if len(b) < 8 { + return nil, 0, errors.New("insufficient bytes to decode value") + } + + u := binary.BigEndian.Uint64(b[:8]) + v := decodeCmpUintToInt(u) + b = b[8:] + return b, v, nil +} + +// DecodeIntDesc decodes value encoded by EncodeInt before. +// It returns the leftover un-decoded slice, decoded value if no error. +func DecodeIntDesc(b []byte) ([]byte, int64, error) { + if len(b) < 8 { + return nil, 0, errors.New("insufficient bytes to decode value") + } + + u := binary.BigEndian.Uint64(b[:8]) + v := decodeCmpUintToInt(^u) + b = b[8:] + return b, v, nil +} + +// EncodeUint appends the encoded value to slice b and returns the appended slice. +// EncodeUint guarantees that the encoded value is in ascending order for comparison. +func EncodeUint(b []byte, v uint64) []byte { + var data [8]byte + binary.BigEndian.PutUint64(data[:], v) + return append(b, data[:]...) +} + +// EncodeUintDesc appends the encoded value to slice b and returns the appended slice. +// EncodeUintDesc guarantees that the encoded value is in descending order for comparison. +func EncodeUintDesc(b []byte, v uint64) []byte { + var data [8]byte + binary.BigEndian.PutUint64(data[:], ^v) + return append(b, data[:]...) +} + +// DecodeUint decodes value encoded by EncodeUint before. +// It returns the leftover un-decoded slice, decoded value if no error. +func DecodeUint(b []byte) ([]byte, uint64, error) { + if len(b) < 8 { + return nil, 0, errors.New("insufficient bytes to decode value") + } + + v := binary.BigEndian.Uint64(b[:8]) + b = b[8:] + return b, v, nil +} + +// DecodeUintDesc decodes value encoded by EncodeInt before. +// It returns the leftover un-decoded slice, decoded value if no error. +func DecodeUintDesc(b []byte) ([]byte, uint64, error) { + if len(b) < 8 { + return nil, 0, errors.New("insufficient bytes to decode value") + } + + data := b[:8] + v := binary.BigEndian.Uint64(data) + b = b[8:] + return b, ^v, nil +} + +// EncodeVarint appends the encoded value to slice b and returns the appended slice. +// Note that the encoded result is not memcomparable. +func EncodeVarint(b []byte, v int64) []byte { + var data [binary.MaxVarintLen64]byte + n := binary.PutVarint(data[:], v) + return append(b, data[:n]...) +} + +// DecodeVarint decodes value encoded by EncodeVarint before. +// It returns the leftover un-decoded slice, decoded value if no error. +func DecodeVarint(b []byte) ([]byte, int64, error) { + v, n := binary.Varint(b) + if n > 0 { + return b[n:], v, nil + } + if n < 0 { + return nil, 0, errors.New("value larger than 64 bits") + } + return nil, 0, errors.New("insufficient bytes to decode value") +} + +// EncodeUvarint appends the encoded value to slice b and returns the appended slice. +// Note that the encoded result is not memcomparable. +func EncodeUvarint(b []byte, v uint64) []byte { + var data [binary.MaxVarintLen64]byte + n := binary.PutUvarint(data[:], v) + return append(b, data[:n]...) +} + +// DecodeUvarint decodes value encoded by EncodeUvarint before. +// It returns the leftover un-decoded slice, decoded value if no error. +func DecodeUvarint(b []byte) ([]byte, uint64, error) { + v, n := binary.Uvarint(b) + if n > 0 { + return b[n:], v, nil + } + if n < 0 { + return nil, 0, errors.New("value larger than 64 bits") + } + return nil, 0, errors.New("insufficient bytes to decode value") +} diff --git a/vendor/github.com/pingcap/tidb/util/distinct/distinct.go b/vendor/github.com/pingcap/tidb/util/distinct/distinct.go new file mode 100644 index 000000000..84885b753 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/distinct/distinct.go @@ -0,0 +1,47 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package distinct + +import ( + "github.com/juju/errors" + "github.com/pingcap/tidb/util/codec" + "github.com/pingcap/tidb/util/types" +) + +// CreateDistinctChecker creates a new distinct checker. +func CreateDistinctChecker() *Checker { + return &Checker{ + existingKeys: make(map[string]bool), + } +} + +// Checker stores existing keys and checks if given data is distinct. +type Checker struct { + existingKeys map[string]bool +} + +// Check checks if values is distinct. +func (d *Checker) Check(values []interface{}) (bool, error) { + bs, err := codec.EncodeValue([]byte{}, types.MakeDatums(values...)...) + if err != nil { + return false, errors.Trace(err) + } + key := string(bs) + _, ok := d.existingKeys[key] + if ok { + return false, nil + } + d.existingKeys[key] = true + return true, nil +} diff --git a/vendor/github.com/pingcap/tidb/util/hack/hack.go b/vendor/github.com/pingcap/tidb/util/hack/hack.go new file mode 100644 index 000000000..d792c9e5b --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/hack/hack.go @@ -0,0 +1,43 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package hack + +import ( + "reflect" + "unsafe" +) + +// String converts slice to string without copy. +// Use at your own risk. +func String(b []byte) (s string) { + if len(b) == 0 { + return "" + } + pbytes := (*reflect.SliceHeader)(unsafe.Pointer(&b)) + pstring := (*reflect.StringHeader)(unsafe.Pointer(&s)) + pstring.Data = pbytes.Data + pstring.Len = pbytes.Len + return +} + +// Slice converts string to slice without copy. +// Use at your own risk. +func Slice(s string) (b []byte) { + pbytes := (*reflect.SliceHeader)(unsafe.Pointer(&b)) + pstring := (*reflect.StringHeader)(unsafe.Pointer(&s)) + pbytes.Data = pstring.Data + pbytes.Len = pstring.Len + pbytes.Cap = pstring.Len + return +} diff --git a/vendor/github.com/pingcap/tidb/util/prefix_helper.go b/vendor/github.com/pingcap/tidb/util/prefix_helper.go new file mode 100644 index 000000000..da91c8736 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/prefix_helper.go @@ -0,0 +1,97 @@ +// Copyright 2014 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package util + +import ( + "bytes" + + "github.com/juju/errors" + "github.com/pingcap/tidb/kv" +) + +// ScanMetaWithPrefix scans metadata with the prefix. +func ScanMetaWithPrefix(retriever kv.Retriever, prefix kv.Key, filter func(kv.Key, []byte) bool) error { + iter, err := retriever.Seek(prefix) + if err != nil { + return errors.Trace(err) + } + defer iter.Close() + + for { + if err != nil { + return errors.Trace(err) + } + + if iter.Valid() && iter.Key().HasPrefix(prefix) { + if !filter(iter.Key(), iter.Value()) { + break + } + err = iter.Next() + if err != nil { + return errors.Trace(err) + } + } else { + break + } + } + + return nil +} + +// DelKeyWithPrefix deletes keys with prefix. +func DelKeyWithPrefix(rm kv.RetrieverMutator, prefix kv.Key) error { + var keys []kv.Key + iter, err := rm.Seek(prefix) + if err != nil { + return errors.Trace(err) + } + + defer iter.Close() + for { + if err != nil { + return errors.Trace(err) + } + + if iter.Valid() && iter.Key().HasPrefix(prefix) { + keys = append(keys, iter.Key().Clone()) + err = iter.Next() + if err != nil { + return errors.Trace(err) + } + } else { + break + } + } + + for _, key := range keys { + err := rm.Delete(key) + if err != nil { + return errors.Trace(err) + } + } + + return nil +} + +// RowKeyPrefixFilter returns a function which checks whether currentKey has decoded rowKeyPrefix as prefix. +func RowKeyPrefixFilter(rowKeyPrefix kv.Key) kv.FnKeyCmp { + return func(currentKey kv.Key) bool { + // Next until key without prefix of this record. + return !bytes.HasPrefix(currentKey, rowKeyPrefix) + } +} diff --git a/vendor/github.com/pingcap/tidb/util/segmentmap/segmentmap.go b/vendor/github.com/pingcap/tidb/util/segmentmap/segmentmap.go new file mode 100644 index 000000000..030372f27 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/segmentmap/segmentmap.go @@ -0,0 +1,81 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package segmentmap + +import ( + "hash/crc32" + + "github.com/juju/errors" +) + +// SegmentMap is used for handle a big map slice by slice. +// It's not thread safe. +type SegmentMap struct { + size int64 + maps []map[string]interface{} + + crcTable *crc32.Table +} + +// NewSegmentMap create a new SegmentMap. +func NewSegmentMap(size int64) (*SegmentMap, error) { + if size <= 0 { + return nil, errors.Errorf("Invalid size: %d", size) + } + + sm := &SegmentMap{ + maps: make([]map[string]interface{}, size), + size: size, + } + for i := int64(0); i < size; i++ { + sm.maps[i] = make(map[string]interface{}) + } + + sm.crcTable = crc32.MakeTable(crc32.Castagnoli) + return sm, nil +} + +// Get is the same as map[k]. +func (sm *SegmentMap) Get(key []byte) (interface{}, bool) { + idx := int64(crc32.Checksum(key, sm.crcTable)) % sm.size + val, ok := sm.maps[idx][string(key)] + return val, ok +} + +// GetSegment gets the map specific by index. +func (sm *SegmentMap) GetSegment(index int64) (map[string]interface{}, error) { + if index >= sm.size || index < 0 { + return nil, errors.Errorf("index out of bound: %d", index) + } + + return sm.maps[index], nil +} + +// Set if key not exists, returns whether already exists. +func (sm *SegmentMap) Set(key []byte, value interface{}, force bool) bool { + idx := int64(crc32.Checksum(key, sm.crcTable)) % sm.size + k := string(key) + _, exist := sm.maps[idx][k] + if exist && !force { + return exist + } + + sm.maps[idx][k] = value + return exist +} + +// SegmentCount returns how many inner segments. +func (sm *SegmentMap) SegmentCount() int64 { + return sm.size +} diff --git a/vendor/github.com/pingcap/tidb/util/sqlexec/restricted_sql_executor.go b/vendor/github.com/pingcap/tidb/util/sqlexec/restricted_sql_executor.go new file mode 100644 index 000000000..93d47a963 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/sqlexec/restricted_sql_executor.go @@ -0,0 +1,36 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package sqlexec + +import ( + "github.com/pingcap/tidb/ast" + "github.com/pingcap/tidb/context" +) + +// RestrictedSQLExecutor is an interface provides executing restricted sql statement. +// Why we need this interface? +// When we execute some management statements, we need to operate system tables. +// For example when executing create user statement, we need to check if the user already +// exists in the mysql.User table and insert a new row if not exists. In this case, we need +// a convenience way to manipulate system tables. The most simple way is executing sql statement. +// In order to execute sql statement in stmts package, we add this interface to solve dependence problem. +// And in the same time, we do not want this interface becomes a general way to run sql statement. +// We hope this could be used with some restrictions such as only allowing system tables as target, +// do not allowing recursion call. +// For more infomation please refer to the comments in session.ExecRestrictedSQL(). +// This is implemented in session.go. +type RestrictedSQLExecutor interface { + // ExecRestrictedSQL run sql statement in ctx with some restriction. + ExecRestrictedSQL(ctx context.Context, sql string) (ast.RecordSet, error) +} diff --git a/vendor/github.com/pingcap/tidb/util/stringutil/string_util.go b/vendor/github.com/pingcap/tidb/util/stringutil/string_util.go new file mode 100644 index 000000000..f4005e7e1 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/stringutil/string_util.go @@ -0,0 +1,53 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package stringutil + +import ( + "bytes" + "strings" +) + +// See: https://dev.mysql.com/doc/refman/5.7/en/string-literals.html#character-escape-sequences +const validEscapeChars = `0'"bntrz\\%_` + +// RemoveUselessBackslash removes backslashs which could be ignored in the string literal. +// See: https://dev.mysql.com/doc/refman/5.7/en/string-literals.html +// " Each of these sequences begins with a backslash (“\”), known as the escape character. +// MySQL recognizes the escape sequences shown in Table 9.1, “Special Character Escape Sequences”. +// For all other escape sequences, backslash is ignored. That is, the escaped character is +// interpreted as if it was not escaped. For example, “\x” is just “x”. These sequences are case sensitive. +// For example, “\b” is interpreted as a backspace, but “\B” is interpreted as “B”." +func RemoveUselessBackslash(s string) string { + var ( + buf bytes.Buffer + i = 0 + ) + for i < len(s)-1 { + if s[i] != '\\' { + buf.WriteByte(s[i]) + i++ + continue + } + next := s[i+1] + if strings.IndexByte(validEscapeChars, next) != -1 { + buf.WriteByte(s[i]) + } + buf.WriteByte(next) + i += 2 + } + if i == len(s)-1 { + buf.WriteByte(s[i]) + } + return buf.String() +} diff --git a/vendor/github.com/pingcap/tidb/util/types/compare.go b/vendor/github.com/pingcap/tidb/util/types/compare.go new file mode 100644 index 000000000..611fa72d3 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/types/compare.go @@ -0,0 +1,72 @@ +// Copyright 2014 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +// CompareInt64 returns an integer comparing the int64 x to y. +func CompareInt64(x, y int64) int { + if x < y { + return -1 + } else if x == y { + return 0 + } + + return 1 +} + +// CompareUint64 returns an integer comparing the uint64 x to y. +func CompareUint64(x, y uint64) int { + if x < y { + return -1 + } else if x == y { + return 0 + } + + return 1 +} + +// CompareFloat64 returns an integer comparing the float64 x to y. +func CompareFloat64(x, y float64) int { + if x < y { + return -1 + } else if x == y { + return 0 + } + + return 1 +} + +// CompareString returns an integer comparing the string x to y. +func CompareString(x, y string) int { + if x < y { + return -1 + } else if x == y { + return 0 + } + + return 1 +} + +// Compare returns an integer comparing the interface a with b. +// a > b -> 1 +// a = b -> 0 +// a < b -> -1 +func Compare(a, b interface{}) (int, error) { + aDatum := NewDatum(a) + bDatum := NewDatum(b) + return aDatum.CompareDatum(bDatum) +} diff --git a/vendor/github.com/pingcap/tidb/util/types/convert.go b/vendor/github.com/pingcap/tidb/util/types/convert.go new file mode 100644 index 000000000..9ea9a7e06 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/types/convert.go @@ -0,0 +1,437 @@ +// Copyright 2014 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "math" + "strconv" + "strings" + "unicode" + + "github.com/juju/errors" + "github.com/pingcap/tidb/mysql" +) + +// InvConv returns a failed convertion error. +func invConv(val interface{}, tp byte) (interface{}, error) { + return nil, errors.Errorf("cannot convert %v (type %T) to type %s", val, val, TypeStr(tp)) +} + +func truncateStr(str string, flen int) string { + if flen != UnspecifiedLength && len(str) > flen { + str = str[:flen] + } + return str +} + +var unsignedUpperBound = map[byte]uint64{ + mysql.TypeTiny: math.MaxUint8, + mysql.TypeShort: math.MaxUint16, + mysql.TypeInt24: mysql.MaxUint24, + mysql.TypeLong: math.MaxUint32, + mysql.TypeLonglong: math.MaxUint64, + mysql.TypeBit: math.MaxUint64, + mysql.TypeEnum: math.MaxUint64, + mysql.TypeSet: math.MaxUint64, +} + +var signedUpperBound = map[byte]int64{ + mysql.TypeTiny: math.MaxInt8, + mysql.TypeShort: math.MaxInt16, + mysql.TypeInt24: mysql.MaxInt24, + mysql.TypeLong: math.MaxInt32, + mysql.TypeLonglong: math.MaxInt64, +} + +var signedLowerBound = map[byte]int64{ + mysql.TypeTiny: math.MinInt8, + mysql.TypeShort: math.MinInt16, + mysql.TypeInt24: mysql.MinInt24, + mysql.TypeLong: math.MinInt32, + mysql.TypeLonglong: math.MinInt64, +} + +func convertFloatToInt(val float64, lowerBound int64, upperBound int64, tp byte) (int64, error) { + val = RoundFloat(val) + if val < float64(lowerBound) { + return lowerBound, overflow(val, tp) + } + + if val > float64(upperBound) { + return upperBound, overflow(val, tp) + } + + return int64(val), nil +} + +func convertIntToInt(val int64, lowerBound int64, upperBound int64, tp byte) (int64, error) { + if val < lowerBound { + return lowerBound, overflow(val, tp) + } + + if val > upperBound { + return upperBound, overflow(val, tp) + } + + return val, nil +} + +func convertUintToInt(val uint64, upperBound int64, tp byte) (int64, error) { + if val > uint64(upperBound) { + return upperBound, overflow(val, tp) + } + + return int64(val), nil +} + +func convertToInt(val interface{}, target *FieldType) (int64, error) { + tp := target.Tp + lowerBound := signedLowerBound[tp] + upperBound := signedUpperBound[tp] + + switch v := val.(type) { + case bool: + if v { + return 1, nil + } + return 0, nil + case uint64: + return convertUintToInt(v, upperBound, tp) + case int: + return convertIntToInt(int64(v), lowerBound, upperBound, tp) + case int64: + return convertIntToInt(int64(v), lowerBound, upperBound, tp) + case float32: + return convertFloatToInt(float64(v), lowerBound, upperBound, tp) + case float64: + return convertFloatToInt(float64(v), lowerBound, upperBound, tp) + case string: + fval, err := StrToFloat(v) + if err != nil { + return 0, errors.Trace(err) + } + return convertFloatToInt(fval, lowerBound, upperBound, tp) + case []byte: + fval, err := StrToFloat(string(v)) + if err != nil { + return 0, errors.Trace(err) + } + return convertFloatToInt(fval, lowerBound, upperBound, tp) + case mysql.Time: + // 2011-11-10 11:11:11.999999 -> 20111110111112 + ival := v.ToNumber().Round(0).IntPart() + return convertIntToInt(ival, lowerBound, upperBound, tp) + case mysql.Duration: + // 11:11:11.999999 -> 111112 + ival := v.ToNumber().Round(0).IntPart() + return convertIntToInt(ival, lowerBound, upperBound, tp) + case mysql.Decimal: + fval, _ := v.Float64() + return convertFloatToInt(fval, lowerBound, upperBound, tp) + case mysql.Hex: + return convertFloatToInt(v.ToNumber(), lowerBound, upperBound, tp) + case mysql.Bit: + return convertFloatToInt(v.ToNumber(), lowerBound, upperBound, tp) + case mysql.Enum: + return convertFloatToInt(v.ToNumber(), lowerBound, upperBound, tp) + case mysql.Set: + return convertFloatToInt(v.ToNumber(), lowerBound, upperBound, tp) + } + return 0, typeError(val, target) +} + +func convertIntToUint(val int64, upperBound uint64, tp byte) (uint64, error) { + if val < 0 { + return 0, overflow(val, tp) + } + + if uint64(val) > upperBound { + return upperBound, overflow(val, tp) + } + + return uint64(val), nil +} + +func convertUintToUint(val uint64, upperBound uint64, tp byte) (uint64, error) { + if val > upperBound { + return upperBound, overflow(val, tp) + } + + return val, nil +} + +func convertFloatToUint(val float64, upperBound uint64, tp byte) (uint64, error) { + val = RoundFloat(val) + if val < 0 { + return uint64(int64(val)), overflow(val, tp) + } + + if val > float64(upperBound) { + return upperBound, overflow(val, tp) + } + + return uint64(val), nil +} + +// typeError returns error for invalid value type. +func typeError(v interface{}, target *FieldType) error { + return errors.Errorf("cannot use %v (type %T) in assignment to, or comparison with, column type %s)", + v, v, target.String()) +} + +func isCastType(tp byte) bool { + switch tp { + case mysql.TypeString, mysql.TypeDuration, mysql.TypeDatetime, + mysql.TypeDate, mysql.TypeLonglong, mysql.TypeNewDecimal: + return true + } + return false +} + +// Cast casts val to certain types and does not return error. +func Cast(val interface{}, target *FieldType) (interface{}, error) { + if !isCastType(target.Tp) { + return nil, errors.Errorf("unknown cast type - %v", target) + } + + return Convert(val, target) +} + +// Convert converts the val with type tp. +func Convert(val interface{}, target *FieldType) (v interface{}, err error) { + d := NewDatum(val) + ret, err := d.ConvertTo(target) + if err != nil { + return ret.GetValue(), errors.Trace(err) + } + return ret.GetValue(), nil +} + +// StrToInt converts a string to an integer in best effort. +// TODO: handle overflow and add unittest. +func StrToInt(str string) (int64, error) { + str = strings.TrimSpace(str) + if len(str) == 0 { + return 0, nil + } + negative := false + i := 0 + if str[i] == '-' { + negative = true + i++ + } else if str[i] == '+' { + i++ + } + r := int64(0) + for ; i < len(str); i++ { + if !unicode.IsDigit(rune(str[i])) { + break + } + r = r*10 + int64(str[i]-'0') + } + if negative { + r = -r + } + // TODO: if i < len(str), we should return an error. + return r, nil +} + +// StrToFloat converts a string to a float64 in best effort. +func StrToFloat(str string) (float64, error) { + str = strings.TrimSpace(str) + if len(str) == 0 { + return 0, nil + } + + // MySQL uses a very loose conversation, e.g, 123.abc -> 123 + // We should do a trade off whether supporting this feature or using a strict mode. + // Now we use a strict mode. + return strconv.ParseFloat(str, 64) +} + +// ToInt64 converts an interface to an int64. +func ToInt64(value interface{}) (int64, error) { + return convertToInt(value, NewFieldType(mysql.TypeLonglong)) +} + +// ToFloat64 converts an interface to a float64. +func ToFloat64(value interface{}) (float64, error) { + switch v := value.(type) { + case bool: + if v { + return 1, nil + } + return 0, nil + case int: + return float64(v), nil + case int64: + return float64(v), nil + case uint64: + return float64(v), nil + case float32: + return float64(v), nil + case float64: + return float64(v), nil + case string: + return StrToFloat(v) + case []byte: + return StrToFloat(string(v)) + case mysql.Time: + f, _ := v.ToNumber().Float64() + return f, nil + case mysql.Duration: + f, _ := v.ToNumber().Float64() + return f, nil + case mysql.Decimal: + vv, _ := v.Float64() + return vv, nil + case mysql.Hex: + return v.ToNumber(), nil + case mysql.Bit: + return v.ToNumber(), nil + case mysql.Enum: + return v.ToNumber(), nil + case mysql.Set: + return v.ToNumber(), nil + default: + return 0, errors.Errorf("cannot convert %v(type %T) to float64", value, value) + } +} + +// ToDecimal converts an interface to a Decimal. +func ToDecimal(value interface{}) (mysql.Decimal, error) { + switch v := value.(type) { + case bool: + if v { + return mysql.ConvertToDecimal(1) + } + return mysql.ConvertToDecimal(0) + case []byte: + return mysql.ConvertToDecimal(string(v)) + case mysql.Time: + return v.ToNumber(), nil + case mysql.Duration: + return v.ToNumber(), nil + default: + return mysql.ConvertToDecimal(value) + } +} + +// ToString converts an interface to a string. +func ToString(value interface{}) (string, error) { + switch v := value.(type) { + case bool: + if v { + return "1", nil + } + return "0", nil + case int: + return strconv.FormatInt(int64(v), 10), nil + case int64: + return strconv.FormatInt(int64(v), 10), nil + case uint64: + return strconv.FormatUint(uint64(v), 10), nil + case float32: + return strconv.FormatFloat(float64(v), 'f', -1, 32), nil + case float64: + return strconv.FormatFloat(float64(v), 'f', -1, 64), nil + case string: + return v, nil + case []byte: + return string(v), nil + case mysql.Time: + return v.String(), nil + case mysql.Duration: + return v.String(), nil + case mysql.Decimal: + return v.String(), nil + case mysql.Hex: + return v.ToString(), nil + case mysql.Bit: + return v.ToString(), nil + case mysql.Enum: + return v.String(), nil + case mysql.Set: + return v.String(), nil + default: + return "", errors.Errorf("cannot convert %v(type %T) to string", value, value) + } +} + +// ToBool converts an interface to a bool. +// We will use 1 for true, and 0 for false. +func ToBool(value interface{}) (int64, error) { + isZero := false + switch v := value.(type) { + case bool: + isZero = (v == false) + case int: + isZero = (v == 0) + case int64: + isZero = (v == 0) + case uint64: + isZero = (v == 0) + case float32: + isZero = (v == 0) + case float64: + isZero = (v == 0) + case string: + if len(v) == 0 { + isZero = true + } else { + n, err := StrToInt(v) + if err != nil { + return 0, err + } + isZero = (n == 0) + } + case []byte: + if len(v) == 0 { + isZero = true + } else { + n, err := StrToInt(string(v)) + if err != nil { + return 0, err + } + isZero = (n == 0) + } + case mysql.Time: + isZero = v.IsZero() + case mysql.Duration: + isZero = (v.Duration == 0) + case mysql.Decimal: + vv, _ := v.Float64() + isZero = (vv == 0) + case mysql.Hex: + isZero = (v.ToNumber() == 0) + case mysql.Bit: + isZero = (v.ToNumber() == 0) + case mysql.Enum: + isZero = (v.ToNumber() == 0) + case mysql.Set: + isZero = (v.ToNumber() == 0) + default: + return 0, errors.Errorf("cannot convert %v(type %T) to bool", value, value) + } + + if isZero { + return 0, nil + } + + return 1, nil +} diff --git a/vendor/github.com/pingcap/tidb/util/types/datum.go b/vendor/github.com/pingcap/tidb/util/types/datum.go new file mode 100644 index 000000000..ddb8a4325 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/types/datum.go @@ -0,0 +1,1249 @@ +// Copyright 2016 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "math" + "strconv" + "time" + + "github.com/juju/errors" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/util/charset" + "github.com/pingcap/tidb/util/hack" +) + +// Kind constants. +const ( + KindNull int = 0 + KindInt64 int = iota + 1 + KindUint64 + KindFloat32 + KindFloat64 + KindString + KindBytes + KindMysqlBit + KindMysqlDecimal + KindMysqlDuration + KindMysqlEnum + KindMysqlHex + KindMysqlSet + KindMysqlTime + KindRow + KindInterface + KindMinNotNull + KindMaxValue +) + +// Datum is a data box holds different kind of data. +// It has better performance and is easier to use than `interface{}`. +type Datum struct { + k int // datum kind. + i int64 // i can hold int64 uint64 float64 values. + b []byte // b can hold string or []byte values. + x interface{} // f hold all other types. +} + +// Kind gets the kind of the datum. +func (d *Datum) Kind() int { + return d.k +} + +// GetInt64 gets int64 value. +func (d *Datum) GetInt64() int64 { + return d.i +} + +// SetInt64 sets int64 value. +func (d *Datum) SetInt64(i int64) { + d.k = KindInt64 + d.i = i +} + +// GetUint64 gets uint64 value. +func (d *Datum) GetUint64() uint64 { + return uint64(d.i) +} + +// SetUint64 sets uint64 value. +func (d *Datum) SetUint64(i uint64) { + d.k = KindUint64 + d.i = int64(i) +} + +// GetFloat64 gets float64 value. +func (d *Datum) GetFloat64() float64 { + return math.Float64frombits(uint64(d.i)) +} + +// SetFloat64 sets float64 value. +func (d *Datum) SetFloat64(f float64) { + d.k = KindFloat64 + d.i = int64(math.Float64bits(f)) +} + +// GetFloat32 gets float32 value. +func (d *Datum) GetFloat32() float32 { + return float32(math.Float64frombits(uint64(d.i))) +} + +// SetFloat32 sets float32 value. +func (d *Datum) SetFloat32(f float32) { + d.k = KindFloat32 + d.i = int64(math.Float64bits(float64(f))) +} + +// GetString gets string value. +func (d *Datum) GetString() string { + return hack.String(d.b) +} + +// SetString sets string value. +func (d *Datum) SetString(s string) { + d.k = KindString + sink(s) + d.b = hack.Slice(s) +} + +// sink prevents s from being allocated on the stack. +var sink = func(s string) { +} + +// GetBytes gets bytes value. +func (d *Datum) GetBytes() []byte { + return d.b +} + +// SetBytes sets bytes value to datum. +func (d *Datum) SetBytes(b []byte) { + d.k = KindBytes + d.b = b +} + +// SetBytesAsString sets bytes value to datum as string type. +func (d *Datum) SetBytesAsString(b []byte) { + d.k = KindString + d.b = b +} + +// GetInterface gets interface value. +func (d *Datum) GetInterface() interface{} { + return d.x +} + +// SetInterface sets interface to datum. +func (d *Datum) SetInterface(x interface{}) { + d.k = KindInterface + d.x = x +} + +// GetRow gets row value. +func (d *Datum) GetRow() []Datum { + return d.x.([]Datum) +} + +// SetNull sets datum to nil. +func (d *Datum) SetNull() { + d.k = KindNull + d.x = nil +} + +// GetMysqlBit gets mysql.Bit value +func (d *Datum) GetMysqlBit() mysql.Bit { + return d.x.(mysql.Bit) +} + +// SetMysqlBit sets mysql.Bit value +func (d *Datum) SetMysqlBit(b mysql.Bit) { + d.k = KindMysqlBit + d.x = b +} + +// GetMysqlDecimal gets mysql.Decimal value +func (d *Datum) GetMysqlDecimal() mysql.Decimal { + return d.x.(mysql.Decimal) +} + +// SetMysqlDecimal sets mysql.Decimal value +func (d *Datum) SetMysqlDecimal(b mysql.Decimal) { + d.k = KindMysqlDecimal + d.x = b +} + +// GetMysqlDuration gets mysql.Duration value +func (d *Datum) GetMysqlDuration() mysql.Duration { + return d.x.(mysql.Duration) +} + +// SetMysqlDuration sets mysql.Duration value +func (d *Datum) SetMysqlDuration(b mysql.Duration) { + d.k = KindMysqlDuration + d.x = b +} + +// GetMysqlEnum gets mysql.Enum value +func (d *Datum) GetMysqlEnum() mysql.Enum { + return d.x.(mysql.Enum) +} + +// SetMysqlEnum sets mysql.Enum value +func (d *Datum) SetMysqlEnum(b mysql.Enum) { + d.k = KindMysqlEnum + d.x = b +} + +// GetMysqlHex gets mysql.Hex value +func (d *Datum) GetMysqlHex() mysql.Hex { + return d.x.(mysql.Hex) +} + +// SetMysqlHex sets mysql.Hex value +func (d *Datum) SetMysqlHex(b mysql.Hex) { + d.k = KindMysqlHex + d.x = b +} + +// GetMysqlSet gets mysql.Set value +func (d *Datum) GetMysqlSet() mysql.Set { + return d.x.(mysql.Set) +} + +// SetMysqlSet sets mysql.Set value +func (d *Datum) SetMysqlSet(b mysql.Set) { + d.k = KindMysqlSet + d.x = b +} + +// GetMysqlTime gets mysql.Time value +func (d *Datum) GetMysqlTime() mysql.Time { + return d.x.(mysql.Time) +} + +// SetMysqlTime sets mysql.Time value +func (d *Datum) SetMysqlTime(b mysql.Time) { + d.k = KindMysqlTime + d.x = b +} + +// GetValue gets the value of the datum of any kind. +func (d *Datum) GetValue() interface{} { + switch d.k { + case KindInt64: + return d.GetInt64() + case KindUint64: + return d.GetUint64() + case KindFloat32: + return d.GetFloat32() + case KindFloat64: + return d.GetFloat64() + case KindString: + return d.GetString() + case KindBytes: + return d.GetBytes() + default: + return d.x + } +} + +// SetValue sets any kind of value. +func (d *Datum) SetValue(val interface{}) { + switch x := val.(type) { + case nil: + d.SetNull() + case bool: + if x { + d.SetInt64(1) + } else { + d.SetInt64(0) + } + case int: + d.SetInt64(int64(x)) + case int64: + d.SetInt64(x) + case uint64: + d.SetUint64(x) + case float32: + d.SetFloat32(x) + case float64: + d.SetFloat64(x) + case string: + d.SetString(x) + case []byte: + d.SetBytes(x) + case mysql.Bit: + d.x = x + d.k = KindMysqlBit + case mysql.Decimal: + d.x = x + d.k = KindMysqlDecimal + case mysql.Duration: + d.x = x + d.k = KindMysqlDuration + case mysql.Enum: + d.x = x + d.k = KindMysqlEnum + case mysql.Hex: + d.x = x + d.k = KindMysqlHex + case mysql.Set: + d.x = x + d.k = KindMysqlSet + case mysql.Time: + d.x = x + d.k = KindMysqlTime + case []Datum: + d.x = x + d.k = KindRow + default: + d.SetInterface(x) + } +} + +// CompareDatum compares datum to another datum. +// TODO: return error properly. +func (d *Datum) CompareDatum(ad Datum) (int, error) { + switch ad.k { + case KindNull: + if d.k == KindNull { + return 0, nil + } + return 1, nil + case KindMinNotNull: + if d.k == KindNull { + return -1, nil + } else if d.k == KindMinNotNull { + return 0, nil + } + return 1, nil + case KindMaxValue: + if d.k == KindMaxValue { + return 0, nil + } + return -1, nil + case KindInt64: + return d.compareInt64(ad.GetInt64()) + case KindUint64: + return d.compareUint64(ad.GetUint64()) + case KindFloat32, KindFloat64: + return d.compareFloat64(ad.GetFloat64()) + case KindString: + return d.compareString(ad.GetString()) + case KindBytes: + return d.compareBytes(ad.GetBytes()) + case KindMysqlBit: + return d.compareMysqlBit(ad.GetMysqlBit()) + case KindMysqlDecimal: + return d.compareMysqlDecimal(ad.GetMysqlDecimal()) + case KindMysqlDuration: + return d.compareMysqlDuration(ad.GetMysqlDuration()) + case KindMysqlEnum: + return d.compareMysqlEnum(ad.GetMysqlEnum()) + case KindMysqlHex: + return d.compareMysqlHex(ad.GetMysqlHex()) + case KindMysqlSet: + return d.compareMysqlSet(ad.GetMysqlSet()) + case KindMysqlTime: + return d.compareMysqlTime(ad.GetMysqlTime()) + case KindRow: + return d.compareRow(ad.GetRow()) + default: + return 0, nil + } +} + +func (d *Datum) compareInt64(i int64) (int, error) { + switch d.k { + case KindMaxValue: + return 1, nil + case KindInt64: + return CompareInt64(d.i, i), nil + case KindUint64: + if i < 0 || d.GetUint64() > math.MaxInt64 { + return 1, nil + } + return CompareInt64(d.i, i), nil + default: + return d.compareFloat64(float64(i)) + } +} + +func (d *Datum) compareUint64(u uint64) (int, error) { + switch d.k { + case KindMaxValue: + return 1, nil + case KindInt64: + if d.i < 0 || u > math.MaxInt64 { + return -1, nil + } + return CompareInt64(d.i, int64(u)), nil + case KindUint64: + return CompareUint64(d.GetUint64(), u), nil + default: + return d.compareFloat64(float64(u)) + } +} + +func (d *Datum) compareFloat64(f float64) (int, error) { + switch d.k { + case KindNull, KindMinNotNull: + return -1, nil + case KindMaxValue: + return 1, nil + case KindInt64: + return CompareFloat64(float64(d.i), f), nil + case KindUint64: + return CompareFloat64(float64(d.GetUint64()), f), nil + case KindFloat32, KindFloat64: + return CompareFloat64(d.GetFloat64(), f), nil + case KindString, KindBytes: + fVal, err := StrToFloat(d.GetString()) + return CompareFloat64(fVal, f), err + case KindMysqlBit: + fVal := d.GetMysqlBit().ToNumber() + return CompareFloat64(fVal, f), nil + case KindMysqlDecimal: + fVal, _ := d.GetMysqlDecimal().Float64() + return CompareFloat64(fVal, f), nil + case KindMysqlDuration: + fVal := d.GetMysqlDuration().Seconds() + return CompareFloat64(fVal, f), nil + case KindMysqlEnum: + fVal := d.GetMysqlEnum().ToNumber() + return CompareFloat64(fVal, f), nil + case KindMysqlHex: + fVal := d.GetMysqlHex().ToNumber() + return CompareFloat64(fVal, f), nil + case KindMysqlSet: + fVal := d.GetMysqlSet().ToNumber() + return CompareFloat64(fVal, f), nil + case KindMysqlTime: + fVal, _ := d.GetMysqlTime().ToNumber().Float64() + return CompareFloat64(fVal, f), nil + default: + return -1, nil + } +} + +func (d *Datum) compareString(s string) (int, error) { + switch d.k { + case KindNull, KindMinNotNull: + return -1, nil + case KindMaxValue: + return 1, nil + case KindString, KindBytes: + return CompareString(d.GetString(), s), nil + case KindMysqlDecimal: + dec, err := mysql.ParseDecimal(s) + return d.GetMysqlDecimal().Cmp(dec), err + case KindMysqlTime: + dt, err := mysql.ParseDatetime(s) + return d.GetMysqlTime().Compare(dt), err + case KindMysqlDuration: + dur, err := mysql.ParseDuration(s, mysql.MaxFsp) + return d.GetMysqlDuration().Compare(dur), err + case KindMysqlBit: + return CompareString(d.GetMysqlBit().ToString(), s), nil + case KindMysqlHex: + return CompareString(d.GetMysqlHex().ToString(), s), nil + case KindMysqlSet: + return CompareString(d.GetMysqlSet().String(), s), nil + case KindMysqlEnum: + return CompareString(d.GetMysqlEnum().String(), s), nil + default: + fVal, err := StrToFloat(s) + if err != nil { + return 0, err + } + return d.compareFloat64(fVal) + } +} + +func (d *Datum) compareBytes(b []byte) (int, error) { + return d.compareString(hack.String(b)) +} + +func (d *Datum) compareMysqlBit(bit mysql.Bit) (int, error) { + switch d.k { + case KindString, KindBytes: + return CompareString(d.GetString(), bit.ToString()), nil + default: + return d.compareFloat64(bit.ToNumber()) + } +} + +func (d *Datum) compareMysqlDecimal(dec mysql.Decimal) (int, error) { + switch d.k { + case KindMysqlDecimal: + return d.GetMysqlDecimal().Cmp(dec), nil + case KindString, KindBytes: + dDec, err := mysql.ParseDecimal(d.GetString()) + return dDec.Cmp(dec), err + default: + fVal, _ := dec.Float64() + return d.compareFloat64(fVal) + } +} + +func (d *Datum) compareMysqlDuration(dur mysql.Duration) (int, error) { + switch d.k { + case KindMysqlDuration: + return d.GetMysqlDuration().Compare(dur), nil + case KindString, KindBytes: + dDur, err := mysql.ParseDuration(d.GetString(), mysql.MaxFsp) + return dDur.Compare(dur), err + default: + return d.compareFloat64(dur.Seconds()) + } +} + +func (d *Datum) compareMysqlEnum(enum mysql.Enum) (int, error) { + switch d.k { + case KindString, KindBytes: + return CompareString(d.GetString(), enum.String()), nil + default: + return d.compareFloat64(enum.ToNumber()) + } +} + +func (d *Datum) compareMysqlHex(e mysql.Hex) (int, error) { + switch d.k { + case KindString, KindBytes: + return CompareString(d.GetString(), e.ToString()), nil + default: + return d.compareFloat64(e.ToNumber()) + } +} + +func (d *Datum) compareMysqlSet(set mysql.Set) (int, error) { + switch d.k { + case KindString, KindBytes: + return CompareString(d.GetString(), set.String()), nil + default: + return d.compareFloat64(set.ToNumber()) + } +} + +func (d *Datum) compareMysqlTime(time mysql.Time) (int, error) { + switch d.k { + case KindString, KindBytes: + dt, err := mysql.ParseDatetime(d.GetString()) + return dt.Compare(time), err + case KindMysqlTime: + return d.GetMysqlTime().Compare(time), nil + default: + fVal, _ := time.ToNumber().Float64() + return d.compareFloat64(fVal) + } +} + +func (d *Datum) compareRow(row []Datum) (int, error) { + var dRow []Datum + if d.k == KindRow { + dRow = d.GetRow() + } else { + dRow = []Datum{*d} + } + for i := 0; i < len(row) && i < len(dRow); i++ { + cmp, err := dRow[i].CompareDatum(row[i]) + if err != nil { + return 0, err + } + if cmp != 0 { + return cmp, nil + } + } + return CompareInt64(int64(len(dRow)), int64(len(row))), nil +} + +// ConvertTo converts datum to the target field type. +func (d *Datum) ConvertTo(target *FieldType) (Datum, error) { + if d.k == KindNull { + return Datum{}, nil + } + switch target.Tp { // TODO: implement mysql types convert when "CAST() AS" syntax are supported. + case mysql.TypeTiny, mysql.TypeShort, mysql.TypeInt24, mysql.TypeLong, mysql.TypeLonglong: + unsigned := mysql.HasUnsignedFlag(target.Flag) + if unsigned { + return d.convertToUint(target) + } + return d.convertToInt(target) + case mysql.TypeFloat, mysql.TypeDouble: + return d.convertToFloat(target) + case mysql.TypeBlob, mysql.TypeTinyBlob, mysql.TypeMediumBlob, mysql.TypeLongBlob, + mysql.TypeString, mysql.TypeVarchar, mysql.TypeVarString: + return d.convertToString(target) + case mysql.TypeTimestamp, mysql.TypeDatetime, mysql.TypeDate: + return d.convertToMysqlTime(target) + case mysql.TypeDuration: + return d.convertToMysqlDuration(target) + case mysql.TypeBit: + return d.convertToMysqlBit(target) + case mysql.TypeDecimal, mysql.TypeNewDecimal: + return d.convertToMysqlDecimal(target) + case mysql.TypeYear: + return d.convertToMysqlYear(target) + case mysql.TypeEnum: + return d.convertToMysqlEnum(target) + case mysql.TypeSet: + return d.convertToMysqlSet(target) + case mysql.TypeNull: + return Datum{}, nil + default: + panic("should never happen") + } +} + +func (d *Datum) convertToFloat(target *FieldType) (Datum, error) { + var ret Datum + switch d.k { + case KindNull: + return ret, nil + case KindInt64: + ret.SetFloat64(float64(d.GetInt64())) + case KindUint64: + ret.SetFloat64(float64(d.GetUint64())) + case KindFloat32, KindFloat64: + ret.SetFloat64(d.GetFloat64()) + case KindString, KindBytes: + f, err := StrToFloat(d.GetString()) + if err != nil { + return ret, errors.Trace(err) + } + ret.SetFloat64(f) + case KindMysqlTime: + f, _ := d.GetMysqlTime().ToNumber().Float64() + ret.SetFloat64(f) + case KindMysqlDuration: + f, _ := d.GetMysqlDuration().ToNumber().Float64() + ret.SetFloat64(f) + case KindMysqlDecimal: + f, _ := d.GetMysqlDecimal().Float64() + ret.SetFloat64(f) + case KindMysqlHex: + ret.SetFloat64(d.GetMysqlHex().ToNumber()) + case KindMysqlBit: + ret.SetFloat64(d.GetMysqlBit().ToNumber()) + case KindMysqlSet: + ret.SetFloat64(d.GetMysqlSet().ToNumber()) + case KindMysqlEnum: + ret.SetFloat64(d.GetMysqlEnum().ToNumber()) + default: + return invalidConv(d, target.Tp) + } + // For float and following double type, we will only truncate it for float(M, D) format. + // If no D is set, we will handle it like origin float whether M is set or not. + if target.Flen != UnspecifiedLength && target.Decimal != UnspecifiedLength { + x, err := TruncateFloat(ret.GetFloat64(), target.Flen, target.Decimal) + if err != nil { + return ret, errors.Trace(err) + } + if target.Tp == mysql.TypeFloat { + ret.SetFloat32(float32(x)) + } else { + ret.SetFloat64(x) + } + } + return ret, nil +} + +func (d *Datum) convertToString(target *FieldType) (Datum, error) { + var ret Datum + var s string + switch d.k { + case KindInt64: + s = strconv.FormatInt(d.GetInt64(), 10) + case KindUint64: + s = strconv.FormatUint(d.GetUint64(), 10) + case KindFloat32: + s = strconv.FormatFloat(d.GetFloat64(), 'f', -1, 32) + case KindFloat64: + s = strconv.FormatFloat(d.GetFloat64(), 'f', -1, 64) + case KindString, KindBytes: + s = d.GetString() + case KindMysqlTime: + s = d.GetMysqlTime().String() + case KindMysqlDuration: + s = d.GetMysqlDuration().String() + case KindMysqlDecimal: + s = d.GetMysqlDecimal().String() + case KindMysqlHex: + s = d.GetMysqlHex().ToString() + case KindMysqlBit: + s = d.GetMysqlBit().ToString() + case KindMysqlEnum: + s = d.GetMysqlEnum().String() + case KindMysqlSet: + s = d.GetMysqlSet().String() + default: + return invalidConv(d, target.Tp) + } + // TODO: consider target.Charset/Collate + s = truncateStr(s, target.Flen) + ret.SetString(s) + if target.Charset == charset.CharsetBin { + ret.k = KindBytes + } + return ret, nil +} + +func (d *Datum) convertToInt(target *FieldType) (Datum, error) { + tp := target.Tp + lowerBound := signedLowerBound[tp] + upperBound := signedUpperBound[tp] + var ( + val int64 + err error + ret Datum + ) + switch d.k { + case KindInt64: + val, err = convertIntToInt(d.GetInt64(), lowerBound, upperBound, tp) + case KindUint64: + val, err = convertUintToInt(d.GetUint64(), upperBound, tp) + case KindFloat32, KindFloat64: + val, err = convertFloatToInt(d.GetFloat64(), lowerBound, upperBound, tp) + case KindString, KindBytes: + fval, err1 := StrToFloat(d.GetString()) + if err1 != nil { + return ret, errors.Trace(err1) + } + val, err = convertFloatToInt(fval, lowerBound, upperBound, tp) + case KindMysqlTime: + val = d.GetMysqlTime().ToNumber().Round(0).IntPart() + val, err = convertIntToInt(val, lowerBound, upperBound, tp) + case KindMysqlDuration: + val = d.GetMysqlDuration().ToNumber().Round(0).IntPart() + val, err = convertIntToInt(val, lowerBound, upperBound, tp) + case KindMysqlDecimal: + fval, _ := d.GetMysqlDecimal().Float64() + val, err = convertFloatToInt(fval, lowerBound, upperBound, tp) + case KindMysqlHex: + val, err = convertFloatToInt(d.GetMysqlHex().ToNumber(), lowerBound, upperBound, tp) + case KindMysqlBit: + val, err = convertFloatToInt(d.GetMysqlBit().ToNumber(), lowerBound, upperBound, tp) + case KindMysqlEnum: + val, err = convertFloatToInt(d.GetMysqlEnum().ToNumber(), lowerBound, upperBound, tp) + case KindMysqlSet: + val, err = convertFloatToInt(d.GetMysqlSet().ToNumber(), lowerBound, upperBound, tp) + default: + return invalidConv(d, target.Tp) + } + ret.SetInt64(val) + if err != nil { + return ret, errors.Trace(err) + } + return ret, nil +} + +func (d *Datum) convertToUint(target *FieldType) (Datum, error) { + tp := target.Tp + upperBound := unsignedUpperBound[tp] + var ( + val uint64 + err error + ret Datum + ) + switch d.k { + case KindInt64: + val, err = convertIntToUint(d.GetInt64(), upperBound, tp) + case KindUint64: + val, err = convertUintToUint(d.GetUint64(), upperBound, tp) + case KindFloat32, KindFloat64: + val, err = convertFloatToUint(d.GetFloat64(), upperBound, tp) + case KindString, KindBytes: + fval, err1 := StrToFloat(d.GetString()) + if err1 != nil { + val, _ = convertFloatToUint(fval, upperBound, tp) + ret.SetUint64(val) + return ret, errors.Trace(err1) + } + val, err = convertFloatToUint(fval, upperBound, tp) + case KindMysqlTime: + ival := d.GetMysqlTime().ToNumber().Round(0).IntPart() + val, err = convertIntToUint(ival, upperBound, tp) + case KindMysqlDuration: + ival := d.GetMysqlDuration().ToNumber().Round(0).IntPart() + val, err = convertIntToUint(ival, upperBound, tp) + case KindMysqlDecimal: + fval, _ := d.GetMysqlDecimal().Float64() + val, err = convertFloatToUint(fval, upperBound, tp) + case KindMysqlHex: + val, err = convertFloatToUint(d.GetMysqlHex().ToNumber(), upperBound, tp) + case KindMysqlBit: + val, err = convertFloatToUint(d.GetMysqlBit().ToNumber(), upperBound, tp) + case KindMysqlEnum: + val, err = convertFloatToUint(d.GetMysqlEnum().ToNumber(), upperBound, tp) + case KindMysqlSet: + val, err = convertFloatToUint(d.GetMysqlSet().ToNumber(), upperBound, tp) + default: + return invalidConv(d, target.Tp) + } + ret.SetUint64(val) + if err != nil { + return ret, errors.Trace(err) + } + return ret, nil +} + +func (d *Datum) convertToMysqlTime(target *FieldType) (Datum, error) { + tp := target.Tp + fsp := mysql.DefaultFsp + if target.Decimal != UnspecifiedLength { + fsp = target.Decimal + } + var ret Datum + switch d.k { + case KindMysqlTime: + t, err := d.GetMysqlTime().Convert(tp) + if err != nil { + ret.SetValue(t) + return ret, errors.Trace(err) + } + t, err = t.RoundFrac(fsp) + ret.SetValue(t) + if err != nil { + return ret, errors.Trace(err) + } + case KindMysqlDuration: + t, err := d.GetMysqlDuration().ConvertToTime(tp) + if err != nil { + ret.SetValue(t) + return ret, errors.Trace(err) + } + t, err = t.RoundFrac(fsp) + ret.SetValue(t) + if err != nil { + return ret, errors.Trace(err) + } + case KindString, KindBytes: + t, err := mysql.ParseTime(d.GetString(), tp, fsp) + ret.SetValue(t) + if err != nil { + return ret, errors.Trace(err) + } + case KindInt64: + t, err := mysql.ParseTimeFromNum(d.GetInt64(), tp, fsp) + ret.SetValue(t) + if err != nil { + return ret, errors.Trace(err) + } + default: + return invalidConv(d, tp) + } + return ret, nil +} + +func (d *Datum) convertToMysqlDuration(target *FieldType) (Datum, error) { + tp := target.Tp + fsp := mysql.DefaultFsp + if target.Decimal != UnspecifiedLength { + fsp = target.Decimal + } + var ret Datum + switch d.k { + case KindMysqlTime: + dur, err := d.GetMysqlTime().ConvertToDuration() + if err != nil { + ret.SetValue(dur) + return ret, errors.Trace(err) + } + dur, err = dur.RoundFrac(fsp) + ret.SetValue(dur) + if err != nil { + return ret, errors.Trace(err) + } + case KindMysqlDuration: + dur, err := d.GetMysqlDuration().RoundFrac(fsp) + ret.SetValue(dur) + if err != nil { + return ret, errors.Trace(err) + } + case KindString, KindBytes: + t, err := mysql.ParseDuration(d.GetString(), fsp) + ret.SetValue(t) + if err != nil { + return ret, errors.Trace(err) + } + default: + return invalidConv(d, tp) + } + return ret, nil +} + +func (d *Datum) convertToMysqlDecimal(target *FieldType) (Datum, error) { + var ret Datum + var dec mysql.Decimal + switch d.k { + case KindInt64: + dec = mysql.NewDecimalFromInt(d.GetInt64(), 0) + case KindUint64: + dec = mysql.NewDecimalFromUint(d.GetUint64(), 0) + case KindFloat32, KindFloat64: + dec = mysql.NewDecimalFromFloat(d.GetFloat64()) + case KindString, KindBytes: + var err error + dec, err = mysql.ParseDecimal(d.GetString()) + if err != nil { + return ret, errors.Trace(err) + } + case KindMysqlDecimal: + dec = d.GetMysqlDecimal() + case KindMysqlTime: + dec = d.GetMysqlTime().ToNumber() + case KindMysqlDuration: + dec = d.GetMysqlDuration().ToNumber() + case KindMysqlBit: + dec = mysql.NewDecimalFromFloat(d.GetMysqlBit().ToNumber()) + case KindMysqlEnum: + dec = mysql.NewDecimalFromFloat(d.GetMysqlEnum().ToNumber()) + case KindMysqlHex: + dec = mysql.NewDecimalFromFloat(d.GetMysqlHex().ToNumber()) + case KindMysqlSet: + dec = mysql.NewDecimalFromFloat(d.GetMysqlSet().ToNumber()) + default: + return invalidConv(d, target.Tp) + } + if target.Decimal != UnspecifiedLength { + dec = dec.Round(int32(target.Decimal)) + } + ret.SetValue(dec) + return ret, nil +} + +func (d *Datum) convertToMysqlYear(target *FieldType) (Datum, error) { + var ( + ret Datum + y int64 + err error + ) + switch d.k { + case KindString, KindBytes: + y, err = StrToInt(d.GetString()) + case KindMysqlTime: + y = int64(d.GetMysqlTime().Year()) + case KindMysqlDuration: + y = int64(time.Now().Year()) + default: + ret, err = d.convertToInt(NewFieldType(mysql.TypeLonglong)) + if err != nil { + return invalidConv(d, target.Tp) + } + y = ret.GetInt64() + } + y, err = mysql.AdjustYear(y) + if err != nil { + return invalidConv(d, target.Tp) + } + ret.SetInt64(y) + return ret, nil +} + +func (d *Datum) convertToMysqlBit(target *FieldType) (Datum, error) { + x, err := d.convertToUint(target) + if err != nil { + return x, errors.Trace(err) + } + // check bit boundary, if bit has n width, the boundary is + // in [0, (1 << n) - 1] + width := target.Flen + if width == 0 || width == mysql.UnspecifiedBitWidth { + width = mysql.MinBitWidth + } + maxValue := uint64(1)< maxValue { + x.SetUint64(maxValue) + return x, overflow(val, target.Tp) + } + var ret Datum + ret.SetValue(mysql.Bit{Value: val, Width: width}) + return ret, nil +} + +func (d *Datum) convertToMysqlEnum(target *FieldType) (Datum, error) { + var ( + ret Datum + e mysql.Enum + err error + ) + switch d.k { + case KindString, KindBytes: + e, err = mysql.ParseEnumName(target.Elems, d.GetString()) + default: + var uintDatum Datum + uintDatum, err = d.convertToUint(target) + if err != nil { + return ret, errors.Trace(err) + } + e, err = mysql.ParseEnumValue(target.Elems, uintDatum.GetUint64()) + } + if err != nil { + return invalidConv(d, target.Tp) + } + ret.SetValue(e) + return ret, nil +} + +func (d *Datum) convertToMysqlSet(target *FieldType) (Datum, error) { + var ( + ret Datum + s mysql.Set + err error + ) + switch d.k { + case KindString, KindBytes: + s, err = mysql.ParseSetName(target.Elems, d.GetString()) + default: + var uintDatum Datum + uintDatum, err = d.convertToUint(target) + if err != nil { + return ret, errors.Trace(err) + } + s, err = mysql.ParseSetValue(target.Elems, uintDatum.GetUint64()) + } + + if err != nil { + return invalidConv(d, target.Tp) + } + ret.SetValue(s) + return ret, nil +} + +// ToBool converts to a bool. +// We will use 1 for true, and 0 for false. +func (d *Datum) ToBool() (int64, error) { + isZero := false + switch d.Kind() { + case KindInt64: + isZero = (d.GetInt64() == 0) + case KindUint64: + isZero = (d.GetUint64() == 0) + case KindFloat32: + isZero = (d.GetFloat32() == 0) + case KindFloat64: + isZero = (d.GetFloat64() == 0) + case KindString: + s := d.GetString() + if len(s) == 0 { + isZero = true + } + n, err := StrToInt(s) + if err != nil { + return 0, err + } + isZero = (n == 0) + case KindBytes: + bs := d.GetBytes() + if len(bs) == 0 { + isZero = true + } else { + n, err := StrToInt(string(bs)) + if err != nil { + return 0, err + } + isZero = (n == 0) + } + case KindMysqlTime: + isZero = d.GetMysqlTime().IsZero() + case KindMysqlDuration: + isZero = (d.GetMysqlDuration().Duration == 0) + case KindMysqlDecimal: + v, _ := d.GetMysqlDecimal().Float64() + isZero = (v == 0) + case KindMysqlHex: + isZero = (d.GetMysqlHex().ToNumber() == 0) + case KindMysqlBit: + isZero = (d.GetMysqlBit().ToNumber() == 0) + case KindMysqlEnum: + isZero = (d.GetMysqlEnum().ToNumber() == 0) + case KindMysqlSet: + isZero = (d.GetMysqlSet().ToNumber() == 0) + default: + return 0, errors.Errorf("cannot convert %v(type %T) to bool", d.GetValue(), d.GetValue()) + } + if isZero { + return 0, nil + } + return 1, nil +} + +// ToInt64 converts to a int64. +func (d *Datum) ToInt64() (int64, error) { + tp := mysql.TypeLonglong + lowerBound := signedLowerBound[tp] + upperBound := signedUpperBound[tp] + switch d.Kind() { + case KindInt64: + return convertIntToInt(d.GetInt64(), lowerBound, upperBound, tp) + case KindUint64: + return convertUintToInt(d.GetUint64(), upperBound, tp) + case KindFloat32: + return convertFloatToInt(float64(d.GetFloat32()), lowerBound, upperBound, tp) + case KindFloat64: + return convertFloatToInt(d.GetFloat64(), lowerBound, upperBound, tp) + case KindString: + s := d.GetString() + fval, err := StrToFloat(s) + if err != nil { + return 0, errors.Trace(err) + } + return convertFloatToInt(fval, lowerBound, upperBound, tp) + case KindBytes: + s := string(d.GetBytes()) + fval, err := StrToFloat(s) + if err != nil { + return 0, errors.Trace(err) + } + return convertFloatToInt(fval, lowerBound, upperBound, tp) + case KindMysqlTime: + // 2011-11-10 11:11:11.999999 -> 20111110111112 + ival := d.GetMysqlTime().ToNumber().Round(0).IntPart() + return convertIntToInt(ival, lowerBound, upperBound, tp) + case KindMysqlDuration: + // 11:11:11.999999 -> 111112 + ival := d.GetMysqlDuration().ToNumber().Round(0).IntPart() + return convertIntToInt(ival, lowerBound, upperBound, tp) + case KindMysqlDecimal: + fval, _ := d.GetMysqlDecimal().Float64() + return convertFloatToInt(fval, lowerBound, upperBound, tp) + case KindMysqlHex: + fval := d.GetMysqlHex().ToNumber() + return convertFloatToInt(fval, lowerBound, upperBound, tp) + case KindMysqlBit: + fval := d.GetMysqlBit().ToNumber() + return convertFloatToInt(fval, lowerBound, upperBound, tp) + case KindMysqlEnum: + fval := d.GetMysqlEnum().ToNumber() + return convertFloatToInt(fval, lowerBound, upperBound, tp) + case KindMysqlSet: + fval := d.GetMysqlSet().ToNumber() + return convertFloatToInt(fval, lowerBound, upperBound, tp) + default: + return 0, errors.Errorf("cannot convert %v(type %T) to int64", d.GetValue(), d.GetValue()) + } +} + +// ToFloat64 converts to a float64 +func (d *Datum) ToFloat64() (float64, error) { + switch d.Kind() { + case KindInt64: + return float64(d.GetInt64()), nil + case KindUint64: + return float64(d.GetUint64()), nil + case KindFloat32: + return float64(d.GetFloat32()), nil + case KindFloat64: + return d.GetFloat64(), nil + case KindString: + return StrToFloat(d.GetString()) + case KindBytes: + return StrToFloat(string(d.GetBytes())) + case KindMysqlTime: + f, _ := d.GetMysqlTime().ToNumber().Float64() + return f, nil + case KindMysqlDuration: + f, _ := d.GetMysqlDuration().ToNumber().Float64() + return f, nil + case KindMysqlDecimal: + f, _ := d.GetMysqlDecimal().Float64() + return f, nil + case KindMysqlHex: + return d.GetMysqlHex().ToNumber(), nil + case KindMysqlBit: + return d.GetMysqlBit().ToNumber(), nil + case KindMysqlEnum: + return d.GetMysqlEnum().ToNumber(), nil + case KindMysqlSet: + return d.GetMysqlSet().ToNumber(), nil + default: + return 0, errors.Errorf("cannot convert %v(type %T) to float64", d.GetValue(), d.GetValue()) + } +} + +// ToString gets the string representation of the datum. +func (d *Datum) ToString() (string, error) { + switch d.Kind() { + case KindInt64: + return strconv.FormatInt(d.GetInt64(), 10), nil + case KindUint64: + return strconv.FormatUint(d.GetUint64(), 10), nil + case KindFloat32: + return strconv.FormatFloat(float64(d.GetFloat32()), 'f', -1, 32), nil + case KindFloat64: + return strconv.FormatFloat(float64(d.GetFloat64()), 'f', -1, 64), nil + case KindString: + return d.GetString(), nil + case KindBytes: + return d.GetString(), nil + case KindMysqlTime: + return d.GetMysqlTime().String(), nil + case KindMysqlDuration: + return d.GetMysqlDuration().String(), nil + case KindMysqlDecimal: + return d.GetMysqlDecimal().String(), nil + case KindMysqlHex: + return d.GetMysqlHex().ToString(), nil + case KindMysqlBit: + return d.GetMysqlBit().ToString(), nil + case KindMysqlEnum: + return d.GetMysqlEnum().String(), nil + case KindMysqlSet: + return d.GetMysqlSet().String(), nil + default: + return "", errors.Errorf("cannot convert %v(type %T) to string", d.GetValue(), d.GetValue()) + } +} + +func invalidConv(d *Datum, tp byte) (Datum, error) { + return Datum{}, errors.Errorf("cannot convert %v to type %s", d, TypeStr(tp)) +} + +// NewDatum creates a new Datum from an interface{}. +func NewDatum(in interface{}) (d Datum) { + switch x := in.(type) { + case []interface{}: + d.SetValue(MakeDatums(x...)) + default: + d.SetValue(in) + } + return d +} + +// MakeDatums creates datum slice from interfaces. +func MakeDatums(args ...interface{}) []Datum { + datums := make([]Datum, len(args)) + for i, v := range args { + datums[i] = NewDatum(v) + } + return datums +} + +// DatumsToInterfaces converts a datum slice to interface slice. +func DatumsToInterfaces(datums []Datum) []interface{} { + ins := make([]interface{}, len(datums)) + for i, v := range datums { + ins[i] = v.GetValue() + } + return ins +} + +// MinNotNullDatum returns a datum represents minimum not null value. +func MinNotNullDatum() Datum { + return Datum{k: KindMinNotNull} +} + +// MaxValueDatum returns a datum represents max value. +func MaxValueDatum() Datum { + return Datum{k: KindMaxValue} +} diff --git a/vendor/github.com/pingcap/tidb/util/types/etc.go b/vendor/github.com/pingcap/tidb/util/types/etc.go new file mode 100644 index 000000000..c4b777228 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/types/etc.go @@ -0,0 +1,310 @@ +// Copyright 2014 The ql Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSES/QL-LICENSE file. + +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + "io" + "strings" + + "github.com/juju/errors" + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/parser/opcode" + "github.com/pingcap/tidb/terror" + "github.com/pingcap/tidb/util/charset" +) + +// IsTypeBlob returns a boolean indicating whether the tp is a blob type. +func IsTypeBlob(tp byte) bool { + switch tp { + case mysql.TypeTinyBlob, mysql.TypeMediumBlob, mysql.TypeBlob, mysql.TypeLongBlob: + return true + default: + return false + } +} + +// IsTypeChar returns a boolean indicating +// whether the tp is the char type like a string type or a varchar type. +func IsTypeChar(tp byte) bool { + switch tp { + case mysql.TypeString, mysql.TypeVarchar: + return true + default: + return false + } +} + +var type2Str = map[byte]string{ + mysql.TypeBit: "bit", + mysql.TypeBlob: "text", + mysql.TypeDate: "date", + mysql.TypeDatetime: "datetime", + mysql.TypeDecimal: "decimal", + mysql.TypeNewDecimal: "decimal", + mysql.TypeDouble: "double", + mysql.TypeEnum: "enum", + mysql.TypeFloat: "float", + mysql.TypeGeometry: "geometry", + mysql.TypeInt24: "mediumint", + mysql.TypeLong: "int", + mysql.TypeLonglong: "bigint", + mysql.TypeLongBlob: "longtext", + mysql.TypeMediumBlob: "mediumtext", + mysql.TypeNull: "null", + mysql.TypeSet: "set", + mysql.TypeShort: "smallint", + mysql.TypeString: "char", + mysql.TypeDuration: "time", + mysql.TypeTimestamp: "timestamp", + mysql.TypeTiny: "tinyint", + mysql.TypeTinyBlob: "tinytext", + mysql.TypeVarchar: "varchar", + mysql.TypeVarString: "var_string", + mysql.TypeYear: "year", +} + +// TypeStr converts tp to a string. +func TypeStr(tp byte) (r string) { + return type2Str[tp] +} + +// TypeToStr converts a field to a string. +// It is used for converting Text to Blob, +// or converting Char to Binary. +// Args: +// tp: type enum +// cs: charset +func TypeToStr(tp byte, cs string) (r string) { + ts := type2Str[tp] + if cs != charset.CharsetBin { + return ts + } + if IsTypeBlob(tp) { + ts = strings.Replace(ts, "text", "blob", 1) + } else if IsTypeChar(tp) { + ts = strings.Replace(ts, "char", "binary", 1) + } + return ts +} + +// EOFAsNil filtrates errors, +// If err is equal to io.EOF returns nil. +func EOFAsNil(err error) error { + if terror.ErrorEqual(err, io.EOF) { + return nil + } + return errors.Trace(err) +} + +// InvOp2 returns an invalid operation error. +func InvOp2(x, y interface{}, o opcode.Op) (interface{}, error) { + return nil, errors.Errorf("Invalid operation: %v %v %v (mismatched types %T and %T)", x, o, y, x, y) +} + +// UndOp returns an undefined error. +func UndOp(x interface{}, o opcode.Op) (interface{}, error) { + return nil, errors.Errorf("Invalid operation: %v%v (operator %v not defined on %T)", o, x, o, x) +} + +// Overflow returns an overflowed error. +func overflow(v interface{}, tp byte) error { + return errors.Errorf("constant %v overflows %s", v, TypeStr(tp)) +} + +// TODO: collate should return errors from Compare. +func collate(x, y []interface{}) (r int) { + nx, ny := len(x), len(y) + + switch { + case nx == 0 && ny != 0: + return -1 + case nx == 0 && ny == 0: + return 0 + case nx != 0 && ny == 0: + return 1 + } + + r = 1 + if nx > ny { + x, y, r = y, x, -r + } + + for i, xi := range x { + // TODO: we may remove collate later, so here just panic error. + c, err := Compare(xi, y[i]) + if err != nil { + panic(fmt.Sprintf("should never happend %v", err)) + } + + if c != 0 { + return c * r + } + } + + if nx == ny { + return 0 + } + + return -r +} + +// Collators maps a boolean value to a collated function. +var Collators = map[bool]func(a, b []interface{}) int{false: collateDesc, true: collate} + +func collateDesc(a, b []interface{}) int { + return -collate(a, b) +} + +// IsOrderedType returns a boolean +// whether the type of y can be used by order by. +func IsOrderedType(v interface{}) (r bool) { + switch v.(type) { + case int, int8, int16, int32, int64, + uint, uint8, uint16, uint32, uint64, + float32, float64, string, []byte, + mysql.Decimal, mysql.Time, mysql.Duration, + mysql.Hex, mysql.Bit, mysql.Enum, mysql.Set: + return true + } + return false +} + +// Clone copies an interface to another interface. +// It does a deep copy. +func Clone(from interface{}) (interface{}, error) { + if from == nil { + return nil, nil + } + switch x := from.(type) { + case uint8, uint16, uint32, uint64, float32, float64, + int16, int8, bool, string, int, int64, int32, + mysql.Time, mysql.Duration, mysql.Decimal, + mysql.Hex, mysql.Bit, mysql.Enum, mysql.Set: + return x, nil + case []byte: + target := make([]byte, len(from.([]byte))) + copy(target, from.([]byte)) + return target, nil + case []interface{}: + var r []interface{} + for _, v := range from.([]interface{}) { + vv, err := Clone(v) + if err != nil { + return nil, err + } + r = append(r, vv) + } + return r, nil + default: + return nil, errors.Errorf("Clone invalid type %T", from) + } +} + +func convergeType(a interface{}, hasDecimal, hasFloat *bool) (x interface{}) { + x = a + switch v := a.(type) { + case bool: + // treat bool as 1 and 0 + if v { + x = int64(1) + } else { + x = int64(0) + } + case int: + x = int64(v) + case int8: + x = int64(v) + case int16: + x = int64(v) + case int32: + x = int64(v) + case int64: + x = int64(v) + case uint: + x = uint64(v) + case uint8: + x = uint64(v) + case uint16: + x = uint64(v) + case uint32: + x = uint64(v) + case uint64: + x = uint64(v) + case float32: + x = float64(v) + *hasFloat = true + case float64: + x = float64(v) + *hasFloat = true + case mysql.Decimal: + x = v + *hasDecimal = true + } + return +} + +// Coerce changes type. +// If a or b is Decimal, changes the both to Decimal. +// Else if a or b is Float, changes the both to Float. +func Coerce(a, b interface{}) (x, y interface{}) { + var hasDecimal bool + var hasFloat bool + x = convergeType(a, &hasDecimal, &hasFloat) + y = convergeType(b, &hasDecimal, &hasFloat) + if hasDecimal { + d, err := mysql.ConvertToDecimal(x) + if err == nil { + x = d + } + d, err = mysql.ConvertToDecimal(y) + if err == nil { + y = d + } + } else if hasFloat { + switch v := x.(type) { + case int64: + x = float64(v) + case uint64: + x = float64(v) + case mysql.Hex: + x = v.ToNumber() + case mysql.Bit: + x = v.ToNumber() + case mysql.Enum: + x = v.ToNumber() + case mysql.Set: + x = v.ToNumber() + } + switch v := y.(type) { + case int64: + y = float64(v) + case uint64: + y = float64(v) + case mysql.Hex: + y = v.ToNumber() + case mysql.Bit: + y = v.ToNumber() + case mysql.Enum: + y = v.ToNumber() + case mysql.Set: + y = v.ToNumber() + } + } + return +} diff --git a/vendor/github.com/pingcap/tidb/util/types/field_type.go b/vendor/github.com/pingcap/tidb/util/types/field_type.go new file mode 100644 index 000000000..38da5f628 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/types/field_type.go @@ -0,0 +1,1045 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "fmt" + "strings" + + "github.com/pingcap/tidb/mysql" + "github.com/pingcap/tidb/util/charset" +) + +// UnspecifiedLength is unspecified length. +const ( + UnspecifiedLength int = -1 +) + +// FieldType records field type information. +type FieldType struct { + Tp byte + Flag uint + Flen int + Decimal int + Charset string + Collate string + // Elems is the element list for enum and set type. + Elems []string +} + +// NewFieldType returns a FieldType, +// with a type and other information about field type. +func NewFieldType(tp byte) *FieldType { + return &FieldType{ + Tp: tp, + Flen: UnspecifiedLength, + Decimal: UnspecifiedLength, + } +} + +// CompactStr only considers Tp/CharsetBin/Flen/Deimal. +// This is used for showing column type in infoschema. +func (ft *FieldType) CompactStr() string { + ts := TypeToStr(ft.Tp, ft.Charset) + suffix := "" + switch ft.Tp { + case mysql.TypeEnum, mysql.TypeSet: + // Format is ENUM ('e1', 'e2') or SET ('e1', 'e2') + es := make([]string, 0, len(ft.Elems)) + for _, e := range ft.Elems { + e = strings.Replace(e, "'", "''", -1) + es = append(es, e) + } + suffix = fmt.Sprintf("('%s')", strings.Join(es, "','")) + case mysql.TypeTimestamp, mysql.TypeDatetime, mysql.TypeDate: + if ft.Decimal != UnspecifiedLength && ft.Decimal != 0 { + suffix = fmt.Sprintf("(%d)", ft.Decimal) + } + default: + if ft.Flen != UnspecifiedLength { + if ft.Decimal == UnspecifiedLength { + if ft.Tp != mysql.TypeFloat && ft.Tp != mysql.TypeDouble { + suffix = fmt.Sprintf("(%d)", ft.Flen) + } + } else { + suffix = fmt.Sprintf("(%d,%d)", ft.Flen, ft.Decimal) + } + } else if ft.Decimal != UnspecifiedLength { + suffix = fmt.Sprintf("(%d)", ft.Decimal) + } + } + return ts + suffix +} + +// String joins the information of FieldType and +// returns a string. +func (ft *FieldType) String() string { + strs := []string{ft.CompactStr()} + if mysql.HasUnsignedFlag(ft.Flag) { + strs = append(strs, "UNSIGNED") + } + if mysql.HasZerofillFlag(ft.Flag) { + strs = append(strs, "ZEROFILL") + } + if mysql.HasBinaryFlag(ft.Flag) { + strs = append(strs, "BINARY") + } + + if IsTypeChar(ft.Tp) || IsTypeBlob(ft.Tp) { + if ft.Charset != "" && ft.Charset != charset.CharsetBin { + strs = append(strs, fmt.Sprintf("CHARACTER SET %s", ft.Charset)) + } + if ft.Collate != "" && ft.Collate != charset.CharsetBin { + strs = append(strs, fmt.Sprintf("COLLATE %s", ft.Collate)) + } + } + + return strings.Join(strs, " ") +} + +// DefaultTypeForValue returns the default FieldType for the value. +func DefaultTypeForValue(value interface{}) *FieldType { + var tp *FieldType + switch x := value.(type) { + case nil: + tp = NewFieldType(mysql.TypeNull) + case bool, int64, int: + tp = NewFieldType(mysql.TypeLonglong) + tp.Charset = charset.CharsetBin + tp.Collate = charset.CharsetBin + case uint64: + tp = NewFieldType(mysql.TypeLonglong) + tp.Flag |= mysql.UnsignedFlag + tp.Charset = charset.CharsetBin + tp.Collate = charset.CharsetBin + case string: + tp = NewFieldType(mysql.TypeVarString) + tp.Charset = mysql.DefaultCharset + tp.Collate = mysql.DefaultCollationName + case float64: + tp = NewFieldType(mysql.TypeNewDecimal) + tp.Charset = charset.CharsetBin + tp.Collate = charset.CharsetBin + case []byte: + tp = NewFieldType(mysql.TypeBlob) + tp.Charset = charset.CharsetBin + tp.Collate = charset.CharsetBin + case mysql.Bit: + tp = NewFieldType(mysql.TypeBit) + tp.Charset = charset.CharsetBin + tp.Collate = charset.CharsetBin + case mysql.Hex: + tp = NewFieldType(mysql.TypeVarchar) + tp.Charset = charset.CharsetBin + tp.Collate = charset.CharsetBin + case mysql.Time: + tp = NewFieldType(x.Type) + tp.Charset = charset.CharsetBin + tp.Collate = charset.CharsetBin + case mysql.Duration: + tp = NewFieldType(mysql.TypeDuration) + tp.Charset = charset.CharsetBin + tp.Collate = charset.CharsetBin + case mysql.Decimal: + tp = NewFieldType(mysql.TypeNewDecimal) + tp.Charset = charset.CharsetBin + tp.Collate = charset.CharsetBin + case mysql.Enum: + tp = NewFieldType(mysql.TypeEnum) + tp.Charset = charset.CharsetBin + tp.Collate = charset.CharsetBin + case mysql.Set: + tp = NewFieldType(mysql.TypeSet) + tp.Charset = charset.CharsetBin + tp.Collate = charset.CharsetBin + default: + tp = NewFieldType(mysql.TypeDecimal) + } + return tp +} + +// DefaultCharsetForType returns the default charset/collation for mysql type. +func DefaultCharsetForType(tp byte) (string, string) { + switch tp { + case mysql.TypeVarString, mysql.TypeString, mysql.TypeVarchar: + // Default charset for string types is utf8. + return mysql.DefaultCharset, mysql.DefaultCollationName + } + return charset.CharsetBin, charset.CollationBin +} + +// MergeFieldType merges two MySQL type to a new type. +// This is used in hybrid field type expression. +// For example "select case c when 1 then 2 when 2 then 'tidb' from t;" +// The resule field type of the case expression is the merged type of the two when clause. +// See: https://github.com/mysql/mysql-server/blob/5.7/sql/field.cc#L1042 +func MergeFieldType(a byte, b byte) byte { + ia := getFieldTypeIndex(a) + ib := getFieldTypeIndex(b) + return fieldTypeMergeRules[ia][ib] +} + +func getFieldTypeIndex(tp byte) int { + itp := int(tp) + if itp < fieldTypeTearFrom { + return itp + } + return fieldTypeTearFrom + itp - fieldTypeTearTo - 1 +} + +const ( + fieldTypeTearFrom = int(mysql.TypeBit) + 1 + fieldTypeTearTo = int(mysql.TypeNewDecimal) - 1 + fieldTypeNum = fieldTypeTearFrom + (255 - fieldTypeTearTo) +) + +var fieldTypeMergeRules = [fieldTypeNum][fieldTypeNum]byte{ + /* mysql.TypeDecimal -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeNewDecimal, mysql.TypeNewDecimal, + //mysql.TypeShort mysql.TypeLong + mysql.TypeNewDecimal, mysql.TypeNewDecimal, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeDouble, mysql.TypeDouble, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeNewDecimal, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeDecimal, mysql.TypeDecimal, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeNewDecimal, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeTiny -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeNewDecimal, mysql.TypeTiny, + //mysql.TypeShort mysql.TypeLong + mysql.TypeShort, mysql.TypeLong, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeFloat, mysql.TypeDouble, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeTiny, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeLonglong, mysql.TypeInt24, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeTiny, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeNewDecimal, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeShort -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeNewDecimal, mysql.TypeShort, + //mysql.TypeShort mysql.TypeLong + mysql.TypeShort, mysql.TypeLong, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeFloat, mysql.TypeDouble, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeShort, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeLonglong, mysql.TypeInt24, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeShort, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeNewDecimal, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeLong -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeNewDecimal, mysql.TypeLong, + //mysql.TypeShort mysql.TypeLong + mysql.TypeLong, mysql.TypeLong, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeDouble, mysql.TypeDouble, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeLong, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeLonglong, mysql.TypeLong, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeLong, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeNewDecimal, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeFloat -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeDouble, mysql.TypeFloat, + //mysql.TypeShort mysql.TypeLong + mysql.TypeFloat, mysql.TypeDouble, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeFloat, mysql.TypeDouble, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeFloat, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeFloat, mysql.TypeFloat, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeFloat, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeDouble, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeDouble -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeDouble, mysql.TypeDouble, + //mysql.TypeShort mysql.TypeLong + mysql.TypeDouble, mysql.TypeDouble, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeDouble, mysql.TypeDouble, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeDouble, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeDouble, mysql.TypeDouble, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeDouble, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeDouble, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeNull -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeNewDecimal, mysql.TypeTiny, + //mysql.TypeShort mysql.TypeLong + mysql.TypeShort, mysql.TypeLong, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeFloat, mysql.TypeDouble, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeNull, mysql.TypeTimestamp, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeLonglong, mysql.TypeLonglong, + //mysql.TypeDate mysql.TypeTime + mysql.TypeNewDate, mysql.TypeDuration, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeDatetime, mysql.TypeYear, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeNewDate, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeBit, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeNewDecimal, mysql.TypeEnum, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeSet, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeGeometry, + }, + /* mysql.TypeTimestamp -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeShort mysql.TypeLong + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeTimestamp, mysql.TypeTimestamp, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDate mysql.TypeTime + mysql.TypeDatetime, mysql.TypeDatetime, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeDatetime, mysql.TypeVarchar, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeNewDate, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeLonglong -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeNewDecimal, mysql.TypeLonglong, + //mysql.TypeShort mysql.TypeLong + mysql.TypeLonglong, mysql.TypeLonglong, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeDouble, mysql.TypeDouble, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeLonglong, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeLonglong, mysql.TypeLong, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeLonglong, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeNewDate, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeNewDecimal, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeInt24 -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeNewDecimal, mysql.TypeInt24, + //mysql.TypeShort mysql.TypeLong + mysql.TypeInt24, mysql.TypeLong, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeFloat, mysql.TypeDouble, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeInt24, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeLonglong, mysql.TypeInt24, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeInt24, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeNewDate, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeNewDecimal, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeDate -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeShort mysql.TypeLong + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeNewDate, mysql.TypeDatetime, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDate mysql.TypeTime + mysql.TypeNewDate, mysql.TypeDatetime, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeDatetime, mysql.TypeVarchar, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeNewDate, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeTime -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeShort mysql.TypeLong + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeDuration, mysql.TypeDatetime, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDate mysql.TypeTime + mysql.TypeDatetime, mysql.TypeDuration, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeDatetime, mysql.TypeVarchar, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeNewDate, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeDatetime -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeShort mysql.TypeLong + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeDatetime, mysql.TypeDatetime, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDate mysql.TypeTime + mysql.TypeDatetime, mysql.TypeDatetime, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeDatetime, mysql.TypeVarchar, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeNewDate, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeYear -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeDecimal, mysql.TypeTiny, + //mysql.TypeShort mysql.TypeLong + mysql.TypeShort, mysql.TypeLong, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeFloat, mysql.TypeDouble, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeYear, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeLonglong, mysql.TypeInt24, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeYear, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeNewDecimal, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeNewDate -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeShort mysql.TypeLong + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeNewDate, mysql.TypeDatetime, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDate mysql.TypeTime + mysql.TypeNewDate, mysql.TypeDatetime, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeDatetime, mysql.TypeVarchar, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeNewDate, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeVarchar -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeShort mysql.TypeLong + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeVarchar, mysql.TypeVarchar, + }, + /* mysql.TypeBit -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeShort mysql.TypeLong + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeBit, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeBit, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeNewDecimal -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeNewDecimal, mysql.TypeNewDecimal, + //mysql.TypeShort mysql.TypeLong + mysql.TypeNewDecimal, mysql.TypeNewDecimal, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeDouble, mysql.TypeDouble, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeNewDecimal, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeNewDecimal, mysql.TypeNewDecimal, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeNewDecimal, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeNewDecimal, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeEnum -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeShort mysql.TypeLong + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeEnum, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeSet -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeShort mysql.TypeLong + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeSet, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeVarchar, + }, + /* mysql.TypeTinyBlob -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeTinyBlob, mysql.TypeTinyBlob, + //mysql.TypeShort mysql.TypeLong + mysql.TypeTinyBlob, mysql.TypeTinyBlob, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeTinyBlob, mysql.TypeTinyBlob, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeTinyBlob, mysql.TypeTinyBlob, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeTinyBlob, mysql.TypeTinyBlob, + //mysql.TypeDate mysql.TypeTime + mysql.TypeTinyBlob, mysql.TypeTinyBlob, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeTinyBlob, mysql.TypeTinyBlob, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeTinyBlob, mysql.TypeTinyBlob, + //mysql.TypeBit <16>-<245> + mysql.TypeTinyBlob, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeTinyBlob, mysql.TypeTinyBlob, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeTinyBlob, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeTinyBlob, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeTinyBlob, mysql.TypeTinyBlob, + }, + /* mysql.TypeMediumBlob -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeMediumBlob, mysql.TypeMediumBlob, + //mysql.TypeShort mysql.TypeLong + mysql.TypeMediumBlob, mysql.TypeMediumBlob, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeMediumBlob, mysql.TypeMediumBlob, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeMediumBlob, mysql.TypeMediumBlob, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeMediumBlob, mysql.TypeMediumBlob, + //mysql.TypeDate mysql.TypeTime + mysql.TypeMediumBlob, mysql.TypeMediumBlob, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeMediumBlob, mysql.TypeMediumBlob, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeMediumBlob, mysql.TypeMediumBlob, + //mysql.TypeBit <16>-<245> + mysql.TypeMediumBlob, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeMediumBlob, mysql.TypeMediumBlob, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeMediumBlob, mysql.TypeMediumBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeMediumBlob, mysql.TypeMediumBlob, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeMediumBlob, mysql.TypeMediumBlob, + }, + /* mysql.TypeLongBlob -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeLongBlob, mysql.TypeLongBlob, + //mysql.TypeShort mysql.TypeLong + mysql.TypeLongBlob, mysql.TypeLongBlob, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeLongBlob, mysql.TypeLongBlob, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeLongBlob, mysql.TypeLongBlob, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeLongBlob, mysql.TypeLongBlob, + //mysql.TypeDate mysql.TypeTime + mysql.TypeLongBlob, mysql.TypeLongBlob, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeLongBlob, mysql.TypeLongBlob, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeLongBlob, mysql.TypeLongBlob, + //mysql.TypeBit <16>-<245> + mysql.TypeLongBlob, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeLongBlob, mysql.TypeLongBlob, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeLongBlob, mysql.TypeLongBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeLongBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeLongBlob, mysql.TypeLongBlob, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeLongBlob, mysql.TypeLongBlob, + }, + /* mysql.TypeBlob -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeBlob, mysql.TypeBlob, + //mysql.TypeShort mysql.TypeLong + mysql.TypeBlob, mysql.TypeBlob, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeBlob, mysql.TypeBlob, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeBlob, mysql.TypeBlob, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeBlob, mysql.TypeBlob, + //mysql.TypeDate mysql.TypeTime + mysql.TypeBlob, mysql.TypeBlob, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeBlob, mysql.TypeBlob, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeBlob, mysql.TypeBlob, + //mysql.TypeBit <16>-<245> + mysql.TypeBlob, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeBlob, mysql.TypeBlob, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeBlob, mysql.TypeBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeBlob, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeBlob, mysql.TypeBlob, + }, + /* mysql.TypeVarString -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeShort mysql.TypeLong + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeVarchar, mysql.TypeVarchar, + }, + /* mysql.TypeString -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeString, mysql.TypeString, + //mysql.TypeShort mysql.TypeLong + mysql.TypeString, mysql.TypeString, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeString, mysql.TypeString, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeString, mysql.TypeString, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeString, mysql.TypeString, + //mysql.TypeDate mysql.TypeTime + mysql.TypeString, mysql.TypeString, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeString, mysql.TypeString, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeString, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeString, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeString, mysql.TypeString, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeString, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeString, + }, + /* mysql.TypeGeometry -> */ + { + //mysql.TypeDecimal mysql.TypeTiny + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeShort mysql.TypeLong + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeFloat mysql.TypeDouble + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNull mysql.TypeTimestamp + mysql.TypeGeometry, mysql.TypeVarchar, + //mysql.TypeLonglong mysql.TypeInt24 + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDate mysql.TypeTime + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeDatetime mysql.TypeYear + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeNewDate mysql.TypeVarchar + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeBit <16>-<245> + mysql.TypeVarchar, + //mysql.TypeNewDecimal mysql.TypeEnum + mysql.TypeVarchar, mysql.TypeVarchar, + //mysql.TypeSet mysql.TypeTinyBlob + mysql.TypeVarchar, mysql.TypeTinyBlob, + //mysql.TypeMediumBlob mysql.TypeLongBlob + mysql.TypeMediumBlob, mysql.TypeLongBlob, + //mysql.TypeBlob mysql.TypeVarString + mysql.TypeBlob, mysql.TypeVarchar, + //mysql.TypeString mysql.TypeGeometry + mysql.TypeString, mysql.TypeGeometry, + }, +} diff --git a/vendor/github.com/pingcap/tidb/util/types/helper.go b/vendor/github.com/pingcap/tidb/util/types/helper.go new file mode 100644 index 000000000..182cffcb7 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/types/helper.go @@ -0,0 +1,111 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "math" + + "github.com/juju/errors" + "github.com/pingcap/tidb/mysql" +) + +// RoundFloat rounds float val to the nearest integer value with float64 format, like GNU rint function. +// RoundFloat uses default rounding mode, see http://www.gnu.org/software/libc/manual/html_node/Rounding.html +// so we will choose the even number if the result is midway between two representable value. +// e.g, 1.5 -> 2, 2.5 -> 2. +func RoundFloat(f float64) float64 { + if math.Remainder(f, 1.0) < 0 { + return math.Ceil(f) + } + return math.Floor(f) +} + +func getMaxFloat(flen int, decimal int) float64 { + intPartLen := flen - decimal + f := math.Pow10(intPartLen) + f -= math.Pow10(-decimal) + return f +} + +func truncateFloat(f float64, decimal int) float64 { + pow := math.Pow10(decimal) + t := (f - math.Floor(f)) * pow + + round := RoundFloat(t) + + f = math.Floor(f) + round/pow + return f +} + +// TruncateFloat tries to truncate f. +// If the result exceeds the max/min float that flen/decimal allowed, returns the max/min float allowed. +func TruncateFloat(f float64, flen int, decimal int) (float64, error) { + if math.IsNaN(f) { + // nan returns 0 + return 0, nil + } + + maxF := getMaxFloat(flen, decimal) + + if !math.IsInf(f, 0) { + f = truncateFloat(f, decimal) + } + + if f > maxF { + f = maxF + } else if f < -maxF { + f = -maxF + } + + return f, nil +} + +// CalculateSum adds v to sum. +func CalculateSum(sum interface{}, v interface{}) (interface{}, error) { + // for avg and sum calculation + // avg and sum use decimal for integer and decimal type, use float for others + // see https://dev.mysql.com/doc/refman/5.7/en/group-by-functions.html + var ( + data interface{} + err error + ) + + switch y := v.(type) { + case int, uint, int8, uint8, int16, uint16, int32, uint32, int64, uint64: + data, err = mysql.ConvertToDecimal(v) + case mysql.Decimal: + data = y + case nil: + data = nil + default: + data, err = ToFloat64(v) + } + + if err != nil { + return nil, errors.Trace(err) + } + if data == nil { + return sum, nil + } + switch x := sum.(type) { + case nil: + return data, nil + case float64: + return x + data.(float64), nil + case mysql.Decimal: + return x.Add(data.(mysql.Decimal)), nil + default: + return nil, errors.Errorf("invalid value %v(%T) for aggregate", x, x) + } +} diff --git a/vendor/github.com/pingcap/tidb/util/types/overflow.go b/vendor/github.com/pingcap/tidb/util/types/overflow.go new file mode 100644 index 000000000..9a56e7166 --- /dev/null +++ b/vendor/github.com/pingcap/tidb/util/types/overflow.go @@ -0,0 +1,191 @@ +// Copyright 2015 PingCAP, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// See the License for the specific language governing permissions and +// limitations under the License. + +package types + +import ( + "math" + + "github.com/juju/errors" +) + +// ErrArithOverflow is the error for arthimetic operation overflow. +var ErrArithOverflow = errors.New("operation overflow") + +// AddUint64 adds uint64 a and b if no overflow, else returns error. +func AddUint64(a uint64, b uint64) (uint64, error) { + if math.MaxUint64-a < b { + return 0, errors.Trace(ErrArithOverflow) + } + return a + b, nil +} + +// AddInt64 adds int64 a and b if no overflow, otherwise returns error. +func AddInt64(a int64, b int64) (int64, error) { + if (a > 0 && b > 0 && math.MaxInt64-a < b) || + (a < 0 && b < 0 && math.MinInt64-a > b) { + return 0, errors.Trace(ErrArithOverflow) + } + + return a + b, nil +} + +// AddInteger adds uint64 a and int64 b and returns uint64 if no overflow error. +func AddInteger(a uint64, b int64) (uint64, error) { + if b >= 0 { + return AddUint64(a, uint64(b)) + } + + if uint64(-b) > a { + return 0, errors.Trace(ErrArithOverflow) + } + return a - uint64(-b), nil +} + +// SubUint64 substracts uint64 a with b and returns uint64 if no overflow error. +func SubUint64(a uint64, b uint64) (uint64, error) { + if a < b { + return 0, errors.Trace(ErrArithOverflow) + } + return a - b, nil +} + +// SubInt64 substracts int64 a with b and returns int64 if no overflow error. +func SubInt64(a int64, b int64) (int64, error) { + if (a > 0 && b < 0 && math.MaxInt64-a < -b) || + (a < 0 && b > 0 && math.MinInt64-a > -b) || + (a == 0 && b == math.MinInt64) { + return 0, errors.Trace(ErrArithOverflow) + } + return a - b, nil +} + +// SubUintWithInt substracts uint64 a with int64 b and returns uint64 if no overflow error. +func SubUintWithInt(a uint64, b int64) (uint64, error) { + if b < 0 { + return AddUint64(a, uint64(-b)) + } + return SubUint64(a, uint64(b)) +} + +// SubIntWithUint substracts int64 a with uint64 b and returns uint64 if no overflow error. +func SubIntWithUint(a int64, b uint64) (uint64, error) { + if a < 0 || uint64(a) < b { + return 0, errors.Trace(ErrArithOverflow) + } + return uint64(a) - b, nil +} + +// MulUint64 multiplies uint64 a and b and returns uint64 if no overflow error. +func MulUint64(a uint64, b uint64) (uint64, error) { + if b > 0 && a > math.MaxUint64/b { + return 0, errors.Trace(ErrArithOverflow) + } + return a * b, nil +} + +// MulInt64 multiplies int64 a and b and returns int64 if no overflow error. +func MulInt64(a int64, b int64) (int64, error) { + if a == 0 || b == 0 { + return 0, nil + } + + var ( + res uint64 + err error + negative = false + ) + + if a > 0 && b > 0 { + res, err = MulUint64(uint64(a), uint64(b)) + } else if a < 0 && b < 0 { + res, err = MulUint64(uint64(-a), uint64(-b)) + } else if a < 0 && b > 0 { + negative = true + res, err = MulUint64(uint64(-a), uint64(b)) + } else { + negative = true + res, err = MulUint64(uint64(a), uint64(-b)) + } + + if err != nil { + return 0, errors.Trace(err) + } + + if negative { + // negative result + if res > math.MaxInt64+1 { + return 0, errors.Trace(ErrArithOverflow) + } + + return -int64(res), nil + } + + // positive result + if res > math.MaxInt64 { + return 0, errors.Trace(ErrArithOverflow) + } + + return int64(res), nil +} + +// MulInteger multiplies uint64 a and int64 b, and returns uint64 if no overflow error. +func MulInteger(a uint64, b int64) (uint64, error) { + if a == 0 || b == 0 { + return 0, nil + } + + if b < 0 { + return 0, errors.Trace(ErrArithOverflow) + } + + return MulUint64(a, uint64(b)) +} + +// DivInt64 divides int64 a with b, returns int64 if no overflow error. +// It just checks overflow, if b is zero, a "divide by zero" panic throws. +func DivInt64(a int64, b int64) (int64, error) { + if a == math.MinInt64 && b == -1 { + return 0, errors.Trace(ErrArithOverflow) + } + + return a / b, nil +} + +// DivUintWithInt divides uint64 a with int64 b, returns uint64 if no overflow error. +// It just checks overflow, if b is zero, a "divide by zero" panic throws. +func DivUintWithInt(a uint64, b int64) (uint64, error) { + if b < 0 { + if a != 0 && uint64(-b) <= a { + return 0, errors.Trace(ErrArithOverflow) + } + + return 0, nil + } + + return a / uint64(b), nil +} + +// DivIntWithUint divides int64 a with uint64 b, returns uint64 if no overflow error. +// It just checks overflow, if b is zero, a "divide by zero" panic throws. +func DivIntWithUint(a int64, b uint64) (uint64, error) { + if a < 0 { + if uint64(-a) >= b { + return 0, errors.Trace(ErrArithOverflow) + } + + return 0, nil + } + + return uint64(a) / b, nil +} diff --git a/vendor/github.com/syndtr/goleveldb/LICENSE b/vendor/github.com/syndtr/goleveldb/LICENSE new file mode 100644 index 000000000..4a772d1ab --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/LICENSE @@ -0,0 +1,24 @@ +Copyright 2012 Suryandaru Triandana +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/batch.go b/vendor/github.com/syndtr/goleveldb/leveldb/batch.go new file mode 100644 index 000000000..652fa4124 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/batch.go @@ -0,0 +1,261 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "encoding/binary" + "fmt" + + "github.com/syndtr/goleveldb/leveldb/errors" + "github.com/syndtr/goleveldb/leveldb/memdb" + "github.com/syndtr/goleveldb/leveldb/storage" +) + +// ErrBatchCorrupted records reason of batch corruption. +type ErrBatchCorrupted struct { + Reason string +} + +func (e *ErrBatchCorrupted) Error() string { + return fmt.Sprintf("leveldb: batch corrupted: %s", e.Reason) +} + +func newErrBatchCorrupted(reason string) error { + return errors.NewErrCorrupted(storage.FileDesc{}, &ErrBatchCorrupted{reason}) +} + +const ( + batchHdrLen = 8 + 4 + batchGrowRec = 3000 +) + +// BatchReplay wraps basic batch operations. +type BatchReplay interface { + Put(key, value []byte) + Delete(key []byte) +} + +// Batch is a write batch. +type Batch struct { + data []byte + rLen, bLen int + seq uint64 + sync bool +} + +func (b *Batch) grow(n int) { + off := len(b.data) + if off == 0 { + off = batchHdrLen + if b.data != nil { + b.data = b.data[:off] + } + } + if cap(b.data)-off < n { + if b.data == nil { + b.data = make([]byte, off, off+n) + } else { + odata := b.data + div := 1 + if b.rLen > batchGrowRec { + div = b.rLen / batchGrowRec + } + b.data = make([]byte, off, off+n+(off-batchHdrLen)/div) + copy(b.data, odata) + } + } +} + +func (b *Batch) appendRec(kt keyType, key, value []byte) { + n := 1 + binary.MaxVarintLen32 + len(key) + if kt == keyTypeVal { + n += binary.MaxVarintLen32 + len(value) + } + b.grow(n) + off := len(b.data) + data := b.data[:off+n] + data[off] = byte(kt) + off++ + off += binary.PutUvarint(data[off:], uint64(len(key))) + copy(data[off:], key) + off += len(key) + if kt == keyTypeVal { + off += binary.PutUvarint(data[off:], uint64(len(value))) + copy(data[off:], value) + off += len(value) + } + b.data = data[:off] + b.rLen++ + // Include 8-byte ikey header + b.bLen += len(key) + len(value) + 8 +} + +// Put appends 'put operation' of the given key/value pair to the batch. +// It is safe to modify the contents of the argument after Put returns. +func (b *Batch) Put(key, value []byte) { + b.appendRec(keyTypeVal, key, value) +} + +// Delete appends 'delete operation' of the given key to the batch. +// It is safe to modify the contents of the argument after Delete returns. +func (b *Batch) Delete(key []byte) { + b.appendRec(keyTypeDel, key, nil) +} + +// Dump dumps batch contents. The returned slice can be loaded into the +// batch using Load method. +// The returned slice is not its own copy, so the contents should not be +// modified. +func (b *Batch) Dump() []byte { + return b.encode() +} + +// Load loads given slice into the batch. Previous contents of the batch +// will be discarded. +// The given slice will not be copied and will be used as batch buffer, so +// it is not safe to modify the contents of the slice. +func (b *Batch) Load(data []byte) error { + return b.decode(0, data) +} + +// Replay replays batch contents. +func (b *Batch) Replay(r BatchReplay) error { + return b.decodeRec(func(i int, kt keyType, key, value []byte) error { + switch kt { + case keyTypeVal: + r.Put(key, value) + case keyTypeDel: + r.Delete(key) + } + return nil + }) +} + +// Len returns number of records in the batch. +func (b *Batch) Len() int { + return b.rLen +} + +// Reset resets the batch. +func (b *Batch) Reset() { + b.data = b.data[:0] + b.seq = 0 + b.rLen = 0 + b.bLen = 0 + b.sync = false +} + +func (b *Batch) init(sync bool) { + b.sync = sync +} + +func (b *Batch) append(p *Batch) { + if p.rLen > 0 { + b.grow(len(p.data) - batchHdrLen) + b.data = append(b.data, p.data[batchHdrLen:]...) + b.rLen += p.rLen + } + if p.sync { + b.sync = true + } +} + +// size returns sums of key/value pair length plus 8-bytes ikey. +func (b *Batch) size() int { + return b.bLen +} + +func (b *Batch) encode() []byte { + b.grow(0) + binary.LittleEndian.PutUint64(b.data, b.seq) + binary.LittleEndian.PutUint32(b.data[8:], uint32(b.rLen)) + + return b.data +} + +func (b *Batch) decode(prevSeq uint64, data []byte) error { + if len(data) < batchHdrLen { + return newErrBatchCorrupted("too short") + } + + b.seq = binary.LittleEndian.Uint64(data) + if b.seq < prevSeq { + return newErrBatchCorrupted("invalid sequence number") + } + b.rLen = int(binary.LittleEndian.Uint32(data[8:])) + if b.rLen < 0 { + return newErrBatchCorrupted("invalid records length") + } + // No need to be precise at this point, it won't be used anyway + b.bLen = len(data) - batchHdrLen + b.data = data + + return nil +} + +func (b *Batch) decodeRec(f func(i int, kt keyType, key, value []byte) error) error { + off := batchHdrLen + for i := 0; i < b.rLen; i++ { + if off >= len(b.data) { + return newErrBatchCorrupted("invalid records length") + } + + kt := keyType(b.data[off]) + if kt > keyTypeVal { + panic(kt) + return newErrBatchCorrupted("bad record: invalid type") + } + off++ + + x, n := binary.Uvarint(b.data[off:]) + off += n + if n <= 0 || off+int(x) > len(b.data) { + return newErrBatchCorrupted("bad record: invalid key length") + } + key := b.data[off : off+int(x)] + off += int(x) + var value []byte + if kt == keyTypeVal { + x, n := binary.Uvarint(b.data[off:]) + off += n + if n <= 0 || off+int(x) > len(b.data) { + return newErrBatchCorrupted("bad record: invalid value length") + } + value = b.data[off : off+int(x)] + off += int(x) + } + + if err := f(i, kt, key, value); err != nil { + return err + } + } + + return nil +} + +func (b *Batch) memReplay(to *memdb.DB) error { + var ikScratch []byte + return b.decodeRec(func(i int, kt keyType, key, value []byte) error { + ikScratch = makeInternalKey(ikScratch, key, b.seq+uint64(i), kt) + return to.Put(ikScratch, value) + }) +} + +func (b *Batch) memDecodeAndReplay(prevSeq uint64, data []byte, to *memdb.DB) error { + if err := b.decode(prevSeq, data); err != nil { + return err + } + return b.memReplay(to) +} + +func (b *Batch) revertMemReplay(to *memdb.DB) error { + var ikScratch []byte + return b.decodeRec(func(i int, kt keyType, key, value []byte) error { + ikScratch := makeInternalKey(ikScratch, key, b.seq+uint64(i), kt) + return to.Delete(ikScratch) + }) +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/cache/cache.go b/vendor/github.com/syndtr/goleveldb/leveldb/cache/cache.go new file mode 100644 index 000000000..a287d0e5e --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/cache/cache.go @@ -0,0 +1,684 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Package cache provides interface and implementation of a cache algorithms. +package cache + +import ( + "sync" + "sync/atomic" + "unsafe" + + "github.com/syndtr/goleveldb/leveldb/util" +) + +// Cacher provides interface to implements a caching functionality. +// An implementation must be goroutine-safe. +type Cacher interface { + // Capacity returns cache capacity. + Capacity() int + + // SetCapacity sets cache capacity. + SetCapacity(capacity int) + + // Promote promotes the 'cache node'. + Promote(n *Node) + + // Ban evicts the 'cache node' and prevent subsequent 'promote'. + Ban(n *Node) + + // Evict evicts the 'cache node'. + Evict(n *Node) + + // EvictNS evicts 'cache node' with the given namespace. + EvictNS(ns uint64) + + // EvictAll evicts all 'cache node'. + EvictAll() + + // Close closes the 'cache tree' + Close() error +} + +// Value is a 'cacheable object'. It may implements util.Releaser, if +// so the the Release method will be called once object is released. +type Value interface{} + +// NamespaceGetter provides convenient wrapper for namespace. +type NamespaceGetter struct { + Cache *Cache + NS uint64 +} + +// Get simply calls Cache.Get() method. +func (g *NamespaceGetter) Get(key uint64, setFunc func() (size int, value Value)) *Handle { + return g.Cache.Get(g.NS, key, setFunc) +} + +// The hash tables implementation is based on: +// "Dynamic-Sized Nonblocking Hash Tables", by Yujie Liu, +// Kunlong Zhang, and Michael Spear. +// ACM Symposium on Principles of Distributed Computing, Jul 2014. + +const ( + mInitialSize = 1 << 4 + mOverflowThreshold = 1 << 5 + mOverflowGrowThreshold = 1 << 7 +) + +type mBucket struct { + mu sync.Mutex + node []*Node + frozen bool +} + +func (b *mBucket) freeze() []*Node { + b.mu.Lock() + defer b.mu.Unlock() + if !b.frozen { + b.frozen = true + } + return b.node +} + +func (b *mBucket) get(r *Cache, h *mNode, hash uint32, ns, key uint64, noset bool) (done, added bool, n *Node) { + b.mu.Lock() + + if b.frozen { + b.mu.Unlock() + return + } + + // Scan the node. + for _, n := range b.node { + if n.hash == hash && n.ns == ns && n.key == key { + atomic.AddInt32(&n.ref, 1) + b.mu.Unlock() + return true, false, n + } + } + + // Get only. + if noset { + b.mu.Unlock() + return true, false, nil + } + + // Create node. + n = &Node{ + r: r, + hash: hash, + ns: ns, + key: key, + ref: 1, + } + // Add node to bucket. + b.node = append(b.node, n) + bLen := len(b.node) + b.mu.Unlock() + + // Update counter. + grow := atomic.AddInt32(&r.nodes, 1) >= h.growThreshold + if bLen > mOverflowThreshold { + grow = grow || atomic.AddInt32(&h.overflow, 1) >= mOverflowGrowThreshold + } + + // Grow. + if grow && atomic.CompareAndSwapInt32(&h.resizeInProgess, 0, 1) { + nhLen := len(h.buckets) << 1 + nh := &mNode{ + buckets: make([]unsafe.Pointer, nhLen), + mask: uint32(nhLen) - 1, + pred: unsafe.Pointer(h), + growThreshold: int32(nhLen * mOverflowThreshold), + shrinkThreshold: int32(nhLen >> 1), + } + ok := atomic.CompareAndSwapPointer(&r.mHead, unsafe.Pointer(h), unsafe.Pointer(nh)) + if !ok { + panic("BUG: failed swapping head") + } + go nh.initBuckets() + } + + return true, true, n +} + +func (b *mBucket) delete(r *Cache, h *mNode, hash uint32, ns, key uint64) (done, deleted bool) { + b.mu.Lock() + + if b.frozen { + b.mu.Unlock() + return + } + + // Scan the node. + var ( + n *Node + bLen int + ) + for i := range b.node { + n = b.node[i] + if n.ns == ns && n.key == key { + if atomic.LoadInt32(&n.ref) == 0 { + deleted = true + + // Call releaser. + if n.value != nil { + if r, ok := n.value.(util.Releaser); ok { + r.Release() + } + n.value = nil + } + + // Remove node from bucket. + b.node = append(b.node[:i], b.node[i+1:]...) + bLen = len(b.node) + } + break + } + } + b.mu.Unlock() + + if deleted { + // Call OnDel. + for _, f := range n.onDel { + f() + } + + // Update counter. + atomic.AddInt32(&r.size, int32(n.size)*-1) + shrink := atomic.AddInt32(&r.nodes, -1) < h.shrinkThreshold + if bLen >= mOverflowThreshold { + atomic.AddInt32(&h.overflow, -1) + } + + // Shrink. + if shrink && len(h.buckets) > mInitialSize && atomic.CompareAndSwapInt32(&h.resizeInProgess, 0, 1) { + nhLen := len(h.buckets) >> 1 + nh := &mNode{ + buckets: make([]unsafe.Pointer, nhLen), + mask: uint32(nhLen) - 1, + pred: unsafe.Pointer(h), + growThreshold: int32(nhLen * mOverflowThreshold), + shrinkThreshold: int32(nhLen >> 1), + } + ok := atomic.CompareAndSwapPointer(&r.mHead, unsafe.Pointer(h), unsafe.Pointer(nh)) + if !ok { + panic("BUG: failed swapping head") + } + go nh.initBuckets() + } + } + + return true, deleted +} + +type mNode struct { + buckets []unsafe.Pointer // []*mBucket + mask uint32 + pred unsafe.Pointer // *mNode + resizeInProgess int32 + + overflow int32 + growThreshold int32 + shrinkThreshold int32 +} + +func (n *mNode) initBucket(i uint32) *mBucket { + if b := (*mBucket)(atomic.LoadPointer(&n.buckets[i])); b != nil { + return b + } + + p := (*mNode)(atomic.LoadPointer(&n.pred)) + if p != nil { + var node []*Node + if n.mask > p.mask { + // Grow. + pb := (*mBucket)(atomic.LoadPointer(&p.buckets[i&p.mask])) + if pb == nil { + pb = p.initBucket(i & p.mask) + } + m := pb.freeze() + // Split nodes. + for _, x := range m { + if x.hash&n.mask == i { + node = append(node, x) + } + } + } else { + // Shrink. + pb0 := (*mBucket)(atomic.LoadPointer(&p.buckets[i])) + if pb0 == nil { + pb0 = p.initBucket(i) + } + pb1 := (*mBucket)(atomic.LoadPointer(&p.buckets[i+uint32(len(n.buckets))])) + if pb1 == nil { + pb1 = p.initBucket(i + uint32(len(n.buckets))) + } + m0 := pb0.freeze() + m1 := pb1.freeze() + // Merge nodes. + node = make([]*Node, 0, len(m0)+len(m1)) + node = append(node, m0...) + node = append(node, m1...) + } + b := &mBucket{node: node} + if atomic.CompareAndSwapPointer(&n.buckets[i], nil, unsafe.Pointer(b)) { + if len(node) > mOverflowThreshold { + atomic.AddInt32(&n.overflow, int32(len(node)-mOverflowThreshold)) + } + return b + } + } + + return (*mBucket)(atomic.LoadPointer(&n.buckets[i])) +} + +func (n *mNode) initBuckets() { + for i := range n.buckets { + n.initBucket(uint32(i)) + } + atomic.StorePointer(&n.pred, nil) +} + +// Cache is a 'cache map'. +type Cache struct { + mu sync.RWMutex + mHead unsafe.Pointer // *mNode + nodes int32 + size int32 + cacher Cacher + closed bool +} + +// NewCache creates a new 'cache map'. The cacher is optional and +// may be nil. +func NewCache(cacher Cacher) *Cache { + h := &mNode{ + buckets: make([]unsafe.Pointer, mInitialSize), + mask: mInitialSize - 1, + growThreshold: int32(mInitialSize * mOverflowThreshold), + shrinkThreshold: 0, + } + for i := range h.buckets { + h.buckets[i] = unsafe.Pointer(&mBucket{}) + } + r := &Cache{ + mHead: unsafe.Pointer(h), + cacher: cacher, + } + return r +} + +func (r *Cache) getBucket(hash uint32) (*mNode, *mBucket) { + h := (*mNode)(atomic.LoadPointer(&r.mHead)) + i := hash & h.mask + b := (*mBucket)(atomic.LoadPointer(&h.buckets[i])) + if b == nil { + b = h.initBucket(i) + } + return h, b +} + +func (r *Cache) delete(n *Node) bool { + for { + h, b := r.getBucket(n.hash) + done, deleted := b.delete(r, h, n.hash, n.ns, n.key) + if done { + return deleted + } + } + return false +} + +// Nodes returns number of 'cache node' in the map. +func (r *Cache) Nodes() int { + return int(atomic.LoadInt32(&r.nodes)) +} + +// Size returns sums of 'cache node' size in the map. +func (r *Cache) Size() int { + return int(atomic.LoadInt32(&r.size)) +} + +// Capacity returns cache capacity. +func (r *Cache) Capacity() int { + if r.cacher == nil { + return 0 + } + return r.cacher.Capacity() +} + +// SetCapacity sets cache capacity. +func (r *Cache) SetCapacity(capacity int) { + if r.cacher != nil { + r.cacher.SetCapacity(capacity) + } +} + +// Get gets 'cache node' with the given namespace and key. +// If cache node is not found and setFunc is not nil, Get will atomically creates +// the 'cache node' by calling setFunc. Otherwise Get will returns nil. +// +// The returned 'cache handle' should be released after use by calling Release +// method. +func (r *Cache) Get(ns, key uint64, setFunc func() (size int, value Value)) *Handle { + r.mu.RLock() + defer r.mu.RUnlock() + if r.closed { + return nil + } + + hash := murmur32(ns, key, 0xf00) + for { + h, b := r.getBucket(hash) + done, _, n := b.get(r, h, hash, ns, key, setFunc == nil) + if done { + if n != nil { + n.mu.Lock() + if n.value == nil { + if setFunc == nil { + n.mu.Unlock() + n.unref() + return nil + } + + n.size, n.value = setFunc() + if n.value == nil { + n.size = 0 + n.mu.Unlock() + n.unref() + return nil + } + atomic.AddInt32(&r.size, int32(n.size)) + } + n.mu.Unlock() + if r.cacher != nil { + r.cacher.Promote(n) + } + return &Handle{unsafe.Pointer(n)} + } + + break + } + } + return nil +} + +// Delete removes and ban 'cache node' with the given namespace and key. +// A banned 'cache node' will never inserted into the 'cache tree'. Ban +// only attributed to the particular 'cache node', so when a 'cache node' +// is recreated it will not be banned. +// +// If onDel is not nil, then it will be executed if such 'cache node' +// doesn't exist or once the 'cache node' is released. +// +// Delete return true is such 'cache node' exist. +func (r *Cache) Delete(ns, key uint64, onDel func()) bool { + r.mu.RLock() + defer r.mu.RUnlock() + if r.closed { + return false + } + + hash := murmur32(ns, key, 0xf00) + for { + h, b := r.getBucket(hash) + done, _, n := b.get(r, h, hash, ns, key, true) + if done { + if n != nil { + if onDel != nil { + n.mu.Lock() + n.onDel = append(n.onDel, onDel) + n.mu.Unlock() + } + if r.cacher != nil { + r.cacher.Ban(n) + } + n.unref() + return true + } + + break + } + } + + if onDel != nil { + onDel() + } + + return false +} + +// Evict evicts 'cache node' with the given namespace and key. This will +// simply call Cacher.Evict. +// +// Evict return true is such 'cache node' exist. +func (r *Cache) Evict(ns, key uint64) bool { + r.mu.RLock() + defer r.mu.RUnlock() + if r.closed { + return false + } + + hash := murmur32(ns, key, 0xf00) + for { + h, b := r.getBucket(hash) + done, _, n := b.get(r, h, hash, ns, key, true) + if done { + if n != nil { + if r.cacher != nil { + r.cacher.Evict(n) + } + n.unref() + return true + } + + break + } + } + + return false +} + +// EvictNS evicts 'cache node' with the given namespace. This will +// simply call Cacher.EvictNS. +func (r *Cache) EvictNS(ns uint64) { + r.mu.RLock() + defer r.mu.RUnlock() + if r.closed { + return + } + + if r.cacher != nil { + r.cacher.EvictNS(ns) + } +} + +// EvictAll evicts all 'cache node'. This will simply call Cacher.EvictAll. +func (r *Cache) EvictAll() { + r.mu.RLock() + defer r.mu.RUnlock() + if r.closed { + return + } + + if r.cacher != nil { + r.cacher.EvictAll() + } +} + +// Close closes the 'cache map' and releases all 'cache node'. +func (r *Cache) Close() error { + r.mu.Lock() + if !r.closed { + r.closed = true + + if r.cacher != nil { + if err := r.cacher.Close(); err != nil { + return err + } + } + + h := (*mNode)(r.mHead) + h.initBuckets() + + for i := range h.buckets { + b := (*mBucket)(h.buckets[i]) + for _, n := range b.node { + // Call releaser. + if n.value != nil { + if r, ok := n.value.(util.Releaser); ok { + r.Release() + } + n.value = nil + } + + // Call OnDel. + for _, f := range n.onDel { + f() + } + } + } + } + r.mu.Unlock() + return nil +} + +// Node is a 'cache node'. +type Node struct { + r *Cache + + hash uint32 + ns, key uint64 + + mu sync.Mutex + size int + value Value + + ref int32 + onDel []func() + + CacheData unsafe.Pointer +} + +// NS returns this 'cache node' namespace. +func (n *Node) NS() uint64 { + return n.ns +} + +// Key returns this 'cache node' key. +func (n *Node) Key() uint64 { + return n.key +} + +// Size returns this 'cache node' size. +func (n *Node) Size() int { + return n.size +} + +// Value returns this 'cache node' value. +func (n *Node) Value() Value { + return n.value +} + +// Ref returns this 'cache node' ref counter. +func (n *Node) Ref() int32 { + return atomic.LoadInt32(&n.ref) +} + +// GetHandle returns an handle for this 'cache node'. +func (n *Node) GetHandle() *Handle { + if atomic.AddInt32(&n.ref, 1) <= 1 { + panic("BUG: Node.GetHandle on zero ref") + } + return &Handle{unsafe.Pointer(n)} +} + +func (n *Node) unref() { + if atomic.AddInt32(&n.ref, -1) == 0 { + n.r.delete(n) + } +} + +func (n *Node) unrefLocked() { + if atomic.AddInt32(&n.ref, -1) == 0 { + n.r.mu.RLock() + if !n.r.closed { + n.r.delete(n) + } + n.r.mu.RUnlock() + } +} + +// Handle is a 'cache handle' of a 'cache node'. +type Handle struct { + n unsafe.Pointer // *Node +} + +// Value returns the value of the 'cache node'. +func (h *Handle) Value() Value { + n := (*Node)(atomic.LoadPointer(&h.n)) + if n != nil { + return n.value + } + return nil +} + +// Release releases this 'cache handle'. +// It is safe to call release multiple times. +func (h *Handle) Release() { + nPtr := atomic.LoadPointer(&h.n) + if nPtr != nil && atomic.CompareAndSwapPointer(&h.n, nPtr, nil) { + n := (*Node)(nPtr) + n.unrefLocked() + } +} + +func murmur32(ns, key uint64, seed uint32) uint32 { + const ( + m = uint32(0x5bd1e995) + r = 24 + ) + + k1 := uint32(ns >> 32) + k2 := uint32(ns) + k3 := uint32(key >> 32) + k4 := uint32(key) + + k1 *= m + k1 ^= k1 >> r + k1 *= m + + k2 *= m + k2 ^= k2 >> r + k2 *= m + + k3 *= m + k3 ^= k3 >> r + k3 *= m + + k4 *= m + k4 ^= k4 >> r + k4 *= m + + h := seed + + h *= m + h ^= k1 + h *= m + h ^= k2 + h *= m + h ^= k3 + h *= m + h ^= k4 + + h ^= h >> 13 + h *= m + h ^= h >> 15 + + return h +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/cache/lru.go b/vendor/github.com/syndtr/goleveldb/leveldb/cache/lru.go new file mode 100644 index 000000000..d9a84cde1 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/cache/lru.go @@ -0,0 +1,195 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package cache + +import ( + "sync" + "unsafe" +) + +type lruNode struct { + n *Node + h *Handle + ban bool + + next, prev *lruNode +} + +func (n *lruNode) insert(at *lruNode) { + x := at.next + at.next = n + n.prev = at + n.next = x + x.prev = n +} + +func (n *lruNode) remove() { + if n.prev != nil { + n.prev.next = n.next + n.next.prev = n.prev + n.prev = nil + n.next = nil + } else { + panic("BUG: removing removed node") + } +} + +type lru struct { + mu sync.Mutex + capacity int + used int + recent lruNode +} + +func (r *lru) reset() { + r.recent.next = &r.recent + r.recent.prev = &r.recent + r.used = 0 +} + +func (r *lru) Capacity() int { + r.mu.Lock() + defer r.mu.Unlock() + return r.capacity +} + +func (r *lru) SetCapacity(capacity int) { + var evicted []*lruNode + + r.mu.Lock() + r.capacity = capacity + for r.used > r.capacity { + rn := r.recent.prev + if rn == nil { + panic("BUG: invalid LRU used or capacity counter") + } + rn.remove() + rn.n.CacheData = nil + r.used -= rn.n.Size() + evicted = append(evicted, rn) + } + r.mu.Unlock() + + for _, rn := range evicted { + rn.h.Release() + } +} + +func (r *lru) Promote(n *Node) { + var evicted []*lruNode + + r.mu.Lock() + if n.CacheData == nil { + if n.Size() <= r.capacity { + rn := &lruNode{n: n, h: n.GetHandle()} + rn.insert(&r.recent) + n.CacheData = unsafe.Pointer(rn) + r.used += n.Size() + + for r.used > r.capacity { + rn := r.recent.prev + if rn == nil { + panic("BUG: invalid LRU used or capacity counter") + } + rn.remove() + rn.n.CacheData = nil + r.used -= rn.n.Size() + evicted = append(evicted, rn) + } + } + } else { + rn := (*lruNode)(n.CacheData) + if !rn.ban { + rn.remove() + rn.insert(&r.recent) + } + } + r.mu.Unlock() + + for _, rn := range evicted { + rn.h.Release() + } +} + +func (r *lru) Ban(n *Node) { + r.mu.Lock() + if n.CacheData == nil { + n.CacheData = unsafe.Pointer(&lruNode{n: n, ban: true}) + } else { + rn := (*lruNode)(n.CacheData) + if !rn.ban { + rn.remove() + rn.ban = true + r.used -= rn.n.Size() + r.mu.Unlock() + + rn.h.Release() + rn.h = nil + return + } + } + r.mu.Unlock() +} + +func (r *lru) Evict(n *Node) { + r.mu.Lock() + rn := (*lruNode)(n.CacheData) + if rn == nil || rn.ban { + r.mu.Unlock() + return + } + n.CacheData = nil + r.mu.Unlock() + + rn.h.Release() +} + +func (r *lru) EvictNS(ns uint64) { + var evicted []*lruNode + + r.mu.Lock() + for e := r.recent.prev; e != &r.recent; { + rn := e + e = e.prev + if rn.n.NS() == ns { + rn.remove() + rn.n.CacheData = nil + r.used -= rn.n.Size() + evicted = append(evicted, rn) + } + } + r.mu.Unlock() + + for _, rn := range evicted { + rn.h.Release() + } +} + +func (r *lru) EvictAll() { + r.mu.Lock() + back := r.recent.prev + for rn := back; rn != &r.recent; rn = rn.prev { + rn.n.CacheData = nil + } + r.reset() + r.mu.Unlock() + + for rn := back; rn != &r.recent; rn = rn.prev { + rn.h.Release() + } +} + +func (r *lru) Close() error { + return nil +} + +// NewLRU create a new LRU-cache. +func NewLRU(capacity int) Cacher { + r := &lru{capacity: capacity} + r.reset() + return r +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/comparer.go b/vendor/github.com/syndtr/goleveldb/leveldb/comparer.go new file mode 100644 index 000000000..248bf7c21 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/comparer.go @@ -0,0 +1,75 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import "github.com/syndtr/goleveldb/leveldb/comparer" + +type iComparer struct { + ucmp comparer.Comparer +} + +func (icmp *iComparer) uName() string { + return icmp.ucmp.Name() +} + +func (icmp *iComparer) uCompare(a, b []byte) int { + return icmp.ucmp.Compare(a, b) +} + +func (icmp *iComparer) uSeparator(dst, a, b []byte) []byte { + return icmp.ucmp.Separator(dst, a, b) +} + +func (icmp *iComparer) uSuccessor(dst, b []byte) []byte { + return icmp.ucmp.Successor(dst, b) +} + +func (icmp *iComparer) Name() string { + return icmp.uName() +} + +func (icmp *iComparer) Compare(a, b []byte) int { + x := icmp.ucmp.Compare(internalKey(a).ukey(), internalKey(b).ukey()) + if x == 0 { + if m, n := internalKey(a).num(), internalKey(b).num(); m > n { + x = -1 + } else if m < n { + x = 1 + } + } + return x +} + +func (icmp *iComparer) Separator(dst, a, b []byte) []byte { + ua, ub := internalKey(a).ukey(), internalKey(b).ukey() + dst = icmp.ucmp.Separator(dst, ua, ub) + if dst == nil { + return nil + } + if len(dst) < len(ua) && icmp.uCompare(ua, dst) < 0 { + dst = append(dst, keyMaxNumBytes...) + } else { + // Did not close possibilities that n maybe longer than len(ub). + dst = append(dst, a[len(a)-8:]...) + } + return dst +} + +func (icmp *iComparer) Successor(dst, b []byte) []byte { + ub := internalKey(b).ukey() + dst = icmp.ucmp.Successor(dst, ub) + if dst == nil { + return nil + } + if len(dst) < len(ub) && icmp.uCompare(ub, dst) < 0 { + dst = append(dst, keyMaxNumBytes...) + } else { + // Did not close possibilities that n maybe longer than len(ub). + dst = append(dst, b[len(b)-8:]...) + } + return dst +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/comparer/bytes_comparer.go b/vendor/github.com/syndtr/goleveldb/leveldb/comparer/bytes_comparer.go new file mode 100644 index 000000000..14dddf88d --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/comparer/bytes_comparer.go @@ -0,0 +1,51 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package comparer + +import "bytes" + +type bytesComparer struct{} + +func (bytesComparer) Compare(a, b []byte) int { + return bytes.Compare(a, b) +} + +func (bytesComparer) Name() string { + return "leveldb.BytewiseComparator" +} + +func (bytesComparer) Separator(dst, a, b []byte) []byte { + i, n := 0, len(a) + if n > len(b) { + n = len(b) + } + for ; i < n && a[i] == b[i]; i++ { + } + if i >= n { + // Do not shorten if one string is a prefix of the other + } else if c := a[i]; c < 0xff && c+1 < b[i] { + dst = append(dst, a[:i+1]...) + dst[i]++ + return dst + } + return nil +} + +func (bytesComparer) Successor(dst, b []byte) []byte { + for i, c := range b { + if c != 0xff { + dst = append(dst, b[:i+1]...) + dst[i]++ + return dst + } + } + return nil +} + +// DefaultComparer are default implementation of the Comparer interface. +// It uses the natural ordering, consistent with bytes.Compare. +var DefaultComparer = bytesComparer{} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/comparer/comparer.go b/vendor/github.com/syndtr/goleveldb/leveldb/comparer/comparer.go new file mode 100644 index 000000000..14a28f16f --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/comparer/comparer.go @@ -0,0 +1,57 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Package comparer provides interface and implementation for ordering +// sets of data. +package comparer + +// BasicComparer is the interface that wraps the basic Compare method. +type BasicComparer interface { + // Compare returns -1, 0, or +1 depending on whether a is 'less than', + // 'equal to' or 'greater than' b. The two arguments can only be 'equal' + // if their contents are exactly equal. Furthermore, the empty slice + // must be 'less than' any non-empty slice. + Compare(a, b []byte) int +} + +// Comparer defines a total ordering over the space of []byte keys: a 'less +// than' relationship. +type Comparer interface { + BasicComparer + + // Name returns name of the comparer. + // + // The Level-DB on-disk format stores the comparer name, and opening a + // database with a different comparer from the one it was created with + // will result in an error. + // + // An implementation to a new name whenever the comparer implementation + // changes in a way that will cause the relative ordering of any two keys + // to change. + // + // Names starting with "leveldb." are reserved and should not be used + // by any users of this package. + Name() string + + // Bellow are advanced functions used used to reduce the space requirements + // for internal data structures such as index blocks. + + // Separator appends a sequence of bytes x to dst such that a <= x && x < b, + // where 'less than' is consistent with Compare. An implementation should + // return nil if x equal to a. + // + // Either contents of a or b should not by any means modified. Doing so + // may cause corruption on the internal state. + Separator(dst, a, b []byte) []byte + + // Successor appends a sequence of bytes x to dst such that x >= b, where + // 'less than' is consistent with Compare. An implementation should return + // nil if x equal to b. + // + // Contents of b should not by any means modified. Doing so may cause + // corruption on the internal state. + Successor(dst, b []byte) []byte +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/db.go b/vendor/github.com/syndtr/goleveldb/leveldb/db.go new file mode 100644 index 000000000..eb6abd0fb --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/db.go @@ -0,0 +1,1091 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "container/list" + "fmt" + "io" + "os" + "runtime" + "strings" + "sync" + "sync/atomic" + "time" + + "github.com/syndtr/goleveldb/leveldb/errors" + "github.com/syndtr/goleveldb/leveldb/iterator" + "github.com/syndtr/goleveldb/leveldb/journal" + "github.com/syndtr/goleveldb/leveldb/memdb" + "github.com/syndtr/goleveldb/leveldb/opt" + "github.com/syndtr/goleveldb/leveldb/storage" + "github.com/syndtr/goleveldb/leveldb/table" + "github.com/syndtr/goleveldb/leveldb/util" +) + +// DB is a LevelDB database. +type DB struct { + // Need 64-bit alignment. + seq uint64 + + // Session. + s *session + + // MemDB. + memMu sync.RWMutex + memPool chan *memdb.DB + mem, frozenMem *memDB + journal *journal.Writer + journalWriter storage.Writer + journalFd storage.FileDesc + frozenJournalFd storage.FileDesc + frozenSeq uint64 + + // Snapshot. + snapsMu sync.Mutex + snapsList *list.List + + // Stats. + aliveSnaps, aliveIters int32 + + // Write. + writeC chan *Batch + writeMergedC chan bool + writeLockC chan struct{} + writeAckC chan error + writeDelay time.Duration + writeDelayN int + journalC chan *Batch + journalAckC chan error + tr *Transaction + + // Compaction. + compCommitLk sync.Mutex + tcompCmdC chan cCmd + tcompPauseC chan chan<- struct{} + mcompCmdC chan cCmd + compErrC chan error + compPerErrC chan error + compErrSetC chan error + compWriteLocking bool + compStats cStats + memdbMaxLevel int // For testing. + + // Close. + closeW sync.WaitGroup + closeC chan struct{} + closed uint32 + closer io.Closer +} + +func openDB(s *session) (*DB, error) { + s.log("db@open opening") + start := time.Now() + db := &DB{ + s: s, + // Initial sequence + seq: s.stSeqNum, + // MemDB + memPool: make(chan *memdb.DB, 1), + // Snapshot + snapsList: list.New(), + // Write + writeC: make(chan *Batch), + writeMergedC: make(chan bool), + writeLockC: make(chan struct{}, 1), + writeAckC: make(chan error), + journalC: make(chan *Batch), + journalAckC: make(chan error), + // Compaction + tcompCmdC: make(chan cCmd), + tcompPauseC: make(chan chan<- struct{}), + mcompCmdC: make(chan cCmd), + compErrC: make(chan error), + compPerErrC: make(chan error), + compErrSetC: make(chan error), + // Close + closeC: make(chan struct{}), + } + + // Read-only mode. + readOnly := s.o.GetReadOnly() + + if readOnly { + // Recover journals (read-only mode). + if err := db.recoverJournalRO(); err != nil { + return nil, err + } + } else { + // Recover journals. + if err := db.recoverJournal(); err != nil { + return nil, err + } + + // Remove any obsolete files. + if err := db.checkAndCleanFiles(); err != nil { + // Close journal. + if db.journal != nil { + db.journal.Close() + db.journalWriter.Close() + } + return nil, err + } + + } + + // Doesn't need to be included in the wait group. + go db.compactionError() + go db.mpoolDrain() + + if readOnly { + db.SetReadOnly() + } else { + db.closeW.Add(3) + go db.tCompaction() + go db.mCompaction() + go db.jWriter() + } + + s.logf("db@open done T·%v", time.Since(start)) + + runtime.SetFinalizer(db, (*DB).Close) + return db, nil +} + +// Open opens or creates a DB for the given storage. +// The DB will be created if not exist, unless ErrorIfMissing is true. +// Also, if ErrorIfExist is true and the DB exist Open will returns +// os.ErrExist error. +// +// Open will return an error with type of ErrCorrupted if corruption +// detected in the DB. Corrupted DB can be recovered with Recover +// function. +// +// The returned DB instance is goroutine-safe. +// The DB must be closed after use, by calling Close method. +func Open(stor storage.Storage, o *opt.Options) (db *DB, err error) { + s, err := newSession(stor, o) + if err != nil { + return + } + defer func() { + if err != nil { + s.close() + s.release() + } + }() + + err = s.recover() + if err != nil { + if !os.IsNotExist(err) || s.o.GetErrorIfMissing() { + return + } + err = s.create() + if err != nil { + return + } + } else if s.o.GetErrorIfExist() { + err = os.ErrExist + return + } + + return openDB(s) +} + +// OpenFile opens or creates a DB for the given path. +// The DB will be created if not exist, unless ErrorIfMissing is true. +// Also, if ErrorIfExist is true and the DB exist OpenFile will returns +// os.ErrExist error. +// +// OpenFile uses standard file-system backed storage implementation as +// desribed in the leveldb/storage package. +// +// OpenFile will return an error with type of ErrCorrupted if corruption +// detected in the DB. Corrupted DB can be recovered with Recover +// function. +// +// The returned DB instance is goroutine-safe. +// The DB must be closed after use, by calling Close method. +func OpenFile(path string, o *opt.Options) (db *DB, err error) { + stor, err := storage.OpenFile(path, o.GetReadOnly()) + if err != nil { + return + } + db, err = Open(stor, o) + if err != nil { + stor.Close() + } else { + db.closer = stor + } + return +} + +// Recover recovers and opens a DB with missing or corrupted manifest files +// for the given storage. It will ignore any manifest files, valid or not. +// The DB must already exist or it will returns an error. +// Also, Recover will ignore ErrorIfMissing and ErrorIfExist options. +// +// The returned DB instance is goroutine-safe. +// The DB must be closed after use, by calling Close method. +func Recover(stor storage.Storage, o *opt.Options) (db *DB, err error) { + s, err := newSession(stor, o) + if err != nil { + return + } + defer func() { + if err != nil { + s.close() + s.release() + } + }() + + err = recoverTable(s, o) + if err != nil { + return + } + return openDB(s) +} + +// RecoverFile recovers and opens a DB with missing or corrupted manifest files +// for the given path. It will ignore any manifest files, valid or not. +// The DB must already exist or it will returns an error. +// Also, Recover will ignore ErrorIfMissing and ErrorIfExist options. +// +// RecoverFile uses standard file-system backed storage implementation as desribed +// in the leveldb/storage package. +// +// The returned DB instance is goroutine-safe. +// The DB must be closed after use, by calling Close method. +func RecoverFile(path string, o *opt.Options) (db *DB, err error) { + stor, err := storage.OpenFile(path, false) + if err != nil { + return + } + db, err = Recover(stor, o) + if err != nil { + stor.Close() + } else { + db.closer = stor + } + return +} + +func recoverTable(s *session, o *opt.Options) error { + o = dupOptions(o) + // Mask StrictReader, lets StrictRecovery doing its job. + o.Strict &= ^opt.StrictReader + + // Get all tables and sort it by file number. + fds, err := s.stor.List(storage.TypeTable) + if err != nil { + return err + } + sortFds(fds) + + var ( + maxSeq uint64 + recoveredKey, goodKey, corruptedKey, corruptedBlock, droppedTable int + + // We will drop corrupted table. + strict = o.GetStrict(opt.StrictRecovery) + noSync = o.GetNoSync() + + rec = &sessionRecord{} + bpool = util.NewBufferPool(o.GetBlockSize() + 5) + ) + buildTable := func(iter iterator.Iterator) (tmpFd storage.FileDesc, size int64, err error) { + tmpFd = s.newTemp() + writer, err := s.stor.Create(tmpFd) + if err != nil { + return + } + defer func() { + writer.Close() + if err != nil { + s.stor.Remove(tmpFd) + tmpFd = storage.FileDesc{} + } + }() + + // Copy entries. + tw := table.NewWriter(writer, o) + for iter.Next() { + key := iter.Key() + if validInternalKey(key) { + err = tw.Append(key, iter.Value()) + if err != nil { + return + } + } + } + err = iter.Error() + if err != nil { + return + } + err = tw.Close() + if err != nil { + return + } + if !noSync { + err = writer.Sync() + if err != nil { + return + } + } + size = int64(tw.BytesLen()) + return + } + recoverTable := func(fd storage.FileDesc) error { + s.logf("table@recovery recovering @%d", fd.Num) + reader, err := s.stor.Open(fd) + if err != nil { + return err + } + var closed bool + defer func() { + if !closed { + reader.Close() + } + }() + + // Get file size. + size, err := reader.Seek(0, 2) + if err != nil { + return err + } + + var ( + tSeq uint64 + tgoodKey, tcorruptedKey, tcorruptedBlock int + imin, imax []byte + ) + tr, err := table.NewReader(reader, size, fd, nil, bpool, o) + if err != nil { + return err + } + iter := tr.NewIterator(nil, nil) + if itererr, ok := iter.(iterator.ErrorCallbackSetter); ok { + itererr.SetErrorCallback(func(err error) { + if errors.IsCorrupted(err) { + s.logf("table@recovery block corruption @%d %q", fd.Num, err) + tcorruptedBlock++ + } + }) + } + + // Scan the table. + for iter.Next() { + key := iter.Key() + _, seq, _, kerr := parseInternalKey(key) + if kerr != nil { + tcorruptedKey++ + continue + } + tgoodKey++ + if seq > tSeq { + tSeq = seq + } + if imin == nil { + imin = append([]byte{}, key...) + } + imax = append(imax[:0], key...) + } + if err := iter.Error(); err != nil { + iter.Release() + return err + } + iter.Release() + + goodKey += tgoodKey + corruptedKey += tcorruptedKey + corruptedBlock += tcorruptedBlock + + if strict && (tcorruptedKey > 0 || tcorruptedBlock > 0) { + droppedTable++ + s.logf("table@recovery dropped @%d Gk·%d Ck·%d Cb·%d S·%d Q·%d", fd.Num, tgoodKey, tcorruptedKey, tcorruptedBlock, size, tSeq) + return nil + } + + if tgoodKey > 0 { + if tcorruptedKey > 0 || tcorruptedBlock > 0 { + // Rebuild the table. + s.logf("table@recovery rebuilding @%d", fd.Num) + iter := tr.NewIterator(nil, nil) + tmpFd, newSize, err := buildTable(iter) + iter.Release() + if err != nil { + return err + } + closed = true + reader.Close() + if err := s.stor.Rename(tmpFd, fd); err != nil { + return err + } + size = newSize + } + if tSeq > maxSeq { + maxSeq = tSeq + } + recoveredKey += tgoodKey + // Add table to level 0. + rec.addTable(0, fd.Num, size, imin, imax) + s.logf("table@recovery recovered @%d Gk·%d Ck·%d Cb·%d S·%d Q·%d", fd.Num, tgoodKey, tcorruptedKey, tcorruptedBlock, size, tSeq) + } else { + droppedTable++ + s.logf("table@recovery unrecoverable @%d Ck·%d Cb·%d S·%d", fd.Num, tcorruptedKey, tcorruptedBlock, size) + } + + return nil + } + + // Recover all tables. + if len(fds) > 0 { + s.logf("table@recovery F·%d", len(fds)) + + // Mark file number as used. + s.markFileNum(fds[len(fds)-1].Num) + + for _, fd := range fds { + if err := recoverTable(fd); err != nil { + return err + } + } + + s.logf("table@recovery recovered F·%d N·%d Gk·%d Ck·%d Q·%d", len(fds), recoveredKey, goodKey, corruptedKey, maxSeq) + } + + // Set sequence number. + rec.setSeqNum(maxSeq) + + // Create new manifest. + if err := s.create(); err != nil { + return err + } + + // Commit. + return s.commit(rec) +} + +func (db *DB) recoverJournal() error { + // Get all journals and sort it by file number. + rawFds, err := db.s.stor.List(storage.TypeJournal) + if err != nil { + return err + } + sortFds(rawFds) + + // Journals that will be recovered. + var fds []storage.FileDesc + for _, fd := range rawFds { + if fd.Num >= db.s.stJournalNum || fd.Num == db.s.stPrevJournalNum { + fds = append(fds, fd) + } + } + + var ( + ofd storage.FileDesc // Obsolete file. + rec = &sessionRecord{} + ) + + // Recover journals. + if len(fds) > 0 { + db.logf("journal@recovery F·%d", len(fds)) + + // Mark file number as used. + db.s.markFileNum(fds[len(fds)-1].Num) + + var ( + // Options. + strict = db.s.o.GetStrict(opt.StrictJournal) + checksum = db.s.o.GetStrict(opt.StrictJournalChecksum) + writeBuffer = db.s.o.GetWriteBuffer() + + jr *journal.Reader + mdb = memdb.New(db.s.icmp, writeBuffer) + buf = &util.Buffer{} + batch = &Batch{} + ) + + for _, fd := range fds { + db.logf("journal@recovery recovering @%d", fd.Num) + + fr, err := db.s.stor.Open(fd) + if err != nil { + return err + } + + // Create or reset journal reader instance. + if jr == nil { + jr = journal.NewReader(fr, dropper{db.s, fd}, strict, checksum) + } else { + jr.Reset(fr, dropper{db.s, fd}, strict, checksum) + } + + // Flush memdb and remove obsolete journal file. + if !ofd.Nil() { + if mdb.Len() > 0 { + if _, err := db.s.flushMemdb(rec, mdb, 0); err != nil { + fr.Close() + return err + } + } + + rec.setJournalNum(fd.Num) + rec.setSeqNum(db.seq) + if err := db.s.commit(rec); err != nil { + fr.Close() + return err + } + rec.resetAddedTables() + + db.s.stor.Remove(ofd) + ofd = storage.FileDesc{} + } + + // Replay journal to memdb. + mdb.Reset() + for { + r, err := jr.Next() + if err != nil { + if err == io.EOF { + break + } + + fr.Close() + return errors.SetFd(err, fd) + } + + buf.Reset() + if _, err := buf.ReadFrom(r); err != nil { + if err == io.ErrUnexpectedEOF { + // This is error returned due to corruption, with strict == false. + continue + } + + fr.Close() + return errors.SetFd(err, fd) + } + if err := batch.memDecodeAndReplay(db.seq, buf.Bytes(), mdb); err != nil { + if !strict && errors.IsCorrupted(err) { + db.s.logf("journal error: %v (skipped)", err) + // We won't apply sequence number as it might be corrupted. + continue + } + + fr.Close() + return errors.SetFd(err, fd) + } + + // Save sequence number. + db.seq = batch.seq + uint64(batch.Len()) + + // Flush it if large enough. + if mdb.Size() >= writeBuffer { + if _, err := db.s.flushMemdb(rec, mdb, 0); err != nil { + fr.Close() + return err + } + + mdb.Reset() + } + } + + fr.Close() + ofd = fd + } + + // Flush the last memdb. + if mdb.Len() > 0 { + if _, err := db.s.flushMemdb(rec, mdb, 0); err != nil { + return err + } + } + } + + // Create a new journal. + if _, err := db.newMem(0); err != nil { + return err + } + + // Commit. + rec.setJournalNum(db.journalFd.Num) + rec.setSeqNum(db.seq) + if err := db.s.commit(rec); err != nil { + // Close journal on error. + if db.journal != nil { + db.journal.Close() + db.journalWriter.Close() + } + return err + } + + // Remove the last obsolete journal file. + if !ofd.Nil() { + db.s.stor.Remove(ofd) + } + + return nil +} + +func (db *DB) recoverJournalRO() error { + // Get all journals and sort it by file number. + rawFds, err := db.s.stor.List(storage.TypeJournal) + if err != nil { + return err + } + sortFds(rawFds) + + // Journals that will be recovered. + var fds []storage.FileDesc + for _, fd := range rawFds { + if fd.Num >= db.s.stJournalNum || fd.Num == db.s.stPrevJournalNum { + fds = append(fds, fd) + } + } + + var ( + // Options. + strict = db.s.o.GetStrict(opt.StrictJournal) + checksum = db.s.o.GetStrict(opt.StrictJournalChecksum) + writeBuffer = db.s.o.GetWriteBuffer() + + mdb = memdb.New(db.s.icmp, writeBuffer) + ) + + // Recover journals. + if len(fds) > 0 { + db.logf("journal@recovery RO·Mode F·%d", len(fds)) + + var ( + jr *journal.Reader + buf = &util.Buffer{} + batch = &Batch{} + ) + + for _, fd := range fds { + db.logf("journal@recovery recovering @%d", fd.Num) + + fr, err := db.s.stor.Open(fd) + if err != nil { + return err + } + + // Create or reset journal reader instance. + if jr == nil { + jr = journal.NewReader(fr, dropper{db.s, fd}, strict, checksum) + } else { + jr.Reset(fr, dropper{db.s, fd}, strict, checksum) + } + + // Replay journal to memdb. + for { + r, err := jr.Next() + if err != nil { + if err == io.EOF { + break + } + + fr.Close() + return errors.SetFd(err, fd) + } + + buf.Reset() + if _, err := buf.ReadFrom(r); err != nil { + if err == io.ErrUnexpectedEOF { + // This is error returned due to corruption, with strict == false. + continue + } + + fr.Close() + return errors.SetFd(err, fd) + } + if err := batch.memDecodeAndReplay(db.seq, buf.Bytes(), mdb); err != nil { + if !strict && errors.IsCorrupted(err) { + db.s.logf("journal error: %v (skipped)", err) + // We won't apply sequence number as it might be corrupted. + continue + } + + fr.Close() + return errors.SetFd(err, fd) + } + + // Save sequence number. + db.seq = batch.seq + uint64(batch.Len()) + } + + fr.Close() + } + } + + // Set memDB. + db.mem = &memDB{db: db, DB: mdb, ref: 1} + + return nil +} + +func memGet(mdb *memdb.DB, ikey internalKey, icmp *iComparer) (ok bool, mv []byte, err error) { + mk, mv, err := mdb.Find(ikey) + if err == nil { + ukey, _, kt, kerr := parseInternalKey(mk) + if kerr != nil { + // Shouldn't have had happen. + panic(kerr) + } + if icmp.uCompare(ukey, ikey.ukey()) == 0 { + if kt == keyTypeDel { + return true, nil, ErrNotFound + } + return true, mv, nil + + } + } else if err != ErrNotFound { + return true, nil, err + } + return +} + +func (db *DB) get(auxm *memdb.DB, auxt tFiles, key []byte, seq uint64, ro *opt.ReadOptions) (value []byte, err error) { + ikey := makeInternalKey(nil, key, seq, keyTypeSeek) + + if auxm != nil { + if ok, mv, me := memGet(auxm, ikey, db.s.icmp); ok { + return append([]byte{}, mv...), me + } + } + + em, fm := db.getMems() + for _, m := range [...]*memDB{em, fm} { + if m == nil { + continue + } + defer m.decref() + + if ok, mv, me := memGet(m.DB, ikey, db.s.icmp); ok { + return append([]byte{}, mv...), me + } + } + + v := db.s.version() + value, cSched, err := v.get(auxt, ikey, ro, false) + v.release() + if cSched { + // Trigger table compaction. + db.compTrigger(db.tcompCmdC) + } + return +} + +func nilIfNotFound(err error) error { + if err == ErrNotFound { + return nil + } + return err +} + +func (db *DB) has(auxm *memdb.DB, auxt tFiles, key []byte, seq uint64, ro *opt.ReadOptions) (ret bool, err error) { + ikey := makeInternalKey(nil, key, seq, keyTypeSeek) + + if auxm != nil { + if ok, _, me := memGet(auxm, ikey, db.s.icmp); ok { + return me == nil, nilIfNotFound(me) + } + } + + em, fm := db.getMems() + for _, m := range [...]*memDB{em, fm} { + if m == nil { + continue + } + defer m.decref() + + if ok, _, me := memGet(m.DB, ikey, db.s.icmp); ok { + return me == nil, nilIfNotFound(me) + } + } + + v := db.s.version() + _, cSched, err := v.get(auxt, ikey, ro, true) + v.release() + if cSched { + // Trigger table compaction. + db.compTrigger(db.tcompCmdC) + } + if err == nil { + ret = true + } else if err == ErrNotFound { + err = nil + } + return +} + +// Get gets the value for the given key. It returns ErrNotFound if the +// DB does not contains the key. +// +// The returned slice is its own copy, it is safe to modify the contents +// of the returned slice. +// It is safe to modify the contents of the argument after Get returns. +func (db *DB) Get(key []byte, ro *opt.ReadOptions) (value []byte, err error) { + err = db.ok() + if err != nil { + return + } + + se := db.acquireSnapshot() + defer db.releaseSnapshot(se) + return db.get(nil, nil, key, se.seq, ro) +} + +// Has returns true if the DB does contains the given key. +// +// It is safe to modify the contents of the argument after Get returns. +func (db *DB) Has(key []byte, ro *opt.ReadOptions) (ret bool, err error) { + err = db.ok() + if err != nil { + return + } + + se := db.acquireSnapshot() + defer db.releaseSnapshot(se) + return db.has(nil, nil, key, se.seq, ro) +} + +// NewIterator returns an iterator for the latest snapshot of the +// underlying DB. +// The returned iterator is not goroutine-safe, but it is safe to use +// multiple iterators concurrently, with each in a dedicated goroutine. +// It is also safe to use an iterator concurrently with modifying its +// underlying DB. The resultant key/value pairs are guaranteed to be +// consistent. +// +// Slice allows slicing the iterator to only contains keys in the given +// range. A nil Range.Start is treated as a key before all keys in the +// DB. And a nil Range.Limit is treated as a key after all keys in +// the DB. +// +// The iterator must be released after use, by calling Release method. +// +// Also read Iterator documentation of the leveldb/iterator package. +func (db *DB) NewIterator(slice *util.Range, ro *opt.ReadOptions) iterator.Iterator { + if err := db.ok(); err != nil { + return iterator.NewEmptyIterator(err) + } + + se := db.acquireSnapshot() + defer db.releaseSnapshot(se) + // Iterator holds 'version' lock, 'version' is immutable so snapshot + // can be released after iterator created. + return db.newIterator(nil, nil, se.seq, slice, ro) +} + +// GetSnapshot returns a latest snapshot of the underlying DB. A snapshot +// is a frozen snapshot of a DB state at a particular point in time. The +// content of snapshot are guaranteed to be consistent. +// +// The snapshot must be released after use, by calling Release method. +func (db *DB) GetSnapshot() (*Snapshot, error) { + if err := db.ok(); err != nil { + return nil, err + } + + return db.newSnapshot(), nil +} + +// GetProperty returns value of the given property name. +// +// Property names: +// leveldb.num-files-at-level{n} +// Returns the number of files at level 'n'. +// leveldb.stats +// Returns statistics of the underlying DB. +// leveldb.sstables +// Returns sstables list for each level. +// leveldb.blockpool +// Returns block pool stats. +// leveldb.cachedblock +// Returns size of cached block. +// leveldb.openedtables +// Returns number of opened tables. +// leveldb.alivesnaps +// Returns number of alive snapshots. +// leveldb.aliveiters +// Returns number of alive iterators. +func (db *DB) GetProperty(name string) (value string, err error) { + err = db.ok() + if err != nil { + return + } + + const prefix = "leveldb." + if !strings.HasPrefix(name, prefix) { + return "", ErrNotFound + } + p := name[len(prefix):] + + v := db.s.version() + defer v.release() + + numFilesPrefix := "num-files-at-level" + switch { + case strings.HasPrefix(p, numFilesPrefix): + var level uint + var rest string + n, _ := fmt.Sscanf(p[len(numFilesPrefix):], "%d%s", &level, &rest) + if n != 1 { + err = ErrNotFound + } else { + value = fmt.Sprint(v.tLen(int(level))) + } + case p == "stats": + value = "Compactions\n" + + " Level | Tables | Size(MB) | Time(sec) | Read(MB) | Write(MB)\n" + + "-------+------------+---------------+---------------+---------------+---------------\n" + for level, tables := range v.levels { + duration, read, write := db.compStats.getStat(level) + if len(tables) == 0 && duration == 0 { + continue + } + value += fmt.Sprintf(" %3d | %10d | %13.5f | %13.5f | %13.5f | %13.5f\n", + level, len(tables), float64(tables.size())/1048576.0, duration.Seconds(), + float64(read)/1048576.0, float64(write)/1048576.0) + } + case p == "sstables": + for level, tables := range v.levels { + value += fmt.Sprintf("--- level %d ---\n", level) + for _, t := range tables { + value += fmt.Sprintf("%d:%d[%q .. %q]\n", t.fd.Num, t.size, t.imin, t.imax) + } + } + case p == "blockpool": + value = fmt.Sprintf("%v", db.s.tops.bpool) + case p == "cachedblock": + if db.s.tops.bcache != nil { + value = fmt.Sprintf("%d", db.s.tops.bcache.Size()) + } else { + value = "" + } + case p == "openedtables": + value = fmt.Sprintf("%d", db.s.tops.cache.Size()) + case p == "alivesnaps": + value = fmt.Sprintf("%d", atomic.LoadInt32(&db.aliveSnaps)) + case p == "aliveiters": + value = fmt.Sprintf("%d", atomic.LoadInt32(&db.aliveIters)) + default: + err = ErrNotFound + } + + return +} + +// SizeOf calculates approximate sizes of the given key ranges. +// The length of the returned sizes are equal with the length of the given +// ranges. The returned sizes measure storage space usage, so if the user +// data compresses by a factor of ten, the returned sizes will be one-tenth +// the size of the corresponding user data size. +// The results may not include the sizes of recently written data. +func (db *DB) SizeOf(ranges []util.Range) (Sizes, error) { + if err := db.ok(); err != nil { + return nil, err + } + + v := db.s.version() + defer v.release() + + sizes := make(Sizes, 0, len(ranges)) + for _, r := range ranges { + imin := makeInternalKey(nil, r.Start, keyMaxSeq, keyTypeSeek) + imax := makeInternalKey(nil, r.Limit, keyMaxSeq, keyTypeSeek) + start, err := v.offsetOf(imin) + if err != nil { + return nil, err + } + limit, err := v.offsetOf(imax) + if err != nil { + return nil, err + } + var size int64 + if limit >= start { + size = limit - start + } + sizes = append(sizes, size) + } + + return sizes, nil +} + +// Close closes the DB. This will also releases any outstanding snapshot, +// abort any in-flight compaction and discard open transaction. +// +// It is not safe to close a DB until all outstanding iterators are released. +// It is valid to call Close multiple times. Other methods should not be +// called after the DB has been closed. +func (db *DB) Close() error { + if !db.setClosed() { + return ErrClosed + } + + start := time.Now() + db.log("db@close closing") + + // Clear the finalizer. + runtime.SetFinalizer(db, nil) + + // Get compaction error. + var err error + select { + case err = <-db.compErrC: + if err == ErrReadOnly { + err = nil + } + default: + } + + // Signal all goroutines. + close(db.closeC) + + // Discard open transaction. + if db.tr != nil { + db.tr.Discard() + } + + // Acquire writer lock. + db.writeLockC <- struct{}{} + + // Wait for all gorotines to exit. + db.closeW.Wait() + + // Closes journal. + if db.journal != nil { + db.journal.Close() + db.journalWriter.Close() + } + + if db.writeDelayN > 0 { + db.logf("db@write was delayed N·%d T·%v", db.writeDelayN, db.writeDelay) + } + + // Close session. + db.s.close() + db.logf("db@close done T·%v", time.Since(start)) + db.s.release() + + if db.closer != nil { + if err1 := db.closer.Close(); err == nil { + err = err1 + } + } + + // NIL'ing pointers. + db.s = nil + db.mem = nil + db.frozenMem = nil + db.journal = nil + db.journalWriter = nil + db.closer = nil + + return err +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go b/vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go new file mode 100644 index 000000000..9664e64d0 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/db_compaction.go @@ -0,0 +1,826 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "sync" + "time" + + "github.com/syndtr/goleveldb/leveldb/errors" + "github.com/syndtr/goleveldb/leveldb/opt" + "github.com/syndtr/goleveldb/leveldb/storage" +) + +var ( + errCompactionTransactExiting = errors.New("leveldb: compaction transact exiting") +) + +type cStat struct { + duration time.Duration + read int64 + write int64 +} + +func (p *cStat) add(n *cStatStaging) { + p.duration += n.duration + p.read += n.read + p.write += n.write +} + +func (p *cStat) get() (duration time.Duration, read, write int64) { + return p.duration, p.read, p.write +} + +type cStatStaging struct { + start time.Time + duration time.Duration + on bool + read int64 + write int64 +} + +func (p *cStatStaging) startTimer() { + if !p.on { + p.start = time.Now() + p.on = true + } +} + +func (p *cStatStaging) stopTimer() { + if p.on { + p.duration += time.Since(p.start) + p.on = false + } +} + +type cStats struct { + lk sync.Mutex + stats []cStat +} + +func (p *cStats) addStat(level int, n *cStatStaging) { + p.lk.Lock() + if level >= len(p.stats) { + newStats := make([]cStat, level+1) + copy(newStats, p.stats) + p.stats = newStats + } + p.stats[level].add(n) + p.lk.Unlock() +} + +func (p *cStats) getStat(level int) (duration time.Duration, read, write int64) { + p.lk.Lock() + defer p.lk.Unlock() + if level < len(p.stats) { + return p.stats[level].get() + } + return +} + +func (db *DB) compactionError() { + var err error +noerr: + // No error. + for { + select { + case err = <-db.compErrSetC: + switch { + case err == nil: + case err == ErrReadOnly, errors.IsCorrupted(err): + goto hasperr + default: + goto haserr + } + case _, _ = <-db.closeC: + return + } + } +haserr: + // Transient error. + for { + select { + case db.compErrC <- err: + case err = <-db.compErrSetC: + switch { + case err == nil: + goto noerr + case err == ErrReadOnly, errors.IsCorrupted(err): + goto hasperr + default: + } + case _, _ = <-db.closeC: + return + } + } +hasperr: + // Persistent error. + for { + select { + case db.compErrC <- err: + case db.compPerErrC <- err: + case db.writeLockC <- struct{}{}: + // Hold write lock, so that write won't pass-through. + db.compWriteLocking = true + case _, _ = <-db.closeC: + if db.compWriteLocking { + // We should release the lock or Close will hang. + <-db.writeLockC + } + return + } + } +} + +type compactionTransactCounter int + +func (cnt *compactionTransactCounter) incr() { + *cnt++ +} + +type compactionTransactInterface interface { + run(cnt *compactionTransactCounter) error + revert() error +} + +func (db *DB) compactionTransact(name string, t compactionTransactInterface) { + defer func() { + if x := recover(); x != nil { + if x == errCompactionTransactExiting { + if err := t.revert(); err != nil { + db.logf("%s revert error %q", name, err) + } + } + panic(x) + } + }() + + const ( + backoffMin = 1 * time.Second + backoffMax = 8 * time.Second + backoffMul = 2 * time.Second + ) + var ( + backoff = backoffMin + backoffT = time.NewTimer(backoff) + lastCnt = compactionTransactCounter(0) + + disableBackoff = db.s.o.GetDisableCompactionBackoff() + ) + for n := 0; ; n++ { + // Check wether the DB is closed. + if db.isClosed() { + db.logf("%s exiting", name) + db.compactionExitTransact() + } else if n > 0 { + db.logf("%s retrying N·%d", name, n) + } + + // Execute. + cnt := compactionTransactCounter(0) + err := t.run(&cnt) + if err != nil { + db.logf("%s error I·%d %q", name, cnt, err) + } + + // Set compaction error status. + select { + case db.compErrSetC <- err: + case perr := <-db.compPerErrC: + if err != nil { + db.logf("%s exiting (persistent error %q)", name, perr) + db.compactionExitTransact() + } + case _, _ = <-db.closeC: + db.logf("%s exiting", name) + db.compactionExitTransact() + } + if err == nil { + return + } + if errors.IsCorrupted(err) { + db.logf("%s exiting (corruption detected)", name) + db.compactionExitTransact() + } + + if !disableBackoff { + // Reset backoff duration if counter is advancing. + if cnt > lastCnt { + backoff = backoffMin + lastCnt = cnt + } + + // Backoff. + backoffT.Reset(backoff) + if backoff < backoffMax { + backoff *= backoffMul + if backoff > backoffMax { + backoff = backoffMax + } + } + select { + case <-backoffT.C: + case _, _ = <-db.closeC: + db.logf("%s exiting", name) + db.compactionExitTransact() + } + } + } +} + +type compactionTransactFunc struct { + runFunc func(cnt *compactionTransactCounter) error + revertFunc func() error +} + +func (t *compactionTransactFunc) run(cnt *compactionTransactCounter) error { + return t.runFunc(cnt) +} + +func (t *compactionTransactFunc) revert() error { + if t.revertFunc != nil { + return t.revertFunc() + } + return nil +} + +func (db *DB) compactionTransactFunc(name string, run func(cnt *compactionTransactCounter) error, revert func() error) { + db.compactionTransact(name, &compactionTransactFunc{run, revert}) +} + +func (db *DB) compactionExitTransact() { + panic(errCompactionTransactExiting) +} + +func (db *DB) compactionCommit(name string, rec *sessionRecord) { + db.compCommitLk.Lock() + defer db.compCommitLk.Unlock() // Defer is necessary. + db.compactionTransactFunc(name+"@commit", func(cnt *compactionTransactCounter) error { + return db.s.commit(rec) + }, nil) +} + +func (db *DB) memCompaction() { + mdb := db.getFrozenMem() + if mdb == nil { + return + } + defer mdb.decref() + + db.logf("memdb@flush N·%d S·%s", mdb.Len(), shortenb(mdb.Size())) + + // Don't compact empty memdb. + if mdb.Len() == 0 { + db.logf("memdb@flush skipping") + // drop frozen memdb + db.dropFrozenMem() + return + } + + // Pause table compaction. + resumeC := make(chan struct{}) + select { + case db.tcompPauseC <- (chan<- struct{})(resumeC): + case <-db.compPerErrC: + close(resumeC) + resumeC = nil + case _, _ = <-db.closeC: + return + } + + var ( + rec = &sessionRecord{} + stats = &cStatStaging{} + flushLevel int + ) + + // Generate tables. + db.compactionTransactFunc("memdb@flush", func(cnt *compactionTransactCounter) (err error) { + stats.startTimer() + flushLevel, err = db.s.flushMemdb(rec, mdb.DB, db.memdbMaxLevel) + stats.stopTimer() + return + }, func() error { + for _, r := range rec.addedTables { + db.logf("memdb@flush revert @%d", r.num) + if err := db.s.stor.Remove(storage.FileDesc{Type: storage.TypeTable, Num: r.num}); err != nil { + return err + } + } + return nil + }) + + rec.setJournalNum(db.journalFd.Num) + rec.setSeqNum(db.frozenSeq) + + // Commit. + stats.startTimer() + db.compactionCommit("memdb", rec) + stats.stopTimer() + + db.logf("memdb@flush committed F·%d T·%v", len(rec.addedTables), stats.duration) + + for _, r := range rec.addedTables { + stats.write += r.size + } + db.compStats.addStat(flushLevel, stats) + + // Drop frozen memdb. + db.dropFrozenMem() + + // Resume table compaction. + if resumeC != nil { + select { + case <-resumeC: + close(resumeC) + case _, _ = <-db.closeC: + return + } + } + + // Trigger table compaction. + db.compTrigger(db.tcompCmdC) +} + +type tableCompactionBuilder struct { + db *DB + s *session + c *compaction + rec *sessionRecord + stat0, stat1 *cStatStaging + + snapHasLastUkey bool + snapLastUkey []byte + snapLastSeq uint64 + snapIter int + snapKerrCnt int + snapDropCnt int + + kerrCnt int + dropCnt int + + minSeq uint64 + strict bool + tableSize int + + tw *tWriter +} + +func (b *tableCompactionBuilder) appendKV(key, value []byte) error { + // Create new table if not already. + if b.tw == nil { + // Check for pause event. + if b.db != nil { + select { + case ch := <-b.db.tcompPauseC: + b.db.pauseCompaction(ch) + case _, _ = <-b.db.closeC: + b.db.compactionExitTransact() + default: + } + } + + // Create new table. + var err error + b.tw, err = b.s.tops.create() + if err != nil { + return err + } + } + + // Write key/value into table. + return b.tw.append(key, value) +} + +func (b *tableCompactionBuilder) needFlush() bool { + return b.tw.tw.BytesLen() >= b.tableSize +} + +func (b *tableCompactionBuilder) flush() error { + t, err := b.tw.finish() + if err != nil { + return err + } + b.rec.addTableFile(b.c.sourceLevel+1, t) + b.stat1.write += t.size + b.s.logf("table@build created L%d@%d N·%d S·%s %q:%q", b.c.sourceLevel+1, t.fd.Num, b.tw.tw.EntriesLen(), shortenb(int(t.size)), t.imin, t.imax) + b.tw = nil + return nil +} + +func (b *tableCompactionBuilder) cleanup() { + if b.tw != nil { + b.tw.drop() + b.tw = nil + } +} + +func (b *tableCompactionBuilder) run(cnt *compactionTransactCounter) error { + snapResumed := b.snapIter > 0 + hasLastUkey := b.snapHasLastUkey // The key might has zero length, so this is necessary. + lastUkey := append([]byte{}, b.snapLastUkey...) + lastSeq := b.snapLastSeq + b.kerrCnt = b.snapKerrCnt + b.dropCnt = b.snapDropCnt + // Restore compaction state. + b.c.restore() + + defer b.cleanup() + + b.stat1.startTimer() + defer b.stat1.stopTimer() + + iter := b.c.newIterator() + defer iter.Release() + for i := 0; iter.Next(); i++ { + // Incr transact counter. + cnt.incr() + + // Skip until last state. + if i < b.snapIter { + continue + } + + resumed := false + if snapResumed { + resumed = true + snapResumed = false + } + + ikey := iter.Key() + ukey, seq, kt, kerr := parseInternalKey(ikey) + + if kerr == nil { + shouldStop := !resumed && b.c.shouldStopBefore(ikey) + + if !hasLastUkey || b.s.icmp.uCompare(lastUkey, ukey) != 0 { + // First occurrence of this user key. + + // Only rotate tables if ukey doesn't hop across. + if b.tw != nil && (shouldStop || b.needFlush()) { + if err := b.flush(); err != nil { + return err + } + + // Creates snapshot of the state. + b.c.save() + b.snapHasLastUkey = hasLastUkey + b.snapLastUkey = append(b.snapLastUkey[:0], lastUkey...) + b.snapLastSeq = lastSeq + b.snapIter = i + b.snapKerrCnt = b.kerrCnt + b.snapDropCnt = b.dropCnt + } + + hasLastUkey = true + lastUkey = append(lastUkey[:0], ukey...) + lastSeq = keyMaxSeq + } + + switch { + case lastSeq <= b.minSeq: + // Dropped because newer entry for same user key exist + fallthrough // (A) + case kt == keyTypeDel && seq <= b.minSeq && b.c.baseLevelForKey(lastUkey): + // For this user key: + // (1) there is no data in higher levels + // (2) data in lower levels will have larger seq numbers + // (3) data in layers that are being compacted here and have + // smaller seq numbers will be dropped in the next + // few iterations of this loop (by rule (A) above). + // Therefore this deletion marker is obsolete and can be dropped. + lastSeq = seq + b.dropCnt++ + continue + default: + lastSeq = seq + } + } else { + if b.strict { + return kerr + } + + // Don't drop corrupted keys. + hasLastUkey = false + lastUkey = lastUkey[:0] + lastSeq = keyMaxSeq + b.kerrCnt++ + } + + if err := b.appendKV(ikey, iter.Value()); err != nil { + return err + } + } + + if err := iter.Error(); err != nil { + return err + } + + // Finish last table. + if b.tw != nil && !b.tw.empty() { + return b.flush() + } + return nil +} + +func (b *tableCompactionBuilder) revert() error { + for _, at := range b.rec.addedTables { + b.s.logf("table@build revert @%d", at.num) + if err := b.s.stor.Remove(storage.FileDesc{Type: storage.TypeTable, Num: at.num}); err != nil { + return err + } + } + return nil +} + +func (db *DB) tableCompaction(c *compaction, noTrivial bool) { + defer c.release() + + rec := &sessionRecord{} + rec.addCompPtr(c.sourceLevel, c.imax) + + if !noTrivial && c.trivial() { + t := c.levels[0][0] + db.logf("table@move L%d@%d -> L%d", c.sourceLevel, t.fd.Num, c.sourceLevel+1) + rec.delTable(c.sourceLevel, t.fd.Num) + rec.addTableFile(c.sourceLevel+1, t) + db.compactionCommit("table-move", rec) + return + } + + var stats [2]cStatStaging + for i, tables := range c.levels { + for _, t := range tables { + stats[i].read += t.size + // Insert deleted tables into record + rec.delTable(c.sourceLevel+i, t.fd.Num) + } + } + sourceSize := int(stats[0].read + stats[1].read) + minSeq := db.minSeq() + db.logf("table@compaction L%d·%d -> L%d·%d S·%s Q·%d", c.sourceLevel, len(c.levels[0]), c.sourceLevel+1, len(c.levels[1]), shortenb(sourceSize), minSeq) + + b := &tableCompactionBuilder{ + db: db, + s: db.s, + c: c, + rec: rec, + stat1: &stats[1], + minSeq: minSeq, + strict: db.s.o.GetStrict(opt.StrictCompaction), + tableSize: db.s.o.GetCompactionTableSize(c.sourceLevel + 1), + } + db.compactionTransact("table@build", b) + + // Commit. + stats[1].startTimer() + db.compactionCommit("table", rec) + stats[1].stopTimer() + + resultSize := int(stats[1].write) + db.logf("table@compaction committed F%s S%s Ke·%d D·%d T·%v", sint(len(rec.addedTables)-len(rec.deletedTables)), sshortenb(resultSize-sourceSize), b.kerrCnt, b.dropCnt, stats[1].duration) + + // Save compaction stats + for i := range stats { + db.compStats.addStat(c.sourceLevel+1, &stats[i]) + } +} + +func (db *DB) tableRangeCompaction(level int, umin, umax []byte) error { + db.logf("table@compaction range L%d %q:%q", level, umin, umax) + if level >= 0 { + if c := db.s.getCompactionRange(level, umin, umax, true); c != nil { + db.tableCompaction(c, true) + } + } else { + // Retry until nothing to compact. + for { + compacted := false + + // Scan for maximum level with overlapped tables. + v := db.s.version() + m := 1 + for i := m; i < len(v.levels); i++ { + tables := v.levels[i] + if tables.overlaps(db.s.icmp, umin, umax, false) { + m = i + } + } + v.release() + + for level := 0; level < m; level++ { + if c := db.s.getCompactionRange(level, umin, umax, false); c != nil { + db.tableCompaction(c, true) + compacted = true + } + } + + if !compacted { + break + } + } + } + + return nil +} + +func (db *DB) tableAutoCompaction() { + if c := db.s.pickCompaction(); c != nil { + db.tableCompaction(c, false) + } +} + +func (db *DB) tableNeedCompaction() bool { + v := db.s.version() + defer v.release() + return v.needCompaction() +} + +func (db *DB) pauseCompaction(ch chan<- struct{}) { + select { + case ch <- struct{}{}: + case _, _ = <-db.closeC: + db.compactionExitTransact() + } +} + +type cCmd interface { + ack(err error) +} + +type cAuto struct { + ackC chan<- error +} + +func (r cAuto) ack(err error) { + if r.ackC != nil { + defer func() { + recover() + }() + r.ackC <- err + } +} + +type cRange struct { + level int + min, max []byte + ackC chan<- error +} + +func (r cRange) ack(err error) { + if r.ackC != nil { + defer func() { + recover() + }() + r.ackC <- err + } +} + +// This will trigger auto compaction but will not wait for it. +func (db *DB) compTrigger(compC chan<- cCmd) { + select { + case compC <- cAuto{}: + default: + } +} + +// This will trigger auto compation and/or wait for all compaction to be done. +func (db *DB) compTriggerWait(compC chan<- cCmd) (err error) { + ch := make(chan error) + defer close(ch) + // Send cmd. + select { + case compC <- cAuto{ch}: + case err = <-db.compErrC: + return + case _, _ = <-db.closeC: + return ErrClosed + } + // Wait cmd. + select { + case err = <-ch: + case err = <-db.compErrC: + case _, _ = <-db.closeC: + return ErrClosed + } + return err +} + +// Send range compaction request. +func (db *DB) compTriggerRange(compC chan<- cCmd, level int, min, max []byte) (err error) { + ch := make(chan error) + defer close(ch) + // Send cmd. + select { + case compC <- cRange{level, min, max, ch}: + case err := <-db.compErrC: + return err + case _, _ = <-db.closeC: + return ErrClosed + } + // Wait cmd. + select { + case err = <-ch: + case err = <-db.compErrC: + case _, _ = <-db.closeC: + return ErrClosed + } + return err +} + +func (db *DB) mCompaction() { + var x cCmd + + defer func() { + if x := recover(); x != nil { + if x != errCompactionTransactExiting { + panic(x) + } + } + if x != nil { + x.ack(ErrClosed) + } + db.closeW.Done() + }() + + for { + select { + case x = <-db.mcompCmdC: + switch x.(type) { + case cAuto: + db.memCompaction() + x.ack(nil) + x = nil + default: + panic("leveldb: unknown command") + } + case _, _ = <-db.closeC: + return + } + } +} + +func (db *DB) tCompaction() { + var x cCmd + var ackQ []cCmd + + defer func() { + if x := recover(); x != nil { + if x != errCompactionTransactExiting { + panic(x) + } + } + for i := range ackQ { + ackQ[i].ack(ErrClosed) + ackQ[i] = nil + } + if x != nil { + x.ack(ErrClosed) + } + db.closeW.Done() + }() + + for { + if db.tableNeedCompaction() { + select { + case x = <-db.tcompCmdC: + case ch := <-db.tcompPauseC: + db.pauseCompaction(ch) + continue + case _, _ = <-db.closeC: + return + default: + } + } else { + for i := range ackQ { + ackQ[i].ack(nil) + ackQ[i] = nil + } + ackQ = ackQ[:0] + select { + case x = <-db.tcompCmdC: + case ch := <-db.tcompPauseC: + db.pauseCompaction(ch) + continue + case _, _ = <-db.closeC: + return + } + } + if x != nil { + switch cmd := x.(type) { + case cAuto: + ackQ = append(ackQ, x) + case cRange: + x.ack(db.tableRangeCompaction(cmd.level, cmd.min, cmd.max)) + default: + panic("leveldb: unknown command") + } + x = nil + } + db.tableAutoCompaction() + } +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/db_iter.go b/vendor/github.com/syndtr/goleveldb/leveldb/db_iter.go new file mode 100644 index 000000000..03c24cdab --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/db_iter.go @@ -0,0 +1,360 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "errors" + "math/rand" + "runtime" + "sync" + "sync/atomic" + + "github.com/syndtr/goleveldb/leveldb/iterator" + "github.com/syndtr/goleveldb/leveldb/opt" + "github.com/syndtr/goleveldb/leveldb/util" +) + +var ( + errInvalidInternalKey = errors.New("leveldb: Iterator: invalid internal key") +) + +type memdbReleaser struct { + once sync.Once + m *memDB +} + +func (mr *memdbReleaser) Release() { + mr.once.Do(func() { + mr.m.decref() + }) +} + +func (db *DB) newRawIterator(auxm *memDB, auxt tFiles, slice *util.Range, ro *opt.ReadOptions) iterator.Iterator { + strict := opt.GetStrict(db.s.o.Options, ro, opt.StrictReader) + em, fm := db.getMems() + v := db.s.version() + + tableIts := v.getIterators(slice, ro) + n := len(tableIts) + len(auxt) + 3 + its := make([]iterator.Iterator, 0, n) + + if auxm != nil { + ami := auxm.NewIterator(slice) + ami.SetReleaser(&memdbReleaser{m: auxm}) + its = append(its, ami) + } + for _, t := range auxt { + its = append(its, v.s.tops.newIterator(t, slice, ro)) + } + + emi := em.NewIterator(slice) + emi.SetReleaser(&memdbReleaser{m: em}) + its = append(its, emi) + if fm != nil { + fmi := fm.NewIterator(slice) + fmi.SetReleaser(&memdbReleaser{m: fm}) + its = append(its, fmi) + } + its = append(its, tableIts...) + mi := iterator.NewMergedIterator(its, db.s.icmp, strict) + mi.SetReleaser(&versionReleaser{v: v}) + return mi +} + +func (db *DB) newIterator(auxm *memDB, auxt tFiles, seq uint64, slice *util.Range, ro *opt.ReadOptions) *dbIter { + var islice *util.Range + if slice != nil { + islice = &util.Range{} + if slice.Start != nil { + islice.Start = makeInternalKey(nil, slice.Start, keyMaxSeq, keyTypeSeek) + } + if slice.Limit != nil { + islice.Limit = makeInternalKey(nil, slice.Limit, keyMaxSeq, keyTypeSeek) + } + } + rawIter := db.newRawIterator(auxm, auxt, islice, ro) + iter := &dbIter{ + db: db, + icmp: db.s.icmp, + iter: rawIter, + seq: seq, + strict: opt.GetStrict(db.s.o.Options, ro, opt.StrictReader), + key: make([]byte, 0), + value: make([]byte, 0), + } + atomic.AddInt32(&db.aliveIters, 1) + runtime.SetFinalizer(iter, (*dbIter).Release) + return iter +} + +func (db *DB) iterSamplingRate() int { + return rand.Intn(2 * db.s.o.GetIteratorSamplingRate()) +} + +type dir int + +const ( + dirReleased dir = iota - 1 + dirSOI + dirEOI + dirBackward + dirForward +) + +// dbIter represent an interator states over a database session. +type dbIter struct { + db *DB + icmp *iComparer + iter iterator.Iterator + seq uint64 + strict bool + + smaplingGap int + dir dir + key []byte + value []byte + err error + releaser util.Releaser +} + +func (i *dbIter) sampleSeek() { + ikey := i.iter.Key() + i.smaplingGap -= len(ikey) + len(i.iter.Value()) + for i.smaplingGap < 0 { + i.smaplingGap += i.db.iterSamplingRate() + i.db.sampleSeek(ikey) + } +} + +func (i *dbIter) setErr(err error) { + i.err = err + i.key = nil + i.value = nil +} + +func (i *dbIter) iterErr() { + if err := i.iter.Error(); err != nil { + i.setErr(err) + } +} + +func (i *dbIter) Valid() bool { + return i.err == nil && i.dir > dirEOI +} + +func (i *dbIter) First() bool { + if i.err != nil { + return false + } else if i.dir == dirReleased { + i.err = ErrIterReleased + return false + } + + if i.iter.First() { + i.dir = dirSOI + return i.next() + } + i.dir = dirEOI + i.iterErr() + return false +} + +func (i *dbIter) Last() bool { + if i.err != nil { + return false + } else if i.dir == dirReleased { + i.err = ErrIterReleased + return false + } + + if i.iter.Last() { + return i.prev() + } + i.dir = dirSOI + i.iterErr() + return false +} + +func (i *dbIter) Seek(key []byte) bool { + if i.err != nil { + return false + } else if i.dir == dirReleased { + i.err = ErrIterReleased + return false + } + + ikey := makeInternalKey(nil, key, i.seq, keyTypeSeek) + if i.iter.Seek(ikey) { + i.dir = dirSOI + return i.next() + } + i.dir = dirEOI + i.iterErr() + return false +} + +func (i *dbIter) next() bool { + for { + if ukey, seq, kt, kerr := parseInternalKey(i.iter.Key()); kerr == nil { + i.sampleSeek() + if seq <= i.seq { + switch kt { + case keyTypeDel: + // Skip deleted key. + i.key = append(i.key[:0], ukey...) + i.dir = dirForward + case keyTypeVal: + if i.dir == dirSOI || i.icmp.uCompare(ukey, i.key) > 0 { + i.key = append(i.key[:0], ukey...) + i.value = append(i.value[:0], i.iter.Value()...) + i.dir = dirForward + return true + } + } + } + } else if i.strict { + i.setErr(kerr) + break + } + if !i.iter.Next() { + i.dir = dirEOI + i.iterErr() + break + } + } + return false +} + +func (i *dbIter) Next() bool { + if i.dir == dirEOI || i.err != nil { + return false + } else if i.dir == dirReleased { + i.err = ErrIterReleased + return false + } + + if !i.iter.Next() || (i.dir == dirBackward && !i.iter.Next()) { + i.dir = dirEOI + i.iterErr() + return false + } + return i.next() +} + +func (i *dbIter) prev() bool { + i.dir = dirBackward + del := true + if i.iter.Valid() { + for { + if ukey, seq, kt, kerr := parseInternalKey(i.iter.Key()); kerr == nil { + i.sampleSeek() + if seq <= i.seq { + if !del && i.icmp.uCompare(ukey, i.key) < 0 { + return true + } + del = (kt == keyTypeDel) + if !del { + i.key = append(i.key[:0], ukey...) + i.value = append(i.value[:0], i.iter.Value()...) + } + } + } else if i.strict { + i.setErr(kerr) + return false + } + if !i.iter.Prev() { + break + } + } + } + if del { + i.dir = dirSOI + i.iterErr() + return false + } + return true +} + +func (i *dbIter) Prev() bool { + if i.dir == dirSOI || i.err != nil { + return false + } else if i.dir == dirReleased { + i.err = ErrIterReleased + return false + } + + switch i.dir { + case dirEOI: + return i.Last() + case dirForward: + for i.iter.Prev() { + if ukey, _, _, kerr := parseInternalKey(i.iter.Key()); kerr == nil { + i.sampleSeek() + if i.icmp.uCompare(ukey, i.key) < 0 { + goto cont + } + } else if i.strict { + i.setErr(kerr) + return false + } + } + i.dir = dirSOI + i.iterErr() + return false + } + +cont: + return i.prev() +} + +func (i *dbIter) Key() []byte { + if i.err != nil || i.dir <= dirEOI { + return nil + } + return i.key +} + +func (i *dbIter) Value() []byte { + if i.err != nil || i.dir <= dirEOI { + return nil + } + return i.value +} + +func (i *dbIter) Release() { + if i.dir != dirReleased { + // Clear the finalizer. + runtime.SetFinalizer(i, nil) + + if i.releaser != nil { + i.releaser.Release() + i.releaser = nil + } + + i.dir = dirReleased + i.key = nil + i.value = nil + i.iter.Release() + i.iter = nil + atomic.AddInt32(&i.db.aliveIters, -1) + i.db = nil + } +} + +func (i *dbIter) SetReleaser(releaser util.Releaser) { + if i.dir == dirReleased { + panic(util.ErrReleased) + } + if i.releaser != nil && releaser != nil { + panic(util.ErrHasReleaser) + } + i.releaser = releaser +} + +func (i *dbIter) Error() error { + return i.err +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/db_snapshot.go b/vendor/github.com/syndtr/goleveldb/leveldb/db_snapshot.go new file mode 100644 index 000000000..977f65ba5 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/db_snapshot.go @@ -0,0 +1,183 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "container/list" + "fmt" + "runtime" + "sync" + "sync/atomic" + + "github.com/syndtr/goleveldb/leveldb/iterator" + "github.com/syndtr/goleveldb/leveldb/opt" + "github.com/syndtr/goleveldb/leveldb/util" +) + +type snapshotElement struct { + seq uint64 + ref int + e *list.Element +} + +// Acquires a snapshot, based on latest sequence. +func (db *DB) acquireSnapshot() *snapshotElement { + db.snapsMu.Lock() + defer db.snapsMu.Unlock() + + seq := db.getSeq() + + if e := db.snapsList.Back(); e != nil { + se := e.Value.(*snapshotElement) + if se.seq == seq { + se.ref++ + return se + } else if seq < se.seq { + panic("leveldb: sequence number is not increasing") + } + } + se := &snapshotElement{seq: seq, ref: 1} + se.e = db.snapsList.PushBack(se) + return se +} + +// Releases given snapshot element. +func (db *DB) releaseSnapshot(se *snapshotElement) { + db.snapsMu.Lock() + defer db.snapsMu.Unlock() + + se.ref-- + if se.ref == 0 { + db.snapsList.Remove(se.e) + se.e = nil + } else if se.ref < 0 { + panic("leveldb: Snapshot: negative element reference") + } +} + +// Gets minimum sequence that not being snapshoted. +func (db *DB) minSeq() uint64 { + db.snapsMu.Lock() + defer db.snapsMu.Unlock() + + if e := db.snapsList.Front(); e != nil { + return e.Value.(*snapshotElement).seq + } + + return db.getSeq() +} + +// Snapshot is a DB snapshot. +type Snapshot struct { + db *DB + elem *snapshotElement + mu sync.RWMutex + released bool +} + +// Creates new snapshot object. +func (db *DB) newSnapshot() *Snapshot { + snap := &Snapshot{ + db: db, + elem: db.acquireSnapshot(), + } + atomic.AddInt32(&db.aliveSnaps, 1) + runtime.SetFinalizer(snap, (*Snapshot).Release) + return snap +} + +func (snap *Snapshot) String() string { + return fmt.Sprintf("leveldb.Snapshot{%d}", snap.elem.seq) +} + +// Get gets the value for the given key. It returns ErrNotFound if +// the DB does not contains the key. +// +// The caller should not modify the contents of the returned slice, but +// it is safe to modify the contents of the argument after Get returns. +func (snap *Snapshot) Get(key []byte, ro *opt.ReadOptions) (value []byte, err error) { + err = snap.db.ok() + if err != nil { + return + } + snap.mu.RLock() + defer snap.mu.RUnlock() + if snap.released { + err = ErrSnapshotReleased + return + } + return snap.db.get(nil, nil, key, snap.elem.seq, ro) +} + +// Has returns true if the DB does contains the given key. +// +// It is safe to modify the contents of the argument after Get returns. +func (snap *Snapshot) Has(key []byte, ro *opt.ReadOptions) (ret bool, err error) { + err = snap.db.ok() + if err != nil { + return + } + snap.mu.RLock() + defer snap.mu.RUnlock() + if snap.released { + err = ErrSnapshotReleased + return + } + return snap.db.has(nil, nil, key, snap.elem.seq, ro) +} + +// NewIterator returns an iterator for the snapshot of the underlying DB. +// The returned iterator is not goroutine-safe, but it is safe to use +// multiple iterators concurrently, with each in a dedicated goroutine. +// It is also safe to use an iterator concurrently with modifying its +// underlying DB. The resultant key/value pairs are guaranteed to be +// consistent. +// +// Slice allows slicing the iterator to only contains keys in the given +// range. A nil Range.Start is treated as a key before all keys in the +// DB. And a nil Range.Limit is treated as a key after all keys in +// the DB. +// +// The iterator must be released after use, by calling Release method. +// Releasing the snapshot doesn't mean releasing the iterator too, the +// iterator would be still valid until released. +// +// Also read Iterator documentation of the leveldb/iterator package. +func (snap *Snapshot) NewIterator(slice *util.Range, ro *opt.ReadOptions) iterator.Iterator { + if err := snap.db.ok(); err != nil { + return iterator.NewEmptyIterator(err) + } + snap.mu.Lock() + defer snap.mu.Unlock() + if snap.released { + return iterator.NewEmptyIterator(ErrSnapshotReleased) + } + // Since iterator already hold version ref, it doesn't need to + // hold snapshot ref. + return snap.db.newIterator(nil, nil, snap.elem.seq, slice, ro) +} + +// Release releases the snapshot. This will not release any returned +// iterators, the iterators would still be valid until released or the +// underlying DB is closed. +// +// Other methods should not be called after the snapshot has been released. +func (snap *Snapshot) Release() { + snap.mu.Lock() + defer snap.mu.Unlock() + + if !snap.released { + // Clear the finalizer. + runtime.SetFinalizer(snap, nil) + + snap.released = true + snap.db.releaseSnapshot(snap.elem) + atomic.AddInt32(&snap.db.aliveSnaps, -1) + snap.db = nil + snap.elem = nil + } +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/db_state.go b/vendor/github.com/syndtr/goleveldb/leveldb/db_state.go new file mode 100644 index 000000000..40f454da1 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/db_state.go @@ -0,0 +1,219 @@ +// Copyright (c) 2013, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "sync/atomic" + "time" + + "github.com/syndtr/goleveldb/leveldb/journal" + "github.com/syndtr/goleveldb/leveldb/memdb" + "github.com/syndtr/goleveldb/leveldb/storage" +) + +type memDB struct { + db *DB + *memdb.DB + ref int32 +} + +func (m *memDB) getref() int32 { + return atomic.LoadInt32(&m.ref) +} + +func (m *memDB) incref() { + atomic.AddInt32(&m.ref, 1) +} + +func (m *memDB) decref() { + if ref := atomic.AddInt32(&m.ref, -1); ref == 0 { + // Only put back memdb with std capacity. + if m.Capacity() == m.db.s.o.GetWriteBuffer() { + m.Reset() + m.db.mpoolPut(m.DB) + } + m.db = nil + m.DB = nil + } else if ref < 0 { + panic("negative memdb ref") + } +} + +// Get latest sequence number. +func (db *DB) getSeq() uint64 { + return atomic.LoadUint64(&db.seq) +} + +// Atomically adds delta to seq. +func (db *DB) addSeq(delta uint64) { + atomic.AddUint64(&db.seq, delta) +} + +func (db *DB) setSeq(seq uint64) { + atomic.StoreUint64(&db.seq, seq) +} + +func (db *DB) sampleSeek(ikey internalKey) { + v := db.s.version() + if v.sampleSeek(ikey) { + // Trigger table compaction. + db.compTrigger(db.tcompCmdC) + } + v.release() +} + +func (db *DB) mpoolPut(mem *memdb.DB) { + defer func() { + recover() + }() + select { + case db.memPool <- mem: + default: + } +} + +func (db *DB) mpoolGet(n int) *memDB { + var mdb *memdb.DB + select { + case mdb = <-db.memPool: + default: + } + if mdb == nil || mdb.Capacity() < n { + mdb = memdb.New(db.s.icmp, maxInt(db.s.o.GetWriteBuffer(), n)) + } + return &memDB{ + db: db, + DB: mdb, + } +} + +func (db *DB) mpoolDrain() { + ticker := time.NewTicker(30 * time.Second) + for { + select { + case <-ticker.C: + select { + case <-db.memPool: + default: + } + case _, _ = <-db.closeC: + close(db.memPool) + return + } + } +} + +// Create new memdb and froze the old one; need external synchronization. +// newMem only called synchronously by the writer. +func (db *DB) newMem(n int) (mem *memDB, err error) { + fd := storage.FileDesc{Type: storage.TypeJournal, Num: db.s.allocFileNum()} + w, err := db.s.stor.Create(fd) + if err != nil { + db.s.reuseFileNum(fd.Num) + return + } + + db.memMu.Lock() + defer db.memMu.Unlock() + + if db.frozenMem != nil { + panic("still has frozen mem") + } + + if db.journal == nil { + db.journal = journal.NewWriter(w) + } else { + db.journal.Reset(w) + db.journalWriter.Close() + db.frozenJournalFd = db.journalFd + } + db.journalWriter = w + db.journalFd = fd + db.frozenMem = db.mem + mem = db.mpoolGet(n) + mem.incref() // for self + mem.incref() // for caller + db.mem = mem + // The seq only incremented by the writer. And whoever called newMem + // should hold write lock, so no need additional synchronization here. + db.frozenSeq = db.seq + return +} + +// Get all memdbs. +func (db *DB) getMems() (e, f *memDB) { + db.memMu.RLock() + defer db.memMu.RUnlock() + if db.mem == nil { + panic("nil effective mem") + } + db.mem.incref() + if db.frozenMem != nil { + db.frozenMem.incref() + } + return db.mem, db.frozenMem +} + +// Get frozen memdb. +func (db *DB) getEffectiveMem() *memDB { + db.memMu.RLock() + defer db.memMu.RUnlock() + if db.mem == nil { + panic("nil effective mem") + } + db.mem.incref() + return db.mem +} + +// Check whether we has frozen memdb. +func (db *DB) hasFrozenMem() bool { + db.memMu.RLock() + defer db.memMu.RUnlock() + return db.frozenMem != nil +} + +// Get frozen memdb. +func (db *DB) getFrozenMem() *memDB { + db.memMu.RLock() + defer db.memMu.RUnlock() + if db.frozenMem != nil { + db.frozenMem.incref() + } + return db.frozenMem +} + +// Drop frozen memdb; assume that frozen memdb isn't nil. +func (db *DB) dropFrozenMem() { + db.memMu.Lock() + if err := db.s.stor.Remove(db.frozenJournalFd); err != nil { + db.logf("journal@remove removing @%d %q", db.frozenJournalFd.Num, err) + } else { + db.logf("journal@remove removed @%d", db.frozenJournalFd.Num) + } + db.frozenJournalFd = storage.FileDesc{} + db.frozenMem.decref() + db.frozenMem = nil + db.memMu.Unlock() +} + +// Set closed flag; return true if not already closed. +func (db *DB) setClosed() bool { + return atomic.CompareAndSwapUint32(&db.closed, 0, 1) +} + +// Check whether DB was closed. +func (db *DB) isClosed() bool { + return atomic.LoadUint32(&db.closed) != 0 +} + +// Check read ok status. +func (db *DB) ok() error { + if db.isClosed() { + return ErrClosed + } + return nil +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/db_transaction.go b/vendor/github.com/syndtr/goleveldb/leveldb/db_transaction.go new file mode 100644 index 000000000..fca88037b --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/db_transaction.go @@ -0,0 +1,289 @@ +// Copyright (c) 2016, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "errors" + "sync" + "time" + + "github.com/syndtr/goleveldb/leveldb/iterator" + "github.com/syndtr/goleveldb/leveldb/opt" + "github.com/syndtr/goleveldb/leveldb/util" +) + +var errTransactionDone = errors.New("leveldb: transaction already closed") + +// Transaction is the transaction handle. +type Transaction struct { + db *DB + lk sync.RWMutex + seq uint64 + mem *memDB + tables tFiles + ikScratch []byte + rec sessionRecord + stats cStatStaging + closed bool +} + +// Get gets the value for the given key. It returns ErrNotFound if the +// DB does not contains the key. +// +// The returned slice is its own copy, it is safe to modify the contents +// of the returned slice. +// It is safe to modify the contents of the argument after Get returns. +func (tr *Transaction) Get(key []byte, ro *opt.ReadOptions) ([]byte, error) { + tr.lk.RLock() + defer tr.lk.RUnlock() + if tr.closed { + return nil, errTransactionDone + } + return tr.db.get(tr.mem.DB, tr.tables, key, tr.seq, ro) +} + +// Has returns true if the DB does contains the given key. +// +// It is safe to modify the contents of the argument after Has returns. +func (tr *Transaction) Has(key []byte, ro *opt.ReadOptions) (bool, error) { + tr.lk.RLock() + defer tr.lk.RUnlock() + if tr.closed { + return false, errTransactionDone + } + return tr.db.has(tr.mem.DB, tr.tables, key, tr.seq, ro) +} + +// NewIterator returns an iterator for the latest snapshot of the transaction. +// The returned iterator is not goroutine-safe, but it is safe to use multiple +// iterators concurrently, with each in a dedicated goroutine. +// It is also safe to use an iterator concurrently while writes to the +// transaction. The resultant key/value pairs are guaranteed to be consistent. +// +// Slice allows slicing the iterator to only contains keys in the given +// range. A nil Range.Start is treated as a key before all keys in the +// DB. And a nil Range.Limit is treated as a key after all keys in +// the DB. +// +// The iterator must be released after use, by calling Release method. +// +// Also read Iterator documentation of the leveldb/iterator package. +func (tr *Transaction) NewIterator(slice *util.Range, ro *opt.ReadOptions) iterator.Iterator { + tr.lk.RLock() + defer tr.lk.RUnlock() + if tr.closed { + return iterator.NewEmptyIterator(errTransactionDone) + } + tr.mem.incref() + return tr.db.newIterator(tr.mem, tr.tables, tr.seq, slice, ro) +} + +func (tr *Transaction) flush() error { + // Flush memdb. + if tr.mem.Len() != 0 { + tr.stats.startTimer() + iter := tr.mem.NewIterator(nil) + t, n, err := tr.db.s.tops.createFrom(iter) + iter.Release() + tr.stats.stopTimer() + if err != nil { + return err + } + if tr.mem.getref() == 1 { + tr.mem.Reset() + } else { + tr.mem.decref() + tr.mem = tr.db.mpoolGet(0) + tr.mem.incref() + } + tr.tables = append(tr.tables, t) + tr.rec.addTableFile(0, t) + tr.stats.write += t.size + tr.db.logf("transaction@flush created L0@%d N·%d S·%s %q:%q", t.fd.Num, n, shortenb(int(t.size)), t.imin, t.imax) + } + return nil +} + +func (tr *Transaction) put(kt keyType, key, value []byte) error { + tr.ikScratch = makeInternalKey(tr.ikScratch, key, tr.seq+1, kt) + if tr.mem.Free() < len(tr.ikScratch)+len(value) { + if err := tr.flush(); err != nil { + return err + } + } + if err := tr.mem.Put(tr.ikScratch, value); err != nil { + return err + } + tr.seq++ + return nil +} + +// Put sets the value for the given key. It overwrites any previous value +// for that key; a DB is not a multi-map. +// Please note that the transaction is not compacted until committed, so if you +// writes 10 same keys, then those 10 same keys are in the transaction. +// +// It is safe to modify the contents of the arguments after Put returns. +func (tr *Transaction) Put(key, value []byte, wo *opt.WriteOptions) error { + tr.lk.Lock() + defer tr.lk.Unlock() + if tr.closed { + return errTransactionDone + } + return tr.put(keyTypeVal, key, value) +} + +// Delete deletes the value for the given key. +// Please note that the transaction is not compacted until committed, so if you +// writes 10 same keys, then those 10 same keys are in the transaction. +// +// It is safe to modify the contents of the arguments after Delete returns. +func (tr *Transaction) Delete(key []byte, wo *opt.WriteOptions) error { + tr.lk.Lock() + defer tr.lk.Unlock() + if tr.closed { + return errTransactionDone + } + return tr.put(keyTypeDel, key, nil) +} + +// Write apply the given batch to the transaction. The batch will be applied +// sequentially. +// Please note that the transaction is not compacted until committed, so if you +// writes 10 same keys, then those 10 same keys are in the transaction. +// +// It is safe to modify the contents of the arguments after Write returns. +func (tr *Transaction) Write(b *Batch, wo *opt.WriteOptions) error { + if b == nil || b.Len() == 0 { + return nil + } + + tr.lk.Lock() + defer tr.lk.Unlock() + if tr.closed { + return errTransactionDone + } + return b.decodeRec(func(i int, kt keyType, key, value []byte) error { + return tr.put(kt, key, value) + }) +} + +func (tr *Transaction) setDone() { + tr.closed = true + tr.db.tr = nil + tr.mem.decref() + <-tr.db.writeLockC +} + +// Commit commits the transaction. +// +// Other methods should not be called after transaction has been committed. +func (tr *Transaction) Commit() error { + if err := tr.db.ok(); err != nil { + return err + } + + tr.lk.Lock() + defer tr.lk.Unlock() + if tr.closed { + return errTransactionDone + } + defer tr.setDone() + if err := tr.flush(); err != nil { + tr.discard() + return err + } + if len(tr.tables) != 0 { + // Committing transaction. + tr.rec.setSeqNum(tr.seq) + tr.db.compCommitLk.Lock() + defer tr.db.compCommitLk.Unlock() + for retry := 0; retry < 3; retry++ { + if err := tr.db.s.commit(&tr.rec); err != nil { + tr.db.logf("transaction@commit error R·%d %q", retry, err) + select { + case <-time.After(time.Second): + case _, _ = <-tr.db.closeC: + tr.db.logf("transaction@commit exiting") + return err + } + } else { + // Success. Set db.seq. + tr.db.setSeq(tr.seq) + break + } + } + // Trigger table auto-compaction. + tr.db.compTrigger(tr.db.tcompCmdC) + } + return nil +} + +func (tr *Transaction) discard() { + // Discard transaction. + for _, t := range tr.tables { + tr.db.logf("transaction@discard @%d", t.fd.Num) + if err1 := tr.db.s.stor.Remove(t.fd); err1 == nil { + tr.db.s.reuseFileNum(t.fd.Num) + } + } +} + +// Discard discards the transaction. +// +// Other methods should not be called after transaction has been discarded. +func (tr *Transaction) Discard() { + tr.lk.Lock() + if !tr.closed { + tr.discard() + tr.setDone() + } + tr.lk.Unlock() +} + +// OpenTransaction opens an atomic DB transaction. Only one transaction can be +// opened at a time. Write will be blocked until the transaction is committed or +// discarded. +// The returned transaction handle is goroutine-safe. +// +// The transaction must be closed once done, either by committing or discarding +// the transaction. +// Closing the DB will discard open transaction. +func (db *DB) OpenTransaction() (*Transaction, error) { + if err := db.ok(); err != nil { + return nil, err + } + + // The write happen synchronously. + select { + case db.writeLockC <- struct{}{}: + case err := <-db.compPerErrC: + return nil, err + case _, _ = <-db.closeC: + return nil, ErrClosed + } + + if db.tr != nil { + panic("leveldb: has open transaction") + } + + // Flush current memdb. + if db.mem != nil && db.mem.Len() != 0 { + if _, err := db.rotateMem(0, true); err != nil { + return nil, err + } + } + + tr := &Transaction{ + db: db, + seq: db.seq, + mem: db.mpoolGet(0), + } + tr.mem.incref() + db.tr = tr + return tr, nil +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/db_util.go b/vendor/github.com/syndtr/goleveldb/leveldb/db_util.go new file mode 100644 index 000000000..7fd386ca4 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/db_util.go @@ -0,0 +1,102 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "github.com/syndtr/goleveldb/leveldb/errors" + "github.com/syndtr/goleveldb/leveldb/iterator" + "github.com/syndtr/goleveldb/leveldb/opt" + "github.com/syndtr/goleveldb/leveldb/storage" + "github.com/syndtr/goleveldb/leveldb/util" +) + +// Reader is the interface that wraps basic Get and NewIterator methods. +// This interface implemented by both DB and Snapshot. +type Reader interface { + Get(key []byte, ro *opt.ReadOptions) (value []byte, err error) + NewIterator(slice *util.Range, ro *opt.ReadOptions) iterator.Iterator +} + +// Sizes is list of size. +type Sizes []int64 + +// Sum returns sum of the sizes. +func (sizes Sizes) Sum() int64 { + var sum int64 + for _, size := range sizes { + sum += size + } + return sum +} + +// Logging. +func (db *DB) log(v ...interface{}) { db.s.log(v...) } +func (db *DB) logf(format string, v ...interface{}) { db.s.logf(format, v...) } + +// Check and clean files. +func (db *DB) checkAndCleanFiles() error { + v := db.s.version() + defer v.release() + + tmap := make(map[int64]bool) + for _, tables := range v.levels { + for _, t := range tables { + tmap[t.fd.Num] = false + } + } + + fds, err := db.s.stor.List(storage.TypeAll) + if err != nil { + return err + } + + var nt int + var rem []storage.FileDesc + for _, fd := range fds { + keep := true + switch fd.Type { + case storage.TypeManifest: + keep = fd.Num >= db.s.manifestFd.Num + case storage.TypeJournal: + if !db.frozenJournalFd.Nil() { + keep = fd.Num >= db.frozenJournalFd.Num + } else { + keep = fd.Num >= db.journalFd.Num + } + case storage.TypeTable: + _, keep = tmap[fd.Num] + if keep { + tmap[fd.Num] = true + nt++ + } + } + + if !keep { + rem = append(rem, fd) + } + } + + if nt != len(tmap) { + var mfds []storage.FileDesc + for num, present := range tmap { + if !present { + mfds = append(mfds, storage.FileDesc{storage.TypeTable, num}) + db.logf("db@janitor table missing @%d", num) + } + } + return errors.NewErrCorrupted(storage.FileDesc{}, &errors.ErrMissingFiles{Fds: mfds}) + } + + db.logf("db@janitor F·%d G·%d", len(fds), len(rem)) + for _, fd := range rem { + db.logf("db@janitor removing %s-%d", fd.Type, fd.Num) + if err := db.s.stor.Remove(fd); err != nil { + return err + } + } + return nil +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/db_write.go b/vendor/github.com/syndtr/goleveldb/leveldb/db_write.go new file mode 100644 index 000000000..5576761fe --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/db_write.go @@ -0,0 +1,358 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "time" + + "github.com/syndtr/goleveldb/leveldb/memdb" + "github.com/syndtr/goleveldb/leveldb/opt" + "github.com/syndtr/goleveldb/leveldb/util" +) + +func (db *DB) writeJournal(b *Batch) error { + w, err := db.journal.Next() + if err != nil { + return err + } + if _, err := w.Write(b.encode()); err != nil { + return err + } + if err := db.journal.Flush(); err != nil { + return err + } + if b.sync { + return db.journalWriter.Sync() + } + return nil +} + +func (db *DB) jWriter() { + defer db.closeW.Done() + for { + select { + case b := <-db.journalC: + if b != nil { + db.journalAckC <- db.writeJournal(b) + } + case _, _ = <-db.closeC: + return + } + } +} + +func (db *DB) rotateMem(n int, wait bool) (mem *memDB, err error) { + // Wait for pending memdb compaction. + err = db.compTriggerWait(db.mcompCmdC) + if err != nil { + return + } + + // Create new memdb and journal. + mem, err = db.newMem(n) + if err != nil { + return + } + + // Schedule memdb compaction. + if wait { + err = db.compTriggerWait(db.mcompCmdC) + } else { + db.compTrigger(db.mcompCmdC) + } + return +} + +func (db *DB) flush(n int) (mdb *memDB, mdbFree int, err error) { + delayed := false + flush := func() (retry bool) { + v := db.s.version() + defer v.release() + mdb = db.getEffectiveMem() + defer func() { + if retry { + mdb.decref() + mdb = nil + } + }() + mdbFree = mdb.Free() + switch { + case v.tLen(0) >= db.s.o.GetWriteL0SlowdownTrigger() && !delayed: + delayed = true + time.Sleep(time.Millisecond) + case mdbFree >= n: + return false + case v.tLen(0) >= db.s.o.GetWriteL0PauseTrigger(): + delayed = true + err = db.compTriggerWait(db.tcompCmdC) + if err != nil { + return false + } + default: + // Allow memdb to grow if it has no entry. + if mdb.Len() == 0 { + mdbFree = n + } else { + mdb.decref() + mdb, err = db.rotateMem(n, false) + if err == nil { + mdbFree = mdb.Free() + } else { + mdbFree = 0 + } + } + return false + } + return true + } + start := time.Now() + for flush() { + } + if delayed { + db.writeDelay += time.Since(start) + db.writeDelayN++ + } else if db.writeDelayN > 0 { + db.logf("db@write was delayed N·%d T·%v", db.writeDelayN, db.writeDelay) + db.writeDelay = 0 + db.writeDelayN = 0 + } + return +} + +// Write apply the given batch to the DB. The batch will be applied +// sequentially. +// +// It is safe to modify the contents of the arguments after Write returns. +func (db *DB) Write(b *Batch, wo *opt.WriteOptions) (err error) { + err = db.ok() + if err != nil || b == nil || b.Len() == 0 { + return + } + + b.init(wo.GetSync() && !db.s.o.GetNoSync()) + + if b.size() > db.s.o.GetWriteBuffer() && !db.s.o.GetDisableLargeBatchTransaction() { + // Writes using transaction. + tr, err1 := db.OpenTransaction() + if err1 != nil { + return err1 + } + if err1 := tr.Write(b, wo); err1 != nil { + tr.Discard() + return err1 + } + return tr.Commit() + } + + // The write happen synchronously. + select { + case db.writeC <- b: + if <-db.writeMergedC { + return <-db.writeAckC + } + // Continue, the write lock already acquired by previous writer + // and handed out to us. + case db.writeLockC <- struct{}{}: + case err = <-db.compPerErrC: + return + case _, _ = <-db.closeC: + return ErrClosed + } + + merged := 0 + danglingMerge := false + defer func() { + for i := 0; i < merged; i++ { + db.writeAckC <- err + } + if danglingMerge { + // Only one dangling merge at most, so this is safe. + db.writeMergedC <- false + } else { + <-db.writeLockC + } + }() + + mdb, mdbFree, err := db.flush(b.size()) + if err != nil { + return + } + defer mdb.decref() + + // Calculate maximum size of the batch. + m := 1 << 20 + if x := b.size(); x <= 128<<10 { + m = x + (128 << 10) + } + m = minInt(m, mdbFree) + + // Merge with other batch. +drain: + for b.size() < m && !b.sync { + select { + case nb := <-db.writeC: + if b.size()+nb.size() <= m { + b.append(nb) + db.writeMergedC <- true + merged++ + } else { + danglingMerge = true + break drain + } + default: + break drain + } + } + + // Set batch first seq number relative from last seq. + b.seq = db.seq + 1 + + // Write journal concurrently if it is large enough. + if b.size() >= (128 << 10) { + // Push the write batch to the journal writer + select { + case db.journalC <- b: + // Write into memdb + if berr := b.memReplay(mdb.DB); berr != nil { + panic(berr) + } + case err = <-db.compPerErrC: + return + case _, _ = <-db.closeC: + err = ErrClosed + return + } + // Wait for journal writer + select { + case err = <-db.journalAckC: + if err != nil { + // Revert memdb if error detected + if berr := b.revertMemReplay(mdb.DB); berr != nil { + panic(berr) + } + return + } + case _, _ = <-db.closeC: + err = ErrClosed + return + } + } else { + err = db.writeJournal(b) + if err != nil { + return + } + if berr := b.memReplay(mdb.DB); berr != nil { + panic(berr) + } + } + + // Set last seq number. + db.addSeq(uint64(b.Len())) + + if b.size() >= mdbFree { + db.rotateMem(0, false) + } + return +} + +// Put sets the value for the given key. It overwrites any previous value +// for that key; a DB is not a multi-map. +// +// It is safe to modify the contents of the arguments after Put returns. +func (db *DB) Put(key, value []byte, wo *opt.WriteOptions) error { + b := new(Batch) + b.Put(key, value) + return db.Write(b, wo) +} + +// Delete deletes the value for the given key. +// +// It is safe to modify the contents of the arguments after Delete returns. +func (db *DB) Delete(key []byte, wo *opt.WriteOptions) error { + b := new(Batch) + b.Delete(key) + return db.Write(b, wo) +} + +func isMemOverlaps(icmp *iComparer, mem *memdb.DB, min, max []byte) bool { + iter := mem.NewIterator(nil) + defer iter.Release() + return (max == nil || (iter.First() && icmp.uCompare(max, internalKey(iter.Key()).ukey()) >= 0)) && + (min == nil || (iter.Last() && icmp.uCompare(min, internalKey(iter.Key()).ukey()) <= 0)) +} + +// CompactRange compacts the underlying DB for the given key range. +// In particular, deleted and overwritten versions are discarded, +// and the data is rearranged to reduce the cost of operations +// needed to access the data. This operation should typically only +// be invoked by users who understand the underlying implementation. +// +// A nil Range.Start is treated as a key before all keys in the DB. +// And a nil Range.Limit is treated as a key after all keys in the DB. +// Therefore if both is nil then it will compact entire DB. +func (db *DB) CompactRange(r util.Range) error { + if err := db.ok(); err != nil { + return err + } + + // Lock writer. + select { + case db.writeLockC <- struct{}{}: + case err := <-db.compPerErrC: + return err + case _, _ = <-db.closeC: + return ErrClosed + } + + // Check for overlaps in memdb. + mdb := db.getEffectiveMem() + defer mdb.decref() + if isMemOverlaps(db.s.icmp, mdb.DB, r.Start, r.Limit) { + // Memdb compaction. + if _, err := db.rotateMem(0, false); err != nil { + <-db.writeLockC + return err + } + <-db.writeLockC + if err := db.compTriggerWait(db.mcompCmdC); err != nil { + return err + } + } else { + <-db.writeLockC + } + + // Table compaction. + return db.compTriggerRange(db.tcompCmdC, -1, r.Start, r.Limit) +} + +// SetReadOnly makes DB read-only. It will stay read-only until reopened. +func (db *DB) SetReadOnly() error { + if err := db.ok(); err != nil { + return err + } + + // Lock writer. + select { + case db.writeLockC <- struct{}{}: + db.compWriteLocking = true + case err := <-db.compPerErrC: + return err + case _, _ = <-db.closeC: + return ErrClosed + } + + // Set compaction read-only. + select { + case db.compErrSetC <- ErrReadOnly: + case perr := <-db.compPerErrC: + return perr + case _, _ = <-db.closeC: + return ErrClosed + } + + return nil +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/doc.go b/vendor/github.com/syndtr/goleveldb/leveldb/doc.go new file mode 100644 index 000000000..53f13bb24 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/doc.go @@ -0,0 +1,90 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Package leveldb provides implementation of LevelDB key/value database. +// +// Create or open a database: +// +// db, err := leveldb.OpenFile("path/to/db", nil) +// ... +// defer db.Close() +// ... +// +// Read or modify the database content: +// +// // Remember that the contents of the returned slice should not be modified. +// data, err := db.Get([]byte("key"), nil) +// ... +// err = db.Put([]byte("key"), []byte("value"), nil) +// ... +// err = db.Delete([]byte("key"), nil) +// ... +// +// Iterate over database content: +// +// iter := db.NewIterator(nil, nil) +// for iter.Next() { +// // Remember that the contents of the returned slice should not be modified, and +// // only valid until the next call to Next. +// key := iter.Key() +// value := iter.Value() +// ... +// } +// iter.Release() +// err = iter.Error() +// ... +// +// Iterate over subset of database content with a particular prefix: +// iter := db.NewIterator(util.BytesPrefix([]byte("foo-")), nil) +// for iter.Next() { +// // Use key/value. +// ... +// } +// iter.Release() +// err = iter.Error() +// ... +// +// Seek-then-Iterate: +// +// iter := db.NewIterator(nil, nil) +// for ok := iter.Seek(key); ok; ok = iter.Next() { +// // Use key/value. +// ... +// } +// iter.Release() +// err = iter.Error() +// ... +// +// Iterate over subset of database content: +// +// iter := db.NewIterator(&util.Range{Start: []byte("foo"), Limit: []byte("xoo")}, nil) +// for iter.Next() { +// // Use key/value. +// ... +// } +// iter.Release() +// err = iter.Error() +// ... +// +// Batch writes: +// +// batch := new(leveldb.Batch) +// batch.Put([]byte("foo"), []byte("value")) +// batch.Put([]byte("bar"), []byte("another value")) +// batch.Delete([]byte("baz")) +// err = db.Write(batch, nil) +// ... +// +// Use bloom filter: +// +// o := &opt.Options{ +// Filter: filter.NewBloomFilter(10), +// } +// db, err := leveldb.OpenFile("path/to/db", o) +// ... +// defer db.Close() +// ... +package leveldb diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/errors.go b/vendor/github.com/syndtr/goleveldb/leveldb/errors.go new file mode 100644 index 000000000..c8bd66a5a --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/errors.go @@ -0,0 +1,19 @@ +// Copyright (c) 2014, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "github.com/syndtr/goleveldb/leveldb/errors" +) + +var ( + ErrNotFound = errors.ErrNotFound + ErrReadOnly = errors.New("leveldb: read-only mode") + ErrSnapshotReleased = errors.New("leveldb: snapshot released") + ErrIterReleased = errors.New("leveldb: iterator released") + ErrClosed = errors.New("leveldb: closed") +) diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/errors/errors.go b/vendor/github.com/syndtr/goleveldb/leveldb/errors/errors.go new file mode 100644 index 000000000..9a0f6e2c1 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/errors/errors.go @@ -0,0 +1,78 @@ +// Copyright (c) 2014, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Package errors provides common error types used throughout leveldb. +package errors + +import ( + "errors" + "fmt" + + "github.com/syndtr/goleveldb/leveldb/storage" + "github.com/syndtr/goleveldb/leveldb/util" +) + +var ( + ErrNotFound = New("leveldb: not found") + ErrReleased = util.ErrReleased + ErrHasReleaser = util.ErrHasReleaser +) + +// New returns an error that formats as the given text. +func New(text string) error { + return errors.New(text) +} + +// ErrCorrupted is the type that wraps errors that indicate corruption in +// the database. +type ErrCorrupted struct { + Fd storage.FileDesc + Err error +} + +func (e *ErrCorrupted) Error() string { + if !e.Fd.Nil() { + return fmt.Sprintf("%v [file=%v]", e.Err, e.Fd) + } else { + return e.Err.Error() + } +} + +// NewErrCorrupted creates new ErrCorrupted error. +func NewErrCorrupted(fd storage.FileDesc, err error) error { + return &ErrCorrupted{fd, err} +} + +// IsCorrupted returns a boolean indicating whether the error is indicating +// a corruption. +func IsCorrupted(err error) bool { + switch err.(type) { + case *ErrCorrupted: + return true + case *storage.ErrCorrupted: + return true + } + return false +} + +// ErrMissingFiles is the type that indicating a corruption due to missing +// files. ErrMissingFiles always wrapped with ErrCorrupted. +type ErrMissingFiles struct { + Fds []storage.FileDesc +} + +func (e *ErrMissingFiles) Error() string { return "file missing" } + +// SetFd sets 'file info' of the given error with the given file. +// Currently only ErrCorrupted is supported, otherwise will do nothing. +func SetFd(err error, fd storage.FileDesc) error { + switch x := err.(type) { + case *ErrCorrupted: + x.Fd = fd + return x + } + return err +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/filter.go b/vendor/github.com/syndtr/goleveldb/leveldb/filter.go new file mode 100644 index 000000000..e961e420d --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/filter.go @@ -0,0 +1,31 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "github.com/syndtr/goleveldb/leveldb/filter" +) + +type iFilter struct { + filter.Filter +} + +func (f iFilter) Contains(filter, key []byte) bool { + return f.Filter.Contains(filter, internalKey(key).ukey()) +} + +func (f iFilter) NewGenerator() filter.FilterGenerator { + return iFilterGenerator{f.Filter.NewGenerator()} +} + +type iFilterGenerator struct { + filter.FilterGenerator +} + +func (g iFilterGenerator) Add(key []byte) { + g.FilterGenerator.Add(internalKey(key).ukey()) +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/filter/bloom.go b/vendor/github.com/syndtr/goleveldb/leveldb/filter/bloom.go new file mode 100644 index 000000000..bab0e9970 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/filter/bloom.go @@ -0,0 +1,116 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package filter + +import ( + "github.com/syndtr/goleveldb/leveldb/util" +) + +func bloomHash(key []byte) uint32 { + return util.Hash(key, 0xbc9f1d34) +} + +type bloomFilter int + +// The bloom filter serializes its parameters and is backward compatible +// with respect to them. Therefor, its parameters are not added to its +// name. +func (bloomFilter) Name() string { + return "leveldb.BuiltinBloomFilter" +} + +func (f bloomFilter) Contains(filter, key []byte) bool { + nBytes := len(filter) - 1 + if nBytes < 1 { + return false + } + nBits := uint32(nBytes * 8) + + // Use the encoded k so that we can read filters generated by + // bloom filters created using different parameters. + k := filter[nBytes] + if k > 30 { + // Reserved for potentially new encodings for short bloom filters. + // Consider it a match. + return true + } + + kh := bloomHash(key) + delta := (kh >> 17) | (kh << 15) // Rotate right 17 bits + for j := uint8(0); j < k; j++ { + bitpos := kh % nBits + if (uint32(filter[bitpos/8]) & (1 << (bitpos % 8))) == 0 { + return false + } + kh += delta + } + return true +} + +func (f bloomFilter) NewGenerator() FilterGenerator { + // Round down to reduce probing cost a little bit. + k := uint8(f * 69 / 100) // 0.69 =~ ln(2) + if k < 1 { + k = 1 + } else if k > 30 { + k = 30 + } + return &bloomFilterGenerator{ + n: int(f), + k: k, + } +} + +type bloomFilterGenerator struct { + n int + k uint8 + + keyHashes []uint32 +} + +func (g *bloomFilterGenerator) Add(key []byte) { + // Use double-hashing to generate a sequence of hash values. + // See analysis in [Kirsch,Mitzenmacher 2006]. + g.keyHashes = append(g.keyHashes, bloomHash(key)) +} + +func (g *bloomFilterGenerator) Generate(b Buffer) { + // Compute bloom filter size (in both bits and bytes) + nBits := uint32(len(g.keyHashes) * g.n) + // For small n, we can see a very high false positive rate. Fix it + // by enforcing a minimum bloom filter length. + if nBits < 64 { + nBits = 64 + } + nBytes := (nBits + 7) / 8 + nBits = nBytes * 8 + + dest := b.Alloc(int(nBytes) + 1) + dest[nBytes] = g.k + for _, kh := range g.keyHashes { + delta := (kh >> 17) | (kh << 15) // Rotate right 17 bits + for j := uint8(0); j < g.k; j++ { + bitpos := kh % nBits + dest[bitpos/8] |= (1 << (bitpos % 8)) + kh += delta + } + } + + g.keyHashes = g.keyHashes[:0] +} + +// NewBloomFilter creates a new initialized bloom filter for given +// bitsPerKey. +// +// Since bitsPerKey is persisted individually for each bloom filter +// serialization, bloom filters are backwards compatible with respect to +// changing bitsPerKey. This means that no big performance penalty will +// be experienced when changing the parameter. See documentation for +// opt.Options.Filter for more information. +func NewBloomFilter(bitsPerKey int) Filter { + return bloomFilter(bitsPerKey) +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/filter/filter.go b/vendor/github.com/syndtr/goleveldb/leveldb/filter/filter.go new file mode 100644 index 000000000..7a925c5a8 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/filter/filter.go @@ -0,0 +1,60 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Package filter provides interface and implementation of probabilistic +// data structure. +// +// The filter is resposible for creating small filter from a set of keys. +// These filter will then used to test whether a key is a member of the set. +// In many cases, a filter can cut down the number of disk seeks from a +// handful to a single disk seek per DB.Get call. +package filter + +// Buffer is the interface that wraps basic Alloc, Write and WriteByte methods. +type Buffer interface { + // Alloc allocs n bytes of slice from the buffer. This also advancing + // write offset. + Alloc(n int) []byte + + // Write appends the contents of p to the buffer. + Write(p []byte) (n int, err error) + + // WriteByte appends the byte c to the buffer. + WriteByte(c byte) error +} + +// Filter is the filter. +type Filter interface { + // Name returns the name of this policy. + // + // Note that if the filter encoding changes in an incompatible way, + // the name returned by this method must be changed. Otherwise, old + // incompatible filters may be passed to methods of this type. + Name() string + + // NewGenerator creates a new filter generator. + NewGenerator() FilterGenerator + + // Contains returns true if the filter contains the given key. + // + // The filter are filters generated by the filter generator. + Contains(filter, key []byte) bool +} + +// FilterGenerator is the filter generator. +type FilterGenerator interface { + // Add adds a key to the filter generator. + // + // The key may become invalid after call to this method end, therefor + // key must be copied if implementation require keeping key for later + // use. The key should not modified directly, doing so may cause + // undefined results. + Add(key []byte) + + // Generate generates filters based on keys passed so far. After call + // to Generate the filter generator maybe resetted, depends on implementation. + Generate(b Buffer) +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/iterator/array_iter.go b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/array_iter.go new file mode 100644 index 000000000..a23ab05f7 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/array_iter.go @@ -0,0 +1,184 @@ +// Copyright (c) 2014, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package iterator + +import ( + "github.com/syndtr/goleveldb/leveldb/util" +) + +// BasicArray is the interface that wraps basic Len and Search method. +type BasicArray interface { + // Len returns length of the array. + Len() int + + // Search finds smallest index that point to a key that is greater + // than or equal to the given key. + Search(key []byte) int +} + +// Array is the interface that wraps BasicArray and basic Index method. +type Array interface { + BasicArray + + // Index returns key/value pair with index of i. + Index(i int) (key, value []byte) +} + +// Array is the interface that wraps BasicArray and basic Get method. +type ArrayIndexer interface { + BasicArray + + // Get returns a new data iterator with index of i. + Get(i int) Iterator +} + +type basicArrayIterator struct { + util.BasicReleaser + array BasicArray + pos int + err error +} + +func (i *basicArrayIterator) Valid() bool { + return i.pos >= 0 && i.pos < i.array.Len() && !i.Released() +} + +func (i *basicArrayIterator) First() bool { + if i.Released() { + i.err = ErrIterReleased + return false + } + + if i.array.Len() == 0 { + i.pos = -1 + return false + } + i.pos = 0 + return true +} + +func (i *basicArrayIterator) Last() bool { + if i.Released() { + i.err = ErrIterReleased + return false + } + + n := i.array.Len() + if n == 0 { + i.pos = 0 + return false + } + i.pos = n - 1 + return true +} + +func (i *basicArrayIterator) Seek(key []byte) bool { + if i.Released() { + i.err = ErrIterReleased + return false + } + + n := i.array.Len() + if n == 0 { + i.pos = 0 + return false + } + i.pos = i.array.Search(key) + if i.pos >= n { + return false + } + return true +} + +func (i *basicArrayIterator) Next() bool { + if i.Released() { + i.err = ErrIterReleased + return false + } + + i.pos++ + if n := i.array.Len(); i.pos >= n { + i.pos = n + return false + } + return true +} + +func (i *basicArrayIterator) Prev() bool { + if i.Released() { + i.err = ErrIterReleased + return false + } + + i.pos-- + if i.pos < 0 { + i.pos = -1 + return false + } + return true +} + +func (i *basicArrayIterator) Error() error { return i.err } + +type arrayIterator struct { + basicArrayIterator + array Array + pos int + key, value []byte +} + +func (i *arrayIterator) updateKV() { + if i.pos == i.basicArrayIterator.pos { + return + } + i.pos = i.basicArrayIterator.pos + if i.Valid() { + i.key, i.value = i.array.Index(i.pos) + } else { + i.key = nil + i.value = nil + } +} + +func (i *arrayIterator) Key() []byte { + i.updateKV() + return i.key +} + +func (i *arrayIterator) Value() []byte { + i.updateKV() + return i.value +} + +type arrayIteratorIndexer struct { + basicArrayIterator + array ArrayIndexer +} + +func (i *arrayIteratorIndexer) Get() Iterator { + if i.Valid() { + return i.array.Get(i.basicArrayIterator.pos) + } + return nil +} + +// NewArrayIterator returns an iterator from the given array. +func NewArrayIterator(array Array) Iterator { + return &arrayIterator{ + basicArrayIterator: basicArrayIterator{array: array, pos: -1}, + array: array, + pos: -1, + } +} + +// NewArrayIndexer returns an index iterator from the given array. +func NewArrayIndexer(array ArrayIndexer) IteratorIndexer { + return &arrayIteratorIndexer{ + basicArrayIterator: basicArrayIterator{array: array, pos: -1}, + array: array, + } +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/iterator/indexed_iter.go b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/indexed_iter.go new file mode 100644 index 000000000..939adbb93 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/indexed_iter.go @@ -0,0 +1,242 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package iterator + +import ( + "github.com/syndtr/goleveldb/leveldb/errors" + "github.com/syndtr/goleveldb/leveldb/util" +) + +// IteratorIndexer is the interface that wraps CommonIterator and basic Get +// method. IteratorIndexer provides index for indexed iterator. +type IteratorIndexer interface { + CommonIterator + + // Get returns a new data iterator for the current position, or nil if + // done. + Get() Iterator +} + +type indexedIterator struct { + util.BasicReleaser + index IteratorIndexer + strict bool + + data Iterator + err error + errf func(err error) + closed bool +} + +func (i *indexedIterator) setData() { + if i.data != nil { + i.data.Release() + } + i.data = i.index.Get() +} + +func (i *indexedIterator) clearData() { + if i.data != nil { + i.data.Release() + } + i.data = nil +} + +func (i *indexedIterator) indexErr() { + if err := i.index.Error(); err != nil { + if i.errf != nil { + i.errf(err) + } + i.err = err + } +} + +func (i *indexedIterator) dataErr() bool { + if err := i.data.Error(); err != nil { + if i.errf != nil { + i.errf(err) + } + if i.strict || !errors.IsCorrupted(err) { + i.err = err + return true + } + } + return false +} + +func (i *indexedIterator) Valid() bool { + return i.data != nil && i.data.Valid() +} + +func (i *indexedIterator) First() bool { + if i.err != nil { + return false + } else if i.Released() { + i.err = ErrIterReleased + return false + } + + if !i.index.First() { + i.indexErr() + i.clearData() + return false + } + i.setData() + return i.Next() +} + +func (i *indexedIterator) Last() bool { + if i.err != nil { + return false + } else if i.Released() { + i.err = ErrIterReleased + return false + } + + if !i.index.Last() { + i.indexErr() + i.clearData() + return false + } + i.setData() + if !i.data.Last() { + if i.dataErr() { + return false + } + i.clearData() + return i.Prev() + } + return true +} + +func (i *indexedIterator) Seek(key []byte) bool { + if i.err != nil { + return false + } else if i.Released() { + i.err = ErrIterReleased + return false + } + + if !i.index.Seek(key) { + i.indexErr() + i.clearData() + return false + } + i.setData() + if !i.data.Seek(key) { + if i.dataErr() { + return false + } + i.clearData() + return i.Next() + } + return true +} + +func (i *indexedIterator) Next() bool { + if i.err != nil { + return false + } else if i.Released() { + i.err = ErrIterReleased + return false + } + + switch { + case i.data != nil && !i.data.Next(): + if i.dataErr() { + return false + } + i.clearData() + fallthrough + case i.data == nil: + if !i.index.Next() { + i.indexErr() + return false + } + i.setData() + return i.Next() + } + return true +} + +func (i *indexedIterator) Prev() bool { + if i.err != nil { + return false + } else if i.Released() { + i.err = ErrIterReleased + return false + } + + switch { + case i.data != nil && !i.data.Prev(): + if i.dataErr() { + return false + } + i.clearData() + fallthrough + case i.data == nil: + if !i.index.Prev() { + i.indexErr() + return false + } + i.setData() + if !i.data.Last() { + if i.dataErr() { + return false + } + i.clearData() + return i.Prev() + } + } + return true +} + +func (i *indexedIterator) Key() []byte { + if i.data == nil { + return nil + } + return i.data.Key() +} + +func (i *indexedIterator) Value() []byte { + if i.data == nil { + return nil + } + return i.data.Value() +} + +func (i *indexedIterator) Release() { + i.clearData() + i.index.Release() + i.BasicReleaser.Release() +} + +func (i *indexedIterator) Error() error { + if i.err != nil { + return i.err + } + if err := i.index.Error(); err != nil { + return err + } + return nil +} + +func (i *indexedIterator) SetErrorCallback(f func(err error)) { + i.errf = f +} + +// NewIndexedIterator returns an 'indexed iterator'. An index is iterator +// that returns another iterator, a 'data iterator'. A 'data iterator' is the +// iterator that contains actual key/value pairs. +// +// If strict is true the any 'corruption errors' (i.e errors.IsCorrupted(err) == true) +// won't be ignored and will halt 'indexed iterator', otherwise the iterator will +// continue to the next 'data iterator'. Corruption on 'index iterator' will not be +// ignored and will halt the iterator. +func NewIndexedIterator(index IteratorIndexer, strict bool) Iterator { + return &indexedIterator{index: index, strict: strict} +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/iterator/iter.go b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/iter.go new file mode 100644 index 000000000..c2522860b --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/iter.go @@ -0,0 +1,131 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Package iterator provides interface and implementation to traverse over +// contents of a database. +package iterator + +import ( + "errors" + + "github.com/syndtr/goleveldb/leveldb/util" +) + +var ( + ErrIterReleased = errors.New("leveldb/iterator: iterator released") +) + +// IteratorSeeker is the interface that wraps the 'seeks method'. +type IteratorSeeker interface { + // First moves the iterator to the first key/value pair. If the iterator + // only contains one key/value pair then First and Last whould moves + // to the same key/value pair. + // It returns whether such pair exist. + First() bool + + // Last moves the iterator to the last key/value pair. If the iterator + // only contains one key/value pair then First and Last whould moves + // to the same key/value pair. + // It returns whether such pair exist. + Last() bool + + // Seek moves the iterator to the first key/value pair whose key is greater + // than or equal to the given key. + // It returns whether such pair exist. + // + // It is safe to modify the contents of the argument after Seek returns. + Seek(key []byte) bool + + // Next moves the iterator to the next key/value pair. + // It returns whether the iterator is exhausted. + Next() bool + + // Prev moves the iterator to the previous key/value pair. + // It returns whether the iterator is exhausted. + Prev() bool +} + +// CommonIterator is the interface that wraps common interator methods. +type CommonIterator interface { + IteratorSeeker + + // util.Releaser is the interface that wraps basic Release method. + // When called Release will releases any resources associated with the + // iterator. + util.Releaser + + // util.ReleaseSetter is the interface that wraps the basic SetReleaser + // method. + util.ReleaseSetter + + // TODO: Remove this when ready. + Valid() bool + + // Error returns any accumulated error. Exhausting all the key/value pairs + // is not considered to be an error. + Error() error +} + +// Iterator iterates over a DB's key/value pairs in key order. +// +// When encouter an error any 'seeks method' will return false and will +// yield no key/value pairs. The error can be queried by calling the Error +// method. Calling Release is still necessary. +// +// An iterator must be released after use, but it is not necessary to read +// an iterator until exhaustion. +// Also, an iterator is not necessarily goroutine-safe, but it is safe to use +// multiple iterators concurrently, with each in a dedicated goroutine. +type Iterator interface { + CommonIterator + + // Key returns the key of the current key/value pair, or nil if done. + // The caller should not modify the contents of the returned slice, and + // its contents may change on the next call to any 'seeks method'. + Key() []byte + + // Value returns the key of the current key/value pair, or nil if done. + // The caller should not modify the contents of the returned slice, and + // its contents may change on the next call to any 'seeks method'. + Value() []byte +} + +// ErrorCallbackSetter is the interface that wraps basic SetErrorCallback +// method. +// +// ErrorCallbackSetter implemented by indexed and merged iterator. +type ErrorCallbackSetter interface { + // SetErrorCallback allows set an error callback of the coresponding + // iterator. Use nil to clear the callback. + SetErrorCallback(f func(err error)) +} + +type emptyIterator struct { + util.BasicReleaser + err error +} + +func (i *emptyIterator) rErr() { + if i.err == nil && i.Released() { + i.err = ErrIterReleased + } +} + +func (*emptyIterator) Valid() bool { return false } +func (i *emptyIterator) First() bool { i.rErr(); return false } +func (i *emptyIterator) Last() bool { i.rErr(); return false } +func (i *emptyIterator) Seek(key []byte) bool { i.rErr(); return false } +func (i *emptyIterator) Next() bool { i.rErr(); return false } +func (i *emptyIterator) Prev() bool { i.rErr(); return false } +func (*emptyIterator) Key() []byte { return nil } +func (*emptyIterator) Value() []byte { return nil } +func (i *emptyIterator) Error() error { return i.err } + +// NewEmptyIterator creates an empty iterator. The err parameter can be +// nil, but if not nil the given err will be returned by Error method. +func NewEmptyIterator(err error) Iterator { + return &emptyIterator{err: err} +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/iterator/merged_iter.go b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/merged_iter.go new file mode 100644 index 000000000..1a7e29df8 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/iterator/merged_iter.go @@ -0,0 +1,304 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package iterator + +import ( + "github.com/syndtr/goleveldb/leveldb/comparer" + "github.com/syndtr/goleveldb/leveldb/errors" + "github.com/syndtr/goleveldb/leveldb/util" +) + +type dir int + +const ( + dirReleased dir = iota - 1 + dirSOI + dirEOI + dirBackward + dirForward +) + +type mergedIterator struct { + cmp comparer.Comparer + iters []Iterator + strict bool + + keys [][]byte + index int + dir dir + err error + errf func(err error) + releaser util.Releaser +} + +func assertKey(key []byte) []byte { + if key == nil { + panic("leveldb/iterator: nil key") + } + return key +} + +func (i *mergedIterator) iterErr(iter Iterator) bool { + if err := iter.Error(); err != nil { + if i.errf != nil { + i.errf(err) + } + if i.strict || !errors.IsCorrupted(err) { + i.err = err + return true + } + } + return false +} + +func (i *mergedIterator) Valid() bool { + return i.err == nil && i.dir > dirEOI +} + +func (i *mergedIterator) First() bool { + if i.err != nil { + return false + } else if i.dir == dirReleased { + i.err = ErrIterReleased + return false + } + + for x, iter := range i.iters { + switch { + case iter.First(): + i.keys[x] = assertKey(iter.Key()) + case i.iterErr(iter): + return false + default: + i.keys[x] = nil + } + } + i.dir = dirSOI + return i.next() +} + +func (i *mergedIterator) Last() bool { + if i.err != nil { + return false + } else if i.dir == dirReleased { + i.err = ErrIterReleased + return false + } + + for x, iter := range i.iters { + switch { + case iter.Last(): + i.keys[x] = assertKey(iter.Key()) + case i.iterErr(iter): + return false + default: + i.keys[x] = nil + } + } + i.dir = dirEOI + return i.prev() +} + +func (i *mergedIterator) Seek(key []byte) bool { + if i.err != nil { + return false + } else if i.dir == dirReleased { + i.err = ErrIterReleased + return false + } + + for x, iter := range i.iters { + switch { + case iter.Seek(key): + i.keys[x] = assertKey(iter.Key()) + case i.iterErr(iter): + return false + default: + i.keys[x] = nil + } + } + i.dir = dirSOI + return i.next() +} + +func (i *mergedIterator) next() bool { + var key []byte + if i.dir == dirForward { + key = i.keys[i.index] + } + for x, tkey := range i.keys { + if tkey != nil && (key == nil || i.cmp.Compare(tkey, key) < 0) { + key = tkey + i.index = x + } + } + if key == nil { + i.dir = dirEOI + return false + } + i.dir = dirForward + return true +} + +func (i *mergedIterator) Next() bool { + if i.dir == dirEOI || i.err != nil { + return false + } else if i.dir == dirReleased { + i.err = ErrIterReleased + return false + } + + switch i.dir { + case dirSOI: + return i.First() + case dirBackward: + key := append([]byte{}, i.keys[i.index]...) + if !i.Seek(key) { + return false + } + return i.Next() + } + + x := i.index + iter := i.iters[x] + switch { + case iter.Next(): + i.keys[x] = assertKey(iter.Key()) + case i.iterErr(iter): + return false + default: + i.keys[x] = nil + } + return i.next() +} + +func (i *mergedIterator) prev() bool { + var key []byte + if i.dir == dirBackward { + key = i.keys[i.index] + } + for x, tkey := range i.keys { + if tkey != nil && (key == nil || i.cmp.Compare(tkey, key) > 0) { + key = tkey + i.index = x + } + } + if key == nil { + i.dir = dirSOI + return false + } + i.dir = dirBackward + return true +} + +func (i *mergedIterator) Prev() bool { + if i.dir == dirSOI || i.err != nil { + return false + } else if i.dir == dirReleased { + i.err = ErrIterReleased + return false + } + + switch i.dir { + case dirEOI: + return i.Last() + case dirForward: + key := append([]byte{}, i.keys[i.index]...) + for x, iter := range i.iters { + if x == i.index { + continue + } + seek := iter.Seek(key) + switch { + case seek && iter.Prev(), !seek && iter.Last(): + i.keys[x] = assertKey(iter.Key()) + case i.iterErr(iter): + return false + default: + i.keys[x] = nil + } + } + } + + x := i.index + iter := i.iters[x] + switch { + case iter.Prev(): + i.keys[x] = assertKey(iter.Key()) + case i.iterErr(iter): + return false + default: + i.keys[x] = nil + } + return i.prev() +} + +func (i *mergedIterator) Key() []byte { + if i.err != nil || i.dir <= dirEOI { + return nil + } + return i.keys[i.index] +} + +func (i *mergedIterator) Value() []byte { + if i.err != nil || i.dir <= dirEOI { + return nil + } + return i.iters[i.index].Value() +} + +func (i *mergedIterator) Release() { + if i.dir != dirReleased { + i.dir = dirReleased + for _, iter := range i.iters { + iter.Release() + } + i.iters = nil + i.keys = nil + if i.releaser != nil { + i.releaser.Release() + i.releaser = nil + } + } +} + +func (i *mergedIterator) SetReleaser(releaser util.Releaser) { + if i.dir == dirReleased { + panic(util.ErrReleased) + } + if i.releaser != nil && releaser != nil { + panic(util.ErrHasReleaser) + } + i.releaser = releaser +} + +func (i *mergedIterator) Error() error { + return i.err +} + +func (i *mergedIterator) SetErrorCallback(f func(err error)) { + i.errf = f +} + +// NewMergedIterator returns an iterator that merges its input. Walking the +// resultant iterator will return all key/value pairs of all input iterators +// in strictly increasing key order, as defined by cmp. +// The input's key ranges may overlap, but there are assumed to be no duplicate +// keys: if iters[i] contains a key k then iters[j] will not contain that key k. +// None of the iters may be nil. +// +// If strict is true the any 'corruption errors' (i.e errors.IsCorrupted(err) == true) +// won't be ignored and will halt 'merged iterator', otherwise the iterator will +// continue to the next 'input iterator'. +func NewMergedIterator(iters []Iterator, cmp comparer.Comparer, strict bool) Iterator { + return &mergedIterator{ + iters: iters, + cmp: cmp, + strict: strict, + keys: make([][]byte, len(iters)), + } +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/journal/journal.go b/vendor/github.com/syndtr/goleveldb/leveldb/journal/journal.go new file mode 100644 index 000000000..891098bb7 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/journal/journal.go @@ -0,0 +1,521 @@ +// Copyright 2011 The LevelDB-Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Taken from: https://code.google.com/p/leveldb-go/source/browse/leveldb/record/record.go?r=1d5ccbe03246da926391ee12d1c6caae054ff4b0 +// License, authors and contributors informations can be found at bellow URLs respectively: +// https://code.google.com/p/leveldb-go/source/browse/LICENSE +// https://code.google.com/p/leveldb-go/source/browse/AUTHORS +// https://code.google.com/p/leveldb-go/source/browse/CONTRIBUTORS + +// Package journal reads and writes sequences of journals. Each journal is a stream +// of bytes that completes before the next journal starts. +// +// When reading, call Next to obtain an io.Reader for the next journal. Next will +// return io.EOF when there are no more journals. It is valid to call Next +// without reading the current journal to exhaustion. +// +// When writing, call Next to obtain an io.Writer for the next journal. Calling +// Next finishes the current journal. Call Close to finish the final journal. +// +// Optionally, call Flush to finish the current journal and flush the underlying +// writer without starting a new journal. To start a new journal after flushing, +// call Next. +// +// Neither Readers or Writers are safe to use concurrently. +// +// Example code: +// func read(r io.Reader) ([]string, error) { +// var ss []string +// journals := journal.NewReader(r, nil, true, true) +// for { +// j, err := journals.Next() +// if err == io.EOF { +// break +// } +// if err != nil { +// return nil, err +// } +// s, err := ioutil.ReadAll(j) +// if err != nil { +// return nil, err +// } +// ss = append(ss, string(s)) +// } +// return ss, nil +// } +// +// func write(w io.Writer, ss []string) error { +// journals := journal.NewWriter(w) +// for _, s := range ss { +// j, err := journals.Next() +// if err != nil { +// return err +// } +// if _, err := j.Write([]byte(s)), err != nil { +// return err +// } +// } +// return journals.Close() +// } +// +// The wire format is that the stream is divided into 32KiB blocks, and each +// block contains a number of tightly packed chunks. Chunks cannot cross block +// boundaries. The last block may be shorter than 32 KiB. Any unused bytes in a +// block must be zero. +// +// A journal maps to one or more chunks. Each chunk has a 7 byte header (a 4 +// byte checksum, a 2 byte little-endian uint16 length, and a 1 byte chunk type) +// followed by a payload. The checksum is over the chunk type and the payload. +// +// There are four chunk types: whether the chunk is the full journal, or the +// first, middle or last chunk of a multi-chunk journal. A multi-chunk journal +// has one first chunk, zero or more middle chunks, and one last chunk. +// +// The wire format allows for limited recovery in the face of data corruption: +// on a format error (such as a checksum mismatch), the reader moves to the +// next block and looks for the next full or first chunk. +package journal + +import ( + "encoding/binary" + "fmt" + "io" + + "github.com/syndtr/goleveldb/leveldb/errors" + "github.com/syndtr/goleveldb/leveldb/storage" + "github.com/syndtr/goleveldb/leveldb/util" +) + +// These constants are part of the wire format and should not be changed. +const ( + fullChunkType = 1 + firstChunkType = 2 + middleChunkType = 3 + lastChunkType = 4 +) + +const ( + blockSize = 32 * 1024 + headerSize = 7 +) + +type flusher interface { + Flush() error +} + +// ErrCorrupted is the error type that generated by corrupted block or chunk. +type ErrCorrupted struct { + Size int + Reason string +} + +func (e *ErrCorrupted) Error() string { + return fmt.Sprintf("leveldb/journal: block/chunk corrupted: %s (%d bytes)", e.Reason, e.Size) +} + +// Dropper is the interface that wrap simple Drop method. The Drop +// method will be called when the journal reader dropping a block or chunk. +type Dropper interface { + Drop(err error) +} + +// Reader reads journals from an underlying io.Reader. +type Reader struct { + // r is the underlying reader. + r io.Reader + // the dropper. + dropper Dropper + // strict flag. + strict bool + // checksum flag. + checksum bool + // seq is the sequence number of the current journal. + seq int + // buf[i:j] is the unread portion of the current chunk's payload. + // The low bound, i, excludes the chunk header. + i, j int + // n is the number of bytes of buf that are valid. Once reading has started, + // only the final block can have n < blockSize. + n int + // last is whether the current chunk is the last chunk of the journal. + last bool + // err is any accumulated error. + err error + // buf is the buffer. + buf [blockSize]byte +} + +// NewReader returns a new reader. The dropper may be nil, and if +// strict is true then corrupted or invalid chunk will halt the journal +// reader entirely. +func NewReader(r io.Reader, dropper Dropper, strict, checksum bool) *Reader { + return &Reader{ + r: r, + dropper: dropper, + strict: strict, + checksum: checksum, + last: true, + } +} + +var errSkip = errors.New("leveldb/journal: skipped") + +func (r *Reader) corrupt(n int, reason string, skip bool) error { + if r.dropper != nil { + r.dropper.Drop(&ErrCorrupted{n, reason}) + } + if r.strict && !skip { + r.err = errors.NewErrCorrupted(storage.FileDesc{}, &ErrCorrupted{n, reason}) + return r.err + } + return errSkip +} + +// nextChunk sets r.buf[r.i:r.j] to hold the next chunk's payload, reading the +// next block into the buffer if necessary. +func (r *Reader) nextChunk(first bool) error { + for { + if r.j+headerSize <= r.n { + checksum := binary.LittleEndian.Uint32(r.buf[r.j+0 : r.j+4]) + length := binary.LittleEndian.Uint16(r.buf[r.j+4 : r.j+6]) + chunkType := r.buf[r.j+6] + + if checksum == 0 && length == 0 && chunkType == 0 { + // Drop entire block. + m := r.n - r.j + r.i = r.n + r.j = r.n + return r.corrupt(m, "zero header", false) + } else { + m := r.n - r.j + r.i = r.j + headerSize + r.j = r.j + headerSize + int(length) + if r.j > r.n { + // Drop entire block. + r.i = r.n + r.j = r.n + return r.corrupt(m, "chunk length overflows block", false) + } else if r.checksum && checksum != util.NewCRC(r.buf[r.i-1:r.j]).Value() { + // Drop entire block. + r.i = r.n + r.j = r.n + return r.corrupt(m, "checksum mismatch", false) + } + } + if first && chunkType != fullChunkType && chunkType != firstChunkType { + m := r.j - r.i + r.i = r.j + // Report the error, but skip it. + return r.corrupt(m+headerSize, "orphan chunk", true) + } + r.last = chunkType == fullChunkType || chunkType == lastChunkType + return nil + } + + // The last block. + if r.n < blockSize && r.n > 0 { + if !first { + return r.corrupt(0, "missing chunk part", false) + } + r.err = io.EOF + return r.err + } + + // Read block. + n, err := io.ReadFull(r.r, r.buf[:]) + if err != nil && err != io.EOF && err != io.ErrUnexpectedEOF { + return err + } + if n == 0 { + if !first { + return r.corrupt(0, "missing chunk part", false) + } + r.err = io.EOF + return r.err + } + r.i, r.j, r.n = 0, 0, n + } +} + +// Next returns a reader for the next journal. It returns io.EOF if there are no +// more journals. The reader returned becomes stale after the next Next call, +// and should no longer be used. If strict is false, the reader will returns +// io.ErrUnexpectedEOF error when found corrupted journal. +func (r *Reader) Next() (io.Reader, error) { + r.seq++ + if r.err != nil { + return nil, r.err + } + r.i = r.j + for { + if err := r.nextChunk(true); err == nil { + break + } else if err != errSkip { + return nil, err + } + } + return &singleReader{r, r.seq, nil}, nil +} + +// Reset resets the journal reader, allows reuse of the journal reader. Reset returns +// last accumulated error. +func (r *Reader) Reset(reader io.Reader, dropper Dropper, strict, checksum bool) error { + r.seq++ + err := r.err + r.r = reader + r.dropper = dropper + r.strict = strict + r.checksum = checksum + r.i = 0 + r.j = 0 + r.n = 0 + r.last = true + r.err = nil + return err +} + +type singleReader struct { + r *Reader + seq int + err error +} + +func (x *singleReader) Read(p []byte) (int, error) { + r := x.r + if r.seq != x.seq { + return 0, errors.New("leveldb/journal: stale reader") + } + if x.err != nil { + return 0, x.err + } + if r.err != nil { + return 0, r.err + } + for r.i == r.j { + if r.last { + return 0, io.EOF + } + x.err = r.nextChunk(false) + if x.err != nil { + if x.err == errSkip { + x.err = io.ErrUnexpectedEOF + } + return 0, x.err + } + } + n := copy(p, r.buf[r.i:r.j]) + r.i += n + return n, nil +} + +func (x *singleReader) ReadByte() (byte, error) { + r := x.r + if r.seq != x.seq { + return 0, errors.New("leveldb/journal: stale reader") + } + if x.err != nil { + return 0, x.err + } + if r.err != nil { + return 0, r.err + } + for r.i == r.j { + if r.last { + return 0, io.EOF + } + x.err = r.nextChunk(false) + if x.err != nil { + if x.err == errSkip { + x.err = io.ErrUnexpectedEOF + } + return 0, x.err + } + } + c := r.buf[r.i] + r.i++ + return c, nil +} + +// Writer writes journals to an underlying io.Writer. +type Writer struct { + // w is the underlying writer. + w io.Writer + // seq is the sequence number of the current journal. + seq int + // f is w as a flusher. + f flusher + // buf[i:j] is the bytes that will become the current chunk. + // The low bound, i, includes the chunk header. + i, j int + // buf[:written] has already been written to w. + // written is zero unless Flush has been called. + written int + // first is whether the current chunk is the first chunk of the journal. + first bool + // pending is whether a chunk is buffered but not yet written. + pending bool + // err is any accumulated error. + err error + // buf is the buffer. + buf [blockSize]byte +} + +// NewWriter returns a new Writer. +func NewWriter(w io.Writer) *Writer { + f, _ := w.(flusher) + return &Writer{ + w: w, + f: f, + } +} + +// fillHeader fills in the header for the pending chunk. +func (w *Writer) fillHeader(last bool) { + if w.i+headerSize > w.j || w.j > blockSize { + panic("leveldb/journal: bad writer state") + } + if last { + if w.first { + w.buf[w.i+6] = fullChunkType + } else { + w.buf[w.i+6] = lastChunkType + } + } else { + if w.first { + w.buf[w.i+6] = firstChunkType + } else { + w.buf[w.i+6] = middleChunkType + } + } + binary.LittleEndian.PutUint32(w.buf[w.i+0:w.i+4], util.NewCRC(w.buf[w.i+6:w.j]).Value()) + binary.LittleEndian.PutUint16(w.buf[w.i+4:w.i+6], uint16(w.j-w.i-headerSize)) +} + +// writeBlock writes the buffered block to the underlying writer, and reserves +// space for the next chunk's header. +func (w *Writer) writeBlock() { + _, w.err = w.w.Write(w.buf[w.written:]) + w.i = 0 + w.j = headerSize + w.written = 0 +} + +// writePending finishes the current journal and writes the buffer to the +// underlying writer. +func (w *Writer) writePending() { + if w.err != nil { + return + } + if w.pending { + w.fillHeader(true) + w.pending = false + } + _, w.err = w.w.Write(w.buf[w.written:w.j]) + w.written = w.j +} + +// Close finishes the current journal and closes the writer. +func (w *Writer) Close() error { + w.seq++ + w.writePending() + if w.err != nil { + return w.err + } + w.err = errors.New("leveldb/journal: closed Writer") + return nil +} + +// Flush finishes the current journal, writes to the underlying writer, and +// flushes it if that writer implements interface{ Flush() error }. +func (w *Writer) Flush() error { + w.seq++ + w.writePending() + if w.err != nil { + return w.err + } + if w.f != nil { + w.err = w.f.Flush() + return w.err + } + return nil +} + +// Reset resets the journal writer, allows reuse of the journal writer. Reset +// will also closes the journal writer if not already. +func (w *Writer) Reset(writer io.Writer) (err error) { + w.seq++ + if w.err == nil { + w.writePending() + err = w.err + } + w.w = writer + w.f, _ = writer.(flusher) + w.i = 0 + w.j = 0 + w.written = 0 + w.first = false + w.pending = false + w.err = nil + return +} + +// Next returns a writer for the next journal. The writer returned becomes stale +// after the next Close, Flush or Next call, and should no longer be used. +func (w *Writer) Next() (io.Writer, error) { + w.seq++ + if w.err != nil { + return nil, w.err + } + if w.pending { + w.fillHeader(true) + } + w.i = w.j + w.j = w.j + headerSize + // Check if there is room in the block for the header. + if w.j > blockSize { + // Fill in the rest of the block with zeroes. + for k := w.i; k < blockSize; k++ { + w.buf[k] = 0 + } + w.writeBlock() + if w.err != nil { + return nil, w.err + } + } + w.first = true + w.pending = true + return singleWriter{w, w.seq}, nil +} + +type singleWriter struct { + w *Writer + seq int +} + +func (x singleWriter) Write(p []byte) (int, error) { + w := x.w + if w.seq != x.seq { + return 0, errors.New("leveldb/journal: stale writer") + } + if w.err != nil { + return 0, w.err + } + n0 := len(p) + for len(p) > 0 { + // Write a block, if it is full. + if w.j == blockSize { + w.fillHeader(false) + w.writeBlock() + if w.err != nil { + return 0, w.err + } + w.first = false + } + // Copy bytes into the buffer. + n := copy(w.buf[w.j:], p) + w.j += n + p = p[n:] + } + return n0, nil +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/key.go b/vendor/github.com/syndtr/goleveldb/leveldb/key.go new file mode 100644 index 000000000..d0b80aaf9 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/key.go @@ -0,0 +1,147 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "encoding/binary" + "fmt" + + "github.com/syndtr/goleveldb/leveldb/errors" + "github.com/syndtr/goleveldb/leveldb/storage" +) + +// ErrInternalKeyCorrupted records internal key corruption. +type ErrInternalKeyCorrupted struct { + Ikey []byte + Reason string +} + +func (e *ErrInternalKeyCorrupted) Error() string { + return fmt.Sprintf("leveldb: internal key %q corrupted: %s", e.Ikey, e.Reason) +} + +func newErrInternalKeyCorrupted(ikey []byte, reason string) error { + return errors.NewErrCorrupted(storage.FileDesc{}, &ErrInternalKeyCorrupted{append([]byte{}, ikey...), reason}) +} + +type keyType uint + +func (kt keyType) String() string { + switch kt { + case keyTypeDel: + return "d" + case keyTypeVal: + return "v" + } + return "x" +} + +// Value types encoded as the last component of internal keys. +// Don't modify; this value are saved to disk. +const ( + keyTypeDel keyType = iota + keyTypeVal +) + +// keyTypeSeek defines the keyType that should be passed when constructing an +// internal key for seeking to a particular sequence number (since we +// sort sequence numbers in decreasing order and the value type is +// embedded as the low 8 bits in the sequence number in internal keys, +// we need to use the highest-numbered ValueType, not the lowest). +const keyTypeSeek = keyTypeVal + +const ( + // Maximum value possible for sequence number; the 8-bits are + // used by value type, so its can packed together in single + // 64-bit integer. + keyMaxSeq = (uint64(1) << 56) - 1 + // Maximum value possible for packed sequence number and type. + keyMaxNum = (keyMaxSeq << 8) | uint64(keyTypeSeek) +) + +// Maximum number encoded in bytes. +var keyMaxNumBytes = make([]byte, 8) + +func init() { + binary.LittleEndian.PutUint64(keyMaxNumBytes, keyMaxNum) +} + +type internalKey []byte + +func makeInternalKey(dst, ukey []byte, seq uint64, kt keyType) internalKey { + if seq > keyMaxSeq { + panic("leveldb: invalid sequence number") + } else if kt > keyTypeVal { + panic("leveldb: invalid type") + } + + if n := len(ukey) + 8; cap(dst) < n { + dst = make([]byte, n) + } else { + dst = dst[:n] + } + copy(dst, ukey) + binary.LittleEndian.PutUint64(dst[len(ukey):], (seq<<8)|uint64(kt)) + return internalKey(dst) +} + +func parseInternalKey(ik []byte) (ukey []byte, seq uint64, kt keyType, err error) { + if len(ik) < 8 { + return nil, 0, 0, newErrInternalKeyCorrupted(ik, "invalid length") + } + num := binary.LittleEndian.Uint64(ik[len(ik)-8:]) + seq, kt = uint64(num>>8), keyType(num&0xff) + if kt > keyTypeVal { + return nil, 0, 0, newErrInternalKeyCorrupted(ik, "invalid type") + } + ukey = ik[:len(ik)-8] + return +} + +func validInternalKey(ik []byte) bool { + _, _, _, err := parseInternalKey(ik) + return err == nil +} + +func (ik internalKey) assert() { + if ik == nil { + panic("leveldb: nil internalKey") + } + if len(ik) < 8 { + panic(fmt.Sprintf("leveldb: internal key %q, len=%d: invalid length", []byte(ik), len(ik))) + } +} + +func (ik internalKey) ukey() []byte { + ik.assert() + return ik[:len(ik)-8] +} + +func (ik internalKey) num() uint64 { + ik.assert() + return binary.LittleEndian.Uint64(ik[len(ik)-8:]) +} + +func (ik internalKey) parseNum() (seq uint64, kt keyType) { + num := ik.num() + seq, kt = uint64(num>>8), keyType(num&0xff) + if kt > keyTypeVal { + panic(fmt.Sprintf("leveldb: internal key %q, len=%d: invalid type %#x", []byte(ik), len(ik), kt)) + } + return +} + +func (ik internalKey) String() string { + if ik == nil { + return "" + } + + if ukey, seq, kt, err := parseInternalKey(ik); err == nil { + return fmt.Sprintf("%s,%s%d", shorten(string(ukey)), kt, seq) + } + return "" +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/memdb/memdb.go b/vendor/github.com/syndtr/goleveldb/leveldb/memdb/memdb.go new file mode 100644 index 000000000..1395bd928 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/memdb/memdb.go @@ -0,0 +1,471 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Package memdb provides in-memory key/value database implementation. +package memdb + +import ( + "math/rand" + "sync" + + "github.com/syndtr/goleveldb/leveldb/comparer" + "github.com/syndtr/goleveldb/leveldb/errors" + "github.com/syndtr/goleveldb/leveldb/iterator" + "github.com/syndtr/goleveldb/leveldb/util" +) + +var ( + ErrNotFound = errors.ErrNotFound + ErrIterReleased = errors.New("leveldb/memdb: iterator released") +) + +const tMaxHeight = 12 + +type dbIter struct { + util.BasicReleaser + p *DB + slice *util.Range + node int + forward bool + key, value []byte + err error +} + +func (i *dbIter) fill(checkStart, checkLimit bool) bool { + if i.node != 0 { + n := i.p.nodeData[i.node] + m := n + i.p.nodeData[i.node+nKey] + i.key = i.p.kvData[n:m] + if i.slice != nil { + switch { + case checkLimit && i.slice.Limit != nil && i.p.cmp.Compare(i.key, i.slice.Limit) >= 0: + fallthrough + case checkStart && i.slice.Start != nil && i.p.cmp.Compare(i.key, i.slice.Start) < 0: + i.node = 0 + goto bail + } + } + i.value = i.p.kvData[m : m+i.p.nodeData[i.node+nVal]] + return true + } +bail: + i.key = nil + i.value = nil + return false +} + +func (i *dbIter) Valid() bool { + return i.node != 0 +} + +func (i *dbIter) First() bool { + if i.Released() { + i.err = ErrIterReleased + return false + } + + i.forward = true + i.p.mu.RLock() + defer i.p.mu.RUnlock() + if i.slice != nil && i.slice.Start != nil { + i.node, _ = i.p.findGE(i.slice.Start, false) + } else { + i.node = i.p.nodeData[nNext] + } + return i.fill(false, true) +} + +func (i *dbIter) Last() bool { + if i.Released() { + i.err = ErrIterReleased + return false + } + + i.forward = false + i.p.mu.RLock() + defer i.p.mu.RUnlock() + if i.slice != nil && i.slice.Limit != nil { + i.node = i.p.findLT(i.slice.Limit) + } else { + i.node = i.p.findLast() + } + return i.fill(true, false) +} + +func (i *dbIter) Seek(key []byte) bool { + if i.Released() { + i.err = ErrIterReleased + return false + } + + i.forward = true + i.p.mu.RLock() + defer i.p.mu.RUnlock() + if i.slice != nil && i.slice.Start != nil && i.p.cmp.Compare(key, i.slice.Start) < 0 { + key = i.slice.Start + } + i.node, _ = i.p.findGE(key, false) + return i.fill(false, true) +} + +func (i *dbIter) Next() bool { + if i.Released() { + i.err = ErrIterReleased + return false + } + + if i.node == 0 { + if !i.forward { + return i.First() + } + return false + } + i.forward = true + i.p.mu.RLock() + defer i.p.mu.RUnlock() + i.node = i.p.nodeData[i.node+nNext] + return i.fill(false, true) +} + +func (i *dbIter) Prev() bool { + if i.Released() { + i.err = ErrIterReleased + return false + } + + if i.node == 0 { + if i.forward { + return i.Last() + } + return false + } + i.forward = false + i.p.mu.RLock() + defer i.p.mu.RUnlock() + i.node = i.p.findLT(i.key) + return i.fill(true, false) +} + +func (i *dbIter) Key() []byte { + return i.key +} + +func (i *dbIter) Value() []byte { + return i.value +} + +func (i *dbIter) Error() error { return i.err } + +func (i *dbIter) Release() { + if !i.Released() { + i.p = nil + i.node = 0 + i.key = nil + i.value = nil + i.BasicReleaser.Release() + } +} + +const ( + nKV = iota + nKey + nVal + nHeight + nNext +) + +// DB is an in-memory key/value database. +type DB struct { + cmp comparer.BasicComparer + rnd *rand.Rand + + mu sync.RWMutex + kvData []byte + // Node data: + // [0] : KV offset + // [1] : Key length + // [2] : Value length + // [3] : Height + // [3..height] : Next nodes + nodeData []int + prevNode [tMaxHeight]int + maxHeight int + n int + kvSize int +} + +func (p *DB) randHeight() (h int) { + const branching = 4 + h = 1 + for h < tMaxHeight && p.rnd.Int()%branching == 0 { + h++ + } + return +} + +// Must hold RW-lock if prev == true, as it use shared prevNode slice. +func (p *DB) findGE(key []byte, prev bool) (int, bool) { + node := 0 + h := p.maxHeight - 1 + for { + next := p.nodeData[node+nNext+h] + cmp := 1 + if next != 0 { + o := p.nodeData[next] + cmp = p.cmp.Compare(p.kvData[o:o+p.nodeData[next+nKey]], key) + } + if cmp < 0 { + // Keep searching in this list + node = next + } else { + if prev { + p.prevNode[h] = node + } else if cmp == 0 { + return next, true + } + if h == 0 { + return next, cmp == 0 + } + h-- + } + } +} + +func (p *DB) findLT(key []byte) int { + node := 0 + h := p.maxHeight - 1 + for { + next := p.nodeData[node+nNext+h] + o := p.nodeData[next] + if next == 0 || p.cmp.Compare(p.kvData[o:o+p.nodeData[next+nKey]], key) >= 0 { + if h == 0 { + break + } + h-- + } else { + node = next + } + } + return node +} + +func (p *DB) findLast() int { + node := 0 + h := p.maxHeight - 1 + for { + next := p.nodeData[node+nNext+h] + if next == 0 { + if h == 0 { + break + } + h-- + } else { + node = next + } + } + return node +} + +// Put sets the value for the given key. It overwrites any previous value +// for that key; a DB is not a multi-map. +// +// It is safe to modify the contents of the arguments after Put returns. +func (p *DB) Put(key []byte, value []byte) error { + p.mu.Lock() + defer p.mu.Unlock() + + if node, exact := p.findGE(key, true); exact { + kvOffset := len(p.kvData) + p.kvData = append(p.kvData, key...) + p.kvData = append(p.kvData, value...) + p.nodeData[node] = kvOffset + m := p.nodeData[node+nVal] + p.nodeData[node+nVal] = len(value) + p.kvSize += len(value) - m + return nil + } + + h := p.randHeight() + if h > p.maxHeight { + for i := p.maxHeight; i < h; i++ { + p.prevNode[i] = 0 + } + p.maxHeight = h + } + + kvOffset := len(p.kvData) + p.kvData = append(p.kvData, key...) + p.kvData = append(p.kvData, value...) + // Node + node := len(p.nodeData) + p.nodeData = append(p.nodeData, kvOffset, len(key), len(value), h) + for i, n := range p.prevNode[:h] { + m := n + nNext + i + p.nodeData = append(p.nodeData, p.nodeData[m]) + p.nodeData[m] = node + } + + p.kvSize += len(key) + len(value) + p.n++ + return nil +} + +// Delete deletes the value for the given key. It returns ErrNotFound if +// the DB does not contain the key. +// +// It is safe to modify the contents of the arguments after Delete returns. +func (p *DB) Delete(key []byte) error { + p.mu.Lock() + defer p.mu.Unlock() + + node, exact := p.findGE(key, true) + if !exact { + return ErrNotFound + } + + h := p.nodeData[node+nHeight] + for i, n := range p.prevNode[:h] { + m := n + 4 + i + p.nodeData[m] = p.nodeData[p.nodeData[m]+nNext+i] + } + + p.kvSize -= p.nodeData[node+nKey] + p.nodeData[node+nVal] + p.n-- + return nil +} + +// Contains returns true if the given key are in the DB. +// +// It is safe to modify the contents of the arguments after Contains returns. +func (p *DB) Contains(key []byte) bool { + p.mu.RLock() + _, exact := p.findGE(key, false) + p.mu.RUnlock() + return exact +} + +// Get gets the value for the given key. It returns error.ErrNotFound if the +// DB does not contain the key. +// +// The caller should not modify the contents of the returned slice, but +// it is safe to modify the contents of the argument after Get returns. +func (p *DB) Get(key []byte) (value []byte, err error) { + p.mu.RLock() + if node, exact := p.findGE(key, false); exact { + o := p.nodeData[node] + p.nodeData[node+nKey] + value = p.kvData[o : o+p.nodeData[node+nVal]] + } else { + err = ErrNotFound + } + p.mu.RUnlock() + return +} + +// Find finds key/value pair whose key is greater than or equal to the +// given key. It returns ErrNotFound if the table doesn't contain +// such pair. +// +// The caller should not modify the contents of the returned slice, but +// it is safe to modify the contents of the argument after Find returns. +func (p *DB) Find(key []byte) (rkey, value []byte, err error) { + p.mu.RLock() + if node, _ := p.findGE(key, false); node != 0 { + n := p.nodeData[node] + m := n + p.nodeData[node+nKey] + rkey = p.kvData[n:m] + value = p.kvData[m : m+p.nodeData[node+nVal]] + } else { + err = ErrNotFound + } + p.mu.RUnlock() + return +} + +// NewIterator returns an iterator of the DB. +// The returned iterator is not goroutine-safe, but it is safe to use +// multiple iterators concurrently, with each in a dedicated goroutine. +// It is also safe to use an iterator concurrently with modifying its +// underlying DB. However, the resultant key/value pairs are not guaranteed +// to be a consistent snapshot of the DB at a particular point in time. +// +// Slice allows slicing the iterator to only contains keys in the given +// range. A nil Range.Start is treated as a key before all keys in the +// DB. And a nil Range.Limit is treated as a key after all keys in +// the DB. +// +// The iterator must be released after use, by calling Release method. +// +// Also read Iterator documentation of the leveldb/iterator package. +func (p *DB) NewIterator(slice *util.Range) iterator.Iterator { + return &dbIter{p: p, slice: slice} +} + +// Capacity returns keys/values buffer capacity. +func (p *DB) Capacity() int { + p.mu.RLock() + defer p.mu.RUnlock() + return cap(p.kvData) +} + +// Size returns sum of keys and values length. Note that deleted +// key/value will not be accouted for, but it will still consume +// the buffer, since the buffer is append only. +func (p *DB) Size() int { + p.mu.RLock() + defer p.mu.RUnlock() + return p.kvSize +} + +// Free returns keys/values free buffer before need to grow. +func (p *DB) Free() int { + p.mu.RLock() + defer p.mu.RUnlock() + return cap(p.kvData) - len(p.kvData) +} + +// Len returns the number of entries in the DB. +func (p *DB) Len() int { + p.mu.RLock() + defer p.mu.RUnlock() + return p.n +} + +// Reset resets the DB to initial empty state. Allows reuse the buffer. +func (p *DB) Reset() { + p.mu.Lock() + p.rnd = rand.New(rand.NewSource(0xdeadbeef)) + p.maxHeight = 1 + p.n = 0 + p.kvSize = 0 + p.kvData = p.kvData[:0] + p.nodeData = p.nodeData[:nNext+tMaxHeight] + p.nodeData[nKV] = 0 + p.nodeData[nKey] = 0 + p.nodeData[nVal] = 0 + p.nodeData[nHeight] = tMaxHeight + for n := 0; n < tMaxHeight; n++ { + p.nodeData[nNext+n] = 0 + p.prevNode[n] = 0 + } + p.mu.Unlock() +} + +// New creates a new initalized in-memory key/value DB. The capacity +// is the initial key/value buffer capacity. The capacity is advisory, +// not enforced. +// +// The returned DB instance is goroutine-safe. +func New(cmp comparer.BasicComparer, capacity int) *DB { + p := &DB{ + cmp: cmp, + rnd: rand.New(rand.NewSource(0xdeadbeef)), + maxHeight: 1, + kvData: make([]byte, 0, capacity), + nodeData: make([]int, 4+tMaxHeight), + } + p.nodeData[nHeight] = tMaxHeight + return p +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/opt/options.go b/vendor/github.com/syndtr/goleveldb/leveldb/opt/options.go new file mode 100644 index 000000000..3d2bf1c02 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/opt/options.go @@ -0,0 +1,660 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Package opt provides sets of options used by LevelDB. +package opt + +import ( + "math" + + "github.com/syndtr/goleveldb/leveldb/cache" + "github.com/syndtr/goleveldb/leveldb/comparer" + "github.com/syndtr/goleveldb/leveldb/filter" +) + +const ( + KiB = 1024 + MiB = KiB * 1024 + GiB = MiB * 1024 +) + +var ( + DefaultBlockCacher = LRUCacher + DefaultBlockCacheCapacity = 8 * MiB + DefaultBlockRestartInterval = 16 + DefaultBlockSize = 4 * KiB + DefaultCompactionExpandLimitFactor = 25 + DefaultCompactionGPOverlapsFactor = 10 + DefaultCompactionL0Trigger = 4 + DefaultCompactionSourceLimitFactor = 1 + DefaultCompactionTableSize = 2 * MiB + DefaultCompactionTableSizeMultiplier = 1.0 + DefaultCompactionTotalSize = 10 * MiB + DefaultCompactionTotalSizeMultiplier = 10.0 + DefaultCompressionType = SnappyCompression + DefaultIteratorSamplingRate = 1 * MiB + DefaultOpenFilesCacher = LRUCacher + DefaultOpenFilesCacheCapacity = 500 + DefaultWriteBuffer = 4 * MiB + DefaultWriteL0PauseTrigger = 12 + DefaultWriteL0SlowdownTrigger = 8 +) + +// Cacher is a caching algorithm. +type Cacher interface { + New(capacity int) cache.Cacher +} + +type CacherFunc struct { + NewFunc func(capacity int) cache.Cacher +} + +func (f *CacherFunc) New(capacity int) cache.Cacher { + if f.NewFunc != nil { + return f.NewFunc(capacity) + } + return nil +} + +func noCacher(int) cache.Cacher { return nil } + +var ( + // LRUCacher is the LRU-cache algorithm. + LRUCacher = &CacherFunc{cache.NewLRU} + + // NoCacher is the value to disable caching algorithm. + NoCacher = &CacherFunc{} +) + +// Compression is the 'sorted table' block compression algorithm to use. +type Compression uint + +func (c Compression) String() string { + switch c { + case DefaultCompression: + return "default" + case NoCompression: + return "none" + case SnappyCompression: + return "snappy" + } + return "invalid" +} + +const ( + DefaultCompression Compression = iota + NoCompression + SnappyCompression + nCompression +) + +// Strict is the DB 'strict level'. +type Strict uint + +const ( + // If present then a corrupted or invalid chunk or block in manifest + // journal will cause an error instead of being dropped. + // This will prevent database with corrupted manifest to be opened. + StrictManifest Strict = 1 << iota + + // If present then journal chunk checksum will be verified. + StrictJournalChecksum + + // If present then a corrupted or invalid chunk or block in journal + // will cause an error instead of being dropped. + // This will prevent database with corrupted journal to be opened. + StrictJournal + + // If present then 'sorted table' block checksum will be verified. + // This has effect on both 'read operation' and compaction. + StrictBlockChecksum + + // If present then a corrupted 'sorted table' will fails compaction. + // The database will enter read-only mode. + StrictCompaction + + // If present then a corrupted 'sorted table' will halts 'read operation'. + StrictReader + + // If present then leveldb.Recover will drop corrupted 'sorted table'. + StrictRecovery + + // This only applicable for ReadOptions, if present then this ReadOptions + // 'strict level' will override global ones. + StrictOverride + + // StrictAll enables all strict flags. + StrictAll = StrictManifest | StrictJournalChecksum | StrictJournal | StrictBlockChecksum | StrictCompaction | StrictReader | StrictRecovery + + // DefaultStrict is the default strict flags. Specify any strict flags + // will override default strict flags as whole (i.e. not OR'ed). + DefaultStrict = StrictJournalChecksum | StrictBlockChecksum | StrictCompaction | StrictReader + + // NoStrict disables all strict flags. Override default strict flags. + NoStrict = ^StrictAll +) + +// Options holds the optional parameters for the DB at large. +type Options struct { + // AltFilters defines one or more 'alternative filters'. + // 'alternative filters' will be used during reads if a filter block + // does not match with the 'effective filter'. + // + // The default value is nil + AltFilters []filter.Filter + + // BlockCacher provides cache algorithm for LevelDB 'sorted table' block caching. + // Specify NoCacher to disable caching algorithm. + // + // The default value is LRUCacher. + BlockCacher Cacher + + // BlockCacheCapacity defines the capacity of the 'sorted table' block caching. + // Use -1 for zero, this has same effect as specifying NoCacher to BlockCacher. + // + // The default value is 8MiB. + BlockCacheCapacity int + + // BlockRestartInterval is the number of keys between restart points for + // delta encoding of keys. + // + // The default value is 16. + BlockRestartInterval int + + // BlockSize is the minimum uncompressed size in bytes of each 'sorted table' + // block. + // + // The default value is 4KiB. + BlockSize int + + // CompactionExpandLimitFactor limits compaction size after expanded. + // This will be multiplied by table size limit at compaction target level. + // + // The default value is 25. + CompactionExpandLimitFactor int + + // CompactionGPOverlapsFactor limits overlaps in grandparent (Level + 2) that a + // single 'sorted table' generates. + // This will be multiplied by table size limit at grandparent level. + // + // The default value is 10. + CompactionGPOverlapsFactor int + + // CompactionL0Trigger defines number of 'sorted table' at level-0 that will + // trigger compaction. + // + // The default value is 4. + CompactionL0Trigger int + + // CompactionSourceLimitFactor limits compaction source size. This doesn't apply to + // level-0. + // This will be multiplied by table size limit at compaction target level. + // + // The default value is 1. + CompactionSourceLimitFactor int + + // CompactionTableSize limits size of 'sorted table' that compaction generates. + // The limits for each level will be calculated as: + // CompactionTableSize * (CompactionTableSizeMultiplier ^ Level) + // The multiplier for each level can also fine-tuned using CompactionTableSizeMultiplierPerLevel. + // + // The default value is 2MiB. + CompactionTableSize int + + // CompactionTableSizeMultiplier defines multiplier for CompactionTableSize. + // + // The default value is 1. + CompactionTableSizeMultiplier float64 + + // CompactionTableSizeMultiplierPerLevel defines per-level multiplier for + // CompactionTableSize. + // Use zero to skip a level. + // + // The default value is nil. + CompactionTableSizeMultiplierPerLevel []float64 + + // CompactionTotalSize limits total size of 'sorted table' for each level. + // The limits for each level will be calculated as: + // CompactionTotalSize * (CompactionTotalSizeMultiplier ^ Level) + // The multiplier for each level can also fine-tuned using + // CompactionTotalSizeMultiplierPerLevel. + // + // The default value is 10MiB. + CompactionTotalSize int + + // CompactionTotalSizeMultiplier defines multiplier for CompactionTotalSize. + // + // The default value is 10. + CompactionTotalSizeMultiplier float64 + + // CompactionTotalSizeMultiplierPerLevel defines per-level multiplier for + // CompactionTotalSize. + // Use zero to skip a level. + // + // The default value is nil. + CompactionTotalSizeMultiplierPerLevel []float64 + + // Comparer defines a total ordering over the space of []byte keys: a 'less + // than' relationship. The same comparison algorithm must be used for reads + // and writes over the lifetime of the DB. + // + // The default value uses the same ordering as bytes.Compare. + Comparer comparer.Comparer + + // Compression defines the 'sorted table' block compression to use. + // + // The default value (DefaultCompression) uses snappy compression. + Compression Compression + + // DisableBufferPool allows disable use of util.BufferPool functionality. + // + // The default value is false. + DisableBufferPool bool + + // DisableBlockCache allows disable use of cache.Cache functionality on + // 'sorted table' block. + // + // The default value is false. + DisableBlockCache bool + + // DisableCompactionBackoff allows disable compaction retry backoff. + // + // The default value is false. + DisableCompactionBackoff bool + + // DisableLargeBatchTransaction allows disabling switch-to-transaction mode + // on large batch write. If enable batch writes large than WriteBuffer will + // use transaction. + // + // The default is false. + DisableLargeBatchTransaction bool + + // ErrorIfExist defines whether an error should returned if the DB already + // exist. + // + // The default value is false. + ErrorIfExist bool + + // ErrorIfMissing defines whether an error should returned if the DB is + // missing. If false then the database will be created if missing, otherwise + // an error will be returned. + // + // The default value is false. + ErrorIfMissing bool + + // Filter defines an 'effective filter' to use. An 'effective filter' + // if defined will be used to generate per-table filter block. + // The filter name will be stored on disk. + // During reads LevelDB will try to find matching filter from + // 'effective filter' and 'alternative filters'. + // + // Filter can be changed after a DB has been created. It is recommended + // to put old filter to the 'alternative filters' to mitigate lack of + // filter during transition period. + // + // A filter is used to reduce disk reads when looking for a specific key. + // + // The default value is nil. + Filter filter.Filter + + // IteratorSamplingRate defines approximate gap (in bytes) between read + // sampling of an iterator. The samples will be used to determine when + // compaction should be triggered. + // + // The default is 1MiB. + IteratorSamplingRate int + + // NoSync allows completely disable fsync. + // + // The default is false. + NoSync bool + + // OpenFilesCacher provides cache algorithm for open files caching. + // Specify NoCacher to disable caching algorithm. + // + // The default value is LRUCacher. + OpenFilesCacher Cacher + + // OpenFilesCacheCapacity defines the capacity of the open files caching. + // Use -1 for zero, this has same effect as specifying NoCacher to OpenFilesCacher. + // + // The default value is 500. + OpenFilesCacheCapacity int + + // If true then opens DB in read-only mode. + // + // The default value is false. + ReadOnly bool + + // Strict defines the DB strict level. + Strict Strict + + // WriteBuffer defines maximum size of a 'memdb' before flushed to + // 'sorted table'. 'memdb' is an in-memory DB backed by an on-disk + // unsorted journal. + // + // LevelDB may held up to two 'memdb' at the same time. + // + // The default value is 4MiB. + WriteBuffer int + + // WriteL0StopTrigger defines number of 'sorted table' at level-0 that will + // pause write. + // + // The default value is 12. + WriteL0PauseTrigger int + + // WriteL0SlowdownTrigger defines number of 'sorted table' at level-0 that + // will trigger write slowdown. + // + // The default value is 8. + WriteL0SlowdownTrigger int +} + +func (o *Options) GetAltFilters() []filter.Filter { + if o == nil { + return nil + } + return o.AltFilters +} + +func (o *Options) GetBlockCacher() Cacher { + if o == nil || o.BlockCacher == nil { + return DefaultBlockCacher + } else if o.BlockCacher == NoCacher { + return nil + } + return o.BlockCacher +} + +func (o *Options) GetBlockCacheCapacity() int { + if o == nil || o.BlockCacheCapacity == 0 { + return DefaultBlockCacheCapacity + } else if o.BlockCacheCapacity < 0 { + return 0 + } + return o.BlockCacheCapacity +} + +func (o *Options) GetBlockRestartInterval() int { + if o == nil || o.BlockRestartInterval <= 0 { + return DefaultBlockRestartInterval + } + return o.BlockRestartInterval +} + +func (o *Options) GetBlockSize() int { + if o == nil || o.BlockSize <= 0 { + return DefaultBlockSize + } + return o.BlockSize +} + +func (o *Options) GetCompactionExpandLimit(level int) int { + factor := DefaultCompactionExpandLimitFactor + if o != nil && o.CompactionExpandLimitFactor > 0 { + factor = o.CompactionExpandLimitFactor + } + return o.GetCompactionTableSize(level+1) * factor +} + +func (o *Options) GetCompactionGPOverlaps(level int) int { + factor := DefaultCompactionGPOverlapsFactor + if o != nil && o.CompactionGPOverlapsFactor > 0 { + factor = o.CompactionGPOverlapsFactor + } + return o.GetCompactionTableSize(level+2) * factor +} + +func (o *Options) GetCompactionL0Trigger() int { + if o == nil || o.CompactionL0Trigger == 0 { + return DefaultCompactionL0Trigger + } + return o.CompactionL0Trigger +} + +func (o *Options) GetCompactionSourceLimit(level int) int { + factor := DefaultCompactionSourceLimitFactor + if o != nil && o.CompactionSourceLimitFactor > 0 { + factor = o.CompactionSourceLimitFactor + } + return o.GetCompactionTableSize(level+1) * factor +} + +func (o *Options) GetCompactionTableSize(level int) int { + var ( + base = DefaultCompactionTableSize + mult float64 + ) + if o != nil { + if o.CompactionTableSize > 0 { + base = o.CompactionTableSize + } + if level < len(o.CompactionTableSizeMultiplierPerLevel) && o.CompactionTableSizeMultiplierPerLevel[level] > 0 { + mult = o.CompactionTableSizeMultiplierPerLevel[level] + } else if o.CompactionTableSizeMultiplier > 0 { + mult = math.Pow(o.CompactionTableSizeMultiplier, float64(level)) + } + } + if mult == 0 { + mult = math.Pow(DefaultCompactionTableSizeMultiplier, float64(level)) + } + return int(float64(base) * mult) +} + +func (o *Options) GetCompactionTotalSize(level int) int64 { + var ( + base = DefaultCompactionTotalSize + mult float64 + ) + if o != nil { + if o.CompactionTotalSize > 0 { + base = o.CompactionTotalSize + } + if level < len(o.CompactionTotalSizeMultiplierPerLevel) && o.CompactionTotalSizeMultiplierPerLevel[level] > 0 { + mult = o.CompactionTotalSizeMultiplierPerLevel[level] + } else if o.CompactionTotalSizeMultiplier > 0 { + mult = math.Pow(o.CompactionTotalSizeMultiplier, float64(level)) + } + } + if mult == 0 { + mult = math.Pow(DefaultCompactionTotalSizeMultiplier, float64(level)) + } + return int64(float64(base) * mult) +} + +func (o *Options) GetComparer() comparer.Comparer { + if o == nil || o.Comparer == nil { + return comparer.DefaultComparer + } + return o.Comparer +} + +func (o *Options) GetCompression() Compression { + if o == nil || o.Compression <= DefaultCompression || o.Compression >= nCompression { + return DefaultCompressionType + } + return o.Compression +} + +func (o *Options) GetDisableBufferPool() bool { + if o == nil { + return false + } + return o.DisableBufferPool +} + +func (o *Options) GetDisableBlockCache() bool { + if o == nil { + return false + } + return o.DisableBlockCache +} + +func (o *Options) GetDisableCompactionBackoff() bool { + if o == nil { + return false + } + return o.DisableCompactionBackoff +} + +func (o *Options) GetDisableLargeBatchTransaction() bool { + if o == nil { + return false + } + return o.DisableLargeBatchTransaction +} + +func (o *Options) GetErrorIfExist() bool { + if o == nil { + return false + } + return o.ErrorIfExist +} + +func (o *Options) GetErrorIfMissing() bool { + if o == nil { + return false + } + return o.ErrorIfMissing +} + +func (o *Options) GetFilter() filter.Filter { + if o == nil { + return nil + } + return o.Filter +} + +func (o *Options) GetIteratorSamplingRate() int { + if o == nil || o.IteratorSamplingRate <= 0 { + return DefaultIteratorSamplingRate + } + return o.IteratorSamplingRate +} + +func (o *Options) GetNoSync() bool { + if o == nil { + return false + } + return o.NoSync +} + +func (o *Options) GetOpenFilesCacher() Cacher { + if o == nil || o.OpenFilesCacher == nil { + return DefaultOpenFilesCacher + } + if o.OpenFilesCacher == NoCacher { + return nil + } + return o.OpenFilesCacher +} + +func (o *Options) GetOpenFilesCacheCapacity() int { + if o == nil || o.OpenFilesCacheCapacity == 0 { + return DefaultOpenFilesCacheCapacity + } else if o.OpenFilesCacheCapacity < 0 { + return 0 + } + return o.OpenFilesCacheCapacity +} + +func (o *Options) GetReadOnly() bool { + if o == nil { + return false + } + return o.ReadOnly +} + +func (o *Options) GetStrict(strict Strict) bool { + if o == nil || o.Strict == 0 { + return DefaultStrict&strict != 0 + } + return o.Strict&strict != 0 +} + +func (o *Options) GetWriteBuffer() int { + if o == nil || o.WriteBuffer <= 0 { + return DefaultWriteBuffer + } + return o.WriteBuffer +} + +func (o *Options) GetWriteL0PauseTrigger() int { + if o == nil || o.WriteL0PauseTrigger == 0 { + return DefaultWriteL0PauseTrigger + } + return o.WriteL0PauseTrigger +} + +func (o *Options) GetWriteL0SlowdownTrigger() int { + if o == nil || o.WriteL0SlowdownTrigger == 0 { + return DefaultWriteL0SlowdownTrigger + } + return o.WriteL0SlowdownTrigger +} + +// ReadOptions holds the optional parameters for 'read operation'. The +// 'read operation' includes Get, Find and NewIterator. +type ReadOptions struct { + // DontFillCache defines whether block reads for this 'read operation' + // should be cached. If false then the block will be cached. This does + // not affects already cached block. + // + // The default value is false. + DontFillCache bool + + // Strict will be OR'ed with global DB 'strict level' unless StrictOverride + // is present. Currently only StrictReader that has effect here. + Strict Strict +} + +func (ro *ReadOptions) GetDontFillCache() bool { + if ro == nil { + return false + } + return ro.DontFillCache +} + +func (ro *ReadOptions) GetStrict(strict Strict) bool { + if ro == nil { + return false + } + return ro.Strict&strict != 0 +} + +// WriteOptions holds the optional parameters for 'write operation'. The +// 'write operation' includes Write, Put and Delete. +type WriteOptions struct { + // Sync is whether to sync underlying writes from the OS buffer cache + // through to actual disk, if applicable. Setting Sync can result in + // slower writes. + // + // If false, and the machine crashes, then some recent writes may be lost. + // Note that if it is just the process that crashes (and the machine does + // not) then no writes will be lost. + // + // In other words, Sync being false has the same semantics as a write + // system call. Sync being true means write followed by fsync. + // + // The default value is false. + Sync bool +} + +func (wo *WriteOptions) GetSync() bool { + if wo == nil { + return false + } + return wo.Sync +} + +func GetStrict(o *Options, ro *ReadOptions, strict Strict) bool { + if ro.GetStrict(StrictOverride) { + return ro.GetStrict(strict) + } else { + return o.GetStrict(strict) || ro.GetStrict(strict) + } +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/options.go b/vendor/github.com/syndtr/goleveldb/leveldb/options.go new file mode 100644 index 000000000..b072b1ac4 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/options.go @@ -0,0 +1,107 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "github.com/syndtr/goleveldb/leveldb/filter" + "github.com/syndtr/goleveldb/leveldb/opt" +) + +func dupOptions(o *opt.Options) *opt.Options { + newo := &opt.Options{} + if o != nil { + *newo = *o + } + if newo.Strict == 0 { + newo.Strict = opt.DefaultStrict + } + return newo +} + +func (s *session) setOptions(o *opt.Options) { + no := dupOptions(o) + // Alternative filters. + if filters := o.GetAltFilters(); len(filters) > 0 { + no.AltFilters = make([]filter.Filter, len(filters)) + for i, filter := range filters { + no.AltFilters[i] = &iFilter{filter} + } + } + // Comparer. + s.icmp = &iComparer{o.GetComparer()} + no.Comparer = s.icmp + // Filter. + if filter := o.GetFilter(); filter != nil { + no.Filter = &iFilter{filter} + } + + s.o = &cachedOptions{Options: no} + s.o.cache() +} + +const optCachedLevel = 7 + +type cachedOptions struct { + *opt.Options + + compactionExpandLimit []int + compactionGPOverlaps []int + compactionSourceLimit []int + compactionTableSize []int + compactionTotalSize []int64 +} + +func (co *cachedOptions) cache() { + co.compactionExpandLimit = make([]int, optCachedLevel) + co.compactionGPOverlaps = make([]int, optCachedLevel) + co.compactionSourceLimit = make([]int, optCachedLevel) + co.compactionTableSize = make([]int, optCachedLevel) + co.compactionTotalSize = make([]int64, optCachedLevel) + + for level := 0; level < optCachedLevel; level++ { + co.compactionExpandLimit[level] = co.Options.GetCompactionExpandLimit(level) + co.compactionGPOverlaps[level] = co.Options.GetCompactionGPOverlaps(level) + co.compactionSourceLimit[level] = co.Options.GetCompactionSourceLimit(level) + co.compactionTableSize[level] = co.Options.GetCompactionTableSize(level) + co.compactionTotalSize[level] = co.Options.GetCompactionTotalSize(level) + } +} + +func (co *cachedOptions) GetCompactionExpandLimit(level int) int { + if level < optCachedLevel { + return co.compactionExpandLimit[level] + } + return co.Options.GetCompactionExpandLimit(level) +} + +func (co *cachedOptions) GetCompactionGPOverlaps(level int) int { + if level < optCachedLevel { + return co.compactionGPOverlaps[level] + } + return co.Options.GetCompactionGPOverlaps(level) +} + +func (co *cachedOptions) GetCompactionSourceLimit(level int) int { + if level < optCachedLevel { + return co.compactionSourceLimit[level] + } + return co.Options.GetCompactionSourceLimit(level) +} + +func (co *cachedOptions) GetCompactionTableSize(level int) int { + if level < optCachedLevel { + return co.compactionTableSize[level] + } + return co.Options.GetCompactionTableSize(level) +} + +func (co *cachedOptions) GetCompactionTotalSize(level int) int64 { + if level < optCachedLevel { + return co.compactionTotalSize[level] + } + return co.Options.GetCompactionTotalSize(level) +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/session.go b/vendor/github.com/syndtr/goleveldb/leveldb/session.go new file mode 100644 index 000000000..b0d3fef1d --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/session.go @@ -0,0 +1,207 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "fmt" + "io" + "os" + "sync" + + "github.com/syndtr/goleveldb/leveldb/errors" + "github.com/syndtr/goleveldb/leveldb/journal" + "github.com/syndtr/goleveldb/leveldb/opt" + "github.com/syndtr/goleveldb/leveldb/storage" +) + +// ErrManifestCorrupted records manifest corruption. +type ErrManifestCorrupted struct { + Field string + Reason string +} + +func (e *ErrManifestCorrupted) Error() string { + return fmt.Sprintf("leveldb: manifest corrupted (field '%s'): %s", e.Field, e.Reason) +} + +func newErrManifestCorrupted(fd storage.FileDesc, field, reason string) error { + return errors.NewErrCorrupted(fd, &ErrManifestCorrupted{field, reason}) +} + +// session represent a persistent database session. +type session struct { + // Need 64-bit alignment. + stNextFileNum int64 // current unused file number + stJournalNum int64 // current journal file number; need external synchronization + stPrevJournalNum int64 // prev journal file number; no longer used; for compatibility with older version of leveldb + stTempFileNum int64 + stSeqNum uint64 // last mem compacted seq; need external synchronization + + stor storage.Storage + storLock storage.Lock + o *cachedOptions + icmp *iComparer + tops *tOps + + manifest *journal.Writer + manifestWriter storage.Writer + manifestFd storage.FileDesc + + stCompPtrs []internalKey // compaction pointers; need external synchronization + stVersion *version // current version + vmu sync.Mutex +} + +// Creates new initialized session instance. +func newSession(stor storage.Storage, o *opt.Options) (s *session, err error) { + if stor == nil { + return nil, os.ErrInvalid + } + storLock, err := stor.Lock() + if err != nil { + return + } + s = &session{ + stor: stor, + storLock: storLock, + } + s.setOptions(o) + s.tops = newTableOps(s) + s.setVersion(newVersion(s)) + s.log("log@legend F·NumFile S·FileSize N·Entry C·BadEntry B·BadBlock Ke·KeyError D·DroppedEntry L·Level Q·SeqNum T·TimeElapsed") + return +} + +// Close session. +func (s *session) close() { + s.tops.close() + if s.manifest != nil { + s.manifest.Close() + } + if s.manifestWriter != nil { + s.manifestWriter.Close() + } + s.manifest = nil + s.manifestWriter = nil + s.stVersion = nil +} + +// Release session lock. +func (s *session) release() { + s.storLock.Release() +} + +// Create a new database session; need external synchronization. +func (s *session) create() error { + // create manifest + return s.newManifest(nil, nil) +} + +// Recover a database session; need external synchronization. +func (s *session) recover() (err error) { + defer func() { + if os.IsNotExist(err) { + // Don't return os.ErrNotExist if the underlying storage contains + // other files that belong to LevelDB. So the DB won't get trashed. + if fds, _ := s.stor.List(storage.TypeAll); len(fds) > 0 { + err = &errors.ErrCorrupted{Fd: storage.FileDesc{Type: storage.TypeManifest}, Err: &errors.ErrMissingFiles{}} + } + } + }() + + fd, err := s.stor.GetMeta() + if err != nil { + return + } + + reader, err := s.stor.Open(fd) + if err != nil { + return + } + defer reader.Close() + + var ( + // Options. + strict = s.o.GetStrict(opt.StrictManifest) + + jr = journal.NewReader(reader, dropper{s, fd}, strict, true) + rec = &sessionRecord{} + staging = s.stVersion.newStaging() + ) + for { + var r io.Reader + r, err = jr.Next() + if err != nil { + if err == io.EOF { + err = nil + break + } + return errors.SetFd(err, fd) + } + + err = rec.decode(r) + if err == nil { + // save compact pointers + for _, r := range rec.compPtrs { + s.setCompPtr(r.level, internalKey(r.ikey)) + } + // commit record to version staging + staging.commit(rec) + } else { + err = errors.SetFd(err, fd) + if strict || !errors.IsCorrupted(err) { + return + } + s.logf("manifest error: %v (skipped)", errors.SetFd(err, fd)) + } + rec.resetCompPtrs() + rec.resetAddedTables() + rec.resetDeletedTables() + } + + switch { + case !rec.has(recComparer): + return newErrManifestCorrupted(fd, "comparer", "missing") + case rec.comparer != s.icmp.uName(): + return newErrManifestCorrupted(fd, "comparer", fmt.Sprintf("mismatch: want '%s', got '%s'", s.icmp.uName(), rec.comparer)) + case !rec.has(recNextFileNum): + return newErrManifestCorrupted(fd, "next-file-num", "missing") + case !rec.has(recJournalNum): + return newErrManifestCorrupted(fd, "journal-file-num", "missing") + case !rec.has(recSeqNum): + return newErrManifestCorrupted(fd, "seq-num", "missing") + } + + s.manifestFd = fd + s.setVersion(staging.finish()) + s.setNextFileNum(rec.nextFileNum) + s.recordCommited(rec) + return nil +} + +// Commit session; need external synchronization. +func (s *session) commit(r *sessionRecord) (err error) { + v := s.version() + defer v.release() + + // spawn new version based on current version + nv := v.spawn(r) + + if s.manifest == nil { + // manifest journal writer not yet created, create one + err = s.newManifest(r, nv) + } else { + err = s.flushManifest(r) + } + + // finally, apply new version if no error rise + if err == nil { + s.setVersion(nv) + } + + return +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/session_compaction.go b/vendor/github.com/syndtr/goleveldb/leveldb/session_compaction.go new file mode 100644 index 000000000..089cd00b2 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/session_compaction.go @@ -0,0 +1,302 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "sync/atomic" + + "github.com/syndtr/goleveldb/leveldb/iterator" + "github.com/syndtr/goleveldb/leveldb/memdb" + "github.com/syndtr/goleveldb/leveldb/opt" +) + +func (s *session) pickMemdbLevel(umin, umax []byte, maxLevel int) int { + v := s.version() + defer v.release() + return v.pickMemdbLevel(umin, umax, maxLevel) +} + +func (s *session) flushMemdb(rec *sessionRecord, mdb *memdb.DB, maxLevel int) (int, error) { + // Create sorted table. + iter := mdb.NewIterator(nil) + defer iter.Release() + t, n, err := s.tops.createFrom(iter) + if err != nil { + return 0, err + } + + // Pick level other than zero can cause compaction issue with large + // bulk insert and delete on strictly incrementing key-space. The + // problem is that the small deletion markers trapped at lower level, + // while key/value entries keep growing at higher level. Since the + // key-space is strictly incrementing it will not overlaps with + // higher level, thus maximum possible level is always picked, while + // overlapping deletion marker pushed into lower level. + // See: https://github.com/syndtr/goleveldb/issues/127. + flushLevel := s.pickMemdbLevel(t.imin.ukey(), t.imax.ukey(), maxLevel) + rec.addTableFile(flushLevel, t) + + s.logf("memdb@flush created L%d@%d N·%d S·%s %q:%q", flushLevel, t.fd.Num, n, shortenb(int(t.size)), t.imin, t.imax) + return flushLevel, nil +} + +// Pick a compaction based on current state; need external synchronization. +func (s *session) pickCompaction() *compaction { + v := s.version() + + var sourceLevel int + var t0 tFiles + if v.cScore >= 1 { + sourceLevel = v.cLevel + cptr := s.getCompPtr(sourceLevel) + tables := v.levels[sourceLevel] + for _, t := range tables { + if cptr == nil || s.icmp.Compare(t.imax, cptr) > 0 { + t0 = append(t0, t) + break + } + } + if len(t0) == 0 { + t0 = append(t0, tables[0]) + } + } else { + if p := atomic.LoadPointer(&v.cSeek); p != nil { + ts := (*tSet)(p) + sourceLevel = ts.level + t0 = append(t0, ts.table) + } else { + v.release() + return nil + } + } + + return newCompaction(s, v, sourceLevel, t0) +} + +// Create compaction from given level and range; need external synchronization. +func (s *session) getCompactionRange(sourceLevel int, umin, umax []byte, noLimit bool) *compaction { + v := s.version() + + if sourceLevel >= len(v.levels) { + v.release() + return nil + } + + t0 := v.levels[sourceLevel].getOverlaps(nil, s.icmp, umin, umax, sourceLevel == 0) + if len(t0) == 0 { + v.release() + return nil + } + + // Avoid compacting too much in one shot in case the range is large. + // But we cannot do this for level-0 since level-0 files can overlap + // and we must not pick one file and drop another older file if the + // two files overlap. + if !noLimit && sourceLevel > 0 { + limit := int64(v.s.o.GetCompactionSourceLimit(sourceLevel)) + total := int64(0) + for i, t := range t0 { + total += t.size + if total >= limit { + s.logf("table@compaction limiting F·%d -> F·%d", len(t0), i+1) + t0 = t0[:i+1] + break + } + } + } + + return newCompaction(s, v, sourceLevel, t0) +} + +func newCompaction(s *session, v *version, sourceLevel int, t0 tFiles) *compaction { + c := &compaction{ + s: s, + v: v, + sourceLevel: sourceLevel, + levels: [2]tFiles{t0, nil}, + maxGPOverlaps: int64(s.o.GetCompactionGPOverlaps(sourceLevel)), + tPtrs: make([]int, len(v.levels)), + } + c.expand() + c.save() + return c +} + +// compaction represent a compaction state. +type compaction struct { + s *session + v *version + + sourceLevel int + levels [2]tFiles + maxGPOverlaps int64 + + gp tFiles + gpi int + seenKey bool + gpOverlappedBytes int64 + imin, imax internalKey + tPtrs []int + released bool + + snapGPI int + snapSeenKey bool + snapGPOverlappedBytes int64 + snapTPtrs []int +} + +func (c *compaction) save() { + c.snapGPI = c.gpi + c.snapSeenKey = c.seenKey + c.snapGPOverlappedBytes = c.gpOverlappedBytes + c.snapTPtrs = append(c.snapTPtrs[:0], c.tPtrs...) +} + +func (c *compaction) restore() { + c.gpi = c.snapGPI + c.seenKey = c.snapSeenKey + c.gpOverlappedBytes = c.snapGPOverlappedBytes + c.tPtrs = append(c.tPtrs[:0], c.snapTPtrs...) +} + +func (c *compaction) release() { + if !c.released { + c.released = true + c.v.release() + } +} + +// Expand compacted tables; need external synchronization. +func (c *compaction) expand() { + limit := int64(c.s.o.GetCompactionExpandLimit(c.sourceLevel)) + vt0 := c.v.levels[c.sourceLevel] + vt1 := tFiles{} + if level := c.sourceLevel + 1; level < len(c.v.levels) { + vt1 = c.v.levels[level] + } + + t0, t1 := c.levels[0], c.levels[1] + imin, imax := t0.getRange(c.s.icmp) + // We expand t0 here just incase ukey hop across tables. + t0 = vt0.getOverlaps(t0, c.s.icmp, imin.ukey(), imax.ukey(), c.sourceLevel == 0) + if len(t0) != len(c.levels[0]) { + imin, imax = t0.getRange(c.s.icmp) + } + t1 = vt1.getOverlaps(t1, c.s.icmp, imin.ukey(), imax.ukey(), false) + // Get entire range covered by compaction. + amin, amax := append(t0, t1...).getRange(c.s.icmp) + + // See if we can grow the number of inputs in "sourceLevel" without + // changing the number of "sourceLevel+1" files we pick up. + if len(t1) > 0 { + exp0 := vt0.getOverlaps(nil, c.s.icmp, amin.ukey(), amax.ukey(), c.sourceLevel == 0) + if len(exp0) > len(t0) && t1.size()+exp0.size() < limit { + xmin, xmax := exp0.getRange(c.s.icmp) + exp1 := vt1.getOverlaps(nil, c.s.icmp, xmin.ukey(), xmax.ukey(), false) + if len(exp1) == len(t1) { + c.s.logf("table@compaction expanding L%d+L%d (F·%d S·%s)+(F·%d S·%s) -> (F·%d S·%s)+(F·%d S·%s)", + c.sourceLevel, c.sourceLevel+1, len(t0), shortenb(int(t0.size())), len(t1), shortenb(int(t1.size())), + len(exp0), shortenb(int(exp0.size())), len(exp1), shortenb(int(exp1.size()))) + imin, imax = xmin, xmax + t0, t1 = exp0, exp1 + amin, amax = append(t0, t1...).getRange(c.s.icmp) + } + } + } + + // Compute the set of grandparent files that overlap this compaction + // (parent == sourceLevel+1; grandparent == sourceLevel+2) + if level := c.sourceLevel + 2; level < len(c.v.levels) { + c.gp = c.v.levels[level].getOverlaps(c.gp, c.s.icmp, amin.ukey(), amax.ukey(), false) + } + + c.levels[0], c.levels[1] = t0, t1 + c.imin, c.imax = imin, imax +} + +// Check whether compaction is trivial. +func (c *compaction) trivial() bool { + return len(c.levels[0]) == 1 && len(c.levels[1]) == 0 && c.gp.size() <= c.maxGPOverlaps +} + +func (c *compaction) baseLevelForKey(ukey []byte) bool { + for level := c.sourceLevel + 2; level < len(c.v.levels); level++ { + tables := c.v.levels[level] + for c.tPtrs[level] < len(tables) { + t := tables[c.tPtrs[level]] + if c.s.icmp.uCompare(ukey, t.imax.ukey()) <= 0 { + // We've advanced far enough. + if c.s.icmp.uCompare(ukey, t.imin.ukey()) >= 0 { + // Key falls in this file's range, so definitely not base level. + return false + } + break + } + c.tPtrs[level]++ + } + } + return true +} + +func (c *compaction) shouldStopBefore(ikey internalKey) bool { + for ; c.gpi < len(c.gp); c.gpi++ { + gp := c.gp[c.gpi] + if c.s.icmp.Compare(ikey, gp.imax) <= 0 { + break + } + if c.seenKey { + c.gpOverlappedBytes += gp.size + } + } + c.seenKey = true + + if c.gpOverlappedBytes > c.maxGPOverlaps { + // Too much overlap for current output; start new output. + c.gpOverlappedBytes = 0 + return true + } + return false +} + +// Creates an iterator. +func (c *compaction) newIterator() iterator.Iterator { + // Creates iterator slice. + icap := len(c.levels) + if c.sourceLevel == 0 { + // Special case for level-0. + icap = len(c.levels[0]) + 1 + } + its := make([]iterator.Iterator, 0, icap) + + // Options. + ro := &opt.ReadOptions{ + DontFillCache: true, + Strict: opt.StrictOverride, + } + strict := c.s.o.GetStrict(opt.StrictCompaction) + if strict { + ro.Strict |= opt.StrictReader + } + + for i, tables := range c.levels { + if len(tables) == 0 { + continue + } + + // Level-0 is not sorted and may overlaps each other. + if c.sourceLevel+i == 0 { + for _, t := range tables { + its = append(its, c.s.tops.newIterator(t, nil, ro)) + } + } else { + it := iterator.NewIndexedIterator(tables.newIndexIterator(c.s.tops, c.s.icmp, nil, ro), strict) + its = append(its, it) + } + } + + return iterator.NewMergedIterator(its, c.s.icmp, strict) +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/session_record.go b/vendor/github.com/syndtr/goleveldb/leveldb/session_record.go new file mode 100644 index 000000000..854e1aa6f --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/session_record.go @@ -0,0 +1,323 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "bufio" + "encoding/binary" + "io" + "strings" + + "github.com/syndtr/goleveldb/leveldb/errors" + "github.com/syndtr/goleveldb/leveldb/storage" +) + +type byteReader interface { + io.Reader + io.ByteReader +} + +// These numbers are written to disk and should not be changed. +const ( + recComparer = 1 + recJournalNum = 2 + recNextFileNum = 3 + recSeqNum = 4 + recCompPtr = 5 + recDelTable = 6 + recAddTable = 7 + // 8 was used for large value refs + recPrevJournalNum = 9 +) + +type cpRecord struct { + level int + ikey internalKey +} + +type atRecord struct { + level int + num int64 + size int64 + imin internalKey + imax internalKey +} + +type dtRecord struct { + level int + num int64 +} + +type sessionRecord struct { + hasRec int + comparer string + journalNum int64 + prevJournalNum int64 + nextFileNum int64 + seqNum uint64 + compPtrs []cpRecord + addedTables []atRecord + deletedTables []dtRecord + + scratch [binary.MaxVarintLen64]byte + err error +} + +func (p *sessionRecord) has(rec int) bool { + return p.hasRec&(1< +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "fmt" + "sync/atomic" + + "github.com/syndtr/goleveldb/leveldb/journal" + "github.com/syndtr/goleveldb/leveldb/storage" +) + +// Logging. + +type dropper struct { + s *session + fd storage.FileDesc +} + +func (d dropper) Drop(err error) { + if e, ok := err.(*journal.ErrCorrupted); ok { + d.s.logf("journal@drop %s-%d S·%s %q", d.fd.Type, d.fd.Num, shortenb(e.Size), e.Reason) + } else { + d.s.logf("journal@drop %s-%d %q", d.fd.Type, d.fd.Num, err) + } +} + +func (s *session) log(v ...interface{}) { s.stor.Log(fmt.Sprint(v...)) } +func (s *session) logf(format string, v ...interface{}) { s.stor.Log(fmt.Sprintf(format, v...)) } + +// File utils. + +func (s *session) newTemp() storage.FileDesc { + num := atomic.AddInt64(&s.stTempFileNum, 1) - 1 + return storage.FileDesc{storage.TypeTemp, num} +} + +// Session state. + +// Get current version. This will incr version ref, must call +// version.release (exactly once) after use. +func (s *session) version() *version { + s.vmu.Lock() + defer s.vmu.Unlock() + s.stVersion.ref++ + return s.stVersion +} + +// Set current version to v. +func (s *session) setVersion(v *version) { + s.vmu.Lock() + v.ref = 1 // Holds by session. + if old := s.stVersion; old != nil { + v.ref++ // Holds by old version. + old.next = v + old.releaseNB() + } + s.stVersion = v + s.vmu.Unlock() +} + +// Get current unused file number. +func (s *session) nextFileNum() int64 { + return atomic.LoadInt64(&s.stNextFileNum) +} + +// Set current unused file number to num. +func (s *session) setNextFileNum(num int64) { + atomic.StoreInt64(&s.stNextFileNum, num) +} + +// Mark file number as used. +func (s *session) markFileNum(num int64) { + nextFileNum := num + 1 + for { + old, x := s.stNextFileNum, nextFileNum + if old > x { + x = old + } + if atomic.CompareAndSwapInt64(&s.stNextFileNum, old, x) { + break + } + } +} + +// Allocate a file number. +func (s *session) allocFileNum() int64 { + return atomic.AddInt64(&s.stNextFileNum, 1) - 1 +} + +// Reuse given file number. +func (s *session) reuseFileNum(num int64) { + for { + old, x := s.stNextFileNum, num + if old != x+1 { + x = old + } + if atomic.CompareAndSwapInt64(&s.stNextFileNum, old, x) { + break + } + } +} + +// Set compaction ptr at given level; need external synchronization. +func (s *session) setCompPtr(level int, ik internalKey) { + if level >= len(s.stCompPtrs) { + newCompPtrs := make([]internalKey, level+1) + copy(newCompPtrs, s.stCompPtrs) + s.stCompPtrs = newCompPtrs + } + s.stCompPtrs[level] = append(internalKey{}, ik...) +} + +// Get compaction ptr at given level; need external synchronization. +func (s *session) getCompPtr(level int) internalKey { + if level >= len(s.stCompPtrs) { + return nil + } + return s.stCompPtrs[level] +} + +// Manifest related utils. + +// Fill given session record obj with current states; need external +// synchronization. +func (s *session) fillRecord(r *sessionRecord, snapshot bool) { + r.setNextFileNum(s.nextFileNum()) + + if snapshot { + if !r.has(recJournalNum) { + r.setJournalNum(s.stJournalNum) + } + + if !r.has(recSeqNum) { + r.setSeqNum(s.stSeqNum) + } + + for level, ik := range s.stCompPtrs { + if ik != nil { + r.addCompPtr(level, ik) + } + } + + r.setComparer(s.icmp.uName()) + } +} + +// Mark if record has been committed, this will update session state; +// need external synchronization. +func (s *session) recordCommited(rec *sessionRecord) { + if rec.has(recJournalNum) { + s.stJournalNum = rec.journalNum + } + + if rec.has(recPrevJournalNum) { + s.stPrevJournalNum = rec.prevJournalNum + } + + if rec.has(recSeqNum) { + s.stSeqNum = rec.seqNum + } + + for _, r := range rec.compPtrs { + s.setCompPtr(r.level, internalKey(r.ikey)) + } +} + +// Create a new manifest file; need external synchronization. +func (s *session) newManifest(rec *sessionRecord, v *version) (err error) { + fd := storage.FileDesc{storage.TypeManifest, s.allocFileNum()} + writer, err := s.stor.Create(fd) + if err != nil { + return + } + jw := journal.NewWriter(writer) + + if v == nil { + v = s.version() + defer v.release() + } + if rec == nil { + rec = &sessionRecord{} + } + s.fillRecord(rec, true) + v.fillRecord(rec) + + defer func() { + if err == nil { + s.recordCommited(rec) + if s.manifest != nil { + s.manifest.Close() + } + if s.manifestWriter != nil { + s.manifestWriter.Close() + } + if !s.manifestFd.Nil() { + s.stor.Remove(s.manifestFd) + } + s.manifestFd = fd + s.manifestWriter = writer + s.manifest = jw + } else { + writer.Close() + s.stor.Remove(fd) + s.reuseFileNum(fd.Num) + } + }() + + w, err := jw.Next() + if err != nil { + return + } + err = rec.encode(w) + if err != nil { + return + } + err = jw.Flush() + if err != nil { + return + } + err = s.stor.SetMeta(fd) + return +} + +// Flush record to disk. +func (s *session) flushManifest(rec *sessionRecord) (err error) { + s.fillRecord(rec, false) + w, err := s.manifest.Next() + if err != nil { + return + } + err = rec.encode(w) + if err != nil { + return + } + err = s.manifest.Flush() + if err != nil { + return + } + if !s.o.GetNoSync() { + err = s.manifestWriter.Sync() + if err != nil { + return + } + } + s.recordCommited(rec) + return +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage.go new file mode 100644 index 000000000..cbe1dc103 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage.go @@ -0,0 +1,583 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reservefs. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package storage + +import ( + "errors" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "runtime" + "strconv" + "strings" + "sync" + "time" +) + +var ( + errFileOpen = errors.New("leveldb/storage: file still open") + errReadOnly = errors.New("leveldb/storage: storage is read-only") +) + +type fileLock interface { + release() error +} + +type fileStorageLock struct { + fs *fileStorage +} + +func (lock *fileStorageLock) Release() { + if lock.fs != nil { + lock.fs.mu.Lock() + defer lock.fs.mu.Unlock() + if lock.fs.slock == lock { + lock.fs.slock = nil + } + } +} + +const logSizeThreshold = 1024 * 1024 // 1 MiB + +// fileStorage is a file-system backed storage. +type fileStorage struct { + path string + readOnly bool + + mu sync.Mutex + flock fileLock + slock *fileStorageLock + logw *os.File + logSize int64 + buf []byte + // Opened file counter; if open < 0 means closed. + open int + day int +} + +// OpenFile returns a new filesytem-backed storage implementation with the given +// path. This also acquire a file lock, so any subsequent attempt to open the +// same path will fail. +// +// The storage must be closed after use, by calling Close method. +func OpenFile(path string, readOnly bool) (Storage, error) { + if fi, err := os.Stat(path); err == nil { + if !fi.IsDir() { + return nil, fmt.Errorf("leveldb/storage: open %s: not a directory", path) + } + } else if os.IsNotExist(err) && !readOnly { + if err := os.MkdirAll(path, 0755); err != nil { + return nil, err + } + } else { + return nil, err + } + + flock, err := newFileLock(filepath.Join(path, "LOCK"), readOnly) + if err != nil { + return nil, err + } + + defer func() { + if err != nil { + flock.release() + } + }() + + var ( + logw *os.File + logSize int64 + ) + if !readOnly { + logw, err = os.OpenFile(filepath.Join(path, "LOG"), os.O_WRONLY|os.O_CREATE, 0644) + if err != nil { + return nil, err + } + logSize, err = logw.Seek(0, os.SEEK_END) + if err != nil { + logw.Close() + return nil, err + } + } + + fs := &fileStorage{ + path: path, + readOnly: readOnly, + flock: flock, + logw: logw, + logSize: logSize, + } + runtime.SetFinalizer(fs, (*fileStorage).Close) + return fs, nil +} + +func (fs *fileStorage) Lock() (Lock, error) { + fs.mu.Lock() + defer fs.mu.Unlock() + if fs.open < 0 { + return nil, ErrClosed + } + if fs.readOnly { + return &fileStorageLock{}, nil + } + if fs.slock != nil { + return nil, ErrLocked + } + fs.slock = &fileStorageLock{fs: fs} + return fs.slock, nil +} + +func itoa(buf []byte, i int, wid int) []byte { + u := uint(i) + if u == 0 && wid <= 1 { + return append(buf, '0') + } + + // Assemble decimal in reverse order. + var b [32]byte + bp := len(b) + for ; u > 0 || wid > 0; u /= 10 { + bp-- + wid-- + b[bp] = byte(u%10) + '0' + } + return append(buf, b[bp:]...) +} + +func (fs *fileStorage) printDay(t time.Time) { + if fs.day == t.Day() { + return + } + fs.day = t.Day() + fs.logw.Write([]byte("=============== " + t.Format("Jan 2, 2006 (MST)") + " ===============\n")) +} + +func (fs *fileStorage) doLog(t time.Time, str string) { + if fs.logSize > logSizeThreshold { + // Rotate log file. + fs.logw.Close() + fs.logw = nil + fs.logSize = 0 + rename(filepath.Join(fs.path, "LOG"), filepath.Join(fs.path, "LOG.old")) + } + if fs.logw == nil { + var err error + fs.logw, err = os.OpenFile(filepath.Join(fs.path, "LOG"), os.O_WRONLY|os.O_CREATE, 0644) + if err != nil { + return + } + // Force printDay on new log file. + fs.day = 0 + } + fs.printDay(t) + hour, min, sec := t.Clock() + msec := t.Nanosecond() / 1e3 + // time + fs.buf = itoa(fs.buf[:0], hour, 2) + fs.buf = append(fs.buf, ':') + fs.buf = itoa(fs.buf, min, 2) + fs.buf = append(fs.buf, ':') + fs.buf = itoa(fs.buf, sec, 2) + fs.buf = append(fs.buf, '.') + fs.buf = itoa(fs.buf, msec, 6) + fs.buf = append(fs.buf, ' ') + // write + fs.buf = append(fs.buf, []byte(str)...) + fs.buf = append(fs.buf, '\n') + fs.logw.Write(fs.buf) +} + +func (fs *fileStorage) Log(str string) { + if !fs.readOnly { + t := time.Now() + fs.mu.Lock() + defer fs.mu.Unlock() + if fs.open < 0 { + return + } + fs.doLog(t, str) + } +} + +func (fs *fileStorage) log(str string) { + if !fs.readOnly { + fs.doLog(time.Now(), str) + } +} + +func (fs *fileStorage) SetMeta(fd FileDesc) (err error) { + if !FileDescOk(fd) { + return ErrInvalidFile + } + if fs.readOnly { + return errReadOnly + } + + fs.mu.Lock() + defer fs.mu.Unlock() + if fs.open < 0 { + return ErrClosed + } + defer func() { + if err != nil { + fs.log(fmt.Sprintf("CURRENT: %v", err)) + } + }() + path := fmt.Sprintf("%s.%d", filepath.Join(fs.path, "CURRENT"), fd.Num) + w, err := os.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) + if err != nil { + return + } + _, err = fmt.Fprintln(w, fsGenName(fd)) + // Close the file first. + if cerr := w.Close(); cerr != nil { + fs.log(fmt.Sprintf("close CURRENT.%d: %v", fd.Num, cerr)) + } + if err != nil { + return + } + return rename(path, filepath.Join(fs.path, "CURRENT")) +} + +func (fs *fileStorage) GetMeta() (fd FileDesc, err error) { + fs.mu.Lock() + defer fs.mu.Unlock() + if fs.open < 0 { + return FileDesc{}, ErrClosed + } + dir, err := os.Open(fs.path) + if err != nil { + return + } + names, err := dir.Readdirnames(0) + // Close the dir first before checking for Readdirnames error. + if ce := dir.Close(); ce != nil { + fs.log(fmt.Sprintf("close dir: %v", ce)) + } + if err != nil { + return + } + // Find latest CURRENT file. + var rem []string + var pend bool + var cerr error + for _, name := range names { + if strings.HasPrefix(name, "CURRENT") { + pend1 := len(name) > 7 + var pendNum int64 + // Make sure it is valid name for a CURRENT file, otherwise skip it. + if pend1 { + if name[7] != '.' || len(name) < 9 { + fs.log(fmt.Sprintf("skipping %s: invalid file name", name)) + continue + } + var e1 error + if pendNum, e1 = strconv.ParseInt(name[8:], 10, 0); e1 != nil { + fs.log(fmt.Sprintf("skipping %s: invalid file num: %v", name, e1)) + continue + } + } + path := filepath.Join(fs.path, name) + r, e1 := os.OpenFile(path, os.O_RDONLY, 0) + if e1 != nil { + return FileDesc{}, e1 + } + b, e1 := ioutil.ReadAll(r) + if e1 != nil { + r.Close() + return FileDesc{}, e1 + } + var fd1 FileDesc + if len(b) < 1 || b[len(b)-1] != '\n' || !fsParseNamePtr(string(b[:len(b)-1]), &fd1) { + fs.log(fmt.Sprintf("skipping %s: corrupted or incomplete", name)) + if pend1 { + rem = append(rem, name) + } + if !pend1 || cerr == nil { + metaFd, _ := fsParseName(name) + cerr = &ErrCorrupted{ + Fd: metaFd, + Err: errors.New("leveldb/storage: corrupted or incomplete meta file"), + } + } + } else if pend1 && pendNum != fd1.Num { + fs.log(fmt.Sprintf("skipping %s: inconsistent pending-file num: %d vs %d", name, pendNum, fd1.Num)) + rem = append(rem, name) + } else if fd1.Num < fd.Num { + fs.log(fmt.Sprintf("skipping %s: obsolete", name)) + if pend1 { + rem = append(rem, name) + } + } else { + fd = fd1 + pend = pend1 + } + if err := r.Close(); err != nil { + fs.log(fmt.Sprintf("close %s: %v", name, err)) + } + } + } + // Don't remove any files if there is no valid CURRENT file. + if fd.Nil() { + if cerr != nil { + err = cerr + } else { + err = os.ErrNotExist + } + return + } + if !fs.readOnly { + // Rename pending CURRENT file to an effective CURRENT. + if pend { + path := fmt.Sprintf("%s.%d", filepath.Join(fs.path, "CURRENT"), fd.Num) + if err := rename(path, filepath.Join(fs.path, "CURRENT")); err != nil { + fs.log(fmt.Sprintf("CURRENT.%d -> CURRENT: %v", fd.Num, err)) + } + } + // Remove obsolete or incomplete pending CURRENT files. + for _, name := range rem { + path := filepath.Join(fs.path, name) + if err := os.Remove(path); err != nil { + fs.log(fmt.Sprintf("remove %s: %v", name, err)) + } + } + } + return +} + +func (fs *fileStorage) List(ft FileType) (fds []FileDesc, err error) { + fs.mu.Lock() + defer fs.mu.Unlock() + if fs.open < 0 { + return nil, ErrClosed + } + dir, err := os.Open(fs.path) + if err != nil { + return + } + names, err := dir.Readdirnames(0) + // Close the dir first before checking for Readdirnames error. + if cerr := dir.Close(); cerr != nil { + fs.log(fmt.Sprintf("close dir: %v", cerr)) + } + if err == nil { + for _, name := range names { + if fd, ok := fsParseName(name); ok && fd.Type&ft != 0 { + fds = append(fds, fd) + } + } + } + return +} + +func (fs *fileStorage) Open(fd FileDesc) (Reader, error) { + if !FileDescOk(fd) { + return nil, ErrInvalidFile + } + + fs.mu.Lock() + defer fs.mu.Unlock() + if fs.open < 0 { + return nil, ErrClosed + } + of, err := os.OpenFile(filepath.Join(fs.path, fsGenName(fd)), os.O_RDONLY, 0) + if err != nil { + if fsHasOldName(fd) && os.IsNotExist(err) { + of, err = os.OpenFile(filepath.Join(fs.path, fsGenOldName(fd)), os.O_RDONLY, 0) + if err == nil { + goto ok + } + } + return nil, err + } +ok: + fs.open++ + return &fileWrap{File: of, fs: fs, fd: fd}, nil +} + +func (fs *fileStorage) Create(fd FileDesc) (Writer, error) { + if !FileDescOk(fd) { + return nil, ErrInvalidFile + } + if fs.readOnly { + return nil, errReadOnly + } + + fs.mu.Lock() + defer fs.mu.Unlock() + if fs.open < 0 { + return nil, ErrClosed + } + of, err := os.OpenFile(filepath.Join(fs.path, fsGenName(fd)), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) + if err != nil { + return nil, err + } + fs.open++ + return &fileWrap{File: of, fs: fs, fd: fd}, nil +} + +func (fs *fileStorage) Remove(fd FileDesc) error { + if !FileDescOk(fd) { + return ErrInvalidFile + } + if fs.readOnly { + return errReadOnly + } + + fs.mu.Lock() + defer fs.mu.Unlock() + if fs.open < 0 { + return ErrClosed + } + err := os.Remove(filepath.Join(fs.path, fsGenName(fd))) + if err != nil { + if fsHasOldName(fd) && os.IsNotExist(err) { + if e1 := os.Remove(filepath.Join(fs.path, fsGenOldName(fd))); !os.IsNotExist(e1) { + fs.log(fmt.Sprintf("remove %s: %v (old name)", fd, err)) + err = e1 + } + } else { + fs.log(fmt.Sprintf("remove %s: %v", fd, err)) + } + } + return err +} + +func (fs *fileStorage) Rename(oldfd, newfd FileDesc) error { + if !FileDescOk(oldfd) || !FileDescOk(newfd) { + return ErrInvalidFile + } + if oldfd == newfd { + return nil + } + if fs.readOnly { + return errReadOnly + } + + fs.mu.Lock() + defer fs.mu.Unlock() + if fs.open < 0 { + return ErrClosed + } + return rename(filepath.Join(fs.path, fsGenName(oldfd)), filepath.Join(fs.path, fsGenName(newfd))) +} + +func (fs *fileStorage) Close() error { + fs.mu.Lock() + defer fs.mu.Unlock() + if fs.open < 0 { + return ErrClosed + } + // Clear the finalizer. + runtime.SetFinalizer(fs, nil) + + if fs.open > 0 { + fs.log(fmt.Sprintf("close: warning, %d files still open", fs.open)) + } + fs.open = -1 + if fs.logw != nil { + fs.logw.Close() + } + return fs.flock.release() +} + +type fileWrap struct { + *os.File + fs *fileStorage + fd FileDesc + closed bool +} + +func (fw *fileWrap) Sync() error { + if err := fw.File.Sync(); err != nil { + return err + } + if fw.fd.Type == TypeManifest { + // Also sync parent directory if file type is manifest. + // See: https://code.google.com/p/leveldb/issues/detail?id=190. + if err := syncDir(fw.fs.path); err != nil { + fw.fs.log(fmt.Sprintf("syncDir: %v", err)) + return err + } + } + return nil +} + +func (fw *fileWrap) Close() error { + fw.fs.mu.Lock() + defer fw.fs.mu.Unlock() + if fw.closed { + return ErrClosed + } + fw.closed = true + fw.fs.open-- + err := fw.File.Close() + if err != nil { + fw.fs.log(fmt.Sprintf("close %s: %v", fw.fd, err)) + } + return err +} + +func fsGenName(fd FileDesc) string { + switch fd.Type { + case TypeManifest: + return fmt.Sprintf("MANIFEST-%06d", fd.Num) + case TypeJournal: + return fmt.Sprintf("%06d.log", fd.Num) + case TypeTable: + return fmt.Sprintf("%06d.ldb", fd.Num) + case TypeTemp: + return fmt.Sprintf("%06d.tmp", fd.Num) + default: + panic("invalid file type") + } +} + +func fsHasOldName(fd FileDesc) bool { + return fd.Type == TypeTable +} + +func fsGenOldName(fd FileDesc) string { + switch fd.Type { + case TypeTable: + return fmt.Sprintf("%06d.sst", fd.Num) + } + return fsGenName(fd) +} + +func fsParseName(name string) (fd FileDesc, ok bool) { + var tail string + _, err := fmt.Sscanf(name, "%d.%s", &fd.Num, &tail) + if err == nil { + switch tail { + case "log": + fd.Type = TypeJournal + case "ldb", "sst": + fd.Type = TypeTable + case "tmp": + fd.Type = TypeTemp + default: + return + } + return fd, true + } + n, _ := fmt.Sscanf(name, "MANIFEST-%d%s", &fd.Num, &tail) + if n == 1 { + fd.Type = TypeManifest + return fd, true + } + return +} + +func fsParseNamePtr(name string, fd *FileDesc) bool { + _fd, ok := fsParseName(name) + if fd != nil { + *fd = _fd + } + return ok +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_plan9.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_plan9.go new file mode 100644 index 000000000..bab62bfce --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_plan9.go @@ -0,0 +1,65 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package storage + +import ( + "os" + "path/filepath" +) + +type plan9FileLock struct { + f *os.File +} + +func (fl *plan9FileLock) release() error { + return fl.f.Close() +} + +func newFileLock(path string, readOnly bool) (fl fileLock, err error) { + var ( + flag int + perm os.FileMode + ) + if readOnly { + flag = os.O_RDONLY + } else { + flag = os.O_RDWR + perm = os.ModeExclusive + } + f, err := os.OpenFile(path, flag, perm) + if os.IsNotExist(err) { + f, err = os.OpenFile(path, flag|os.O_CREATE, perm|0644) + } + if err != nil { + return + } + fl = &plan9FileLock{f: f} + return +} + +func rename(oldpath, newpath string) error { + if _, err := os.Stat(newpath); err == nil { + if err := os.Remove(newpath); err != nil { + return err + } + } + + _, fname := filepath.Split(newpath) + return os.Rename(oldpath, fname) +} + +func syncDir(name string) error { + f, err := os.Open(name) + if err != nil { + return err + } + defer f.Close() + if err := f.Sync(); err != nil { + return err + } + return nil +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_solaris.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_solaris.go new file mode 100644 index 000000000..79901ee4a --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_solaris.go @@ -0,0 +1,81 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// +build solaris + +package storage + +import ( + "os" + "syscall" +) + +type unixFileLock struct { + f *os.File +} + +func (fl *unixFileLock) release() error { + if err := setFileLock(fl.f, false, false); err != nil { + return err + } + return fl.f.Close() +} + +func newFileLock(path string, readOnly bool) (fl fileLock, err error) { + var flag int + if readOnly { + flag = os.O_RDONLY + } else { + flag = os.O_RDWR + } + f, err := os.OpenFile(path, flag, 0) + if os.IsNotExist(err) { + f, err = os.OpenFile(path, flag|os.O_CREATE, 0644) + } + if err != nil { + return + } + err = setFileLock(f, readOnly, true) + if err != nil { + f.Close() + return + } + fl = &unixFileLock{f: f} + return +} + +func setFileLock(f *os.File, readOnly, lock bool) error { + flock := syscall.Flock_t{ + Type: syscall.F_UNLCK, + Start: 0, + Len: 0, + Whence: 1, + } + if lock { + if readOnly { + flock.Type = syscall.F_RDLCK + } else { + flock.Type = syscall.F_WRLCK + } + } + return syscall.FcntlFlock(f.Fd(), syscall.F_SETLK, &flock) +} + +func rename(oldpath, newpath string) error { + return os.Rename(oldpath, newpath) +} + +func syncDir(name string) error { + f, err := os.Open(name) + if err != nil { + return err + } + defer f.Close() + if err := f.Sync(); err != nil { + return err + } + return nil +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_unix.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_unix.go new file mode 100644 index 000000000..7e2991537 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_unix.go @@ -0,0 +1,86 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd + +package storage + +import ( + "os" + "syscall" +) + +type unixFileLock struct { + f *os.File +} + +func (fl *unixFileLock) release() error { + if err := setFileLock(fl.f, false, false); err != nil { + return err + } + return fl.f.Close() +} + +func newFileLock(path string, readOnly bool) (fl fileLock, err error) { + var flag int + if readOnly { + flag = os.O_RDONLY + } else { + flag = os.O_RDWR + } + f, err := os.OpenFile(path, flag, 0) + if os.IsNotExist(err) { + f, err = os.OpenFile(path, flag|os.O_CREATE, 0644) + } + if err != nil { + return + } + err = setFileLock(f, readOnly, true) + if err != nil { + f.Close() + return + } + fl = &unixFileLock{f: f} + return +} + +func setFileLock(f *os.File, readOnly, lock bool) error { + how := syscall.LOCK_UN + if lock { + if readOnly { + how = syscall.LOCK_SH + } else { + how = syscall.LOCK_EX + } + } + return syscall.Flock(int(f.Fd()), how|syscall.LOCK_NB) +} + +func rename(oldpath, newpath string) error { + return os.Rename(oldpath, newpath) +} + +func isErrInvalid(err error) bool { + if err == os.ErrInvalid { + return true + } + if syserr, ok := err.(*os.SyscallError); ok && syserr.Err == syscall.EINVAL { + return true + } + return false +} + +func syncDir(name string) error { + f, err := os.Open(name) + if err != nil { + return err + } + defer f.Close() + if err := f.Sync(); err != nil && !isErrInvalid(err) { + return err + } + return nil +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_windows.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_windows.go new file mode 100644 index 000000000..899335fd7 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage/file_storage_windows.go @@ -0,0 +1,78 @@ +// Copyright (c) 2013, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package storage + +import ( + "syscall" + "unsafe" +) + +var ( + modkernel32 = syscall.NewLazyDLL("kernel32.dll") + + procMoveFileExW = modkernel32.NewProc("MoveFileExW") +) + +const ( + _MOVEFILE_REPLACE_EXISTING = 1 +) + +type windowsFileLock struct { + fd syscall.Handle +} + +func (fl *windowsFileLock) release() error { + return syscall.Close(fl.fd) +} + +func newFileLock(path string, readOnly bool) (fl fileLock, err error) { + pathp, err := syscall.UTF16PtrFromString(path) + if err != nil { + return + } + var access, shareMode uint32 + if readOnly { + access = syscall.GENERIC_READ + shareMode = syscall.FILE_SHARE_READ + } else { + access = syscall.GENERIC_READ | syscall.GENERIC_WRITE + } + fd, err := syscall.CreateFile(pathp, access, shareMode, nil, syscall.OPEN_EXISTING, syscall.FILE_ATTRIBUTE_NORMAL, 0) + if err == syscall.ERROR_FILE_NOT_FOUND { + fd, err = syscall.CreateFile(pathp, access, shareMode, nil, syscall.OPEN_ALWAYS, syscall.FILE_ATTRIBUTE_NORMAL, 0) + } + if err != nil { + return + } + fl = &windowsFileLock{fd: fd} + return +} + +func moveFileEx(from *uint16, to *uint16, flags uint32) error { + r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags)) + if r1 == 0 { + if e1 != 0 { + return error(e1) + } + return syscall.EINVAL + } + return nil +} + +func rename(oldpath, newpath string) error { + from, err := syscall.UTF16PtrFromString(oldpath) + if err != nil { + return err + } + to, err := syscall.UTF16PtrFromString(newpath) + if err != nil { + return err + } + return moveFileEx(from, to, _MOVEFILE_REPLACE_EXISTING) +} + +func syncDir(name string) error { return nil } diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/storage/mem_storage.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage/mem_storage.go new file mode 100644 index 000000000..9b70e1513 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage/mem_storage.go @@ -0,0 +1,218 @@ +// Copyright (c) 2013, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package storage + +import ( + "bytes" + "os" + "sync" +) + +const typeShift = 3 + +type memStorageLock struct { + ms *memStorage +} + +func (lock *memStorageLock) Release() { + ms := lock.ms + ms.mu.Lock() + defer ms.mu.Unlock() + if ms.slock == lock { + ms.slock = nil + } + return +} + +// memStorage is a memory-backed storage. +type memStorage struct { + mu sync.Mutex + slock *memStorageLock + files map[uint64]*memFile + meta FileDesc +} + +// NewMemStorage returns a new memory-backed storage implementation. +func NewMemStorage() Storage { + return &memStorage{ + files: make(map[uint64]*memFile), + } +} + +func (ms *memStorage) Lock() (Lock, error) { + ms.mu.Lock() + defer ms.mu.Unlock() + if ms.slock != nil { + return nil, ErrLocked + } + ms.slock = &memStorageLock{ms: ms} + return ms.slock, nil +} + +func (*memStorage) Log(str string) {} + +func (ms *memStorage) SetMeta(fd FileDesc) error { + if !FileDescOk(fd) { + return ErrInvalidFile + } + + ms.mu.Lock() + ms.meta = fd + ms.mu.Unlock() + return nil +} + +func (ms *memStorage) GetMeta() (FileDesc, error) { + ms.mu.Lock() + defer ms.mu.Unlock() + if ms.meta.Nil() { + return FileDesc{}, os.ErrNotExist + } + return ms.meta, nil +} + +func (ms *memStorage) List(ft FileType) ([]FileDesc, error) { + ms.mu.Lock() + var fds []FileDesc + for x, _ := range ms.files { + fd := unpackFile(x) + if fd.Type&ft != 0 { + fds = append(fds, fd) + } + } + ms.mu.Unlock() + return fds, nil +} + +func (ms *memStorage) Open(fd FileDesc) (Reader, error) { + if !FileDescOk(fd) { + return nil, ErrInvalidFile + } + + ms.mu.Lock() + defer ms.mu.Unlock() + if m, exist := ms.files[packFile(fd)]; exist { + if m.open { + return nil, errFileOpen + } + m.open = true + return &memReader{Reader: bytes.NewReader(m.Bytes()), ms: ms, m: m}, nil + } + return nil, os.ErrNotExist +} + +func (ms *memStorage) Create(fd FileDesc) (Writer, error) { + if !FileDescOk(fd) { + return nil, ErrInvalidFile + } + + x := packFile(fd) + ms.mu.Lock() + defer ms.mu.Unlock() + m, exist := ms.files[x] + if exist { + if m.open { + return nil, errFileOpen + } + m.Reset() + } else { + m = &memFile{} + ms.files[x] = m + } + m.open = true + return &memWriter{memFile: m, ms: ms}, nil +} + +func (ms *memStorage) Remove(fd FileDesc) error { + if !FileDescOk(fd) { + return ErrInvalidFile + } + + x := packFile(fd) + ms.mu.Lock() + defer ms.mu.Unlock() + if _, exist := ms.files[x]; exist { + delete(ms.files, x) + return nil + } + return os.ErrNotExist +} + +func (ms *memStorage) Rename(oldfd, newfd FileDesc) error { + if FileDescOk(oldfd) || FileDescOk(newfd) { + return ErrInvalidFile + } + if oldfd == newfd { + return nil + } + + oldx := packFile(oldfd) + newx := packFile(newfd) + ms.mu.Lock() + defer ms.mu.Unlock() + oldm, exist := ms.files[oldx] + if !exist { + return os.ErrNotExist + } + newm, exist := ms.files[newx] + if (exist && newm.open) || oldm.open { + return errFileOpen + } + delete(ms.files, oldx) + ms.files[newx] = oldm + return nil +} + +func (*memStorage) Close() error { return nil } + +type memFile struct { + bytes.Buffer + open bool +} + +type memReader struct { + *bytes.Reader + ms *memStorage + m *memFile + closed bool +} + +func (mr *memReader) Close() error { + mr.ms.mu.Lock() + defer mr.ms.mu.Unlock() + if mr.closed { + return ErrClosed + } + mr.m.open = false + return nil +} + +type memWriter struct { + *memFile + ms *memStorage + closed bool +} + +func (*memWriter) Sync() error { return nil } + +func (mw *memWriter) Close() error { + mw.ms.mu.Lock() + defer mw.ms.mu.Unlock() + if mw.closed { + return ErrClosed + } + mw.memFile.open = false + return nil +} + +func packFile(fd FileDesc) uint64 { + return uint64(fd.Num)<> typeShift)} +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/storage/storage.go b/vendor/github.com/syndtr/goleveldb/leveldb/storage/storage.go new file mode 100644 index 000000000..9b30b6727 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/storage/storage.go @@ -0,0 +1,177 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Package storage provides storage abstraction for LevelDB. +package storage + +import ( + "errors" + "fmt" + "io" + + "github.com/syndtr/goleveldb/leveldb/util" +) + +type FileType int + +const ( + TypeManifest FileType = 1 << iota + TypeJournal + TypeTable + TypeTemp + + TypeAll = TypeManifest | TypeJournal | TypeTable | TypeTemp +) + +func (t FileType) String() string { + switch t { + case TypeManifest: + return "manifest" + case TypeJournal: + return "journal" + case TypeTable: + return "table" + case TypeTemp: + return "temp" + } + return fmt.Sprintf("", t) +} + +var ( + ErrInvalidFile = errors.New("leveldb/storage: invalid file for argument") + ErrLocked = errors.New("leveldb/storage: already locked") + ErrClosed = errors.New("leveldb/storage: closed") +) + +// ErrCorrupted is the type that wraps errors that indicate corruption of +// a file. Package storage has its own type instead of using +// errors.ErrCorrupted to prevent circular import. +type ErrCorrupted struct { + Fd FileDesc + Err error +} + +func (e *ErrCorrupted) Error() string { + if !e.Fd.Nil() { + return fmt.Sprintf("%v [file=%v]", e.Err, e.Fd) + } else { + return e.Err.Error() + } +} + +// Syncer is the interface that wraps basic Sync method. +type Syncer interface { + // Sync commits the current contents of the file to stable storage. + Sync() error +} + +// Reader is the interface that groups the basic Read, Seek, ReadAt and Close +// methods. +type Reader interface { + io.ReadSeeker + io.ReaderAt + io.Closer +} + +// Writer is the interface that groups the basic Write, Sync and Close +// methods. +type Writer interface { + io.WriteCloser + Syncer +} + +type Lock interface { + util.Releaser +} + +// FileDesc is a file descriptor. +type FileDesc struct { + Type FileType + Num int64 +} + +func (fd FileDesc) String() string { + switch fd.Type { + case TypeManifest: + return fmt.Sprintf("MANIFEST-%06d", fd.Num) + case TypeJournal: + return fmt.Sprintf("%06d.log", fd.Num) + case TypeTable: + return fmt.Sprintf("%06d.ldb", fd.Num) + case TypeTemp: + return fmt.Sprintf("%06d.tmp", fd.Num) + default: + return fmt.Sprintf("%#x-%d", fd.Type, fd.Num) + } +} + +// Nil returns true if fd == (FileDesc{}). +func (fd FileDesc) Nil() bool { + return fd == (FileDesc{}) +} + +// FileDescOk returns true if fd is a valid file descriptor. +func FileDescOk(fd FileDesc) bool { + switch fd.Type { + case TypeManifest: + case TypeJournal: + case TypeTable: + case TypeTemp: + default: + return false + } + return fd.Num >= 0 +} + +// Storage is the storage. A storage instance must be goroutine-safe. +type Storage interface { + // Lock locks the storage. Any subsequent attempt to call Lock will fail + // until the last lock released. + // After use the caller should call the Release method. + Lock() (Lock, error) + + // Log logs a string. This is used for logging. + // An implementation may write to a file, stdout or simply do nothing. + Log(str string) + + // SetMeta sets to point to the given fd, which then can be acquired using + // GetMeta method. + // SetMeta should be implemented in such way that changes should happened + // atomically. + SetMeta(fd FileDesc) error + + // GetManifest returns a manifest file. + // Returns os.ErrNotExist if meta doesn't point to any fd, or point to fd + // that doesn't exist. + GetMeta() (FileDesc, error) + + // List returns fds that match the given file types. + // The file types may be OR'ed together. + List(ft FileType) ([]FileDesc, error) + + // Open opens file with the given fd read-only. + // Returns os.ErrNotExist error if the file does not exist. + // Returns ErrClosed if the underlying storage is closed. + Open(fd FileDesc) (Reader, error) + + // Create creates file with the given fd, truncate if already exist and + // opens write-only. + // Returns ErrClosed if the underlying storage is closed. + Create(fd FileDesc) (Writer, error) + + // Remove removes file with the given fd. + // Returns ErrClosed if the underlying storage is closed. + Remove(fd FileDesc) error + + // Rename renames file from oldfd to newfd. + // Returns ErrClosed if the underlying storage is closed. + Rename(oldfd, newfd FileDesc) error + + // Close closes the storage. + // It is valid to call Close multiple times. Other methods should not be + // called after the storage has been closed. + Close() error +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/table.go b/vendor/github.com/syndtr/goleveldb/leveldb/table.go new file mode 100644 index 000000000..310ba6c22 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/table.go @@ -0,0 +1,529 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "fmt" + "sort" + "sync/atomic" + + "github.com/syndtr/goleveldb/leveldb/cache" + "github.com/syndtr/goleveldb/leveldb/iterator" + "github.com/syndtr/goleveldb/leveldb/opt" + "github.com/syndtr/goleveldb/leveldb/storage" + "github.com/syndtr/goleveldb/leveldb/table" + "github.com/syndtr/goleveldb/leveldb/util" +) + +// tFile holds basic information about a table. +type tFile struct { + fd storage.FileDesc + seekLeft int32 + size int64 + imin, imax internalKey +} + +// Returns true if given key is after largest key of this table. +func (t *tFile) after(icmp *iComparer, ukey []byte) bool { + return ukey != nil && icmp.uCompare(ukey, t.imax.ukey()) > 0 +} + +// Returns true if given key is before smallest key of this table. +func (t *tFile) before(icmp *iComparer, ukey []byte) bool { + return ukey != nil && icmp.uCompare(ukey, t.imin.ukey()) < 0 +} + +// Returns true if given key range overlaps with this table key range. +func (t *tFile) overlaps(icmp *iComparer, umin, umax []byte) bool { + return !t.after(icmp, umin) && !t.before(icmp, umax) +} + +// Cosumes one seek and return current seeks left. +func (t *tFile) consumeSeek() int32 { + return atomic.AddInt32(&t.seekLeft, -1) +} + +// Creates new tFile. +func newTableFile(fd storage.FileDesc, size int64, imin, imax internalKey) *tFile { + f := &tFile{ + fd: fd, + size: size, + imin: imin, + imax: imax, + } + + // We arrange to automatically compact this file after + // a certain number of seeks. Let's assume: + // (1) One seek costs 10ms + // (2) Writing or reading 1MB costs 10ms (100MB/s) + // (3) A compaction of 1MB does 25MB of IO: + // 1MB read from this level + // 10-12MB read from next level (boundaries may be misaligned) + // 10-12MB written to next level + // This implies that 25 seeks cost the same as the compaction + // of 1MB of data. I.e., one seek costs approximately the + // same as the compaction of 40KB of data. We are a little + // conservative and allow approximately one seek for every 16KB + // of data before triggering a compaction. + f.seekLeft = int32(size / 16384) + if f.seekLeft < 100 { + f.seekLeft = 100 + } + + return f +} + +func tableFileFromRecord(r atRecord) *tFile { + return newTableFile(storage.FileDesc{storage.TypeTable, r.num}, r.size, r.imin, r.imax) +} + +// tFiles hold multiple tFile. +type tFiles []*tFile + +func (tf tFiles) Len() int { return len(tf) } +func (tf tFiles) Swap(i, j int) { tf[i], tf[j] = tf[j], tf[i] } + +func (tf tFiles) nums() string { + x := "[ " + for i, f := range tf { + if i != 0 { + x += ", " + } + x += fmt.Sprint(f.fd.Num) + } + x += " ]" + return x +} + +// Returns true if i smallest key is less than j. +// This used for sort by key in ascending order. +func (tf tFiles) lessByKey(icmp *iComparer, i, j int) bool { + a, b := tf[i], tf[j] + n := icmp.Compare(a.imin, b.imin) + if n == 0 { + return a.fd.Num < b.fd.Num + } + return n < 0 +} + +// Returns true if i file number is greater than j. +// This used for sort by file number in descending order. +func (tf tFiles) lessByNum(i, j int) bool { + return tf[i].fd.Num > tf[j].fd.Num +} + +// Sorts tables by key in ascending order. +func (tf tFiles) sortByKey(icmp *iComparer) { + sort.Sort(&tFilesSortByKey{tFiles: tf, icmp: icmp}) +} + +// Sorts tables by file number in descending order. +func (tf tFiles) sortByNum() { + sort.Sort(&tFilesSortByNum{tFiles: tf}) +} + +// Returns sum of all tables size. +func (tf tFiles) size() (sum int64) { + for _, t := range tf { + sum += t.size + } + return sum +} + +// Searches smallest index of tables whose its smallest +// key is after or equal with given key. +func (tf tFiles) searchMin(icmp *iComparer, ikey internalKey) int { + return sort.Search(len(tf), func(i int) bool { + return icmp.Compare(tf[i].imin, ikey) >= 0 + }) +} + +// Searches smallest index of tables whose its largest +// key is after or equal with given key. +func (tf tFiles) searchMax(icmp *iComparer, ikey internalKey) int { + return sort.Search(len(tf), func(i int) bool { + return icmp.Compare(tf[i].imax, ikey) >= 0 + }) +} + +// Returns true if given key range overlaps with one or more +// tables key range. If unsorted is true then binary search will not be used. +func (tf tFiles) overlaps(icmp *iComparer, umin, umax []byte, unsorted bool) bool { + if unsorted { + // Check against all files. + for _, t := range tf { + if t.overlaps(icmp, umin, umax) { + return true + } + } + return false + } + + i := 0 + if len(umin) > 0 { + // Find the earliest possible internal key for min. + i = tf.searchMax(icmp, makeInternalKey(nil, umin, keyMaxSeq, keyTypeSeek)) + } + if i >= len(tf) { + // Beginning of range is after all files, so no overlap. + return false + } + return !tf[i].before(icmp, umax) +} + +// Returns tables whose its key range overlaps with given key range. +// Range will be expanded if ukey found hop across tables. +// If overlapped is true then the search will be restarted if umax +// expanded. +// The dst content will be overwritten. +func (tf tFiles) getOverlaps(dst tFiles, icmp *iComparer, umin, umax []byte, overlapped bool) tFiles { + dst = dst[:0] + for i := 0; i < len(tf); { + t := tf[i] + if t.overlaps(icmp, umin, umax) { + if umin != nil && icmp.uCompare(t.imin.ukey(), umin) < 0 { + umin = t.imin.ukey() + dst = dst[:0] + i = 0 + continue + } else if umax != nil && icmp.uCompare(t.imax.ukey(), umax) > 0 { + umax = t.imax.ukey() + // Restart search if it is overlapped. + if overlapped { + dst = dst[:0] + i = 0 + continue + } + } + + dst = append(dst, t) + } + i++ + } + + return dst +} + +// Returns tables key range. +func (tf tFiles) getRange(icmp *iComparer) (imin, imax internalKey) { + for i, t := range tf { + if i == 0 { + imin, imax = t.imin, t.imax + continue + } + if icmp.Compare(t.imin, imin) < 0 { + imin = t.imin + } + if icmp.Compare(t.imax, imax) > 0 { + imax = t.imax + } + } + + return +} + +// Creates iterator index from tables. +func (tf tFiles) newIndexIterator(tops *tOps, icmp *iComparer, slice *util.Range, ro *opt.ReadOptions) iterator.IteratorIndexer { + if slice != nil { + var start, limit int + if slice.Start != nil { + start = tf.searchMax(icmp, internalKey(slice.Start)) + } + if slice.Limit != nil { + limit = tf.searchMin(icmp, internalKey(slice.Limit)) + } else { + limit = tf.Len() + } + tf = tf[start:limit] + } + return iterator.NewArrayIndexer(&tFilesArrayIndexer{ + tFiles: tf, + tops: tops, + icmp: icmp, + slice: slice, + ro: ro, + }) +} + +// Tables iterator index. +type tFilesArrayIndexer struct { + tFiles + tops *tOps + icmp *iComparer + slice *util.Range + ro *opt.ReadOptions +} + +func (a *tFilesArrayIndexer) Search(key []byte) int { + return a.searchMax(a.icmp, internalKey(key)) +} + +func (a *tFilesArrayIndexer) Get(i int) iterator.Iterator { + if i == 0 || i == a.Len()-1 { + return a.tops.newIterator(a.tFiles[i], a.slice, a.ro) + } + return a.tops.newIterator(a.tFiles[i], nil, a.ro) +} + +// Helper type for sortByKey. +type tFilesSortByKey struct { + tFiles + icmp *iComparer +} + +func (x *tFilesSortByKey) Less(i, j int) bool { + return x.lessByKey(x.icmp, i, j) +} + +// Helper type for sortByNum. +type tFilesSortByNum struct { + tFiles +} + +func (x *tFilesSortByNum) Less(i, j int) bool { + return x.lessByNum(i, j) +} + +// Table operations. +type tOps struct { + s *session + noSync bool + cache *cache.Cache + bcache *cache.Cache + bpool *util.BufferPool +} + +// Creates an empty table and returns table writer. +func (t *tOps) create() (*tWriter, error) { + fd := storage.FileDesc{storage.TypeTable, t.s.allocFileNum()} + fw, err := t.s.stor.Create(fd) + if err != nil { + return nil, err + } + return &tWriter{ + t: t, + fd: fd, + w: fw, + tw: table.NewWriter(fw, t.s.o.Options), + }, nil +} + +// Builds table from src iterator. +func (t *tOps) createFrom(src iterator.Iterator) (f *tFile, n int, err error) { + w, err := t.create() + if err != nil { + return + } + + defer func() { + if err != nil { + w.drop() + } + }() + + for src.Next() { + err = w.append(src.Key(), src.Value()) + if err != nil { + return + } + } + err = src.Error() + if err != nil { + return + } + + n = w.tw.EntriesLen() + f, err = w.finish() + return +} + +// Opens table. It returns a cache handle, which should +// be released after use. +func (t *tOps) open(f *tFile) (ch *cache.Handle, err error) { + ch = t.cache.Get(0, uint64(f.fd.Num), func() (size int, value cache.Value) { + var r storage.Reader + r, err = t.s.stor.Open(f.fd) + if err != nil { + return 0, nil + } + + var bcache *cache.NamespaceGetter + if t.bcache != nil { + bcache = &cache.NamespaceGetter{Cache: t.bcache, NS: uint64(f.fd.Num)} + } + + var tr *table.Reader + tr, err = table.NewReader(r, f.size, f.fd, bcache, t.bpool, t.s.o.Options) + if err != nil { + r.Close() + return 0, nil + } + return 1, tr + + }) + if ch == nil && err == nil { + err = ErrClosed + } + return +} + +// Finds key/value pair whose key is greater than or equal to the +// given key. +func (t *tOps) find(f *tFile, key []byte, ro *opt.ReadOptions) (rkey, rvalue []byte, err error) { + ch, err := t.open(f) + if err != nil { + return nil, nil, err + } + defer ch.Release() + return ch.Value().(*table.Reader).Find(key, true, ro) +} + +// Finds key that is greater than or equal to the given key. +func (t *tOps) findKey(f *tFile, key []byte, ro *opt.ReadOptions) (rkey []byte, err error) { + ch, err := t.open(f) + if err != nil { + return nil, err + } + defer ch.Release() + return ch.Value().(*table.Reader).FindKey(key, true, ro) +} + +// Returns approximate offset of the given key. +func (t *tOps) offsetOf(f *tFile, key []byte) (offset int64, err error) { + ch, err := t.open(f) + if err != nil { + return + } + defer ch.Release() + return ch.Value().(*table.Reader).OffsetOf(key) +} + +// Creates an iterator from the given table. +func (t *tOps) newIterator(f *tFile, slice *util.Range, ro *opt.ReadOptions) iterator.Iterator { + ch, err := t.open(f) + if err != nil { + return iterator.NewEmptyIterator(err) + } + iter := ch.Value().(*table.Reader).NewIterator(slice, ro) + iter.SetReleaser(ch) + return iter +} + +// Removes table from persistent storage. It waits until +// no one use the the table. +func (t *tOps) remove(f *tFile) { + t.cache.Delete(0, uint64(f.fd.Num), func() { + if err := t.s.stor.Remove(f.fd); err != nil { + t.s.logf("table@remove removing @%d %q", f.fd.Num, err) + } else { + t.s.logf("table@remove removed @%d", f.fd.Num) + } + if t.bcache != nil { + t.bcache.EvictNS(uint64(f.fd.Num)) + } + }) +} + +// Closes the table ops instance. It will close all tables, +// regadless still used or not. +func (t *tOps) close() { + t.bpool.Close() + t.cache.Close() + if t.bcache != nil { + t.bcache.Close() + } +} + +// Creates new initialized table ops instance. +func newTableOps(s *session) *tOps { + var ( + cacher cache.Cacher + bcache *cache.Cache + bpool *util.BufferPool + ) + if s.o.GetOpenFilesCacheCapacity() > 0 { + cacher = cache.NewLRU(s.o.GetOpenFilesCacheCapacity()) + } + if !s.o.GetDisableBlockCache() { + var bcacher cache.Cacher + if s.o.GetBlockCacheCapacity() > 0 { + bcacher = cache.NewLRU(s.o.GetBlockCacheCapacity()) + } + bcache = cache.NewCache(bcacher) + } + if !s.o.GetDisableBufferPool() { + bpool = util.NewBufferPool(s.o.GetBlockSize() + 5) + } + return &tOps{ + s: s, + noSync: s.o.GetNoSync(), + cache: cache.NewCache(cacher), + bcache: bcache, + bpool: bpool, + } +} + +// tWriter wraps the table writer. It keep track of file descriptor +// and added key range. +type tWriter struct { + t *tOps + + fd storage.FileDesc + w storage.Writer + tw *table.Writer + + first, last []byte +} + +// Append key/value pair to the table. +func (w *tWriter) append(key, value []byte) error { + if w.first == nil { + w.first = append([]byte{}, key...) + } + w.last = append(w.last[:0], key...) + return w.tw.Append(key, value) +} + +// Returns true if the table is empty. +func (w *tWriter) empty() bool { + return w.first == nil +} + +// Closes the storage.Writer. +func (w *tWriter) close() { + if w.w != nil { + w.w.Close() + w.w = nil + } +} + +// Finalizes the table and returns table file. +func (w *tWriter) finish() (f *tFile, err error) { + defer w.close() + err = w.tw.Close() + if err != nil { + return + } + if !w.t.noSync { + err = w.w.Sync() + if err != nil { + return + } + } + f = newTableFile(w.fd, int64(w.tw.BytesLen()), internalKey(w.first), internalKey(w.last)) + return +} + +// Drops the table. +func (w *tWriter) drop() { + w.close() + w.t.s.stor.Remove(w.fd) + w.t.s.reuseFileNum(w.fd.Num) + w.tw = nil + w.first = nil + w.last = nil +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/table/reader.go b/vendor/github.com/syndtr/goleveldb/leveldb/table/reader.go new file mode 100644 index 000000000..ae61bece9 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/table/reader.go @@ -0,0 +1,1107 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package table + +import ( + "encoding/binary" + "fmt" + "io" + "sort" + "strings" + "sync" + + "github.com/golang/snappy" + + "github.com/syndtr/goleveldb/leveldb/cache" + "github.com/syndtr/goleveldb/leveldb/comparer" + "github.com/syndtr/goleveldb/leveldb/errors" + "github.com/syndtr/goleveldb/leveldb/filter" + "github.com/syndtr/goleveldb/leveldb/iterator" + "github.com/syndtr/goleveldb/leveldb/opt" + "github.com/syndtr/goleveldb/leveldb/storage" + "github.com/syndtr/goleveldb/leveldb/util" +) + +var ( + ErrNotFound = errors.ErrNotFound + ErrReaderReleased = errors.New("leveldb/table: reader released") + ErrIterReleased = errors.New("leveldb/table: iterator released") +) + +type ErrCorrupted struct { + Pos int64 + Size int64 + Kind string + Reason string +} + +func (e *ErrCorrupted) Error() string { + return fmt.Sprintf("leveldb/table: corruption on %s (pos=%d): %s", e.Kind, e.Pos, e.Reason) +} + +func max(x, y int) int { + if x > y { + return x + } + return y +} + +type block struct { + bpool *util.BufferPool + bh blockHandle + data []byte + restartsLen int + restartsOffset int +} + +func (b *block) seek(cmp comparer.Comparer, rstart, rlimit int, key []byte) (index, offset int, err error) { + index = sort.Search(b.restartsLen-rstart-(b.restartsLen-rlimit), func(i int) bool { + offset := int(binary.LittleEndian.Uint32(b.data[b.restartsOffset+4*(rstart+i):])) + offset += 1 // shared always zero, since this is a restart point + v1, n1 := binary.Uvarint(b.data[offset:]) // key length + _, n2 := binary.Uvarint(b.data[offset+n1:]) // value length + m := offset + n1 + n2 + return cmp.Compare(b.data[m:m+int(v1)], key) > 0 + }) + rstart - 1 + if index < rstart { + // The smallest key is greater-than key sought. + index = rstart + } + offset = int(binary.LittleEndian.Uint32(b.data[b.restartsOffset+4*index:])) + return +} + +func (b *block) restartIndex(rstart, rlimit, offset int) int { + return sort.Search(b.restartsLen-rstart-(b.restartsLen-rlimit), func(i int) bool { + return int(binary.LittleEndian.Uint32(b.data[b.restartsOffset+4*(rstart+i):])) > offset + }) + rstart - 1 +} + +func (b *block) restartOffset(index int) int { + return int(binary.LittleEndian.Uint32(b.data[b.restartsOffset+4*index:])) +} + +func (b *block) entry(offset int) (key, value []byte, nShared, n int, err error) { + if offset >= b.restartsOffset { + if offset != b.restartsOffset { + err = &ErrCorrupted{Reason: "entries offset not aligned"} + } + return + } + v0, n0 := binary.Uvarint(b.data[offset:]) // Shared prefix length + v1, n1 := binary.Uvarint(b.data[offset+n0:]) // Key length + v2, n2 := binary.Uvarint(b.data[offset+n0+n1:]) // Value length + m := n0 + n1 + n2 + n = m + int(v1) + int(v2) + if n0 <= 0 || n1 <= 0 || n2 <= 0 || offset+n > b.restartsOffset { + err = &ErrCorrupted{Reason: "entries corrupted"} + return + } + key = b.data[offset+m : offset+m+int(v1)] + value = b.data[offset+m+int(v1) : offset+n] + nShared = int(v0) + return +} + +func (b *block) Release() { + b.bpool.Put(b.data) + b.bpool = nil + b.data = nil +} + +type dir int + +const ( + dirReleased dir = iota - 1 + dirSOI + dirEOI + dirBackward + dirForward +) + +type blockIter struct { + tr *Reader + block *block + blockReleaser util.Releaser + releaser util.Releaser + key, value []byte + offset int + // Previous offset, only filled by Next. + prevOffset int + prevNode []int + prevKeys []byte + restartIndex int + // Iterator direction. + dir dir + // Restart index slice range. + riStart int + riLimit int + // Offset slice range. + offsetStart int + offsetRealStart int + offsetLimit int + // Error. + err error +} + +func (i *blockIter) sErr(err error) { + i.err = err + i.key = nil + i.value = nil + i.prevNode = nil + i.prevKeys = nil +} + +func (i *blockIter) reset() { + if i.dir == dirBackward { + i.prevNode = i.prevNode[:0] + i.prevKeys = i.prevKeys[:0] + } + i.restartIndex = i.riStart + i.offset = i.offsetStart + i.dir = dirSOI + i.key = i.key[:0] + i.value = nil +} + +func (i *blockIter) isFirst() bool { + switch i.dir { + case dirForward: + return i.prevOffset == i.offsetRealStart + case dirBackward: + return len(i.prevNode) == 1 && i.restartIndex == i.riStart + } + return false +} + +func (i *blockIter) isLast() bool { + switch i.dir { + case dirForward, dirBackward: + return i.offset == i.offsetLimit + } + return false +} + +func (i *blockIter) First() bool { + if i.err != nil { + return false + } else if i.dir == dirReleased { + i.err = ErrIterReleased + return false + } + + if i.dir == dirBackward { + i.prevNode = i.prevNode[:0] + i.prevKeys = i.prevKeys[:0] + } + i.dir = dirSOI + return i.Next() +} + +func (i *blockIter) Last() bool { + if i.err != nil { + return false + } else if i.dir == dirReleased { + i.err = ErrIterReleased + return false + } + + if i.dir == dirBackward { + i.prevNode = i.prevNode[:0] + i.prevKeys = i.prevKeys[:0] + } + i.dir = dirEOI + return i.Prev() +} + +func (i *blockIter) Seek(key []byte) bool { + if i.err != nil { + return false + } else if i.dir == dirReleased { + i.err = ErrIterReleased + return false + } + + ri, offset, err := i.block.seek(i.tr.cmp, i.riStart, i.riLimit, key) + if err != nil { + i.sErr(err) + return false + } + i.restartIndex = ri + i.offset = max(i.offsetStart, offset) + if i.dir == dirSOI || i.dir == dirEOI { + i.dir = dirForward + } + for i.Next() { + if i.tr.cmp.Compare(i.key, key) >= 0 { + return true + } + } + return false +} + +func (i *blockIter) Next() bool { + if i.dir == dirEOI || i.err != nil { + return false + } else if i.dir == dirReleased { + i.err = ErrIterReleased + return false + } + + if i.dir == dirSOI { + i.restartIndex = i.riStart + i.offset = i.offsetStart + } else if i.dir == dirBackward { + i.prevNode = i.prevNode[:0] + i.prevKeys = i.prevKeys[:0] + } + for i.offset < i.offsetRealStart { + key, value, nShared, n, err := i.block.entry(i.offset) + if err != nil { + i.sErr(i.tr.fixErrCorruptedBH(i.block.bh, err)) + return false + } + if n == 0 { + i.dir = dirEOI + return false + } + i.key = append(i.key[:nShared], key...) + i.value = value + i.offset += n + } + if i.offset >= i.offsetLimit { + i.dir = dirEOI + if i.offset != i.offsetLimit { + i.sErr(i.tr.newErrCorruptedBH(i.block.bh, "entries offset not aligned")) + } + return false + } + key, value, nShared, n, err := i.block.entry(i.offset) + if err != nil { + i.sErr(i.tr.fixErrCorruptedBH(i.block.bh, err)) + return false + } + if n == 0 { + i.dir = dirEOI + return false + } + i.key = append(i.key[:nShared], key...) + i.value = value + i.prevOffset = i.offset + i.offset += n + i.dir = dirForward + return true +} + +func (i *blockIter) Prev() bool { + if i.dir == dirSOI || i.err != nil { + return false + } else if i.dir == dirReleased { + i.err = ErrIterReleased + return false + } + + var ri int + if i.dir == dirForward { + // Change direction. + i.offset = i.prevOffset + if i.offset == i.offsetRealStart { + i.dir = dirSOI + return false + } + ri = i.block.restartIndex(i.restartIndex, i.riLimit, i.offset) + i.dir = dirBackward + } else if i.dir == dirEOI { + // At the end of iterator. + i.restartIndex = i.riLimit + i.offset = i.offsetLimit + if i.offset == i.offsetRealStart { + i.dir = dirSOI + return false + } + ri = i.riLimit - 1 + i.dir = dirBackward + } else if len(i.prevNode) == 1 { + // This is the end of a restart range. + i.offset = i.prevNode[0] + i.prevNode = i.prevNode[:0] + if i.restartIndex == i.riStart { + i.dir = dirSOI + return false + } + i.restartIndex-- + ri = i.restartIndex + } else { + // In the middle of restart range, get from cache. + n := len(i.prevNode) - 3 + node := i.prevNode[n:] + i.prevNode = i.prevNode[:n] + // Get the key. + ko := node[0] + i.key = append(i.key[:0], i.prevKeys[ko:]...) + i.prevKeys = i.prevKeys[:ko] + // Get the value. + vo := node[1] + vl := vo + node[2] + i.value = i.block.data[vo:vl] + i.offset = vl + return true + } + // Build entries cache. + i.key = i.key[:0] + i.value = nil + offset := i.block.restartOffset(ri) + if offset == i.offset { + ri -= 1 + if ri < 0 { + i.dir = dirSOI + return false + } + offset = i.block.restartOffset(ri) + } + i.prevNode = append(i.prevNode, offset) + for { + key, value, nShared, n, err := i.block.entry(offset) + if err != nil { + i.sErr(i.tr.fixErrCorruptedBH(i.block.bh, err)) + return false + } + if offset >= i.offsetRealStart { + if i.value != nil { + // Appends 3 variables: + // 1. Previous keys offset + // 2. Value offset in the data block + // 3. Value length + i.prevNode = append(i.prevNode, len(i.prevKeys), offset-len(i.value), len(i.value)) + i.prevKeys = append(i.prevKeys, i.key...) + } + i.value = value + } + i.key = append(i.key[:nShared], key...) + offset += n + // Stop if target offset reached. + if offset >= i.offset { + if offset != i.offset { + i.sErr(i.tr.newErrCorruptedBH(i.block.bh, "entries offset not aligned")) + return false + } + + break + } + } + i.restartIndex = ri + i.offset = offset + return true +} + +func (i *blockIter) Key() []byte { + if i.err != nil || i.dir <= dirEOI { + return nil + } + return i.key +} + +func (i *blockIter) Value() []byte { + if i.err != nil || i.dir <= dirEOI { + return nil + } + return i.value +} + +func (i *blockIter) Release() { + if i.dir != dirReleased { + i.tr = nil + i.block = nil + i.prevNode = nil + i.prevKeys = nil + i.key = nil + i.value = nil + i.dir = dirReleased + if i.blockReleaser != nil { + i.blockReleaser.Release() + i.blockReleaser = nil + } + if i.releaser != nil { + i.releaser.Release() + i.releaser = nil + } + } +} + +func (i *blockIter) SetReleaser(releaser util.Releaser) { + if i.dir == dirReleased { + panic(util.ErrReleased) + } + if i.releaser != nil && releaser != nil { + panic(util.ErrHasReleaser) + } + i.releaser = releaser +} + +func (i *blockIter) Valid() bool { + return i.err == nil && (i.dir == dirBackward || i.dir == dirForward) +} + +func (i *blockIter) Error() error { + return i.err +} + +type filterBlock struct { + bpool *util.BufferPool + data []byte + oOffset int + baseLg uint + filtersNum int +} + +func (b *filterBlock) contains(filter filter.Filter, offset uint64, key []byte) bool { + i := int(offset >> b.baseLg) + if i < b.filtersNum { + o := b.data[b.oOffset+i*4:] + n := int(binary.LittleEndian.Uint32(o)) + m := int(binary.LittleEndian.Uint32(o[4:])) + if n < m && m <= b.oOffset { + return filter.Contains(b.data[n:m], key) + } else if n == m { + return false + } + } + return true +} + +func (b *filterBlock) Release() { + b.bpool.Put(b.data) + b.bpool = nil + b.data = nil +} + +type indexIter struct { + *blockIter + tr *Reader + slice *util.Range + // Options + fillCache bool +} + +func (i *indexIter) Get() iterator.Iterator { + value := i.Value() + if value == nil { + return nil + } + dataBH, n := decodeBlockHandle(value) + if n == 0 { + return iterator.NewEmptyIterator(i.tr.newErrCorruptedBH(i.tr.indexBH, "bad data block handle")) + } + + var slice *util.Range + if i.slice != nil && (i.blockIter.isFirst() || i.blockIter.isLast()) { + slice = i.slice + } + return i.tr.getDataIterErr(dataBH, slice, i.tr.verifyChecksum, i.fillCache) +} + +// Reader is a table reader. +type Reader struct { + mu sync.RWMutex + fd storage.FileDesc + reader io.ReaderAt + cache *cache.NamespaceGetter + err error + bpool *util.BufferPool + // Options + o *opt.Options + cmp comparer.Comparer + filter filter.Filter + verifyChecksum bool + + dataEnd int64 + metaBH, indexBH, filterBH blockHandle + indexBlock *block + filterBlock *filterBlock +} + +func (r *Reader) blockKind(bh blockHandle) string { + switch bh.offset { + case r.metaBH.offset: + return "meta-block" + case r.indexBH.offset: + return "index-block" + case r.filterBH.offset: + if r.filterBH.length > 0 { + return "filter-block" + } + } + return "data-block" +} + +func (r *Reader) newErrCorrupted(pos, size int64, kind, reason string) error { + return &errors.ErrCorrupted{Fd: r.fd, Err: &ErrCorrupted{Pos: pos, Size: size, Kind: kind, Reason: reason}} +} + +func (r *Reader) newErrCorruptedBH(bh blockHandle, reason string) error { + return r.newErrCorrupted(int64(bh.offset), int64(bh.length), r.blockKind(bh), reason) +} + +func (r *Reader) fixErrCorruptedBH(bh blockHandle, err error) error { + if cerr, ok := err.(*ErrCorrupted); ok { + cerr.Pos = int64(bh.offset) + cerr.Size = int64(bh.length) + cerr.Kind = r.blockKind(bh) + return &errors.ErrCorrupted{Fd: r.fd, Err: cerr} + } + return err +} + +func (r *Reader) readRawBlock(bh blockHandle, verifyChecksum bool) ([]byte, error) { + data := r.bpool.Get(int(bh.length + blockTrailerLen)) + if _, err := r.reader.ReadAt(data, int64(bh.offset)); err != nil && err != io.EOF { + return nil, err + } + + if verifyChecksum { + n := bh.length + 1 + checksum0 := binary.LittleEndian.Uint32(data[n:]) + checksum1 := util.NewCRC(data[:n]).Value() + if checksum0 != checksum1 { + r.bpool.Put(data) + return nil, r.newErrCorruptedBH(bh, fmt.Sprintf("checksum mismatch, want=%#x got=%#x", checksum0, checksum1)) + } + } + + switch data[bh.length] { + case blockTypeNoCompression: + data = data[:bh.length] + case blockTypeSnappyCompression: + decLen, err := snappy.DecodedLen(data[:bh.length]) + if err != nil { + return nil, r.newErrCorruptedBH(bh, err.Error()) + } + decData := r.bpool.Get(decLen) + decData, err = snappy.Decode(decData, data[:bh.length]) + r.bpool.Put(data) + if err != nil { + r.bpool.Put(decData) + return nil, r.newErrCorruptedBH(bh, err.Error()) + } + data = decData + default: + r.bpool.Put(data) + return nil, r.newErrCorruptedBH(bh, fmt.Sprintf("unknown compression type %#x", data[bh.length])) + } + return data, nil +} + +func (r *Reader) readBlock(bh blockHandle, verifyChecksum bool) (*block, error) { + data, err := r.readRawBlock(bh, verifyChecksum) + if err != nil { + return nil, err + } + restartsLen := int(binary.LittleEndian.Uint32(data[len(data)-4:])) + b := &block{ + bpool: r.bpool, + bh: bh, + data: data, + restartsLen: restartsLen, + restartsOffset: len(data) - (restartsLen+1)*4, + } + return b, nil +} + +func (r *Reader) readBlockCached(bh blockHandle, verifyChecksum, fillCache bool) (*block, util.Releaser, error) { + if r.cache != nil { + var ( + err error + ch *cache.Handle + ) + if fillCache { + ch = r.cache.Get(bh.offset, func() (size int, value cache.Value) { + var b *block + b, err = r.readBlock(bh, verifyChecksum) + if err != nil { + return 0, nil + } + return cap(b.data), b + }) + } else { + ch = r.cache.Get(bh.offset, nil) + } + if ch != nil { + b, ok := ch.Value().(*block) + if !ok { + ch.Release() + return nil, nil, errors.New("leveldb/table: inconsistent block type") + } + return b, ch, err + } else if err != nil { + return nil, nil, err + } + } + + b, err := r.readBlock(bh, verifyChecksum) + return b, b, err +} + +func (r *Reader) readFilterBlock(bh blockHandle) (*filterBlock, error) { + data, err := r.readRawBlock(bh, true) + if err != nil { + return nil, err + } + n := len(data) + if n < 5 { + return nil, r.newErrCorruptedBH(bh, "too short") + } + m := n - 5 + oOffset := int(binary.LittleEndian.Uint32(data[m:])) + if oOffset > m { + return nil, r.newErrCorruptedBH(bh, "invalid data-offsets offset") + } + b := &filterBlock{ + bpool: r.bpool, + data: data, + oOffset: oOffset, + baseLg: uint(data[n-1]), + filtersNum: (m - oOffset) / 4, + } + return b, nil +} + +func (r *Reader) readFilterBlockCached(bh blockHandle, fillCache bool) (*filterBlock, util.Releaser, error) { + if r.cache != nil { + var ( + err error + ch *cache.Handle + ) + if fillCache { + ch = r.cache.Get(bh.offset, func() (size int, value cache.Value) { + var b *filterBlock + b, err = r.readFilterBlock(bh) + if err != nil { + return 0, nil + } + return cap(b.data), b + }) + } else { + ch = r.cache.Get(bh.offset, nil) + } + if ch != nil { + b, ok := ch.Value().(*filterBlock) + if !ok { + ch.Release() + return nil, nil, errors.New("leveldb/table: inconsistent block type") + } + return b, ch, err + } else if err != nil { + return nil, nil, err + } + } + + b, err := r.readFilterBlock(bh) + return b, b, err +} + +func (r *Reader) getIndexBlock(fillCache bool) (b *block, rel util.Releaser, err error) { + if r.indexBlock == nil { + return r.readBlockCached(r.indexBH, true, fillCache) + } + return r.indexBlock, util.NoopReleaser{}, nil +} + +func (r *Reader) getFilterBlock(fillCache bool) (*filterBlock, util.Releaser, error) { + if r.filterBlock == nil { + return r.readFilterBlockCached(r.filterBH, fillCache) + } + return r.filterBlock, util.NoopReleaser{}, nil +} + +func (r *Reader) newBlockIter(b *block, bReleaser util.Releaser, slice *util.Range, inclLimit bool) *blockIter { + bi := &blockIter{ + tr: r, + block: b, + blockReleaser: bReleaser, + // Valid key should never be nil. + key: make([]byte, 0), + dir: dirSOI, + riStart: 0, + riLimit: b.restartsLen, + offsetStart: 0, + offsetRealStart: 0, + offsetLimit: b.restartsOffset, + } + if slice != nil { + if slice.Start != nil { + if bi.Seek(slice.Start) { + bi.riStart = b.restartIndex(bi.restartIndex, b.restartsLen, bi.prevOffset) + bi.offsetStart = b.restartOffset(bi.riStart) + bi.offsetRealStart = bi.prevOffset + } else { + bi.riStart = b.restartsLen + bi.offsetStart = b.restartsOffset + bi.offsetRealStart = b.restartsOffset + } + } + if slice.Limit != nil { + if bi.Seek(slice.Limit) && (!inclLimit || bi.Next()) { + bi.offsetLimit = bi.prevOffset + bi.riLimit = bi.restartIndex + 1 + } + } + bi.reset() + if bi.offsetStart > bi.offsetLimit { + bi.sErr(errors.New("leveldb/table: invalid slice range")) + } + } + return bi +} + +func (r *Reader) getDataIter(dataBH blockHandle, slice *util.Range, verifyChecksum, fillCache bool) iterator.Iterator { + b, rel, err := r.readBlockCached(dataBH, verifyChecksum, fillCache) + if err != nil { + return iterator.NewEmptyIterator(err) + } + return r.newBlockIter(b, rel, slice, false) +} + +func (r *Reader) getDataIterErr(dataBH blockHandle, slice *util.Range, verifyChecksum, fillCache bool) iterator.Iterator { + r.mu.RLock() + defer r.mu.RUnlock() + + if r.err != nil { + return iterator.NewEmptyIterator(r.err) + } + + return r.getDataIter(dataBH, slice, verifyChecksum, fillCache) +} + +// NewIterator creates an iterator from the table. +// +// Slice allows slicing the iterator to only contains keys in the given +// range. A nil Range.Start is treated as a key before all keys in the +// table. And a nil Range.Limit is treated as a key after all keys in +// the table. +// +// The returned iterator is not goroutine-safe and should be released +// when not used. +// +// Also read Iterator documentation of the leveldb/iterator package. +func (r *Reader) NewIterator(slice *util.Range, ro *opt.ReadOptions) iterator.Iterator { + r.mu.RLock() + defer r.mu.RUnlock() + + if r.err != nil { + return iterator.NewEmptyIterator(r.err) + } + + fillCache := !ro.GetDontFillCache() + indexBlock, rel, err := r.getIndexBlock(fillCache) + if err != nil { + return iterator.NewEmptyIterator(err) + } + index := &indexIter{ + blockIter: r.newBlockIter(indexBlock, rel, slice, true), + tr: r, + slice: slice, + fillCache: !ro.GetDontFillCache(), + } + return iterator.NewIndexedIterator(index, opt.GetStrict(r.o, ro, opt.StrictReader)) +} + +func (r *Reader) find(key []byte, filtered bool, ro *opt.ReadOptions, noValue bool) (rkey, value []byte, err error) { + r.mu.RLock() + defer r.mu.RUnlock() + + if r.err != nil { + err = r.err + return + } + + indexBlock, rel, err := r.getIndexBlock(true) + if err != nil { + return + } + defer rel.Release() + + index := r.newBlockIter(indexBlock, nil, nil, true) + defer index.Release() + if !index.Seek(key) { + err = index.Error() + if err == nil { + err = ErrNotFound + } + return + } + dataBH, n := decodeBlockHandle(index.Value()) + if n == 0 { + r.err = r.newErrCorruptedBH(r.indexBH, "bad data block handle") + return + } + if filtered && r.filter != nil { + filterBlock, frel, ferr := r.getFilterBlock(true) + if ferr == nil { + if !filterBlock.contains(r.filter, dataBH.offset, key) { + frel.Release() + return nil, nil, ErrNotFound + } + frel.Release() + } else if !errors.IsCorrupted(ferr) { + err = ferr + return + } + } + data := r.getDataIter(dataBH, nil, r.verifyChecksum, !ro.GetDontFillCache()) + defer data.Release() + if !data.Seek(key) { + err = data.Error() + if err == nil { + err = ErrNotFound + } + return + } + // Don't use block buffer, no need to copy the buffer. + rkey = data.Key() + if !noValue { + if r.bpool == nil { + value = data.Value() + } else { + // Use block buffer, and since the buffer will be recycled, the buffer + // need to be copied. + value = append([]byte{}, data.Value()...) + } + } + return +} + +// Find finds key/value pair whose key is greater than or equal to the +// given key. It returns ErrNotFound if the table doesn't contain +// such pair. +// If filtered is true then the nearest 'block' will be checked against +// 'filter data' (if present) and will immediately return ErrNotFound if +// 'filter data' indicates that such pair doesn't exist. +// +// The caller may modify the contents of the returned slice as it is its +// own copy. +// It is safe to modify the contents of the argument after Find returns. +func (r *Reader) Find(key []byte, filtered bool, ro *opt.ReadOptions) (rkey, value []byte, err error) { + return r.find(key, filtered, ro, false) +} + +// Find finds key that is greater than or equal to the given key. +// It returns ErrNotFound if the table doesn't contain such key. +// If filtered is true then the nearest 'block' will be checked against +// 'filter data' (if present) and will immediately return ErrNotFound if +// 'filter data' indicates that such key doesn't exist. +// +// The caller may modify the contents of the returned slice as it is its +// own copy. +// It is safe to modify the contents of the argument after Find returns. +func (r *Reader) FindKey(key []byte, filtered bool, ro *opt.ReadOptions) (rkey []byte, err error) { + rkey, _, err = r.find(key, filtered, ro, true) + return +} + +// Get gets the value for the given key. It returns errors.ErrNotFound +// if the table does not contain the key. +// +// The caller may modify the contents of the returned slice as it is its +// own copy. +// It is safe to modify the contents of the argument after Find returns. +func (r *Reader) Get(key []byte, ro *opt.ReadOptions) (value []byte, err error) { + r.mu.RLock() + defer r.mu.RUnlock() + + if r.err != nil { + err = r.err + return + } + + rkey, value, err := r.find(key, false, ro, false) + if err == nil && r.cmp.Compare(rkey, key) != 0 { + value = nil + err = ErrNotFound + } + return +} + +// OffsetOf returns approximate offset for the given key. +// +// It is safe to modify the contents of the argument after Get returns. +func (r *Reader) OffsetOf(key []byte) (offset int64, err error) { + r.mu.RLock() + defer r.mu.RUnlock() + + if r.err != nil { + err = r.err + return + } + + indexBlock, rel, err := r.readBlockCached(r.indexBH, true, true) + if err != nil { + return + } + defer rel.Release() + + index := r.newBlockIter(indexBlock, nil, nil, true) + defer index.Release() + if index.Seek(key) { + dataBH, n := decodeBlockHandle(index.Value()) + if n == 0 { + r.err = r.newErrCorruptedBH(r.indexBH, "bad data block handle") + return + } + offset = int64(dataBH.offset) + return + } + err = index.Error() + if err == nil { + offset = r.dataEnd + } + return +} + +// Release implements util.Releaser. +// It also close the file if it is an io.Closer. +func (r *Reader) Release() { + r.mu.Lock() + defer r.mu.Unlock() + + if closer, ok := r.reader.(io.Closer); ok { + closer.Close() + } + if r.indexBlock != nil { + r.indexBlock.Release() + r.indexBlock = nil + } + if r.filterBlock != nil { + r.filterBlock.Release() + r.filterBlock = nil + } + r.reader = nil + r.cache = nil + r.bpool = nil + r.err = ErrReaderReleased +} + +// NewReader creates a new initialized table reader for the file. +// The fi, cache and bpool is optional and can be nil. +// +// The returned table reader instance is goroutine-safe. +func NewReader(f io.ReaderAt, size int64, fd storage.FileDesc, cache *cache.NamespaceGetter, bpool *util.BufferPool, o *opt.Options) (*Reader, error) { + if f == nil { + return nil, errors.New("leveldb/table: nil file") + } + + r := &Reader{ + fd: fd, + reader: f, + cache: cache, + bpool: bpool, + o: o, + cmp: o.GetComparer(), + verifyChecksum: o.GetStrict(opt.StrictBlockChecksum), + } + + if size < footerLen { + r.err = r.newErrCorrupted(0, size, "table", "too small") + return r, nil + } + + footerPos := size - footerLen + var footer [footerLen]byte + if _, err := r.reader.ReadAt(footer[:], footerPos); err != nil && err != io.EOF { + return nil, err + } + if string(footer[footerLen-len(magic):footerLen]) != magic { + r.err = r.newErrCorrupted(footerPos, footerLen, "table-footer", "bad magic number") + return r, nil + } + + var n int + // Decode the metaindex block handle. + r.metaBH, n = decodeBlockHandle(footer[:]) + if n == 0 { + r.err = r.newErrCorrupted(footerPos, footerLen, "table-footer", "bad metaindex block handle") + return r, nil + } + + // Decode the index block handle. + r.indexBH, n = decodeBlockHandle(footer[n:]) + if n == 0 { + r.err = r.newErrCorrupted(footerPos, footerLen, "table-footer", "bad index block handle") + return r, nil + } + + // Read metaindex block. + metaBlock, err := r.readBlock(r.metaBH, true) + if err != nil { + if errors.IsCorrupted(err) { + r.err = err + return r, nil + } else { + return nil, err + } + } + + // Set data end. + r.dataEnd = int64(r.metaBH.offset) + + // Read metaindex. + metaIter := r.newBlockIter(metaBlock, nil, nil, true) + for metaIter.Next() { + key := string(metaIter.Key()) + if !strings.HasPrefix(key, "filter.") { + continue + } + fn := key[7:] + if f0 := o.GetFilter(); f0 != nil && f0.Name() == fn { + r.filter = f0 + } else { + for _, f0 := range o.GetAltFilters() { + if f0.Name() == fn { + r.filter = f0 + break + } + } + } + if r.filter != nil { + filterBH, n := decodeBlockHandle(metaIter.Value()) + if n == 0 { + continue + } + r.filterBH = filterBH + // Update data end. + r.dataEnd = int64(filterBH.offset) + break + } + } + metaIter.Release() + metaBlock.Release() + + // Cache index and filter block locally, since we don't have global cache. + if cache == nil { + r.indexBlock, err = r.readBlock(r.indexBH, true) + if err != nil { + if errors.IsCorrupted(err) { + r.err = err + return r, nil + } else { + return nil, err + } + } + if r.filter != nil { + r.filterBlock, err = r.readFilterBlock(r.filterBH) + if err != nil { + if !errors.IsCorrupted(err) { + return nil, err + } + + // Don't use filter then. + r.filter = nil + } + } + } + + return r, nil +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/table/table.go b/vendor/github.com/syndtr/goleveldb/leveldb/table/table.go new file mode 100644 index 000000000..beacdc1f0 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/table/table.go @@ -0,0 +1,177 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Package table allows read and write sorted key/value. +package table + +import ( + "encoding/binary" +) + +/* +Table: + +Table is consist of one or more data blocks, an optional filter block +a metaindex block, an index block and a table footer. Metaindex block +is a special block used to keep parameters of the table, such as filter +block name and its block handle. Index block is a special block used to +keep record of data blocks offset and length, index block use one as +restart interval. The key used by index block are the last key of preceding +block, shorter separator of adjacent blocks or shorter successor of the +last key of the last block. Filter block is an optional block contains +sequence of filter data generated by a filter generator. + +Table data structure: + + optional + / + +--------------+--------------+--------------+------+-------+-----------------+-------------+--------+ + | data block 1 | ... | data block n | filter block | metaindex block | index block | footer | + +--------------+--------------+--------------+--------------+-----------------+-------------+--------+ + + Each block followed by a 5-bytes trailer contains compression type and checksum. + +Table block trailer: + + +---------------------------+-------------------+ + | compression type (1-byte) | checksum (4-byte) | + +---------------------------+-------------------+ + + The checksum is a CRC-32 computed using Castagnoli's polynomial. Compression + type also included in the checksum. + +Table footer: + + +------------------- 40-bytes -------------------+ + / \ + +------------------------+--------------------+------+-----------------+ + | metaindex block handle / index block handle / ---- | magic (8-bytes) | + +------------------------+--------------------+------+-----------------+ + + The magic are first 64-bit of SHA-1 sum of "http://code.google.com/p/leveldb/". + +NOTE: All fixed-length integer are little-endian. +*/ + +/* +Block: + +Block is consist of one or more key/value entries and a block trailer. +Block entry shares key prefix with its preceding key until a restart +point reached. A block should contains at least one restart point. +First restart point are always zero. + +Block data structure: + + + restart point + restart point (depends on restart interval) + / / + +---------------+---------------+---------------+---------------+---------+ + | block entry 1 | block entry 2 | ... | block entry n | trailer | + +---------------+---------------+---------------+---------------+---------+ + +Key/value entry: + + +---- key len ----+ + / \ + +-------+---------+-----------+---------+--------------------+--------------+----------------+ + | shared (varint) | not shared (varint) | value len (varint) | key (varlen) | value (varlen) | + +-----------------+---------------------+--------------------+--------------+----------------+ + + Block entry shares key prefix with its preceding key: + Conditions: + restart_interval=2 + entry one : key=deck,value=v1 + entry two : key=dock,value=v2 + entry three: key=duck,value=v3 + The entries will be encoded as follow: + + + restart point (offset=0) + restart point (offset=16) + / / + +-----+-----+-----+----------+--------+-----+-----+-----+---------+--------+-----+-----+-----+----------+--------+ + | 0 | 4 | 2 | "deck" | "v1" | 1 | 3 | 2 | "ock" | "v2" | 0 | 4 | 2 | "duck" | "v3" | + +-----+-----+-----+----------+--------+-----+-----+-----+---------+--------+-----+-----+-----+----------+--------+ + \ / \ / \ / + +----------- entry one -----------+ +----------- entry two ----------+ +---------- entry three ----------+ + + The block trailer will contains two restart points: + + +------------+-----------+--------+ + | 0 | 16 | 2 | + +------------+-----------+---+----+ + \ / \ + +-- restart points --+ + restart points length + +Block trailer: + + +-- 4-bytes --+ + / \ + +-----------------+-----------------+-----------------+------------------------------+ + | restart point 1 | .... | restart point n | restart points len (4-bytes) | + +-----------------+-----------------+-----------------+------------------------------+ + + +NOTE: All fixed-length integer are little-endian. +*/ + +/* +Filter block: + +Filter block consist of one or more filter data and a filter block trailer. +The trailer contains filter data offsets, a trailer offset and a 1-byte base Lg. + +Filter block data structure: + + + offset 1 + offset 2 + offset n + trailer offset + / / / / + +---------------+---------------+---------------+---------+ + | filter data 1 | ... | filter data n | trailer | + +---------------+---------------+---------------+---------+ + +Filter block trailer: + + +- 4-bytes -+ + / \ + +---------------+---------------+---------------+-------------------------------+------------------+ + | data 1 offset | .... | data n offset | data-offsets offset (4-bytes) | base Lg (1-byte) | + +-------------- +---------------+---------------+-------------------------------+------------------+ + + +NOTE: All fixed-length integer are little-endian. +*/ + +const ( + blockTrailerLen = 5 + footerLen = 48 + + magic = "\x57\xfb\x80\x8b\x24\x75\x47\xdb" + + // The block type gives the per-block compression format. + // These constants are part of the file format and should not be changed. + blockTypeNoCompression = 0 + blockTypeSnappyCompression = 1 + + // Generate new filter every 2KB of data + filterBaseLg = 11 + filterBase = 1 << filterBaseLg +) + +type blockHandle struct { + offset, length uint64 +} + +func decodeBlockHandle(src []byte) (blockHandle, int) { + offset, n := binary.Uvarint(src) + length, m := binary.Uvarint(src[n:]) + if n == 0 || m == 0 { + return blockHandle{}, 0 + } + return blockHandle{offset, length}, n + m +} + +func encodeBlockHandle(dst []byte, b blockHandle) int { + n := binary.PutUvarint(dst, b.offset) + m := binary.PutUvarint(dst[n:], b.length) + return n + m +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/table/writer.go b/vendor/github.com/syndtr/goleveldb/leveldb/table/writer.go new file mode 100644 index 000000000..274dee6da --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/table/writer.go @@ -0,0 +1,375 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package table + +import ( + "encoding/binary" + "errors" + "fmt" + "io" + + "github.com/golang/snappy" + + "github.com/syndtr/goleveldb/leveldb/comparer" + "github.com/syndtr/goleveldb/leveldb/filter" + "github.com/syndtr/goleveldb/leveldb/opt" + "github.com/syndtr/goleveldb/leveldb/util" +) + +func sharedPrefixLen(a, b []byte) int { + i, n := 0, len(a) + if n > len(b) { + n = len(b) + } + for i < n && a[i] == b[i] { + i++ + } + return i +} + +type blockWriter struct { + restartInterval int + buf util.Buffer + nEntries int + prevKey []byte + restarts []uint32 + scratch []byte +} + +func (w *blockWriter) append(key, value []byte) { + nShared := 0 + if w.nEntries%w.restartInterval == 0 { + w.restarts = append(w.restarts, uint32(w.buf.Len())) + } else { + nShared = sharedPrefixLen(w.prevKey, key) + } + n := binary.PutUvarint(w.scratch[0:], uint64(nShared)) + n += binary.PutUvarint(w.scratch[n:], uint64(len(key)-nShared)) + n += binary.PutUvarint(w.scratch[n:], uint64(len(value))) + w.buf.Write(w.scratch[:n]) + w.buf.Write(key[nShared:]) + w.buf.Write(value) + w.prevKey = append(w.prevKey[:0], key...) + w.nEntries++ +} + +func (w *blockWriter) finish() { + // Write restarts entry. + if w.nEntries == 0 { + // Must have at least one restart entry. + w.restarts = append(w.restarts, 0) + } + w.restarts = append(w.restarts, uint32(len(w.restarts))) + for _, x := range w.restarts { + buf4 := w.buf.Alloc(4) + binary.LittleEndian.PutUint32(buf4, x) + } +} + +func (w *blockWriter) reset() { + w.buf.Reset() + w.nEntries = 0 + w.restarts = w.restarts[:0] +} + +func (w *blockWriter) bytesLen() int { + restartsLen := len(w.restarts) + if restartsLen == 0 { + restartsLen = 1 + } + return w.buf.Len() + 4*restartsLen + 4 +} + +type filterWriter struct { + generator filter.FilterGenerator + buf util.Buffer + nKeys int + offsets []uint32 +} + +func (w *filterWriter) add(key []byte) { + if w.generator == nil { + return + } + w.generator.Add(key) + w.nKeys++ +} + +func (w *filterWriter) flush(offset uint64) { + if w.generator == nil { + return + } + for x := int(offset / filterBase); x > len(w.offsets); { + w.generate() + } +} + +func (w *filterWriter) finish() { + if w.generator == nil { + return + } + // Generate last keys. + + if w.nKeys > 0 { + w.generate() + } + w.offsets = append(w.offsets, uint32(w.buf.Len())) + for _, x := range w.offsets { + buf4 := w.buf.Alloc(4) + binary.LittleEndian.PutUint32(buf4, x) + } + w.buf.WriteByte(filterBaseLg) +} + +func (w *filterWriter) generate() { + // Record offset. + w.offsets = append(w.offsets, uint32(w.buf.Len())) + // Generate filters. + if w.nKeys > 0 { + w.generator.Generate(&w.buf) + w.nKeys = 0 + } +} + +// Writer is a table writer. +type Writer struct { + writer io.Writer + err error + // Options + cmp comparer.Comparer + filter filter.Filter + compression opt.Compression + blockSize int + + dataBlock blockWriter + indexBlock blockWriter + filterBlock filterWriter + pendingBH blockHandle + offset uint64 + nEntries int + // Scratch allocated enough for 5 uvarint. Block writer should not use + // first 20-bytes since it will be used to encode block handle, which + // then passed to the block writer itself. + scratch [50]byte + comparerScratch []byte + compressionScratch []byte +} + +func (w *Writer) writeBlock(buf *util.Buffer, compression opt.Compression) (bh blockHandle, err error) { + // Compress the buffer if necessary. + var b []byte + if compression == opt.SnappyCompression { + // Allocate scratch enough for compression and block trailer. + if n := snappy.MaxEncodedLen(buf.Len()) + blockTrailerLen; len(w.compressionScratch) < n { + w.compressionScratch = make([]byte, n) + } + compressed := snappy.Encode(w.compressionScratch, buf.Bytes()) + n := len(compressed) + b = compressed[:n+blockTrailerLen] + b[n] = blockTypeSnappyCompression + } else { + tmp := buf.Alloc(blockTrailerLen) + tmp[0] = blockTypeNoCompression + b = buf.Bytes() + } + + // Calculate the checksum. + n := len(b) - 4 + checksum := util.NewCRC(b[:n]).Value() + binary.LittleEndian.PutUint32(b[n:], checksum) + + // Write the buffer to the file. + _, err = w.writer.Write(b) + if err != nil { + return + } + bh = blockHandle{w.offset, uint64(len(b) - blockTrailerLen)} + w.offset += uint64(len(b)) + return +} + +func (w *Writer) flushPendingBH(key []byte) { + if w.pendingBH.length == 0 { + return + } + var separator []byte + if len(key) == 0 { + separator = w.cmp.Successor(w.comparerScratch[:0], w.dataBlock.prevKey) + } else { + separator = w.cmp.Separator(w.comparerScratch[:0], w.dataBlock.prevKey, key) + } + if separator == nil { + separator = w.dataBlock.prevKey + } else { + w.comparerScratch = separator + } + n := encodeBlockHandle(w.scratch[:20], w.pendingBH) + // Append the block handle to the index block. + w.indexBlock.append(separator, w.scratch[:n]) + // Reset prev key of the data block. + w.dataBlock.prevKey = w.dataBlock.prevKey[:0] + // Clear pending block handle. + w.pendingBH = blockHandle{} +} + +func (w *Writer) finishBlock() error { + w.dataBlock.finish() + bh, err := w.writeBlock(&w.dataBlock.buf, w.compression) + if err != nil { + return err + } + w.pendingBH = bh + // Reset the data block. + w.dataBlock.reset() + // Flush the filter block. + w.filterBlock.flush(w.offset) + return nil +} + +// Append appends key/value pair to the table. The keys passed must +// be in increasing order. +// +// It is safe to modify the contents of the arguments after Append returns. +func (w *Writer) Append(key, value []byte) error { + if w.err != nil { + return w.err + } + if w.nEntries > 0 && w.cmp.Compare(w.dataBlock.prevKey, key) >= 0 { + w.err = fmt.Errorf("leveldb/table: Writer: keys are not in increasing order: %q, %q", w.dataBlock.prevKey, key) + return w.err + } + + w.flushPendingBH(key) + // Append key/value pair to the data block. + w.dataBlock.append(key, value) + // Add key to the filter block. + w.filterBlock.add(key) + + // Finish the data block if block size target reached. + if w.dataBlock.bytesLen() >= w.blockSize { + if err := w.finishBlock(); err != nil { + w.err = err + return w.err + } + } + w.nEntries++ + return nil +} + +// BlocksLen returns number of blocks written so far. +func (w *Writer) BlocksLen() int { + n := w.indexBlock.nEntries + if w.pendingBH.length > 0 { + // Includes the pending block. + n++ + } + return n +} + +// EntriesLen returns number of entries added so far. +func (w *Writer) EntriesLen() int { + return w.nEntries +} + +// BytesLen returns number of bytes written so far. +func (w *Writer) BytesLen() int { + return int(w.offset) +} + +// Close will finalize the table. Calling Append is not possible +// after Close, but calling BlocksLen, EntriesLen and BytesLen +// is still possible. +func (w *Writer) Close() error { + if w.err != nil { + return w.err + } + + // Write the last data block. Or empty data block if there + // aren't any data blocks at all. + if w.dataBlock.nEntries > 0 || w.nEntries == 0 { + if err := w.finishBlock(); err != nil { + w.err = err + return w.err + } + } + w.flushPendingBH(nil) + + // Write the filter block. + var filterBH blockHandle + w.filterBlock.finish() + if buf := &w.filterBlock.buf; buf.Len() > 0 { + filterBH, w.err = w.writeBlock(buf, opt.NoCompression) + if w.err != nil { + return w.err + } + } + + // Write the metaindex block. + if filterBH.length > 0 { + key := []byte("filter." + w.filter.Name()) + n := encodeBlockHandle(w.scratch[:20], filterBH) + w.dataBlock.append(key, w.scratch[:n]) + } + w.dataBlock.finish() + metaindexBH, err := w.writeBlock(&w.dataBlock.buf, w.compression) + if err != nil { + w.err = err + return w.err + } + + // Write the index block. + w.indexBlock.finish() + indexBH, err := w.writeBlock(&w.indexBlock.buf, w.compression) + if err != nil { + w.err = err + return w.err + } + + // Write the table footer. + footer := w.scratch[:footerLen] + for i := range footer { + footer[i] = 0 + } + n := encodeBlockHandle(footer, metaindexBH) + encodeBlockHandle(footer[n:], indexBH) + copy(footer[footerLen-len(magic):], magic) + if _, err := w.writer.Write(footer); err != nil { + w.err = err + return w.err + } + w.offset += footerLen + + w.err = errors.New("leveldb/table: writer is closed") + return nil +} + +// NewWriter creates a new initialized table writer for the file. +// +// Table writer is not goroutine-safe. +func NewWriter(f io.Writer, o *opt.Options) *Writer { + w := &Writer{ + writer: f, + cmp: o.GetComparer(), + filter: o.GetFilter(), + compression: o.GetCompression(), + blockSize: o.GetBlockSize(), + comparerScratch: make([]byte, 0), + } + // data block + w.dataBlock.restartInterval = o.GetBlockRestartInterval() + // The first 20-bytes are used for encoding block handle. + w.dataBlock.scratch = w.scratch[20:] + // index block + w.indexBlock.restartInterval = 1 + w.indexBlock.scratch = w.scratch[20:] + // filter block + if w.filter != nil { + w.filterBlock.generator = w.filter.NewGenerator() + w.filterBlock.flush(0) + } + return w +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/util.go b/vendor/github.com/syndtr/goleveldb/leveldb/util.go new file mode 100644 index 000000000..3b663d1cc --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/util.go @@ -0,0 +1,91 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "fmt" + "sort" + + "github.com/syndtr/goleveldb/leveldb/storage" +) + +func shorten(str string) string { + if len(str) <= 8 { + return str + } + return str[:3] + ".." + str[len(str)-3:] +} + +var bunits = [...]string{"", "Ki", "Mi", "Gi"} + +func shortenb(bytes int) string { + i := 0 + for ; bytes > 1024 && i < 4; i++ { + bytes /= 1024 + } + return fmt.Sprintf("%d%sB", bytes, bunits[i]) +} + +func sshortenb(bytes int) string { + if bytes == 0 { + return "~" + } + sign := "+" + if bytes < 0 { + sign = "-" + bytes *= -1 + } + i := 0 + for ; bytes > 1024 && i < 4; i++ { + bytes /= 1024 + } + return fmt.Sprintf("%s%d%sB", sign, bytes, bunits[i]) +} + +func sint(x int) string { + if x == 0 { + return "~" + } + sign := "+" + if x < 0 { + sign = "-" + x *= -1 + } + return fmt.Sprintf("%s%d", sign, x) +} + +func minInt(a, b int) int { + if a < b { + return a + } + return b +} + +func maxInt(a, b int) int { + if a > b { + return a + } + return b +} + +type fdSorter []storage.FileDesc + +func (p fdSorter) Len() int { + return len(p) +} + +func (p fdSorter) Less(i, j int) bool { + return p[i].Num < p[j].Num +} + +func (p fdSorter) Swap(i, j int) { + p[i], p[j] = p[j], p[i] +} + +func sortFds(fds []storage.FileDesc) { + sort.Sort(fdSorter(fds)) +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/util/buffer.go b/vendor/github.com/syndtr/goleveldb/leveldb/util/buffer.go new file mode 100644 index 000000000..21de24255 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/util/buffer.go @@ -0,0 +1,293 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package util + +// This a copy of Go std bytes.Buffer with some modification +// and some features stripped. + +import ( + "bytes" + "io" +) + +// A Buffer is a variable-sized buffer of bytes with Read and Write methods. +// The zero value for Buffer is an empty buffer ready to use. +type Buffer struct { + buf []byte // contents are the bytes buf[off : len(buf)] + off int // read at &buf[off], write at &buf[len(buf)] + bootstrap [64]byte // memory to hold first slice; helps small buffers (Printf) avoid allocation. +} + +// Bytes returns a slice of the contents of the unread portion of the buffer; +// len(b.Bytes()) == b.Len(). If the caller changes the contents of the +// returned slice, the contents of the buffer will change provided there +// are no intervening method calls on the Buffer. +func (b *Buffer) Bytes() []byte { return b.buf[b.off:] } + +// String returns the contents of the unread portion of the buffer +// as a string. If the Buffer is a nil pointer, it returns "". +func (b *Buffer) String() string { + if b == nil { + // Special case, useful in debugging. + return "" + } + return string(b.buf[b.off:]) +} + +// Len returns the number of bytes of the unread portion of the buffer; +// b.Len() == len(b.Bytes()). +func (b *Buffer) Len() int { return len(b.buf) - b.off } + +// Truncate discards all but the first n unread bytes from the buffer. +// It panics if n is negative or greater than the length of the buffer. +func (b *Buffer) Truncate(n int) { + switch { + case n < 0 || n > b.Len(): + panic("leveldb/util.Buffer: truncation out of range") + case n == 0: + // Reuse buffer space. + b.off = 0 + } + b.buf = b.buf[0 : b.off+n] +} + +// Reset resets the buffer so it has no content. +// b.Reset() is the same as b.Truncate(0). +func (b *Buffer) Reset() { b.Truncate(0) } + +// grow grows the buffer to guarantee space for n more bytes. +// It returns the index where bytes should be written. +// If the buffer can't grow it will panic with bytes.ErrTooLarge. +func (b *Buffer) grow(n int) int { + m := b.Len() + // If buffer is empty, reset to recover space. + if m == 0 && b.off != 0 { + b.Truncate(0) + } + if len(b.buf)+n > cap(b.buf) { + var buf []byte + if b.buf == nil && n <= len(b.bootstrap) { + buf = b.bootstrap[0:] + } else if m+n <= cap(b.buf)/2 { + // We can slide things down instead of allocating a new + // slice. We only need m+n <= cap(b.buf) to slide, but + // we instead let capacity get twice as large so we + // don't spend all our time copying. + copy(b.buf[:], b.buf[b.off:]) + buf = b.buf[:m] + } else { + // not enough space anywhere + buf = makeSlice(2*cap(b.buf) + n) + copy(buf, b.buf[b.off:]) + } + b.buf = buf + b.off = 0 + } + b.buf = b.buf[0 : b.off+m+n] + return b.off + m +} + +// Alloc allocs n bytes of slice from the buffer, growing the buffer as +// needed. If n is negative, Alloc will panic. +// If the buffer can't grow it will panic with bytes.ErrTooLarge. +func (b *Buffer) Alloc(n int) []byte { + if n < 0 { + panic("leveldb/util.Buffer.Alloc: negative count") + } + m := b.grow(n) + return b.buf[m:] +} + +// Grow grows the buffer's capacity, if necessary, to guarantee space for +// another n bytes. After Grow(n), at least n bytes can be written to the +// buffer without another allocation. +// If n is negative, Grow will panic. +// If the buffer can't grow it will panic with bytes.ErrTooLarge. +func (b *Buffer) Grow(n int) { + if n < 0 { + panic("leveldb/util.Buffer.Grow: negative count") + } + m := b.grow(n) + b.buf = b.buf[0:m] +} + +// Write appends the contents of p to the buffer, growing the buffer as +// needed. The return value n is the length of p; err is always nil. If the +// buffer becomes too large, Write will panic with bytes.ErrTooLarge. +func (b *Buffer) Write(p []byte) (n int, err error) { + m := b.grow(len(p)) + return copy(b.buf[m:], p), nil +} + +// MinRead is the minimum slice size passed to a Read call by +// Buffer.ReadFrom. As long as the Buffer has at least MinRead bytes beyond +// what is required to hold the contents of r, ReadFrom will not grow the +// underlying buffer. +const MinRead = 512 + +// ReadFrom reads data from r until EOF and appends it to the buffer, growing +// the buffer as needed. The return value n is the number of bytes read. Any +// error except io.EOF encountered during the read is also returned. If the +// buffer becomes too large, ReadFrom will panic with bytes.ErrTooLarge. +func (b *Buffer) ReadFrom(r io.Reader) (n int64, err error) { + // If buffer is empty, reset to recover space. + if b.off >= len(b.buf) { + b.Truncate(0) + } + for { + if free := cap(b.buf) - len(b.buf); free < MinRead { + // not enough space at end + newBuf := b.buf + if b.off+free < MinRead { + // not enough space using beginning of buffer; + // double buffer capacity + newBuf = makeSlice(2*cap(b.buf) + MinRead) + } + copy(newBuf, b.buf[b.off:]) + b.buf = newBuf[:len(b.buf)-b.off] + b.off = 0 + } + m, e := r.Read(b.buf[len(b.buf):cap(b.buf)]) + b.buf = b.buf[0 : len(b.buf)+m] + n += int64(m) + if e == io.EOF { + break + } + if e != nil { + return n, e + } + } + return n, nil // err is EOF, so return nil explicitly +} + +// makeSlice allocates a slice of size n. If the allocation fails, it panics +// with bytes.ErrTooLarge. +func makeSlice(n int) []byte { + // If the make fails, give a known error. + defer func() { + if recover() != nil { + panic(bytes.ErrTooLarge) + } + }() + return make([]byte, n) +} + +// WriteTo writes data to w until the buffer is drained or an error occurs. +// The return value n is the number of bytes written; it always fits into an +// int, but it is int64 to match the io.WriterTo interface. Any error +// encountered during the write is also returned. +func (b *Buffer) WriteTo(w io.Writer) (n int64, err error) { + if b.off < len(b.buf) { + nBytes := b.Len() + m, e := w.Write(b.buf[b.off:]) + if m > nBytes { + panic("leveldb/util.Buffer.WriteTo: invalid Write count") + } + b.off += m + n = int64(m) + if e != nil { + return n, e + } + // all bytes should have been written, by definition of + // Write method in io.Writer + if m != nBytes { + return n, io.ErrShortWrite + } + } + // Buffer is now empty; reset. + b.Truncate(0) + return +} + +// WriteByte appends the byte c to the buffer, growing the buffer as needed. +// The returned error is always nil, but is included to match bufio.Writer's +// WriteByte. If the buffer becomes too large, WriteByte will panic with +// bytes.ErrTooLarge. +func (b *Buffer) WriteByte(c byte) error { + m := b.grow(1) + b.buf[m] = c + return nil +} + +// Read reads the next len(p) bytes from the buffer or until the buffer +// is drained. The return value n is the number of bytes read. If the +// buffer has no data to return, err is io.EOF (unless len(p) is zero); +// otherwise it is nil. +func (b *Buffer) Read(p []byte) (n int, err error) { + if b.off >= len(b.buf) { + // Buffer is empty, reset to recover space. + b.Truncate(0) + if len(p) == 0 { + return + } + return 0, io.EOF + } + n = copy(p, b.buf[b.off:]) + b.off += n + return +} + +// Next returns a slice containing the next n bytes from the buffer, +// advancing the buffer as if the bytes had been returned by Read. +// If there are fewer than n bytes in the buffer, Next returns the entire buffer. +// The slice is only valid until the next call to a read or write method. +func (b *Buffer) Next(n int) []byte { + m := b.Len() + if n > m { + n = m + } + data := b.buf[b.off : b.off+n] + b.off += n + return data +} + +// ReadByte reads and returns the next byte from the buffer. +// If no byte is available, it returns error io.EOF. +func (b *Buffer) ReadByte() (c byte, err error) { + if b.off >= len(b.buf) { + // Buffer is empty, reset to recover space. + b.Truncate(0) + return 0, io.EOF + } + c = b.buf[b.off] + b.off++ + return c, nil +} + +// ReadBytes reads until the first occurrence of delim in the input, +// returning a slice containing the data up to and including the delimiter. +// If ReadBytes encounters an error before finding a delimiter, +// it returns the data read before the error and the error itself (often io.EOF). +// ReadBytes returns err != nil if and only if the returned data does not end in +// delim. +func (b *Buffer) ReadBytes(delim byte) (line []byte, err error) { + slice, err := b.readSlice(delim) + // return a copy of slice. The buffer's backing array may + // be overwritten by later calls. + line = append(line, slice...) + return +} + +// readSlice is like ReadBytes but returns a reference to internal buffer data. +func (b *Buffer) readSlice(delim byte) (line []byte, err error) { + i := bytes.IndexByte(b.buf[b.off:], delim) + end := b.off + i + 1 + if i < 0 { + end = len(b.buf) + err = io.EOF + } + line = b.buf[b.off:end] + b.off = end + return line, err +} + +// NewBuffer creates and initializes a new Buffer using buf as its initial +// contents. It is intended to prepare a Buffer to read existing data. It +// can also be used to size the internal buffer for writing. To do that, +// buf should have the desired capacity but a length of zero. +// +// In most cases, new(Buffer) (or just declaring a Buffer variable) is +// sufficient to initialize a Buffer. +func NewBuffer(buf []byte) *Buffer { return &Buffer{buf: buf} } diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/util/buffer_pool.go b/vendor/github.com/syndtr/goleveldb/leveldb/util/buffer_pool.go new file mode 100644 index 000000000..2f3db974a --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/util/buffer_pool.go @@ -0,0 +1,239 @@ +// Copyright (c) 2014, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package util + +import ( + "fmt" + "sync" + "sync/atomic" + "time" +) + +type buffer struct { + b []byte + miss int +} + +// BufferPool is a 'buffer pool'. +type BufferPool struct { + pool [6]chan []byte + size [5]uint32 + sizeMiss [5]uint32 + sizeHalf [5]uint32 + baseline [4]int + baseline0 int + + mu sync.RWMutex + closed bool + closeC chan struct{} + + get uint32 + put uint32 + half uint32 + less uint32 + equal uint32 + greater uint32 + miss uint32 +} + +func (p *BufferPool) poolNum(n int) int { + if n <= p.baseline0 && n > p.baseline0/2 { + return 0 + } + for i, x := range p.baseline { + if n <= x { + return i + 1 + } + } + return len(p.baseline) + 1 +} + +// Get returns buffer with length of n. +func (p *BufferPool) Get(n int) []byte { + if p == nil { + return make([]byte, n) + } + + p.mu.RLock() + defer p.mu.RUnlock() + + if p.closed { + return make([]byte, n) + } + + atomic.AddUint32(&p.get, 1) + + poolNum := p.poolNum(n) + pool := p.pool[poolNum] + if poolNum == 0 { + // Fast path. + select { + case b := <-pool: + switch { + case cap(b) > n: + if cap(b)-n >= n { + atomic.AddUint32(&p.half, 1) + select { + case pool <- b: + default: + } + return make([]byte, n) + } else { + atomic.AddUint32(&p.less, 1) + return b[:n] + } + case cap(b) == n: + atomic.AddUint32(&p.equal, 1) + return b[:n] + default: + atomic.AddUint32(&p.greater, 1) + } + default: + atomic.AddUint32(&p.miss, 1) + } + + return make([]byte, n, p.baseline0) + } else { + sizePtr := &p.size[poolNum-1] + + select { + case b := <-pool: + switch { + case cap(b) > n: + if cap(b)-n >= n { + atomic.AddUint32(&p.half, 1) + sizeHalfPtr := &p.sizeHalf[poolNum-1] + if atomic.AddUint32(sizeHalfPtr, 1) == 20 { + atomic.StoreUint32(sizePtr, uint32(cap(b)/2)) + atomic.StoreUint32(sizeHalfPtr, 0) + } else { + select { + case pool <- b: + default: + } + } + return make([]byte, n) + } else { + atomic.AddUint32(&p.less, 1) + return b[:n] + } + case cap(b) == n: + atomic.AddUint32(&p.equal, 1) + return b[:n] + default: + atomic.AddUint32(&p.greater, 1) + if uint32(cap(b)) >= atomic.LoadUint32(sizePtr) { + select { + case pool <- b: + default: + } + } + } + default: + atomic.AddUint32(&p.miss, 1) + } + + if size := atomic.LoadUint32(sizePtr); uint32(n) > size { + if size == 0 { + atomic.CompareAndSwapUint32(sizePtr, 0, uint32(n)) + } else { + sizeMissPtr := &p.sizeMiss[poolNum-1] + if atomic.AddUint32(sizeMissPtr, 1) == 20 { + atomic.StoreUint32(sizePtr, uint32(n)) + atomic.StoreUint32(sizeMissPtr, 0) + } + } + return make([]byte, n) + } else { + return make([]byte, n, size) + } + } +} + +// Put adds given buffer to the pool. +func (p *BufferPool) Put(b []byte) { + if p == nil { + return + } + + p.mu.RLock() + defer p.mu.RUnlock() + + if p.closed { + return + } + + atomic.AddUint32(&p.put, 1) + + pool := p.pool[p.poolNum(cap(b))] + select { + case pool <- b: + default: + } + +} + +func (p *BufferPool) Close() { + if p == nil { + return + } + + p.mu.Lock() + if !p.closed { + p.closed = true + p.closeC <- struct{}{} + } + p.mu.Unlock() +} + +func (p *BufferPool) String() string { + if p == nil { + return "" + } + + return fmt.Sprintf("BufferPool{B·%d Z·%v Zm·%v Zh·%v G·%d P·%d H·%d <·%d =·%d >·%d M·%d}", + p.baseline0, p.size, p.sizeMiss, p.sizeHalf, p.get, p.put, p.half, p.less, p.equal, p.greater, p.miss) +} + +func (p *BufferPool) drain() { + ticker := time.NewTicker(2 * time.Second) + defer ticker.Stop() + for { + select { + case <-ticker.C: + for _, ch := range p.pool { + select { + case <-ch: + default: + } + } + case <-p.closeC: + close(p.closeC) + for _, ch := range p.pool { + close(ch) + } + return + } + } +} + +// NewBufferPool creates a new initialized 'buffer pool'. +func NewBufferPool(baseline int) *BufferPool { + if baseline <= 0 { + panic("baseline can't be <= 0") + } + p := &BufferPool{ + baseline0: baseline, + baseline: [...]int{baseline / 4, baseline / 2, baseline * 2, baseline * 4}, + closeC: make(chan struct{}, 1), + } + for i, cap := range []int{2, 2, 4, 4, 2, 1} { + p.pool[i] = make(chan []byte, cap) + } + go p.drain() + return p +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/util/crc32.go b/vendor/github.com/syndtr/goleveldb/leveldb/util/crc32.go new file mode 100644 index 000000000..631c9d610 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/util/crc32.go @@ -0,0 +1,30 @@ +// Copyright 2011 The LevelDB-Go Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package util + +import ( + "hash/crc32" +) + +var table = crc32.MakeTable(crc32.Castagnoli) + +// CRC is a CRC-32 checksum computed using Castagnoli's polynomial. +type CRC uint32 + +// NewCRC creates a new crc based on the given bytes. +func NewCRC(b []byte) CRC { + return CRC(0).Update(b) +} + +// Update updates the crc with the given bytes. +func (c CRC) Update(b []byte) CRC { + return CRC(crc32.Update(uint32(c), table, b)) +} + +// Value returns a masked crc. +func (c CRC) Value() uint32 { + return uint32(c>>15|c<<17) + 0xa282ead8 +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/util/hash.go b/vendor/github.com/syndtr/goleveldb/leveldb/util/hash.go new file mode 100644 index 000000000..54903660f --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/util/hash.go @@ -0,0 +1,48 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package util + +import ( + "bytes" + "encoding/binary" +) + +// Hash return hash of the given data. +func Hash(data []byte, seed uint32) uint32 { + // Similar to murmur hash + var m uint32 = 0xc6a4a793 + var r uint32 = 24 + h := seed ^ (uint32(len(data)) * m) + + buf := bytes.NewBuffer(data) + for buf.Len() >= 4 { + var w uint32 + binary.Read(buf, binary.LittleEndian, &w) + h += w + h *= m + h ^= (h >> 16) + } + + rest := buf.Bytes() + switch len(rest) { + default: + panic("not reached") + case 3: + h += uint32(rest[2]) << 16 + fallthrough + case 2: + h += uint32(rest[1]) << 8 + fallthrough + case 1: + h += uint32(rest[0]) + h *= m + h ^= (h >> r) + case 0: + } + + return h +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/util/range.go b/vendor/github.com/syndtr/goleveldb/leveldb/util/range.go new file mode 100644 index 000000000..85159583d --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/util/range.go @@ -0,0 +1,32 @@ +// Copyright (c) 2014, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package util + +// Range is a key range. +type Range struct { + // Start of the key range, include in the range. + Start []byte + + // Limit of the key range, not include in the range. + Limit []byte +} + +// BytesPrefix returns key range that satisfy the given prefix. +// This only applicable for the standard 'bytes comparer'. +func BytesPrefix(prefix []byte) *Range { + var limit []byte + for i := len(prefix) - 1; i >= 0; i-- { + c := prefix[i] + if c < 0xff { + limit = make([]byte, i+1) + copy(limit, prefix) + limit[i] = c + 1 + break + } + } + return &Range{prefix, limit} +} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/util/util.go b/vendor/github.com/syndtr/goleveldb/leveldb/util/util.go new file mode 100644 index 000000000..f35976865 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/util/util.go @@ -0,0 +1,73 @@ +// Copyright (c) 2013, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Package util provides utilities used throughout leveldb. +package util + +import ( + "errors" +) + +var ( + ErrReleased = errors.New("leveldb: resource already relesed") + ErrHasReleaser = errors.New("leveldb: releaser already defined") +) + +// Releaser is the interface that wraps the basic Release method. +type Releaser interface { + // Release releases associated resources. Release should always success + // and can be called multipe times without causing error. + Release() +} + +// ReleaseSetter is the interface that wraps the basic SetReleaser method. +type ReleaseSetter interface { + // SetReleaser associates the given releaser to the resources. The + // releaser will be called once coresponding resources released. + // Calling SetReleaser with nil will clear the releaser. + // + // This will panic if a releaser already present or coresponding + // resource is already released. Releaser should be cleared first + // before assigned a new one. + SetReleaser(releaser Releaser) +} + +// BasicReleaser provides basic implementation of Releaser and ReleaseSetter. +type BasicReleaser struct { + releaser Releaser + released bool +} + +// Released returns whether Release method already called. +func (r *BasicReleaser) Released() bool { + return r.released +} + +// Release implements Releaser.Release. +func (r *BasicReleaser) Release() { + if !r.released { + if r.releaser != nil { + r.releaser.Release() + r.releaser = nil + } + r.released = true + } +} + +// SetReleaser implements ReleaseSetter.SetReleaser. +func (r *BasicReleaser) SetReleaser(releaser Releaser) { + if r.released { + panic(ErrReleased) + } + if r.releaser != nil && releaser != nil { + panic(ErrHasReleaser) + } + r.releaser = releaser +} + +type NoopReleaser struct{} + +func (NoopReleaser) Release() {} diff --git a/vendor/github.com/syndtr/goleveldb/leveldb/version.go b/vendor/github.com/syndtr/goleveldb/leveldb/version.go new file mode 100644 index 000000000..d274eeff2 --- /dev/null +++ b/vendor/github.com/syndtr/goleveldb/leveldb/version.go @@ -0,0 +1,519 @@ +// Copyright (c) 2012, Suryandaru Triandana +// All rights reserved. +// +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package leveldb + +import ( + "fmt" + "sync/atomic" + "unsafe" + + "github.com/syndtr/goleveldb/leveldb/iterator" + "github.com/syndtr/goleveldb/leveldb/opt" + "github.com/syndtr/goleveldb/leveldb/util" +) + +type tSet struct { + level int + table *tFile +} + +type version struct { + s *session + + levels []tFiles + + // Level that should be compacted next and its compaction score. + // Score < 1 means compaction is not strictly needed. These fields + // are initialized by computeCompaction() + cLevel int + cScore float64 + + cSeek unsafe.Pointer + + ref int + // Succeeding version. + next *version +} + +func newVersion(s *session) *version { + return &version{s: s} +} + +func (v *version) releaseNB() { + v.ref-- + if v.ref > 0 { + return + } + if v.ref < 0 { + panic("negative version ref") + } + + nextTables := make(map[int64]bool) + for _, tt := range v.next.levels { + for _, t := range tt { + num := t.fd.Num + nextTables[num] = true + } + } + + for _, tt := range v.levels { + for _, t := range tt { + num := t.fd.Num + if _, ok := nextTables[num]; !ok { + v.s.tops.remove(t) + } + } + } + + v.next.releaseNB() + v.next = nil +} + +func (v *version) release() { + v.s.vmu.Lock() + v.releaseNB() + v.s.vmu.Unlock() +} + +func (v *version) walkOverlapping(aux tFiles, ikey internalKey, f func(level int, t *tFile) bool, lf func(level int) bool) { + ukey := ikey.ukey() + + // Aux level. + if aux != nil { + for _, t := range aux { + if t.overlaps(v.s.icmp, ukey, ukey) { + if !f(-1, t) { + return + } + } + } + + if lf != nil && !lf(-1) { + return + } + } + + // Walk tables level-by-level. + for level, tables := range v.levels { + if len(tables) == 0 { + continue + } + + if level == 0 { + // Level-0 files may overlap each other. Find all files that + // overlap ukey. + for _, t := range tables { + if t.overlaps(v.s.icmp, ukey, ukey) { + if !f(level, t) { + return + } + } + } + } else { + if i := tables.searchMax(v.s.icmp, ikey); i < len(tables) { + t := tables[i] + if v.s.icmp.uCompare(ukey, t.imin.ukey()) >= 0 { + if !f(level, t) { + return + } + } + } + } + + if lf != nil && !lf(level) { + return + } + } +} + +func (v *version) get(aux tFiles, ikey internalKey, ro *opt.ReadOptions, noValue bool) (value []byte, tcomp bool, err error) { + ukey := ikey.ukey() + + var ( + tset *tSet + tseek bool + + // Level-0. + zfound bool + zseq uint64 + zkt keyType + zval []byte + ) + + err = ErrNotFound + + // Since entries never hop across level, finding key/value + // in smaller level make later levels irrelevant. + v.walkOverlapping(aux, ikey, func(level int, t *tFile) bool { + if level >= 0 && !tseek { + if tset == nil { + tset = &tSet{level, t} + } else { + tseek = true + } + } + + var ( + fikey, fval []byte + ferr error + ) + if noValue { + fikey, ferr = v.s.tops.findKey(t, ikey, ro) + } else { + fikey, fval, ferr = v.s.tops.find(t, ikey, ro) + } + + switch ferr { + case nil: + case ErrNotFound: + return true + default: + err = ferr + return false + } + + if fukey, fseq, fkt, fkerr := parseInternalKey(fikey); fkerr == nil { + if v.s.icmp.uCompare(ukey, fukey) == 0 { + // Level <= 0 may overlaps each-other. + if level <= 0 { + if fseq >= zseq { + zfound = true + zseq = fseq + zkt = fkt + zval = fval + } + } else { + switch fkt { + case keyTypeVal: + value = fval + err = nil + case keyTypeDel: + default: + panic("leveldb: invalid internalKey type") + } + return false + } + } + } else { + err = fkerr + return false + } + + return true + }, func(level int) bool { + if zfound { + switch zkt { + case keyTypeVal: + value = zval + err = nil + case keyTypeDel: + default: + panic("leveldb: invalid internalKey type") + } + return false + } + + return true + }) + + if tseek && tset.table.consumeSeek() <= 0 { + tcomp = atomic.CompareAndSwapPointer(&v.cSeek, nil, unsafe.Pointer(tset)) + } + + return +} + +func (v *version) sampleSeek(ikey internalKey) (tcomp bool) { + var tset *tSet + + v.walkOverlapping(nil, ikey, func(level int, t *tFile) bool { + if tset == nil { + tset = &tSet{level, t} + return true + } + if tset.table.consumeSeek() <= 0 { + tcomp = atomic.CompareAndSwapPointer(&v.cSeek, nil, unsafe.Pointer(tset)) + } + return false + }, nil) + + return +} + +func (v *version) getIterators(slice *util.Range, ro *opt.ReadOptions) (its []iterator.Iterator) { + strict := opt.GetStrict(v.s.o.Options, ro, opt.StrictReader) + for level, tables := range v.levels { + if level == 0 { + // Merge all level zero files together since they may overlap. + for _, t := range tables { + its = append(its, v.s.tops.newIterator(t, slice, ro)) + } + } else if len(tables) != 0 { + its = append(its, iterator.NewIndexedIterator(tables.newIndexIterator(v.s.tops, v.s.icmp, slice, ro), strict)) + } + } + return +} + +func (v *version) newStaging() *versionStaging { + return &versionStaging{base: v} +} + +// Spawn a new version based on this version. +func (v *version) spawn(r *sessionRecord) *version { + staging := v.newStaging() + staging.commit(r) + return staging.finish() +} + +func (v *version) fillRecord(r *sessionRecord) { + for level, tables := range v.levels { + for _, t := range tables { + r.addTableFile(level, t) + } + } +} + +func (v *version) tLen(level int) int { + if level < len(v.levels) { + return len(v.levels[level]) + } + return 0 +} + +func (v *version) offsetOf(ikey internalKey) (n int64, err error) { + for level, tables := range v.levels { + for _, t := range tables { + if v.s.icmp.Compare(t.imax, ikey) <= 0 { + // Entire file is before "ikey", so just add the file size + n += t.size + } else if v.s.icmp.Compare(t.imin, ikey) > 0 { + // Entire file is after "ikey", so ignore + if level > 0 { + // Files other than level 0 are sorted by meta->min, so + // no further files in this level will contain data for + // "ikey". + break + } + } else { + // "ikey" falls in the range for this table. Add the + // approximate offset of "ikey" within the table. + if m, err := v.s.tops.offsetOf(t, ikey); err == nil { + n += m + } else { + return 0, err + } + } + } + } + + return +} + +func (v *version) pickMemdbLevel(umin, umax []byte, maxLevel int) (level int) { + if maxLevel > 0 { + if len(v.levels) == 0 { + return maxLevel + } + if !v.levels[0].overlaps(v.s.icmp, umin, umax, true) { + var overlaps tFiles + for ; level < maxLevel; level++ { + if pLevel := level + 1; pLevel >= len(v.levels) { + return maxLevel + } else if v.levels[pLevel].overlaps(v.s.icmp, umin, umax, false) { + break + } + if gpLevel := level + 2; gpLevel < len(v.levels) { + overlaps = v.levels[gpLevel].getOverlaps(overlaps, v.s.icmp, umin, umax, false) + if overlaps.size() > int64(v.s.o.GetCompactionGPOverlaps(level)) { + break + } + } + } + } + } + return +} + +func (v *version) computeCompaction() { + // Precomputed best level for next compaction + bestLevel := int(-1) + bestScore := float64(-1) + + statFiles := make([]int, len(v.levels)) + statSizes := make([]string, len(v.levels)) + statScore := make([]string, len(v.levels)) + statTotSize := int64(0) + + for level, tables := range v.levels { + var score float64 + size := tables.size() + if level == 0 { + // We treat level-0 specially by bounding the number of files + // instead of number of bytes for two reasons: + // + // (1) With larger write-buffer sizes, it is nice not to do too + // many level-0 compaction. + // + // (2) The files in level-0 are merged on every read and + // therefore we wish to avoid too many files when the individual + // file size is small (perhaps because of a small write-buffer + // setting, or very high compression ratios, or lots of + // overwrites/deletions). + score = float64(len(tables)) / float64(v.s.o.GetCompactionL0Trigger()) + } else { + score = float64(size) / float64(v.s.o.GetCompactionTotalSize(level)) + } + + if score > bestScore { + bestLevel = level + bestScore = score + } + + statFiles[level] = len(tables) + statSizes[level] = shortenb(int(size)) + statScore[level] = fmt.Sprintf("%.2f", score) + statTotSize += size + } + + v.cLevel = bestLevel + v.cScore = bestScore + + v.s.logf("version@stat F·%v S·%s%v Sc·%v", statFiles, shortenb(int(statTotSize)), statSizes, statScore) +} + +func (v *version) needCompaction() bool { + return v.cScore >= 1 || atomic.LoadPointer(&v.cSeek) != nil +} + +type tablesScratch struct { + added map[int64]atRecord + deleted map[int64]struct{} +} + +type versionStaging struct { + base *version + levels []tablesScratch +} + +func (p *versionStaging) getScratch(level int) *tablesScratch { + if level >= len(p.levels) { + newLevels := make([]tablesScratch, level+1) + copy(newLevels, p.levels) + p.levels = newLevels + } + return &(p.levels[level]) +} + +func (p *versionStaging) commit(r *sessionRecord) { + // Deleted tables. + for _, r := range r.deletedTables { + scratch := p.getScratch(r.level) + if r.level < len(p.base.levels) && len(p.base.levels[r.level]) > 0 { + if scratch.deleted == nil { + scratch.deleted = make(map[int64]struct{}) + } + scratch.deleted[r.num] = struct{}{} + } + if scratch.added != nil { + delete(scratch.added, r.num) + } + } + + // New tables. + for _, r := range r.addedTables { + scratch := p.getScratch(r.level) + if scratch.added == nil { + scratch.added = make(map[int64]atRecord) + } + scratch.added[r.num] = r + if scratch.deleted != nil { + delete(scratch.deleted, r.num) + } + } +} + +func (p *versionStaging) finish() *version { + // Build new version. + nv := newVersion(p.base.s) + numLevel := len(p.levels) + if len(p.base.levels) > numLevel { + numLevel = len(p.base.levels) + } + nv.levels = make([]tFiles, numLevel) + for level := 0; level < numLevel; level++ { + var baseTabels tFiles + if level < len(p.base.levels) { + baseTabels = p.base.levels[level] + } + + if level < len(p.levels) { + scratch := p.levels[level] + + var nt tFiles + // Prealloc list if possible. + if n := len(baseTabels) + len(scratch.added) - len(scratch.deleted); n > 0 { + nt = make(tFiles, 0, n) + } + + // Base tables. + for _, t := range baseTabels { + if _, ok := scratch.deleted[t.fd.Num]; ok { + continue + } + if _, ok := scratch.added[t.fd.Num]; ok { + continue + } + nt = append(nt, t) + } + + // New tables. + for _, r := range scratch.added { + nt = append(nt, tableFileFromRecord(r)) + } + + if len(nt) != 0 { + // Sort tables. + if level == 0 { + nt.sortByNum() + } else { + nt.sortByKey(p.base.s.icmp) + } + + nv.levels[level] = nt + } + } else { + nv.levels[level] = baseTabels + } + } + + // Trim levels. + n := len(nv.levels) + for ; n > 0 && nv.levels[n-1] == nil; n-- { + } + nv.levels = nv.levels[:n] + + // Compute compaction score for new version. + nv.computeCompaction() + + return nv +} + +type versionReleaser struct { + v *version + once bool +} + +func (vr *versionReleaser) Release() { + v := vr.v + v.s.vmu.Lock() + if !vr.once { + v.releaseNB() + vr.once = true + } + v.s.vmu.Unlock() +} diff --git a/vendor/github.com/twinj/uuid/LICENSE b/vendor/github.com/twinj/uuid/LICENSE new file mode 100644 index 000000000..a92c1e08f --- /dev/null +++ b/vendor/github.com/twinj/uuid/LICENSE @@ -0,0 +1,20 @@ +Copyright (C) 2011 by Krzysztof Kowalik +Copyright (C) 2014 by Daniel Kemp Derivative work + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/vendor/github.com/twinj/uuid/README.md b/vendor/github.com/twinj/uuid/README.md new file mode 100644 index 000000000..40f9957d1 --- /dev/null +++ b/vendor/github.com/twinj/uuid/README.md @@ -0,0 +1,86 @@ +Go UUID implementation +======================== + +[![Build Status](https://travis-ci.org/twinj/uuid.png?branch=master)](https://travis-ci.org/twinj/uuid) +[![GoDoc](http://godoc.org/github.com/twinj/uuid?status.png)](http://godoc.org/github.com/twinj/uuid) + +This package provides RFC 4122 compliant UUIDs. +It will generate the following: + +* Version 1: based on timestamp and MAC address +* Version 3: based on MD5 hash +* Version 4: based on cryptographically secure random numbers +* Version 5: based on SHA-1 hash + +Functions NewV1, NewV3, NewV4, NewV5, New, NewHex and Parse() for generating versions 3, 4 +and 5 UUIDs are as specified in [RFC 4122](http://www.ietf.org/rfc/rfc4122.txt). + +# Requirements + +Go 1.4, 1.3, 1.2 and tip supported. + +# Recent Changes + +* Removed use of OS Thread locking and runtime package requirement +* Changed String() output to CleanHyphen to match the canonical standard +* Plenty of minor change and housekeeping +* Removed default saver and replaced with interface +* API changes to simplify use. +* Added formatting support for user defined formats +* Added support for Google App Engine +* Variant type bits are now set correctly +* Variant type can now be retrieved more efficiently +* New tests for variant setting to confirm correctness +* New tests added to confirm proper version setting +* Type UUID change to UUIDArray for V3-5 UUIDs and UUIDStruct added for V1 UUIDs +** These implement the BinaryMarshaller and BinaryUnmarshaller interfaces +* New was added to create a base UUID from a []byte slice - this uses UUIDArray +* ParseHex was renamed to ParseUUID +* NewHex now performs unsafe creation of UUID from a hex string +* NewV3 and NewV5 now take anything that implements the Stringer interface +* V1 UUIDs can now be created +* The printing format can be changed + +## Installation + +Use the `go` tool: + + $ go get github.com/twinj/uuid + +## Usage + +See [documentation and examples](http://godoc.org/github.com/twinj/uuid) +for more information. + + var config = uuid.StateSaverConfig{SaveReport: true, SaveSchedule: 30 * time.Minute} + uuid.SetupFileSystemStateSaver(config) + + u1 := uuid.NewV1() + uP, _ := uuid.Parse("6ba7b810-9dad-11d1-80b4-00c04fd430c8") + u3 := uuid.NewV3(uP, uuid.Name("test")) + u4 := uuid.NewV4() + fmt.Printf(print, u4.Version(), u4.Variant(), u4) + + u5 := uuid.NewV5(uuid.NamespaceURL, uuid.Name("test")) + + if uuid.Equal(u1, u3) { + fmt.Printf("Will never happen") + } + fmt.Printf(uuid.Formatter(u5, uuid.CurlyHyphen)) + + uuid.SwitchFormat(uuid.BracketHyphen) + +## Copyright + +This is a derivative work + +Orginal version from +Copyright (C) 2011 by Krzysztof Kowalik . +See [COPYING](https://github.com/nu7hatch/gouuid/tree/master/COPYING) +file for details. + +Also see: Algorithm details in [RFC 4122](http://www.ietf.org/rfc/rfc4122.txt). + +Copyright (C) 2014 twinj@github.com +See [LICENSE](https://github.com/twinj/uuid/tree/master/LICENSE) +file for details. diff --git a/vendor/github.com/twinj/uuid/array.go b/vendor/github.com/twinj/uuid/array.go new file mode 100644 index 000000000..add7e19be --- /dev/null +++ b/vendor/github.com/twinj/uuid/array.go @@ -0,0 +1,68 @@ +package uuid + +/**************** + * Date: 1/02/14 + * Time: 10:08 AM + ***************/ + +const ( + variantIndex = 8 + versionIndex = 6 +) + +// A clean UUID type for simpler UUID versions +type Array [length]byte + +func (Array) Size() int { + return length +} + +func (o Array) Version() int { + return int(o[versionIndex]) >> 4 +} + +func (o *Array) setVersion(pVersion int) { + o[versionIndex] &= 0x0F + o[versionIndex] |= byte(pVersion) << 4 +} + +func (o *Array) Variant() byte { + return variant(o[variantIndex]) +} + +func (o *Array) setVariant(pVariant byte) { + setVariant(&o[variantIndex], pVariant) +} + +func (o *Array) Unmarshal(pData []byte) { + copy(o[:], pData) +} + +func (o *Array) Bytes() []byte { + return o[:] +} + +func (o Array) String() string { + return formatter(&o, format) +} + +func (o Array) Format(pFormat string) string { + return formatter(&o, pFormat) +} + +// Set the three most significant bits (bits 0, 1 and 2) of the +// sequenceHiAndVariant equivalent in the array to ReservedRFC4122. +func (o *Array) setRFC4122Variant() { + o[variantIndex] &= 0x3F + o[variantIndex] |= ReservedRFC4122 +} + +// Marshals the UUID bytes into a slice +func (o *Array) MarshalBinary() ([]byte, error) { + return o.Bytes(), nil +} + +// Un-marshals the data bytes into the UUID. +func (o *Array) UnmarshalBinary(pData []byte) error { + return UnmarshalBinary(o, pData) +} diff --git a/vendor/github.com/twinj/uuid/rfc4122.go b/vendor/github.com/twinj/uuid/rfc4122.go new file mode 100644 index 000000000..64ef55613 --- /dev/null +++ b/vendor/github.com/twinj/uuid/rfc4122.go @@ -0,0 +1,146 @@ +package uuid + +/*************** + * Date: 14/02/14 + * Time: 7:44 PM + ***************/ + +import ( + "crypto/md5" + "crypto/rand" + "crypto/sha1" + "encoding/binary" + "log" + seed "math/rand" + "net" +) + +const ( + length = 16 + + // 3F used by RFC4122 although 1F works for all + variantSet = 0x3F + + // rather than using 0xC0 we use 0xE0 to retrieve the variant + // The result is the same for all other variants + // 0x80 and 0xA0 are used to identify RFC4122 compliance + variantGet = 0xE0 +) + +var ( + // nodeID is the default Namespace node + nodeId = []byte{ + // 00.192.79.212.48.200 + 0x00, 0xc0, 0x4f, 0xd4, 0x30, 0xc8, + } + // The following standard UUIDs are for use with V3 or V5 UUIDs. + NamespaceDNS = &Struct{0x6ba7b810, 0x9dad, 0x11d1, 0x80, 0xb4, nodeId, length} + NamespaceURL = &Struct{0x6ba7b811, 0x9dad, 0x11d1, 0x80, 0xb4, nodeId, length} + NamespaceOID = &Struct{0x6ba7b812, 0x9dad, 0x11d1, 0x80, 0xb4, nodeId, length} + NamespaceX500 = &Struct{0x6ba7b814, 0x9dad, 0x11d1, 0x80, 0xb4, nodeId, length} + + state State +) + +func init() { + seed.Seed((int64(timestamp())^int64(gregorianToUNIXOffset))*0x6ba7b814<<0x6ba7b812 | 1391463463) + state = State{ + randomNode: true, + randomSequence: true, + past: Timestamp((1391463463 * 10000000) + (100 * 10) + gregorianToUNIXOffset), + node: nodeId, + sequence: uint16(seed.Int()) & 0x3FFF, + saver: nil, + } +} + +// NewV1 will generate a new RFC4122 version 1 UUID +func NewV1() UUID { + state.Lock() + defer state.Unlock() + now := currentUUIDTimestamp() + state.read(now, currentUUIDNodeId()) + state.persist() + return formatV1(now, uint16(1), ReservedRFC4122, state.node) +} + +// NewV3 will generate a new RFC4122 version 3 UUID +// V3 is based on the MD5 hash of a namespace identifier UUID and +// any type which implements the UniqueName interface for the name. +// For strings and slices cast to a Name type +func NewV3(pNs UUID, pName UniqueName) UUID { + o := new(Array) + // Set all bits to MD5 hash generated from namespace and name. + Digest(o, pNs, pName, md5.New()) + o.setRFC4122Variant() + o.setVersion(3) + return o +} + +// NewV4 will generate a new RFC4122 version 4 UUID +// A cryptographically secure random UUID. +func NewV4() UUID { + o := new(Array) + // Read random values (or pseudo-randomly) into Array type. + _, err := rand.Read(o[:length]) + if err != nil { + panic(err) + } + o.setRFC4122Variant() + o.setVersion(4) + return o +} + +// NewV5 will generate a new RFC4122 version 5 UUID +// Generate a UUID based on the SHA-1 hash of a namespace +// identifier and a name. +func NewV5(pNs UUID, pName UniqueName) UUID { + o := new(Array) + Digest(o, pNs, pName, sha1.New()) + o.setRFC4122Variant() + o.setVersion(5) + return o +} + +// either generates a random node when there is an error or gets +// the pre initialised one +func currentUUIDNodeId() (node net.HardwareAddr) { + if state.randomNode { + b := make([]byte, 16+6) + _, err := rand.Read(b) + if err != nil { + log.Println("UUID.currentUUIDNodeId error:", err) + node = nodeId + return + } + h := sha1.New() + h.Write(b) + binary.Write(h, binary.LittleEndian, state.sequence) + node = h.Sum(nil)[:6] + if err != nil { + log.Println("UUID.currentUUIDNodeId error:", err) + node = nodeId + return + } + // Mark as randomly generated + node[0] |= 0x01 + } else { + node = state.node + } + return +} + +// Unmarshal data into struct for V1 UUIDs +func formatV1(pNow Timestamp, pVersion uint16, pVariant byte, pNode []byte) UUID { + o := new(Struct) + o.timeLow = uint32(pNow & 0xFFFFFFFF) + o.timeMid = uint16((pNow >> 32) & 0xFFFF) + o.timeHiAndVersion = uint16((pNow >> 48) & 0x0FFF) + o.timeHiAndVersion |= uint16(pVersion << 12) + o.sequenceLow = byte(state.sequence & 0xFF) + o.sequenceHiAndVariant = byte((state.sequence & 0x3F00) >> 8) + o.sequenceHiAndVariant |= pVariant + o.node = pNode + o.size = length + return o +} diff --git a/vendor/github.com/twinj/uuid/saver.go b/vendor/github.com/twinj/uuid/saver.go new file mode 100644 index 000000000..0b776a46a --- /dev/null +++ b/vendor/github.com/twinj/uuid/saver.go @@ -0,0 +1,140 @@ +package uuid + +/**************** + * Date: 21/06/15 + * Time: 5:48 PM + ***************/ + +import ( + "encoding/gob" + "log" + "os" + "time" +) + +func init() { + gob.Register(stateEntity{}) +} + +func SetupFileSystemStateSaver(pConfig StateSaverConfig) { + saver := &FileSystemSaver{} + saver.saveReport = pConfig.SaveReport + saver.saveSchedule = int64(pConfig.SaveSchedule) + SetupCustomStateSaver(saver) +} + +// A wrapper for default setup of the FileSystemStateSaver +type StateSaverConfig struct { + + // Print save log + SaveReport bool + + // Save every x nanoseconds + SaveSchedule time.Duration +} + +// *********************************************** StateEntity + +// StateEntity acts as a marshaller struct for the state +type stateEntity struct { + Past Timestamp + Node []byte + Sequence uint16 +} + +// This implements the StateSaver interface for UUIDs +type FileSystemSaver struct { + cache *os.File + saveState uint64 + saveReport bool + saveSchedule int64 +} + +// Saves the current state of the generator +// If the scheduled file save is reached then the file is synced +func (o *FileSystemSaver) Save(pState *State) { + if pState.past >= pState.next { + err := o.open() + defer o.cache.Close() + if err != nil { + log.Println("uuid.State.save:", err) + return + } + // do the save + o.encode(pState) + // a tick is 100 nano seconds + pState.next = pState.past + Timestamp(o.saveSchedule / 100) + if o.saveReport { + log.Printf("UUID STATE: SAVED %d", pState.past) + } + } +} + +func (o *FileSystemSaver) Init(pState *State) { + pState.saver = o + err := o.open() + defer o.cache.Close() + if err != nil { + if os.IsNotExist(err) { + log.Printf("'%s' created\n", "uuid.SaveState") + var err error + o.cache, err = os.Create(os.TempDir() + "/state.unique") + if err != nil { + log.Println("uuid.State.init: SaveState error:", err) + goto pastInit + } + o.encode(pState) + } else { + log.Println("uuid.State.init: SaveState error:", err) + goto pastInit + } + } + err = o.decode(pState) + if err != nil { + goto pastInit + } + pState.randomSequence = false +pastInit: + if timestamp() <= pState.past { + pState.sequence++ + } + pState.next = pState.past +} + +func (o *FileSystemSaver) reset() { + o.cache.Seek(0, 0) +} + +func (o *FileSystemSaver) open() error { + var err error + o.cache, err = os.OpenFile(os.TempDir()+"/state.unique", os.O_RDWR, os.ModeExclusive) + return err +} + +// Encodes State generator data into a saved file +func (o *FileSystemSaver) encode(pState *State) { + // ensure reader state is ready for use + o.reset() + enc := gob.NewEncoder(o.cache) + // Wrap private State data into the StateEntity + err := enc.Encode(&stateEntity{pState.past, pState.node, pState.sequence}) + if err != nil { + log.Panic("UUID.encode error:", err) + } +} + +// Decodes StateEntity data into the main State +func (o *FileSystemSaver) decode(pState *State) error { + o.reset() + dec := gob.NewDecoder(o.cache) + entity := stateEntity{} + err := dec.Decode(&entity) + if err != nil { + log.Println("uuid.decode error:", err) + return err + } + pState.past = entity.Past + pState.node = entity.Node + pState.sequence = entity.Sequence + return nil +} diff --git a/vendor/github.com/twinj/uuid/state.go b/vendor/github.com/twinj/uuid/state.go new file mode 100644 index 000000000..f3920776c --- /dev/null +++ b/vendor/github.com/twinj/uuid/state.go @@ -0,0 +1,137 @@ +package uuid + +/**************** + * Date: 14/02/14 + * Time: 7:43 PM + ***************/ + +import ( + "bytes" + "log" + seed "math/rand" + "net" + "sync" +) + + +// **************************************************** State + +func SetupCustomStateSaver(pSaver StateSaver) { + state.Lock() + pSaver.Init(&state) + state.init() + state.Unlock() +} + +// Holds package information about the current +// state of the UUID generator +type State struct { + + // A flag which informs whether to + // randomly create a node id + randomNode bool + + // A flag which informs whether to + // randomly create the sequence + randomSequence bool + + // the last time UUID was saved + past Timestamp + + // the next time the state will be saved + next Timestamp + + // the last node which saved a UUID + node []byte + + // An iterated value to help ensure different + // values across the same domain + sequence uint16 + + sync.Mutex + + // save state interface + saver StateSaver +} + +// Changes the state with current data +// Compares the current found node to the last node stored, +// If they are the same or randomSequence is already set due +// to an earlier read issue then the sequence is randomly generated +// else if there is an issue with the time the sequence is incremented +func (o *State) read(pNow Timestamp, pNode net.HardwareAddr) { + if bytes.Equal([]byte(pNode), o.node) || o.randomSequence { + o.sequence = uint16(seed.Int()) & 0x3FFF + } else if pNow < o.past { + o.sequence++ + } + o.past = pNow + o.node = pNode +} + +func (o *State) persist() { + if o.saver != nil { + o.saver.Save(o) + } +} + +// Initialises the UUID state when the package is first loaded +// it first attempts to decode the file state into State +// if this file does not exist it will create the file and do a flush +// of the random state which gets loaded at package runtime +// second it will attempt to resolve the current hardware address nodeId +// thirdly it will check the state of the clock +func (o *State) init() { + if o.saver != nil { + intfcs, err := net.Interfaces() + if err != nil { + log.Println("uuid.State.init: address error: will generate random node id instead", err) + return + } + a := getHardwareAddress(intfcs) + if a == nil { + log.Println("uuid.State.init: address error: will generate random node id instead", err) + return + } + // Don't use random as we have a real address + o.randomSequence = false + if bytes.Equal([]byte(a), state.node) { + state.sequence++ + } + state.node = a + state.randomNode = false + } +} + +func getHardwareAddress(pInterfaces []net.Interface) net.HardwareAddr { + for _, inter := range pInterfaces { + // Initially I could multicast out the Flags to get + // whether the interface was up but started failing + if (inter.Flags & (1 << net.FlagUp)) != 0 { + //if inter.Flags.String() != "0" { + if addrs, err := inter.Addrs(); err == nil { + for _, addr := range addrs { + if addr.String() != "0.0.0.0" && !bytes.Equal([]byte(inter.HardwareAddr), make([]byte, len(inter.HardwareAddr))) { + return inter.HardwareAddr + } + } + } + } + } + return nil +} + +// *********************************************** StateSaver interface + +// Use this interface to setup a custom state saver if you wish to have +// v1 UUIDs based on your node id and constant time. +type StateSaver interface { + // Init is run if Setup() is false + // Init should setup the system to save the state + Init(*State) + + // Save saves the state and is called only if const V1Save and + // Setup() is true + Save(*State) +} + diff --git a/vendor/github.com/twinj/uuid/struct.go b/vendor/github.com/twinj/uuid/struct.go new file mode 100644 index 000000000..4f2fba8bd --- /dev/null +++ b/vendor/github.com/twinj/uuid/struct.go @@ -0,0 +1,103 @@ +package uuid + +/**************** + * Date: 31/01/14 + * Time: 3:34 PM + ***************/ + +import "net" + +// Struct is used for RFC4122 Version 1 UUIDs +type Struct struct { + timeLow uint32 + timeMid uint16 + timeHiAndVersion uint16 + sequenceHiAndVariant byte + sequenceLow byte + node []byte + size int +} + +func (o Struct) Size() int { + return o.size +} + +func (o Struct) Version() int { + return int(o.timeHiAndVersion >> 12) +} + +func (o Struct) Variant() byte { + return variant(o.sequenceHiAndVariant) +} + +// Sets the four most significant bits (bits 12 through 15) of the +// timeHiAndVersion field to the 4-bit version number. +func (o *Struct) setVersion(pVersion int) { + o.timeHiAndVersion &= 0x0FFF + o.timeHiAndVersion |= (uint16(pVersion) << 12) +} + +func (o *Struct) setVariant(pVariant byte) { + setVariant(&o.sequenceHiAndVariant, pVariant) +} + +func (o *Struct) Unmarshal(pData []byte) { + o.timeLow = uint32(pData[3]) | uint32(pData[2])<<8 | uint32(pData[1])<<16 | uint32(pData[0])<<24 + o.timeMid = uint16(pData[5]) | uint16(pData[4])<<8 + o.timeHiAndVersion = uint16(pData[7]) | uint16(pData[6])<<8 + o.sequenceHiAndVariant = pData[8] + o.sequenceLow = pData[9] + o.node = pData[10:o.Size()] +} + +func (o *Struct) Bytes() (data []byte) { + data = []byte{ + byte(o.timeLow >> 24), byte(o.timeLow >> 16), byte(o.timeLow >> 8), byte(o.timeLow), + byte(o.timeMid >> 8), byte(o.timeMid), + byte(o.timeHiAndVersion >> 8), byte(o.timeHiAndVersion), + } + data = append(data, o.sequenceHiAndVariant) + data = append(data, o.sequenceLow) + data = append(data, o.node...) + return +} + +// Marshals the UUID bytes into a slice +func (o *Struct) MarshalBinary() ([]byte, error) { + return o.Bytes(), nil +} + +// Un-marshals the data bytes into the UUID struct. +// Implements the BinaryUn-marshaller interface +func (o *Struct) UnmarshalBinary(pData []byte) error { + return UnmarshalBinary(o, pData) +} + +func (o Struct) String() string { + return formatter(&o, format) +} + +func (o Struct) Format(pFormat string) string { + return formatter(&o, pFormat) +} + +// Set the three most significant bits (bits 0, 1 and 2) of the +// sequenceHiAndVariant to variant mask 0x80. +func (o *Struct) setRFC4122Variant() { + o.sequenceHiAndVariant &= variantSet + o.sequenceHiAndVariant |= ReservedRFC4122 +} + +// Unmarshals data into struct for V1 UUIDs +func newV1(pNow Timestamp, pVersion uint16, pVariant byte, pNode net.HardwareAddr) UUID { + o := new(Struct) + o.timeLow = uint32(pNow & 0xFFFFFFFF) + o.timeMid = uint16((pNow >> 32) & 0xFFFF) + o.timeHiAndVersion = uint16((pNow >> 48) & 0x0FFF) + o.timeHiAndVersion |= uint16(pVersion << 12) + o.sequenceLow = byte(state.sequence & 0xFF) + o.sequenceHiAndVariant = byte((state.sequence & 0x3F00) >> 8) + o.sequenceHiAndVariant |= pVariant + o.node = pNode + return o +} diff --git a/vendor/github.com/twinj/uuid/timestamp.go b/vendor/github.com/twinj/uuid/timestamp.go new file mode 100644 index 000000000..616428745 --- /dev/null +++ b/vendor/github.com/twinj/uuid/timestamp.go @@ -0,0 +1,81 @@ +package uuid + +/**************** + * Date: 14/02/14 + * Time: 7:46 PM + ***************/ + +import ( + "time" +) + +const ( + // A tick is 100 ns + ticksPerSecond = 10000000 + + // Difference between + gregorianToUNIXOffset uint64 = 0x01B21DD213814000 + + // set the following to the number of 100ns ticks of the actual + // resolution of your system's clock + idsPerTimestamp = 1024 +) + +var ( + lastTimestamp Timestamp + idsThisTimestamp = idsPerTimestamp +) + +// ********************************************** Timestamp + +type Timestamp uint64 + +// TODO Create c version same as package runtime and time +func Now() (sec int64, nsec int32) { + t := time.Now() + sec = t.Unix() + nsec = int32(t.Nanosecond()) + return +} + +// Converts Unix formatted time to RFC4122 UUID formatted times +// UUID UTC base time is October 15, 1582. +// Unix base time is January 1, 1970. +// Converts time to 100 nanosecond ticks since epoch +// There are 1000000000 nanoseconds in a second, +// 1000000000 / 100 = 10000000 tiks per second +func timestamp() Timestamp { + sec, nsec := Now() + return Timestamp(uint64(sec)*ticksPerSecond + + uint64(nsec)/100 + gregorianToUNIXOffset) +} + +func (o Timestamp) Unix() time.Time { + t := uint64(o) - gregorianToUNIXOffset + return time.Unix(0, int64(t*100)) +} + +// Get time as 60-bit 100ns ticks since UUID epoch. +// Compensate for the fact that real clock resolution is +// less than 100ns. +func currentUUIDTimestamp() Timestamp { + var timeNow Timestamp + for { + timeNow = timestamp() + + // if clock reading changed since last UUID generated + if lastTimestamp != timeNow { + // reset count of UUIDs with this timestamp + idsThisTimestamp = 0 + lastTimestamp = timeNow + break + } + if idsThisTimestamp < idsPerTimestamp { + idsThisTimestamp++ + break + } + // going too fast for the clock; spin + } + // add the count of UUIDs to low order bits of the clock reading + return timeNow + Timestamp(idsThisTimestamp) +} diff --git a/vendor/github.com/twinj/uuid/uuids.go b/vendor/github.com/twinj/uuid/uuids.go new file mode 100644 index 000000000..846ff05e9 --- /dev/null +++ b/vendor/github.com/twinj/uuid/uuids.go @@ -0,0 +1,296 @@ +// This package provides RFC4122 UUIDs. +// +// NewV1, NewV3, NewV4, NewV5, for generating versions 1, 3, 4 +// and 5 UUIDs as specified in RFC-4122. +// +// New([]byte), unsafe; NewHex(string); and Parse(string) for +// creating UUIDs from existing data. +// +// The original version was from Krzysztof Kowalik +// Unfortunately, that version was non compliant with RFC4122. +// I forked it but have since heavily redesigned it. +// +// The example code in the specification was also used as reference +// for design. +// +// Copyright (C) 2014 twinj@github.com 2014 MIT style licence +package uuid + +/**************** + * Date: 31/01/14 + * Time: 3:35 PM + ***************/ + +import ( + "encoding" + "encoding/hex" + "errors" + "fmt" + "hash" + "regexp" + "strings" + "bytes" +) + +const ( + ReservedNCS byte = 0x00 + ReservedRFC4122 byte = 0x80 // or and A0 if masked with 1F + ReservedMicrosoft byte = 0xC0 + ReservedFuture byte = 0xE0 + TakeBack byte = 0xF0 +) + +const ( + + // Pattern used to parse string representation of the UUID. + // Current one allows to parse string where only one opening + // or closing bracket or any of the hyphens are optional. + // It is only used to extract the main bytes to create a UUID, + // so these imperfections are of no consequence. + hexPattern = `^(urn\:uuid\:)?[\{(\[]?([A-Fa-f0-9]{8})-?([A-Fa-f0-9]{4})-?([1-5][A-Fa-f0-9]{3})-?([A-Fa-f0-9]{4})-?([A-Fa-f0-9]{12})[\]\})]?$` +) + +var ( + parseUUIDRegex = regexp.MustCompile(hexPattern) + format string +) + +func init() { + SwitchFormat(CleanHyphen) +} + +// ****************************************************** UUID + +// The main interface for UUIDs +// Each implementation must also implement the UniqueName interface +type UUID interface { + encoding.BinaryMarshaler + encoding.BinaryUnmarshaler + + // Marshals the UUID bytes or data + Bytes() (data []byte) + + // Organises data into a new UUID + Unmarshal(pData []byte) + + // Size is used where different implementations require + // different sizes. Should return the number of bytes in + // the implementation. + // Enables unmarshal and Bytes to screen for size + Size() int + + // Version returns a version number of the algorithm used + // to generate the UUID. + // This may may behave independently across non RFC4122 UUIDs + Version() int + + // Variant returns the UUID Variant + // This will be one of the constants: + // ReservedRFC4122, + // ReservedMicrosoft, + // ReservedFuture, + // ReservedNCS. + // This may behave differently across non RFC4122 UUIDs + Variant() byte + + // UUID can be used as a Name within a namespace + // Is simply just a String() string method + // Returns a formatted version of the UUID. + String() string +} + +// New creates a UUID from a slice of bytes. +// Truncates any bytes past the default length of 16 +// Will panic if data slice is too small. +func New(pData []byte) UUID { + o := new(Array) + o.Unmarshal(pData[:length]) + return o +} + + +// Creates a UUID from a hex string +// Will panic if hex string is invalid - will panic even with hyphens and brackets +// Expects a clean string use Parse otherwise. +func NewHex(pUuid string) UUID { + bytes, err := hex.DecodeString(pUuid) + if err != nil { + panic(err) + } + return New(bytes) +} + +// Parse creates a UUID from a valid string representation. +// Accepts UUID string in following formats: +// 6ba7b8149dad11d180b400c04fd430c8 +// 6ba7b814-9dad-11d1-80b4-00c04fd430c8 +// {6ba7b814-9dad-11d1-80b4-00c04fd430c8} +// urn:uuid:6ba7b814-9dad-11d1-80b4-00c04fd430c8 +// [6ba7b814-9dad-11d1-80b4-00c04fd430c8] +// +func Parse(pUUID string) (UUID, error) { + md := parseUUIDRegex.FindStringSubmatch(pUUID) + if md == nil { + return nil, errors.New("uuid.Parse: invalid string") + } + return NewHex(md[2] + md[3] + md[4] + md[5] + md[6]), nil +} + +// Digest a namespace UUID and a UniqueName, which then marshals to +// a new UUID +func Digest(o, pNs UUID, pName UniqueName, pHash hash.Hash) { + // Hash writer never returns an error + pHash.Write(pNs.Bytes()) + pHash.Write([]byte(pName.String())) + o.Unmarshal(pHash.Sum(nil)[:o.Size()]) +} + +// Function provides a safe way to unmarshal bytes into an +// existing UUID. +// Checks for length. +func UnmarshalBinary(o UUID, pData []byte) error { + if len(pData) != o.Size() { + return errors.New("uuid.UnmarshalBinary: invalid length") + } + o.Unmarshal(pData) + return nil +} + +// ********************************************** UUID Names + +// A UUID Name is a simple string which implements UniqueName +// which satisfies the Stringer interface. +type Name string + +// Returns the name as a string. Satisfies the Stringer interface. +func (o Name) String() string { + return string(o) +} + +// NewName will create a unique name from several sources +func NewName(salt string, pNames ...UniqueName) UniqueName { + var s string + for _, s2 := range pNames { + s += s2.String() + } + return Name(s + salt) +} + +// UniqueName is a Stinger interface +// Made for easy passing of IPs, URLs, the several Address types, +// Buffers and any other type which implements Stringer +// string, []byte types and Hash sums will need to be cast to +// the Name type or some other type which implements +// Stringer or UniqueName +type UniqueName interface { + + // Many go types implement this method for use with printing + // Will convert the current type to its native string format + String() string +} + +// ********************************************** UUID Printing + +// A Format is a pattern used by the stringer interface with which to print +// the UUID. +type Format string + +const ( + Clean Format = "%x%x%x%x%x%x" + Curly Format = "{%x%x%x%x%x%x}" + Bracket Format = "(%x%x%x%x%x%x)" + + // This is the default format. + CleanHyphen Format = "%x-%x-%x-%x%x-%x" + + CurlyHyphen Format = "{%x-%x-%x-%x%x-%x}" + BracketHyphen Format = "(%x-%x-%x-%x%x-%x)" + GoIdFormat Format = "[%X-%X-%x-%X%X-%x]" +) + +// Gets the current default format pattern +func GetFormat() string { + return format +} + +// Switches the default printing format for ALL UUID strings +// A valid format will have 6 groups if the supplied Format does not +func SwitchFormat(pFormat Format) { + form := string(pFormat) + if strings.Count(form, "%") != 6 { + panic(errors.New("uuid.switchFormat: invalid formatting")) + } + format = form +} + +// Same as SwitchFormat but will make it uppercase +func SwitchFormatUpperCase(pFormat Format) { + form := strings.ToUpper(string(pFormat)) + SwitchFormat(Format(form)) +} + +// Compares whether each UUID is the same +func Equal(p1 UUID, p2 UUID) bool { + return bytes.Equal(p1.Bytes(), p2.Bytes()) +} + +// Format a UUID into a human readable string which matches the given Format +// Use this for one time formatting when setting the default using SwitchFormat +// is overkill. +func Formatter(pUUID UUID, pFormat Format) string { + form := string(pFormat) + if strings.Count(form, "%") != 6 { + panic(errors.New("uuid.Formatter: invalid formatting")) + } + return formatter(pUUID, form) +} + +// ********************************************** UUID Versions + +type UUIDVersion int + +const ( + NONE UUIDVersion = iota + RFC4122v1 + DunnoYetv2 + RFC4122v3 + RFC4122v4 + RFC4122v5 +) + +// *************************************************** Helpers + +// Retrieves the variant from the given byte +func variant(pVariant byte) byte { + switch pVariant & variantGet { + case ReservedRFC4122, 0xA0: + return ReservedRFC4122 + case ReservedMicrosoft: + return ReservedMicrosoft + case ReservedFuture: + return ReservedFuture + } + return ReservedNCS +} + +// not strictly required +func setVariant(pByte *byte, pVariant byte) { + switch pVariant { + case ReservedRFC4122: + *pByte &= variantSet + case ReservedFuture, ReservedMicrosoft: + *pByte &= 0x1F + case ReservedNCS: + *pByte &= 0x7F + default: + panic(errors.New("uuid.setVariant: invalid variant mask")) + } + *pByte |= pVariant +} + +// format a UUID into a human readable string +func formatter(pUUID UUID, pFormat string) string { + b := pUUID.Bytes() + return fmt.Sprintf(pFormat, b[0:4], b[4:6], b[6:8], b[8:9], b[9:10], b[10:pUUID.Size()]) +} + diff --git a/vendor/github.com/ugorji/go/LICENSE b/vendor/github.com/ugorji/go/LICENSE new file mode 100644 index 000000000..95a0f0541 --- /dev/null +++ b/vendor/github.com/ugorji/go/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2012-2015 Ugorji Nwoke. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/ugorji/go/codec/0doc.go b/vendor/github.com/ugorji/go/codec/0doc.go new file mode 100644 index 000000000..bd7361c87 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/0doc.go @@ -0,0 +1,199 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +/* +High Performance, Feature-Rich Idiomatic Go codec/encoding library for +binc, msgpack, cbor, json. + +Supported Serialization formats are: + + - msgpack: https://github.com/msgpack/msgpack + - binc: http://github.com/ugorji/binc + - cbor: http://cbor.io http://tools.ietf.org/html/rfc7049 + - json: http://json.org http://tools.ietf.org/html/rfc7159 + - simple: + +To install: + + go get github.com/ugorji/go/codec + +This package understands the 'unsafe' tag, to allow using unsafe semantics: + + - When decoding into a struct, you need to read the field name as a string + so you can find the struct field it is mapped to. + Using `unsafe` will bypass the allocation and copying overhead of []byte->string conversion. + +To install using unsafe, pass the 'unsafe' tag: + + go get -tags=unsafe github.com/ugorji/go/codec + +For detailed usage information, read the primer at http://ugorji.net/blog/go-codec-primer . + +The idiomatic Go support is as seen in other encoding packages in +the standard library (ie json, xml, gob, etc). + +Rich Feature Set includes: + + - Simple but extremely powerful and feature-rich API + - Very High Performance. + Our extensive benchmarks show us outperforming Gob, Json, Bson, etc by 2-4X. + - Multiple conversions: + Package coerces types where appropriate + e.g. decode an int in the stream into a float, etc. + - Corner Cases: + Overflows, nil maps/slices, nil values in streams are handled correctly + - Standard field renaming via tags + - Support for omitting empty fields during an encoding + - Encoding from any value and decoding into pointer to any value + (struct, slice, map, primitives, pointers, interface{}, etc) + - Extensions to support efficient encoding/decoding of any named types + - Support encoding.(Binary|Text)(M|Unm)arshaler interfaces + - Decoding without a schema (into a interface{}). + Includes Options to configure what specific map or slice type to use + when decoding an encoded list or map into a nil interface{} + - Encode a struct as an array, and decode struct from an array in the data stream + - Comprehensive support for anonymous fields + - Fast (no-reflection) encoding/decoding of common maps and slices + - Code-generation for faster performance. + - Support binary (e.g. messagepack, cbor) and text (e.g. json) formats + - Support indefinite-length formats to enable true streaming + (for formats which support it e.g. json, cbor) + - Support canonical encoding, where a value is ALWAYS encoded as same sequence of bytes. + This mostly applies to maps, where iteration order is non-deterministic. + - NIL in data stream decoded as zero value + - Never silently skip data when decoding. + User decides whether to return an error or silently skip data when keys or indexes + in the data stream do not map to fields in the struct. + - Detect and error when encoding a cyclic reference (instead of stack overflow shutdown) + - Encode/Decode from/to chan types (for iterative streaming support) + - Drop-in replacement for encoding/json. `json:` key in struct tag supported. + - Provides a RPC Server and Client Codec for net/rpc communication protocol. + - Handle unique idiosynchracies of codecs e.g. + - For messagepack, configure how ambiguities in handling raw bytes are resolved + - For messagepack, provide rpc server/client codec to support + msgpack-rpc protocol defined at: + https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md + +Extension Support + +Users can register a function to handle the encoding or decoding of +their custom types. + +There are no restrictions on what the custom type can be. Some examples: + + type BisSet []int + type BitSet64 uint64 + type UUID string + type MyStructWithUnexportedFields struct { a int; b bool; c []int; } + type GifImage struct { ... } + +As an illustration, MyStructWithUnexportedFields would normally be +encoded as an empty map because it has no exported fields, while UUID +would be encoded as a string. However, with extension support, you can +encode any of these however you like. + +RPC + +RPC Client and Server Codecs are implemented, so the codecs can be used +with the standard net/rpc package. + +Usage + +The Handle is SAFE for concurrent READ, but NOT SAFE for concurrent modification. + +The Encoder and Decoder are NOT safe for concurrent use. + +Consequently, the usage model is basically: + + - Create and initialize the Handle before any use. + Once created, DO NOT modify it. + - Multiple Encoders or Decoders can now use the Handle concurrently. + They only read information off the Handle (never write). + - However, each Encoder or Decoder MUST not be used concurrently + - To re-use an Encoder/Decoder, call Reset(...) on it first. + This allows you use state maintained on the Encoder/Decoder. + +Sample usage model: + + // create and configure Handle + var ( + bh codec.BincHandle + mh codec.MsgpackHandle + ch codec.CborHandle + ) + + mh.MapType = reflect.TypeOf(map[string]interface{}(nil)) + + // configure extensions + // e.g. for msgpack, define functions and enable Time support for tag 1 + // mh.SetExt(reflect.TypeOf(time.Time{}), 1, myExt) + + // create and use decoder/encoder + var ( + r io.Reader + w io.Writer + b []byte + h = &bh // or mh to use msgpack + ) + + dec = codec.NewDecoder(r, h) + dec = codec.NewDecoderBytes(b, h) + err = dec.Decode(&v) + + enc = codec.NewEncoder(w, h) + enc = codec.NewEncoderBytes(&b, h) + err = enc.Encode(v) + + //RPC Server + go func() { + for { + conn, err := listener.Accept() + rpcCodec := codec.GoRpc.ServerCodec(conn, h) + //OR rpcCodec := codec.MsgpackSpecRpc.ServerCodec(conn, h) + rpc.ServeCodec(rpcCodec) + } + }() + + //RPC Communication (client side) + conn, err = net.Dial("tcp", "localhost:5555") + rpcCodec := codec.GoRpc.ClientCodec(conn, h) + //OR rpcCodec := codec.MsgpackSpecRpc.ClientCodec(conn, h) + client := rpc.NewClientWithCodec(rpcCodec) + +*/ +package codec + +// Benefits of go-codec: +// +// - encoding/json always reads whole file into memory first. +// This makes it unsuitable for parsing very large files. +// - encoding/xml cannot parse into a map[string]interface{} +// I found this out on reading https://github.com/clbanning/mxj + +// TODO: +// +// - optimization for codecgen: +// if len of entity is <= 3 words, then support a value receiver for encode. +// - (En|De)coder should store an error when it occurs. +// Until reset, subsequent calls return that error that was stored. +// This means that free panics must go away. +// All errors must be raised through errorf method. +// - Decoding using a chan is good, but incurs concurrency costs. +// This is because there's no fast way to use a channel without it +// having to switch goroutines constantly. +// Callback pattern is still the best. Maybe cnsider supporting something like: +// type X struct { +// Name string +// Ys []Y +// Ys chan <- Y +// Ys func(Y) -> call this function for each entry +// } +// - Consider adding a isZeroer interface { isZero() bool } +// It is used within isEmpty, for omitEmpty support. +// - Consider making Handle used AS-IS within the encoding/decoding session. +// This means that we don't cache Handle information within the (En|De)coder, +// except we really need it at Reset(...) +// - Consider adding math/big support +// - Consider reducing the size of the generated functions: +// Maybe use one loop, and put the conditionals in the loop. +// for ... { if cLen > 0 { if j == cLen { break } } else if dd.CheckBreak() { break } } diff --git a/vendor/github.com/ugorji/go/codec/README.md b/vendor/github.com/ugorji/go/codec/README.md new file mode 100644 index 000000000..a790a52bb --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/README.md @@ -0,0 +1,148 @@ +# Codec + +High Performance, Feature-Rich Idiomatic Go codec/encoding library for +binc, msgpack, cbor, json. + +Supported Serialization formats are: + + - msgpack: https://github.com/msgpack/msgpack + - binc: http://github.com/ugorji/binc + - cbor: http://cbor.io http://tools.ietf.org/html/rfc7049 + - json: http://json.org http://tools.ietf.org/html/rfc7159 + - simple: + +To install: + + go get github.com/ugorji/go/codec + +This package understands the `unsafe` tag, to allow using unsafe semantics: + + - When decoding into a struct, you need to read the field name as a string + so you can find the struct field it is mapped to. + Using `unsafe` will bypass the allocation and copying overhead of `[]byte->string` conversion. + +To use it, you must pass the `unsafe` tag during install: + +``` +go install -tags=unsafe github.com/ugorji/go/codec +``` + +Online documentation: http://godoc.org/github.com/ugorji/go/codec +Detailed Usage/How-to Primer: http://ugorji.net/blog/go-codec-primer + +The idiomatic Go support is as seen in other encoding packages in +the standard library (ie json, xml, gob, etc). + +Rich Feature Set includes: + + - Simple but extremely powerful and feature-rich API + - Very High Performance. + Our extensive benchmarks show us outperforming Gob, Json, Bson, etc by 2-4X. + - Multiple conversions: + Package coerces types where appropriate + e.g. decode an int in the stream into a float, etc. + - Corner Cases: + Overflows, nil maps/slices, nil values in streams are handled correctly + - Standard field renaming via tags + - Support for omitting empty fields during an encoding + - Encoding from any value and decoding into pointer to any value + (struct, slice, map, primitives, pointers, interface{}, etc) + - Extensions to support efficient encoding/decoding of any named types + - Support encoding.(Binary|Text)(M|Unm)arshaler interfaces + - Decoding without a schema (into a interface{}). + Includes Options to configure what specific map or slice type to use + when decoding an encoded list or map into a nil interface{} + - Encode a struct as an array, and decode struct from an array in the data stream + - Comprehensive support for anonymous fields + - Fast (no-reflection) encoding/decoding of common maps and slices + - Code-generation for faster performance. + - Support binary (e.g. messagepack, cbor) and text (e.g. json) formats + - Support indefinite-length formats to enable true streaming + (for formats which support it e.g. json, cbor) + - Support canonical encoding, where a value is ALWAYS encoded as same sequence of bytes. + This mostly applies to maps, where iteration order is non-deterministic. + - NIL in data stream decoded as zero value + - Never silently skip data when decoding. + User decides whether to return an error or silently skip data when keys or indexes + in the data stream do not map to fields in the struct. + - Encode/Decode from/to chan types (for iterative streaming support) + - Drop-in replacement for encoding/json. `json:` key in struct tag supported. + - Provides a RPC Server and Client Codec for net/rpc communication protocol. + - Handle unique idiosynchracies of codecs e.g. + - For messagepack, configure how ambiguities in handling raw bytes are resolved + - For messagepack, provide rpc server/client codec to support + msgpack-rpc protocol defined at: + https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md + +## Extension Support + +Users can register a function to handle the encoding or decoding of +their custom types. + +There are no restrictions on what the custom type can be. Some examples: + + type BisSet []int + type BitSet64 uint64 + type UUID string + type MyStructWithUnexportedFields struct { a int; b bool; c []int; } + type GifImage struct { ... } + +As an illustration, MyStructWithUnexportedFields would normally be +encoded as an empty map because it has no exported fields, while UUID +would be encoded as a string. However, with extension support, you can +encode any of these however you like. + +## RPC + +RPC Client and Server Codecs are implemented, so the codecs can be used +with the standard net/rpc package. + +## Usage + +Typical usage model: + + // create and configure Handle + var ( + bh codec.BincHandle + mh codec.MsgpackHandle + ch codec.CborHandle + ) + + mh.MapType = reflect.TypeOf(map[string]interface{}(nil)) + + // configure extensions + // e.g. for msgpack, define functions and enable Time support for tag 1 + // mh.SetExt(reflect.TypeOf(time.Time{}), 1, myExt) + + // create and use decoder/encoder + var ( + r io.Reader + w io.Writer + b []byte + h = &bh // or mh to use msgpack + ) + + dec = codec.NewDecoder(r, h) + dec = codec.NewDecoderBytes(b, h) + err = dec.Decode(&v) + + enc = codec.NewEncoder(w, h) + enc = codec.NewEncoderBytes(&b, h) + err = enc.Encode(v) + + //RPC Server + go func() { + for { + conn, err := listener.Accept() + rpcCodec := codec.GoRpc.ServerCodec(conn, h) + //OR rpcCodec := codec.MsgpackSpecRpc.ServerCodec(conn, h) + rpc.ServeCodec(rpcCodec) + } + }() + + //RPC Communication (client side) + conn, err = net.Dial("tcp", "localhost:5555") + rpcCodec := codec.GoRpc.ClientCodec(conn, h) + //OR rpcCodec := codec.MsgpackSpecRpc.ClientCodec(conn, h) + client := rpc.NewClientWithCodec(rpcCodec) + diff --git a/vendor/github.com/ugorji/go/codec/binc.go b/vendor/github.com/ugorji/go/codec/binc.go new file mode 100644 index 000000000..766d26cf6 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/binc.go @@ -0,0 +1,922 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "math" + "reflect" + "time" +) + +const bincDoPrune = true // No longer needed. Needed before as C lib did not support pruning. + +// vd as low 4 bits (there are 16 slots) +const ( + bincVdSpecial byte = iota + bincVdPosInt + bincVdNegInt + bincVdFloat + + bincVdString + bincVdByteArray + bincVdArray + bincVdMap + + bincVdTimestamp + bincVdSmallInt + bincVdUnicodeOther + bincVdSymbol + + bincVdDecimal + _ // open slot + _ // open slot + bincVdCustomExt = 0x0f +) + +const ( + bincSpNil byte = iota + bincSpFalse + bincSpTrue + bincSpNan + bincSpPosInf + bincSpNegInf + bincSpZeroFloat + bincSpZero + bincSpNegOne +) + +const ( + bincFlBin16 byte = iota + bincFlBin32 + _ // bincFlBin32e + bincFlBin64 + _ // bincFlBin64e + // others not currently supported +) + +type bincEncDriver struct { + e *Encoder + w encWriter + m map[string]uint16 // symbols + b [scratchByteArrayLen]byte + s uint16 // symbols sequencer + encNoSeparator +} + +func (e *bincEncDriver) IsBuiltinType(rt uintptr) bool { + return rt == timeTypId +} + +func (e *bincEncDriver) EncodeBuiltin(rt uintptr, v interface{}) { + if rt == timeTypId { + var bs []byte + switch x := v.(type) { + case time.Time: + bs = encodeTime(x) + case *time.Time: + bs = encodeTime(*x) + default: + e.e.errorf("binc error encoding builtin: expect time.Time, received %T", v) + } + e.w.writen1(bincVdTimestamp<<4 | uint8(len(bs))) + e.w.writeb(bs) + } +} + +func (e *bincEncDriver) EncodeNil() { + e.w.writen1(bincVdSpecial<<4 | bincSpNil) +} + +func (e *bincEncDriver) EncodeBool(b bool) { + if b { + e.w.writen1(bincVdSpecial<<4 | bincSpTrue) + } else { + e.w.writen1(bincVdSpecial<<4 | bincSpFalse) + } +} + +func (e *bincEncDriver) EncodeFloat32(f float32) { + if f == 0 { + e.w.writen1(bincVdSpecial<<4 | bincSpZeroFloat) + return + } + e.w.writen1(bincVdFloat<<4 | bincFlBin32) + bigenHelper{e.b[:4], e.w}.writeUint32(math.Float32bits(f)) +} + +func (e *bincEncDriver) EncodeFloat64(f float64) { + if f == 0 { + e.w.writen1(bincVdSpecial<<4 | bincSpZeroFloat) + return + } + bigen.PutUint64(e.b[:8], math.Float64bits(f)) + if bincDoPrune { + i := 7 + for ; i >= 0 && (e.b[i] == 0); i-- { + } + i++ + if i <= 6 { + e.w.writen1(bincVdFloat<<4 | 0x8 | bincFlBin64) + e.w.writen1(byte(i)) + e.w.writeb(e.b[:i]) + return + } + } + e.w.writen1(bincVdFloat<<4 | bincFlBin64) + e.w.writeb(e.b[:8]) +} + +func (e *bincEncDriver) encIntegerPrune(bd byte, pos bool, v uint64, lim uint8) { + if lim == 4 { + bigen.PutUint32(e.b[:lim], uint32(v)) + } else { + bigen.PutUint64(e.b[:lim], v) + } + if bincDoPrune { + i := pruneSignExt(e.b[:lim], pos) + e.w.writen1(bd | lim - 1 - byte(i)) + e.w.writeb(e.b[i:lim]) + } else { + e.w.writen1(bd | lim - 1) + e.w.writeb(e.b[:lim]) + } +} + +func (e *bincEncDriver) EncodeInt(v int64) { + const nbd byte = bincVdNegInt << 4 + if v >= 0 { + e.encUint(bincVdPosInt<<4, true, uint64(v)) + } else if v == -1 { + e.w.writen1(bincVdSpecial<<4 | bincSpNegOne) + } else { + e.encUint(bincVdNegInt<<4, false, uint64(-v)) + } +} + +func (e *bincEncDriver) EncodeUint(v uint64) { + e.encUint(bincVdPosInt<<4, true, v) +} + +func (e *bincEncDriver) encUint(bd byte, pos bool, v uint64) { + if v == 0 { + e.w.writen1(bincVdSpecial<<4 | bincSpZero) + } else if pos && v >= 1 && v <= 16 { + e.w.writen1(bincVdSmallInt<<4 | byte(v-1)) + } else if v <= math.MaxUint8 { + e.w.writen2(bd|0x0, byte(v)) + } else if v <= math.MaxUint16 { + e.w.writen1(bd | 0x01) + bigenHelper{e.b[:2], e.w}.writeUint16(uint16(v)) + } else if v <= math.MaxUint32 { + e.encIntegerPrune(bd, pos, v, 4) + } else { + e.encIntegerPrune(bd, pos, v, 8) + } +} + +func (e *bincEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, _ *Encoder) { + bs := ext.WriteExt(rv) + if bs == nil { + e.EncodeNil() + return + } + e.encodeExtPreamble(uint8(xtag), len(bs)) + e.w.writeb(bs) +} + +func (e *bincEncDriver) EncodeRawExt(re *RawExt, _ *Encoder) { + e.encodeExtPreamble(uint8(re.Tag), len(re.Data)) + e.w.writeb(re.Data) +} + +func (e *bincEncDriver) encodeExtPreamble(xtag byte, length int) { + e.encLen(bincVdCustomExt<<4, uint64(length)) + e.w.writen1(xtag) +} + +func (e *bincEncDriver) EncodeArrayStart(length int) { + e.encLen(bincVdArray<<4, uint64(length)) +} + +func (e *bincEncDriver) EncodeMapStart(length int) { + e.encLen(bincVdMap<<4, uint64(length)) +} + +func (e *bincEncDriver) EncodeString(c charEncoding, v string) { + l := uint64(len(v)) + e.encBytesLen(c, l) + if l > 0 { + e.w.writestr(v) + } +} + +func (e *bincEncDriver) EncodeSymbol(v string) { + // if WriteSymbolsNoRefs { + // e.encodeString(c_UTF8, v) + // return + // } + + //symbols only offer benefit when string length > 1. + //This is because strings with length 1 take only 2 bytes to store + //(bd with embedded length, and single byte for string val). + + l := len(v) + if l == 0 { + e.encBytesLen(c_UTF8, 0) + return + } else if l == 1 { + e.encBytesLen(c_UTF8, 1) + e.w.writen1(v[0]) + return + } + if e.m == nil { + e.m = make(map[string]uint16, 16) + } + ui, ok := e.m[v] + if ok { + if ui <= math.MaxUint8 { + e.w.writen2(bincVdSymbol<<4, byte(ui)) + } else { + e.w.writen1(bincVdSymbol<<4 | 0x8) + bigenHelper{e.b[:2], e.w}.writeUint16(ui) + } + } else { + e.s++ + ui = e.s + //ui = uint16(atomic.AddUint32(&e.s, 1)) + e.m[v] = ui + var lenprec uint8 + if l <= math.MaxUint8 { + // lenprec = 0 + } else if l <= math.MaxUint16 { + lenprec = 1 + } else if int64(l) <= math.MaxUint32 { + lenprec = 2 + } else { + lenprec = 3 + } + if ui <= math.MaxUint8 { + e.w.writen2(bincVdSymbol<<4|0x0|0x4|lenprec, byte(ui)) + } else { + e.w.writen1(bincVdSymbol<<4 | 0x8 | 0x4 | lenprec) + bigenHelper{e.b[:2], e.w}.writeUint16(ui) + } + if lenprec == 0 { + e.w.writen1(byte(l)) + } else if lenprec == 1 { + bigenHelper{e.b[:2], e.w}.writeUint16(uint16(l)) + } else if lenprec == 2 { + bigenHelper{e.b[:4], e.w}.writeUint32(uint32(l)) + } else { + bigenHelper{e.b[:8], e.w}.writeUint64(uint64(l)) + } + e.w.writestr(v) + } +} + +func (e *bincEncDriver) EncodeStringBytes(c charEncoding, v []byte) { + l := uint64(len(v)) + e.encBytesLen(c, l) + if l > 0 { + e.w.writeb(v) + } +} + +func (e *bincEncDriver) encBytesLen(c charEncoding, length uint64) { + //TODO: support bincUnicodeOther (for now, just use string or bytearray) + if c == c_RAW { + e.encLen(bincVdByteArray<<4, length) + } else { + e.encLen(bincVdString<<4, length) + } +} + +func (e *bincEncDriver) encLen(bd byte, l uint64) { + if l < 12 { + e.w.writen1(bd | uint8(l+4)) + } else { + e.encLenNumber(bd, l) + } +} + +func (e *bincEncDriver) encLenNumber(bd byte, v uint64) { + if v <= math.MaxUint8 { + e.w.writen2(bd, byte(v)) + } else if v <= math.MaxUint16 { + e.w.writen1(bd | 0x01) + bigenHelper{e.b[:2], e.w}.writeUint16(uint16(v)) + } else if v <= math.MaxUint32 { + e.w.writen1(bd | 0x02) + bigenHelper{e.b[:4], e.w}.writeUint32(uint32(v)) + } else { + e.w.writen1(bd | 0x03) + bigenHelper{e.b[:8], e.w}.writeUint64(uint64(v)) + } +} + +//------------------------------------ + +type bincDecSymbol struct { + s string + b []byte + i uint16 +} + +type bincDecDriver struct { + d *Decoder + h *BincHandle + r decReader + br bool // bytes reader + bdRead bool + bd byte + vd byte + vs byte + noStreamingCodec + decNoSeparator + b [scratchByteArrayLen]byte + + // linear searching on this slice is ok, + // because we typically expect < 32 symbols in each stream. + s []bincDecSymbol +} + +func (d *bincDecDriver) readNextBd() { + d.bd = d.r.readn1() + d.vd = d.bd >> 4 + d.vs = d.bd & 0x0f + d.bdRead = true +} + +func (d *bincDecDriver) ContainerType() (vt valueType) { + if d.vd == bincVdSpecial && d.vs == bincSpNil { + return valueTypeNil + } else if d.vd == bincVdByteArray { + return valueTypeBytes + } else if d.vd == bincVdString { + return valueTypeString + } else if d.vd == bincVdArray { + return valueTypeArray + } else if d.vd == bincVdMap { + return valueTypeMap + } else { + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + } + return valueTypeUnset +} + +func (d *bincDecDriver) TryDecodeAsNil() bool { + if !d.bdRead { + d.readNextBd() + } + if d.bd == bincVdSpecial<<4|bincSpNil { + d.bdRead = false + return true + } + return false +} + +func (d *bincDecDriver) IsBuiltinType(rt uintptr) bool { + return rt == timeTypId +} + +func (d *bincDecDriver) DecodeBuiltin(rt uintptr, v interface{}) { + if !d.bdRead { + d.readNextBd() + } + if rt == timeTypId { + if d.vd != bincVdTimestamp { + d.d.errorf("Invalid d.vd. Expecting 0x%x. Received: 0x%x", bincVdTimestamp, d.vd) + return + } + tt, err := decodeTime(d.r.readx(int(d.vs))) + if err != nil { + panic(err) + } + var vt *time.Time = v.(*time.Time) + *vt = tt + d.bdRead = false + } +} + +func (d *bincDecDriver) decFloatPre(vs, defaultLen byte) { + if vs&0x8 == 0 { + d.r.readb(d.b[0:defaultLen]) + } else { + l := d.r.readn1() + if l > 8 { + d.d.errorf("At most 8 bytes used to represent float. Received: %v bytes", l) + return + } + for i := l; i < 8; i++ { + d.b[i] = 0 + } + d.r.readb(d.b[0:l]) + } +} + +func (d *bincDecDriver) decFloat() (f float64) { + //if true { f = math.Float64frombits(bigen.Uint64(d.r.readx(8))); break; } + if x := d.vs & 0x7; x == bincFlBin32 { + d.decFloatPre(d.vs, 4) + f = float64(math.Float32frombits(bigen.Uint32(d.b[0:4]))) + } else if x == bincFlBin64 { + d.decFloatPre(d.vs, 8) + f = math.Float64frombits(bigen.Uint64(d.b[0:8])) + } else { + d.d.errorf("only float32 and float64 are supported. d.vd: 0x%x, d.vs: 0x%x", d.vd, d.vs) + return + } + return +} + +func (d *bincDecDriver) decUint() (v uint64) { + // need to inline the code (interface conversion and type assertion expensive) + switch d.vs { + case 0: + v = uint64(d.r.readn1()) + case 1: + d.r.readb(d.b[6:8]) + v = uint64(bigen.Uint16(d.b[6:8])) + case 2: + d.b[4] = 0 + d.r.readb(d.b[5:8]) + v = uint64(bigen.Uint32(d.b[4:8])) + case 3: + d.r.readb(d.b[4:8]) + v = uint64(bigen.Uint32(d.b[4:8])) + case 4, 5, 6: + lim := int(7 - d.vs) + d.r.readb(d.b[lim:8]) + for i := 0; i < lim; i++ { + d.b[i] = 0 + } + v = uint64(bigen.Uint64(d.b[:8])) + case 7: + d.r.readb(d.b[:8]) + v = uint64(bigen.Uint64(d.b[:8])) + default: + d.d.errorf("unsigned integers with greater than 64 bits of precision not supported") + return + } + return +} + +func (d *bincDecDriver) decCheckInteger() (ui uint64, neg bool) { + if !d.bdRead { + d.readNextBd() + } + vd, vs := d.vd, d.vs + if vd == bincVdPosInt { + ui = d.decUint() + } else if vd == bincVdNegInt { + ui = d.decUint() + neg = true + } else if vd == bincVdSmallInt { + ui = uint64(d.vs) + 1 + } else if vd == bincVdSpecial { + if vs == bincSpZero { + //i = 0 + } else if vs == bincSpNegOne { + neg = true + ui = 1 + } else { + d.d.errorf("numeric decode fails for special value: d.vs: 0x%x", d.vs) + return + } + } else { + d.d.errorf("number can only be decoded from uint or int values. d.bd: 0x%x, d.vd: 0x%x", d.bd, d.vd) + return + } + return +} + +func (d *bincDecDriver) DecodeInt(bitsize uint8) (i int64) { + ui, neg := d.decCheckInteger() + i, overflow := chkOvf.SignedInt(ui) + if overflow { + d.d.errorf("simple: overflow converting %v to signed integer", ui) + return + } + if neg { + i = -i + } + if chkOvf.Int(i, bitsize) { + d.d.errorf("binc: overflow integer: %v", i) + return + } + d.bdRead = false + return +} + +func (d *bincDecDriver) DecodeUint(bitsize uint8) (ui uint64) { + ui, neg := d.decCheckInteger() + if neg { + d.d.errorf("Assigning negative signed value to unsigned type") + return + } + if chkOvf.Uint(ui, bitsize) { + d.d.errorf("binc: overflow integer: %v", ui) + return + } + d.bdRead = false + return +} + +func (d *bincDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + if !d.bdRead { + d.readNextBd() + } + vd, vs := d.vd, d.vs + if vd == bincVdSpecial { + d.bdRead = false + if vs == bincSpNan { + return math.NaN() + } else if vs == bincSpPosInf { + return math.Inf(1) + } else if vs == bincSpZeroFloat || vs == bincSpZero { + return + } else if vs == bincSpNegInf { + return math.Inf(-1) + } else { + d.d.errorf("Invalid d.vs decoding float where d.vd=bincVdSpecial: %v", d.vs) + return + } + } else if vd == bincVdFloat { + f = d.decFloat() + } else { + f = float64(d.DecodeInt(64)) + } + if chkOverflow32 && chkOvf.Float32(f) { + d.d.errorf("binc: float32 overflow: %v", f) + return + } + d.bdRead = false + return +} + +// bool can be decoded from bool only (single byte). +func (d *bincDecDriver) DecodeBool() (b bool) { + if !d.bdRead { + d.readNextBd() + } + if bd := d.bd; bd == (bincVdSpecial | bincSpFalse) { + // b = false + } else if bd == (bincVdSpecial | bincSpTrue) { + b = true + } else { + d.d.errorf("Invalid single-byte value for bool: %s: %x", msgBadDesc, d.bd) + return + } + d.bdRead = false + return +} + +func (d *bincDecDriver) ReadMapStart() (length int) { + if d.vd != bincVdMap { + d.d.errorf("Invalid d.vd for map. Expecting 0x%x. Got: 0x%x", bincVdMap, d.vd) + return + } + length = d.decLen() + d.bdRead = false + return +} + +func (d *bincDecDriver) ReadArrayStart() (length int) { + if d.vd != bincVdArray { + d.d.errorf("Invalid d.vd for array. Expecting 0x%x. Got: 0x%x", bincVdArray, d.vd) + return + } + length = d.decLen() + d.bdRead = false + return +} + +func (d *bincDecDriver) decLen() int { + if d.vs > 3 { + return int(d.vs - 4) + } + return int(d.decLenNumber()) +} + +func (d *bincDecDriver) decLenNumber() (v uint64) { + if x := d.vs; x == 0 { + v = uint64(d.r.readn1()) + } else if x == 1 { + d.r.readb(d.b[6:8]) + v = uint64(bigen.Uint16(d.b[6:8])) + } else if x == 2 { + d.r.readb(d.b[4:8]) + v = uint64(bigen.Uint32(d.b[4:8])) + } else { + d.r.readb(d.b[:8]) + v = bigen.Uint64(d.b[:8]) + } + return +} + +func (d *bincDecDriver) decStringAndBytes(bs []byte, withString, zerocopy bool) (bs2 []byte, s string) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == bincVdSpecial<<4|bincSpNil { + d.bdRead = false + return + } + var slen int = -1 + // var ok bool + switch d.vd { + case bincVdString, bincVdByteArray: + slen = d.decLen() + if zerocopy { + if d.br { + bs2 = d.r.readx(slen) + } else if len(bs) == 0 { + bs2 = decByteSlice(d.r, slen, d.b[:]) + } else { + bs2 = decByteSlice(d.r, slen, bs) + } + } else { + bs2 = decByteSlice(d.r, slen, bs) + } + if withString { + s = string(bs2) + } + case bincVdSymbol: + // zerocopy doesn't apply for symbols, + // as the values must be stored in a table for later use. + // + //from vs: extract numSymbolBytes, containsStringVal, strLenPrecision, + //extract symbol + //if containsStringVal, read it and put in map + //else look in map for string value + var symbol uint16 + vs := d.vs + if vs&0x8 == 0 { + symbol = uint16(d.r.readn1()) + } else { + symbol = uint16(bigen.Uint16(d.r.readx(2))) + } + if d.s == nil { + d.s = make([]bincDecSymbol, 0, 16) + } + + if vs&0x4 == 0 { + for i := range d.s { + j := &d.s[i] + if j.i == symbol { + bs2 = j.b + if withString { + if j.s == "" && bs2 != nil { + j.s = string(bs2) + } + s = j.s + } + break + } + } + } else { + switch vs & 0x3 { + case 0: + slen = int(d.r.readn1()) + case 1: + slen = int(bigen.Uint16(d.r.readx(2))) + case 2: + slen = int(bigen.Uint32(d.r.readx(4))) + case 3: + slen = int(bigen.Uint64(d.r.readx(8))) + } + // since using symbols, do not store any part of + // the parameter bs in the map, as it might be a shared buffer. + // bs2 = decByteSlice(d.r, slen, bs) + bs2 = decByteSlice(d.r, slen, nil) + if withString { + s = string(bs2) + } + d.s = append(d.s, bincDecSymbol{i: symbol, s: s, b: bs2}) + } + default: + d.d.errorf("Invalid d.vd. Expecting string:0x%x, bytearray:0x%x or symbol: 0x%x. Got: 0x%x", + bincVdString, bincVdByteArray, bincVdSymbol, d.vd) + return + } + d.bdRead = false + return +} + +func (d *bincDecDriver) DecodeString() (s string) { + // DecodeBytes does not accomodate symbols, whose impl stores string version in map. + // Use decStringAndBytes directly. + // return string(d.DecodeBytes(d.b[:], true, true)) + _, s = d.decStringAndBytes(d.b[:], true, true) + return +} + +func (d *bincDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) { + if isstring { + bsOut, _ = d.decStringAndBytes(bs, false, zerocopy) + return + } + if !d.bdRead { + d.readNextBd() + } + if d.bd == bincVdSpecial<<4|bincSpNil { + d.bdRead = false + return nil + } + var clen int + if d.vd == bincVdString || d.vd == bincVdByteArray { + clen = d.decLen() + } else { + d.d.errorf("Invalid d.vd for bytes. Expecting string:0x%x or bytearray:0x%x. Got: 0x%x", + bincVdString, bincVdByteArray, d.vd) + return + } + d.bdRead = false + if zerocopy { + if d.br { + return d.r.readx(clen) + } else if len(bs) == 0 { + bs = d.b[:] + } + } + return decByteSlice(d.r, clen, bs) +} + +func (d *bincDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { + if xtag > 0xff { + d.d.errorf("decodeExt: tag must be <= 0xff; got: %v", xtag) + return + } + realxtag1, xbs := d.decodeExtV(ext != nil, uint8(xtag)) + realxtag = uint64(realxtag1) + if ext == nil { + re := rv.(*RawExt) + re.Tag = realxtag + re.Data = detachZeroCopyBytes(d.br, re.Data, xbs) + } else { + ext.ReadExt(rv, xbs) + } + return +} + +func (d *bincDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs []byte) { + if !d.bdRead { + d.readNextBd() + } + if d.vd == bincVdCustomExt { + l := d.decLen() + xtag = d.r.readn1() + if verifyTag && xtag != tag { + d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", xtag, tag) + return + } + xbs = d.r.readx(l) + } else if d.vd == bincVdByteArray { + xbs = d.DecodeBytes(nil, false, true) + } else { + d.d.errorf("Invalid d.vd for extensions (Expecting extensions or byte array). Got: 0x%x", d.vd) + return + } + d.bdRead = false + return +} + +func (d *bincDecDriver) DecodeNaked() { + if !d.bdRead { + d.readNextBd() + } + + n := &d.d.n + var decodeFurther bool + + switch d.vd { + case bincVdSpecial: + switch d.vs { + case bincSpNil: + n.v = valueTypeNil + case bincSpFalse: + n.v = valueTypeBool + n.b = false + case bincSpTrue: + n.v = valueTypeBool + n.b = true + case bincSpNan: + n.v = valueTypeFloat + n.f = math.NaN() + case bincSpPosInf: + n.v = valueTypeFloat + n.f = math.Inf(1) + case bincSpNegInf: + n.v = valueTypeFloat + n.f = math.Inf(-1) + case bincSpZeroFloat: + n.v = valueTypeFloat + n.f = float64(0) + case bincSpZero: + n.v = valueTypeUint + n.u = uint64(0) // int8(0) + case bincSpNegOne: + n.v = valueTypeInt + n.i = int64(-1) // int8(-1) + default: + d.d.errorf("decodeNaked: Unrecognized special value 0x%x", d.vs) + } + case bincVdSmallInt: + n.v = valueTypeUint + n.u = uint64(int8(d.vs)) + 1 // int8(d.vs) + 1 + case bincVdPosInt: + n.v = valueTypeUint + n.u = d.decUint() + case bincVdNegInt: + n.v = valueTypeInt + n.i = -(int64(d.decUint())) + case bincVdFloat: + n.v = valueTypeFloat + n.f = d.decFloat() + case bincVdSymbol: + n.v = valueTypeSymbol + n.s = d.DecodeString() + case bincVdString: + n.v = valueTypeString + n.s = d.DecodeString() + case bincVdByteArray: + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) + case bincVdTimestamp: + n.v = valueTypeTimestamp + tt, err := decodeTime(d.r.readx(int(d.vs))) + if err != nil { + panic(err) + } + n.t = tt + case bincVdCustomExt: + n.v = valueTypeExt + l := d.decLen() + n.u = uint64(d.r.readn1()) + n.l = d.r.readx(l) + case bincVdArray: + n.v = valueTypeArray + decodeFurther = true + case bincVdMap: + n.v = valueTypeMap + decodeFurther = true + default: + d.d.errorf("decodeNaked: Unrecognized d.vd: 0x%x", d.vd) + } + + if !decodeFurther { + d.bdRead = false + } + if n.v == valueTypeUint && d.h.SignedInteger { + n.v = valueTypeInt + n.i = int64(n.u) + } + return +} + +//------------------------------------ + +//BincHandle is a Handle for the Binc Schema-Free Encoding Format +//defined at https://github.com/ugorji/binc . +// +//BincHandle currently supports all Binc features with the following EXCEPTIONS: +// - only integers up to 64 bits of precision are supported. +// big integers are unsupported. +// - Only IEEE 754 binary32 and binary64 floats are supported (ie Go float32 and float64 types). +// extended precision and decimal IEEE 754 floats are unsupported. +// - Only UTF-8 strings supported. +// Unicode_Other Binc types (UTF16, UTF32) are currently unsupported. +// +//Note that these EXCEPTIONS are temporary and full support is possible and may happen soon. +type BincHandle struct { + BasicHandle + binaryEncodingType +} + +func (h *BincHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { + return h.SetExt(rt, tag, &setExtWrapper{b: ext}) +} + +func (h *BincHandle) newEncDriver(e *Encoder) encDriver { + return &bincEncDriver{e: e, w: e.w} +} + +func (h *BincHandle) newDecDriver(d *Decoder) decDriver { + return &bincDecDriver{d: d, r: d.r, h: h, br: d.bytes} +} + +func (e *bincEncDriver) reset() { + e.w = e.e.w + e.s = 0 + e.m = nil +} + +func (d *bincDecDriver) reset() { + d.r = d.d.r + d.s = nil + d.bd, d.bdRead, d.vd, d.vs = 0, false, 0, 0 +} + +var _ decDriver = (*bincDecDriver)(nil) +var _ encDriver = (*bincEncDriver)(nil) diff --git a/vendor/github.com/ugorji/go/codec/cbor.go b/vendor/github.com/ugorji/go/codec/cbor.go new file mode 100644 index 000000000..a224cd3a7 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/cbor.go @@ -0,0 +1,585 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "math" + "reflect" +) + +const ( + cborMajorUint byte = iota + cborMajorNegInt + cborMajorBytes + cborMajorText + cborMajorArray + cborMajorMap + cborMajorTag + cborMajorOther +) + +const ( + cborBdFalse byte = 0xf4 + iota + cborBdTrue + cborBdNil + cborBdUndefined + cborBdExt + cborBdFloat16 + cborBdFloat32 + cborBdFloat64 +) + +const ( + cborBdIndefiniteBytes byte = 0x5f + cborBdIndefiniteString = 0x7f + cborBdIndefiniteArray = 0x9f + cborBdIndefiniteMap = 0xbf + cborBdBreak = 0xff +) + +const ( + CborStreamBytes byte = 0x5f + CborStreamString = 0x7f + CborStreamArray = 0x9f + CborStreamMap = 0xbf + CborStreamBreak = 0xff +) + +const ( + cborBaseUint byte = 0x00 + cborBaseNegInt = 0x20 + cborBaseBytes = 0x40 + cborBaseString = 0x60 + cborBaseArray = 0x80 + cborBaseMap = 0xa0 + cborBaseTag = 0xc0 + cborBaseSimple = 0xe0 +) + +// ------------------- + +type cborEncDriver struct { + noBuiltInTypes + encNoSeparator + e *Encoder + w encWriter + h *CborHandle + x [8]byte +} + +func (e *cborEncDriver) EncodeNil() { + e.w.writen1(cborBdNil) +} + +func (e *cborEncDriver) EncodeBool(b bool) { + if b { + e.w.writen1(cborBdTrue) + } else { + e.w.writen1(cborBdFalse) + } +} + +func (e *cborEncDriver) EncodeFloat32(f float32) { + e.w.writen1(cborBdFloat32) + bigenHelper{e.x[:4], e.w}.writeUint32(math.Float32bits(f)) +} + +func (e *cborEncDriver) EncodeFloat64(f float64) { + e.w.writen1(cborBdFloat64) + bigenHelper{e.x[:8], e.w}.writeUint64(math.Float64bits(f)) +} + +func (e *cborEncDriver) encUint(v uint64, bd byte) { + if v <= 0x17 { + e.w.writen1(byte(v) + bd) + } else if v <= math.MaxUint8 { + e.w.writen2(bd+0x18, uint8(v)) + } else if v <= math.MaxUint16 { + e.w.writen1(bd + 0x19) + bigenHelper{e.x[:2], e.w}.writeUint16(uint16(v)) + } else if v <= math.MaxUint32 { + e.w.writen1(bd + 0x1a) + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(v)) + } else { // if v <= math.MaxUint64 { + e.w.writen1(bd + 0x1b) + bigenHelper{e.x[:8], e.w}.writeUint64(v) + } +} + +func (e *cborEncDriver) EncodeInt(v int64) { + if v < 0 { + e.encUint(uint64(-1-v), cborBaseNegInt) + } else { + e.encUint(uint64(v), cborBaseUint) + } +} + +func (e *cborEncDriver) EncodeUint(v uint64) { + e.encUint(v, cborBaseUint) +} + +func (e *cborEncDriver) encLen(bd byte, length int) { + e.encUint(uint64(length), bd) +} + +func (e *cborEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Encoder) { + e.encUint(uint64(xtag), cborBaseTag) + if v := ext.ConvertExt(rv); v == nil { + e.EncodeNil() + } else { + en.encode(v) + } +} + +func (e *cborEncDriver) EncodeRawExt(re *RawExt, en *Encoder) { + e.encUint(uint64(re.Tag), cborBaseTag) + if re.Data != nil { + en.encode(re.Data) + } else if re.Value == nil { + e.EncodeNil() + } else { + en.encode(re.Value) + } +} + +func (e *cborEncDriver) EncodeArrayStart(length int) { + e.encLen(cborBaseArray, length) +} + +func (e *cborEncDriver) EncodeMapStart(length int) { + e.encLen(cborBaseMap, length) +} + +func (e *cborEncDriver) EncodeString(c charEncoding, v string) { + e.encLen(cborBaseString, len(v)) + e.w.writestr(v) +} + +func (e *cborEncDriver) EncodeSymbol(v string) { + e.EncodeString(c_UTF8, v) +} + +func (e *cborEncDriver) EncodeStringBytes(c charEncoding, v []byte) { + if c == c_RAW { + e.encLen(cborBaseBytes, len(v)) + } else { + e.encLen(cborBaseString, len(v)) + } + e.w.writeb(v) +} + +// ---------------------- + +type cborDecDriver struct { + d *Decoder + h *CborHandle + r decReader + b [scratchByteArrayLen]byte + br bool // bytes reader + bdRead bool + bd byte + noBuiltInTypes + decNoSeparator +} + +func (d *cborDecDriver) readNextBd() { + d.bd = d.r.readn1() + d.bdRead = true +} + +func (d *cborDecDriver) ContainerType() (vt valueType) { + if d.bd == cborBdNil { + return valueTypeNil + } else if d.bd == cborBdIndefiniteBytes || (d.bd >= cborBaseBytes && d.bd < cborBaseString) { + return valueTypeBytes + } else if d.bd == cborBdIndefiniteString || (d.bd >= cborBaseString && d.bd < cborBaseArray) { + return valueTypeString + } else if d.bd == cborBdIndefiniteArray || (d.bd >= cborBaseArray && d.bd < cborBaseMap) { + return valueTypeArray + } else if d.bd == cborBdIndefiniteMap || (d.bd >= cborBaseMap && d.bd < cborBaseTag) { + return valueTypeMap + } else { + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + } + return valueTypeUnset +} + +func (d *cborDecDriver) TryDecodeAsNil() bool { + if !d.bdRead { + d.readNextBd() + } + // treat Nil and Undefined as nil values + if d.bd == cborBdNil || d.bd == cborBdUndefined { + d.bdRead = false + return true + } + return false +} + +func (d *cborDecDriver) CheckBreak() bool { + if !d.bdRead { + d.readNextBd() + } + if d.bd == cborBdBreak { + d.bdRead = false + return true + } + return false +} + +func (d *cborDecDriver) decUint() (ui uint64) { + v := d.bd & 0x1f + if v <= 0x17 { + ui = uint64(v) + } else { + if v == 0x18 { + ui = uint64(d.r.readn1()) + } else if v == 0x19 { + ui = uint64(bigen.Uint16(d.r.readx(2))) + } else if v == 0x1a { + ui = uint64(bigen.Uint32(d.r.readx(4))) + } else if v == 0x1b { + ui = uint64(bigen.Uint64(d.r.readx(8))) + } else { + d.d.errorf("decUint: Invalid descriptor: %v", d.bd) + return + } + } + return +} + +func (d *cborDecDriver) decCheckInteger() (neg bool) { + if !d.bdRead { + d.readNextBd() + } + major := d.bd >> 5 + if major == cborMajorUint { + } else if major == cborMajorNegInt { + neg = true + } else { + d.d.errorf("invalid major: %v (bd: %v)", major, d.bd) + return + } + return +} + +func (d *cborDecDriver) DecodeInt(bitsize uint8) (i int64) { + neg := d.decCheckInteger() + ui := d.decUint() + // check if this number can be converted to an int without overflow + var overflow bool + if neg { + if i, overflow = chkOvf.SignedInt(ui + 1); overflow { + d.d.errorf("cbor: overflow converting %v to signed integer", ui+1) + return + } + i = -i + } else { + if i, overflow = chkOvf.SignedInt(ui); overflow { + d.d.errorf("cbor: overflow converting %v to signed integer", ui) + return + } + } + if chkOvf.Int(i, bitsize) { + d.d.errorf("cbor: overflow integer: %v", i) + return + } + d.bdRead = false + return +} + +func (d *cborDecDriver) DecodeUint(bitsize uint8) (ui uint64) { + if d.decCheckInteger() { + d.d.errorf("Assigning negative signed value to unsigned type") + return + } + ui = d.decUint() + if chkOvf.Uint(ui, bitsize) { + d.d.errorf("cbor: overflow integer: %v", ui) + return + } + d.bdRead = false + return +} + +func (d *cborDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + if !d.bdRead { + d.readNextBd() + } + if bd := d.bd; bd == cborBdFloat16 { + f = float64(math.Float32frombits(halfFloatToFloatBits(bigen.Uint16(d.r.readx(2))))) + } else if bd == cborBdFloat32 { + f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + } else if bd == cborBdFloat64 { + f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + } else if bd >= cborBaseUint && bd < cborBaseBytes { + f = float64(d.DecodeInt(64)) + } else { + d.d.errorf("Float only valid from float16/32/64: Invalid descriptor: %v", bd) + return + } + if chkOverflow32 && chkOvf.Float32(f) { + d.d.errorf("cbor: float32 overflow: %v", f) + return + } + d.bdRead = false + return +} + +// bool can be decoded from bool only (single byte). +func (d *cborDecDriver) DecodeBool() (b bool) { + if !d.bdRead { + d.readNextBd() + } + if bd := d.bd; bd == cborBdTrue { + b = true + } else if bd == cborBdFalse { + } else { + d.d.errorf("Invalid single-byte value for bool: %s: %x", msgBadDesc, d.bd) + return + } + d.bdRead = false + return +} + +func (d *cborDecDriver) ReadMapStart() (length int) { + d.bdRead = false + if d.bd == cborBdIndefiniteMap { + return -1 + } + return d.decLen() +} + +func (d *cborDecDriver) ReadArrayStart() (length int) { + d.bdRead = false + if d.bd == cborBdIndefiniteArray { + return -1 + } + return d.decLen() +} + +func (d *cborDecDriver) decLen() int { + return int(d.decUint()) +} + +func (d *cborDecDriver) decAppendIndefiniteBytes(bs []byte) []byte { + d.bdRead = false + for { + if d.CheckBreak() { + break + } + if major := d.bd >> 5; major != cborMajorBytes && major != cborMajorText { + d.d.errorf("cbor: expect bytes or string major type in indefinite string/bytes; got: %v, byte: %v", major, d.bd) + return nil + } + n := d.decLen() + oldLen := len(bs) + newLen := oldLen + n + if newLen > cap(bs) { + bs2 := make([]byte, newLen, 2*cap(bs)+n) + copy(bs2, bs) + bs = bs2 + } else { + bs = bs[:newLen] + } + d.r.readb(bs[oldLen:newLen]) + // bs = append(bs, d.r.readn()...) + d.bdRead = false + } + d.bdRead = false + return bs +} + +func (d *cborDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == cborBdNil || d.bd == cborBdUndefined { + d.bdRead = false + return nil + } + if d.bd == cborBdIndefiniteBytes || d.bd == cborBdIndefiniteString { + if bs == nil { + return d.decAppendIndefiniteBytes(nil) + } + return d.decAppendIndefiniteBytes(bs[:0]) + } + clen := d.decLen() + d.bdRead = false + if zerocopy { + if d.br { + return d.r.readx(clen) + } else if len(bs) == 0 { + bs = d.b[:] + } + } + return decByteSlice(d.r, clen, bs) +} + +func (d *cborDecDriver) DecodeString() (s string) { + return string(d.DecodeBytes(d.b[:], true, true)) +} + +func (d *cborDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { + if !d.bdRead { + d.readNextBd() + } + u := d.decUint() + d.bdRead = false + realxtag = u + if ext == nil { + re := rv.(*RawExt) + re.Tag = realxtag + d.d.decode(&re.Value) + } else if xtag != realxtag { + d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", realxtag, xtag) + return + } else { + var v interface{} + d.d.decode(&v) + ext.UpdateExt(rv, v) + } + d.bdRead = false + return +} + +func (d *cborDecDriver) DecodeNaked() { + if !d.bdRead { + d.readNextBd() + } + + n := &d.d.n + var decodeFurther bool + + switch d.bd { + case cborBdNil: + n.v = valueTypeNil + case cborBdFalse: + n.v = valueTypeBool + n.b = false + case cborBdTrue: + n.v = valueTypeBool + n.b = true + case cborBdFloat16, cborBdFloat32: + n.v = valueTypeFloat + n.f = d.DecodeFloat(true) + case cborBdFloat64: + n.v = valueTypeFloat + n.f = d.DecodeFloat(false) + case cborBdIndefiniteBytes: + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) + case cborBdIndefiniteString: + n.v = valueTypeString + n.s = d.DecodeString() + case cborBdIndefiniteArray: + n.v = valueTypeArray + decodeFurther = true + case cborBdIndefiniteMap: + n.v = valueTypeMap + decodeFurther = true + default: + switch { + case d.bd >= cborBaseUint && d.bd < cborBaseNegInt: + if d.h.SignedInteger { + n.v = valueTypeInt + n.i = d.DecodeInt(64) + } else { + n.v = valueTypeUint + n.u = d.DecodeUint(64) + } + case d.bd >= cborBaseNegInt && d.bd < cborBaseBytes: + n.v = valueTypeInt + n.i = d.DecodeInt(64) + case d.bd >= cborBaseBytes && d.bd < cborBaseString: + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) + case d.bd >= cborBaseString && d.bd < cborBaseArray: + n.v = valueTypeString + n.s = d.DecodeString() + case d.bd >= cborBaseArray && d.bd < cborBaseMap: + n.v = valueTypeArray + decodeFurther = true + case d.bd >= cborBaseMap && d.bd < cborBaseTag: + n.v = valueTypeMap + decodeFurther = true + case d.bd >= cborBaseTag && d.bd < cborBaseSimple: + n.v = valueTypeExt + n.u = d.decUint() + n.l = nil + // d.bdRead = false + // d.d.decode(&re.Value) // handled by decode itself. + // decodeFurther = true + default: + d.d.errorf("decodeNaked: Unrecognized d.bd: 0x%x", d.bd) + return + } + } + + if !decodeFurther { + d.bdRead = false + } + return +} + +// ------------------------- + +// CborHandle is a Handle for the CBOR encoding format, +// defined at http://tools.ietf.org/html/rfc7049 and documented further at http://cbor.io . +// +// CBOR is comprehensively supported, including support for: +// - indefinite-length arrays/maps/bytes/strings +// - (extension) tags in range 0..0xffff (0 .. 65535) +// - half, single and double-precision floats +// - all numbers (1, 2, 4 and 8-byte signed and unsigned integers) +// - nil, true, false, ... +// - arrays and maps, bytes and text strings +// +// None of the optional extensions (with tags) defined in the spec are supported out-of-the-box. +// Users can implement them as needed (using SetExt), including spec-documented ones: +// - timestamp, BigNum, BigFloat, Decimals, Encoded Text (e.g. URL, regexp, base64, MIME Message), etc. +// +// To encode with indefinite lengths (streaming), users will use +// (Must)Encode methods of *Encoder, along with writing CborStreamXXX constants. +// +// For example, to encode "one-byte" as an indefinite length string: +// var buf bytes.Buffer +// e := NewEncoder(&buf, new(CborHandle)) +// buf.WriteByte(CborStreamString) +// e.MustEncode("one-") +// e.MustEncode("byte") +// buf.WriteByte(CborStreamBreak) +// encodedBytes := buf.Bytes() +// var vv interface{} +// NewDecoderBytes(buf.Bytes(), new(CborHandle)).MustDecode(&vv) +// // Now, vv contains the same string "one-byte" +// +type CborHandle struct { + binaryEncodingType + BasicHandle +} + +func (h *CborHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { + return h.SetExt(rt, tag, &setExtWrapper{i: ext}) +} + +func (h *CborHandle) newEncDriver(e *Encoder) encDriver { + return &cborEncDriver{e: e, w: e.w, h: h} +} + +func (h *CborHandle) newDecDriver(d *Decoder) decDriver { + return &cborDecDriver{d: d, r: d.r, h: h, br: d.bytes} +} + +func (e *cborEncDriver) reset() { + e.w = e.e.w +} + +func (d *cborDecDriver) reset() { + d.r = d.d.r + d.bd, d.bdRead = 0, false +} + +var _ decDriver = (*cborDecDriver)(nil) +var _ encDriver = (*cborEncDriver)(nil) diff --git a/vendor/github.com/ugorji/go/codec/decode.go b/vendor/github.com/ugorji/go/codec/decode.go new file mode 100644 index 000000000..b87ea630e --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/decode.go @@ -0,0 +1,2019 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "encoding" + "errors" + "fmt" + "io" + "reflect" + "time" +) + +// Some tagging information for error messages. +const ( + msgBadDesc = "Unrecognized descriptor byte" + msgDecCannotExpandArr = "cannot expand go array from %v to stream length: %v" +) + +var ( + onlyMapOrArrayCanDecodeIntoStructErr = errors.New("only encoded map or array can be decoded into a struct") + cannotDecodeIntoNilErr = errors.New("cannot decode into nil") +) + +// decReader abstracts the reading source, allowing implementations that can +// read from an io.Reader or directly off a byte slice with zero-copying. +type decReader interface { + unreadn1() + + // readx will use the implementation scratch buffer if possible i.e. n < len(scratchbuf), OR + // just return a view of the []byte being decoded from. + // Ensure you call detachZeroCopyBytes later if this needs to be sent outside codec control. + readx(n int) []byte + readb([]byte) + readn1() uint8 + readn1eof() (v uint8, eof bool) + numread() int // number of bytes read + track() + stopTrack() []byte +} + +type decReaderByteScanner interface { + io.Reader + io.ByteScanner +} + +type decDriver interface { + // this will check if the next token is a break. + CheckBreak() bool + TryDecodeAsNil() bool + // vt is one of: Bytes, String, Nil, Slice or Map. Return unSet if not known. + ContainerType() (vt valueType) + IsBuiltinType(rt uintptr) bool + DecodeBuiltin(rt uintptr, v interface{}) + + // DecodeNaked will decode primitives (number, bool, string, []byte) and RawExt. + // For maps and arrays, it will not do the decoding in-band, but will signal + // the decoder, so that is done later, by setting the decNaked.valueType field. + // + // Note: Numbers are decoded as int64, uint64, float64 only (no smaller sized number types). + // for extensions, DecodeNaked must read the tag and the []byte if it exists. + // if the []byte is not read, then kInterfaceNaked will treat it as a Handle + // that stores the subsequent value in-band, and complete reading the RawExt. + // + // extensions should also use readx to decode them, for efficiency. + // kInterface will extract the detached byte slice if it has to pass it outside its realm. + DecodeNaked() + DecodeInt(bitsize uint8) (i int64) + DecodeUint(bitsize uint8) (ui uint64) + DecodeFloat(chkOverflow32 bool) (f float64) + DecodeBool() (b bool) + // DecodeString can also decode symbols. + // It looks redundant as DecodeBytes is available. + // However, some codecs (e.g. binc) support symbols and can + // return a pre-stored string value, meaning that it can bypass + // the cost of []byte->string conversion. + DecodeString() (s string) + + // DecodeBytes may be called directly, without going through reflection. + // Consequently, it must be designed to handle possible nil. + DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) + + // decodeExt will decode into a *RawExt or into an extension. + DecodeExt(v interface{}, xtag uint64, ext Ext) (realxtag uint64) + // decodeExt(verifyTag bool, tag byte) (xtag byte, xbs []byte) + ReadMapStart() int + ReadArrayStart() int + + reset() + uncacheRead() +} + +type decNoSeparator struct{} + +func (_ decNoSeparator) ReadEnd() {} +func (_ decNoSeparator) uncacheRead() {} + +type DecodeOptions struct { + // MapType specifies type to use during schema-less decoding of a map in the stream. + // If nil, we use map[interface{}]interface{} + MapType reflect.Type + + // SliceType specifies type to use during schema-less decoding of an array in the stream. + // If nil, we use []interface{} + SliceType reflect.Type + + // MaxInitLen defines the initial length that we "make" a collection (slice, chan or map) with. + // If 0 or negative, we default to a sensible value based on the size of an element in the collection. + // + // For example, when decoding, a stream may say that it has MAX_UINT elements. + // We should not auto-matically provision a slice of that length, to prevent Out-Of-Memory crash. + // Instead, we provision up to MaxInitLen, fill that up, and start appending after that. + MaxInitLen int + + // If ErrorIfNoField, return an error when decoding a map + // from a codec stream into a struct, and no matching struct field is found. + ErrorIfNoField bool + + // If ErrorIfNoArrayExpand, return an error when decoding a slice/array that cannot be expanded. + // For example, the stream contains an array of 8 items, but you are decoding into a [4]T array, + // or you are decoding into a slice of length 4 which is non-addressable (and so cannot be set). + ErrorIfNoArrayExpand bool + + // If SignedInteger, use the int64 during schema-less decoding of unsigned values (not uint64). + SignedInteger bool + + // MapValueReset controls how we decode into a map value. + // + // By default, we MAY retrieve the mapping for a key, and then decode into that. + // However, especially with big maps, that retrieval may be expensive and unnecessary + // if the stream already contains all that is necessary to recreate the value. + // + // If true, we will never retrieve the previous mapping, + // but rather decode into a new value and set that in the map. + // + // If false, we will retrieve the previous mapping if necessary e.g. + // the previous mapping is a pointer, or is a struct or array with pre-set state, + // or is an interface. + MapValueReset bool + + // InterfaceReset controls how we decode into an interface. + // + // By default, when we see a field that is an interface{...}, + // or a map with interface{...} value, we will attempt decoding into the + // "contained" value. + // + // However, this prevents us from reading a string into an interface{} + // that formerly contained a number. + // + // If true, we will decode into a new "blank" value, and set that in the interface. + // If false, we will decode into whatever is contained in the interface. + InterfaceReset bool + + // InternString controls interning of strings during decoding. + // + // Some handles, e.g. json, typically will read map keys as strings. + // If the set of keys are finite, it may help reduce allocation to + // look them up from a map (than to allocate them afresh). + // + // Note: Handles will be smart when using the intern functionality. + // So everything will not be interned. + InternString bool +} + +// ------------------------------------ + +// ioDecByteScanner implements Read(), ReadByte(...), UnreadByte(...) methods +// of io.Reader, io.ByteScanner. +type ioDecByteScanner struct { + r io.Reader + l byte // last byte + ls byte // last byte status. 0: init-canDoNothing, 1: canRead, 2: canUnread + b [1]byte // tiny buffer for reading single bytes +} + +func (z *ioDecByteScanner) Read(p []byte) (n int, err error) { + var firstByte bool + if z.ls == 1 { + z.ls = 2 + p[0] = z.l + if len(p) == 1 { + n = 1 + return + } + firstByte = true + p = p[1:] + } + n, err = z.r.Read(p) + if n > 0 { + if err == io.EOF && n == len(p) { + err = nil // read was successful, so postpone EOF (till next time) + } + z.l = p[n-1] + z.ls = 2 + } + if firstByte { + n++ + } + return +} + +func (z *ioDecByteScanner) ReadByte() (c byte, err error) { + n, err := z.Read(z.b[:]) + if n == 1 { + c = z.b[0] + if err == io.EOF { + err = nil // read was successful, so postpone EOF (till next time) + } + } + return +} + +func (z *ioDecByteScanner) UnreadByte() (err error) { + x := z.ls + if x == 0 { + err = errors.New("cannot unread - nothing has been read") + } else if x == 1 { + err = errors.New("cannot unread - last byte has not been read") + } else if x == 2 { + z.ls = 1 + } + return +} + +// ioDecReader is a decReader that reads off an io.Reader +type ioDecReader struct { + br decReaderByteScanner + // temp byte array re-used internally for efficiency during read. + // shares buffer with Decoder, so we keep size of struct within 8 words. + x *[scratchByteArrayLen]byte + bs ioDecByteScanner + n int // num read + tr []byte // tracking bytes read + trb bool +} + +func (z *ioDecReader) numread() int { + return z.n +} + +func (z *ioDecReader) readx(n int) (bs []byte) { + if n <= 0 { + return + } + if n < len(z.x) { + bs = z.x[:n] + } else { + bs = make([]byte, n) + } + if _, err := io.ReadAtLeast(z.br, bs, n); err != nil { + panic(err) + } + z.n += len(bs) + if z.trb { + z.tr = append(z.tr, bs...) + } + return +} + +func (z *ioDecReader) readb(bs []byte) { + if len(bs) == 0 { + return + } + n, err := io.ReadAtLeast(z.br, bs, len(bs)) + z.n += n + if err != nil { + panic(err) + } + if z.trb { + z.tr = append(z.tr, bs...) + } +} + +func (z *ioDecReader) readn1() (b uint8) { + b, err := z.br.ReadByte() + if err != nil { + panic(err) + } + z.n++ + if z.trb { + z.tr = append(z.tr, b) + } + return b +} + +func (z *ioDecReader) readn1eof() (b uint8, eof bool) { + b, err := z.br.ReadByte() + if err == nil { + z.n++ + if z.trb { + z.tr = append(z.tr, b) + } + } else if err == io.EOF { + eof = true + } else { + panic(err) + } + return +} + +func (z *ioDecReader) unreadn1() { + err := z.br.UnreadByte() + if err != nil { + panic(err) + } + z.n-- + if z.trb { + if l := len(z.tr) - 1; l >= 0 { + z.tr = z.tr[:l] + } + } +} + +func (z *ioDecReader) track() { + if z.tr != nil { + z.tr = z.tr[:0] + } + z.trb = true +} + +func (z *ioDecReader) stopTrack() (bs []byte) { + z.trb = false + return z.tr +} + +// ------------------------------------ + +var bytesDecReaderCannotUnreadErr = errors.New("cannot unread last byte read") + +// bytesDecReader is a decReader that reads off a byte slice with zero copying +type bytesDecReader struct { + b []byte // data + c int // cursor + a int // available + t int // track start +} + +func (z *bytesDecReader) reset(in []byte) { + z.b = in + z.a = len(in) + z.c = 0 + z.t = 0 +} + +func (z *bytesDecReader) numread() int { + return z.c +} + +func (z *bytesDecReader) unreadn1() { + if z.c == 0 || len(z.b) == 0 { + panic(bytesDecReaderCannotUnreadErr) + } + z.c-- + z.a++ + return +} + +func (z *bytesDecReader) readx(n int) (bs []byte) { + // slicing from a non-constant start position is more expensive, + // as more computation is required to decipher the pointer start position. + // However, we do it only once, and it's better than reslicing both z.b and return value. + + if n <= 0 { + } else if z.a == 0 { + panic(io.EOF) + } else if n > z.a { + panic(io.ErrUnexpectedEOF) + } else { + c0 := z.c + z.c = c0 + n + z.a = z.a - n + bs = z.b[c0:z.c] + } + return +} + +func (z *bytesDecReader) readn1() (v uint8) { + if z.a == 0 { + panic(io.EOF) + } + v = z.b[z.c] + z.c++ + z.a-- + return +} + +func (z *bytesDecReader) readn1eof() (v uint8, eof bool) { + if z.a == 0 { + eof = true + return + } + v = z.b[z.c] + z.c++ + z.a-- + return +} + +func (z *bytesDecReader) readb(bs []byte) { + copy(bs, z.readx(len(bs))) +} + +func (z *bytesDecReader) track() { + z.t = z.c +} + +func (z *bytesDecReader) stopTrack() (bs []byte) { + return z.b[z.t:z.c] +} + +// ------------------------------------ + +type decFnInfo struct { + d *Decoder + ti *typeInfo + xfFn Ext + xfTag uint64 + seq seqType +} + +// ---------------------------------------- + +type decFn struct { + i decFnInfo + f func(*decFnInfo, reflect.Value) +} + +func (f *decFnInfo) builtin(rv reflect.Value) { + f.d.d.DecodeBuiltin(f.ti.rtid, rv.Addr().Interface()) +} + +func (f *decFnInfo) rawExt(rv reflect.Value) { + f.d.d.DecodeExt(rv.Addr().Interface(), 0, nil) +} + +func (f *decFnInfo) ext(rv reflect.Value) { + f.d.d.DecodeExt(rv.Addr().Interface(), f.xfTag, f.xfFn) +} + +func (f *decFnInfo) getValueForUnmarshalInterface(rv reflect.Value, indir int8) (v interface{}) { + if indir == -1 { + v = rv.Addr().Interface() + } else if indir == 0 { + v = rv.Interface() + } else { + for j := int8(0); j < indir; j++ { + if rv.IsNil() { + rv.Set(reflect.New(rv.Type().Elem())) + } + rv = rv.Elem() + } + v = rv.Interface() + } + return +} + +func (f *decFnInfo) selferUnmarshal(rv reflect.Value) { + f.getValueForUnmarshalInterface(rv, f.ti.csIndir).(Selfer).CodecDecodeSelf(f.d) +} + +func (f *decFnInfo) binaryUnmarshal(rv reflect.Value) { + bm := f.getValueForUnmarshalInterface(rv, f.ti.bunmIndir).(encoding.BinaryUnmarshaler) + xbs := f.d.d.DecodeBytes(nil, false, true) + if fnerr := bm.UnmarshalBinary(xbs); fnerr != nil { + panic(fnerr) + } +} + +func (f *decFnInfo) textUnmarshal(rv reflect.Value) { + tm := f.getValueForUnmarshalInterface(rv, f.ti.tunmIndir).(encoding.TextUnmarshaler) + fnerr := tm.UnmarshalText(f.d.d.DecodeBytes(f.d.b[:], true, true)) + if fnerr != nil { + panic(fnerr) + } +} + +func (f *decFnInfo) jsonUnmarshal(rv reflect.Value) { + tm := f.getValueForUnmarshalInterface(rv, f.ti.junmIndir).(jsonUnmarshaler) + // bs := f.d.d.DecodeBytes(f.d.b[:], true, true) + // grab the bytes to be read, as UnmarshalJSON needs the full JSON so as to unmarshal it itself. + fnerr := tm.UnmarshalJSON(f.d.nextValueBytes()) + if fnerr != nil { + panic(fnerr) + } +} + +func (f *decFnInfo) kErr(rv reflect.Value) { + f.d.errorf("no decoding function defined for kind %v", rv.Kind()) +} + +func (f *decFnInfo) kString(rv reflect.Value) { + rv.SetString(f.d.d.DecodeString()) +} + +func (f *decFnInfo) kBool(rv reflect.Value) { + rv.SetBool(f.d.d.DecodeBool()) +} + +func (f *decFnInfo) kInt(rv reflect.Value) { + rv.SetInt(f.d.d.DecodeInt(intBitsize)) +} + +func (f *decFnInfo) kInt64(rv reflect.Value) { + rv.SetInt(f.d.d.DecodeInt(64)) +} + +func (f *decFnInfo) kInt32(rv reflect.Value) { + rv.SetInt(f.d.d.DecodeInt(32)) +} + +func (f *decFnInfo) kInt8(rv reflect.Value) { + rv.SetInt(f.d.d.DecodeInt(8)) +} + +func (f *decFnInfo) kInt16(rv reflect.Value) { + rv.SetInt(f.d.d.DecodeInt(16)) +} + +func (f *decFnInfo) kFloat32(rv reflect.Value) { + rv.SetFloat(f.d.d.DecodeFloat(true)) +} + +func (f *decFnInfo) kFloat64(rv reflect.Value) { + rv.SetFloat(f.d.d.DecodeFloat(false)) +} + +func (f *decFnInfo) kUint8(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(8)) +} + +func (f *decFnInfo) kUint64(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(64)) +} + +func (f *decFnInfo) kUint(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(uintBitsize)) +} + +func (f *decFnInfo) kUintptr(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(uintBitsize)) +} + +func (f *decFnInfo) kUint32(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(32)) +} + +func (f *decFnInfo) kUint16(rv reflect.Value) { + rv.SetUint(f.d.d.DecodeUint(16)) +} + +// func (f *decFnInfo) kPtr(rv reflect.Value) { +// debugf(">>>>>>> ??? decode kPtr called - shouldn't get called") +// if rv.IsNil() { +// rv.Set(reflect.New(rv.Type().Elem())) +// } +// f.d.decodeValue(rv.Elem()) +// } + +// var kIntfCtr uint64 + +func (f *decFnInfo) kInterfaceNaked() (rvn reflect.Value) { + // nil interface: + // use some hieristics to decode it appropriately + // based on the detected next value in the stream. + d := f.d + d.d.DecodeNaked() + n := &d.n + if n.v == valueTypeNil { + return + } + // We cannot decode non-nil stream value into nil interface with methods (e.g. io.Reader). + // if num := f.ti.rt.NumMethod(); num > 0 { + if f.ti.numMeth > 0 { + d.errorf("cannot decode non-nil codec value into nil %v (%v methods)", f.ti.rt, f.ti.numMeth) + return + } + // var useRvn bool + switch n.v { + case valueTypeMap: + // if d.h.MapType == nil || d.h.MapType == mapIntfIntfTyp { + // } else if d.h.MapType == mapStrIntfTyp { // for json performance + // } + if d.mtid == 0 || d.mtid == mapIntfIntfTypId { + l := len(n.ms) + n.ms = append(n.ms, nil) + var v2 interface{} = &n.ms[l] + d.decode(v2) + rvn = reflect.ValueOf(v2).Elem() + n.ms = n.ms[:l] + } else if d.mtid == mapStrIntfTypId { // for json performance + l := len(n.ns) + n.ns = append(n.ns, nil) + var v2 interface{} = &n.ns[l] + d.decode(v2) + rvn = reflect.ValueOf(v2).Elem() + n.ns = n.ns[:l] + } else { + rvn = reflect.New(d.h.MapType).Elem() + d.decodeValue(rvn, nil) + } + case valueTypeArray: + // if d.h.SliceType == nil || d.h.SliceType == intfSliceTyp { + if d.stid == 0 || d.stid == intfSliceTypId { + l := len(n.ss) + n.ss = append(n.ss, nil) + var v2 interface{} = &n.ss[l] + d.decode(v2) + rvn = reflect.ValueOf(v2).Elem() + n.ss = n.ss[:l] + } else { + rvn = reflect.New(d.h.SliceType).Elem() + d.decodeValue(rvn, nil) + } + case valueTypeExt: + var v interface{} + tag, bytes := n.u, n.l // calling decode below might taint the values + if bytes == nil { + l := len(n.is) + n.is = append(n.is, nil) + v2 := &n.is[l] + d.decode(v2) + v = *v2 + n.is = n.is[:l] + } + bfn := d.h.getExtForTag(tag) + if bfn == nil { + var re RawExt + re.Tag = tag + re.Data = detachZeroCopyBytes(d.bytes, nil, bytes) + rvn = reflect.ValueOf(re) + } else { + rvnA := reflect.New(bfn.rt) + rvn = rvnA.Elem() + if bytes != nil { + bfn.ext.ReadExt(rvnA.Interface(), bytes) + } else { + bfn.ext.UpdateExt(rvnA.Interface(), v) + } + } + case valueTypeNil: + // no-op + case valueTypeInt: + rvn = reflect.ValueOf(&n.i).Elem() + case valueTypeUint: + rvn = reflect.ValueOf(&n.u).Elem() + case valueTypeFloat: + rvn = reflect.ValueOf(&n.f).Elem() + case valueTypeBool: + rvn = reflect.ValueOf(&n.b).Elem() + case valueTypeString, valueTypeSymbol: + rvn = reflect.ValueOf(&n.s).Elem() + case valueTypeBytes: + rvn = reflect.ValueOf(&n.l).Elem() + case valueTypeTimestamp: + rvn = reflect.ValueOf(&n.t).Elem() + default: + panic(fmt.Errorf("kInterfaceNaked: unexpected valueType: %d", n.v)) + } + return +} + +func (f *decFnInfo) kInterface(rv reflect.Value) { + // debugf("\t===> kInterface") + + // Note: + // A consequence of how kInterface works, is that + // if an interface already contains something, we try + // to decode into what was there before. + // We do not replace with a generic value (as got from decodeNaked). + + var rvn reflect.Value + if rv.IsNil() { + rvn = f.kInterfaceNaked() + if rvn.IsValid() { + rv.Set(rvn) + } + } else if f.d.h.InterfaceReset { + rvn = f.kInterfaceNaked() + if rvn.IsValid() { + rv.Set(rvn) + } else { + // reset to zero value based on current type in there. + rv.Set(reflect.Zero(rv.Elem().Type())) + } + } else { + rvn = rv.Elem() + // Note: interface{} is settable, but underlying type may not be. + // Consequently, we have to set the reflect.Value directly. + // if underlying type is settable (e.g. ptr or interface), + // we just decode into it. + // Else we create a settable value, decode into it, and set on the interface. + if rvn.CanSet() { + f.d.decodeValue(rvn, nil) + } else { + rvn2 := reflect.New(rvn.Type()).Elem() + rvn2.Set(rvn) + f.d.decodeValue(rvn2, nil) + rv.Set(rvn2) + } + } +} + +func (f *decFnInfo) kStruct(rv reflect.Value) { + fti := f.ti + d := f.d + dd := d.d + cr := d.cr + ctyp := dd.ContainerType() + if ctyp == valueTypeMap { + containerLen := dd.ReadMapStart() + if containerLen == 0 { + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return + } + tisfi := fti.sfi + hasLen := containerLen >= 0 + if hasLen { + for j := 0; j < containerLen; j++ { + // rvkencname := dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + rvkencname := stringView(dd.DecodeBytes(f.d.b[:], true, true)) + // rvksi := ti.getForEncName(rvkencname) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if k := fti.indexForEncName(rvkencname); k > -1 { + si := tisfi[k] + if dd.TryDecodeAsNil() { + si.setToZeroValue(rv) + } else { + d.decodeValue(si.field(rv, true), nil) + } + } else { + d.structFieldNotFound(-1, rvkencname) + } + } + } else { + for j := 0; !dd.CheckBreak(); j++ { + // rvkencname := dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + rvkencname := stringView(dd.DecodeBytes(f.d.b[:], true, true)) + // rvksi := ti.getForEncName(rvkencname) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if k := fti.indexForEncName(rvkencname); k > -1 { + si := tisfi[k] + if dd.TryDecodeAsNil() { + si.setToZeroValue(rv) + } else { + d.decodeValue(si.field(rv, true), nil) + } + } else { + d.structFieldNotFound(-1, rvkencname) + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + } else if ctyp == valueTypeArray { + containerLen := dd.ReadArrayStart() + if containerLen == 0 { + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } + return + } + // Not much gain from doing it two ways for array. + // Arrays are not used as much for structs. + hasLen := containerLen >= 0 + for j, si := range fti.sfip { + if hasLen { + if j == containerLen { + break + } + } else if dd.CheckBreak() { + break + } + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + if dd.TryDecodeAsNil() { + si.setToZeroValue(rv) + } else { + d.decodeValue(si.field(rv, true), nil) + } + } + if containerLen > len(fti.sfip) { + // read remaining values and throw away + for j := len(fti.sfip); j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + d.structFieldNotFound(j, "") + } + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } + } else { + f.d.error(onlyMapOrArrayCanDecodeIntoStructErr) + return + } +} + +func (f *decFnInfo) kSlice(rv reflect.Value) { + // A slice can be set from a map or array in stream. + // This way, the order can be kept (as order is lost with map). + ti := f.ti + d := f.d + dd := d.d + rtelem0 := ti.rt.Elem() + ctyp := dd.ContainerType() + if ctyp == valueTypeBytes || ctyp == valueTypeString { + // you can only decode bytes or string in the stream into a slice or array of bytes + if !(ti.rtid == uint8SliceTypId || rtelem0.Kind() == reflect.Uint8) { + f.d.errorf("bytes or string in the stream must be decoded into a slice or array of bytes, not %v", ti.rt) + } + if f.seq == seqTypeChan { + bs2 := dd.DecodeBytes(nil, false, true) + ch := rv.Interface().(chan<- byte) + for _, b := range bs2 { + ch <- b + } + } else { + rvbs := rv.Bytes() + bs2 := dd.DecodeBytes(rvbs, false, false) + if rvbs == nil && bs2 != nil || rvbs != nil && bs2 == nil || len(bs2) != len(rvbs) { + if rv.CanSet() { + rv.SetBytes(bs2) + } else { + copy(rvbs, bs2) + } + } + } + return + } + + // array := f.seq == seqTypeChan + + slh, containerLenS := d.decSliceHelperStart() // only expects valueType(Array|Map) + + // // an array can never return a nil slice. so no need to check f.array here. + if containerLenS == 0 { + if f.seq == seqTypeSlice { + if rv.IsNil() { + rv.Set(reflect.MakeSlice(ti.rt, 0, 0)) + } else { + rv.SetLen(0) + } + } else if f.seq == seqTypeChan { + if rv.IsNil() { + rv.Set(reflect.MakeChan(ti.rt, 0)) + } + } + slh.End() + return + } + + rtelem := rtelem0 + for rtelem.Kind() == reflect.Ptr { + rtelem = rtelem.Elem() + } + fn := d.getDecFn(rtelem, true, true) + + var rv0, rv9 reflect.Value + rv0 = rv + rvChanged := false + + // for j := 0; j < containerLenS; j++ { + var rvlen int + if containerLenS > 0 { // hasLen + if f.seq == seqTypeChan { + if rv.IsNil() { + rvlen, _ = decInferLen(containerLenS, f.d.h.MaxInitLen, int(rtelem0.Size())) + rv.Set(reflect.MakeChan(ti.rt, rvlen)) + } + // handle chan specially: + for j := 0; j < containerLenS; j++ { + rv9 = reflect.New(rtelem0).Elem() + slh.ElemContainerState(j) + d.decodeValue(rv9, fn) + rv.Send(rv9) + } + } else { // slice or array + var truncated bool // says len of sequence is not same as expected number of elements + numToRead := containerLenS // if truncated, reset numToRead + + rvcap := rv.Cap() + rvlen = rv.Len() + if containerLenS > rvcap { + if f.seq == seqTypeArray { + d.arrayCannotExpand(rvlen, containerLenS) + } else { + oldRvlenGtZero := rvlen > 0 + rvlen, truncated = decInferLen(containerLenS, f.d.h.MaxInitLen, int(rtelem0.Size())) + if truncated { + if rvlen <= rvcap { + rv.SetLen(rvlen) + } else { + rv = reflect.MakeSlice(ti.rt, rvlen, rvlen) + rvChanged = true + } + } else { + rv = reflect.MakeSlice(ti.rt, rvlen, rvlen) + rvChanged = true + } + if rvChanged && oldRvlenGtZero && !isImmutableKind(rtelem0.Kind()) { + reflect.Copy(rv, rv0) // only copy up to length NOT cap i.e. rv0.Slice(0, rvcap) + } + rvcap = rvlen + } + numToRead = rvlen + } else if containerLenS != rvlen { + if f.seq == seqTypeSlice { + rv.SetLen(containerLenS) + rvlen = containerLenS + } + } + j := 0 + // we read up to the numToRead + for ; j < numToRead; j++ { + slh.ElemContainerState(j) + d.decodeValue(rv.Index(j), fn) + } + + // if slice, expand and read up to containerLenS (or EOF) iff truncated + // if array, swallow all the rest. + + if f.seq == seqTypeArray { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } else if truncated { // slice was truncated, as chan NOT in this block + for ; j < containerLenS; j++ { + rv = expandSliceValue(rv, 1) + rv9 = rv.Index(j) + if resetSliceElemToZeroValue { + rv9.Set(reflect.Zero(rtelem0)) + } + slh.ElemContainerState(j) + d.decodeValue(rv9, fn) + } + } + } + } else { + rvlen = rv.Len() + j := 0 + for ; !dd.CheckBreak(); j++ { + if f.seq == seqTypeChan { + slh.ElemContainerState(j) + rv9 = reflect.New(rtelem0).Elem() + d.decodeValue(rv9, fn) + rv.Send(rv9) + } else { + // if indefinite, etc, then expand the slice if necessary + var decodeIntoBlank bool + if j >= rvlen { + if f.seq == seqTypeArray { + d.arrayCannotExpand(rvlen, j+1) + decodeIntoBlank = true + } else { // if f.seq == seqTypeSlice + // rv = reflect.Append(rv, reflect.Zero(rtelem0)) // uses append logic, plus varargs + rv = expandSliceValue(rv, 1) + rv9 = rv.Index(j) + // rv.Index(rv.Len() - 1).Set(reflect.Zero(rtelem0)) + if resetSliceElemToZeroValue { + rv9.Set(reflect.Zero(rtelem0)) + } + rvlen++ + rvChanged = true + } + } else { // slice or array + rv9 = rv.Index(j) + } + slh.ElemContainerState(j) + if decodeIntoBlank { + d.swallow() + } else { // seqTypeSlice + d.decodeValue(rv9, fn) + } + } + } + if f.seq == seqTypeSlice { + if j < rvlen { + rv.SetLen(j) + } else if j == 0 && rv.IsNil() { + rv = reflect.MakeSlice(ti.rt, 0, 0) + rvChanged = true + } + } + } + slh.End() + + if rvChanged { + rv0.Set(rv) + } +} + +func (f *decFnInfo) kArray(rv reflect.Value) { + // f.d.decodeValue(rv.Slice(0, rv.Len())) + f.kSlice(rv.Slice(0, rv.Len())) +} + +func (f *decFnInfo) kMap(rv reflect.Value) { + d := f.d + dd := d.d + containerLen := dd.ReadMapStart() + cr := d.cr + ti := f.ti + if rv.IsNil() { + rv.Set(reflect.MakeMap(ti.rt)) + } + + if containerLen == 0 { + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return + } + + ktype, vtype := ti.rt.Key(), ti.rt.Elem() + ktypeId := reflect.ValueOf(ktype).Pointer() + vtypeKind := vtype.Kind() + var keyFn, valFn *decFn + var xtyp reflect.Type + for xtyp = ktype; xtyp.Kind() == reflect.Ptr; xtyp = xtyp.Elem() { + } + keyFn = d.getDecFn(xtyp, true, true) + for xtyp = vtype; xtyp.Kind() == reflect.Ptr; xtyp = xtyp.Elem() { + } + valFn = d.getDecFn(xtyp, true, true) + var mapGet, mapSet bool + if !f.d.h.MapValueReset { + // if pointer, mapGet = true + // if interface, mapGet = true if !DecodeNakedAlways (else false) + // if builtin, mapGet = false + // else mapGet = true + if vtypeKind == reflect.Ptr { + mapGet = true + } else if vtypeKind == reflect.Interface { + if !f.d.h.InterfaceReset { + mapGet = true + } + } else if !isImmutableKind(vtypeKind) { + mapGet = true + } + } + + var rvk, rvv, rvz reflect.Value + + // for j := 0; j < containerLen; j++ { + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + rvk = reflect.New(ktype).Elem() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + d.decodeValue(rvk, keyFn) + + // special case if a byte array. + if ktypeId == intfTypId { + rvk = rvk.Elem() + if rvk.Type() == uint8SliceTyp { + rvk = reflect.ValueOf(d.string(rvk.Bytes())) + } + } + mapSet = true // set to false if u do a get, and its a pointer, and exists + if mapGet { + rvv = rv.MapIndex(rvk) + if rvv.IsValid() { + if vtypeKind == reflect.Ptr { + mapSet = false + } + } else { + if rvz.IsValid() { + rvz.Set(reflect.Zero(vtype)) + } else { + rvz = reflect.New(vtype).Elem() + } + rvv = rvz + } + } else { + if rvz.IsValid() { + rvz.Set(reflect.Zero(vtype)) + } else { + rvz = reflect.New(vtype).Elem() + } + rvv = rvz + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + d.decodeValue(rvv, valFn) + if mapSet { + rv.SetMapIndex(rvk, rvv) + } + } + } else { + for j := 0; !dd.CheckBreak(); j++ { + rvk = reflect.New(ktype).Elem() + if cr != nil { + cr.sendContainerState(containerMapKey) + } + d.decodeValue(rvk, keyFn) + + // special case if a byte array. + if ktypeId == intfTypId { + rvk = rvk.Elem() + if rvk.Type() == uint8SliceTyp { + rvk = reflect.ValueOf(d.string(rvk.Bytes())) + } + } + mapSet = true // set to false if u do a get, and its a pointer, and exists + if mapGet { + rvv = rv.MapIndex(rvk) + if rvv.IsValid() { + if vtypeKind == reflect.Ptr { + mapSet = false + } + } else { + if rvz.IsValid() { + rvz.Set(reflect.Zero(vtype)) + } else { + rvz = reflect.New(vtype).Elem() + } + rvv = rvz + } + } else { + if rvz.IsValid() { + rvz.Set(reflect.Zero(vtype)) + } else { + rvz = reflect.New(vtype).Elem() + } + rvv = rvz + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + d.decodeValue(rvv, valFn) + if mapSet { + rv.SetMapIndex(rvk, rvv) + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +type decRtidFn struct { + rtid uintptr + fn decFn +} + +// decNaked is used to keep track of the primitives decoded. +// Without it, we would have to decode each primitive and wrap it +// in an interface{}, causing an allocation. +// In this model, the primitives are decoded in a "pseudo-atomic" fashion, +// so we can rest assured that no other decoding happens while these +// primitives are being decoded. +// +// maps and arrays are not handled by this mechanism. +// However, RawExt is, and we accomodate for extensions that decode +// RawExt from DecodeNaked, but need to decode the value subsequently. +// kInterfaceNaked and swallow, which call DecodeNaked, handle this caveat. +// +// However, decNaked also keeps some arrays of default maps and slices +// used in DecodeNaked. This way, we can get a pointer to it +// without causing a new heap allocation. +// +// kInterfaceNaked will ensure that there is no allocation for the common +// uses. +type decNaked struct { + // r RawExt // used for RawExt, uint, []byte. + u uint64 + i int64 + f float64 + l []byte + s string + t time.Time + b bool + v valueType + + // stacks for reducing allocation + is []interface{} + ms []map[interface{}]interface{} + ns []map[string]interface{} + ss [][]interface{} + // rs []RawExt + + // keep arrays at the bottom? Chance is that they are not used much. + ia [4]interface{} + ma [4]map[interface{}]interface{} + na [4]map[string]interface{} + sa [4][]interface{} + // ra [2]RawExt +} + +func (n *decNaked) reset() { + if n.ss != nil { + n.ss = n.ss[:0] + } + if n.is != nil { + n.is = n.is[:0] + } + if n.ms != nil { + n.ms = n.ms[:0] + } + if n.ns != nil { + n.ns = n.ns[:0] + } +} + +// A Decoder reads and decodes an object from an input stream in the codec format. +type Decoder struct { + // hopefully, reduce derefencing cost by laying the decReader inside the Decoder. + // Try to put things that go together to fit within a cache line (8 words). + + d decDriver + // NOTE: Decoder shouldn't call it's read methods, + // as the handler MAY need to do some coordination. + r decReader + // sa [initCollectionCap]decRtidFn + h *BasicHandle + hh Handle + + be bool // is binary encoding + bytes bool // is bytes reader + js bool // is json handle + + rb bytesDecReader + ri ioDecReader + cr containerStateRecv + + s []decRtidFn + f map[uintptr]*decFn + + // _ uintptr // for alignment purposes, so next one starts from a cache line + + // cache the mapTypeId and sliceTypeId for faster comparisons + mtid uintptr + stid uintptr + + n decNaked + b [scratchByteArrayLen]byte + is map[string]string // used for interning strings +} + +// NewDecoder returns a Decoder for decoding a stream of bytes from an io.Reader. +// +// For efficiency, Users are encouraged to pass in a memory buffered reader +// (eg bufio.Reader, bytes.Buffer). +func NewDecoder(r io.Reader, h Handle) *Decoder { + d := newDecoder(h) + d.Reset(r) + return d +} + +// NewDecoderBytes returns a Decoder which efficiently decodes directly +// from a byte slice with zero copying. +func NewDecoderBytes(in []byte, h Handle) *Decoder { + d := newDecoder(h) + d.ResetBytes(in) + return d +} + +func newDecoder(h Handle) *Decoder { + d := &Decoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()} + n := &d.n + // n.rs = n.ra[:0] + n.ms = n.ma[:0] + n.is = n.ia[:0] + n.ns = n.na[:0] + n.ss = n.sa[:0] + _, d.js = h.(*JsonHandle) + if d.h.InternString { + d.is = make(map[string]string, 32) + } + d.d = h.newDecDriver(d) + d.cr, _ = d.d.(containerStateRecv) + // d.d = h.newDecDriver(decReaderT{true, &d.rb, &d.ri}) + return d +} + +func (d *Decoder) resetCommon() { + d.n.reset() + d.d.reset() + // reset all things which were cached from the Handle, + // but could be changed. + d.mtid, d.stid = 0, 0 + if d.h.MapType != nil { + d.mtid = reflect.ValueOf(d.h.MapType).Pointer() + } + if d.h.SliceType != nil { + d.stid = reflect.ValueOf(d.h.SliceType).Pointer() + } +} + +func (d *Decoder) Reset(r io.Reader) { + d.ri.x = &d.b + // d.s = d.sa[:0] + d.ri.bs.r = r + var ok bool + d.ri.br, ok = r.(decReaderByteScanner) + if !ok { + d.ri.br = &d.ri.bs + } + d.r = &d.ri + d.resetCommon() +} + +func (d *Decoder) ResetBytes(in []byte) { + // d.s = d.sa[:0] + d.rb.reset(in) + d.r = &d.rb + d.resetCommon() +} + +// func (d *Decoder) sendContainerState(c containerState) { +// if d.cr != nil { +// d.cr.sendContainerState(c) +// } +// } + +// Decode decodes the stream from reader and stores the result in the +// value pointed to by v. v cannot be a nil pointer. v can also be +// a reflect.Value of a pointer. +// +// Note that a pointer to a nil interface is not a nil pointer. +// If you do not know what type of stream it is, pass in a pointer to a nil interface. +// We will decode and store a value in that nil interface. +// +// Sample usages: +// // Decoding into a non-nil typed value +// var f float32 +// err = codec.NewDecoder(r, handle).Decode(&f) +// +// // Decoding into nil interface +// var v interface{} +// dec := codec.NewDecoder(r, handle) +// err = dec.Decode(&v) +// +// When decoding into a nil interface{}, we will decode into an appropriate value based +// on the contents of the stream: +// - Numbers are decoded as float64, int64 or uint64. +// - Other values are decoded appropriately depending on the type: +// bool, string, []byte, time.Time, etc +// - Extensions are decoded as RawExt (if no ext function registered for the tag) +// Configurations exist on the Handle to override defaults +// (e.g. for MapType, SliceType and how to decode raw bytes). +// +// When decoding into a non-nil interface{} value, the mode of encoding is based on the +// type of the value. When a value is seen: +// - If an extension is registered for it, call that extension function +// - If it implements BinaryUnmarshaler, call its UnmarshalBinary(data []byte) error +// - Else decode it based on its reflect.Kind +// +// There are some special rules when decoding into containers (slice/array/map/struct). +// Decode will typically use the stream contents to UPDATE the container. +// - A map can be decoded from a stream map, by updating matching keys. +// - A slice can be decoded from a stream array, +// by updating the first n elements, where n is length of the stream. +// - A slice can be decoded from a stream map, by decoding as if +// it contains a sequence of key-value pairs. +// - A struct can be decoded from a stream map, by updating matching fields. +// - A struct can be decoded from a stream array, +// by updating fields as they occur in the struct (by index). +// +// When decoding a stream map or array with length of 0 into a nil map or slice, +// we reset the destination map or slice to a zero-length value. +// +// However, when decoding a stream nil, we reset the destination container +// to its "zero" value (e.g. nil for slice/map, etc). +// +func (d *Decoder) Decode(v interface{}) (err error) { + defer panicToErr(&err) + d.decode(v) + return +} + +// this is not a smart swallow, as it allocates objects and does unnecessary work. +func (d *Decoder) swallowViaHammer() { + var blank interface{} + d.decodeValue(reflect.ValueOf(&blank).Elem(), nil) +} + +func (d *Decoder) swallow() { + // smarter decode that just swallows the content + dd := d.d + if dd.TryDecodeAsNil() { + return + } + cr := d.cr + switch dd.ContainerType() { + case valueTypeMap: + containerLen := dd.ReadMapStart() + clenGtEqualZero := containerLen >= 0 + for j := 0; ; j++ { + if clenGtEqualZero { + if j >= containerLen { + break + } + } else if dd.CheckBreak() { + break + } + if cr != nil { + cr.sendContainerState(containerMapKey) + } + d.swallow() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + d.swallow() + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + case valueTypeArray: + containerLenS := dd.ReadArrayStart() + clenGtEqualZero := containerLenS >= 0 + for j := 0; ; j++ { + if clenGtEqualZero { + if j >= containerLenS { + break + } + } else if dd.CheckBreak() { + break + } + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + d.swallow() + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } + case valueTypeBytes: + dd.DecodeBytes(d.b[:], false, true) + case valueTypeString: + dd.DecodeBytes(d.b[:], true, true) + // dd.DecodeStringAsBytes(d.b[:]) + default: + // these are all primitives, which we can get from decodeNaked + // if RawExt using Value, complete the processing. + dd.DecodeNaked() + if n := &d.n; n.v == valueTypeExt && n.l == nil { + l := len(n.is) + n.is = append(n.is, nil) + v2 := &n.is[l] + d.decode(v2) + n.is = n.is[:l] + } + } +} + +// MustDecode is like Decode, but panics if unable to Decode. +// This provides insight to the code location that triggered the error. +func (d *Decoder) MustDecode(v interface{}) { + d.decode(v) +} + +func (d *Decoder) decode(iv interface{}) { + // if ics, ok := iv.(Selfer); ok { + // ics.CodecDecodeSelf(d) + // return + // } + + if d.d.TryDecodeAsNil() { + switch v := iv.(type) { + case nil: + case *string: + *v = "" + case *bool: + *v = false + case *int: + *v = 0 + case *int8: + *v = 0 + case *int16: + *v = 0 + case *int32: + *v = 0 + case *int64: + *v = 0 + case *uint: + *v = 0 + case *uint8: + *v = 0 + case *uint16: + *v = 0 + case *uint32: + *v = 0 + case *uint64: + *v = 0 + case *float32: + *v = 0 + case *float64: + *v = 0 + case *[]uint8: + *v = nil + case reflect.Value: + if v.Kind() != reflect.Ptr || v.IsNil() { + d.errNotValidPtrValue(v) + } + // d.chkPtrValue(v) + v = v.Elem() + if v.IsValid() { + v.Set(reflect.Zero(v.Type())) + } + default: + rv := reflect.ValueOf(iv) + if rv.Kind() != reflect.Ptr || rv.IsNil() { + d.errNotValidPtrValue(rv) + } + // d.chkPtrValue(rv) + rv = rv.Elem() + if rv.IsValid() { + rv.Set(reflect.Zero(rv.Type())) + } + } + return + } + + switch v := iv.(type) { + case nil: + d.error(cannotDecodeIntoNilErr) + return + + case Selfer: + v.CodecDecodeSelf(d) + + case reflect.Value: + if v.Kind() != reflect.Ptr || v.IsNil() { + d.errNotValidPtrValue(v) + } + // d.chkPtrValue(v) + d.decodeValueNotNil(v.Elem(), nil) + + case *string: + *v = d.d.DecodeString() + case *bool: + *v = d.d.DecodeBool() + case *int: + *v = int(d.d.DecodeInt(intBitsize)) + case *int8: + *v = int8(d.d.DecodeInt(8)) + case *int16: + *v = int16(d.d.DecodeInt(16)) + case *int32: + *v = int32(d.d.DecodeInt(32)) + case *int64: + *v = d.d.DecodeInt(64) + case *uint: + *v = uint(d.d.DecodeUint(uintBitsize)) + case *uint8: + *v = uint8(d.d.DecodeUint(8)) + case *uint16: + *v = uint16(d.d.DecodeUint(16)) + case *uint32: + *v = uint32(d.d.DecodeUint(32)) + case *uint64: + *v = d.d.DecodeUint(64) + case *float32: + *v = float32(d.d.DecodeFloat(true)) + case *float64: + *v = d.d.DecodeFloat(false) + case *[]uint8: + *v = d.d.DecodeBytes(*v, false, false) + + case *interface{}: + d.decodeValueNotNil(reflect.ValueOf(iv).Elem(), nil) + + default: + if !fastpathDecodeTypeSwitch(iv, d) { + d.decodeI(iv, true, false, false, false) + } + } +} + +func (d *Decoder) preDecodeValue(rv reflect.Value, tryNil bool) (rv2 reflect.Value, proceed bool) { + if tryNil && d.d.TryDecodeAsNil() { + // No need to check if a ptr, recursively, to determine + // whether to set value to nil. + // Just always set value to its zero type. + if rv.IsValid() { // rv.CanSet() // always settable, except it's invalid + rv.Set(reflect.Zero(rv.Type())) + } + return + } + + // If stream is not containing a nil value, then we can deref to the base + // non-pointer value, and decode into that. + for rv.Kind() == reflect.Ptr { + if rv.IsNil() { + rv.Set(reflect.New(rv.Type().Elem())) + } + rv = rv.Elem() + } + return rv, true +} + +func (d *Decoder) decodeI(iv interface{}, checkPtr, tryNil, checkFastpath, checkCodecSelfer bool) { + rv := reflect.ValueOf(iv) + if checkPtr { + if rv.Kind() != reflect.Ptr || rv.IsNil() { + d.errNotValidPtrValue(rv) + } + // d.chkPtrValue(rv) + } + rv, proceed := d.preDecodeValue(rv, tryNil) + if proceed { + fn := d.getDecFn(rv.Type(), checkFastpath, checkCodecSelfer) + fn.f(&fn.i, rv) + } +} + +func (d *Decoder) decodeValue(rv reflect.Value, fn *decFn) { + if rv, proceed := d.preDecodeValue(rv, true); proceed { + if fn == nil { + fn = d.getDecFn(rv.Type(), true, true) + } + fn.f(&fn.i, rv) + } +} + +func (d *Decoder) decodeValueNotNil(rv reflect.Value, fn *decFn) { + if rv, proceed := d.preDecodeValue(rv, false); proceed { + if fn == nil { + fn = d.getDecFn(rv.Type(), true, true) + } + fn.f(&fn.i, rv) + } +} + +func (d *Decoder) getDecFn(rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn *decFn) { + rtid := reflect.ValueOf(rt).Pointer() + + // retrieve or register a focus'ed function for this type + // to eliminate need to do the retrieval multiple times + + // if d.f == nil && d.s == nil { debugf("---->Creating new dec f map for type: %v\n", rt) } + var ok bool + if useMapForCodecCache { + fn, ok = d.f[rtid] + } else { + for i := range d.s { + v := &(d.s[i]) + if v.rtid == rtid { + fn, ok = &(v.fn), true + break + } + } + } + if ok { + return + } + + if useMapForCodecCache { + if d.f == nil { + d.f = make(map[uintptr]*decFn, initCollectionCap) + } + fn = new(decFn) + d.f[rtid] = fn + } else { + if d.s == nil { + d.s = make([]decRtidFn, 0, initCollectionCap) + } + d.s = append(d.s, decRtidFn{rtid: rtid}) + fn = &(d.s[len(d.s)-1]).fn + } + + // debugf("\tCreating new dec fn for type: %v\n", rt) + ti := d.h.getTypeInfo(rtid, rt) + fi := &(fn.i) + fi.d = d + fi.ti = ti + + // An extension can be registered for any type, regardless of the Kind + // (e.g. type BitSet int64, type MyStruct { / * unexported fields * / }, type X []int, etc. + // + // We can't check if it's an extension byte here first, because the user may have + // registered a pointer or non-pointer type, meaning we may have to recurse first + // before matching a mapped type, even though the extension byte is already detected. + // + // NOTE: if decoding into a nil interface{}, we return a non-nil + // value except even if the container registers a length of 0. + if checkCodecSelfer && ti.cs { + fn.f = (*decFnInfo).selferUnmarshal + } else if rtid == rawExtTypId { + fn.f = (*decFnInfo).rawExt + } else if d.d.IsBuiltinType(rtid) { + fn.f = (*decFnInfo).builtin + } else if xfFn := d.h.getExt(rtid); xfFn != nil { + fi.xfTag, fi.xfFn = xfFn.tag, xfFn.ext + fn.f = (*decFnInfo).ext + } else if supportMarshalInterfaces && d.be && ti.bunm { + fn.f = (*decFnInfo).binaryUnmarshal + } else if supportMarshalInterfaces && !d.be && d.js && ti.junm { + //If JSON, we should check JSONUnmarshal before textUnmarshal + fn.f = (*decFnInfo).jsonUnmarshal + } else if supportMarshalInterfaces && !d.be && ti.tunm { + fn.f = (*decFnInfo).textUnmarshal + } else { + rk := rt.Kind() + if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) { + if rt.PkgPath() == "" { + if idx := fastpathAV.index(rtid); idx != -1 { + fn.f = fastpathAV[idx].decfn + } + } else { + // use mapping for underlying type if there + ok = false + var rtu reflect.Type + if rk == reflect.Map { + rtu = reflect.MapOf(rt.Key(), rt.Elem()) + } else { + rtu = reflect.SliceOf(rt.Elem()) + } + rtuid := reflect.ValueOf(rtu).Pointer() + if idx := fastpathAV.index(rtuid); idx != -1 { + xfnf := fastpathAV[idx].decfn + xrt := fastpathAV[idx].rt + fn.f = func(xf *decFnInfo, xrv reflect.Value) { + // xfnf(xf, xrv.Convert(xrt)) + xfnf(xf, xrv.Addr().Convert(reflect.PtrTo(xrt)).Elem()) + } + } + } + } + if fn.f == nil { + switch rk { + case reflect.String: + fn.f = (*decFnInfo).kString + case reflect.Bool: + fn.f = (*decFnInfo).kBool + case reflect.Int: + fn.f = (*decFnInfo).kInt + case reflect.Int64: + fn.f = (*decFnInfo).kInt64 + case reflect.Int32: + fn.f = (*decFnInfo).kInt32 + case reflect.Int8: + fn.f = (*decFnInfo).kInt8 + case reflect.Int16: + fn.f = (*decFnInfo).kInt16 + case reflect.Float32: + fn.f = (*decFnInfo).kFloat32 + case reflect.Float64: + fn.f = (*decFnInfo).kFloat64 + case reflect.Uint8: + fn.f = (*decFnInfo).kUint8 + case reflect.Uint64: + fn.f = (*decFnInfo).kUint64 + case reflect.Uint: + fn.f = (*decFnInfo).kUint + case reflect.Uint32: + fn.f = (*decFnInfo).kUint32 + case reflect.Uint16: + fn.f = (*decFnInfo).kUint16 + // case reflect.Ptr: + // fn.f = (*decFnInfo).kPtr + case reflect.Uintptr: + fn.f = (*decFnInfo).kUintptr + case reflect.Interface: + fn.f = (*decFnInfo).kInterface + case reflect.Struct: + fn.f = (*decFnInfo).kStruct + case reflect.Chan: + fi.seq = seqTypeChan + fn.f = (*decFnInfo).kSlice + case reflect.Slice: + fi.seq = seqTypeSlice + fn.f = (*decFnInfo).kSlice + case reflect.Array: + fi.seq = seqTypeArray + fn.f = (*decFnInfo).kArray + case reflect.Map: + fn.f = (*decFnInfo).kMap + default: + fn.f = (*decFnInfo).kErr + } + } + } + + return +} + +func (d *Decoder) structFieldNotFound(index int, rvkencname string) { + // NOTE: rvkencname may be a stringView, so don't pass it to another function. + if d.h.ErrorIfNoField { + if index >= 0 { + d.errorf("no matching struct field found when decoding stream array at index %v", index) + return + } else if rvkencname != "" { + d.errorf("no matching struct field found when decoding stream map with key " + rvkencname) + return + } + } + d.swallow() +} + +func (d *Decoder) arrayCannotExpand(sliceLen, streamLen int) { + if d.h.ErrorIfNoArrayExpand { + d.errorf("cannot expand array len during decode from %v to %v", sliceLen, streamLen) + } +} + +func (d *Decoder) chkPtrValue(rv reflect.Value) { + // We can only decode into a non-nil pointer + if rv.Kind() == reflect.Ptr && !rv.IsNil() { + return + } + d.errNotValidPtrValue(rv) +} + +func (d *Decoder) errNotValidPtrValue(rv reflect.Value) { + if !rv.IsValid() { + d.error(cannotDecodeIntoNilErr) + return + } + if !rv.CanInterface() { + d.errorf("cannot decode into a value without an interface: %v", rv) + return + } + rvi := rv.Interface() + d.errorf("cannot decode into non-pointer or nil pointer. Got: %v, %T, %v", rv.Kind(), rvi, rvi) +} + +func (d *Decoder) error(err error) { + panic(err) +} + +func (d *Decoder) errorf(format string, params ...interface{}) { + params2 := make([]interface{}, len(params)+1) + params2[0] = d.r.numread() + copy(params2[1:], params) + err := fmt.Errorf("[pos %d]: "+format, params2...) + panic(err) +} + +func (d *Decoder) string(v []byte) (s string) { + if d.is != nil { + s, ok := d.is[string(v)] // no allocation here. + if !ok { + s = string(v) + d.is[s] = s + } + return s + } + return string(v) // don't return stringView, as we need a real string here. +} + +func (d *Decoder) intern(s string) { + if d.is != nil { + d.is[s] = s + } +} + +// nextValueBytes returns the next value in the stream as a set of bytes. +func (d *Decoder) nextValueBytes() []byte { + d.d.uncacheRead() + d.r.track() + d.swallow() + return d.r.stopTrack() +} + +// -------------------------------------------------- + +// decSliceHelper assists when decoding into a slice, from a map or an array in the stream. +// A slice can be set from a map or array in stream. This supports the MapBySlice interface. +type decSliceHelper struct { + d *Decoder + // ct valueType + array bool +} + +func (d *Decoder) decSliceHelperStart() (x decSliceHelper, clen int) { + dd := d.d + ctyp := dd.ContainerType() + if ctyp == valueTypeArray { + x.array = true + clen = dd.ReadArrayStart() + } else if ctyp == valueTypeMap { + clen = dd.ReadMapStart() * 2 + } else { + d.errorf("only encoded map or array can be decoded into a slice (%d)", ctyp) + } + // x.ct = ctyp + x.d = d + return +} + +func (x decSliceHelper) End() { + cr := x.d.cr + if cr == nil { + return + } + if x.array { + cr.sendContainerState(containerArrayEnd) + } else { + cr.sendContainerState(containerMapEnd) + } +} + +func (x decSliceHelper) ElemContainerState(index int) { + cr := x.d.cr + if cr == nil { + return + } + if x.array { + cr.sendContainerState(containerArrayElem) + } else { + if index%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } +} + +func decByteSlice(r decReader, clen int, bs []byte) (bsOut []byte) { + if clen == 0 { + return zeroByteSlice + } + if len(bs) == clen { + bsOut = bs + } else if cap(bs) >= clen { + bsOut = bs[:clen] + } else { + bsOut = make([]byte, clen) + } + r.readb(bsOut) + return +} + +func detachZeroCopyBytes(isBytesReader bool, dest []byte, in []byte) (out []byte) { + if xlen := len(in); xlen > 0 { + if isBytesReader || xlen <= scratchByteArrayLen { + if cap(dest) >= xlen { + out = dest[:xlen] + } else { + out = make([]byte, xlen) + } + copy(out, in) + return + } + } + return in +} + +// decInferLen will infer a sensible length, given the following: +// - clen: length wanted. +// - maxlen: max length to be returned. +// if <= 0, it is unset, and we infer it based on the unit size +// - unit: number of bytes for each element of the collection +func decInferLen(clen, maxlen, unit int) (rvlen int, truncated bool) { + // handle when maxlen is not set i.e. <= 0 + if clen <= 0 { + return + } + if maxlen <= 0 { + // no maxlen defined. Use maximum of 256K memory, with a floor of 4K items. + // maxlen = 256 * 1024 / unit + // if maxlen < (4 * 1024) { + // maxlen = 4 * 1024 + // } + if unit < (256 / 4) { + maxlen = 256 * 1024 / unit + } else { + maxlen = 4 * 1024 + } + } + if clen > maxlen { + rvlen = maxlen + truncated = true + } else { + rvlen = clen + } + return + // if clen <= 0 { + // rvlen = 0 + // } else if maxlen > 0 && clen > maxlen { + // rvlen = maxlen + // truncated = true + // } else { + // rvlen = clen + // } + // return +} + +// // implement overall decReader wrapping both, for possible use inline: +// type decReaderT struct { +// bytes bool +// rb *bytesDecReader +// ri *ioDecReader +// } +// +// // implement *Decoder as a decReader. +// // Using decReaderT (defined just above) caused performance degradation +// // possibly because of constant copying the value, +// // and some value->interface conversion causing allocation. +// func (d *Decoder) unreadn1() { +// if d.bytes { +// d.rb.unreadn1() +// } else { +// d.ri.unreadn1() +// } +// } +// ... for other methods of decReader. +// Testing showed that performance improvement was negligible. diff --git a/vendor/github.com/ugorji/go/codec/encode.go b/vendor/github.com/ugorji/go/codec/encode.go new file mode 100644 index 000000000..a60daa236 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/encode.go @@ -0,0 +1,1422 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "encoding" + "fmt" + "io" + "reflect" + "sort" + "sync" +) + +const ( + defEncByteBufSize = 1 << 6 // 4:16, 6:64, 8:256, 10:1024 +) + +// AsSymbolFlag defines what should be encoded as symbols. +type AsSymbolFlag uint8 + +const ( + // AsSymbolDefault is default. + // Currently, this means only encode struct field names as symbols. + // The default is subject to change. + AsSymbolDefault AsSymbolFlag = iota + + // AsSymbolAll means encode anything which could be a symbol as a symbol. + AsSymbolAll = 0xfe + + // AsSymbolNone means do not encode anything as a symbol. + AsSymbolNone = 1 << iota + + // AsSymbolMapStringKeys means encode keys in map[string]XXX as symbols. + AsSymbolMapStringKeysFlag + + // AsSymbolStructFieldName means encode struct field names as symbols. + AsSymbolStructFieldNameFlag +) + +// encWriter abstracts writing to a byte array or to an io.Writer. +type encWriter interface { + writeb([]byte) + writestr(string) + writen1(byte) + writen2(byte, byte) + atEndOfEncode() +} + +// encDriver abstracts the actual codec (binc vs msgpack, etc) +type encDriver interface { + IsBuiltinType(rt uintptr) bool + EncodeBuiltin(rt uintptr, v interface{}) + EncodeNil() + EncodeInt(i int64) + EncodeUint(i uint64) + EncodeBool(b bool) + EncodeFloat32(f float32) + EncodeFloat64(f float64) + // encodeExtPreamble(xtag byte, length int) + EncodeRawExt(re *RawExt, e *Encoder) + EncodeExt(v interface{}, xtag uint64, ext Ext, e *Encoder) + EncodeArrayStart(length int) + EncodeMapStart(length int) + EncodeString(c charEncoding, v string) + EncodeSymbol(v string) + EncodeStringBytes(c charEncoding, v []byte) + //TODO + //encBignum(f *big.Int) + //encStringRunes(c charEncoding, v []rune) + + reset() +} + +type encDriverAsis interface { + EncodeAsis(v []byte) +} + +type encNoSeparator struct{} + +func (_ encNoSeparator) EncodeEnd() {} + +type ioEncWriterWriter interface { + WriteByte(c byte) error + WriteString(s string) (n int, err error) + Write(p []byte) (n int, err error) +} + +type ioEncStringWriter interface { + WriteString(s string) (n int, err error) +} + +type EncodeOptions struct { + // Encode a struct as an array, and not as a map + StructToArray bool + + // Canonical representation means that encoding a value will always result in the same + // sequence of bytes. + // + // This only affects maps, as the iteration order for maps is random. + // + // The implementation MAY use the natural sort order for the map keys if possible: + // + // - If there is a natural sort order (ie for number, bool, string or []byte keys), + // then the map keys are first sorted in natural order and then written + // with corresponding map values to the strema. + // - If there is no natural sort order, then the map keys will first be + // encoded into []byte, and then sorted, + // before writing the sorted keys and the corresponding map values to the stream. + // + Canonical bool + + // CheckCircularRef controls whether we check for circular references + // and error fast during an encode. + // + // If enabled, an error is received if a pointer to a struct + // references itself either directly or through one of its fields (iteratively). + // + // This is opt-in, as there may be a performance hit to checking circular references. + CheckCircularRef bool + + // AsSymbols defines what should be encoded as symbols. + // + // Encoding as symbols can reduce the encoded size significantly. + // + // However, during decoding, each string to be encoded as a symbol must + // be checked to see if it has been seen before. Consequently, encoding time + // will increase if using symbols, because string comparisons has a clear cost. + // + // Sample values: + // AsSymbolNone + // AsSymbolAll + // AsSymbolMapStringKeys + // AsSymbolMapStringKeysFlag | AsSymbolStructFieldNameFlag + AsSymbols AsSymbolFlag +} + +// --------------------------------------------- + +type simpleIoEncWriterWriter struct { + w io.Writer + bw io.ByteWriter + sw ioEncStringWriter + bs [1]byte +} + +func (o *simpleIoEncWriterWriter) WriteByte(c byte) (err error) { + if o.bw != nil { + return o.bw.WriteByte(c) + } + // _, err = o.w.Write([]byte{c}) + o.bs[0] = c + _, err = o.w.Write(o.bs[:]) + return +} + +func (o *simpleIoEncWriterWriter) WriteString(s string) (n int, err error) { + if o.sw != nil { + return o.sw.WriteString(s) + } + // return o.w.Write([]byte(s)) + return o.w.Write(bytesView(s)) +} + +func (o *simpleIoEncWriterWriter) Write(p []byte) (n int, err error) { + return o.w.Write(p) +} + +// ---------------------------------------- + +// ioEncWriter implements encWriter and can write to an io.Writer implementation +type ioEncWriter struct { + w ioEncWriterWriter + s simpleIoEncWriterWriter + // x [8]byte // temp byte array re-used internally for efficiency +} + +func (z *ioEncWriter) writeb(bs []byte) { + if len(bs) == 0 { + return + } + n, err := z.w.Write(bs) + if err != nil { + panic(err) + } + if n != len(bs) { + panic(fmt.Errorf("incorrect num bytes written. Expecting: %v, Wrote: %v", len(bs), n)) + } +} + +func (z *ioEncWriter) writestr(s string) { + n, err := z.w.WriteString(s) + if err != nil { + panic(err) + } + if n != len(s) { + panic(fmt.Errorf("incorrect num bytes written. Expecting: %v, Wrote: %v", len(s), n)) + } +} + +func (z *ioEncWriter) writen1(b byte) { + if err := z.w.WriteByte(b); err != nil { + panic(err) + } +} + +func (z *ioEncWriter) writen2(b1 byte, b2 byte) { + z.writen1(b1) + z.writen1(b2) +} + +func (z *ioEncWriter) atEndOfEncode() {} + +// ---------------------------------------- + +// bytesEncWriter implements encWriter and can write to an byte slice. +// It is used by Marshal function. +type bytesEncWriter struct { + b []byte + c int // cursor + out *[]byte // write out on atEndOfEncode +} + +func (z *bytesEncWriter) writeb(s []byte) { + if len(s) > 0 { + c := z.grow(len(s)) + copy(z.b[c:], s) + } +} + +func (z *bytesEncWriter) writestr(s string) { + if len(s) > 0 { + c := z.grow(len(s)) + copy(z.b[c:], s) + } +} + +func (z *bytesEncWriter) writen1(b1 byte) { + c := z.grow(1) + z.b[c] = b1 +} + +func (z *bytesEncWriter) writen2(b1 byte, b2 byte) { + c := z.grow(2) + z.b[c] = b1 + z.b[c+1] = b2 +} + +func (z *bytesEncWriter) atEndOfEncode() { + *(z.out) = z.b[:z.c] +} + +func (z *bytesEncWriter) grow(n int) (oldcursor int) { + oldcursor = z.c + z.c = oldcursor + n + if z.c > len(z.b) { + if z.c > cap(z.b) { + // appendslice logic (if cap < 1024, *2, else *1.25): more expensive. many copy calls. + // bytes.Buffer model (2*cap + n): much better + // bs := make([]byte, 2*cap(z.b)+n) + bs := make([]byte, growCap(cap(z.b), 1, n)) + copy(bs, z.b[:oldcursor]) + z.b = bs + } else { + z.b = z.b[:cap(z.b)] + } + } + return +} + +// --------------------------------------------- + +type encFnInfo struct { + e *Encoder + ti *typeInfo + xfFn Ext + xfTag uint64 + seq seqType +} + +func (f *encFnInfo) builtin(rv reflect.Value) { + f.e.e.EncodeBuiltin(f.ti.rtid, rv.Interface()) +} + +func (f *encFnInfo) rawExt(rv reflect.Value) { + // rev := rv.Interface().(RawExt) + // f.e.e.EncodeRawExt(&rev, f.e) + var re *RawExt + if rv.CanAddr() { + re = rv.Addr().Interface().(*RawExt) + } else { + rev := rv.Interface().(RawExt) + re = &rev + } + f.e.e.EncodeRawExt(re, f.e) +} + +func (f *encFnInfo) ext(rv reflect.Value) { + // if this is a struct|array and it was addressable, then pass the address directly (not the value) + if k := rv.Kind(); (k == reflect.Struct || k == reflect.Array) && rv.CanAddr() { + rv = rv.Addr() + } + f.e.e.EncodeExt(rv.Interface(), f.xfTag, f.xfFn, f.e) +} + +func (f *encFnInfo) getValueForMarshalInterface(rv reflect.Value, indir int8) (v interface{}, proceed bool) { + if indir == 0 { + v = rv.Interface() + } else if indir == -1 { + // If a non-pointer was passed to Encode(), then that value is not addressable. + // Take addr if addresable, else copy value to an addressable value. + if rv.CanAddr() { + v = rv.Addr().Interface() + } else { + rv2 := reflect.New(rv.Type()) + rv2.Elem().Set(rv) + v = rv2.Interface() + // fmt.Printf("rv.Type: %v, rv2.Type: %v, v: %v\n", rv.Type(), rv2.Type(), v) + } + } else { + for j := int8(0); j < indir; j++ { + if rv.IsNil() { + f.e.e.EncodeNil() + return + } + rv = rv.Elem() + } + v = rv.Interface() + } + return v, true +} + +func (f *encFnInfo) selferMarshal(rv reflect.Value) { + if v, proceed := f.getValueForMarshalInterface(rv, f.ti.csIndir); proceed { + v.(Selfer).CodecEncodeSelf(f.e) + } +} + +func (f *encFnInfo) binaryMarshal(rv reflect.Value) { + if v, proceed := f.getValueForMarshalInterface(rv, f.ti.bmIndir); proceed { + bs, fnerr := v.(encoding.BinaryMarshaler).MarshalBinary() + f.e.marshal(bs, fnerr, false, c_RAW) + } +} + +func (f *encFnInfo) textMarshal(rv reflect.Value) { + if v, proceed := f.getValueForMarshalInterface(rv, f.ti.tmIndir); proceed { + // debugf(">>>> encoding.TextMarshaler: %T", rv.Interface()) + bs, fnerr := v.(encoding.TextMarshaler).MarshalText() + f.e.marshal(bs, fnerr, false, c_UTF8) + } +} + +func (f *encFnInfo) jsonMarshal(rv reflect.Value) { + if v, proceed := f.getValueForMarshalInterface(rv, f.ti.jmIndir); proceed { + bs, fnerr := v.(jsonMarshaler).MarshalJSON() + f.e.marshal(bs, fnerr, true, c_UTF8) + } +} + +func (f *encFnInfo) kBool(rv reflect.Value) { + f.e.e.EncodeBool(rv.Bool()) +} + +func (f *encFnInfo) kString(rv reflect.Value) { + f.e.e.EncodeString(c_UTF8, rv.String()) +} + +func (f *encFnInfo) kFloat64(rv reflect.Value) { + f.e.e.EncodeFloat64(rv.Float()) +} + +func (f *encFnInfo) kFloat32(rv reflect.Value) { + f.e.e.EncodeFloat32(float32(rv.Float())) +} + +func (f *encFnInfo) kInt(rv reflect.Value) { + f.e.e.EncodeInt(rv.Int()) +} + +func (f *encFnInfo) kUint(rv reflect.Value) { + f.e.e.EncodeUint(rv.Uint()) +} + +func (f *encFnInfo) kInvalid(rv reflect.Value) { + f.e.e.EncodeNil() +} + +func (f *encFnInfo) kErr(rv reflect.Value) { + f.e.errorf("unsupported kind %s, for %#v", rv.Kind(), rv) +} + +func (f *encFnInfo) kSlice(rv reflect.Value) { + ti := f.ti + // array may be non-addressable, so we have to manage with care + // (don't call rv.Bytes, rv.Slice, etc). + // E.g. type struct S{B [2]byte}; + // Encode(S{}) will bomb on "panic: slice of unaddressable array". + e := f.e + if f.seq != seqTypeArray { + if rv.IsNil() { + e.e.EncodeNil() + return + } + // If in this method, then there was no extension function defined. + // So it's okay to treat as []byte. + if ti.rtid == uint8SliceTypId { + e.e.EncodeStringBytes(c_RAW, rv.Bytes()) + return + } + } + cr := e.cr + rtelem := ti.rt.Elem() + l := rv.Len() + if ti.rtid == uint8SliceTypId || rtelem.Kind() == reflect.Uint8 { + switch f.seq { + case seqTypeArray: + // if l == 0 { e.e.encodeStringBytes(c_RAW, nil) } else + if rv.CanAddr() { + e.e.EncodeStringBytes(c_RAW, rv.Slice(0, l).Bytes()) + } else { + var bs []byte + if l <= cap(e.b) { + bs = e.b[:l] + } else { + bs = make([]byte, l) + } + reflect.Copy(reflect.ValueOf(bs), rv) + // TODO: Test that reflect.Copy works instead of manual one-by-one + // for i := 0; i < l; i++ { + // bs[i] = byte(rv.Index(i).Uint()) + // } + e.e.EncodeStringBytes(c_RAW, bs) + } + case seqTypeSlice: + e.e.EncodeStringBytes(c_RAW, rv.Bytes()) + case seqTypeChan: + bs := e.b[:0] + // do not use range, so that the number of elements encoded + // does not change, and encoding does not hang waiting on someone to close chan. + // for b := range rv.Interface().(<-chan byte) { + // bs = append(bs, b) + // } + ch := rv.Interface().(<-chan byte) + for i := 0; i < l; i++ { + bs = append(bs, <-ch) + } + e.e.EncodeStringBytes(c_RAW, bs) + } + return + } + + if ti.mbs { + if l%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", l) + return + } + e.e.EncodeMapStart(l / 2) + } else { + e.e.EncodeArrayStart(l) + } + + if l > 0 { + for rtelem.Kind() == reflect.Ptr { + rtelem = rtelem.Elem() + } + // if kind is reflect.Interface, do not pre-determine the + // encoding type, because preEncodeValue may break it down to + // a concrete type and kInterface will bomb. + var fn *encFn + if rtelem.Kind() != reflect.Interface { + rtelemid := reflect.ValueOf(rtelem).Pointer() + fn = e.getEncFn(rtelemid, rtelem, true, true) + } + // TODO: Consider perf implication of encoding odd index values as symbols if type is string + for j := 0; j < l; j++ { + if cr != nil { + if ti.mbs { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } else { + cr.sendContainerState(containerArrayElem) + } + } + if f.seq == seqTypeChan { + if rv2, ok2 := rv.Recv(); ok2 { + e.encodeValue(rv2, fn) + } else { + e.encode(nil) // WE HAVE TO DO SOMETHING, so nil if nothing received. + } + } else { + e.encodeValue(rv.Index(j), fn) + } + } + } + + if cr != nil { + if ti.mbs { + cr.sendContainerState(containerMapEnd) + } else { + cr.sendContainerState(containerArrayEnd) + } + } +} + +func (f *encFnInfo) kStruct(rv reflect.Value) { + fti := f.ti + e := f.e + cr := e.cr + tisfi := fti.sfip + toMap := !(fti.toArray || e.h.StructToArray) + newlen := len(fti.sfi) + + // Use sync.Pool to reduce allocating slices unnecessarily. + // The cost of sync.Pool is less than the cost of new allocation. + pool, poolv, fkvs := encStructPoolGet(newlen) + + // if toMap, use the sorted array. If toArray, use unsorted array (to match sequence in struct) + if toMap { + tisfi = fti.sfi + } + newlen = 0 + var kv stringRv + for _, si := range tisfi { + kv.r = si.field(rv, false) + if toMap { + if si.omitEmpty && isEmptyValue(kv.r) { + continue + } + kv.v = si.encName + } else { + // use the zero value. + // if a reference or struct, set to nil (so you do not output too much) + if si.omitEmpty && isEmptyValue(kv.r) { + switch kv.r.Kind() { + case reflect.Struct, reflect.Interface, reflect.Ptr, reflect.Array, + reflect.Map, reflect.Slice: + kv.r = reflect.Value{} //encode as nil + } + } + } + fkvs[newlen] = kv + newlen++ + } + + // debugf(">>>> kStruct: newlen: %v", newlen) + // sep := !e.be + ee := e.e //don't dereference everytime + + if toMap { + ee.EncodeMapStart(newlen) + // asSymbols := e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 + asSymbols := e.h.AsSymbols == AsSymbolDefault || e.h.AsSymbols&AsSymbolStructFieldNameFlag != 0 + for j := 0; j < newlen; j++ { + kv = fkvs[j] + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(kv.v) + } else { + ee.EncodeString(c_UTF8, kv.v) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(kv.r, nil) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + } else { + ee.EncodeArrayStart(newlen) + for j := 0; j < newlen; j++ { + kv = fkvs[j] + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + e.encodeValue(kv.r, nil) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } + } + + // do not use defer. Instead, use explicit pool return at end of function. + // defer has a cost we are trying to avoid. + // If there is a panic and these slices are not returned, it is ok. + if pool != nil { + pool.Put(poolv) + } +} + +// func (f *encFnInfo) kPtr(rv reflect.Value) { +// debugf(">>>>>>> ??? encode kPtr called - shouldn't get called") +// if rv.IsNil() { +// f.e.e.encodeNil() +// return +// } +// f.e.encodeValue(rv.Elem()) +// } + +// func (f *encFnInfo) kInterface(rv reflect.Value) { +// println("kInterface called") +// debug.PrintStack() +// if rv.IsNil() { +// f.e.e.EncodeNil() +// return +// } +// f.e.encodeValue(rv.Elem(), nil) +// } + +func (f *encFnInfo) kMap(rv reflect.Value) { + ee := f.e.e + if rv.IsNil() { + ee.EncodeNil() + return + } + + l := rv.Len() + ee.EncodeMapStart(l) + e := f.e + cr := e.cr + if l == 0 { + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return + } + var asSymbols bool + // determine the underlying key and val encFn's for the map. + // This eliminates some work which is done for each loop iteration i.e. + // rv.Type(), ref.ValueOf(rt).Pointer(), then check map/list for fn. + // + // However, if kind is reflect.Interface, do not pre-determine the + // encoding type, because preEncodeValue may break it down to + // a concrete type and kInterface will bomb. + var keyFn, valFn *encFn + ti := f.ti + rtkey := ti.rt.Key() + rtval := ti.rt.Elem() + rtkeyid := reflect.ValueOf(rtkey).Pointer() + // keyTypeIsString := f.ti.rt.Key().Kind() == reflect.String + var keyTypeIsString = rtkeyid == stringTypId + if keyTypeIsString { + asSymbols = e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + } else { + for rtkey.Kind() == reflect.Ptr { + rtkey = rtkey.Elem() + } + if rtkey.Kind() != reflect.Interface { + rtkeyid = reflect.ValueOf(rtkey).Pointer() + keyFn = e.getEncFn(rtkeyid, rtkey, true, true) + } + } + for rtval.Kind() == reflect.Ptr { + rtval = rtval.Elem() + } + if rtval.Kind() != reflect.Interface { + rtvalid := reflect.ValueOf(rtval).Pointer() + valFn = e.getEncFn(rtvalid, rtval, true, true) + } + mks := rv.MapKeys() + // for j, lmks := 0, len(mks); j < lmks; j++ { + + if e.h.Canonical { + e.kMapCanonical(rtkeyid, rtkey, rv, mks, valFn, asSymbols) + } else { + for j := range mks { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if keyTypeIsString { + if asSymbols { + ee.EncodeSymbol(mks[j].String()) + } else { + ee.EncodeString(c_UTF8, mks[j].String()) + } + } else { + e.encodeValue(mks[j], keyFn) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mks[j]), valFn) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (e *Encoder) kMapCanonical(rtkeyid uintptr, rtkey reflect.Type, rv reflect.Value, mks []reflect.Value, valFn *encFn, asSymbols bool) { + ee := e.e + cr := e.cr + // we previously did out-of-band if an extension was registered. + // This is not necessary, as the natural kind is sufficient for ordering. + + if rtkeyid == uint8SliceTypId { + mksv := make([]bytesRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Bytes() + } + sort.Sort(bytesRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeStringBytes(c_RAW, mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + } else { + switch rtkey.Kind() { + case reflect.Bool: + mksv := make([]boolRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Bool() + } + sort.Sort(boolRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + case reflect.String: + mksv := make([]stringRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.String() + } + sort.Sort(stringRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(mksv[i].v) + } else { + ee.EncodeString(c_UTF8, mksv[i].v) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + case reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uint, reflect.Uintptr: + mksv := make([]uintRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Uint() + } + sort.Sort(uintRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + case reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Int: + mksv := make([]intRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Int() + } + sort.Sort(intRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + case reflect.Float32: + mksv := make([]floatRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Float() + } + sort.Sort(floatRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(mksv[i].v)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + case reflect.Float64: + mksv := make([]floatRv, len(mks)) + for i, k := range mks { + v := &mksv[i] + v.r = k + v.v = k.Float() + } + sort.Sort(floatRvSlice(mksv)) + for i := range mksv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(mksv[i].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksv[i].r), valFn) + } + default: + // out-of-band + // first encode each key to a []byte first, then sort them, then record + var mksv []byte = make([]byte, 0, len(mks)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + mksbv := make([]bytesRv, len(mks)) + for i, k := range mks { + v := &mksbv[i] + l := len(mksv) + e2.MustEncode(k) + v.r = k + v.v = mksv[l:] + // fmt.Printf(">>>>> %s\n", mksv[l:]) + } + sort.Sort(bytesRvSlice(mksbv)) + for j := range mksbv { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(mksbv[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encodeValue(rv.MapIndex(mksbv[j].r), valFn) + } + } + } +} + +// -------------------------------------------------- + +// encFn encapsulates the captured variables and the encode function. +// This way, we only do some calculations one times, and pass to the +// code block that should be called (encapsulated in a function) +// instead of executing the checks every time. +type encFn struct { + i encFnInfo + f func(*encFnInfo, reflect.Value) +} + +// -------------------------------------------------- + +type encRtidFn struct { + rtid uintptr + fn encFn +} + +// An Encoder writes an object to an output stream in the codec format. +type Encoder struct { + // hopefully, reduce derefencing cost by laying the encWriter inside the Encoder + e encDriver + // NOTE: Encoder shouldn't call it's write methods, + // as the handler MAY need to do some coordination. + w encWriter + s []encRtidFn + ci set + be bool // is binary encoding + js bool // is json handle + + wi ioEncWriter + wb bytesEncWriter + + h *BasicHandle + hh Handle + + cr containerStateRecv + as encDriverAsis + + f map[uintptr]*encFn + b [scratchByteArrayLen]byte +} + +// NewEncoder returns an Encoder for encoding into an io.Writer. +// +// For efficiency, Users are encouraged to pass in a memory buffered writer +// (eg bufio.Writer, bytes.Buffer). +func NewEncoder(w io.Writer, h Handle) *Encoder { + e := newEncoder(h) + e.Reset(w) + return e +} + +// NewEncoderBytes returns an encoder for encoding directly and efficiently +// into a byte slice, using zero-copying to temporary slices. +// +// It will potentially replace the output byte slice pointed to. +// After encoding, the out parameter contains the encoded contents. +func NewEncoderBytes(out *[]byte, h Handle) *Encoder { + e := newEncoder(h) + e.ResetBytes(out) + return e +} + +func newEncoder(h Handle) *Encoder { + e := &Encoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()} + _, e.js = h.(*JsonHandle) + e.e = h.newEncDriver(e) + e.as, _ = e.e.(encDriverAsis) + e.cr, _ = e.e.(containerStateRecv) + return e +} + +// Reset the Encoder with a new output stream. +// +// This accomodates using the state of the Encoder, +// where it has "cached" information about sub-engines. +func (e *Encoder) Reset(w io.Writer) { + ww, ok := w.(ioEncWriterWriter) + if ok { + e.wi.w = ww + } else { + sww := &e.wi.s + sww.w = w + sww.bw, _ = w.(io.ByteWriter) + sww.sw, _ = w.(ioEncStringWriter) + e.wi.w = sww + //ww = bufio.NewWriterSize(w, defEncByteBufSize) + } + e.w = &e.wi + e.e.reset() +} + +func (e *Encoder) ResetBytes(out *[]byte) { + in := *out + if in == nil { + in = make([]byte, defEncByteBufSize) + } + e.wb.b, e.wb.out, e.wb.c = in, out, 0 + e.w = &e.wb + e.e.reset() +} + +// func (e *Encoder) sendContainerState(c containerState) { +// if e.cr != nil { +// e.cr.sendContainerState(c) +// } +// } + +// Encode writes an object into a stream. +// +// Encoding can be configured via the struct tag for the fields. +// The "codec" key in struct field's tag value is the key name, +// followed by an optional comma and options. +// Note that the "json" key is used in the absence of the "codec" key. +// +// To set an option on all fields (e.g. omitempty on all fields), you +// can create a field called _struct, and set flags on it. +// +// Struct values "usually" encode as maps. Each exported struct field is encoded unless: +// - the field's tag is "-", OR +// - the field is empty (empty or the zero value) and its tag specifies the "omitempty" option. +// +// When encoding as a map, the first string in the tag (before the comma) +// is the map key string to use when encoding. +// +// However, struct values may encode as arrays. This happens when: +// - StructToArray Encode option is set, OR +// - the tag on the _struct field sets the "toarray" option +// +// Values with types that implement MapBySlice are encoded as stream maps. +// +// The empty values (for omitempty option) are false, 0, any nil pointer +// or interface value, and any array, slice, map, or string of length zero. +// +// Anonymous fields are encoded inline except: +// - the struct tag specifies a replacement name (first value) +// - the field is of an interface type +// +// Examples: +// +// // NOTE: 'json:' can be used as struct tag key, in place 'codec:' below. +// type MyStruct struct { +// _struct bool `codec:",omitempty"` //set omitempty for every field +// Field1 string `codec:"-"` //skip this field +// Field2 int `codec:"myName"` //Use key "myName" in encode stream +// Field3 int32 `codec:",omitempty"` //use key "Field3". Omit if empty. +// Field4 bool `codec:"f4,omitempty"` //use key "f4". Omit if empty. +// io.Reader //use key "Reader". +// MyStruct `codec:"my1" //use key "my1". +// MyStruct //inline it +// ... +// } +// +// type MyStruct struct { +// _struct bool `codec:",omitempty,toarray"` //set omitempty for every field +// //and encode struct as an array +// } +// +// The mode of encoding is based on the type of the value. When a value is seen: +// - If a Selfer, call its CodecEncodeSelf method +// - If an extension is registered for it, call that extension function +// - If it implements encoding.(Binary|Text|JSON)Marshaler, call its Marshal(Binary|Text|JSON) method +// - Else encode it based on its reflect.Kind +// +// Note that struct field names and keys in map[string]XXX will be treated as symbols. +// Some formats support symbols (e.g. binc) and will properly encode the string +// only once in the stream, and use a tag to refer to it thereafter. +func (e *Encoder) Encode(v interface{}) (err error) { + defer panicToErr(&err) + e.encode(v) + e.w.atEndOfEncode() + return +} + +// MustEncode is like Encode, but panics if unable to Encode. +// This provides insight to the code location that triggered the error. +func (e *Encoder) MustEncode(v interface{}) { + e.encode(v) + e.w.atEndOfEncode() +} + +// comment out these (Must)Write methods. They were only put there to support cbor. +// However, users already have access to the streams, and can write directly. +// +// // Write allows users write to the Encoder stream directly. +// func (e *Encoder) Write(bs []byte) (err error) { +// defer panicToErr(&err) +// e.w.writeb(bs) +// return +// } +// // MustWrite is like write, but panics if unable to Write. +// func (e *Encoder) MustWrite(bs []byte) { +// e.w.writeb(bs) +// } + +func (e *Encoder) encode(iv interface{}) { + // if ics, ok := iv.(Selfer); ok { + // ics.CodecEncodeSelf(e) + // return + // } + + switch v := iv.(type) { + case nil: + e.e.EncodeNil() + case Selfer: + v.CodecEncodeSelf(e) + + case reflect.Value: + e.encodeValue(v, nil) + + case string: + e.e.EncodeString(c_UTF8, v) + case bool: + e.e.EncodeBool(v) + case int: + e.e.EncodeInt(int64(v)) + case int8: + e.e.EncodeInt(int64(v)) + case int16: + e.e.EncodeInt(int64(v)) + case int32: + e.e.EncodeInt(int64(v)) + case int64: + e.e.EncodeInt(v) + case uint: + e.e.EncodeUint(uint64(v)) + case uint8: + e.e.EncodeUint(uint64(v)) + case uint16: + e.e.EncodeUint(uint64(v)) + case uint32: + e.e.EncodeUint(uint64(v)) + case uint64: + e.e.EncodeUint(v) + case float32: + e.e.EncodeFloat32(v) + case float64: + e.e.EncodeFloat64(v) + + case []uint8: + e.e.EncodeStringBytes(c_RAW, v) + + case *string: + e.e.EncodeString(c_UTF8, *v) + case *bool: + e.e.EncodeBool(*v) + case *int: + e.e.EncodeInt(int64(*v)) + case *int8: + e.e.EncodeInt(int64(*v)) + case *int16: + e.e.EncodeInt(int64(*v)) + case *int32: + e.e.EncodeInt(int64(*v)) + case *int64: + e.e.EncodeInt(*v) + case *uint: + e.e.EncodeUint(uint64(*v)) + case *uint8: + e.e.EncodeUint(uint64(*v)) + case *uint16: + e.e.EncodeUint(uint64(*v)) + case *uint32: + e.e.EncodeUint(uint64(*v)) + case *uint64: + e.e.EncodeUint(*v) + case *float32: + e.e.EncodeFloat32(*v) + case *float64: + e.e.EncodeFloat64(*v) + + case *[]uint8: + e.e.EncodeStringBytes(c_RAW, *v) + + default: + const checkCodecSelfer1 = true // in case T is passed, where *T is a Selfer, still checkCodecSelfer + if !fastpathEncodeTypeSwitch(iv, e) { + e.encodeI(iv, false, checkCodecSelfer1) + } + } +} + +func (e *Encoder) preEncodeValue(rv reflect.Value) (rv2 reflect.Value, sptr uintptr, proceed bool) { + // use a goto statement instead of a recursive function for ptr/interface. +TOP: + switch rv.Kind() { + case reflect.Ptr: + if rv.IsNil() { + e.e.EncodeNil() + return + } + rv = rv.Elem() + if e.h.CheckCircularRef && rv.Kind() == reflect.Struct { + // TODO: Movable pointers will be an issue here. Future problem. + sptr = rv.UnsafeAddr() + break TOP + } + goto TOP + case reflect.Interface: + if rv.IsNil() { + e.e.EncodeNil() + return + } + rv = rv.Elem() + goto TOP + case reflect.Slice, reflect.Map: + if rv.IsNil() { + e.e.EncodeNil() + return + } + case reflect.Invalid, reflect.Func: + e.e.EncodeNil() + return + } + + proceed = true + rv2 = rv + return +} + +func (e *Encoder) doEncodeValue(rv reflect.Value, fn *encFn, sptr uintptr, + checkFastpath, checkCodecSelfer bool) { + if sptr != 0 { + if (&e.ci).add(sptr) { + e.errorf("circular reference found: # %d", sptr) + } + } + if fn == nil { + rt := rv.Type() + rtid := reflect.ValueOf(rt).Pointer() + // fn = e.getEncFn(rtid, rt, true, true) + fn = e.getEncFn(rtid, rt, checkFastpath, checkCodecSelfer) + } + fn.f(&fn.i, rv) + if sptr != 0 { + (&e.ci).remove(sptr) + } +} + +func (e *Encoder) encodeI(iv interface{}, checkFastpath, checkCodecSelfer bool) { + if rv, sptr, proceed := e.preEncodeValue(reflect.ValueOf(iv)); proceed { + e.doEncodeValue(rv, nil, sptr, checkFastpath, checkCodecSelfer) + } +} + +func (e *Encoder) encodeValue(rv reflect.Value, fn *encFn) { + // if a valid fn is passed, it MUST BE for the dereferenced type of rv + if rv, sptr, proceed := e.preEncodeValue(rv); proceed { + e.doEncodeValue(rv, fn, sptr, true, true) + } +} + +func (e *Encoder) getEncFn(rtid uintptr, rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn *encFn) { + // rtid := reflect.ValueOf(rt).Pointer() + var ok bool + if useMapForCodecCache { + fn, ok = e.f[rtid] + } else { + for i := range e.s { + v := &(e.s[i]) + if v.rtid == rtid { + fn, ok = &(v.fn), true + break + } + } + } + if ok { + return + } + + if useMapForCodecCache { + if e.f == nil { + e.f = make(map[uintptr]*encFn, initCollectionCap) + } + fn = new(encFn) + e.f[rtid] = fn + } else { + if e.s == nil { + e.s = make([]encRtidFn, 0, initCollectionCap) + } + e.s = append(e.s, encRtidFn{rtid: rtid}) + fn = &(e.s[len(e.s)-1]).fn + } + + ti := e.h.getTypeInfo(rtid, rt) + fi := &(fn.i) + fi.e = e + fi.ti = ti + + if checkCodecSelfer && ti.cs { + fn.f = (*encFnInfo).selferMarshal + } else if rtid == rawExtTypId { + fn.f = (*encFnInfo).rawExt + } else if e.e.IsBuiltinType(rtid) { + fn.f = (*encFnInfo).builtin + } else if xfFn := e.h.getExt(rtid); xfFn != nil { + fi.xfTag, fi.xfFn = xfFn.tag, xfFn.ext + fn.f = (*encFnInfo).ext + } else if supportMarshalInterfaces && e.be && ti.bm { + fn.f = (*encFnInfo).binaryMarshal + } else if supportMarshalInterfaces && !e.be && e.js && ti.jm { + //If JSON, we should check JSONMarshal before textMarshal + fn.f = (*encFnInfo).jsonMarshal + } else if supportMarshalInterfaces && !e.be && ti.tm { + fn.f = (*encFnInfo).textMarshal + } else { + rk := rt.Kind() + if fastpathEnabled && checkFastpath && (rk == reflect.Map || rk == reflect.Slice) { + if rt.PkgPath() == "" { // un-named slice or map + if idx := fastpathAV.index(rtid); idx != -1 { + fn.f = fastpathAV[idx].encfn + } + } else { + ok = false + // use mapping for underlying type if there + var rtu reflect.Type + if rk == reflect.Map { + rtu = reflect.MapOf(rt.Key(), rt.Elem()) + } else { + rtu = reflect.SliceOf(rt.Elem()) + } + rtuid := reflect.ValueOf(rtu).Pointer() + if idx := fastpathAV.index(rtuid); idx != -1 { + xfnf := fastpathAV[idx].encfn + xrt := fastpathAV[idx].rt + fn.f = func(xf *encFnInfo, xrv reflect.Value) { + xfnf(xf, xrv.Convert(xrt)) + } + } + } + } + if fn.f == nil { + switch rk { + case reflect.Bool: + fn.f = (*encFnInfo).kBool + case reflect.String: + fn.f = (*encFnInfo).kString + case reflect.Float64: + fn.f = (*encFnInfo).kFloat64 + case reflect.Float32: + fn.f = (*encFnInfo).kFloat32 + case reflect.Int, reflect.Int8, reflect.Int64, reflect.Int32, reflect.Int16: + fn.f = (*encFnInfo).kInt + case reflect.Uint8, reflect.Uint64, reflect.Uint, reflect.Uint32, reflect.Uint16, reflect.Uintptr: + fn.f = (*encFnInfo).kUint + case reflect.Invalid: + fn.f = (*encFnInfo).kInvalid + case reflect.Chan: + fi.seq = seqTypeChan + fn.f = (*encFnInfo).kSlice + case reflect.Slice: + fi.seq = seqTypeSlice + fn.f = (*encFnInfo).kSlice + case reflect.Array: + fi.seq = seqTypeArray + fn.f = (*encFnInfo).kSlice + case reflect.Struct: + fn.f = (*encFnInfo).kStruct + // reflect.Ptr and reflect.Interface are handled already by preEncodeValue + // case reflect.Ptr: + // fn.f = (*encFnInfo).kPtr + // case reflect.Interface: + // fn.f = (*encFnInfo).kInterface + case reflect.Map: + fn.f = (*encFnInfo).kMap + default: + fn.f = (*encFnInfo).kErr + } + } + } + + return +} + +func (e *Encoder) marshal(bs []byte, fnerr error, asis bool, c charEncoding) { + if fnerr != nil { + panic(fnerr) + } + if bs == nil { + e.e.EncodeNil() + } else if asis { + e.asis(bs) + } else { + e.e.EncodeStringBytes(c, bs) + } +} + +func (e *Encoder) asis(v []byte) { + if e.as == nil { + e.w.writeb(v) + } else { + e.as.EncodeAsis(v) + } +} + +func (e *Encoder) errorf(format string, params ...interface{}) { + err := fmt.Errorf(format, params...) + panic(err) +} + +// ---------------------------------------- + +const encStructPoolLen = 5 + +// encStructPool is an array of sync.Pool. +// Each element of the array pools one of encStructPool(8|16|32|64). +// It allows the re-use of slices up to 64 in length. +// A performance cost of encoding structs was collecting +// which values were empty and should be omitted. +// We needed slices of reflect.Value and string to collect them. +// This shared pool reduces the amount of unnecessary creation we do. +// The cost is that of locking sometimes, but sync.Pool is efficient +// enough to reduce thread contention. +var encStructPool [encStructPoolLen]sync.Pool + +func init() { + encStructPool[0].New = func() interface{} { return new([8]stringRv) } + encStructPool[1].New = func() interface{} { return new([16]stringRv) } + encStructPool[2].New = func() interface{} { return new([32]stringRv) } + encStructPool[3].New = func() interface{} { return new([64]stringRv) } + encStructPool[4].New = func() interface{} { return new([128]stringRv) } +} + +func encStructPoolGet(newlen int) (p *sync.Pool, v interface{}, s []stringRv) { + // if encStructPoolLen != 5 { // constant chec, so removed at build time. + // panic(errors.New("encStructPoolLen must be equal to 4")) // defensive, in case it is changed + // } + // idxpool := newlen / 8 + if newlen <= 8 { + p = &encStructPool[0] + v = p.Get() + s = v.(*[8]stringRv)[:newlen] + } else if newlen <= 16 { + p = &encStructPool[1] + v = p.Get() + s = v.(*[16]stringRv)[:newlen] + } else if newlen <= 32 { + p = &encStructPool[2] + v = p.Get() + s = v.(*[32]stringRv)[:newlen] + } else if newlen <= 64 { + p = &encStructPool[3] + v = p.Get() + s = v.(*[64]stringRv)[:newlen] + } else if newlen <= 128 { + p = &encStructPool[4] + v = p.Get() + s = v.(*[128]stringRv)[:newlen] + } else { + s = make([]stringRv, newlen) + } + return +} + +// ---------------------------------------- + +// func encErr(format string, params ...interface{}) { +// doPanic(msgTagEnc, format, params...) +// } diff --git a/vendor/github.com/ugorji/go/codec/fast-path.generated.go b/vendor/github.com/ugorji/go/codec/fast-path.generated.go new file mode 100644 index 000000000..cf6e00df2 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/fast-path.generated.go @@ -0,0 +1,39365 @@ +// +build !notfastpath + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED from fast-path.go.tmpl +// ************************************************************ + +package codec + +// Fast path functions try to create a fast path encode or decode implementation +// for common maps and slices. +// +// We define the functions and register then in this single file +// so as not to pollute the encode.go and decode.go, and create a dependency in there. +// This file can be omitted without causing a build failure. +// +// The advantage of fast paths is: +// - Many calls bypass reflection altogether +// +// Currently support +// - slice of all builtin types, +// - map of all builtin types to string or interface value +// - symetrical maps of all builtin types (e.g. str-str, uint8-uint8) +// This should provide adequate "typical" implementations. +// +// Note that fast track decode functions must handle values for which an address cannot be obtained. +// For example: +// m2 := map[string]int{} +// p2 := []interface{}{m2} +// // decoding into p2 will bomb if fast track functions do not treat like unaddressable. +// + +import ( + "reflect" + "sort" +) + +const fastpathCheckNilFalse = false // for reflect +const fastpathCheckNilTrue = true // for type switch + +type fastpathT struct{} + +var fastpathTV fastpathT + +type fastpathE struct { + rtid uintptr + rt reflect.Type + encfn func(*encFnInfo, reflect.Value) + decfn func(*decFnInfo, reflect.Value) +} + +type fastpathA [271]fastpathE + +func (x *fastpathA) index(rtid uintptr) int { + // use binary search to grab the index (adapted from sort/search.go) + h, i, j := 0, 0, 271 // len(x) + for i < j { + h = i + (j-i)/2 + if x[h].rtid < rtid { + i = h + 1 + } else { + j = h + } + } + if i < 271 && x[i].rtid == rtid { + return i + } + return -1 +} + +type fastpathAslice []fastpathE + +func (x fastpathAslice) Len() int { return len(x) } +func (x fastpathAslice) Less(i, j int) bool { return x[i].rtid < x[j].rtid } +func (x fastpathAslice) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +var fastpathAV fastpathA + +// due to possible initialization loop error, make fastpath in an init() +func init() { + if !fastpathEnabled { + return + } + i := 0 + fn := func(v interface{}, fe func(*encFnInfo, reflect.Value), fd func(*decFnInfo, reflect.Value)) (f fastpathE) { + xrt := reflect.TypeOf(v) + xptr := reflect.ValueOf(xrt).Pointer() + fastpathAV[i] = fastpathE{xptr, xrt, fe, fd} + i++ + return + } + + fn([]interface{}(nil), (*encFnInfo).fastpathEncSliceIntfR, (*decFnInfo).fastpathDecSliceIntfR) + fn([]string(nil), (*encFnInfo).fastpathEncSliceStringR, (*decFnInfo).fastpathDecSliceStringR) + fn([]float32(nil), (*encFnInfo).fastpathEncSliceFloat32R, (*decFnInfo).fastpathDecSliceFloat32R) + fn([]float64(nil), (*encFnInfo).fastpathEncSliceFloat64R, (*decFnInfo).fastpathDecSliceFloat64R) + fn([]uint(nil), (*encFnInfo).fastpathEncSliceUintR, (*decFnInfo).fastpathDecSliceUintR) + fn([]uint16(nil), (*encFnInfo).fastpathEncSliceUint16R, (*decFnInfo).fastpathDecSliceUint16R) + fn([]uint32(nil), (*encFnInfo).fastpathEncSliceUint32R, (*decFnInfo).fastpathDecSliceUint32R) + fn([]uint64(nil), (*encFnInfo).fastpathEncSliceUint64R, (*decFnInfo).fastpathDecSliceUint64R) + fn([]uintptr(nil), (*encFnInfo).fastpathEncSliceUintptrR, (*decFnInfo).fastpathDecSliceUintptrR) + fn([]int(nil), (*encFnInfo).fastpathEncSliceIntR, (*decFnInfo).fastpathDecSliceIntR) + fn([]int8(nil), (*encFnInfo).fastpathEncSliceInt8R, (*decFnInfo).fastpathDecSliceInt8R) + fn([]int16(nil), (*encFnInfo).fastpathEncSliceInt16R, (*decFnInfo).fastpathDecSliceInt16R) + fn([]int32(nil), (*encFnInfo).fastpathEncSliceInt32R, (*decFnInfo).fastpathDecSliceInt32R) + fn([]int64(nil), (*encFnInfo).fastpathEncSliceInt64R, (*decFnInfo).fastpathDecSliceInt64R) + fn([]bool(nil), (*encFnInfo).fastpathEncSliceBoolR, (*decFnInfo).fastpathDecSliceBoolR) + + fn(map[interface{}]interface{}(nil), (*encFnInfo).fastpathEncMapIntfIntfR, (*decFnInfo).fastpathDecMapIntfIntfR) + fn(map[interface{}]string(nil), (*encFnInfo).fastpathEncMapIntfStringR, (*decFnInfo).fastpathDecMapIntfStringR) + fn(map[interface{}]uint(nil), (*encFnInfo).fastpathEncMapIntfUintR, (*decFnInfo).fastpathDecMapIntfUintR) + fn(map[interface{}]uint8(nil), (*encFnInfo).fastpathEncMapIntfUint8R, (*decFnInfo).fastpathDecMapIntfUint8R) + fn(map[interface{}]uint16(nil), (*encFnInfo).fastpathEncMapIntfUint16R, (*decFnInfo).fastpathDecMapIntfUint16R) + fn(map[interface{}]uint32(nil), (*encFnInfo).fastpathEncMapIntfUint32R, (*decFnInfo).fastpathDecMapIntfUint32R) + fn(map[interface{}]uint64(nil), (*encFnInfo).fastpathEncMapIntfUint64R, (*decFnInfo).fastpathDecMapIntfUint64R) + fn(map[interface{}]uintptr(nil), (*encFnInfo).fastpathEncMapIntfUintptrR, (*decFnInfo).fastpathDecMapIntfUintptrR) + fn(map[interface{}]int(nil), (*encFnInfo).fastpathEncMapIntfIntR, (*decFnInfo).fastpathDecMapIntfIntR) + fn(map[interface{}]int8(nil), (*encFnInfo).fastpathEncMapIntfInt8R, (*decFnInfo).fastpathDecMapIntfInt8R) + fn(map[interface{}]int16(nil), (*encFnInfo).fastpathEncMapIntfInt16R, (*decFnInfo).fastpathDecMapIntfInt16R) + fn(map[interface{}]int32(nil), (*encFnInfo).fastpathEncMapIntfInt32R, (*decFnInfo).fastpathDecMapIntfInt32R) + fn(map[interface{}]int64(nil), (*encFnInfo).fastpathEncMapIntfInt64R, (*decFnInfo).fastpathDecMapIntfInt64R) + fn(map[interface{}]float32(nil), (*encFnInfo).fastpathEncMapIntfFloat32R, (*decFnInfo).fastpathDecMapIntfFloat32R) + fn(map[interface{}]float64(nil), (*encFnInfo).fastpathEncMapIntfFloat64R, (*decFnInfo).fastpathDecMapIntfFloat64R) + fn(map[interface{}]bool(nil), (*encFnInfo).fastpathEncMapIntfBoolR, (*decFnInfo).fastpathDecMapIntfBoolR) + fn(map[string]interface{}(nil), (*encFnInfo).fastpathEncMapStringIntfR, (*decFnInfo).fastpathDecMapStringIntfR) + fn(map[string]string(nil), (*encFnInfo).fastpathEncMapStringStringR, (*decFnInfo).fastpathDecMapStringStringR) + fn(map[string]uint(nil), (*encFnInfo).fastpathEncMapStringUintR, (*decFnInfo).fastpathDecMapStringUintR) + fn(map[string]uint8(nil), (*encFnInfo).fastpathEncMapStringUint8R, (*decFnInfo).fastpathDecMapStringUint8R) + fn(map[string]uint16(nil), (*encFnInfo).fastpathEncMapStringUint16R, (*decFnInfo).fastpathDecMapStringUint16R) + fn(map[string]uint32(nil), (*encFnInfo).fastpathEncMapStringUint32R, (*decFnInfo).fastpathDecMapStringUint32R) + fn(map[string]uint64(nil), (*encFnInfo).fastpathEncMapStringUint64R, (*decFnInfo).fastpathDecMapStringUint64R) + fn(map[string]uintptr(nil), (*encFnInfo).fastpathEncMapStringUintptrR, (*decFnInfo).fastpathDecMapStringUintptrR) + fn(map[string]int(nil), (*encFnInfo).fastpathEncMapStringIntR, (*decFnInfo).fastpathDecMapStringIntR) + fn(map[string]int8(nil), (*encFnInfo).fastpathEncMapStringInt8R, (*decFnInfo).fastpathDecMapStringInt8R) + fn(map[string]int16(nil), (*encFnInfo).fastpathEncMapStringInt16R, (*decFnInfo).fastpathDecMapStringInt16R) + fn(map[string]int32(nil), (*encFnInfo).fastpathEncMapStringInt32R, (*decFnInfo).fastpathDecMapStringInt32R) + fn(map[string]int64(nil), (*encFnInfo).fastpathEncMapStringInt64R, (*decFnInfo).fastpathDecMapStringInt64R) + fn(map[string]float32(nil), (*encFnInfo).fastpathEncMapStringFloat32R, (*decFnInfo).fastpathDecMapStringFloat32R) + fn(map[string]float64(nil), (*encFnInfo).fastpathEncMapStringFloat64R, (*decFnInfo).fastpathDecMapStringFloat64R) + fn(map[string]bool(nil), (*encFnInfo).fastpathEncMapStringBoolR, (*decFnInfo).fastpathDecMapStringBoolR) + fn(map[float32]interface{}(nil), (*encFnInfo).fastpathEncMapFloat32IntfR, (*decFnInfo).fastpathDecMapFloat32IntfR) + fn(map[float32]string(nil), (*encFnInfo).fastpathEncMapFloat32StringR, (*decFnInfo).fastpathDecMapFloat32StringR) + fn(map[float32]uint(nil), (*encFnInfo).fastpathEncMapFloat32UintR, (*decFnInfo).fastpathDecMapFloat32UintR) + fn(map[float32]uint8(nil), (*encFnInfo).fastpathEncMapFloat32Uint8R, (*decFnInfo).fastpathDecMapFloat32Uint8R) + fn(map[float32]uint16(nil), (*encFnInfo).fastpathEncMapFloat32Uint16R, (*decFnInfo).fastpathDecMapFloat32Uint16R) + fn(map[float32]uint32(nil), (*encFnInfo).fastpathEncMapFloat32Uint32R, (*decFnInfo).fastpathDecMapFloat32Uint32R) + fn(map[float32]uint64(nil), (*encFnInfo).fastpathEncMapFloat32Uint64R, (*decFnInfo).fastpathDecMapFloat32Uint64R) + fn(map[float32]uintptr(nil), (*encFnInfo).fastpathEncMapFloat32UintptrR, (*decFnInfo).fastpathDecMapFloat32UintptrR) + fn(map[float32]int(nil), (*encFnInfo).fastpathEncMapFloat32IntR, (*decFnInfo).fastpathDecMapFloat32IntR) + fn(map[float32]int8(nil), (*encFnInfo).fastpathEncMapFloat32Int8R, (*decFnInfo).fastpathDecMapFloat32Int8R) + fn(map[float32]int16(nil), (*encFnInfo).fastpathEncMapFloat32Int16R, (*decFnInfo).fastpathDecMapFloat32Int16R) + fn(map[float32]int32(nil), (*encFnInfo).fastpathEncMapFloat32Int32R, (*decFnInfo).fastpathDecMapFloat32Int32R) + fn(map[float32]int64(nil), (*encFnInfo).fastpathEncMapFloat32Int64R, (*decFnInfo).fastpathDecMapFloat32Int64R) + fn(map[float32]float32(nil), (*encFnInfo).fastpathEncMapFloat32Float32R, (*decFnInfo).fastpathDecMapFloat32Float32R) + fn(map[float32]float64(nil), (*encFnInfo).fastpathEncMapFloat32Float64R, (*decFnInfo).fastpathDecMapFloat32Float64R) + fn(map[float32]bool(nil), (*encFnInfo).fastpathEncMapFloat32BoolR, (*decFnInfo).fastpathDecMapFloat32BoolR) + fn(map[float64]interface{}(nil), (*encFnInfo).fastpathEncMapFloat64IntfR, (*decFnInfo).fastpathDecMapFloat64IntfR) + fn(map[float64]string(nil), (*encFnInfo).fastpathEncMapFloat64StringR, (*decFnInfo).fastpathDecMapFloat64StringR) + fn(map[float64]uint(nil), (*encFnInfo).fastpathEncMapFloat64UintR, (*decFnInfo).fastpathDecMapFloat64UintR) + fn(map[float64]uint8(nil), (*encFnInfo).fastpathEncMapFloat64Uint8R, (*decFnInfo).fastpathDecMapFloat64Uint8R) + fn(map[float64]uint16(nil), (*encFnInfo).fastpathEncMapFloat64Uint16R, (*decFnInfo).fastpathDecMapFloat64Uint16R) + fn(map[float64]uint32(nil), (*encFnInfo).fastpathEncMapFloat64Uint32R, (*decFnInfo).fastpathDecMapFloat64Uint32R) + fn(map[float64]uint64(nil), (*encFnInfo).fastpathEncMapFloat64Uint64R, (*decFnInfo).fastpathDecMapFloat64Uint64R) + fn(map[float64]uintptr(nil), (*encFnInfo).fastpathEncMapFloat64UintptrR, (*decFnInfo).fastpathDecMapFloat64UintptrR) + fn(map[float64]int(nil), (*encFnInfo).fastpathEncMapFloat64IntR, (*decFnInfo).fastpathDecMapFloat64IntR) + fn(map[float64]int8(nil), (*encFnInfo).fastpathEncMapFloat64Int8R, (*decFnInfo).fastpathDecMapFloat64Int8R) + fn(map[float64]int16(nil), (*encFnInfo).fastpathEncMapFloat64Int16R, (*decFnInfo).fastpathDecMapFloat64Int16R) + fn(map[float64]int32(nil), (*encFnInfo).fastpathEncMapFloat64Int32R, (*decFnInfo).fastpathDecMapFloat64Int32R) + fn(map[float64]int64(nil), (*encFnInfo).fastpathEncMapFloat64Int64R, (*decFnInfo).fastpathDecMapFloat64Int64R) + fn(map[float64]float32(nil), (*encFnInfo).fastpathEncMapFloat64Float32R, (*decFnInfo).fastpathDecMapFloat64Float32R) + fn(map[float64]float64(nil), (*encFnInfo).fastpathEncMapFloat64Float64R, (*decFnInfo).fastpathDecMapFloat64Float64R) + fn(map[float64]bool(nil), (*encFnInfo).fastpathEncMapFloat64BoolR, (*decFnInfo).fastpathDecMapFloat64BoolR) + fn(map[uint]interface{}(nil), (*encFnInfo).fastpathEncMapUintIntfR, (*decFnInfo).fastpathDecMapUintIntfR) + fn(map[uint]string(nil), (*encFnInfo).fastpathEncMapUintStringR, (*decFnInfo).fastpathDecMapUintStringR) + fn(map[uint]uint(nil), (*encFnInfo).fastpathEncMapUintUintR, (*decFnInfo).fastpathDecMapUintUintR) + fn(map[uint]uint8(nil), (*encFnInfo).fastpathEncMapUintUint8R, (*decFnInfo).fastpathDecMapUintUint8R) + fn(map[uint]uint16(nil), (*encFnInfo).fastpathEncMapUintUint16R, (*decFnInfo).fastpathDecMapUintUint16R) + fn(map[uint]uint32(nil), (*encFnInfo).fastpathEncMapUintUint32R, (*decFnInfo).fastpathDecMapUintUint32R) + fn(map[uint]uint64(nil), (*encFnInfo).fastpathEncMapUintUint64R, (*decFnInfo).fastpathDecMapUintUint64R) + fn(map[uint]uintptr(nil), (*encFnInfo).fastpathEncMapUintUintptrR, (*decFnInfo).fastpathDecMapUintUintptrR) + fn(map[uint]int(nil), (*encFnInfo).fastpathEncMapUintIntR, (*decFnInfo).fastpathDecMapUintIntR) + fn(map[uint]int8(nil), (*encFnInfo).fastpathEncMapUintInt8R, (*decFnInfo).fastpathDecMapUintInt8R) + fn(map[uint]int16(nil), (*encFnInfo).fastpathEncMapUintInt16R, (*decFnInfo).fastpathDecMapUintInt16R) + fn(map[uint]int32(nil), (*encFnInfo).fastpathEncMapUintInt32R, (*decFnInfo).fastpathDecMapUintInt32R) + fn(map[uint]int64(nil), (*encFnInfo).fastpathEncMapUintInt64R, (*decFnInfo).fastpathDecMapUintInt64R) + fn(map[uint]float32(nil), (*encFnInfo).fastpathEncMapUintFloat32R, (*decFnInfo).fastpathDecMapUintFloat32R) + fn(map[uint]float64(nil), (*encFnInfo).fastpathEncMapUintFloat64R, (*decFnInfo).fastpathDecMapUintFloat64R) + fn(map[uint]bool(nil), (*encFnInfo).fastpathEncMapUintBoolR, (*decFnInfo).fastpathDecMapUintBoolR) + fn(map[uint8]interface{}(nil), (*encFnInfo).fastpathEncMapUint8IntfR, (*decFnInfo).fastpathDecMapUint8IntfR) + fn(map[uint8]string(nil), (*encFnInfo).fastpathEncMapUint8StringR, (*decFnInfo).fastpathDecMapUint8StringR) + fn(map[uint8]uint(nil), (*encFnInfo).fastpathEncMapUint8UintR, (*decFnInfo).fastpathDecMapUint8UintR) + fn(map[uint8]uint8(nil), (*encFnInfo).fastpathEncMapUint8Uint8R, (*decFnInfo).fastpathDecMapUint8Uint8R) + fn(map[uint8]uint16(nil), (*encFnInfo).fastpathEncMapUint8Uint16R, (*decFnInfo).fastpathDecMapUint8Uint16R) + fn(map[uint8]uint32(nil), (*encFnInfo).fastpathEncMapUint8Uint32R, (*decFnInfo).fastpathDecMapUint8Uint32R) + fn(map[uint8]uint64(nil), (*encFnInfo).fastpathEncMapUint8Uint64R, (*decFnInfo).fastpathDecMapUint8Uint64R) + fn(map[uint8]uintptr(nil), (*encFnInfo).fastpathEncMapUint8UintptrR, (*decFnInfo).fastpathDecMapUint8UintptrR) + fn(map[uint8]int(nil), (*encFnInfo).fastpathEncMapUint8IntR, (*decFnInfo).fastpathDecMapUint8IntR) + fn(map[uint8]int8(nil), (*encFnInfo).fastpathEncMapUint8Int8R, (*decFnInfo).fastpathDecMapUint8Int8R) + fn(map[uint8]int16(nil), (*encFnInfo).fastpathEncMapUint8Int16R, (*decFnInfo).fastpathDecMapUint8Int16R) + fn(map[uint8]int32(nil), (*encFnInfo).fastpathEncMapUint8Int32R, (*decFnInfo).fastpathDecMapUint8Int32R) + fn(map[uint8]int64(nil), (*encFnInfo).fastpathEncMapUint8Int64R, (*decFnInfo).fastpathDecMapUint8Int64R) + fn(map[uint8]float32(nil), (*encFnInfo).fastpathEncMapUint8Float32R, (*decFnInfo).fastpathDecMapUint8Float32R) + fn(map[uint8]float64(nil), (*encFnInfo).fastpathEncMapUint8Float64R, (*decFnInfo).fastpathDecMapUint8Float64R) + fn(map[uint8]bool(nil), (*encFnInfo).fastpathEncMapUint8BoolR, (*decFnInfo).fastpathDecMapUint8BoolR) + fn(map[uint16]interface{}(nil), (*encFnInfo).fastpathEncMapUint16IntfR, (*decFnInfo).fastpathDecMapUint16IntfR) + fn(map[uint16]string(nil), (*encFnInfo).fastpathEncMapUint16StringR, (*decFnInfo).fastpathDecMapUint16StringR) + fn(map[uint16]uint(nil), (*encFnInfo).fastpathEncMapUint16UintR, (*decFnInfo).fastpathDecMapUint16UintR) + fn(map[uint16]uint8(nil), (*encFnInfo).fastpathEncMapUint16Uint8R, (*decFnInfo).fastpathDecMapUint16Uint8R) + fn(map[uint16]uint16(nil), (*encFnInfo).fastpathEncMapUint16Uint16R, (*decFnInfo).fastpathDecMapUint16Uint16R) + fn(map[uint16]uint32(nil), (*encFnInfo).fastpathEncMapUint16Uint32R, (*decFnInfo).fastpathDecMapUint16Uint32R) + fn(map[uint16]uint64(nil), (*encFnInfo).fastpathEncMapUint16Uint64R, (*decFnInfo).fastpathDecMapUint16Uint64R) + fn(map[uint16]uintptr(nil), (*encFnInfo).fastpathEncMapUint16UintptrR, (*decFnInfo).fastpathDecMapUint16UintptrR) + fn(map[uint16]int(nil), (*encFnInfo).fastpathEncMapUint16IntR, (*decFnInfo).fastpathDecMapUint16IntR) + fn(map[uint16]int8(nil), (*encFnInfo).fastpathEncMapUint16Int8R, (*decFnInfo).fastpathDecMapUint16Int8R) + fn(map[uint16]int16(nil), (*encFnInfo).fastpathEncMapUint16Int16R, (*decFnInfo).fastpathDecMapUint16Int16R) + fn(map[uint16]int32(nil), (*encFnInfo).fastpathEncMapUint16Int32R, (*decFnInfo).fastpathDecMapUint16Int32R) + fn(map[uint16]int64(nil), (*encFnInfo).fastpathEncMapUint16Int64R, (*decFnInfo).fastpathDecMapUint16Int64R) + fn(map[uint16]float32(nil), (*encFnInfo).fastpathEncMapUint16Float32R, (*decFnInfo).fastpathDecMapUint16Float32R) + fn(map[uint16]float64(nil), (*encFnInfo).fastpathEncMapUint16Float64R, (*decFnInfo).fastpathDecMapUint16Float64R) + fn(map[uint16]bool(nil), (*encFnInfo).fastpathEncMapUint16BoolR, (*decFnInfo).fastpathDecMapUint16BoolR) + fn(map[uint32]interface{}(nil), (*encFnInfo).fastpathEncMapUint32IntfR, (*decFnInfo).fastpathDecMapUint32IntfR) + fn(map[uint32]string(nil), (*encFnInfo).fastpathEncMapUint32StringR, (*decFnInfo).fastpathDecMapUint32StringR) + fn(map[uint32]uint(nil), (*encFnInfo).fastpathEncMapUint32UintR, (*decFnInfo).fastpathDecMapUint32UintR) + fn(map[uint32]uint8(nil), (*encFnInfo).fastpathEncMapUint32Uint8R, (*decFnInfo).fastpathDecMapUint32Uint8R) + fn(map[uint32]uint16(nil), (*encFnInfo).fastpathEncMapUint32Uint16R, (*decFnInfo).fastpathDecMapUint32Uint16R) + fn(map[uint32]uint32(nil), (*encFnInfo).fastpathEncMapUint32Uint32R, (*decFnInfo).fastpathDecMapUint32Uint32R) + fn(map[uint32]uint64(nil), (*encFnInfo).fastpathEncMapUint32Uint64R, (*decFnInfo).fastpathDecMapUint32Uint64R) + fn(map[uint32]uintptr(nil), (*encFnInfo).fastpathEncMapUint32UintptrR, (*decFnInfo).fastpathDecMapUint32UintptrR) + fn(map[uint32]int(nil), (*encFnInfo).fastpathEncMapUint32IntR, (*decFnInfo).fastpathDecMapUint32IntR) + fn(map[uint32]int8(nil), (*encFnInfo).fastpathEncMapUint32Int8R, (*decFnInfo).fastpathDecMapUint32Int8R) + fn(map[uint32]int16(nil), (*encFnInfo).fastpathEncMapUint32Int16R, (*decFnInfo).fastpathDecMapUint32Int16R) + fn(map[uint32]int32(nil), (*encFnInfo).fastpathEncMapUint32Int32R, (*decFnInfo).fastpathDecMapUint32Int32R) + fn(map[uint32]int64(nil), (*encFnInfo).fastpathEncMapUint32Int64R, (*decFnInfo).fastpathDecMapUint32Int64R) + fn(map[uint32]float32(nil), (*encFnInfo).fastpathEncMapUint32Float32R, (*decFnInfo).fastpathDecMapUint32Float32R) + fn(map[uint32]float64(nil), (*encFnInfo).fastpathEncMapUint32Float64R, (*decFnInfo).fastpathDecMapUint32Float64R) + fn(map[uint32]bool(nil), (*encFnInfo).fastpathEncMapUint32BoolR, (*decFnInfo).fastpathDecMapUint32BoolR) + fn(map[uint64]interface{}(nil), (*encFnInfo).fastpathEncMapUint64IntfR, (*decFnInfo).fastpathDecMapUint64IntfR) + fn(map[uint64]string(nil), (*encFnInfo).fastpathEncMapUint64StringR, (*decFnInfo).fastpathDecMapUint64StringR) + fn(map[uint64]uint(nil), (*encFnInfo).fastpathEncMapUint64UintR, (*decFnInfo).fastpathDecMapUint64UintR) + fn(map[uint64]uint8(nil), (*encFnInfo).fastpathEncMapUint64Uint8R, (*decFnInfo).fastpathDecMapUint64Uint8R) + fn(map[uint64]uint16(nil), (*encFnInfo).fastpathEncMapUint64Uint16R, (*decFnInfo).fastpathDecMapUint64Uint16R) + fn(map[uint64]uint32(nil), (*encFnInfo).fastpathEncMapUint64Uint32R, (*decFnInfo).fastpathDecMapUint64Uint32R) + fn(map[uint64]uint64(nil), (*encFnInfo).fastpathEncMapUint64Uint64R, (*decFnInfo).fastpathDecMapUint64Uint64R) + fn(map[uint64]uintptr(nil), (*encFnInfo).fastpathEncMapUint64UintptrR, (*decFnInfo).fastpathDecMapUint64UintptrR) + fn(map[uint64]int(nil), (*encFnInfo).fastpathEncMapUint64IntR, (*decFnInfo).fastpathDecMapUint64IntR) + fn(map[uint64]int8(nil), (*encFnInfo).fastpathEncMapUint64Int8R, (*decFnInfo).fastpathDecMapUint64Int8R) + fn(map[uint64]int16(nil), (*encFnInfo).fastpathEncMapUint64Int16R, (*decFnInfo).fastpathDecMapUint64Int16R) + fn(map[uint64]int32(nil), (*encFnInfo).fastpathEncMapUint64Int32R, (*decFnInfo).fastpathDecMapUint64Int32R) + fn(map[uint64]int64(nil), (*encFnInfo).fastpathEncMapUint64Int64R, (*decFnInfo).fastpathDecMapUint64Int64R) + fn(map[uint64]float32(nil), (*encFnInfo).fastpathEncMapUint64Float32R, (*decFnInfo).fastpathDecMapUint64Float32R) + fn(map[uint64]float64(nil), (*encFnInfo).fastpathEncMapUint64Float64R, (*decFnInfo).fastpathDecMapUint64Float64R) + fn(map[uint64]bool(nil), (*encFnInfo).fastpathEncMapUint64BoolR, (*decFnInfo).fastpathDecMapUint64BoolR) + fn(map[uintptr]interface{}(nil), (*encFnInfo).fastpathEncMapUintptrIntfR, (*decFnInfo).fastpathDecMapUintptrIntfR) + fn(map[uintptr]string(nil), (*encFnInfo).fastpathEncMapUintptrStringR, (*decFnInfo).fastpathDecMapUintptrStringR) + fn(map[uintptr]uint(nil), (*encFnInfo).fastpathEncMapUintptrUintR, (*decFnInfo).fastpathDecMapUintptrUintR) + fn(map[uintptr]uint8(nil), (*encFnInfo).fastpathEncMapUintptrUint8R, (*decFnInfo).fastpathDecMapUintptrUint8R) + fn(map[uintptr]uint16(nil), (*encFnInfo).fastpathEncMapUintptrUint16R, (*decFnInfo).fastpathDecMapUintptrUint16R) + fn(map[uintptr]uint32(nil), (*encFnInfo).fastpathEncMapUintptrUint32R, (*decFnInfo).fastpathDecMapUintptrUint32R) + fn(map[uintptr]uint64(nil), (*encFnInfo).fastpathEncMapUintptrUint64R, (*decFnInfo).fastpathDecMapUintptrUint64R) + fn(map[uintptr]uintptr(nil), (*encFnInfo).fastpathEncMapUintptrUintptrR, (*decFnInfo).fastpathDecMapUintptrUintptrR) + fn(map[uintptr]int(nil), (*encFnInfo).fastpathEncMapUintptrIntR, (*decFnInfo).fastpathDecMapUintptrIntR) + fn(map[uintptr]int8(nil), (*encFnInfo).fastpathEncMapUintptrInt8R, (*decFnInfo).fastpathDecMapUintptrInt8R) + fn(map[uintptr]int16(nil), (*encFnInfo).fastpathEncMapUintptrInt16R, (*decFnInfo).fastpathDecMapUintptrInt16R) + fn(map[uintptr]int32(nil), (*encFnInfo).fastpathEncMapUintptrInt32R, (*decFnInfo).fastpathDecMapUintptrInt32R) + fn(map[uintptr]int64(nil), (*encFnInfo).fastpathEncMapUintptrInt64R, (*decFnInfo).fastpathDecMapUintptrInt64R) + fn(map[uintptr]float32(nil), (*encFnInfo).fastpathEncMapUintptrFloat32R, (*decFnInfo).fastpathDecMapUintptrFloat32R) + fn(map[uintptr]float64(nil), (*encFnInfo).fastpathEncMapUintptrFloat64R, (*decFnInfo).fastpathDecMapUintptrFloat64R) + fn(map[uintptr]bool(nil), (*encFnInfo).fastpathEncMapUintptrBoolR, (*decFnInfo).fastpathDecMapUintptrBoolR) + fn(map[int]interface{}(nil), (*encFnInfo).fastpathEncMapIntIntfR, (*decFnInfo).fastpathDecMapIntIntfR) + fn(map[int]string(nil), (*encFnInfo).fastpathEncMapIntStringR, (*decFnInfo).fastpathDecMapIntStringR) + fn(map[int]uint(nil), (*encFnInfo).fastpathEncMapIntUintR, (*decFnInfo).fastpathDecMapIntUintR) + fn(map[int]uint8(nil), (*encFnInfo).fastpathEncMapIntUint8R, (*decFnInfo).fastpathDecMapIntUint8R) + fn(map[int]uint16(nil), (*encFnInfo).fastpathEncMapIntUint16R, (*decFnInfo).fastpathDecMapIntUint16R) + fn(map[int]uint32(nil), (*encFnInfo).fastpathEncMapIntUint32R, (*decFnInfo).fastpathDecMapIntUint32R) + fn(map[int]uint64(nil), (*encFnInfo).fastpathEncMapIntUint64R, (*decFnInfo).fastpathDecMapIntUint64R) + fn(map[int]uintptr(nil), (*encFnInfo).fastpathEncMapIntUintptrR, (*decFnInfo).fastpathDecMapIntUintptrR) + fn(map[int]int(nil), (*encFnInfo).fastpathEncMapIntIntR, (*decFnInfo).fastpathDecMapIntIntR) + fn(map[int]int8(nil), (*encFnInfo).fastpathEncMapIntInt8R, (*decFnInfo).fastpathDecMapIntInt8R) + fn(map[int]int16(nil), (*encFnInfo).fastpathEncMapIntInt16R, (*decFnInfo).fastpathDecMapIntInt16R) + fn(map[int]int32(nil), (*encFnInfo).fastpathEncMapIntInt32R, (*decFnInfo).fastpathDecMapIntInt32R) + fn(map[int]int64(nil), (*encFnInfo).fastpathEncMapIntInt64R, (*decFnInfo).fastpathDecMapIntInt64R) + fn(map[int]float32(nil), (*encFnInfo).fastpathEncMapIntFloat32R, (*decFnInfo).fastpathDecMapIntFloat32R) + fn(map[int]float64(nil), (*encFnInfo).fastpathEncMapIntFloat64R, (*decFnInfo).fastpathDecMapIntFloat64R) + fn(map[int]bool(nil), (*encFnInfo).fastpathEncMapIntBoolR, (*decFnInfo).fastpathDecMapIntBoolR) + fn(map[int8]interface{}(nil), (*encFnInfo).fastpathEncMapInt8IntfR, (*decFnInfo).fastpathDecMapInt8IntfR) + fn(map[int8]string(nil), (*encFnInfo).fastpathEncMapInt8StringR, (*decFnInfo).fastpathDecMapInt8StringR) + fn(map[int8]uint(nil), (*encFnInfo).fastpathEncMapInt8UintR, (*decFnInfo).fastpathDecMapInt8UintR) + fn(map[int8]uint8(nil), (*encFnInfo).fastpathEncMapInt8Uint8R, (*decFnInfo).fastpathDecMapInt8Uint8R) + fn(map[int8]uint16(nil), (*encFnInfo).fastpathEncMapInt8Uint16R, (*decFnInfo).fastpathDecMapInt8Uint16R) + fn(map[int8]uint32(nil), (*encFnInfo).fastpathEncMapInt8Uint32R, (*decFnInfo).fastpathDecMapInt8Uint32R) + fn(map[int8]uint64(nil), (*encFnInfo).fastpathEncMapInt8Uint64R, (*decFnInfo).fastpathDecMapInt8Uint64R) + fn(map[int8]uintptr(nil), (*encFnInfo).fastpathEncMapInt8UintptrR, (*decFnInfo).fastpathDecMapInt8UintptrR) + fn(map[int8]int(nil), (*encFnInfo).fastpathEncMapInt8IntR, (*decFnInfo).fastpathDecMapInt8IntR) + fn(map[int8]int8(nil), (*encFnInfo).fastpathEncMapInt8Int8R, (*decFnInfo).fastpathDecMapInt8Int8R) + fn(map[int8]int16(nil), (*encFnInfo).fastpathEncMapInt8Int16R, (*decFnInfo).fastpathDecMapInt8Int16R) + fn(map[int8]int32(nil), (*encFnInfo).fastpathEncMapInt8Int32R, (*decFnInfo).fastpathDecMapInt8Int32R) + fn(map[int8]int64(nil), (*encFnInfo).fastpathEncMapInt8Int64R, (*decFnInfo).fastpathDecMapInt8Int64R) + fn(map[int8]float32(nil), (*encFnInfo).fastpathEncMapInt8Float32R, (*decFnInfo).fastpathDecMapInt8Float32R) + fn(map[int8]float64(nil), (*encFnInfo).fastpathEncMapInt8Float64R, (*decFnInfo).fastpathDecMapInt8Float64R) + fn(map[int8]bool(nil), (*encFnInfo).fastpathEncMapInt8BoolR, (*decFnInfo).fastpathDecMapInt8BoolR) + fn(map[int16]interface{}(nil), (*encFnInfo).fastpathEncMapInt16IntfR, (*decFnInfo).fastpathDecMapInt16IntfR) + fn(map[int16]string(nil), (*encFnInfo).fastpathEncMapInt16StringR, (*decFnInfo).fastpathDecMapInt16StringR) + fn(map[int16]uint(nil), (*encFnInfo).fastpathEncMapInt16UintR, (*decFnInfo).fastpathDecMapInt16UintR) + fn(map[int16]uint8(nil), (*encFnInfo).fastpathEncMapInt16Uint8R, (*decFnInfo).fastpathDecMapInt16Uint8R) + fn(map[int16]uint16(nil), (*encFnInfo).fastpathEncMapInt16Uint16R, (*decFnInfo).fastpathDecMapInt16Uint16R) + fn(map[int16]uint32(nil), (*encFnInfo).fastpathEncMapInt16Uint32R, (*decFnInfo).fastpathDecMapInt16Uint32R) + fn(map[int16]uint64(nil), (*encFnInfo).fastpathEncMapInt16Uint64R, (*decFnInfo).fastpathDecMapInt16Uint64R) + fn(map[int16]uintptr(nil), (*encFnInfo).fastpathEncMapInt16UintptrR, (*decFnInfo).fastpathDecMapInt16UintptrR) + fn(map[int16]int(nil), (*encFnInfo).fastpathEncMapInt16IntR, (*decFnInfo).fastpathDecMapInt16IntR) + fn(map[int16]int8(nil), (*encFnInfo).fastpathEncMapInt16Int8R, (*decFnInfo).fastpathDecMapInt16Int8R) + fn(map[int16]int16(nil), (*encFnInfo).fastpathEncMapInt16Int16R, (*decFnInfo).fastpathDecMapInt16Int16R) + fn(map[int16]int32(nil), (*encFnInfo).fastpathEncMapInt16Int32R, (*decFnInfo).fastpathDecMapInt16Int32R) + fn(map[int16]int64(nil), (*encFnInfo).fastpathEncMapInt16Int64R, (*decFnInfo).fastpathDecMapInt16Int64R) + fn(map[int16]float32(nil), (*encFnInfo).fastpathEncMapInt16Float32R, (*decFnInfo).fastpathDecMapInt16Float32R) + fn(map[int16]float64(nil), (*encFnInfo).fastpathEncMapInt16Float64R, (*decFnInfo).fastpathDecMapInt16Float64R) + fn(map[int16]bool(nil), (*encFnInfo).fastpathEncMapInt16BoolR, (*decFnInfo).fastpathDecMapInt16BoolR) + fn(map[int32]interface{}(nil), (*encFnInfo).fastpathEncMapInt32IntfR, (*decFnInfo).fastpathDecMapInt32IntfR) + fn(map[int32]string(nil), (*encFnInfo).fastpathEncMapInt32StringR, (*decFnInfo).fastpathDecMapInt32StringR) + fn(map[int32]uint(nil), (*encFnInfo).fastpathEncMapInt32UintR, (*decFnInfo).fastpathDecMapInt32UintR) + fn(map[int32]uint8(nil), (*encFnInfo).fastpathEncMapInt32Uint8R, (*decFnInfo).fastpathDecMapInt32Uint8R) + fn(map[int32]uint16(nil), (*encFnInfo).fastpathEncMapInt32Uint16R, (*decFnInfo).fastpathDecMapInt32Uint16R) + fn(map[int32]uint32(nil), (*encFnInfo).fastpathEncMapInt32Uint32R, (*decFnInfo).fastpathDecMapInt32Uint32R) + fn(map[int32]uint64(nil), (*encFnInfo).fastpathEncMapInt32Uint64R, (*decFnInfo).fastpathDecMapInt32Uint64R) + fn(map[int32]uintptr(nil), (*encFnInfo).fastpathEncMapInt32UintptrR, (*decFnInfo).fastpathDecMapInt32UintptrR) + fn(map[int32]int(nil), (*encFnInfo).fastpathEncMapInt32IntR, (*decFnInfo).fastpathDecMapInt32IntR) + fn(map[int32]int8(nil), (*encFnInfo).fastpathEncMapInt32Int8R, (*decFnInfo).fastpathDecMapInt32Int8R) + fn(map[int32]int16(nil), (*encFnInfo).fastpathEncMapInt32Int16R, (*decFnInfo).fastpathDecMapInt32Int16R) + fn(map[int32]int32(nil), (*encFnInfo).fastpathEncMapInt32Int32R, (*decFnInfo).fastpathDecMapInt32Int32R) + fn(map[int32]int64(nil), (*encFnInfo).fastpathEncMapInt32Int64R, (*decFnInfo).fastpathDecMapInt32Int64R) + fn(map[int32]float32(nil), (*encFnInfo).fastpathEncMapInt32Float32R, (*decFnInfo).fastpathDecMapInt32Float32R) + fn(map[int32]float64(nil), (*encFnInfo).fastpathEncMapInt32Float64R, (*decFnInfo).fastpathDecMapInt32Float64R) + fn(map[int32]bool(nil), (*encFnInfo).fastpathEncMapInt32BoolR, (*decFnInfo).fastpathDecMapInt32BoolR) + fn(map[int64]interface{}(nil), (*encFnInfo).fastpathEncMapInt64IntfR, (*decFnInfo).fastpathDecMapInt64IntfR) + fn(map[int64]string(nil), (*encFnInfo).fastpathEncMapInt64StringR, (*decFnInfo).fastpathDecMapInt64StringR) + fn(map[int64]uint(nil), (*encFnInfo).fastpathEncMapInt64UintR, (*decFnInfo).fastpathDecMapInt64UintR) + fn(map[int64]uint8(nil), (*encFnInfo).fastpathEncMapInt64Uint8R, (*decFnInfo).fastpathDecMapInt64Uint8R) + fn(map[int64]uint16(nil), (*encFnInfo).fastpathEncMapInt64Uint16R, (*decFnInfo).fastpathDecMapInt64Uint16R) + fn(map[int64]uint32(nil), (*encFnInfo).fastpathEncMapInt64Uint32R, (*decFnInfo).fastpathDecMapInt64Uint32R) + fn(map[int64]uint64(nil), (*encFnInfo).fastpathEncMapInt64Uint64R, (*decFnInfo).fastpathDecMapInt64Uint64R) + fn(map[int64]uintptr(nil), (*encFnInfo).fastpathEncMapInt64UintptrR, (*decFnInfo).fastpathDecMapInt64UintptrR) + fn(map[int64]int(nil), (*encFnInfo).fastpathEncMapInt64IntR, (*decFnInfo).fastpathDecMapInt64IntR) + fn(map[int64]int8(nil), (*encFnInfo).fastpathEncMapInt64Int8R, (*decFnInfo).fastpathDecMapInt64Int8R) + fn(map[int64]int16(nil), (*encFnInfo).fastpathEncMapInt64Int16R, (*decFnInfo).fastpathDecMapInt64Int16R) + fn(map[int64]int32(nil), (*encFnInfo).fastpathEncMapInt64Int32R, (*decFnInfo).fastpathDecMapInt64Int32R) + fn(map[int64]int64(nil), (*encFnInfo).fastpathEncMapInt64Int64R, (*decFnInfo).fastpathDecMapInt64Int64R) + fn(map[int64]float32(nil), (*encFnInfo).fastpathEncMapInt64Float32R, (*decFnInfo).fastpathDecMapInt64Float32R) + fn(map[int64]float64(nil), (*encFnInfo).fastpathEncMapInt64Float64R, (*decFnInfo).fastpathDecMapInt64Float64R) + fn(map[int64]bool(nil), (*encFnInfo).fastpathEncMapInt64BoolR, (*decFnInfo).fastpathDecMapInt64BoolR) + fn(map[bool]interface{}(nil), (*encFnInfo).fastpathEncMapBoolIntfR, (*decFnInfo).fastpathDecMapBoolIntfR) + fn(map[bool]string(nil), (*encFnInfo).fastpathEncMapBoolStringR, (*decFnInfo).fastpathDecMapBoolStringR) + fn(map[bool]uint(nil), (*encFnInfo).fastpathEncMapBoolUintR, (*decFnInfo).fastpathDecMapBoolUintR) + fn(map[bool]uint8(nil), (*encFnInfo).fastpathEncMapBoolUint8R, (*decFnInfo).fastpathDecMapBoolUint8R) + fn(map[bool]uint16(nil), (*encFnInfo).fastpathEncMapBoolUint16R, (*decFnInfo).fastpathDecMapBoolUint16R) + fn(map[bool]uint32(nil), (*encFnInfo).fastpathEncMapBoolUint32R, (*decFnInfo).fastpathDecMapBoolUint32R) + fn(map[bool]uint64(nil), (*encFnInfo).fastpathEncMapBoolUint64R, (*decFnInfo).fastpathDecMapBoolUint64R) + fn(map[bool]uintptr(nil), (*encFnInfo).fastpathEncMapBoolUintptrR, (*decFnInfo).fastpathDecMapBoolUintptrR) + fn(map[bool]int(nil), (*encFnInfo).fastpathEncMapBoolIntR, (*decFnInfo).fastpathDecMapBoolIntR) + fn(map[bool]int8(nil), (*encFnInfo).fastpathEncMapBoolInt8R, (*decFnInfo).fastpathDecMapBoolInt8R) + fn(map[bool]int16(nil), (*encFnInfo).fastpathEncMapBoolInt16R, (*decFnInfo).fastpathDecMapBoolInt16R) + fn(map[bool]int32(nil), (*encFnInfo).fastpathEncMapBoolInt32R, (*decFnInfo).fastpathDecMapBoolInt32R) + fn(map[bool]int64(nil), (*encFnInfo).fastpathEncMapBoolInt64R, (*decFnInfo).fastpathDecMapBoolInt64R) + fn(map[bool]float32(nil), (*encFnInfo).fastpathEncMapBoolFloat32R, (*decFnInfo).fastpathDecMapBoolFloat32R) + fn(map[bool]float64(nil), (*encFnInfo).fastpathEncMapBoolFloat64R, (*decFnInfo).fastpathDecMapBoolFloat64R) + fn(map[bool]bool(nil), (*encFnInfo).fastpathEncMapBoolBoolR, (*decFnInfo).fastpathDecMapBoolBoolR) + + sort.Sort(fastpathAslice(fastpathAV[:])) +} + +// -- encode + +// -- -- fast path type switch +func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { + + case []interface{}: + fastpathTV.EncSliceIntfV(v, fastpathCheckNilTrue, e) + case *[]interface{}: + fastpathTV.EncSliceIntfV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]interface{}: + fastpathTV.EncMapIntfIntfV(v, fastpathCheckNilTrue, e) + case *map[interface{}]interface{}: + fastpathTV.EncMapIntfIntfV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]string: + fastpathTV.EncMapIntfStringV(v, fastpathCheckNilTrue, e) + case *map[interface{}]string: + fastpathTV.EncMapIntfStringV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint: + fastpathTV.EncMapIntfUintV(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint: + fastpathTV.EncMapIntfUintV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint8: + fastpathTV.EncMapIntfUint8V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint8: + fastpathTV.EncMapIntfUint8V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint16: + fastpathTV.EncMapIntfUint16V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint16: + fastpathTV.EncMapIntfUint16V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint32: + fastpathTV.EncMapIntfUint32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint32: + fastpathTV.EncMapIntfUint32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint64: + fastpathTV.EncMapIntfUint64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint64: + fastpathTV.EncMapIntfUint64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uintptr: + fastpathTV.EncMapIntfUintptrV(v, fastpathCheckNilTrue, e) + case *map[interface{}]uintptr: + fastpathTV.EncMapIntfUintptrV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int: + fastpathTV.EncMapIntfIntV(v, fastpathCheckNilTrue, e) + case *map[interface{}]int: + fastpathTV.EncMapIntfIntV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int8: + fastpathTV.EncMapIntfInt8V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int8: + fastpathTV.EncMapIntfInt8V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int16: + fastpathTV.EncMapIntfInt16V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int16: + fastpathTV.EncMapIntfInt16V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int32: + fastpathTV.EncMapIntfInt32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int32: + fastpathTV.EncMapIntfInt32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int64: + fastpathTV.EncMapIntfInt64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int64: + fastpathTV.EncMapIntfInt64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]float32: + fastpathTV.EncMapIntfFloat32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]float32: + fastpathTV.EncMapIntfFloat32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]float64: + fastpathTV.EncMapIntfFloat64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]float64: + fastpathTV.EncMapIntfFloat64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]bool: + fastpathTV.EncMapIntfBoolV(v, fastpathCheckNilTrue, e) + case *map[interface{}]bool: + fastpathTV.EncMapIntfBoolV(*v, fastpathCheckNilTrue, e) + + case []string: + fastpathTV.EncSliceStringV(v, fastpathCheckNilTrue, e) + case *[]string: + fastpathTV.EncSliceStringV(*v, fastpathCheckNilTrue, e) + + case map[string]interface{}: + fastpathTV.EncMapStringIntfV(v, fastpathCheckNilTrue, e) + case *map[string]interface{}: + fastpathTV.EncMapStringIntfV(*v, fastpathCheckNilTrue, e) + + case map[string]string: + fastpathTV.EncMapStringStringV(v, fastpathCheckNilTrue, e) + case *map[string]string: + fastpathTV.EncMapStringStringV(*v, fastpathCheckNilTrue, e) + + case map[string]uint: + fastpathTV.EncMapStringUintV(v, fastpathCheckNilTrue, e) + case *map[string]uint: + fastpathTV.EncMapStringUintV(*v, fastpathCheckNilTrue, e) + + case map[string]uint8: + fastpathTV.EncMapStringUint8V(v, fastpathCheckNilTrue, e) + case *map[string]uint8: + fastpathTV.EncMapStringUint8V(*v, fastpathCheckNilTrue, e) + + case map[string]uint16: + fastpathTV.EncMapStringUint16V(v, fastpathCheckNilTrue, e) + case *map[string]uint16: + fastpathTV.EncMapStringUint16V(*v, fastpathCheckNilTrue, e) + + case map[string]uint32: + fastpathTV.EncMapStringUint32V(v, fastpathCheckNilTrue, e) + case *map[string]uint32: + fastpathTV.EncMapStringUint32V(*v, fastpathCheckNilTrue, e) + + case map[string]uint64: + fastpathTV.EncMapStringUint64V(v, fastpathCheckNilTrue, e) + case *map[string]uint64: + fastpathTV.EncMapStringUint64V(*v, fastpathCheckNilTrue, e) + + case map[string]uintptr: + fastpathTV.EncMapStringUintptrV(v, fastpathCheckNilTrue, e) + case *map[string]uintptr: + fastpathTV.EncMapStringUintptrV(*v, fastpathCheckNilTrue, e) + + case map[string]int: + fastpathTV.EncMapStringIntV(v, fastpathCheckNilTrue, e) + case *map[string]int: + fastpathTV.EncMapStringIntV(*v, fastpathCheckNilTrue, e) + + case map[string]int8: + fastpathTV.EncMapStringInt8V(v, fastpathCheckNilTrue, e) + case *map[string]int8: + fastpathTV.EncMapStringInt8V(*v, fastpathCheckNilTrue, e) + + case map[string]int16: + fastpathTV.EncMapStringInt16V(v, fastpathCheckNilTrue, e) + case *map[string]int16: + fastpathTV.EncMapStringInt16V(*v, fastpathCheckNilTrue, e) + + case map[string]int32: + fastpathTV.EncMapStringInt32V(v, fastpathCheckNilTrue, e) + case *map[string]int32: + fastpathTV.EncMapStringInt32V(*v, fastpathCheckNilTrue, e) + + case map[string]int64: + fastpathTV.EncMapStringInt64V(v, fastpathCheckNilTrue, e) + case *map[string]int64: + fastpathTV.EncMapStringInt64V(*v, fastpathCheckNilTrue, e) + + case map[string]float32: + fastpathTV.EncMapStringFloat32V(v, fastpathCheckNilTrue, e) + case *map[string]float32: + fastpathTV.EncMapStringFloat32V(*v, fastpathCheckNilTrue, e) + + case map[string]float64: + fastpathTV.EncMapStringFloat64V(v, fastpathCheckNilTrue, e) + case *map[string]float64: + fastpathTV.EncMapStringFloat64V(*v, fastpathCheckNilTrue, e) + + case map[string]bool: + fastpathTV.EncMapStringBoolV(v, fastpathCheckNilTrue, e) + case *map[string]bool: + fastpathTV.EncMapStringBoolV(*v, fastpathCheckNilTrue, e) + + case []float32: + fastpathTV.EncSliceFloat32V(v, fastpathCheckNilTrue, e) + case *[]float32: + fastpathTV.EncSliceFloat32V(*v, fastpathCheckNilTrue, e) + + case map[float32]interface{}: + fastpathTV.EncMapFloat32IntfV(v, fastpathCheckNilTrue, e) + case *map[float32]interface{}: + fastpathTV.EncMapFloat32IntfV(*v, fastpathCheckNilTrue, e) + + case map[float32]string: + fastpathTV.EncMapFloat32StringV(v, fastpathCheckNilTrue, e) + case *map[float32]string: + fastpathTV.EncMapFloat32StringV(*v, fastpathCheckNilTrue, e) + + case map[float32]uint: + fastpathTV.EncMapFloat32UintV(v, fastpathCheckNilTrue, e) + case *map[float32]uint: + fastpathTV.EncMapFloat32UintV(*v, fastpathCheckNilTrue, e) + + case map[float32]uint8: + fastpathTV.EncMapFloat32Uint8V(v, fastpathCheckNilTrue, e) + case *map[float32]uint8: + fastpathTV.EncMapFloat32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint16: + fastpathTV.EncMapFloat32Uint16V(v, fastpathCheckNilTrue, e) + case *map[float32]uint16: + fastpathTV.EncMapFloat32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint32: + fastpathTV.EncMapFloat32Uint32V(v, fastpathCheckNilTrue, e) + case *map[float32]uint32: + fastpathTV.EncMapFloat32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint64: + fastpathTV.EncMapFloat32Uint64V(v, fastpathCheckNilTrue, e) + case *map[float32]uint64: + fastpathTV.EncMapFloat32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[float32]uintptr: + fastpathTV.EncMapFloat32UintptrV(v, fastpathCheckNilTrue, e) + case *map[float32]uintptr: + fastpathTV.EncMapFloat32UintptrV(*v, fastpathCheckNilTrue, e) + + case map[float32]int: + fastpathTV.EncMapFloat32IntV(v, fastpathCheckNilTrue, e) + case *map[float32]int: + fastpathTV.EncMapFloat32IntV(*v, fastpathCheckNilTrue, e) + + case map[float32]int8: + fastpathTV.EncMapFloat32Int8V(v, fastpathCheckNilTrue, e) + case *map[float32]int8: + fastpathTV.EncMapFloat32Int8V(*v, fastpathCheckNilTrue, e) + + case map[float32]int16: + fastpathTV.EncMapFloat32Int16V(v, fastpathCheckNilTrue, e) + case *map[float32]int16: + fastpathTV.EncMapFloat32Int16V(*v, fastpathCheckNilTrue, e) + + case map[float32]int32: + fastpathTV.EncMapFloat32Int32V(v, fastpathCheckNilTrue, e) + case *map[float32]int32: + fastpathTV.EncMapFloat32Int32V(*v, fastpathCheckNilTrue, e) + + case map[float32]int64: + fastpathTV.EncMapFloat32Int64V(v, fastpathCheckNilTrue, e) + case *map[float32]int64: + fastpathTV.EncMapFloat32Int64V(*v, fastpathCheckNilTrue, e) + + case map[float32]float32: + fastpathTV.EncMapFloat32Float32V(v, fastpathCheckNilTrue, e) + case *map[float32]float32: + fastpathTV.EncMapFloat32Float32V(*v, fastpathCheckNilTrue, e) + + case map[float32]float64: + fastpathTV.EncMapFloat32Float64V(v, fastpathCheckNilTrue, e) + case *map[float32]float64: + fastpathTV.EncMapFloat32Float64V(*v, fastpathCheckNilTrue, e) + + case map[float32]bool: + fastpathTV.EncMapFloat32BoolV(v, fastpathCheckNilTrue, e) + case *map[float32]bool: + fastpathTV.EncMapFloat32BoolV(*v, fastpathCheckNilTrue, e) + + case []float64: + fastpathTV.EncSliceFloat64V(v, fastpathCheckNilTrue, e) + case *[]float64: + fastpathTV.EncSliceFloat64V(*v, fastpathCheckNilTrue, e) + + case map[float64]interface{}: + fastpathTV.EncMapFloat64IntfV(v, fastpathCheckNilTrue, e) + case *map[float64]interface{}: + fastpathTV.EncMapFloat64IntfV(*v, fastpathCheckNilTrue, e) + + case map[float64]string: + fastpathTV.EncMapFloat64StringV(v, fastpathCheckNilTrue, e) + case *map[float64]string: + fastpathTV.EncMapFloat64StringV(*v, fastpathCheckNilTrue, e) + + case map[float64]uint: + fastpathTV.EncMapFloat64UintV(v, fastpathCheckNilTrue, e) + case *map[float64]uint: + fastpathTV.EncMapFloat64UintV(*v, fastpathCheckNilTrue, e) + + case map[float64]uint8: + fastpathTV.EncMapFloat64Uint8V(v, fastpathCheckNilTrue, e) + case *map[float64]uint8: + fastpathTV.EncMapFloat64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint16: + fastpathTV.EncMapFloat64Uint16V(v, fastpathCheckNilTrue, e) + case *map[float64]uint16: + fastpathTV.EncMapFloat64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint32: + fastpathTV.EncMapFloat64Uint32V(v, fastpathCheckNilTrue, e) + case *map[float64]uint32: + fastpathTV.EncMapFloat64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint64: + fastpathTV.EncMapFloat64Uint64V(v, fastpathCheckNilTrue, e) + case *map[float64]uint64: + fastpathTV.EncMapFloat64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[float64]uintptr: + fastpathTV.EncMapFloat64UintptrV(v, fastpathCheckNilTrue, e) + case *map[float64]uintptr: + fastpathTV.EncMapFloat64UintptrV(*v, fastpathCheckNilTrue, e) + + case map[float64]int: + fastpathTV.EncMapFloat64IntV(v, fastpathCheckNilTrue, e) + case *map[float64]int: + fastpathTV.EncMapFloat64IntV(*v, fastpathCheckNilTrue, e) + + case map[float64]int8: + fastpathTV.EncMapFloat64Int8V(v, fastpathCheckNilTrue, e) + case *map[float64]int8: + fastpathTV.EncMapFloat64Int8V(*v, fastpathCheckNilTrue, e) + + case map[float64]int16: + fastpathTV.EncMapFloat64Int16V(v, fastpathCheckNilTrue, e) + case *map[float64]int16: + fastpathTV.EncMapFloat64Int16V(*v, fastpathCheckNilTrue, e) + + case map[float64]int32: + fastpathTV.EncMapFloat64Int32V(v, fastpathCheckNilTrue, e) + case *map[float64]int32: + fastpathTV.EncMapFloat64Int32V(*v, fastpathCheckNilTrue, e) + + case map[float64]int64: + fastpathTV.EncMapFloat64Int64V(v, fastpathCheckNilTrue, e) + case *map[float64]int64: + fastpathTV.EncMapFloat64Int64V(*v, fastpathCheckNilTrue, e) + + case map[float64]float32: + fastpathTV.EncMapFloat64Float32V(v, fastpathCheckNilTrue, e) + case *map[float64]float32: + fastpathTV.EncMapFloat64Float32V(*v, fastpathCheckNilTrue, e) + + case map[float64]float64: + fastpathTV.EncMapFloat64Float64V(v, fastpathCheckNilTrue, e) + case *map[float64]float64: + fastpathTV.EncMapFloat64Float64V(*v, fastpathCheckNilTrue, e) + + case map[float64]bool: + fastpathTV.EncMapFloat64BoolV(v, fastpathCheckNilTrue, e) + case *map[float64]bool: + fastpathTV.EncMapFloat64BoolV(*v, fastpathCheckNilTrue, e) + + case []uint: + fastpathTV.EncSliceUintV(v, fastpathCheckNilTrue, e) + case *[]uint: + fastpathTV.EncSliceUintV(*v, fastpathCheckNilTrue, e) + + case map[uint]interface{}: + fastpathTV.EncMapUintIntfV(v, fastpathCheckNilTrue, e) + case *map[uint]interface{}: + fastpathTV.EncMapUintIntfV(*v, fastpathCheckNilTrue, e) + + case map[uint]string: + fastpathTV.EncMapUintStringV(v, fastpathCheckNilTrue, e) + case *map[uint]string: + fastpathTV.EncMapUintStringV(*v, fastpathCheckNilTrue, e) + + case map[uint]uint: + fastpathTV.EncMapUintUintV(v, fastpathCheckNilTrue, e) + case *map[uint]uint: + fastpathTV.EncMapUintUintV(*v, fastpathCheckNilTrue, e) + + case map[uint]uint8: + fastpathTV.EncMapUintUint8V(v, fastpathCheckNilTrue, e) + case *map[uint]uint8: + fastpathTV.EncMapUintUint8V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint16: + fastpathTV.EncMapUintUint16V(v, fastpathCheckNilTrue, e) + case *map[uint]uint16: + fastpathTV.EncMapUintUint16V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint32: + fastpathTV.EncMapUintUint32V(v, fastpathCheckNilTrue, e) + case *map[uint]uint32: + fastpathTV.EncMapUintUint32V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint64: + fastpathTV.EncMapUintUint64V(v, fastpathCheckNilTrue, e) + case *map[uint]uint64: + fastpathTV.EncMapUintUint64V(*v, fastpathCheckNilTrue, e) + + case map[uint]uintptr: + fastpathTV.EncMapUintUintptrV(v, fastpathCheckNilTrue, e) + case *map[uint]uintptr: + fastpathTV.EncMapUintUintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint]int: + fastpathTV.EncMapUintIntV(v, fastpathCheckNilTrue, e) + case *map[uint]int: + fastpathTV.EncMapUintIntV(*v, fastpathCheckNilTrue, e) + + case map[uint]int8: + fastpathTV.EncMapUintInt8V(v, fastpathCheckNilTrue, e) + case *map[uint]int8: + fastpathTV.EncMapUintInt8V(*v, fastpathCheckNilTrue, e) + + case map[uint]int16: + fastpathTV.EncMapUintInt16V(v, fastpathCheckNilTrue, e) + case *map[uint]int16: + fastpathTV.EncMapUintInt16V(*v, fastpathCheckNilTrue, e) + + case map[uint]int32: + fastpathTV.EncMapUintInt32V(v, fastpathCheckNilTrue, e) + case *map[uint]int32: + fastpathTV.EncMapUintInt32V(*v, fastpathCheckNilTrue, e) + + case map[uint]int64: + fastpathTV.EncMapUintInt64V(v, fastpathCheckNilTrue, e) + case *map[uint]int64: + fastpathTV.EncMapUintInt64V(*v, fastpathCheckNilTrue, e) + + case map[uint]float32: + fastpathTV.EncMapUintFloat32V(v, fastpathCheckNilTrue, e) + case *map[uint]float32: + fastpathTV.EncMapUintFloat32V(*v, fastpathCheckNilTrue, e) + + case map[uint]float64: + fastpathTV.EncMapUintFloat64V(v, fastpathCheckNilTrue, e) + case *map[uint]float64: + fastpathTV.EncMapUintFloat64V(*v, fastpathCheckNilTrue, e) + + case map[uint]bool: + fastpathTV.EncMapUintBoolV(v, fastpathCheckNilTrue, e) + case *map[uint]bool: + fastpathTV.EncMapUintBoolV(*v, fastpathCheckNilTrue, e) + + case map[uint8]interface{}: + fastpathTV.EncMapUint8IntfV(v, fastpathCheckNilTrue, e) + case *map[uint8]interface{}: + fastpathTV.EncMapUint8IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint8]string: + fastpathTV.EncMapUint8StringV(v, fastpathCheckNilTrue, e) + case *map[uint8]string: + fastpathTV.EncMapUint8StringV(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint: + fastpathTV.EncMapUint8UintV(v, fastpathCheckNilTrue, e) + case *map[uint8]uint: + fastpathTV.EncMapUint8UintV(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint8: + fastpathTV.EncMapUint8Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint8: + fastpathTV.EncMapUint8Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint16: + fastpathTV.EncMapUint8Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint16: + fastpathTV.EncMapUint8Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint32: + fastpathTV.EncMapUint8Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint32: + fastpathTV.EncMapUint8Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint64: + fastpathTV.EncMapUint8Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint64: + fastpathTV.EncMapUint8Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uintptr: + fastpathTV.EncMapUint8UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint8]uintptr: + fastpathTV.EncMapUint8UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint8]int: + fastpathTV.EncMapUint8IntV(v, fastpathCheckNilTrue, e) + case *map[uint8]int: + fastpathTV.EncMapUint8IntV(*v, fastpathCheckNilTrue, e) + + case map[uint8]int8: + fastpathTV.EncMapUint8Int8V(v, fastpathCheckNilTrue, e) + case *map[uint8]int8: + fastpathTV.EncMapUint8Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int16: + fastpathTV.EncMapUint8Int16V(v, fastpathCheckNilTrue, e) + case *map[uint8]int16: + fastpathTV.EncMapUint8Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int32: + fastpathTV.EncMapUint8Int32V(v, fastpathCheckNilTrue, e) + case *map[uint8]int32: + fastpathTV.EncMapUint8Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int64: + fastpathTV.EncMapUint8Int64V(v, fastpathCheckNilTrue, e) + case *map[uint8]int64: + fastpathTV.EncMapUint8Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]float32: + fastpathTV.EncMapUint8Float32V(v, fastpathCheckNilTrue, e) + case *map[uint8]float32: + fastpathTV.EncMapUint8Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]float64: + fastpathTV.EncMapUint8Float64V(v, fastpathCheckNilTrue, e) + case *map[uint8]float64: + fastpathTV.EncMapUint8Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]bool: + fastpathTV.EncMapUint8BoolV(v, fastpathCheckNilTrue, e) + case *map[uint8]bool: + fastpathTV.EncMapUint8BoolV(*v, fastpathCheckNilTrue, e) + + case []uint16: + fastpathTV.EncSliceUint16V(v, fastpathCheckNilTrue, e) + case *[]uint16: + fastpathTV.EncSliceUint16V(*v, fastpathCheckNilTrue, e) + + case map[uint16]interface{}: + fastpathTV.EncMapUint16IntfV(v, fastpathCheckNilTrue, e) + case *map[uint16]interface{}: + fastpathTV.EncMapUint16IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint16]string: + fastpathTV.EncMapUint16StringV(v, fastpathCheckNilTrue, e) + case *map[uint16]string: + fastpathTV.EncMapUint16StringV(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint: + fastpathTV.EncMapUint16UintV(v, fastpathCheckNilTrue, e) + case *map[uint16]uint: + fastpathTV.EncMapUint16UintV(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint8: + fastpathTV.EncMapUint16Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint8: + fastpathTV.EncMapUint16Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint16: + fastpathTV.EncMapUint16Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint16: + fastpathTV.EncMapUint16Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint32: + fastpathTV.EncMapUint16Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint32: + fastpathTV.EncMapUint16Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint64: + fastpathTV.EncMapUint16Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint64: + fastpathTV.EncMapUint16Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uintptr: + fastpathTV.EncMapUint16UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint16]uintptr: + fastpathTV.EncMapUint16UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint16]int: + fastpathTV.EncMapUint16IntV(v, fastpathCheckNilTrue, e) + case *map[uint16]int: + fastpathTV.EncMapUint16IntV(*v, fastpathCheckNilTrue, e) + + case map[uint16]int8: + fastpathTV.EncMapUint16Int8V(v, fastpathCheckNilTrue, e) + case *map[uint16]int8: + fastpathTV.EncMapUint16Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int16: + fastpathTV.EncMapUint16Int16V(v, fastpathCheckNilTrue, e) + case *map[uint16]int16: + fastpathTV.EncMapUint16Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int32: + fastpathTV.EncMapUint16Int32V(v, fastpathCheckNilTrue, e) + case *map[uint16]int32: + fastpathTV.EncMapUint16Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int64: + fastpathTV.EncMapUint16Int64V(v, fastpathCheckNilTrue, e) + case *map[uint16]int64: + fastpathTV.EncMapUint16Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]float32: + fastpathTV.EncMapUint16Float32V(v, fastpathCheckNilTrue, e) + case *map[uint16]float32: + fastpathTV.EncMapUint16Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]float64: + fastpathTV.EncMapUint16Float64V(v, fastpathCheckNilTrue, e) + case *map[uint16]float64: + fastpathTV.EncMapUint16Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]bool: + fastpathTV.EncMapUint16BoolV(v, fastpathCheckNilTrue, e) + case *map[uint16]bool: + fastpathTV.EncMapUint16BoolV(*v, fastpathCheckNilTrue, e) + + case []uint32: + fastpathTV.EncSliceUint32V(v, fastpathCheckNilTrue, e) + case *[]uint32: + fastpathTV.EncSliceUint32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]interface{}: + fastpathTV.EncMapUint32IntfV(v, fastpathCheckNilTrue, e) + case *map[uint32]interface{}: + fastpathTV.EncMapUint32IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint32]string: + fastpathTV.EncMapUint32StringV(v, fastpathCheckNilTrue, e) + case *map[uint32]string: + fastpathTV.EncMapUint32StringV(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint: + fastpathTV.EncMapUint32UintV(v, fastpathCheckNilTrue, e) + case *map[uint32]uint: + fastpathTV.EncMapUint32UintV(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint8: + fastpathTV.EncMapUint32Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint8: + fastpathTV.EncMapUint32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint16: + fastpathTV.EncMapUint32Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint16: + fastpathTV.EncMapUint32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint32: + fastpathTV.EncMapUint32Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint32: + fastpathTV.EncMapUint32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint64: + fastpathTV.EncMapUint32Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint64: + fastpathTV.EncMapUint32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uintptr: + fastpathTV.EncMapUint32UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint32]uintptr: + fastpathTV.EncMapUint32UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint32]int: + fastpathTV.EncMapUint32IntV(v, fastpathCheckNilTrue, e) + case *map[uint32]int: + fastpathTV.EncMapUint32IntV(*v, fastpathCheckNilTrue, e) + + case map[uint32]int8: + fastpathTV.EncMapUint32Int8V(v, fastpathCheckNilTrue, e) + case *map[uint32]int8: + fastpathTV.EncMapUint32Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int16: + fastpathTV.EncMapUint32Int16V(v, fastpathCheckNilTrue, e) + case *map[uint32]int16: + fastpathTV.EncMapUint32Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int32: + fastpathTV.EncMapUint32Int32V(v, fastpathCheckNilTrue, e) + case *map[uint32]int32: + fastpathTV.EncMapUint32Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int64: + fastpathTV.EncMapUint32Int64V(v, fastpathCheckNilTrue, e) + case *map[uint32]int64: + fastpathTV.EncMapUint32Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]float32: + fastpathTV.EncMapUint32Float32V(v, fastpathCheckNilTrue, e) + case *map[uint32]float32: + fastpathTV.EncMapUint32Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]float64: + fastpathTV.EncMapUint32Float64V(v, fastpathCheckNilTrue, e) + case *map[uint32]float64: + fastpathTV.EncMapUint32Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]bool: + fastpathTV.EncMapUint32BoolV(v, fastpathCheckNilTrue, e) + case *map[uint32]bool: + fastpathTV.EncMapUint32BoolV(*v, fastpathCheckNilTrue, e) + + case []uint64: + fastpathTV.EncSliceUint64V(v, fastpathCheckNilTrue, e) + case *[]uint64: + fastpathTV.EncSliceUint64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]interface{}: + fastpathTV.EncMapUint64IntfV(v, fastpathCheckNilTrue, e) + case *map[uint64]interface{}: + fastpathTV.EncMapUint64IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint64]string: + fastpathTV.EncMapUint64StringV(v, fastpathCheckNilTrue, e) + case *map[uint64]string: + fastpathTV.EncMapUint64StringV(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint: + fastpathTV.EncMapUint64UintV(v, fastpathCheckNilTrue, e) + case *map[uint64]uint: + fastpathTV.EncMapUint64UintV(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint8: + fastpathTV.EncMapUint64Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint8: + fastpathTV.EncMapUint64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint16: + fastpathTV.EncMapUint64Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint16: + fastpathTV.EncMapUint64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint32: + fastpathTV.EncMapUint64Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint32: + fastpathTV.EncMapUint64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint64: + fastpathTV.EncMapUint64Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint64: + fastpathTV.EncMapUint64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uintptr: + fastpathTV.EncMapUint64UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint64]uintptr: + fastpathTV.EncMapUint64UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint64]int: + fastpathTV.EncMapUint64IntV(v, fastpathCheckNilTrue, e) + case *map[uint64]int: + fastpathTV.EncMapUint64IntV(*v, fastpathCheckNilTrue, e) + + case map[uint64]int8: + fastpathTV.EncMapUint64Int8V(v, fastpathCheckNilTrue, e) + case *map[uint64]int8: + fastpathTV.EncMapUint64Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int16: + fastpathTV.EncMapUint64Int16V(v, fastpathCheckNilTrue, e) + case *map[uint64]int16: + fastpathTV.EncMapUint64Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int32: + fastpathTV.EncMapUint64Int32V(v, fastpathCheckNilTrue, e) + case *map[uint64]int32: + fastpathTV.EncMapUint64Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int64: + fastpathTV.EncMapUint64Int64V(v, fastpathCheckNilTrue, e) + case *map[uint64]int64: + fastpathTV.EncMapUint64Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]float32: + fastpathTV.EncMapUint64Float32V(v, fastpathCheckNilTrue, e) + case *map[uint64]float32: + fastpathTV.EncMapUint64Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]float64: + fastpathTV.EncMapUint64Float64V(v, fastpathCheckNilTrue, e) + case *map[uint64]float64: + fastpathTV.EncMapUint64Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]bool: + fastpathTV.EncMapUint64BoolV(v, fastpathCheckNilTrue, e) + case *map[uint64]bool: + fastpathTV.EncMapUint64BoolV(*v, fastpathCheckNilTrue, e) + + case []uintptr: + fastpathTV.EncSliceUintptrV(v, fastpathCheckNilTrue, e) + case *[]uintptr: + fastpathTV.EncSliceUintptrV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]interface{}: + fastpathTV.EncMapUintptrIntfV(v, fastpathCheckNilTrue, e) + case *map[uintptr]interface{}: + fastpathTV.EncMapUintptrIntfV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]string: + fastpathTV.EncMapUintptrStringV(v, fastpathCheckNilTrue, e) + case *map[uintptr]string: + fastpathTV.EncMapUintptrStringV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint: + fastpathTV.EncMapUintptrUintV(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint: + fastpathTV.EncMapUintptrUintV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint8: + fastpathTV.EncMapUintptrUint8V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint8: + fastpathTV.EncMapUintptrUint8V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint16: + fastpathTV.EncMapUintptrUint16V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint16: + fastpathTV.EncMapUintptrUint16V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint32: + fastpathTV.EncMapUintptrUint32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint32: + fastpathTV.EncMapUintptrUint32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint64: + fastpathTV.EncMapUintptrUint64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint64: + fastpathTV.EncMapUintptrUint64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uintptr: + fastpathTV.EncMapUintptrUintptrV(v, fastpathCheckNilTrue, e) + case *map[uintptr]uintptr: + fastpathTV.EncMapUintptrUintptrV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int: + fastpathTV.EncMapUintptrIntV(v, fastpathCheckNilTrue, e) + case *map[uintptr]int: + fastpathTV.EncMapUintptrIntV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int8: + fastpathTV.EncMapUintptrInt8V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int8: + fastpathTV.EncMapUintptrInt8V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int16: + fastpathTV.EncMapUintptrInt16V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int16: + fastpathTV.EncMapUintptrInt16V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int32: + fastpathTV.EncMapUintptrInt32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int32: + fastpathTV.EncMapUintptrInt32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int64: + fastpathTV.EncMapUintptrInt64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int64: + fastpathTV.EncMapUintptrInt64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]float32: + fastpathTV.EncMapUintptrFloat32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]float32: + fastpathTV.EncMapUintptrFloat32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]float64: + fastpathTV.EncMapUintptrFloat64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]float64: + fastpathTV.EncMapUintptrFloat64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]bool: + fastpathTV.EncMapUintptrBoolV(v, fastpathCheckNilTrue, e) + case *map[uintptr]bool: + fastpathTV.EncMapUintptrBoolV(*v, fastpathCheckNilTrue, e) + + case []int: + fastpathTV.EncSliceIntV(v, fastpathCheckNilTrue, e) + case *[]int: + fastpathTV.EncSliceIntV(*v, fastpathCheckNilTrue, e) + + case map[int]interface{}: + fastpathTV.EncMapIntIntfV(v, fastpathCheckNilTrue, e) + case *map[int]interface{}: + fastpathTV.EncMapIntIntfV(*v, fastpathCheckNilTrue, e) + + case map[int]string: + fastpathTV.EncMapIntStringV(v, fastpathCheckNilTrue, e) + case *map[int]string: + fastpathTV.EncMapIntStringV(*v, fastpathCheckNilTrue, e) + + case map[int]uint: + fastpathTV.EncMapIntUintV(v, fastpathCheckNilTrue, e) + case *map[int]uint: + fastpathTV.EncMapIntUintV(*v, fastpathCheckNilTrue, e) + + case map[int]uint8: + fastpathTV.EncMapIntUint8V(v, fastpathCheckNilTrue, e) + case *map[int]uint8: + fastpathTV.EncMapIntUint8V(*v, fastpathCheckNilTrue, e) + + case map[int]uint16: + fastpathTV.EncMapIntUint16V(v, fastpathCheckNilTrue, e) + case *map[int]uint16: + fastpathTV.EncMapIntUint16V(*v, fastpathCheckNilTrue, e) + + case map[int]uint32: + fastpathTV.EncMapIntUint32V(v, fastpathCheckNilTrue, e) + case *map[int]uint32: + fastpathTV.EncMapIntUint32V(*v, fastpathCheckNilTrue, e) + + case map[int]uint64: + fastpathTV.EncMapIntUint64V(v, fastpathCheckNilTrue, e) + case *map[int]uint64: + fastpathTV.EncMapIntUint64V(*v, fastpathCheckNilTrue, e) + + case map[int]uintptr: + fastpathTV.EncMapIntUintptrV(v, fastpathCheckNilTrue, e) + case *map[int]uintptr: + fastpathTV.EncMapIntUintptrV(*v, fastpathCheckNilTrue, e) + + case map[int]int: + fastpathTV.EncMapIntIntV(v, fastpathCheckNilTrue, e) + case *map[int]int: + fastpathTV.EncMapIntIntV(*v, fastpathCheckNilTrue, e) + + case map[int]int8: + fastpathTV.EncMapIntInt8V(v, fastpathCheckNilTrue, e) + case *map[int]int8: + fastpathTV.EncMapIntInt8V(*v, fastpathCheckNilTrue, e) + + case map[int]int16: + fastpathTV.EncMapIntInt16V(v, fastpathCheckNilTrue, e) + case *map[int]int16: + fastpathTV.EncMapIntInt16V(*v, fastpathCheckNilTrue, e) + + case map[int]int32: + fastpathTV.EncMapIntInt32V(v, fastpathCheckNilTrue, e) + case *map[int]int32: + fastpathTV.EncMapIntInt32V(*v, fastpathCheckNilTrue, e) + + case map[int]int64: + fastpathTV.EncMapIntInt64V(v, fastpathCheckNilTrue, e) + case *map[int]int64: + fastpathTV.EncMapIntInt64V(*v, fastpathCheckNilTrue, e) + + case map[int]float32: + fastpathTV.EncMapIntFloat32V(v, fastpathCheckNilTrue, e) + case *map[int]float32: + fastpathTV.EncMapIntFloat32V(*v, fastpathCheckNilTrue, e) + + case map[int]float64: + fastpathTV.EncMapIntFloat64V(v, fastpathCheckNilTrue, e) + case *map[int]float64: + fastpathTV.EncMapIntFloat64V(*v, fastpathCheckNilTrue, e) + + case map[int]bool: + fastpathTV.EncMapIntBoolV(v, fastpathCheckNilTrue, e) + case *map[int]bool: + fastpathTV.EncMapIntBoolV(*v, fastpathCheckNilTrue, e) + + case []int8: + fastpathTV.EncSliceInt8V(v, fastpathCheckNilTrue, e) + case *[]int8: + fastpathTV.EncSliceInt8V(*v, fastpathCheckNilTrue, e) + + case map[int8]interface{}: + fastpathTV.EncMapInt8IntfV(v, fastpathCheckNilTrue, e) + case *map[int8]interface{}: + fastpathTV.EncMapInt8IntfV(*v, fastpathCheckNilTrue, e) + + case map[int8]string: + fastpathTV.EncMapInt8StringV(v, fastpathCheckNilTrue, e) + case *map[int8]string: + fastpathTV.EncMapInt8StringV(*v, fastpathCheckNilTrue, e) + + case map[int8]uint: + fastpathTV.EncMapInt8UintV(v, fastpathCheckNilTrue, e) + case *map[int8]uint: + fastpathTV.EncMapInt8UintV(*v, fastpathCheckNilTrue, e) + + case map[int8]uint8: + fastpathTV.EncMapInt8Uint8V(v, fastpathCheckNilTrue, e) + case *map[int8]uint8: + fastpathTV.EncMapInt8Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint16: + fastpathTV.EncMapInt8Uint16V(v, fastpathCheckNilTrue, e) + case *map[int8]uint16: + fastpathTV.EncMapInt8Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint32: + fastpathTV.EncMapInt8Uint32V(v, fastpathCheckNilTrue, e) + case *map[int8]uint32: + fastpathTV.EncMapInt8Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint64: + fastpathTV.EncMapInt8Uint64V(v, fastpathCheckNilTrue, e) + case *map[int8]uint64: + fastpathTV.EncMapInt8Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int8]uintptr: + fastpathTV.EncMapInt8UintptrV(v, fastpathCheckNilTrue, e) + case *map[int8]uintptr: + fastpathTV.EncMapInt8UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int8]int: + fastpathTV.EncMapInt8IntV(v, fastpathCheckNilTrue, e) + case *map[int8]int: + fastpathTV.EncMapInt8IntV(*v, fastpathCheckNilTrue, e) + + case map[int8]int8: + fastpathTV.EncMapInt8Int8V(v, fastpathCheckNilTrue, e) + case *map[int8]int8: + fastpathTV.EncMapInt8Int8V(*v, fastpathCheckNilTrue, e) + + case map[int8]int16: + fastpathTV.EncMapInt8Int16V(v, fastpathCheckNilTrue, e) + case *map[int8]int16: + fastpathTV.EncMapInt8Int16V(*v, fastpathCheckNilTrue, e) + + case map[int8]int32: + fastpathTV.EncMapInt8Int32V(v, fastpathCheckNilTrue, e) + case *map[int8]int32: + fastpathTV.EncMapInt8Int32V(*v, fastpathCheckNilTrue, e) + + case map[int8]int64: + fastpathTV.EncMapInt8Int64V(v, fastpathCheckNilTrue, e) + case *map[int8]int64: + fastpathTV.EncMapInt8Int64V(*v, fastpathCheckNilTrue, e) + + case map[int8]float32: + fastpathTV.EncMapInt8Float32V(v, fastpathCheckNilTrue, e) + case *map[int8]float32: + fastpathTV.EncMapInt8Float32V(*v, fastpathCheckNilTrue, e) + + case map[int8]float64: + fastpathTV.EncMapInt8Float64V(v, fastpathCheckNilTrue, e) + case *map[int8]float64: + fastpathTV.EncMapInt8Float64V(*v, fastpathCheckNilTrue, e) + + case map[int8]bool: + fastpathTV.EncMapInt8BoolV(v, fastpathCheckNilTrue, e) + case *map[int8]bool: + fastpathTV.EncMapInt8BoolV(*v, fastpathCheckNilTrue, e) + + case []int16: + fastpathTV.EncSliceInt16V(v, fastpathCheckNilTrue, e) + case *[]int16: + fastpathTV.EncSliceInt16V(*v, fastpathCheckNilTrue, e) + + case map[int16]interface{}: + fastpathTV.EncMapInt16IntfV(v, fastpathCheckNilTrue, e) + case *map[int16]interface{}: + fastpathTV.EncMapInt16IntfV(*v, fastpathCheckNilTrue, e) + + case map[int16]string: + fastpathTV.EncMapInt16StringV(v, fastpathCheckNilTrue, e) + case *map[int16]string: + fastpathTV.EncMapInt16StringV(*v, fastpathCheckNilTrue, e) + + case map[int16]uint: + fastpathTV.EncMapInt16UintV(v, fastpathCheckNilTrue, e) + case *map[int16]uint: + fastpathTV.EncMapInt16UintV(*v, fastpathCheckNilTrue, e) + + case map[int16]uint8: + fastpathTV.EncMapInt16Uint8V(v, fastpathCheckNilTrue, e) + case *map[int16]uint8: + fastpathTV.EncMapInt16Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint16: + fastpathTV.EncMapInt16Uint16V(v, fastpathCheckNilTrue, e) + case *map[int16]uint16: + fastpathTV.EncMapInt16Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint32: + fastpathTV.EncMapInt16Uint32V(v, fastpathCheckNilTrue, e) + case *map[int16]uint32: + fastpathTV.EncMapInt16Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint64: + fastpathTV.EncMapInt16Uint64V(v, fastpathCheckNilTrue, e) + case *map[int16]uint64: + fastpathTV.EncMapInt16Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int16]uintptr: + fastpathTV.EncMapInt16UintptrV(v, fastpathCheckNilTrue, e) + case *map[int16]uintptr: + fastpathTV.EncMapInt16UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int16]int: + fastpathTV.EncMapInt16IntV(v, fastpathCheckNilTrue, e) + case *map[int16]int: + fastpathTV.EncMapInt16IntV(*v, fastpathCheckNilTrue, e) + + case map[int16]int8: + fastpathTV.EncMapInt16Int8V(v, fastpathCheckNilTrue, e) + case *map[int16]int8: + fastpathTV.EncMapInt16Int8V(*v, fastpathCheckNilTrue, e) + + case map[int16]int16: + fastpathTV.EncMapInt16Int16V(v, fastpathCheckNilTrue, e) + case *map[int16]int16: + fastpathTV.EncMapInt16Int16V(*v, fastpathCheckNilTrue, e) + + case map[int16]int32: + fastpathTV.EncMapInt16Int32V(v, fastpathCheckNilTrue, e) + case *map[int16]int32: + fastpathTV.EncMapInt16Int32V(*v, fastpathCheckNilTrue, e) + + case map[int16]int64: + fastpathTV.EncMapInt16Int64V(v, fastpathCheckNilTrue, e) + case *map[int16]int64: + fastpathTV.EncMapInt16Int64V(*v, fastpathCheckNilTrue, e) + + case map[int16]float32: + fastpathTV.EncMapInt16Float32V(v, fastpathCheckNilTrue, e) + case *map[int16]float32: + fastpathTV.EncMapInt16Float32V(*v, fastpathCheckNilTrue, e) + + case map[int16]float64: + fastpathTV.EncMapInt16Float64V(v, fastpathCheckNilTrue, e) + case *map[int16]float64: + fastpathTV.EncMapInt16Float64V(*v, fastpathCheckNilTrue, e) + + case map[int16]bool: + fastpathTV.EncMapInt16BoolV(v, fastpathCheckNilTrue, e) + case *map[int16]bool: + fastpathTV.EncMapInt16BoolV(*v, fastpathCheckNilTrue, e) + + case []int32: + fastpathTV.EncSliceInt32V(v, fastpathCheckNilTrue, e) + case *[]int32: + fastpathTV.EncSliceInt32V(*v, fastpathCheckNilTrue, e) + + case map[int32]interface{}: + fastpathTV.EncMapInt32IntfV(v, fastpathCheckNilTrue, e) + case *map[int32]interface{}: + fastpathTV.EncMapInt32IntfV(*v, fastpathCheckNilTrue, e) + + case map[int32]string: + fastpathTV.EncMapInt32StringV(v, fastpathCheckNilTrue, e) + case *map[int32]string: + fastpathTV.EncMapInt32StringV(*v, fastpathCheckNilTrue, e) + + case map[int32]uint: + fastpathTV.EncMapInt32UintV(v, fastpathCheckNilTrue, e) + case *map[int32]uint: + fastpathTV.EncMapInt32UintV(*v, fastpathCheckNilTrue, e) + + case map[int32]uint8: + fastpathTV.EncMapInt32Uint8V(v, fastpathCheckNilTrue, e) + case *map[int32]uint8: + fastpathTV.EncMapInt32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint16: + fastpathTV.EncMapInt32Uint16V(v, fastpathCheckNilTrue, e) + case *map[int32]uint16: + fastpathTV.EncMapInt32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint32: + fastpathTV.EncMapInt32Uint32V(v, fastpathCheckNilTrue, e) + case *map[int32]uint32: + fastpathTV.EncMapInt32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint64: + fastpathTV.EncMapInt32Uint64V(v, fastpathCheckNilTrue, e) + case *map[int32]uint64: + fastpathTV.EncMapInt32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int32]uintptr: + fastpathTV.EncMapInt32UintptrV(v, fastpathCheckNilTrue, e) + case *map[int32]uintptr: + fastpathTV.EncMapInt32UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int32]int: + fastpathTV.EncMapInt32IntV(v, fastpathCheckNilTrue, e) + case *map[int32]int: + fastpathTV.EncMapInt32IntV(*v, fastpathCheckNilTrue, e) + + case map[int32]int8: + fastpathTV.EncMapInt32Int8V(v, fastpathCheckNilTrue, e) + case *map[int32]int8: + fastpathTV.EncMapInt32Int8V(*v, fastpathCheckNilTrue, e) + + case map[int32]int16: + fastpathTV.EncMapInt32Int16V(v, fastpathCheckNilTrue, e) + case *map[int32]int16: + fastpathTV.EncMapInt32Int16V(*v, fastpathCheckNilTrue, e) + + case map[int32]int32: + fastpathTV.EncMapInt32Int32V(v, fastpathCheckNilTrue, e) + case *map[int32]int32: + fastpathTV.EncMapInt32Int32V(*v, fastpathCheckNilTrue, e) + + case map[int32]int64: + fastpathTV.EncMapInt32Int64V(v, fastpathCheckNilTrue, e) + case *map[int32]int64: + fastpathTV.EncMapInt32Int64V(*v, fastpathCheckNilTrue, e) + + case map[int32]float32: + fastpathTV.EncMapInt32Float32V(v, fastpathCheckNilTrue, e) + case *map[int32]float32: + fastpathTV.EncMapInt32Float32V(*v, fastpathCheckNilTrue, e) + + case map[int32]float64: + fastpathTV.EncMapInt32Float64V(v, fastpathCheckNilTrue, e) + case *map[int32]float64: + fastpathTV.EncMapInt32Float64V(*v, fastpathCheckNilTrue, e) + + case map[int32]bool: + fastpathTV.EncMapInt32BoolV(v, fastpathCheckNilTrue, e) + case *map[int32]bool: + fastpathTV.EncMapInt32BoolV(*v, fastpathCheckNilTrue, e) + + case []int64: + fastpathTV.EncSliceInt64V(v, fastpathCheckNilTrue, e) + case *[]int64: + fastpathTV.EncSliceInt64V(*v, fastpathCheckNilTrue, e) + + case map[int64]interface{}: + fastpathTV.EncMapInt64IntfV(v, fastpathCheckNilTrue, e) + case *map[int64]interface{}: + fastpathTV.EncMapInt64IntfV(*v, fastpathCheckNilTrue, e) + + case map[int64]string: + fastpathTV.EncMapInt64StringV(v, fastpathCheckNilTrue, e) + case *map[int64]string: + fastpathTV.EncMapInt64StringV(*v, fastpathCheckNilTrue, e) + + case map[int64]uint: + fastpathTV.EncMapInt64UintV(v, fastpathCheckNilTrue, e) + case *map[int64]uint: + fastpathTV.EncMapInt64UintV(*v, fastpathCheckNilTrue, e) + + case map[int64]uint8: + fastpathTV.EncMapInt64Uint8V(v, fastpathCheckNilTrue, e) + case *map[int64]uint8: + fastpathTV.EncMapInt64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint16: + fastpathTV.EncMapInt64Uint16V(v, fastpathCheckNilTrue, e) + case *map[int64]uint16: + fastpathTV.EncMapInt64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint32: + fastpathTV.EncMapInt64Uint32V(v, fastpathCheckNilTrue, e) + case *map[int64]uint32: + fastpathTV.EncMapInt64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint64: + fastpathTV.EncMapInt64Uint64V(v, fastpathCheckNilTrue, e) + case *map[int64]uint64: + fastpathTV.EncMapInt64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int64]uintptr: + fastpathTV.EncMapInt64UintptrV(v, fastpathCheckNilTrue, e) + case *map[int64]uintptr: + fastpathTV.EncMapInt64UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int64]int: + fastpathTV.EncMapInt64IntV(v, fastpathCheckNilTrue, e) + case *map[int64]int: + fastpathTV.EncMapInt64IntV(*v, fastpathCheckNilTrue, e) + + case map[int64]int8: + fastpathTV.EncMapInt64Int8V(v, fastpathCheckNilTrue, e) + case *map[int64]int8: + fastpathTV.EncMapInt64Int8V(*v, fastpathCheckNilTrue, e) + + case map[int64]int16: + fastpathTV.EncMapInt64Int16V(v, fastpathCheckNilTrue, e) + case *map[int64]int16: + fastpathTV.EncMapInt64Int16V(*v, fastpathCheckNilTrue, e) + + case map[int64]int32: + fastpathTV.EncMapInt64Int32V(v, fastpathCheckNilTrue, e) + case *map[int64]int32: + fastpathTV.EncMapInt64Int32V(*v, fastpathCheckNilTrue, e) + + case map[int64]int64: + fastpathTV.EncMapInt64Int64V(v, fastpathCheckNilTrue, e) + case *map[int64]int64: + fastpathTV.EncMapInt64Int64V(*v, fastpathCheckNilTrue, e) + + case map[int64]float32: + fastpathTV.EncMapInt64Float32V(v, fastpathCheckNilTrue, e) + case *map[int64]float32: + fastpathTV.EncMapInt64Float32V(*v, fastpathCheckNilTrue, e) + + case map[int64]float64: + fastpathTV.EncMapInt64Float64V(v, fastpathCheckNilTrue, e) + case *map[int64]float64: + fastpathTV.EncMapInt64Float64V(*v, fastpathCheckNilTrue, e) + + case map[int64]bool: + fastpathTV.EncMapInt64BoolV(v, fastpathCheckNilTrue, e) + case *map[int64]bool: + fastpathTV.EncMapInt64BoolV(*v, fastpathCheckNilTrue, e) + + case []bool: + fastpathTV.EncSliceBoolV(v, fastpathCheckNilTrue, e) + case *[]bool: + fastpathTV.EncSliceBoolV(*v, fastpathCheckNilTrue, e) + + case map[bool]interface{}: + fastpathTV.EncMapBoolIntfV(v, fastpathCheckNilTrue, e) + case *map[bool]interface{}: + fastpathTV.EncMapBoolIntfV(*v, fastpathCheckNilTrue, e) + + case map[bool]string: + fastpathTV.EncMapBoolStringV(v, fastpathCheckNilTrue, e) + case *map[bool]string: + fastpathTV.EncMapBoolStringV(*v, fastpathCheckNilTrue, e) + + case map[bool]uint: + fastpathTV.EncMapBoolUintV(v, fastpathCheckNilTrue, e) + case *map[bool]uint: + fastpathTV.EncMapBoolUintV(*v, fastpathCheckNilTrue, e) + + case map[bool]uint8: + fastpathTV.EncMapBoolUint8V(v, fastpathCheckNilTrue, e) + case *map[bool]uint8: + fastpathTV.EncMapBoolUint8V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint16: + fastpathTV.EncMapBoolUint16V(v, fastpathCheckNilTrue, e) + case *map[bool]uint16: + fastpathTV.EncMapBoolUint16V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint32: + fastpathTV.EncMapBoolUint32V(v, fastpathCheckNilTrue, e) + case *map[bool]uint32: + fastpathTV.EncMapBoolUint32V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint64: + fastpathTV.EncMapBoolUint64V(v, fastpathCheckNilTrue, e) + case *map[bool]uint64: + fastpathTV.EncMapBoolUint64V(*v, fastpathCheckNilTrue, e) + + case map[bool]uintptr: + fastpathTV.EncMapBoolUintptrV(v, fastpathCheckNilTrue, e) + case *map[bool]uintptr: + fastpathTV.EncMapBoolUintptrV(*v, fastpathCheckNilTrue, e) + + case map[bool]int: + fastpathTV.EncMapBoolIntV(v, fastpathCheckNilTrue, e) + case *map[bool]int: + fastpathTV.EncMapBoolIntV(*v, fastpathCheckNilTrue, e) + + case map[bool]int8: + fastpathTV.EncMapBoolInt8V(v, fastpathCheckNilTrue, e) + case *map[bool]int8: + fastpathTV.EncMapBoolInt8V(*v, fastpathCheckNilTrue, e) + + case map[bool]int16: + fastpathTV.EncMapBoolInt16V(v, fastpathCheckNilTrue, e) + case *map[bool]int16: + fastpathTV.EncMapBoolInt16V(*v, fastpathCheckNilTrue, e) + + case map[bool]int32: + fastpathTV.EncMapBoolInt32V(v, fastpathCheckNilTrue, e) + case *map[bool]int32: + fastpathTV.EncMapBoolInt32V(*v, fastpathCheckNilTrue, e) + + case map[bool]int64: + fastpathTV.EncMapBoolInt64V(v, fastpathCheckNilTrue, e) + case *map[bool]int64: + fastpathTV.EncMapBoolInt64V(*v, fastpathCheckNilTrue, e) + + case map[bool]float32: + fastpathTV.EncMapBoolFloat32V(v, fastpathCheckNilTrue, e) + case *map[bool]float32: + fastpathTV.EncMapBoolFloat32V(*v, fastpathCheckNilTrue, e) + + case map[bool]float64: + fastpathTV.EncMapBoolFloat64V(v, fastpathCheckNilTrue, e) + case *map[bool]float64: + fastpathTV.EncMapBoolFloat64V(*v, fastpathCheckNilTrue, e) + + case map[bool]bool: + fastpathTV.EncMapBoolBoolV(v, fastpathCheckNilTrue, e) + case *map[bool]bool: + fastpathTV.EncMapBoolBoolV(*v, fastpathCheckNilTrue, e) + + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { + + case []interface{}: + fastpathTV.EncSliceIntfV(v, fastpathCheckNilTrue, e) + case *[]interface{}: + fastpathTV.EncSliceIntfV(*v, fastpathCheckNilTrue, e) + + case []string: + fastpathTV.EncSliceStringV(v, fastpathCheckNilTrue, e) + case *[]string: + fastpathTV.EncSliceStringV(*v, fastpathCheckNilTrue, e) + + case []float32: + fastpathTV.EncSliceFloat32V(v, fastpathCheckNilTrue, e) + case *[]float32: + fastpathTV.EncSliceFloat32V(*v, fastpathCheckNilTrue, e) + + case []float64: + fastpathTV.EncSliceFloat64V(v, fastpathCheckNilTrue, e) + case *[]float64: + fastpathTV.EncSliceFloat64V(*v, fastpathCheckNilTrue, e) + + case []uint: + fastpathTV.EncSliceUintV(v, fastpathCheckNilTrue, e) + case *[]uint: + fastpathTV.EncSliceUintV(*v, fastpathCheckNilTrue, e) + + case []uint16: + fastpathTV.EncSliceUint16V(v, fastpathCheckNilTrue, e) + case *[]uint16: + fastpathTV.EncSliceUint16V(*v, fastpathCheckNilTrue, e) + + case []uint32: + fastpathTV.EncSliceUint32V(v, fastpathCheckNilTrue, e) + case *[]uint32: + fastpathTV.EncSliceUint32V(*v, fastpathCheckNilTrue, e) + + case []uint64: + fastpathTV.EncSliceUint64V(v, fastpathCheckNilTrue, e) + case *[]uint64: + fastpathTV.EncSliceUint64V(*v, fastpathCheckNilTrue, e) + + case []uintptr: + fastpathTV.EncSliceUintptrV(v, fastpathCheckNilTrue, e) + case *[]uintptr: + fastpathTV.EncSliceUintptrV(*v, fastpathCheckNilTrue, e) + + case []int: + fastpathTV.EncSliceIntV(v, fastpathCheckNilTrue, e) + case *[]int: + fastpathTV.EncSliceIntV(*v, fastpathCheckNilTrue, e) + + case []int8: + fastpathTV.EncSliceInt8V(v, fastpathCheckNilTrue, e) + case *[]int8: + fastpathTV.EncSliceInt8V(*v, fastpathCheckNilTrue, e) + + case []int16: + fastpathTV.EncSliceInt16V(v, fastpathCheckNilTrue, e) + case *[]int16: + fastpathTV.EncSliceInt16V(*v, fastpathCheckNilTrue, e) + + case []int32: + fastpathTV.EncSliceInt32V(v, fastpathCheckNilTrue, e) + case *[]int32: + fastpathTV.EncSliceInt32V(*v, fastpathCheckNilTrue, e) + + case []int64: + fastpathTV.EncSliceInt64V(v, fastpathCheckNilTrue, e) + case *[]int64: + fastpathTV.EncSliceInt64V(*v, fastpathCheckNilTrue, e) + + case []bool: + fastpathTV.EncSliceBoolV(v, fastpathCheckNilTrue, e) + case *[]bool: + fastpathTV.EncSliceBoolV(*v, fastpathCheckNilTrue, e) + + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { + + case map[interface{}]interface{}: + fastpathTV.EncMapIntfIntfV(v, fastpathCheckNilTrue, e) + case *map[interface{}]interface{}: + fastpathTV.EncMapIntfIntfV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]string: + fastpathTV.EncMapIntfStringV(v, fastpathCheckNilTrue, e) + case *map[interface{}]string: + fastpathTV.EncMapIntfStringV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint: + fastpathTV.EncMapIntfUintV(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint: + fastpathTV.EncMapIntfUintV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint8: + fastpathTV.EncMapIntfUint8V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint8: + fastpathTV.EncMapIntfUint8V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint16: + fastpathTV.EncMapIntfUint16V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint16: + fastpathTV.EncMapIntfUint16V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint32: + fastpathTV.EncMapIntfUint32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint32: + fastpathTV.EncMapIntfUint32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uint64: + fastpathTV.EncMapIntfUint64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]uint64: + fastpathTV.EncMapIntfUint64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]uintptr: + fastpathTV.EncMapIntfUintptrV(v, fastpathCheckNilTrue, e) + case *map[interface{}]uintptr: + fastpathTV.EncMapIntfUintptrV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int: + fastpathTV.EncMapIntfIntV(v, fastpathCheckNilTrue, e) + case *map[interface{}]int: + fastpathTV.EncMapIntfIntV(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int8: + fastpathTV.EncMapIntfInt8V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int8: + fastpathTV.EncMapIntfInt8V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int16: + fastpathTV.EncMapIntfInt16V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int16: + fastpathTV.EncMapIntfInt16V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int32: + fastpathTV.EncMapIntfInt32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int32: + fastpathTV.EncMapIntfInt32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]int64: + fastpathTV.EncMapIntfInt64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]int64: + fastpathTV.EncMapIntfInt64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]float32: + fastpathTV.EncMapIntfFloat32V(v, fastpathCheckNilTrue, e) + case *map[interface{}]float32: + fastpathTV.EncMapIntfFloat32V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]float64: + fastpathTV.EncMapIntfFloat64V(v, fastpathCheckNilTrue, e) + case *map[interface{}]float64: + fastpathTV.EncMapIntfFloat64V(*v, fastpathCheckNilTrue, e) + + case map[interface{}]bool: + fastpathTV.EncMapIntfBoolV(v, fastpathCheckNilTrue, e) + case *map[interface{}]bool: + fastpathTV.EncMapIntfBoolV(*v, fastpathCheckNilTrue, e) + + case map[string]interface{}: + fastpathTV.EncMapStringIntfV(v, fastpathCheckNilTrue, e) + case *map[string]interface{}: + fastpathTV.EncMapStringIntfV(*v, fastpathCheckNilTrue, e) + + case map[string]string: + fastpathTV.EncMapStringStringV(v, fastpathCheckNilTrue, e) + case *map[string]string: + fastpathTV.EncMapStringStringV(*v, fastpathCheckNilTrue, e) + + case map[string]uint: + fastpathTV.EncMapStringUintV(v, fastpathCheckNilTrue, e) + case *map[string]uint: + fastpathTV.EncMapStringUintV(*v, fastpathCheckNilTrue, e) + + case map[string]uint8: + fastpathTV.EncMapStringUint8V(v, fastpathCheckNilTrue, e) + case *map[string]uint8: + fastpathTV.EncMapStringUint8V(*v, fastpathCheckNilTrue, e) + + case map[string]uint16: + fastpathTV.EncMapStringUint16V(v, fastpathCheckNilTrue, e) + case *map[string]uint16: + fastpathTV.EncMapStringUint16V(*v, fastpathCheckNilTrue, e) + + case map[string]uint32: + fastpathTV.EncMapStringUint32V(v, fastpathCheckNilTrue, e) + case *map[string]uint32: + fastpathTV.EncMapStringUint32V(*v, fastpathCheckNilTrue, e) + + case map[string]uint64: + fastpathTV.EncMapStringUint64V(v, fastpathCheckNilTrue, e) + case *map[string]uint64: + fastpathTV.EncMapStringUint64V(*v, fastpathCheckNilTrue, e) + + case map[string]uintptr: + fastpathTV.EncMapStringUintptrV(v, fastpathCheckNilTrue, e) + case *map[string]uintptr: + fastpathTV.EncMapStringUintptrV(*v, fastpathCheckNilTrue, e) + + case map[string]int: + fastpathTV.EncMapStringIntV(v, fastpathCheckNilTrue, e) + case *map[string]int: + fastpathTV.EncMapStringIntV(*v, fastpathCheckNilTrue, e) + + case map[string]int8: + fastpathTV.EncMapStringInt8V(v, fastpathCheckNilTrue, e) + case *map[string]int8: + fastpathTV.EncMapStringInt8V(*v, fastpathCheckNilTrue, e) + + case map[string]int16: + fastpathTV.EncMapStringInt16V(v, fastpathCheckNilTrue, e) + case *map[string]int16: + fastpathTV.EncMapStringInt16V(*v, fastpathCheckNilTrue, e) + + case map[string]int32: + fastpathTV.EncMapStringInt32V(v, fastpathCheckNilTrue, e) + case *map[string]int32: + fastpathTV.EncMapStringInt32V(*v, fastpathCheckNilTrue, e) + + case map[string]int64: + fastpathTV.EncMapStringInt64V(v, fastpathCheckNilTrue, e) + case *map[string]int64: + fastpathTV.EncMapStringInt64V(*v, fastpathCheckNilTrue, e) + + case map[string]float32: + fastpathTV.EncMapStringFloat32V(v, fastpathCheckNilTrue, e) + case *map[string]float32: + fastpathTV.EncMapStringFloat32V(*v, fastpathCheckNilTrue, e) + + case map[string]float64: + fastpathTV.EncMapStringFloat64V(v, fastpathCheckNilTrue, e) + case *map[string]float64: + fastpathTV.EncMapStringFloat64V(*v, fastpathCheckNilTrue, e) + + case map[string]bool: + fastpathTV.EncMapStringBoolV(v, fastpathCheckNilTrue, e) + case *map[string]bool: + fastpathTV.EncMapStringBoolV(*v, fastpathCheckNilTrue, e) + + case map[float32]interface{}: + fastpathTV.EncMapFloat32IntfV(v, fastpathCheckNilTrue, e) + case *map[float32]interface{}: + fastpathTV.EncMapFloat32IntfV(*v, fastpathCheckNilTrue, e) + + case map[float32]string: + fastpathTV.EncMapFloat32StringV(v, fastpathCheckNilTrue, e) + case *map[float32]string: + fastpathTV.EncMapFloat32StringV(*v, fastpathCheckNilTrue, e) + + case map[float32]uint: + fastpathTV.EncMapFloat32UintV(v, fastpathCheckNilTrue, e) + case *map[float32]uint: + fastpathTV.EncMapFloat32UintV(*v, fastpathCheckNilTrue, e) + + case map[float32]uint8: + fastpathTV.EncMapFloat32Uint8V(v, fastpathCheckNilTrue, e) + case *map[float32]uint8: + fastpathTV.EncMapFloat32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint16: + fastpathTV.EncMapFloat32Uint16V(v, fastpathCheckNilTrue, e) + case *map[float32]uint16: + fastpathTV.EncMapFloat32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint32: + fastpathTV.EncMapFloat32Uint32V(v, fastpathCheckNilTrue, e) + case *map[float32]uint32: + fastpathTV.EncMapFloat32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[float32]uint64: + fastpathTV.EncMapFloat32Uint64V(v, fastpathCheckNilTrue, e) + case *map[float32]uint64: + fastpathTV.EncMapFloat32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[float32]uintptr: + fastpathTV.EncMapFloat32UintptrV(v, fastpathCheckNilTrue, e) + case *map[float32]uintptr: + fastpathTV.EncMapFloat32UintptrV(*v, fastpathCheckNilTrue, e) + + case map[float32]int: + fastpathTV.EncMapFloat32IntV(v, fastpathCheckNilTrue, e) + case *map[float32]int: + fastpathTV.EncMapFloat32IntV(*v, fastpathCheckNilTrue, e) + + case map[float32]int8: + fastpathTV.EncMapFloat32Int8V(v, fastpathCheckNilTrue, e) + case *map[float32]int8: + fastpathTV.EncMapFloat32Int8V(*v, fastpathCheckNilTrue, e) + + case map[float32]int16: + fastpathTV.EncMapFloat32Int16V(v, fastpathCheckNilTrue, e) + case *map[float32]int16: + fastpathTV.EncMapFloat32Int16V(*v, fastpathCheckNilTrue, e) + + case map[float32]int32: + fastpathTV.EncMapFloat32Int32V(v, fastpathCheckNilTrue, e) + case *map[float32]int32: + fastpathTV.EncMapFloat32Int32V(*v, fastpathCheckNilTrue, e) + + case map[float32]int64: + fastpathTV.EncMapFloat32Int64V(v, fastpathCheckNilTrue, e) + case *map[float32]int64: + fastpathTV.EncMapFloat32Int64V(*v, fastpathCheckNilTrue, e) + + case map[float32]float32: + fastpathTV.EncMapFloat32Float32V(v, fastpathCheckNilTrue, e) + case *map[float32]float32: + fastpathTV.EncMapFloat32Float32V(*v, fastpathCheckNilTrue, e) + + case map[float32]float64: + fastpathTV.EncMapFloat32Float64V(v, fastpathCheckNilTrue, e) + case *map[float32]float64: + fastpathTV.EncMapFloat32Float64V(*v, fastpathCheckNilTrue, e) + + case map[float32]bool: + fastpathTV.EncMapFloat32BoolV(v, fastpathCheckNilTrue, e) + case *map[float32]bool: + fastpathTV.EncMapFloat32BoolV(*v, fastpathCheckNilTrue, e) + + case map[float64]interface{}: + fastpathTV.EncMapFloat64IntfV(v, fastpathCheckNilTrue, e) + case *map[float64]interface{}: + fastpathTV.EncMapFloat64IntfV(*v, fastpathCheckNilTrue, e) + + case map[float64]string: + fastpathTV.EncMapFloat64StringV(v, fastpathCheckNilTrue, e) + case *map[float64]string: + fastpathTV.EncMapFloat64StringV(*v, fastpathCheckNilTrue, e) + + case map[float64]uint: + fastpathTV.EncMapFloat64UintV(v, fastpathCheckNilTrue, e) + case *map[float64]uint: + fastpathTV.EncMapFloat64UintV(*v, fastpathCheckNilTrue, e) + + case map[float64]uint8: + fastpathTV.EncMapFloat64Uint8V(v, fastpathCheckNilTrue, e) + case *map[float64]uint8: + fastpathTV.EncMapFloat64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint16: + fastpathTV.EncMapFloat64Uint16V(v, fastpathCheckNilTrue, e) + case *map[float64]uint16: + fastpathTV.EncMapFloat64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint32: + fastpathTV.EncMapFloat64Uint32V(v, fastpathCheckNilTrue, e) + case *map[float64]uint32: + fastpathTV.EncMapFloat64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[float64]uint64: + fastpathTV.EncMapFloat64Uint64V(v, fastpathCheckNilTrue, e) + case *map[float64]uint64: + fastpathTV.EncMapFloat64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[float64]uintptr: + fastpathTV.EncMapFloat64UintptrV(v, fastpathCheckNilTrue, e) + case *map[float64]uintptr: + fastpathTV.EncMapFloat64UintptrV(*v, fastpathCheckNilTrue, e) + + case map[float64]int: + fastpathTV.EncMapFloat64IntV(v, fastpathCheckNilTrue, e) + case *map[float64]int: + fastpathTV.EncMapFloat64IntV(*v, fastpathCheckNilTrue, e) + + case map[float64]int8: + fastpathTV.EncMapFloat64Int8V(v, fastpathCheckNilTrue, e) + case *map[float64]int8: + fastpathTV.EncMapFloat64Int8V(*v, fastpathCheckNilTrue, e) + + case map[float64]int16: + fastpathTV.EncMapFloat64Int16V(v, fastpathCheckNilTrue, e) + case *map[float64]int16: + fastpathTV.EncMapFloat64Int16V(*v, fastpathCheckNilTrue, e) + + case map[float64]int32: + fastpathTV.EncMapFloat64Int32V(v, fastpathCheckNilTrue, e) + case *map[float64]int32: + fastpathTV.EncMapFloat64Int32V(*v, fastpathCheckNilTrue, e) + + case map[float64]int64: + fastpathTV.EncMapFloat64Int64V(v, fastpathCheckNilTrue, e) + case *map[float64]int64: + fastpathTV.EncMapFloat64Int64V(*v, fastpathCheckNilTrue, e) + + case map[float64]float32: + fastpathTV.EncMapFloat64Float32V(v, fastpathCheckNilTrue, e) + case *map[float64]float32: + fastpathTV.EncMapFloat64Float32V(*v, fastpathCheckNilTrue, e) + + case map[float64]float64: + fastpathTV.EncMapFloat64Float64V(v, fastpathCheckNilTrue, e) + case *map[float64]float64: + fastpathTV.EncMapFloat64Float64V(*v, fastpathCheckNilTrue, e) + + case map[float64]bool: + fastpathTV.EncMapFloat64BoolV(v, fastpathCheckNilTrue, e) + case *map[float64]bool: + fastpathTV.EncMapFloat64BoolV(*v, fastpathCheckNilTrue, e) + + case map[uint]interface{}: + fastpathTV.EncMapUintIntfV(v, fastpathCheckNilTrue, e) + case *map[uint]interface{}: + fastpathTV.EncMapUintIntfV(*v, fastpathCheckNilTrue, e) + + case map[uint]string: + fastpathTV.EncMapUintStringV(v, fastpathCheckNilTrue, e) + case *map[uint]string: + fastpathTV.EncMapUintStringV(*v, fastpathCheckNilTrue, e) + + case map[uint]uint: + fastpathTV.EncMapUintUintV(v, fastpathCheckNilTrue, e) + case *map[uint]uint: + fastpathTV.EncMapUintUintV(*v, fastpathCheckNilTrue, e) + + case map[uint]uint8: + fastpathTV.EncMapUintUint8V(v, fastpathCheckNilTrue, e) + case *map[uint]uint8: + fastpathTV.EncMapUintUint8V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint16: + fastpathTV.EncMapUintUint16V(v, fastpathCheckNilTrue, e) + case *map[uint]uint16: + fastpathTV.EncMapUintUint16V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint32: + fastpathTV.EncMapUintUint32V(v, fastpathCheckNilTrue, e) + case *map[uint]uint32: + fastpathTV.EncMapUintUint32V(*v, fastpathCheckNilTrue, e) + + case map[uint]uint64: + fastpathTV.EncMapUintUint64V(v, fastpathCheckNilTrue, e) + case *map[uint]uint64: + fastpathTV.EncMapUintUint64V(*v, fastpathCheckNilTrue, e) + + case map[uint]uintptr: + fastpathTV.EncMapUintUintptrV(v, fastpathCheckNilTrue, e) + case *map[uint]uintptr: + fastpathTV.EncMapUintUintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint]int: + fastpathTV.EncMapUintIntV(v, fastpathCheckNilTrue, e) + case *map[uint]int: + fastpathTV.EncMapUintIntV(*v, fastpathCheckNilTrue, e) + + case map[uint]int8: + fastpathTV.EncMapUintInt8V(v, fastpathCheckNilTrue, e) + case *map[uint]int8: + fastpathTV.EncMapUintInt8V(*v, fastpathCheckNilTrue, e) + + case map[uint]int16: + fastpathTV.EncMapUintInt16V(v, fastpathCheckNilTrue, e) + case *map[uint]int16: + fastpathTV.EncMapUintInt16V(*v, fastpathCheckNilTrue, e) + + case map[uint]int32: + fastpathTV.EncMapUintInt32V(v, fastpathCheckNilTrue, e) + case *map[uint]int32: + fastpathTV.EncMapUintInt32V(*v, fastpathCheckNilTrue, e) + + case map[uint]int64: + fastpathTV.EncMapUintInt64V(v, fastpathCheckNilTrue, e) + case *map[uint]int64: + fastpathTV.EncMapUintInt64V(*v, fastpathCheckNilTrue, e) + + case map[uint]float32: + fastpathTV.EncMapUintFloat32V(v, fastpathCheckNilTrue, e) + case *map[uint]float32: + fastpathTV.EncMapUintFloat32V(*v, fastpathCheckNilTrue, e) + + case map[uint]float64: + fastpathTV.EncMapUintFloat64V(v, fastpathCheckNilTrue, e) + case *map[uint]float64: + fastpathTV.EncMapUintFloat64V(*v, fastpathCheckNilTrue, e) + + case map[uint]bool: + fastpathTV.EncMapUintBoolV(v, fastpathCheckNilTrue, e) + case *map[uint]bool: + fastpathTV.EncMapUintBoolV(*v, fastpathCheckNilTrue, e) + + case map[uint8]interface{}: + fastpathTV.EncMapUint8IntfV(v, fastpathCheckNilTrue, e) + case *map[uint8]interface{}: + fastpathTV.EncMapUint8IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint8]string: + fastpathTV.EncMapUint8StringV(v, fastpathCheckNilTrue, e) + case *map[uint8]string: + fastpathTV.EncMapUint8StringV(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint: + fastpathTV.EncMapUint8UintV(v, fastpathCheckNilTrue, e) + case *map[uint8]uint: + fastpathTV.EncMapUint8UintV(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint8: + fastpathTV.EncMapUint8Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint8: + fastpathTV.EncMapUint8Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint16: + fastpathTV.EncMapUint8Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint16: + fastpathTV.EncMapUint8Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint32: + fastpathTV.EncMapUint8Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint32: + fastpathTV.EncMapUint8Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uint64: + fastpathTV.EncMapUint8Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint8]uint64: + fastpathTV.EncMapUint8Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]uintptr: + fastpathTV.EncMapUint8UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint8]uintptr: + fastpathTV.EncMapUint8UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint8]int: + fastpathTV.EncMapUint8IntV(v, fastpathCheckNilTrue, e) + case *map[uint8]int: + fastpathTV.EncMapUint8IntV(*v, fastpathCheckNilTrue, e) + + case map[uint8]int8: + fastpathTV.EncMapUint8Int8V(v, fastpathCheckNilTrue, e) + case *map[uint8]int8: + fastpathTV.EncMapUint8Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int16: + fastpathTV.EncMapUint8Int16V(v, fastpathCheckNilTrue, e) + case *map[uint8]int16: + fastpathTV.EncMapUint8Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int32: + fastpathTV.EncMapUint8Int32V(v, fastpathCheckNilTrue, e) + case *map[uint8]int32: + fastpathTV.EncMapUint8Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]int64: + fastpathTV.EncMapUint8Int64V(v, fastpathCheckNilTrue, e) + case *map[uint8]int64: + fastpathTV.EncMapUint8Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]float32: + fastpathTV.EncMapUint8Float32V(v, fastpathCheckNilTrue, e) + case *map[uint8]float32: + fastpathTV.EncMapUint8Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint8]float64: + fastpathTV.EncMapUint8Float64V(v, fastpathCheckNilTrue, e) + case *map[uint8]float64: + fastpathTV.EncMapUint8Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint8]bool: + fastpathTV.EncMapUint8BoolV(v, fastpathCheckNilTrue, e) + case *map[uint8]bool: + fastpathTV.EncMapUint8BoolV(*v, fastpathCheckNilTrue, e) + + case map[uint16]interface{}: + fastpathTV.EncMapUint16IntfV(v, fastpathCheckNilTrue, e) + case *map[uint16]interface{}: + fastpathTV.EncMapUint16IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint16]string: + fastpathTV.EncMapUint16StringV(v, fastpathCheckNilTrue, e) + case *map[uint16]string: + fastpathTV.EncMapUint16StringV(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint: + fastpathTV.EncMapUint16UintV(v, fastpathCheckNilTrue, e) + case *map[uint16]uint: + fastpathTV.EncMapUint16UintV(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint8: + fastpathTV.EncMapUint16Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint8: + fastpathTV.EncMapUint16Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint16: + fastpathTV.EncMapUint16Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint16: + fastpathTV.EncMapUint16Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint32: + fastpathTV.EncMapUint16Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint32: + fastpathTV.EncMapUint16Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uint64: + fastpathTV.EncMapUint16Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint16]uint64: + fastpathTV.EncMapUint16Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]uintptr: + fastpathTV.EncMapUint16UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint16]uintptr: + fastpathTV.EncMapUint16UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint16]int: + fastpathTV.EncMapUint16IntV(v, fastpathCheckNilTrue, e) + case *map[uint16]int: + fastpathTV.EncMapUint16IntV(*v, fastpathCheckNilTrue, e) + + case map[uint16]int8: + fastpathTV.EncMapUint16Int8V(v, fastpathCheckNilTrue, e) + case *map[uint16]int8: + fastpathTV.EncMapUint16Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int16: + fastpathTV.EncMapUint16Int16V(v, fastpathCheckNilTrue, e) + case *map[uint16]int16: + fastpathTV.EncMapUint16Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int32: + fastpathTV.EncMapUint16Int32V(v, fastpathCheckNilTrue, e) + case *map[uint16]int32: + fastpathTV.EncMapUint16Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]int64: + fastpathTV.EncMapUint16Int64V(v, fastpathCheckNilTrue, e) + case *map[uint16]int64: + fastpathTV.EncMapUint16Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]float32: + fastpathTV.EncMapUint16Float32V(v, fastpathCheckNilTrue, e) + case *map[uint16]float32: + fastpathTV.EncMapUint16Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint16]float64: + fastpathTV.EncMapUint16Float64V(v, fastpathCheckNilTrue, e) + case *map[uint16]float64: + fastpathTV.EncMapUint16Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint16]bool: + fastpathTV.EncMapUint16BoolV(v, fastpathCheckNilTrue, e) + case *map[uint16]bool: + fastpathTV.EncMapUint16BoolV(*v, fastpathCheckNilTrue, e) + + case map[uint32]interface{}: + fastpathTV.EncMapUint32IntfV(v, fastpathCheckNilTrue, e) + case *map[uint32]interface{}: + fastpathTV.EncMapUint32IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint32]string: + fastpathTV.EncMapUint32StringV(v, fastpathCheckNilTrue, e) + case *map[uint32]string: + fastpathTV.EncMapUint32StringV(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint: + fastpathTV.EncMapUint32UintV(v, fastpathCheckNilTrue, e) + case *map[uint32]uint: + fastpathTV.EncMapUint32UintV(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint8: + fastpathTV.EncMapUint32Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint8: + fastpathTV.EncMapUint32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint16: + fastpathTV.EncMapUint32Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint16: + fastpathTV.EncMapUint32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint32: + fastpathTV.EncMapUint32Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint32: + fastpathTV.EncMapUint32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uint64: + fastpathTV.EncMapUint32Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint32]uint64: + fastpathTV.EncMapUint32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]uintptr: + fastpathTV.EncMapUint32UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint32]uintptr: + fastpathTV.EncMapUint32UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint32]int: + fastpathTV.EncMapUint32IntV(v, fastpathCheckNilTrue, e) + case *map[uint32]int: + fastpathTV.EncMapUint32IntV(*v, fastpathCheckNilTrue, e) + + case map[uint32]int8: + fastpathTV.EncMapUint32Int8V(v, fastpathCheckNilTrue, e) + case *map[uint32]int8: + fastpathTV.EncMapUint32Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int16: + fastpathTV.EncMapUint32Int16V(v, fastpathCheckNilTrue, e) + case *map[uint32]int16: + fastpathTV.EncMapUint32Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int32: + fastpathTV.EncMapUint32Int32V(v, fastpathCheckNilTrue, e) + case *map[uint32]int32: + fastpathTV.EncMapUint32Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]int64: + fastpathTV.EncMapUint32Int64V(v, fastpathCheckNilTrue, e) + case *map[uint32]int64: + fastpathTV.EncMapUint32Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]float32: + fastpathTV.EncMapUint32Float32V(v, fastpathCheckNilTrue, e) + case *map[uint32]float32: + fastpathTV.EncMapUint32Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint32]float64: + fastpathTV.EncMapUint32Float64V(v, fastpathCheckNilTrue, e) + case *map[uint32]float64: + fastpathTV.EncMapUint32Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint32]bool: + fastpathTV.EncMapUint32BoolV(v, fastpathCheckNilTrue, e) + case *map[uint32]bool: + fastpathTV.EncMapUint32BoolV(*v, fastpathCheckNilTrue, e) + + case map[uint64]interface{}: + fastpathTV.EncMapUint64IntfV(v, fastpathCheckNilTrue, e) + case *map[uint64]interface{}: + fastpathTV.EncMapUint64IntfV(*v, fastpathCheckNilTrue, e) + + case map[uint64]string: + fastpathTV.EncMapUint64StringV(v, fastpathCheckNilTrue, e) + case *map[uint64]string: + fastpathTV.EncMapUint64StringV(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint: + fastpathTV.EncMapUint64UintV(v, fastpathCheckNilTrue, e) + case *map[uint64]uint: + fastpathTV.EncMapUint64UintV(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint8: + fastpathTV.EncMapUint64Uint8V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint8: + fastpathTV.EncMapUint64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint16: + fastpathTV.EncMapUint64Uint16V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint16: + fastpathTV.EncMapUint64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint32: + fastpathTV.EncMapUint64Uint32V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint32: + fastpathTV.EncMapUint64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uint64: + fastpathTV.EncMapUint64Uint64V(v, fastpathCheckNilTrue, e) + case *map[uint64]uint64: + fastpathTV.EncMapUint64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]uintptr: + fastpathTV.EncMapUint64UintptrV(v, fastpathCheckNilTrue, e) + case *map[uint64]uintptr: + fastpathTV.EncMapUint64UintptrV(*v, fastpathCheckNilTrue, e) + + case map[uint64]int: + fastpathTV.EncMapUint64IntV(v, fastpathCheckNilTrue, e) + case *map[uint64]int: + fastpathTV.EncMapUint64IntV(*v, fastpathCheckNilTrue, e) + + case map[uint64]int8: + fastpathTV.EncMapUint64Int8V(v, fastpathCheckNilTrue, e) + case *map[uint64]int8: + fastpathTV.EncMapUint64Int8V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int16: + fastpathTV.EncMapUint64Int16V(v, fastpathCheckNilTrue, e) + case *map[uint64]int16: + fastpathTV.EncMapUint64Int16V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int32: + fastpathTV.EncMapUint64Int32V(v, fastpathCheckNilTrue, e) + case *map[uint64]int32: + fastpathTV.EncMapUint64Int32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]int64: + fastpathTV.EncMapUint64Int64V(v, fastpathCheckNilTrue, e) + case *map[uint64]int64: + fastpathTV.EncMapUint64Int64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]float32: + fastpathTV.EncMapUint64Float32V(v, fastpathCheckNilTrue, e) + case *map[uint64]float32: + fastpathTV.EncMapUint64Float32V(*v, fastpathCheckNilTrue, e) + + case map[uint64]float64: + fastpathTV.EncMapUint64Float64V(v, fastpathCheckNilTrue, e) + case *map[uint64]float64: + fastpathTV.EncMapUint64Float64V(*v, fastpathCheckNilTrue, e) + + case map[uint64]bool: + fastpathTV.EncMapUint64BoolV(v, fastpathCheckNilTrue, e) + case *map[uint64]bool: + fastpathTV.EncMapUint64BoolV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]interface{}: + fastpathTV.EncMapUintptrIntfV(v, fastpathCheckNilTrue, e) + case *map[uintptr]interface{}: + fastpathTV.EncMapUintptrIntfV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]string: + fastpathTV.EncMapUintptrStringV(v, fastpathCheckNilTrue, e) + case *map[uintptr]string: + fastpathTV.EncMapUintptrStringV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint: + fastpathTV.EncMapUintptrUintV(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint: + fastpathTV.EncMapUintptrUintV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint8: + fastpathTV.EncMapUintptrUint8V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint8: + fastpathTV.EncMapUintptrUint8V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint16: + fastpathTV.EncMapUintptrUint16V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint16: + fastpathTV.EncMapUintptrUint16V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint32: + fastpathTV.EncMapUintptrUint32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint32: + fastpathTV.EncMapUintptrUint32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uint64: + fastpathTV.EncMapUintptrUint64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]uint64: + fastpathTV.EncMapUintptrUint64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]uintptr: + fastpathTV.EncMapUintptrUintptrV(v, fastpathCheckNilTrue, e) + case *map[uintptr]uintptr: + fastpathTV.EncMapUintptrUintptrV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int: + fastpathTV.EncMapUintptrIntV(v, fastpathCheckNilTrue, e) + case *map[uintptr]int: + fastpathTV.EncMapUintptrIntV(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int8: + fastpathTV.EncMapUintptrInt8V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int8: + fastpathTV.EncMapUintptrInt8V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int16: + fastpathTV.EncMapUintptrInt16V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int16: + fastpathTV.EncMapUintptrInt16V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int32: + fastpathTV.EncMapUintptrInt32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int32: + fastpathTV.EncMapUintptrInt32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]int64: + fastpathTV.EncMapUintptrInt64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]int64: + fastpathTV.EncMapUintptrInt64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]float32: + fastpathTV.EncMapUintptrFloat32V(v, fastpathCheckNilTrue, e) + case *map[uintptr]float32: + fastpathTV.EncMapUintptrFloat32V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]float64: + fastpathTV.EncMapUintptrFloat64V(v, fastpathCheckNilTrue, e) + case *map[uintptr]float64: + fastpathTV.EncMapUintptrFloat64V(*v, fastpathCheckNilTrue, e) + + case map[uintptr]bool: + fastpathTV.EncMapUintptrBoolV(v, fastpathCheckNilTrue, e) + case *map[uintptr]bool: + fastpathTV.EncMapUintptrBoolV(*v, fastpathCheckNilTrue, e) + + case map[int]interface{}: + fastpathTV.EncMapIntIntfV(v, fastpathCheckNilTrue, e) + case *map[int]interface{}: + fastpathTV.EncMapIntIntfV(*v, fastpathCheckNilTrue, e) + + case map[int]string: + fastpathTV.EncMapIntStringV(v, fastpathCheckNilTrue, e) + case *map[int]string: + fastpathTV.EncMapIntStringV(*v, fastpathCheckNilTrue, e) + + case map[int]uint: + fastpathTV.EncMapIntUintV(v, fastpathCheckNilTrue, e) + case *map[int]uint: + fastpathTV.EncMapIntUintV(*v, fastpathCheckNilTrue, e) + + case map[int]uint8: + fastpathTV.EncMapIntUint8V(v, fastpathCheckNilTrue, e) + case *map[int]uint8: + fastpathTV.EncMapIntUint8V(*v, fastpathCheckNilTrue, e) + + case map[int]uint16: + fastpathTV.EncMapIntUint16V(v, fastpathCheckNilTrue, e) + case *map[int]uint16: + fastpathTV.EncMapIntUint16V(*v, fastpathCheckNilTrue, e) + + case map[int]uint32: + fastpathTV.EncMapIntUint32V(v, fastpathCheckNilTrue, e) + case *map[int]uint32: + fastpathTV.EncMapIntUint32V(*v, fastpathCheckNilTrue, e) + + case map[int]uint64: + fastpathTV.EncMapIntUint64V(v, fastpathCheckNilTrue, e) + case *map[int]uint64: + fastpathTV.EncMapIntUint64V(*v, fastpathCheckNilTrue, e) + + case map[int]uintptr: + fastpathTV.EncMapIntUintptrV(v, fastpathCheckNilTrue, e) + case *map[int]uintptr: + fastpathTV.EncMapIntUintptrV(*v, fastpathCheckNilTrue, e) + + case map[int]int: + fastpathTV.EncMapIntIntV(v, fastpathCheckNilTrue, e) + case *map[int]int: + fastpathTV.EncMapIntIntV(*v, fastpathCheckNilTrue, e) + + case map[int]int8: + fastpathTV.EncMapIntInt8V(v, fastpathCheckNilTrue, e) + case *map[int]int8: + fastpathTV.EncMapIntInt8V(*v, fastpathCheckNilTrue, e) + + case map[int]int16: + fastpathTV.EncMapIntInt16V(v, fastpathCheckNilTrue, e) + case *map[int]int16: + fastpathTV.EncMapIntInt16V(*v, fastpathCheckNilTrue, e) + + case map[int]int32: + fastpathTV.EncMapIntInt32V(v, fastpathCheckNilTrue, e) + case *map[int]int32: + fastpathTV.EncMapIntInt32V(*v, fastpathCheckNilTrue, e) + + case map[int]int64: + fastpathTV.EncMapIntInt64V(v, fastpathCheckNilTrue, e) + case *map[int]int64: + fastpathTV.EncMapIntInt64V(*v, fastpathCheckNilTrue, e) + + case map[int]float32: + fastpathTV.EncMapIntFloat32V(v, fastpathCheckNilTrue, e) + case *map[int]float32: + fastpathTV.EncMapIntFloat32V(*v, fastpathCheckNilTrue, e) + + case map[int]float64: + fastpathTV.EncMapIntFloat64V(v, fastpathCheckNilTrue, e) + case *map[int]float64: + fastpathTV.EncMapIntFloat64V(*v, fastpathCheckNilTrue, e) + + case map[int]bool: + fastpathTV.EncMapIntBoolV(v, fastpathCheckNilTrue, e) + case *map[int]bool: + fastpathTV.EncMapIntBoolV(*v, fastpathCheckNilTrue, e) + + case map[int8]interface{}: + fastpathTV.EncMapInt8IntfV(v, fastpathCheckNilTrue, e) + case *map[int8]interface{}: + fastpathTV.EncMapInt8IntfV(*v, fastpathCheckNilTrue, e) + + case map[int8]string: + fastpathTV.EncMapInt8StringV(v, fastpathCheckNilTrue, e) + case *map[int8]string: + fastpathTV.EncMapInt8StringV(*v, fastpathCheckNilTrue, e) + + case map[int8]uint: + fastpathTV.EncMapInt8UintV(v, fastpathCheckNilTrue, e) + case *map[int8]uint: + fastpathTV.EncMapInt8UintV(*v, fastpathCheckNilTrue, e) + + case map[int8]uint8: + fastpathTV.EncMapInt8Uint8V(v, fastpathCheckNilTrue, e) + case *map[int8]uint8: + fastpathTV.EncMapInt8Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint16: + fastpathTV.EncMapInt8Uint16V(v, fastpathCheckNilTrue, e) + case *map[int8]uint16: + fastpathTV.EncMapInt8Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint32: + fastpathTV.EncMapInt8Uint32V(v, fastpathCheckNilTrue, e) + case *map[int8]uint32: + fastpathTV.EncMapInt8Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int8]uint64: + fastpathTV.EncMapInt8Uint64V(v, fastpathCheckNilTrue, e) + case *map[int8]uint64: + fastpathTV.EncMapInt8Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int8]uintptr: + fastpathTV.EncMapInt8UintptrV(v, fastpathCheckNilTrue, e) + case *map[int8]uintptr: + fastpathTV.EncMapInt8UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int8]int: + fastpathTV.EncMapInt8IntV(v, fastpathCheckNilTrue, e) + case *map[int8]int: + fastpathTV.EncMapInt8IntV(*v, fastpathCheckNilTrue, e) + + case map[int8]int8: + fastpathTV.EncMapInt8Int8V(v, fastpathCheckNilTrue, e) + case *map[int8]int8: + fastpathTV.EncMapInt8Int8V(*v, fastpathCheckNilTrue, e) + + case map[int8]int16: + fastpathTV.EncMapInt8Int16V(v, fastpathCheckNilTrue, e) + case *map[int8]int16: + fastpathTV.EncMapInt8Int16V(*v, fastpathCheckNilTrue, e) + + case map[int8]int32: + fastpathTV.EncMapInt8Int32V(v, fastpathCheckNilTrue, e) + case *map[int8]int32: + fastpathTV.EncMapInt8Int32V(*v, fastpathCheckNilTrue, e) + + case map[int8]int64: + fastpathTV.EncMapInt8Int64V(v, fastpathCheckNilTrue, e) + case *map[int8]int64: + fastpathTV.EncMapInt8Int64V(*v, fastpathCheckNilTrue, e) + + case map[int8]float32: + fastpathTV.EncMapInt8Float32V(v, fastpathCheckNilTrue, e) + case *map[int8]float32: + fastpathTV.EncMapInt8Float32V(*v, fastpathCheckNilTrue, e) + + case map[int8]float64: + fastpathTV.EncMapInt8Float64V(v, fastpathCheckNilTrue, e) + case *map[int8]float64: + fastpathTV.EncMapInt8Float64V(*v, fastpathCheckNilTrue, e) + + case map[int8]bool: + fastpathTV.EncMapInt8BoolV(v, fastpathCheckNilTrue, e) + case *map[int8]bool: + fastpathTV.EncMapInt8BoolV(*v, fastpathCheckNilTrue, e) + + case map[int16]interface{}: + fastpathTV.EncMapInt16IntfV(v, fastpathCheckNilTrue, e) + case *map[int16]interface{}: + fastpathTV.EncMapInt16IntfV(*v, fastpathCheckNilTrue, e) + + case map[int16]string: + fastpathTV.EncMapInt16StringV(v, fastpathCheckNilTrue, e) + case *map[int16]string: + fastpathTV.EncMapInt16StringV(*v, fastpathCheckNilTrue, e) + + case map[int16]uint: + fastpathTV.EncMapInt16UintV(v, fastpathCheckNilTrue, e) + case *map[int16]uint: + fastpathTV.EncMapInt16UintV(*v, fastpathCheckNilTrue, e) + + case map[int16]uint8: + fastpathTV.EncMapInt16Uint8V(v, fastpathCheckNilTrue, e) + case *map[int16]uint8: + fastpathTV.EncMapInt16Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint16: + fastpathTV.EncMapInt16Uint16V(v, fastpathCheckNilTrue, e) + case *map[int16]uint16: + fastpathTV.EncMapInt16Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint32: + fastpathTV.EncMapInt16Uint32V(v, fastpathCheckNilTrue, e) + case *map[int16]uint32: + fastpathTV.EncMapInt16Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int16]uint64: + fastpathTV.EncMapInt16Uint64V(v, fastpathCheckNilTrue, e) + case *map[int16]uint64: + fastpathTV.EncMapInt16Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int16]uintptr: + fastpathTV.EncMapInt16UintptrV(v, fastpathCheckNilTrue, e) + case *map[int16]uintptr: + fastpathTV.EncMapInt16UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int16]int: + fastpathTV.EncMapInt16IntV(v, fastpathCheckNilTrue, e) + case *map[int16]int: + fastpathTV.EncMapInt16IntV(*v, fastpathCheckNilTrue, e) + + case map[int16]int8: + fastpathTV.EncMapInt16Int8V(v, fastpathCheckNilTrue, e) + case *map[int16]int8: + fastpathTV.EncMapInt16Int8V(*v, fastpathCheckNilTrue, e) + + case map[int16]int16: + fastpathTV.EncMapInt16Int16V(v, fastpathCheckNilTrue, e) + case *map[int16]int16: + fastpathTV.EncMapInt16Int16V(*v, fastpathCheckNilTrue, e) + + case map[int16]int32: + fastpathTV.EncMapInt16Int32V(v, fastpathCheckNilTrue, e) + case *map[int16]int32: + fastpathTV.EncMapInt16Int32V(*v, fastpathCheckNilTrue, e) + + case map[int16]int64: + fastpathTV.EncMapInt16Int64V(v, fastpathCheckNilTrue, e) + case *map[int16]int64: + fastpathTV.EncMapInt16Int64V(*v, fastpathCheckNilTrue, e) + + case map[int16]float32: + fastpathTV.EncMapInt16Float32V(v, fastpathCheckNilTrue, e) + case *map[int16]float32: + fastpathTV.EncMapInt16Float32V(*v, fastpathCheckNilTrue, e) + + case map[int16]float64: + fastpathTV.EncMapInt16Float64V(v, fastpathCheckNilTrue, e) + case *map[int16]float64: + fastpathTV.EncMapInt16Float64V(*v, fastpathCheckNilTrue, e) + + case map[int16]bool: + fastpathTV.EncMapInt16BoolV(v, fastpathCheckNilTrue, e) + case *map[int16]bool: + fastpathTV.EncMapInt16BoolV(*v, fastpathCheckNilTrue, e) + + case map[int32]interface{}: + fastpathTV.EncMapInt32IntfV(v, fastpathCheckNilTrue, e) + case *map[int32]interface{}: + fastpathTV.EncMapInt32IntfV(*v, fastpathCheckNilTrue, e) + + case map[int32]string: + fastpathTV.EncMapInt32StringV(v, fastpathCheckNilTrue, e) + case *map[int32]string: + fastpathTV.EncMapInt32StringV(*v, fastpathCheckNilTrue, e) + + case map[int32]uint: + fastpathTV.EncMapInt32UintV(v, fastpathCheckNilTrue, e) + case *map[int32]uint: + fastpathTV.EncMapInt32UintV(*v, fastpathCheckNilTrue, e) + + case map[int32]uint8: + fastpathTV.EncMapInt32Uint8V(v, fastpathCheckNilTrue, e) + case *map[int32]uint8: + fastpathTV.EncMapInt32Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint16: + fastpathTV.EncMapInt32Uint16V(v, fastpathCheckNilTrue, e) + case *map[int32]uint16: + fastpathTV.EncMapInt32Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint32: + fastpathTV.EncMapInt32Uint32V(v, fastpathCheckNilTrue, e) + case *map[int32]uint32: + fastpathTV.EncMapInt32Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int32]uint64: + fastpathTV.EncMapInt32Uint64V(v, fastpathCheckNilTrue, e) + case *map[int32]uint64: + fastpathTV.EncMapInt32Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int32]uintptr: + fastpathTV.EncMapInt32UintptrV(v, fastpathCheckNilTrue, e) + case *map[int32]uintptr: + fastpathTV.EncMapInt32UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int32]int: + fastpathTV.EncMapInt32IntV(v, fastpathCheckNilTrue, e) + case *map[int32]int: + fastpathTV.EncMapInt32IntV(*v, fastpathCheckNilTrue, e) + + case map[int32]int8: + fastpathTV.EncMapInt32Int8V(v, fastpathCheckNilTrue, e) + case *map[int32]int8: + fastpathTV.EncMapInt32Int8V(*v, fastpathCheckNilTrue, e) + + case map[int32]int16: + fastpathTV.EncMapInt32Int16V(v, fastpathCheckNilTrue, e) + case *map[int32]int16: + fastpathTV.EncMapInt32Int16V(*v, fastpathCheckNilTrue, e) + + case map[int32]int32: + fastpathTV.EncMapInt32Int32V(v, fastpathCheckNilTrue, e) + case *map[int32]int32: + fastpathTV.EncMapInt32Int32V(*v, fastpathCheckNilTrue, e) + + case map[int32]int64: + fastpathTV.EncMapInt32Int64V(v, fastpathCheckNilTrue, e) + case *map[int32]int64: + fastpathTV.EncMapInt32Int64V(*v, fastpathCheckNilTrue, e) + + case map[int32]float32: + fastpathTV.EncMapInt32Float32V(v, fastpathCheckNilTrue, e) + case *map[int32]float32: + fastpathTV.EncMapInt32Float32V(*v, fastpathCheckNilTrue, e) + + case map[int32]float64: + fastpathTV.EncMapInt32Float64V(v, fastpathCheckNilTrue, e) + case *map[int32]float64: + fastpathTV.EncMapInt32Float64V(*v, fastpathCheckNilTrue, e) + + case map[int32]bool: + fastpathTV.EncMapInt32BoolV(v, fastpathCheckNilTrue, e) + case *map[int32]bool: + fastpathTV.EncMapInt32BoolV(*v, fastpathCheckNilTrue, e) + + case map[int64]interface{}: + fastpathTV.EncMapInt64IntfV(v, fastpathCheckNilTrue, e) + case *map[int64]interface{}: + fastpathTV.EncMapInt64IntfV(*v, fastpathCheckNilTrue, e) + + case map[int64]string: + fastpathTV.EncMapInt64StringV(v, fastpathCheckNilTrue, e) + case *map[int64]string: + fastpathTV.EncMapInt64StringV(*v, fastpathCheckNilTrue, e) + + case map[int64]uint: + fastpathTV.EncMapInt64UintV(v, fastpathCheckNilTrue, e) + case *map[int64]uint: + fastpathTV.EncMapInt64UintV(*v, fastpathCheckNilTrue, e) + + case map[int64]uint8: + fastpathTV.EncMapInt64Uint8V(v, fastpathCheckNilTrue, e) + case *map[int64]uint8: + fastpathTV.EncMapInt64Uint8V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint16: + fastpathTV.EncMapInt64Uint16V(v, fastpathCheckNilTrue, e) + case *map[int64]uint16: + fastpathTV.EncMapInt64Uint16V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint32: + fastpathTV.EncMapInt64Uint32V(v, fastpathCheckNilTrue, e) + case *map[int64]uint32: + fastpathTV.EncMapInt64Uint32V(*v, fastpathCheckNilTrue, e) + + case map[int64]uint64: + fastpathTV.EncMapInt64Uint64V(v, fastpathCheckNilTrue, e) + case *map[int64]uint64: + fastpathTV.EncMapInt64Uint64V(*v, fastpathCheckNilTrue, e) + + case map[int64]uintptr: + fastpathTV.EncMapInt64UintptrV(v, fastpathCheckNilTrue, e) + case *map[int64]uintptr: + fastpathTV.EncMapInt64UintptrV(*v, fastpathCheckNilTrue, e) + + case map[int64]int: + fastpathTV.EncMapInt64IntV(v, fastpathCheckNilTrue, e) + case *map[int64]int: + fastpathTV.EncMapInt64IntV(*v, fastpathCheckNilTrue, e) + + case map[int64]int8: + fastpathTV.EncMapInt64Int8V(v, fastpathCheckNilTrue, e) + case *map[int64]int8: + fastpathTV.EncMapInt64Int8V(*v, fastpathCheckNilTrue, e) + + case map[int64]int16: + fastpathTV.EncMapInt64Int16V(v, fastpathCheckNilTrue, e) + case *map[int64]int16: + fastpathTV.EncMapInt64Int16V(*v, fastpathCheckNilTrue, e) + + case map[int64]int32: + fastpathTV.EncMapInt64Int32V(v, fastpathCheckNilTrue, e) + case *map[int64]int32: + fastpathTV.EncMapInt64Int32V(*v, fastpathCheckNilTrue, e) + + case map[int64]int64: + fastpathTV.EncMapInt64Int64V(v, fastpathCheckNilTrue, e) + case *map[int64]int64: + fastpathTV.EncMapInt64Int64V(*v, fastpathCheckNilTrue, e) + + case map[int64]float32: + fastpathTV.EncMapInt64Float32V(v, fastpathCheckNilTrue, e) + case *map[int64]float32: + fastpathTV.EncMapInt64Float32V(*v, fastpathCheckNilTrue, e) + + case map[int64]float64: + fastpathTV.EncMapInt64Float64V(v, fastpathCheckNilTrue, e) + case *map[int64]float64: + fastpathTV.EncMapInt64Float64V(*v, fastpathCheckNilTrue, e) + + case map[int64]bool: + fastpathTV.EncMapInt64BoolV(v, fastpathCheckNilTrue, e) + case *map[int64]bool: + fastpathTV.EncMapInt64BoolV(*v, fastpathCheckNilTrue, e) + + case map[bool]interface{}: + fastpathTV.EncMapBoolIntfV(v, fastpathCheckNilTrue, e) + case *map[bool]interface{}: + fastpathTV.EncMapBoolIntfV(*v, fastpathCheckNilTrue, e) + + case map[bool]string: + fastpathTV.EncMapBoolStringV(v, fastpathCheckNilTrue, e) + case *map[bool]string: + fastpathTV.EncMapBoolStringV(*v, fastpathCheckNilTrue, e) + + case map[bool]uint: + fastpathTV.EncMapBoolUintV(v, fastpathCheckNilTrue, e) + case *map[bool]uint: + fastpathTV.EncMapBoolUintV(*v, fastpathCheckNilTrue, e) + + case map[bool]uint8: + fastpathTV.EncMapBoolUint8V(v, fastpathCheckNilTrue, e) + case *map[bool]uint8: + fastpathTV.EncMapBoolUint8V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint16: + fastpathTV.EncMapBoolUint16V(v, fastpathCheckNilTrue, e) + case *map[bool]uint16: + fastpathTV.EncMapBoolUint16V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint32: + fastpathTV.EncMapBoolUint32V(v, fastpathCheckNilTrue, e) + case *map[bool]uint32: + fastpathTV.EncMapBoolUint32V(*v, fastpathCheckNilTrue, e) + + case map[bool]uint64: + fastpathTV.EncMapBoolUint64V(v, fastpathCheckNilTrue, e) + case *map[bool]uint64: + fastpathTV.EncMapBoolUint64V(*v, fastpathCheckNilTrue, e) + + case map[bool]uintptr: + fastpathTV.EncMapBoolUintptrV(v, fastpathCheckNilTrue, e) + case *map[bool]uintptr: + fastpathTV.EncMapBoolUintptrV(*v, fastpathCheckNilTrue, e) + + case map[bool]int: + fastpathTV.EncMapBoolIntV(v, fastpathCheckNilTrue, e) + case *map[bool]int: + fastpathTV.EncMapBoolIntV(*v, fastpathCheckNilTrue, e) + + case map[bool]int8: + fastpathTV.EncMapBoolInt8V(v, fastpathCheckNilTrue, e) + case *map[bool]int8: + fastpathTV.EncMapBoolInt8V(*v, fastpathCheckNilTrue, e) + + case map[bool]int16: + fastpathTV.EncMapBoolInt16V(v, fastpathCheckNilTrue, e) + case *map[bool]int16: + fastpathTV.EncMapBoolInt16V(*v, fastpathCheckNilTrue, e) + + case map[bool]int32: + fastpathTV.EncMapBoolInt32V(v, fastpathCheckNilTrue, e) + case *map[bool]int32: + fastpathTV.EncMapBoolInt32V(*v, fastpathCheckNilTrue, e) + + case map[bool]int64: + fastpathTV.EncMapBoolInt64V(v, fastpathCheckNilTrue, e) + case *map[bool]int64: + fastpathTV.EncMapBoolInt64V(*v, fastpathCheckNilTrue, e) + + case map[bool]float32: + fastpathTV.EncMapBoolFloat32V(v, fastpathCheckNilTrue, e) + case *map[bool]float32: + fastpathTV.EncMapBoolFloat32V(*v, fastpathCheckNilTrue, e) + + case map[bool]float64: + fastpathTV.EncMapBoolFloat64V(v, fastpathCheckNilTrue, e) + case *map[bool]float64: + fastpathTV.EncMapBoolFloat64V(*v, fastpathCheckNilTrue, e) + + case map[bool]bool: + fastpathTV.EncMapBoolBoolV(v, fastpathCheckNilTrue, e) + case *map[bool]bool: + fastpathTV.EncMapBoolBoolV(*v, fastpathCheckNilTrue, e) + + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +// -- -- fast path functions + +func (f *encFnInfo) fastpathEncSliceIntfR(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceIntfV(rv.Interface().([]interface{}), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.EncSliceIntfV(rv.Interface().([]interface{}), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) EncSliceIntfV(v []interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + e.encode(v2) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (_ fastpathT) EncAsMapSliceIntfV(v []interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + e.encode(v2) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceStringR(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceStringV(rv.Interface().([]string), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.EncSliceStringV(rv.Interface().([]string), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) EncSliceStringV(v []string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeString(c_UTF8, v2) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (_ fastpathT) EncAsMapSliceStringV(v []string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + ee.EncodeString(c_UTF8, v2) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceFloat32R(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceFloat32V(rv.Interface().([]float32), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.EncSliceFloat32V(rv.Interface().([]float32), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) EncSliceFloat32V(v []float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeFloat32(v2) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (_ fastpathT) EncAsMapSliceFloat32V(v []float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + ee.EncodeFloat32(v2) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceFloat64R(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceFloat64V(rv.Interface().([]float64), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.EncSliceFloat64V(rv.Interface().([]float64), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) EncSliceFloat64V(v []float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeFloat64(v2) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (_ fastpathT) EncAsMapSliceFloat64V(v []float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + ee.EncodeFloat64(v2) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceUintR(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceUintV(rv.Interface().([]uint), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.EncSliceUintV(rv.Interface().([]uint), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) EncSliceUintV(v []uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeUint(uint64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (_ fastpathT) EncAsMapSliceUintV(v []uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + ee.EncodeUint(uint64(v2)) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceUint16R(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceUint16V(rv.Interface().([]uint16), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.EncSliceUint16V(rv.Interface().([]uint16), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) EncSliceUint16V(v []uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeUint(uint64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (_ fastpathT) EncAsMapSliceUint16V(v []uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + ee.EncodeUint(uint64(v2)) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceUint32R(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceUint32V(rv.Interface().([]uint32), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.EncSliceUint32V(rv.Interface().([]uint32), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) EncSliceUint32V(v []uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeUint(uint64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (_ fastpathT) EncAsMapSliceUint32V(v []uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + ee.EncodeUint(uint64(v2)) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceUint64R(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceUint64V(rv.Interface().([]uint64), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.EncSliceUint64V(rv.Interface().([]uint64), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) EncSliceUint64V(v []uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeUint(uint64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (_ fastpathT) EncAsMapSliceUint64V(v []uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + ee.EncodeUint(uint64(v2)) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceUintptrR(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceUintptrV(rv.Interface().([]uintptr), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.EncSliceUintptrV(rv.Interface().([]uintptr), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) EncSliceUintptrV(v []uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + e.encode(v2) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (_ fastpathT) EncAsMapSliceUintptrV(v []uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + e.encode(v2) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceIntR(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceIntV(rv.Interface().([]int), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.EncSliceIntV(rv.Interface().([]int), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) EncSliceIntV(v []int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeInt(int64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (_ fastpathT) EncAsMapSliceIntV(v []int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + ee.EncodeInt(int64(v2)) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceInt8R(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceInt8V(rv.Interface().([]int8), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.EncSliceInt8V(rv.Interface().([]int8), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) EncSliceInt8V(v []int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeInt(int64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (_ fastpathT) EncAsMapSliceInt8V(v []int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + ee.EncodeInt(int64(v2)) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceInt16R(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceInt16V(rv.Interface().([]int16), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.EncSliceInt16V(rv.Interface().([]int16), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) EncSliceInt16V(v []int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeInt(int64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (_ fastpathT) EncAsMapSliceInt16V(v []int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + ee.EncodeInt(int64(v2)) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceInt32R(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceInt32V(rv.Interface().([]int32), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.EncSliceInt32V(rv.Interface().([]int32), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) EncSliceInt32V(v []int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeInt(int64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (_ fastpathT) EncAsMapSliceInt32V(v []int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + ee.EncodeInt(int64(v2)) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceInt64R(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceInt64V(rv.Interface().([]int64), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.EncSliceInt64V(rv.Interface().([]int64), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) EncSliceInt64V(v []int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeInt(int64(v2)) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (_ fastpathT) EncAsMapSliceInt64V(v []int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + ee.EncodeInt(int64(v2)) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncSliceBoolR(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.EncAsMapSliceBoolV(rv.Interface().([]bool), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.EncSliceBoolV(rv.Interface().([]bool), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) EncSliceBoolV(v []bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { + cr.sendContainerState(containerArrayElem) + } + ee.EncodeBool(v2) + } + if cr != nil { + cr.sendContainerState(containerArrayEnd) + } +} + +func (_ fastpathT) EncAsMapSliceBoolV(v []bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + ee.EncodeBool(v2) + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfIntfR(rv reflect.Value) { + fastpathTV.EncMapIntfIntfV(rv.Interface().(map[interface{}]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfStringR(rv reflect.Value) { + fastpathTV.EncMapIntfStringV(rv.Interface().(map[interface{}]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfUintR(rv reflect.Value) { + fastpathTV.EncMapIntfUintV(rv.Interface().(map[interface{}]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfUint8R(rv reflect.Value) { + fastpathTV.EncMapIntfUint8V(rv.Interface().(map[interface{}]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfUint16R(rv reflect.Value) { + fastpathTV.EncMapIntfUint16V(rv.Interface().(map[interface{}]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfUint32R(rv reflect.Value) { + fastpathTV.EncMapIntfUint32V(rv.Interface().(map[interface{}]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfUint64R(rv reflect.Value) { + fastpathTV.EncMapIntfUint64V(rv.Interface().(map[interface{}]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfUintptrR(rv reflect.Value) { + fastpathTV.EncMapIntfUintptrV(rv.Interface().(map[interface{}]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfIntR(rv reflect.Value) { + fastpathTV.EncMapIntfIntV(rv.Interface().(map[interface{}]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfInt8R(rv reflect.Value) { + fastpathTV.EncMapIntfInt8V(rv.Interface().(map[interface{}]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfInt16R(rv reflect.Value) { + fastpathTV.EncMapIntfInt16V(rv.Interface().(map[interface{}]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfInt32R(rv reflect.Value) { + fastpathTV.EncMapIntfInt32V(rv.Interface().(map[interface{}]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfInt64R(rv reflect.Value) { + fastpathTV.EncMapIntfInt64V(rv.Interface().(map[interface{}]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfFloat32R(rv reflect.Value) { + fastpathTV.EncMapIntfFloat32V(rv.Interface().(map[interface{}]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfFloat64R(rv reflect.Value) { + fastpathTV.EncMapIntfFloat64V(rv.Interface().(map[interface{}]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntfBoolR(rv reflect.Value) { + fastpathTV.EncMapIntfBoolV(rv.Interface().(map[interface{}]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.asis(v2[j].v) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[v2[j].i]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringIntfR(rv reflect.Value) { + fastpathTV.EncMapStringIntfV(rv.Interface().(map[string]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[string(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringStringR(rv reflect.Value) { + fastpathTV.EncMapStringStringV(rv.Interface().(map[string]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringStringV(v map[string]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[string(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringUintR(rv reflect.Value) { + fastpathTV.EncMapStringUintV(rv.Interface().(map[string]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUintV(v map[string]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringUint8R(rv reflect.Value) { + fastpathTV.EncMapStringUint8V(rv.Interface().(map[string]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringUint16R(rv reflect.Value) { + fastpathTV.EncMapStringUint16V(rv.Interface().(map[string]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringUint32R(rv reflect.Value) { + fastpathTV.EncMapStringUint32V(rv.Interface().(map[string]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringUint64R(rv reflect.Value) { + fastpathTV.EncMapStringUint64V(rv.Interface().(map[string]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringUintptrR(rv reflect.Value) { + fastpathTV.EncMapStringUintptrV(rv.Interface().(map[string]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringUintptrV(v map[string]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[string(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringIntR(rv reflect.Value) { + fastpathTV.EncMapStringIntV(rv.Interface().(map[string]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringIntV(v map[string]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringInt8R(rv reflect.Value) { + fastpathTV.EncMapStringInt8V(rv.Interface().(map[string]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringInt8V(v map[string]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringInt16R(rv reflect.Value) { + fastpathTV.EncMapStringInt16V(rv.Interface().(map[string]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringInt16V(v map[string]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringInt32R(rv reflect.Value) { + fastpathTV.EncMapStringInt32V(rv.Interface().(map[string]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringInt32V(v map[string]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringInt64R(rv reflect.Value) { + fastpathTV.EncMapStringInt64V(rv.Interface().(map[string]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringInt64V(v map[string]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[string(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringFloat32R(rv reflect.Value) { + fastpathTV.EncMapStringFloat32V(rv.Interface().(map[string]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[string(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringFloat64R(rv reflect.Value) { + fastpathTV.EncMapStringFloat64V(rv.Interface().(map[string]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[string(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapStringBoolR(rv reflect.Value) { + fastpathTV.EncMapStringBoolV(rv.Interface().(map[string]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapStringBoolV(v map[string]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + if e.h.Canonical { + v2 := make([]string, len(v)) + var i int + for k, _ := range v { + v2[i] = string(k) + i++ + } + sort.Sort(stringSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[string(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32IntfR(rv reflect.Value) { + fastpathTV.EncMapFloat32IntfV(rv.Interface().(map[float32]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32StringR(rv reflect.Value) { + fastpathTV.EncMapFloat32StringV(rv.Interface().(map[float32]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32UintR(rv reflect.Value) { + fastpathTV.EncMapFloat32UintV(rv.Interface().(map[float32]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Uint8R(rv reflect.Value) { + fastpathTV.EncMapFloat32Uint8V(rv.Interface().(map[float32]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Uint16R(rv reflect.Value) { + fastpathTV.EncMapFloat32Uint16V(rv.Interface().(map[float32]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Uint32R(rv reflect.Value) { + fastpathTV.EncMapFloat32Uint32V(rv.Interface().(map[float32]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Uint64R(rv reflect.Value) { + fastpathTV.EncMapFloat32Uint64V(rv.Interface().(map[float32]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32UintptrR(rv reflect.Value) { + fastpathTV.EncMapFloat32UintptrV(rv.Interface().(map[float32]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32IntR(rv reflect.Value) { + fastpathTV.EncMapFloat32IntV(rv.Interface().(map[float32]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Int8R(rv reflect.Value) { + fastpathTV.EncMapFloat32Int8V(rv.Interface().(map[float32]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Int16R(rv reflect.Value) { + fastpathTV.EncMapFloat32Int16V(rv.Interface().(map[float32]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Int32R(rv reflect.Value) { + fastpathTV.EncMapFloat32Int32V(rv.Interface().(map[float32]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Int64R(rv reflect.Value) { + fastpathTV.EncMapFloat32Int64V(rv.Interface().(map[float32]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Float32R(rv reflect.Value) { + fastpathTV.EncMapFloat32Float32V(rv.Interface().(map[float32]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32Float64R(rv reflect.Value) { + fastpathTV.EncMapFloat32Float64V(rv.Interface().(map[float32]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat32BoolR(rv reflect.Value) { + fastpathTV.EncMapFloat32BoolV(rv.Interface().(map[float32]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(float32(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[float32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat32(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64IntfR(rv reflect.Value) { + fastpathTV.EncMapFloat64IntfV(rv.Interface().(map[float64]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64StringR(rv reflect.Value) { + fastpathTV.EncMapFloat64StringV(rv.Interface().(map[float64]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64UintR(rv reflect.Value) { + fastpathTV.EncMapFloat64UintV(rv.Interface().(map[float64]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Uint8R(rv reflect.Value) { + fastpathTV.EncMapFloat64Uint8V(rv.Interface().(map[float64]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Uint16R(rv reflect.Value) { + fastpathTV.EncMapFloat64Uint16V(rv.Interface().(map[float64]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Uint32R(rv reflect.Value) { + fastpathTV.EncMapFloat64Uint32V(rv.Interface().(map[float64]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Uint64R(rv reflect.Value) { + fastpathTV.EncMapFloat64Uint64V(rv.Interface().(map[float64]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64UintptrR(rv reflect.Value) { + fastpathTV.EncMapFloat64UintptrV(rv.Interface().(map[float64]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64IntR(rv reflect.Value) { + fastpathTV.EncMapFloat64IntV(rv.Interface().(map[float64]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Int8R(rv reflect.Value) { + fastpathTV.EncMapFloat64Int8V(rv.Interface().(map[float64]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Int16R(rv reflect.Value) { + fastpathTV.EncMapFloat64Int16V(rv.Interface().(map[float64]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Int32R(rv reflect.Value) { + fastpathTV.EncMapFloat64Int32V(rv.Interface().(map[float64]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Int64R(rv reflect.Value) { + fastpathTV.EncMapFloat64Int64V(rv.Interface().(map[float64]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[float64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Float32R(rv reflect.Value) { + fastpathTV.EncMapFloat64Float32V(rv.Interface().(map[float64]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64Float64R(rv reflect.Value) { + fastpathTV.EncMapFloat64Float64V(rv.Interface().(map[float64]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapFloat64BoolR(rv reflect.Value) { + fastpathTV.EncMapFloat64BoolV(rv.Interface().(map[float64]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]float64, len(v)) + var i int + for k, _ := range v { + v2[i] = float64(k) + i++ + } + sort.Sort(floatSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(float64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[float64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeFloat64(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintIntfR(rv reflect.Value) { + fastpathTV.EncMapUintIntfV(rv.Interface().(map[uint]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintStringR(rv reflect.Value) { + fastpathTV.EncMapUintStringV(rv.Interface().(map[uint]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintStringV(v map[uint]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintUintR(rv reflect.Value) { + fastpathTV.EncMapUintUintV(rv.Interface().(map[uint]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUintV(v map[uint]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintUint8R(rv reflect.Value) { + fastpathTV.EncMapUintUint8V(rv.Interface().(map[uint]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintUint16R(rv reflect.Value) { + fastpathTV.EncMapUintUint16V(rv.Interface().(map[uint]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintUint32R(rv reflect.Value) { + fastpathTV.EncMapUintUint32V(rv.Interface().(map[uint]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintUint64R(rv reflect.Value) { + fastpathTV.EncMapUintUint64V(rv.Interface().(map[uint]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintUintptrR(rv reflect.Value) { + fastpathTV.EncMapUintUintptrV(rv.Interface().(map[uint]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintUintptrV(v map[uint]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintIntR(rv reflect.Value) { + fastpathTV.EncMapUintIntV(rv.Interface().(map[uint]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintIntV(v map[uint]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintInt8R(rv reflect.Value) { + fastpathTV.EncMapUintInt8V(rv.Interface().(map[uint]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintInt16R(rv reflect.Value) { + fastpathTV.EncMapUintInt16V(rv.Interface().(map[uint]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintInt32R(rv reflect.Value) { + fastpathTV.EncMapUintInt32V(rv.Interface().(map[uint]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintInt64R(rv reflect.Value) { + fastpathTV.EncMapUintInt64V(rv.Interface().(map[uint]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintFloat32R(rv reflect.Value) { + fastpathTV.EncMapUintFloat32V(rv.Interface().(map[uint]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintFloat64R(rv reflect.Value) { + fastpathTV.EncMapUintFloat64V(rv.Interface().(map[uint]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintBoolR(rv reflect.Value) { + fastpathTV.EncMapUintBoolV(rv.Interface().(map[uint]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uint(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8IntfR(rv reflect.Value) { + fastpathTV.EncMapUint8IntfV(rv.Interface().(map[uint8]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8StringR(rv reflect.Value) { + fastpathTV.EncMapUint8StringV(rv.Interface().(map[uint8]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8UintR(rv reflect.Value) { + fastpathTV.EncMapUint8UintV(rv.Interface().(map[uint8]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Uint8R(rv reflect.Value) { + fastpathTV.EncMapUint8Uint8V(rv.Interface().(map[uint8]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Uint16R(rv reflect.Value) { + fastpathTV.EncMapUint8Uint16V(rv.Interface().(map[uint8]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Uint32R(rv reflect.Value) { + fastpathTV.EncMapUint8Uint32V(rv.Interface().(map[uint8]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Uint64R(rv reflect.Value) { + fastpathTV.EncMapUint8Uint64V(rv.Interface().(map[uint8]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8UintptrR(rv reflect.Value) { + fastpathTV.EncMapUint8UintptrV(rv.Interface().(map[uint8]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8IntR(rv reflect.Value) { + fastpathTV.EncMapUint8IntV(rv.Interface().(map[uint8]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Int8R(rv reflect.Value) { + fastpathTV.EncMapUint8Int8V(rv.Interface().(map[uint8]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Int16R(rv reflect.Value) { + fastpathTV.EncMapUint8Int16V(rv.Interface().(map[uint8]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Int32R(rv reflect.Value) { + fastpathTV.EncMapUint8Int32V(rv.Interface().(map[uint8]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Int64R(rv reflect.Value) { + fastpathTV.EncMapUint8Int64V(rv.Interface().(map[uint8]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Float32R(rv reflect.Value) { + fastpathTV.EncMapUint8Float32V(rv.Interface().(map[uint8]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8Float64R(rv reflect.Value) { + fastpathTV.EncMapUint8Float64V(rv.Interface().(map[uint8]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint8BoolR(rv reflect.Value) { + fastpathTV.EncMapUint8BoolV(rv.Interface().(map[uint8]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uint8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16IntfR(rv reflect.Value) { + fastpathTV.EncMapUint16IntfV(rv.Interface().(map[uint16]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16StringR(rv reflect.Value) { + fastpathTV.EncMapUint16StringV(rv.Interface().(map[uint16]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16UintR(rv reflect.Value) { + fastpathTV.EncMapUint16UintV(rv.Interface().(map[uint16]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Uint8R(rv reflect.Value) { + fastpathTV.EncMapUint16Uint8V(rv.Interface().(map[uint16]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Uint16R(rv reflect.Value) { + fastpathTV.EncMapUint16Uint16V(rv.Interface().(map[uint16]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Uint32R(rv reflect.Value) { + fastpathTV.EncMapUint16Uint32V(rv.Interface().(map[uint16]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Uint64R(rv reflect.Value) { + fastpathTV.EncMapUint16Uint64V(rv.Interface().(map[uint16]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16UintptrR(rv reflect.Value) { + fastpathTV.EncMapUint16UintptrV(rv.Interface().(map[uint16]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16IntR(rv reflect.Value) { + fastpathTV.EncMapUint16IntV(rv.Interface().(map[uint16]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Int8R(rv reflect.Value) { + fastpathTV.EncMapUint16Int8V(rv.Interface().(map[uint16]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Int16R(rv reflect.Value) { + fastpathTV.EncMapUint16Int16V(rv.Interface().(map[uint16]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Int32R(rv reflect.Value) { + fastpathTV.EncMapUint16Int32V(rv.Interface().(map[uint16]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Int64R(rv reflect.Value) { + fastpathTV.EncMapUint16Int64V(rv.Interface().(map[uint16]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Float32R(rv reflect.Value) { + fastpathTV.EncMapUint16Float32V(rv.Interface().(map[uint16]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16Float64R(rv reflect.Value) { + fastpathTV.EncMapUint16Float64V(rv.Interface().(map[uint16]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint16BoolR(rv reflect.Value) { + fastpathTV.EncMapUint16BoolV(rv.Interface().(map[uint16]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uint16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32IntfR(rv reflect.Value) { + fastpathTV.EncMapUint32IntfV(rv.Interface().(map[uint32]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32StringR(rv reflect.Value) { + fastpathTV.EncMapUint32StringV(rv.Interface().(map[uint32]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32UintR(rv reflect.Value) { + fastpathTV.EncMapUint32UintV(rv.Interface().(map[uint32]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Uint8R(rv reflect.Value) { + fastpathTV.EncMapUint32Uint8V(rv.Interface().(map[uint32]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Uint16R(rv reflect.Value) { + fastpathTV.EncMapUint32Uint16V(rv.Interface().(map[uint32]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Uint32R(rv reflect.Value) { + fastpathTV.EncMapUint32Uint32V(rv.Interface().(map[uint32]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Uint64R(rv reflect.Value) { + fastpathTV.EncMapUint32Uint64V(rv.Interface().(map[uint32]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32UintptrR(rv reflect.Value) { + fastpathTV.EncMapUint32UintptrV(rv.Interface().(map[uint32]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32IntR(rv reflect.Value) { + fastpathTV.EncMapUint32IntV(rv.Interface().(map[uint32]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Int8R(rv reflect.Value) { + fastpathTV.EncMapUint32Int8V(rv.Interface().(map[uint32]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Int16R(rv reflect.Value) { + fastpathTV.EncMapUint32Int16V(rv.Interface().(map[uint32]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Int32R(rv reflect.Value) { + fastpathTV.EncMapUint32Int32V(rv.Interface().(map[uint32]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Int64R(rv reflect.Value) { + fastpathTV.EncMapUint32Int64V(rv.Interface().(map[uint32]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Float32R(rv reflect.Value) { + fastpathTV.EncMapUint32Float32V(rv.Interface().(map[uint32]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32Float64R(rv reflect.Value) { + fastpathTV.EncMapUint32Float64V(rv.Interface().(map[uint32]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint32BoolR(rv reflect.Value) { + fastpathTV.EncMapUint32BoolV(rv.Interface().(map[uint32]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uint32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64IntfR(rv reflect.Value) { + fastpathTV.EncMapUint64IntfV(rv.Interface().(map[uint64]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64StringR(rv reflect.Value) { + fastpathTV.EncMapUint64StringV(rv.Interface().(map[uint64]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64UintR(rv reflect.Value) { + fastpathTV.EncMapUint64UintV(rv.Interface().(map[uint64]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Uint8R(rv reflect.Value) { + fastpathTV.EncMapUint64Uint8V(rv.Interface().(map[uint64]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Uint16R(rv reflect.Value) { + fastpathTV.EncMapUint64Uint16V(rv.Interface().(map[uint64]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Uint32R(rv reflect.Value) { + fastpathTV.EncMapUint64Uint32V(rv.Interface().(map[uint64]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Uint64R(rv reflect.Value) { + fastpathTV.EncMapUint64Uint64V(rv.Interface().(map[uint64]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64UintptrR(rv reflect.Value) { + fastpathTV.EncMapUint64UintptrV(rv.Interface().(map[uint64]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64IntR(rv reflect.Value) { + fastpathTV.EncMapUint64IntV(rv.Interface().(map[uint64]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Int8R(rv reflect.Value) { + fastpathTV.EncMapUint64Int8V(rv.Interface().(map[uint64]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Int16R(rv reflect.Value) { + fastpathTV.EncMapUint64Int16V(rv.Interface().(map[uint64]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Int32R(rv reflect.Value) { + fastpathTV.EncMapUint64Int32V(rv.Interface().(map[uint64]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Int64R(rv reflect.Value) { + fastpathTV.EncMapUint64Int64V(rv.Interface().(map[uint64]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uint64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Float32R(rv reflect.Value) { + fastpathTV.EncMapUint64Float32V(rv.Interface().(map[uint64]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64Float64R(rv reflect.Value) { + fastpathTV.EncMapUint64Float64V(rv.Interface().(map[uint64]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUint64BoolR(rv reflect.Value) { + fastpathTV.EncMapUint64BoolV(rv.Interface().(map[uint64]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(uint64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uint64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeUint(uint64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrIntfR(rv reflect.Value) { + fastpathTV.EncMapUintptrIntfV(rv.Interface().(map[uintptr]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrStringR(rv reflect.Value) { + fastpathTV.EncMapUintptrStringV(rv.Interface().(map[uintptr]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrStringV(v map[uintptr]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrUintR(rv reflect.Value) { + fastpathTV.EncMapUintptrUintV(rv.Interface().(map[uintptr]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrUintV(v map[uintptr]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrUint8R(rv reflect.Value) { + fastpathTV.EncMapUintptrUint8V(rv.Interface().(map[uintptr]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrUint16R(rv reflect.Value) { + fastpathTV.EncMapUintptrUint16V(rv.Interface().(map[uintptr]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrUint32R(rv reflect.Value) { + fastpathTV.EncMapUintptrUint32V(rv.Interface().(map[uintptr]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrUint64R(rv reflect.Value) { + fastpathTV.EncMapUintptrUint64V(rv.Interface().(map[uintptr]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrUintptrR(rv reflect.Value) { + fastpathTV.EncMapUintptrUintptrV(rv.Interface().(map[uintptr]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrIntR(rv reflect.Value) { + fastpathTV.EncMapUintptrIntV(rv.Interface().(map[uintptr]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrIntV(v map[uintptr]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrInt8R(rv reflect.Value) { + fastpathTV.EncMapUintptrInt8V(rv.Interface().(map[uintptr]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrInt8V(v map[uintptr]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrInt16R(rv reflect.Value) { + fastpathTV.EncMapUintptrInt16V(rv.Interface().(map[uintptr]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrInt16V(v map[uintptr]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrInt32R(rv reflect.Value) { + fastpathTV.EncMapUintptrInt32V(rv.Interface().(map[uintptr]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrInt32V(v map[uintptr]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrInt64R(rv reflect.Value) { + fastpathTV.EncMapUintptrInt64V(rv.Interface().(map[uintptr]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrInt64V(v map[uintptr]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[uintptr(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrFloat32R(rv reflect.Value) { + fastpathTV.EncMapUintptrFloat32V(rv.Interface().(map[uintptr]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrFloat64R(rv reflect.Value) { + fastpathTV.EncMapUintptrFloat64V(rv.Interface().(map[uintptr]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapUintptrBoolR(rv reflect.Value) { + fastpathTV.EncMapUintptrBoolV(rv.Interface().(map[uintptr]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapUintptrBoolV(v map[uintptr]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]uint64, len(v)) + var i int + for k, _ := range v { + v2[i] = uint64(k) + i++ + } + sort.Sort(uintSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(uintptr(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[uintptr(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + e.encode(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntIntfR(rv reflect.Value) { + fastpathTV.EncMapIntIntfV(rv.Interface().(map[int]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntStringR(rv reflect.Value) { + fastpathTV.EncMapIntStringV(rv.Interface().(map[int]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntStringV(v map[int]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntUintR(rv reflect.Value) { + fastpathTV.EncMapIntUintV(rv.Interface().(map[int]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUintV(v map[int]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntUint8R(rv reflect.Value) { + fastpathTV.EncMapIntUint8V(rv.Interface().(map[int]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntUint16R(rv reflect.Value) { + fastpathTV.EncMapIntUint16V(rv.Interface().(map[int]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntUint32R(rv reflect.Value) { + fastpathTV.EncMapIntUint32V(rv.Interface().(map[int]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntUint64R(rv reflect.Value) { + fastpathTV.EncMapIntUint64V(rv.Interface().(map[int]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntUintptrR(rv reflect.Value) { + fastpathTV.EncMapIntUintptrV(rv.Interface().(map[int]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntUintptrV(v map[int]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntIntR(rv reflect.Value) { + fastpathTV.EncMapIntIntV(rv.Interface().(map[int]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntIntV(v map[int]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntInt8R(rv reflect.Value) { + fastpathTV.EncMapIntInt8V(rv.Interface().(map[int]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntInt8V(v map[int]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntInt16R(rv reflect.Value) { + fastpathTV.EncMapIntInt16V(rv.Interface().(map[int]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntInt16V(v map[int]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntInt32R(rv reflect.Value) { + fastpathTV.EncMapIntInt32V(rv.Interface().(map[int]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntInt32V(v map[int]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntInt64R(rv reflect.Value) { + fastpathTV.EncMapIntInt64V(rv.Interface().(map[int]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntInt64V(v map[int]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntFloat32R(rv reflect.Value) { + fastpathTV.EncMapIntFloat32V(rv.Interface().(map[int]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntFloat64R(rv reflect.Value) { + fastpathTV.EncMapIntFloat64V(rv.Interface().(map[int]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapIntBoolR(rv reflect.Value) { + fastpathTV.EncMapIntBoolV(rv.Interface().(map[int]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapIntBoolV(v map[int]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[int(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8IntfR(rv reflect.Value) { + fastpathTV.EncMapInt8IntfV(rv.Interface().(map[int8]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8StringR(rv reflect.Value) { + fastpathTV.EncMapInt8StringV(rv.Interface().(map[int8]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8StringV(v map[int8]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8UintR(rv reflect.Value) { + fastpathTV.EncMapInt8UintV(rv.Interface().(map[int8]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint8V(rv.Interface().(map[int8]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint16V(rv.Interface().(map[int8]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint32V(rv.Interface().(map[int8]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt8Uint64V(rv.Interface().(map[int8]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8UintptrR(rv reflect.Value) { + fastpathTV.EncMapInt8UintptrV(rv.Interface().(map[int8]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8UintptrV(v map[int8]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8IntR(rv reflect.Value) { + fastpathTV.EncMapInt8IntV(rv.Interface().(map[int8]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8IntV(v map[int8]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Int8R(rv reflect.Value) { + fastpathTV.EncMapInt8Int8V(rv.Interface().(map[int8]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Int16R(rv reflect.Value) { + fastpathTV.EncMapInt8Int16V(rv.Interface().(map[int8]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Int32R(rv reflect.Value) { + fastpathTV.EncMapInt8Int32V(rv.Interface().(map[int8]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Int64R(rv reflect.Value) { + fastpathTV.EncMapInt8Int64V(rv.Interface().(map[int8]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int8(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Float32R(rv reflect.Value) { + fastpathTV.EncMapInt8Float32V(rv.Interface().(map[int8]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8Float64R(rv reflect.Value) { + fastpathTV.EncMapInt8Float64V(rv.Interface().(map[int8]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt8BoolR(rv reflect.Value) { + fastpathTV.EncMapInt8BoolV(rv.Interface().(map[int8]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int8(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[int8(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16IntfR(rv reflect.Value) { + fastpathTV.EncMapInt16IntfV(rv.Interface().(map[int16]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16StringR(rv reflect.Value) { + fastpathTV.EncMapInt16StringV(rv.Interface().(map[int16]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16StringV(v map[int16]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16UintR(rv reflect.Value) { + fastpathTV.EncMapInt16UintV(rv.Interface().(map[int16]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint8V(rv.Interface().(map[int16]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint16V(rv.Interface().(map[int16]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint32V(rv.Interface().(map[int16]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt16Uint64V(rv.Interface().(map[int16]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16UintptrR(rv reflect.Value) { + fastpathTV.EncMapInt16UintptrV(rv.Interface().(map[int16]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16UintptrV(v map[int16]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16IntR(rv reflect.Value) { + fastpathTV.EncMapInt16IntV(rv.Interface().(map[int16]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16IntV(v map[int16]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Int8R(rv reflect.Value) { + fastpathTV.EncMapInt16Int8V(rv.Interface().(map[int16]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Int16R(rv reflect.Value) { + fastpathTV.EncMapInt16Int16V(rv.Interface().(map[int16]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Int32R(rv reflect.Value) { + fastpathTV.EncMapInt16Int32V(rv.Interface().(map[int16]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Int64R(rv reflect.Value) { + fastpathTV.EncMapInt16Int64V(rv.Interface().(map[int16]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int16(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Float32R(rv reflect.Value) { + fastpathTV.EncMapInt16Float32V(rv.Interface().(map[int16]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16Float64R(rv reflect.Value) { + fastpathTV.EncMapInt16Float64V(rv.Interface().(map[int16]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt16BoolR(rv reflect.Value) { + fastpathTV.EncMapInt16BoolV(rv.Interface().(map[int16]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int16(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[int16(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32IntfR(rv reflect.Value) { + fastpathTV.EncMapInt32IntfV(rv.Interface().(map[int32]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32StringR(rv reflect.Value) { + fastpathTV.EncMapInt32StringV(rv.Interface().(map[int32]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32StringV(v map[int32]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32UintR(rv reflect.Value) { + fastpathTV.EncMapInt32UintV(rv.Interface().(map[int32]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint8V(rv.Interface().(map[int32]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint16V(rv.Interface().(map[int32]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint32V(rv.Interface().(map[int32]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt32Uint64V(rv.Interface().(map[int32]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32UintptrR(rv reflect.Value) { + fastpathTV.EncMapInt32UintptrV(rv.Interface().(map[int32]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32UintptrV(v map[int32]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32IntR(rv reflect.Value) { + fastpathTV.EncMapInt32IntV(rv.Interface().(map[int32]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32IntV(v map[int32]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Int8R(rv reflect.Value) { + fastpathTV.EncMapInt32Int8V(rv.Interface().(map[int32]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Int16R(rv reflect.Value) { + fastpathTV.EncMapInt32Int16V(rv.Interface().(map[int32]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Int32R(rv reflect.Value) { + fastpathTV.EncMapInt32Int32V(rv.Interface().(map[int32]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Int64R(rv reflect.Value) { + fastpathTV.EncMapInt32Int64V(rv.Interface().(map[int32]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int32(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Float32R(rv reflect.Value) { + fastpathTV.EncMapInt32Float32V(rv.Interface().(map[int32]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32Float64R(rv reflect.Value) { + fastpathTV.EncMapInt32Float64V(rv.Interface().(map[int32]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt32BoolR(rv reflect.Value) { + fastpathTV.EncMapInt32BoolV(rv.Interface().(map[int32]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int32(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[int32(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64IntfR(rv reflect.Value) { + fastpathTV.EncMapInt64IntfV(rv.Interface().(map[int64]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64StringR(rv reflect.Value) { + fastpathTV.EncMapInt64StringV(rv.Interface().(map[int64]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64StringV(v map[int64]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[int64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64UintR(rv reflect.Value) { + fastpathTV.EncMapInt64UintV(rv.Interface().(map[int64]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Uint8R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint8V(rv.Interface().(map[int64]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Uint16R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint16V(rv.Interface().(map[int64]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Uint32R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint32V(rv.Interface().(map[int64]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Uint64R(rv reflect.Value) { + fastpathTV.EncMapInt64Uint64V(rv.Interface().(map[int64]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64UintptrR(rv reflect.Value) { + fastpathTV.EncMapInt64UintptrV(rv.Interface().(map[int64]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64UintptrV(v map[int64]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[int64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64IntR(rv reflect.Value) { + fastpathTV.EncMapInt64IntV(rv.Interface().(map[int64]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64IntV(v map[int64]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Int8R(rv reflect.Value) { + fastpathTV.EncMapInt64Int8V(rv.Interface().(map[int64]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Int16R(rv reflect.Value) { + fastpathTV.EncMapInt64Int16V(rv.Interface().(map[int64]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Int32R(rv reflect.Value) { + fastpathTV.EncMapInt64Int32V(rv.Interface().(map[int64]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Int64R(rv reflect.Value) { + fastpathTV.EncMapInt64Int64V(rv.Interface().(map[int64]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[int64(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Float32R(rv reflect.Value) { + fastpathTV.EncMapInt64Float32V(rv.Interface().(map[int64]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[int64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64Float64R(rv reflect.Value) { + fastpathTV.EncMapInt64Float64V(rv.Interface().(map[int64]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[int64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapInt64BoolR(rv reflect.Value) { + fastpathTV.EncMapInt64BoolV(rv.Interface().(map[int64]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]int64, len(v)) + var i int + for k, _ := range v { + v2[i] = int64(k) + i++ + } + sort.Sort(intSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(int64(k2))) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[int64(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeInt(int64(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolIntfR(rv reflect.Value) { + fastpathTV.EncMapBoolIntfV(rv.Interface().(map[bool]interface{}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolStringR(rv reflect.Value) { + fastpathTV.EncMapBoolStringV(rv.Interface().(map[bool]string), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolStringV(v map[bool]string, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeString(c_UTF8, v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolUintR(rv reflect.Value) { + fastpathTV.EncMapBoolUintV(rv.Interface().(map[bool]uint), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolUint8R(rv reflect.Value) { + fastpathTV.EncMapBoolUint8V(rv.Interface().(map[bool]uint8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolUint16R(rv reflect.Value) { + fastpathTV.EncMapBoolUint16V(rv.Interface().(map[bool]uint16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolUint32R(rv reflect.Value) { + fastpathTV.EncMapBoolUint32V(rv.Interface().(map[bool]uint32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolUint64R(rv reflect.Value) { + fastpathTV.EncMapBoolUint64V(rv.Interface().(map[bool]uint64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeUint(uint64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolUintptrR(rv reflect.Value) { + fastpathTV.EncMapBoolUintptrV(rv.Interface().(map[bool]uintptr), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolUintptrV(v map[bool]uintptr, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + e.encode(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolIntR(rv reflect.Value) { + fastpathTV.EncMapBoolIntV(rv.Interface().(map[bool]int), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolIntV(v map[bool]int, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolInt8R(rv reflect.Value) { + fastpathTV.EncMapBoolInt8V(rv.Interface().(map[bool]int8), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolInt16R(rv reflect.Value) { + fastpathTV.EncMapBoolInt16V(rv.Interface().(map[bool]int16), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolInt32R(rv reflect.Value) { + fastpathTV.EncMapBoolInt32V(rv.Interface().(map[bool]int32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolInt64R(rv reflect.Value) { + fastpathTV.EncMapBoolInt64V(rv.Interface().(map[bool]int64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v[bool(k2)])) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeInt(int64(v2)) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolFloat32R(rv reflect.Value) { + fastpathTV.EncMapBoolFloat32V(rv.Interface().(map[bool]float32), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat32(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolFloat64R(rv reflect.Value) { + fastpathTV.EncMapBoolFloat64V(rv.Interface().(map[bool]float64), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeFloat64(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +func (f *encFnInfo) fastpathEncMapBoolBoolR(rv reflect.Value) { + fastpathTV.EncMapBoolBoolV(rv.Interface().(map[bool]bool), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + if e.h.Canonical { + v2 := make([]bool, len(v)) + var i int + for k, _ := range v { + v2[i] = bool(k) + i++ + } + sort.Sort(boolSlice(v2)) + for _, k2 := range v2 { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(bool(k2)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v[bool(k2)]) + } + } else { + for k2, v2 := range v { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + ee.EncodeBool(k2) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + ee.EncodeBool(v2) + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } +} + +// -- decode + +// -- -- fast path type switch +func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { + + case []interface{}: + fastpathTV.DecSliceIntfV(v, fastpathCheckNilFalse, false, d) + case *[]interface{}: + v2, changed2 := fastpathTV.DecSliceIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]interface{}: + fastpathTV.DecMapIntfIntfV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]interface{}: + v2, changed2 := fastpathTV.DecMapIntfIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]string: + fastpathTV.DecMapIntfStringV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]string: + v2, changed2 := fastpathTV.DecMapIntfStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uint: + fastpathTV.DecMapIntfUintV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint: + v2, changed2 := fastpathTV.DecMapIntfUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uint8: + fastpathTV.DecMapIntfUint8V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint8: + v2, changed2 := fastpathTV.DecMapIntfUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uint16: + fastpathTV.DecMapIntfUint16V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint16: + v2, changed2 := fastpathTV.DecMapIntfUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uint32: + fastpathTV.DecMapIntfUint32V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint32: + v2, changed2 := fastpathTV.DecMapIntfUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uint64: + fastpathTV.DecMapIntfUint64V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uint64: + v2, changed2 := fastpathTV.DecMapIntfUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]uintptr: + fastpathTV.DecMapIntfUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]uintptr: + v2, changed2 := fastpathTV.DecMapIntfUintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]int: + fastpathTV.DecMapIntfIntV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int: + v2, changed2 := fastpathTV.DecMapIntfIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]int8: + fastpathTV.DecMapIntfInt8V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int8: + v2, changed2 := fastpathTV.DecMapIntfInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]int16: + fastpathTV.DecMapIntfInt16V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int16: + v2, changed2 := fastpathTV.DecMapIntfInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]int32: + fastpathTV.DecMapIntfInt32V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int32: + v2, changed2 := fastpathTV.DecMapIntfInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]int64: + fastpathTV.DecMapIntfInt64V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]int64: + v2, changed2 := fastpathTV.DecMapIntfInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]float32: + fastpathTV.DecMapIntfFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]float32: + v2, changed2 := fastpathTV.DecMapIntfFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]float64: + fastpathTV.DecMapIntfFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]float64: + v2, changed2 := fastpathTV.DecMapIntfFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[interface{}]bool: + fastpathTV.DecMapIntfBoolV(v, fastpathCheckNilFalse, false, d) + case *map[interface{}]bool: + v2, changed2 := fastpathTV.DecMapIntfBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []string: + fastpathTV.DecSliceStringV(v, fastpathCheckNilFalse, false, d) + case *[]string: + v2, changed2 := fastpathTV.DecSliceStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]interface{}: + fastpathTV.DecMapStringIntfV(v, fastpathCheckNilFalse, false, d) + case *map[string]interface{}: + v2, changed2 := fastpathTV.DecMapStringIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]string: + fastpathTV.DecMapStringStringV(v, fastpathCheckNilFalse, false, d) + case *map[string]string: + v2, changed2 := fastpathTV.DecMapStringStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uint: + fastpathTV.DecMapStringUintV(v, fastpathCheckNilFalse, false, d) + case *map[string]uint: + v2, changed2 := fastpathTV.DecMapStringUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uint8: + fastpathTV.DecMapStringUint8V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint8: + v2, changed2 := fastpathTV.DecMapStringUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uint16: + fastpathTV.DecMapStringUint16V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint16: + v2, changed2 := fastpathTV.DecMapStringUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uint32: + fastpathTV.DecMapStringUint32V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint32: + v2, changed2 := fastpathTV.DecMapStringUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uint64: + fastpathTV.DecMapStringUint64V(v, fastpathCheckNilFalse, false, d) + case *map[string]uint64: + v2, changed2 := fastpathTV.DecMapStringUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]uintptr: + fastpathTV.DecMapStringUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[string]uintptr: + v2, changed2 := fastpathTV.DecMapStringUintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]int: + fastpathTV.DecMapStringIntV(v, fastpathCheckNilFalse, false, d) + case *map[string]int: + v2, changed2 := fastpathTV.DecMapStringIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]int8: + fastpathTV.DecMapStringInt8V(v, fastpathCheckNilFalse, false, d) + case *map[string]int8: + v2, changed2 := fastpathTV.DecMapStringInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]int16: + fastpathTV.DecMapStringInt16V(v, fastpathCheckNilFalse, false, d) + case *map[string]int16: + v2, changed2 := fastpathTV.DecMapStringInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]int32: + fastpathTV.DecMapStringInt32V(v, fastpathCheckNilFalse, false, d) + case *map[string]int32: + v2, changed2 := fastpathTV.DecMapStringInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]int64: + fastpathTV.DecMapStringInt64V(v, fastpathCheckNilFalse, false, d) + case *map[string]int64: + v2, changed2 := fastpathTV.DecMapStringInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]float32: + fastpathTV.DecMapStringFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[string]float32: + v2, changed2 := fastpathTV.DecMapStringFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]float64: + fastpathTV.DecMapStringFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[string]float64: + v2, changed2 := fastpathTV.DecMapStringFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[string]bool: + fastpathTV.DecMapStringBoolV(v, fastpathCheckNilFalse, false, d) + case *map[string]bool: + v2, changed2 := fastpathTV.DecMapStringBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []float32: + fastpathTV.DecSliceFloat32V(v, fastpathCheckNilFalse, false, d) + case *[]float32: + v2, changed2 := fastpathTV.DecSliceFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]interface{}: + fastpathTV.DecMapFloat32IntfV(v, fastpathCheckNilFalse, false, d) + case *map[float32]interface{}: + v2, changed2 := fastpathTV.DecMapFloat32IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]string: + fastpathTV.DecMapFloat32StringV(v, fastpathCheckNilFalse, false, d) + case *map[float32]string: + v2, changed2 := fastpathTV.DecMapFloat32StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uint: + fastpathTV.DecMapFloat32UintV(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint: + v2, changed2 := fastpathTV.DecMapFloat32UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uint8: + fastpathTV.DecMapFloat32Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint8: + v2, changed2 := fastpathTV.DecMapFloat32Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uint16: + fastpathTV.DecMapFloat32Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint16: + v2, changed2 := fastpathTV.DecMapFloat32Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uint32: + fastpathTV.DecMapFloat32Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint32: + v2, changed2 := fastpathTV.DecMapFloat32Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uint64: + fastpathTV.DecMapFloat32Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[float32]uint64: + v2, changed2 := fastpathTV.DecMapFloat32Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]uintptr: + fastpathTV.DecMapFloat32UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[float32]uintptr: + v2, changed2 := fastpathTV.DecMapFloat32UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]int: + fastpathTV.DecMapFloat32IntV(v, fastpathCheckNilFalse, false, d) + case *map[float32]int: + v2, changed2 := fastpathTV.DecMapFloat32IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]int8: + fastpathTV.DecMapFloat32Int8V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int8: + v2, changed2 := fastpathTV.DecMapFloat32Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]int16: + fastpathTV.DecMapFloat32Int16V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int16: + v2, changed2 := fastpathTV.DecMapFloat32Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]int32: + fastpathTV.DecMapFloat32Int32V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int32: + v2, changed2 := fastpathTV.DecMapFloat32Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]int64: + fastpathTV.DecMapFloat32Int64V(v, fastpathCheckNilFalse, false, d) + case *map[float32]int64: + v2, changed2 := fastpathTV.DecMapFloat32Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]float32: + fastpathTV.DecMapFloat32Float32V(v, fastpathCheckNilFalse, false, d) + case *map[float32]float32: + v2, changed2 := fastpathTV.DecMapFloat32Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]float64: + fastpathTV.DecMapFloat32Float64V(v, fastpathCheckNilFalse, false, d) + case *map[float32]float64: + v2, changed2 := fastpathTV.DecMapFloat32Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float32]bool: + fastpathTV.DecMapFloat32BoolV(v, fastpathCheckNilFalse, false, d) + case *map[float32]bool: + v2, changed2 := fastpathTV.DecMapFloat32BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []float64: + fastpathTV.DecSliceFloat64V(v, fastpathCheckNilFalse, false, d) + case *[]float64: + v2, changed2 := fastpathTV.DecSliceFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]interface{}: + fastpathTV.DecMapFloat64IntfV(v, fastpathCheckNilFalse, false, d) + case *map[float64]interface{}: + v2, changed2 := fastpathTV.DecMapFloat64IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]string: + fastpathTV.DecMapFloat64StringV(v, fastpathCheckNilFalse, false, d) + case *map[float64]string: + v2, changed2 := fastpathTV.DecMapFloat64StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uint: + fastpathTV.DecMapFloat64UintV(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint: + v2, changed2 := fastpathTV.DecMapFloat64UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uint8: + fastpathTV.DecMapFloat64Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint8: + v2, changed2 := fastpathTV.DecMapFloat64Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uint16: + fastpathTV.DecMapFloat64Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint16: + v2, changed2 := fastpathTV.DecMapFloat64Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uint32: + fastpathTV.DecMapFloat64Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint32: + v2, changed2 := fastpathTV.DecMapFloat64Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uint64: + fastpathTV.DecMapFloat64Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[float64]uint64: + v2, changed2 := fastpathTV.DecMapFloat64Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]uintptr: + fastpathTV.DecMapFloat64UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[float64]uintptr: + v2, changed2 := fastpathTV.DecMapFloat64UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]int: + fastpathTV.DecMapFloat64IntV(v, fastpathCheckNilFalse, false, d) + case *map[float64]int: + v2, changed2 := fastpathTV.DecMapFloat64IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]int8: + fastpathTV.DecMapFloat64Int8V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int8: + v2, changed2 := fastpathTV.DecMapFloat64Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]int16: + fastpathTV.DecMapFloat64Int16V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int16: + v2, changed2 := fastpathTV.DecMapFloat64Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]int32: + fastpathTV.DecMapFloat64Int32V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int32: + v2, changed2 := fastpathTV.DecMapFloat64Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]int64: + fastpathTV.DecMapFloat64Int64V(v, fastpathCheckNilFalse, false, d) + case *map[float64]int64: + v2, changed2 := fastpathTV.DecMapFloat64Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]float32: + fastpathTV.DecMapFloat64Float32V(v, fastpathCheckNilFalse, false, d) + case *map[float64]float32: + v2, changed2 := fastpathTV.DecMapFloat64Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]float64: + fastpathTV.DecMapFloat64Float64V(v, fastpathCheckNilFalse, false, d) + case *map[float64]float64: + v2, changed2 := fastpathTV.DecMapFloat64Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[float64]bool: + fastpathTV.DecMapFloat64BoolV(v, fastpathCheckNilFalse, false, d) + case *map[float64]bool: + v2, changed2 := fastpathTV.DecMapFloat64BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []uint: + fastpathTV.DecSliceUintV(v, fastpathCheckNilFalse, false, d) + case *[]uint: + v2, changed2 := fastpathTV.DecSliceUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]interface{}: + fastpathTV.DecMapUintIntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint]interface{}: + v2, changed2 := fastpathTV.DecMapUintIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]string: + fastpathTV.DecMapUintStringV(v, fastpathCheckNilFalse, false, d) + case *map[uint]string: + v2, changed2 := fastpathTV.DecMapUintStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uint: + fastpathTV.DecMapUintUintV(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint: + v2, changed2 := fastpathTV.DecMapUintUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uint8: + fastpathTV.DecMapUintUint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint8: + v2, changed2 := fastpathTV.DecMapUintUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uint16: + fastpathTV.DecMapUintUint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint16: + v2, changed2 := fastpathTV.DecMapUintUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uint32: + fastpathTV.DecMapUintUint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint32: + v2, changed2 := fastpathTV.DecMapUintUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uint64: + fastpathTV.DecMapUintUint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint]uint64: + v2, changed2 := fastpathTV.DecMapUintUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]uintptr: + fastpathTV.DecMapUintUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uint]uintptr: + v2, changed2 := fastpathTV.DecMapUintUintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]int: + fastpathTV.DecMapUintIntV(v, fastpathCheckNilFalse, false, d) + case *map[uint]int: + v2, changed2 := fastpathTV.DecMapUintIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]int8: + fastpathTV.DecMapUintInt8V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int8: + v2, changed2 := fastpathTV.DecMapUintInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]int16: + fastpathTV.DecMapUintInt16V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int16: + v2, changed2 := fastpathTV.DecMapUintInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]int32: + fastpathTV.DecMapUintInt32V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int32: + v2, changed2 := fastpathTV.DecMapUintInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]int64: + fastpathTV.DecMapUintInt64V(v, fastpathCheckNilFalse, false, d) + case *map[uint]int64: + v2, changed2 := fastpathTV.DecMapUintInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]float32: + fastpathTV.DecMapUintFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[uint]float32: + v2, changed2 := fastpathTV.DecMapUintFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]float64: + fastpathTV.DecMapUintFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[uint]float64: + v2, changed2 := fastpathTV.DecMapUintFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint]bool: + fastpathTV.DecMapUintBoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint]bool: + v2, changed2 := fastpathTV.DecMapUintBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]interface{}: + fastpathTV.DecMapUint8IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]interface{}: + v2, changed2 := fastpathTV.DecMapUint8IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]string: + fastpathTV.DecMapUint8StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]string: + v2, changed2 := fastpathTV.DecMapUint8StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uint: + fastpathTV.DecMapUint8UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint: + v2, changed2 := fastpathTV.DecMapUint8UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uint8: + fastpathTV.DecMapUint8Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint8: + v2, changed2 := fastpathTV.DecMapUint8Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uint16: + fastpathTV.DecMapUint8Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint16: + v2, changed2 := fastpathTV.DecMapUint8Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uint32: + fastpathTV.DecMapUint8Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint32: + v2, changed2 := fastpathTV.DecMapUint8Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uint64: + fastpathTV.DecMapUint8Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uint64: + v2, changed2 := fastpathTV.DecMapUint8Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]uintptr: + fastpathTV.DecMapUint8UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]uintptr: + v2, changed2 := fastpathTV.DecMapUint8UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]int: + fastpathTV.DecMapUint8IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int: + v2, changed2 := fastpathTV.DecMapUint8IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]int8: + fastpathTV.DecMapUint8Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int8: + v2, changed2 := fastpathTV.DecMapUint8Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]int16: + fastpathTV.DecMapUint8Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int16: + v2, changed2 := fastpathTV.DecMapUint8Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]int32: + fastpathTV.DecMapUint8Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int32: + v2, changed2 := fastpathTV.DecMapUint8Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]int64: + fastpathTV.DecMapUint8Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]int64: + v2, changed2 := fastpathTV.DecMapUint8Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]float32: + fastpathTV.DecMapUint8Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]float32: + v2, changed2 := fastpathTV.DecMapUint8Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]float64: + fastpathTV.DecMapUint8Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint8]float64: + v2, changed2 := fastpathTV.DecMapUint8Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint8]bool: + fastpathTV.DecMapUint8BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint8]bool: + v2, changed2 := fastpathTV.DecMapUint8BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []uint16: + fastpathTV.DecSliceUint16V(v, fastpathCheckNilFalse, false, d) + case *[]uint16: + v2, changed2 := fastpathTV.DecSliceUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]interface{}: + fastpathTV.DecMapUint16IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]interface{}: + v2, changed2 := fastpathTV.DecMapUint16IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]string: + fastpathTV.DecMapUint16StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]string: + v2, changed2 := fastpathTV.DecMapUint16StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uint: + fastpathTV.DecMapUint16UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint: + v2, changed2 := fastpathTV.DecMapUint16UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uint8: + fastpathTV.DecMapUint16Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint8: + v2, changed2 := fastpathTV.DecMapUint16Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uint16: + fastpathTV.DecMapUint16Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint16: + v2, changed2 := fastpathTV.DecMapUint16Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uint32: + fastpathTV.DecMapUint16Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint32: + v2, changed2 := fastpathTV.DecMapUint16Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uint64: + fastpathTV.DecMapUint16Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uint64: + v2, changed2 := fastpathTV.DecMapUint16Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]uintptr: + fastpathTV.DecMapUint16UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]uintptr: + v2, changed2 := fastpathTV.DecMapUint16UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]int: + fastpathTV.DecMapUint16IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int: + v2, changed2 := fastpathTV.DecMapUint16IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]int8: + fastpathTV.DecMapUint16Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int8: + v2, changed2 := fastpathTV.DecMapUint16Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]int16: + fastpathTV.DecMapUint16Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int16: + v2, changed2 := fastpathTV.DecMapUint16Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]int32: + fastpathTV.DecMapUint16Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int32: + v2, changed2 := fastpathTV.DecMapUint16Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]int64: + fastpathTV.DecMapUint16Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]int64: + v2, changed2 := fastpathTV.DecMapUint16Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]float32: + fastpathTV.DecMapUint16Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]float32: + v2, changed2 := fastpathTV.DecMapUint16Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]float64: + fastpathTV.DecMapUint16Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint16]float64: + v2, changed2 := fastpathTV.DecMapUint16Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint16]bool: + fastpathTV.DecMapUint16BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint16]bool: + v2, changed2 := fastpathTV.DecMapUint16BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []uint32: + fastpathTV.DecSliceUint32V(v, fastpathCheckNilFalse, false, d) + case *[]uint32: + v2, changed2 := fastpathTV.DecSliceUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]interface{}: + fastpathTV.DecMapUint32IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]interface{}: + v2, changed2 := fastpathTV.DecMapUint32IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]string: + fastpathTV.DecMapUint32StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]string: + v2, changed2 := fastpathTV.DecMapUint32StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uint: + fastpathTV.DecMapUint32UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint: + v2, changed2 := fastpathTV.DecMapUint32UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uint8: + fastpathTV.DecMapUint32Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint8: + v2, changed2 := fastpathTV.DecMapUint32Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uint16: + fastpathTV.DecMapUint32Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint16: + v2, changed2 := fastpathTV.DecMapUint32Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uint32: + fastpathTV.DecMapUint32Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint32: + v2, changed2 := fastpathTV.DecMapUint32Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uint64: + fastpathTV.DecMapUint32Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uint64: + v2, changed2 := fastpathTV.DecMapUint32Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]uintptr: + fastpathTV.DecMapUint32UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]uintptr: + v2, changed2 := fastpathTV.DecMapUint32UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]int: + fastpathTV.DecMapUint32IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int: + v2, changed2 := fastpathTV.DecMapUint32IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]int8: + fastpathTV.DecMapUint32Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int8: + v2, changed2 := fastpathTV.DecMapUint32Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]int16: + fastpathTV.DecMapUint32Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int16: + v2, changed2 := fastpathTV.DecMapUint32Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]int32: + fastpathTV.DecMapUint32Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int32: + v2, changed2 := fastpathTV.DecMapUint32Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]int64: + fastpathTV.DecMapUint32Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]int64: + v2, changed2 := fastpathTV.DecMapUint32Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]float32: + fastpathTV.DecMapUint32Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]float32: + v2, changed2 := fastpathTV.DecMapUint32Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]float64: + fastpathTV.DecMapUint32Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint32]float64: + v2, changed2 := fastpathTV.DecMapUint32Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint32]bool: + fastpathTV.DecMapUint32BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint32]bool: + v2, changed2 := fastpathTV.DecMapUint32BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []uint64: + fastpathTV.DecSliceUint64V(v, fastpathCheckNilFalse, false, d) + case *[]uint64: + v2, changed2 := fastpathTV.DecSliceUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]interface{}: + fastpathTV.DecMapUint64IntfV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]interface{}: + v2, changed2 := fastpathTV.DecMapUint64IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]string: + fastpathTV.DecMapUint64StringV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]string: + v2, changed2 := fastpathTV.DecMapUint64StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uint: + fastpathTV.DecMapUint64UintV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint: + v2, changed2 := fastpathTV.DecMapUint64UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uint8: + fastpathTV.DecMapUint64Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint8: + v2, changed2 := fastpathTV.DecMapUint64Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uint16: + fastpathTV.DecMapUint64Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint16: + v2, changed2 := fastpathTV.DecMapUint64Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uint32: + fastpathTV.DecMapUint64Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint32: + v2, changed2 := fastpathTV.DecMapUint64Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uint64: + fastpathTV.DecMapUint64Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uint64: + v2, changed2 := fastpathTV.DecMapUint64Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]uintptr: + fastpathTV.DecMapUint64UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]uintptr: + v2, changed2 := fastpathTV.DecMapUint64UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]int: + fastpathTV.DecMapUint64IntV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int: + v2, changed2 := fastpathTV.DecMapUint64IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]int8: + fastpathTV.DecMapUint64Int8V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int8: + v2, changed2 := fastpathTV.DecMapUint64Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]int16: + fastpathTV.DecMapUint64Int16V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int16: + v2, changed2 := fastpathTV.DecMapUint64Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]int32: + fastpathTV.DecMapUint64Int32V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int32: + v2, changed2 := fastpathTV.DecMapUint64Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]int64: + fastpathTV.DecMapUint64Int64V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]int64: + v2, changed2 := fastpathTV.DecMapUint64Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]float32: + fastpathTV.DecMapUint64Float32V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]float32: + v2, changed2 := fastpathTV.DecMapUint64Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]float64: + fastpathTV.DecMapUint64Float64V(v, fastpathCheckNilFalse, false, d) + case *map[uint64]float64: + v2, changed2 := fastpathTV.DecMapUint64Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uint64]bool: + fastpathTV.DecMapUint64BoolV(v, fastpathCheckNilFalse, false, d) + case *map[uint64]bool: + v2, changed2 := fastpathTV.DecMapUint64BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []uintptr: + fastpathTV.DecSliceUintptrV(v, fastpathCheckNilFalse, false, d) + case *[]uintptr: + v2, changed2 := fastpathTV.DecSliceUintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]interface{}: + fastpathTV.DecMapUintptrIntfV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]interface{}: + v2, changed2 := fastpathTV.DecMapUintptrIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]string: + fastpathTV.DecMapUintptrStringV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]string: + v2, changed2 := fastpathTV.DecMapUintptrStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]uint: + fastpathTV.DecMapUintptrUintV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uint: + v2, changed2 := fastpathTV.DecMapUintptrUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]uint8: + fastpathTV.DecMapUintptrUint8V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uint8: + v2, changed2 := fastpathTV.DecMapUintptrUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]uint16: + fastpathTV.DecMapUintptrUint16V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uint16: + v2, changed2 := fastpathTV.DecMapUintptrUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]uint32: + fastpathTV.DecMapUintptrUint32V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uint32: + v2, changed2 := fastpathTV.DecMapUintptrUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]uint64: + fastpathTV.DecMapUintptrUint64V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uint64: + v2, changed2 := fastpathTV.DecMapUintptrUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]uintptr: + fastpathTV.DecMapUintptrUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]uintptr: + v2, changed2 := fastpathTV.DecMapUintptrUintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]int: + fastpathTV.DecMapUintptrIntV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]int: + v2, changed2 := fastpathTV.DecMapUintptrIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]int8: + fastpathTV.DecMapUintptrInt8V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]int8: + v2, changed2 := fastpathTV.DecMapUintptrInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]int16: + fastpathTV.DecMapUintptrInt16V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]int16: + v2, changed2 := fastpathTV.DecMapUintptrInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]int32: + fastpathTV.DecMapUintptrInt32V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]int32: + v2, changed2 := fastpathTV.DecMapUintptrInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]int64: + fastpathTV.DecMapUintptrInt64V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]int64: + v2, changed2 := fastpathTV.DecMapUintptrInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]float32: + fastpathTV.DecMapUintptrFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]float32: + v2, changed2 := fastpathTV.DecMapUintptrFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]float64: + fastpathTV.DecMapUintptrFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]float64: + v2, changed2 := fastpathTV.DecMapUintptrFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[uintptr]bool: + fastpathTV.DecMapUintptrBoolV(v, fastpathCheckNilFalse, false, d) + case *map[uintptr]bool: + v2, changed2 := fastpathTV.DecMapUintptrBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int: + fastpathTV.DecSliceIntV(v, fastpathCheckNilFalse, false, d) + case *[]int: + v2, changed2 := fastpathTV.DecSliceIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]interface{}: + fastpathTV.DecMapIntIntfV(v, fastpathCheckNilFalse, false, d) + case *map[int]interface{}: + v2, changed2 := fastpathTV.DecMapIntIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]string: + fastpathTV.DecMapIntStringV(v, fastpathCheckNilFalse, false, d) + case *map[int]string: + v2, changed2 := fastpathTV.DecMapIntStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uint: + fastpathTV.DecMapIntUintV(v, fastpathCheckNilFalse, false, d) + case *map[int]uint: + v2, changed2 := fastpathTV.DecMapIntUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uint8: + fastpathTV.DecMapIntUint8V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint8: + v2, changed2 := fastpathTV.DecMapIntUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uint16: + fastpathTV.DecMapIntUint16V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint16: + v2, changed2 := fastpathTV.DecMapIntUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uint32: + fastpathTV.DecMapIntUint32V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint32: + v2, changed2 := fastpathTV.DecMapIntUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uint64: + fastpathTV.DecMapIntUint64V(v, fastpathCheckNilFalse, false, d) + case *map[int]uint64: + v2, changed2 := fastpathTV.DecMapIntUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]uintptr: + fastpathTV.DecMapIntUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[int]uintptr: + v2, changed2 := fastpathTV.DecMapIntUintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]int: + fastpathTV.DecMapIntIntV(v, fastpathCheckNilFalse, false, d) + case *map[int]int: + v2, changed2 := fastpathTV.DecMapIntIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]int8: + fastpathTV.DecMapIntInt8V(v, fastpathCheckNilFalse, false, d) + case *map[int]int8: + v2, changed2 := fastpathTV.DecMapIntInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]int16: + fastpathTV.DecMapIntInt16V(v, fastpathCheckNilFalse, false, d) + case *map[int]int16: + v2, changed2 := fastpathTV.DecMapIntInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]int32: + fastpathTV.DecMapIntInt32V(v, fastpathCheckNilFalse, false, d) + case *map[int]int32: + v2, changed2 := fastpathTV.DecMapIntInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]int64: + fastpathTV.DecMapIntInt64V(v, fastpathCheckNilFalse, false, d) + case *map[int]int64: + v2, changed2 := fastpathTV.DecMapIntInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]float32: + fastpathTV.DecMapIntFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[int]float32: + v2, changed2 := fastpathTV.DecMapIntFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]float64: + fastpathTV.DecMapIntFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[int]float64: + v2, changed2 := fastpathTV.DecMapIntFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int]bool: + fastpathTV.DecMapIntBoolV(v, fastpathCheckNilFalse, false, d) + case *map[int]bool: + v2, changed2 := fastpathTV.DecMapIntBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int8: + fastpathTV.DecSliceInt8V(v, fastpathCheckNilFalse, false, d) + case *[]int8: + v2, changed2 := fastpathTV.DecSliceInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]interface{}: + fastpathTV.DecMapInt8IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int8]interface{}: + v2, changed2 := fastpathTV.DecMapInt8IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]string: + fastpathTV.DecMapInt8StringV(v, fastpathCheckNilFalse, false, d) + case *map[int8]string: + v2, changed2 := fastpathTV.DecMapInt8StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint: + fastpathTV.DecMapInt8UintV(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint: + v2, changed2 := fastpathTV.DecMapInt8UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint8: + fastpathTV.DecMapInt8Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint8: + v2, changed2 := fastpathTV.DecMapInt8Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint16: + fastpathTV.DecMapInt8Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint16: + v2, changed2 := fastpathTV.DecMapInt8Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint32: + fastpathTV.DecMapInt8Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint32: + v2, changed2 := fastpathTV.DecMapInt8Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uint64: + fastpathTV.DecMapInt8Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int8]uint64: + v2, changed2 := fastpathTV.DecMapInt8Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]uintptr: + fastpathTV.DecMapInt8UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[int8]uintptr: + v2, changed2 := fastpathTV.DecMapInt8UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int: + fastpathTV.DecMapInt8IntV(v, fastpathCheckNilFalse, false, d) + case *map[int8]int: + v2, changed2 := fastpathTV.DecMapInt8IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int8: + fastpathTV.DecMapInt8Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int8: + v2, changed2 := fastpathTV.DecMapInt8Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int16: + fastpathTV.DecMapInt8Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int16: + v2, changed2 := fastpathTV.DecMapInt8Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int32: + fastpathTV.DecMapInt8Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int32: + v2, changed2 := fastpathTV.DecMapInt8Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]int64: + fastpathTV.DecMapInt8Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int8]int64: + v2, changed2 := fastpathTV.DecMapInt8Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]float32: + fastpathTV.DecMapInt8Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int8]float32: + v2, changed2 := fastpathTV.DecMapInt8Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]float64: + fastpathTV.DecMapInt8Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int8]float64: + v2, changed2 := fastpathTV.DecMapInt8Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int8]bool: + fastpathTV.DecMapInt8BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int8]bool: + v2, changed2 := fastpathTV.DecMapInt8BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int16: + fastpathTV.DecSliceInt16V(v, fastpathCheckNilFalse, false, d) + case *[]int16: + v2, changed2 := fastpathTV.DecSliceInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]interface{}: + fastpathTV.DecMapInt16IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int16]interface{}: + v2, changed2 := fastpathTV.DecMapInt16IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]string: + fastpathTV.DecMapInt16StringV(v, fastpathCheckNilFalse, false, d) + case *map[int16]string: + v2, changed2 := fastpathTV.DecMapInt16StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint: + fastpathTV.DecMapInt16UintV(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint: + v2, changed2 := fastpathTV.DecMapInt16UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint8: + fastpathTV.DecMapInt16Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint8: + v2, changed2 := fastpathTV.DecMapInt16Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint16: + fastpathTV.DecMapInt16Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint16: + v2, changed2 := fastpathTV.DecMapInt16Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint32: + fastpathTV.DecMapInt16Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint32: + v2, changed2 := fastpathTV.DecMapInt16Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uint64: + fastpathTV.DecMapInt16Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int16]uint64: + v2, changed2 := fastpathTV.DecMapInt16Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]uintptr: + fastpathTV.DecMapInt16UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[int16]uintptr: + v2, changed2 := fastpathTV.DecMapInt16UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int: + fastpathTV.DecMapInt16IntV(v, fastpathCheckNilFalse, false, d) + case *map[int16]int: + v2, changed2 := fastpathTV.DecMapInt16IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int8: + fastpathTV.DecMapInt16Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int8: + v2, changed2 := fastpathTV.DecMapInt16Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int16: + fastpathTV.DecMapInt16Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int16: + v2, changed2 := fastpathTV.DecMapInt16Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int32: + fastpathTV.DecMapInt16Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int32: + v2, changed2 := fastpathTV.DecMapInt16Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]int64: + fastpathTV.DecMapInt16Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int16]int64: + v2, changed2 := fastpathTV.DecMapInt16Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]float32: + fastpathTV.DecMapInt16Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int16]float32: + v2, changed2 := fastpathTV.DecMapInt16Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]float64: + fastpathTV.DecMapInt16Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int16]float64: + v2, changed2 := fastpathTV.DecMapInt16Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int16]bool: + fastpathTV.DecMapInt16BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int16]bool: + v2, changed2 := fastpathTV.DecMapInt16BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int32: + fastpathTV.DecSliceInt32V(v, fastpathCheckNilFalse, false, d) + case *[]int32: + v2, changed2 := fastpathTV.DecSliceInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]interface{}: + fastpathTV.DecMapInt32IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int32]interface{}: + v2, changed2 := fastpathTV.DecMapInt32IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]string: + fastpathTV.DecMapInt32StringV(v, fastpathCheckNilFalse, false, d) + case *map[int32]string: + v2, changed2 := fastpathTV.DecMapInt32StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint: + fastpathTV.DecMapInt32UintV(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint: + v2, changed2 := fastpathTV.DecMapInt32UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint8: + fastpathTV.DecMapInt32Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint8: + v2, changed2 := fastpathTV.DecMapInt32Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint16: + fastpathTV.DecMapInt32Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint16: + v2, changed2 := fastpathTV.DecMapInt32Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint32: + fastpathTV.DecMapInt32Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint32: + v2, changed2 := fastpathTV.DecMapInt32Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uint64: + fastpathTV.DecMapInt32Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int32]uint64: + v2, changed2 := fastpathTV.DecMapInt32Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]uintptr: + fastpathTV.DecMapInt32UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[int32]uintptr: + v2, changed2 := fastpathTV.DecMapInt32UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int: + fastpathTV.DecMapInt32IntV(v, fastpathCheckNilFalse, false, d) + case *map[int32]int: + v2, changed2 := fastpathTV.DecMapInt32IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int8: + fastpathTV.DecMapInt32Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int8: + v2, changed2 := fastpathTV.DecMapInt32Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int16: + fastpathTV.DecMapInt32Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int16: + v2, changed2 := fastpathTV.DecMapInt32Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int32: + fastpathTV.DecMapInt32Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int32: + v2, changed2 := fastpathTV.DecMapInt32Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]int64: + fastpathTV.DecMapInt32Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int32]int64: + v2, changed2 := fastpathTV.DecMapInt32Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]float32: + fastpathTV.DecMapInt32Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int32]float32: + v2, changed2 := fastpathTV.DecMapInt32Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]float64: + fastpathTV.DecMapInt32Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int32]float64: + v2, changed2 := fastpathTV.DecMapInt32Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int32]bool: + fastpathTV.DecMapInt32BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int32]bool: + v2, changed2 := fastpathTV.DecMapInt32BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []int64: + fastpathTV.DecSliceInt64V(v, fastpathCheckNilFalse, false, d) + case *[]int64: + v2, changed2 := fastpathTV.DecSliceInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]interface{}: + fastpathTV.DecMapInt64IntfV(v, fastpathCheckNilFalse, false, d) + case *map[int64]interface{}: + v2, changed2 := fastpathTV.DecMapInt64IntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]string: + fastpathTV.DecMapInt64StringV(v, fastpathCheckNilFalse, false, d) + case *map[int64]string: + v2, changed2 := fastpathTV.DecMapInt64StringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint: + fastpathTV.DecMapInt64UintV(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint: + v2, changed2 := fastpathTV.DecMapInt64UintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint8: + fastpathTV.DecMapInt64Uint8V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint8: + v2, changed2 := fastpathTV.DecMapInt64Uint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint16: + fastpathTV.DecMapInt64Uint16V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint16: + v2, changed2 := fastpathTV.DecMapInt64Uint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint32: + fastpathTV.DecMapInt64Uint32V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint32: + v2, changed2 := fastpathTV.DecMapInt64Uint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uint64: + fastpathTV.DecMapInt64Uint64V(v, fastpathCheckNilFalse, false, d) + case *map[int64]uint64: + v2, changed2 := fastpathTV.DecMapInt64Uint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]uintptr: + fastpathTV.DecMapInt64UintptrV(v, fastpathCheckNilFalse, false, d) + case *map[int64]uintptr: + v2, changed2 := fastpathTV.DecMapInt64UintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int: + fastpathTV.DecMapInt64IntV(v, fastpathCheckNilFalse, false, d) + case *map[int64]int: + v2, changed2 := fastpathTV.DecMapInt64IntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int8: + fastpathTV.DecMapInt64Int8V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int8: + v2, changed2 := fastpathTV.DecMapInt64Int8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int16: + fastpathTV.DecMapInt64Int16V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int16: + v2, changed2 := fastpathTV.DecMapInt64Int16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int32: + fastpathTV.DecMapInt64Int32V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int32: + v2, changed2 := fastpathTV.DecMapInt64Int32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]int64: + fastpathTV.DecMapInt64Int64V(v, fastpathCheckNilFalse, false, d) + case *map[int64]int64: + v2, changed2 := fastpathTV.DecMapInt64Int64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]float32: + fastpathTV.DecMapInt64Float32V(v, fastpathCheckNilFalse, false, d) + case *map[int64]float32: + v2, changed2 := fastpathTV.DecMapInt64Float32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]float64: + fastpathTV.DecMapInt64Float64V(v, fastpathCheckNilFalse, false, d) + case *map[int64]float64: + v2, changed2 := fastpathTV.DecMapInt64Float64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[int64]bool: + fastpathTV.DecMapInt64BoolV(v, fastpathCheckNilFalse, false, d) + case *map[int64]bool: + v2, changed2 := fastpathTV.DecMapInt64BoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case []bool: + fastpathTV.DecSliceBoolV(v, fastpathCheckNilFalse, false, d) + case *[]bool: + v2, changed2 := fastpathTV.DecSliceBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]interface{}: + fastpathTV.DecMapBoolIntfV(v, fastpathCheckNilFalse, false, d) + case *map[bool]interface{}: + v2, changed2 := fastpathTV.DecMapBoolIntfV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]string: + fastpathTV.DecMapBoolStringV(v, fastpathCheckNilFalse, false, d) + case *map[bool]string: + v2, changed2 := fastpathTV.DecMapBoolStringV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint: + fastpathTV.DecMapBoolUintV(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint: + v2, changed2 := fastpathTV.DecMapBoolUintV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint8: + fastpathTV.DecMapBoolUint8V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint8: + v2, changed2 := fastpathTV.DecMapBoolUint8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint16: + fastpathTV.DecMapBoolUint16V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint16: + v2, changed2 := fastpathTV.DecMapBoolUint16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint32: + fastpathTV.DecMapBoolUint32V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint32: + v2, changed2 := fastpathTV.DecMapBoolUint32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uint64: + fastpathTV.DecMapBoolUint64V(v, fastpathCheckNilFalse, false, d) + case *map[bool]uint64: + v2, changed2 := fastpathTV.DecMapBoolUint64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]uintptr: + fastpathTV.DecMapBoolUintptrV(v, fastpathCheckNilFalse, false, d) + case *map[bool]uintptr: + v2, changed2 := fastpathTV.DecMapBoolUintptrV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int: + fastpathTV.DecMapBoolIntV(v, fastpathCheckNilFalse, false, d) + case *map[bool]int: + v2, changed2 := fastpathTV.DecMapBoolIntV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int8: + fastpathTV.DecMapBoolInt8V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int8: + v2, changed2 := fastpathTV.DecMapBoolInt8V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int16: + fastpathTV.DecMapBoolInt16V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int16: + v2, changed2 := fastpathTV.DecMapBoolInt16V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int32: + fastpathTV.DecMapBoolInt32V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int32: + v2, changed2 := fastpathTV.DecMapBoolInt32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]int64: + fastpathTV.DecMapBoolInt64V(v, fastpathCheckNilFalse, false, d) + case *map[bool]int64: + v2, changed2 := fastpathTV.DecMapBoolInt64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]float32: + fastpathTV.DecMapBoolFloat32V(v, fastpathCheckNilFalse, false, d) + case *map[bool]float32: + v2, changed2 := fastpathTV.DecMapBoolFloat32V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]float64: + fastpathTV.DecMapBoolFloat64V(v, fastpathCheckNilFalse, false, d) + case *map[bool]float64: + v2, changed2 := fastpathTV.DecMapBoolFloat64V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + case map[bool]bool: + fastpathTV.DecMapBoolBoolV(v, fastpathCheckNilFalse, false, d) + case *map[bool]bool: + v2, changed2 := fastpathTV.DecMapBoolBoolV(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } + + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +// -- -- fast path functions + +func (f *decFnInfo) fastpathDecSliceIntfR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]interface{}) + v, changed := fastpathTV.DecSliceIntfV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]interface{}) + fastpathTV.DecSliceIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceIntfX(vp *[]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecSliceIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceIntfV(v []interface{}, checkNil bool, canChange bool, d *Decoder) (_ []interface{}, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []interface{}{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 16) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]interface{}, xlen) + } + } else { + v = make([]interface{}, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + d.decode(&v[j]) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, nil) + slh.ElemContainerState(j) + d.decode(&v[j]) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []interface{}{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]interface{}, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, nil) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + d.decode(&v[j]) + + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceStringR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]string) + v, changed := fastpathTV.DecSliceStringV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]string) + fastpathTV.DecSliceStringV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceStringX(vp *[]string, checkNil bool, d *Decoder) { + v, changed := f.DecSliceStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceStringV(v []string, checkNil bool, canChange bool, d *Decoder) (_ []string, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []string{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 16) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]string, xlen) + } + } else { + v = make([]string, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = dd.DecodeString() + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, "") + slh.ElemContainerState(j) + v[j] = dd.DecodeString() + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []string{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]string, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, "") + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = dd.DecodeString() + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceFloat32R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]float32) + v, changed := fastpathTV.DecSliceFloat32V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]float32) + fastpathTV.DecSliceFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceFloat32X(vp *[]float32, checkNil bool, d *Decoder) { + v, changed := f.DecSliceFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceFloat32V(v []float32, checkNil bool, canChange bool, d *Decoder) (_ []float32, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []float32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 4) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]float32, xlen) + } + } else { + v = make([]float32, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = float32(dd.DecodeFloat(true)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = float32(dd.DecodeFloat(true)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []float32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]float32, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = float32(dd.DecodeFloat(true)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceFloat64R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]float64) + v, changed := fastpathTV.DecSliceFloat64V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]float64) + fastpathTV.DecSliceFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceFloat64X(vp *[]float64, checkNil bool, d *Decoder) { + v, changed := f.DecSliceFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceFloat64V(v []float64, checkNil bool, canChange bool, d *Decoder) (_ []float64, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []float64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]float64, xlen) + } + } else { + v = make([]float64, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = dd.DecodeFloat(false) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = dd.DecodeFloat(false) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []float64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]float64, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = dd.DecodeFloat(false) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceUintR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]uint) + v, changed := fastpathTV.DecSliceUintV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint) + fastpathTV.DecSliceUintV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUintX(vp *[]uint, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUintV(v []uint, checkNil bool, canChange bool, d *Decoder) (_ []uint, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uint{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uint, xlen) + } + } else { + v = make([]uint, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = uint(dd.DecodeUint(uintBitsize)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = uint(dd.DecodeUint(uintBitsize)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []uint{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]uint, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = uint(dd.DecodeUint(uintBitsize)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceUint16R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]uint16) + v, changed := fastpathTV.DecSliceUint16V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint16) + fastpathTV.DecSliceUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUint16X(vp *[]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUint16V(v []uint16, checkNil bool, canChange bool, d *Decoder) (_ []uint16, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uint16{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 2) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uint16, xlen) + } + } else { + v = make([]uint16, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = uint16(dd.DecodeUint(16)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = uint16(dd.DecodeUint(16)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []uint16{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]uint16, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = uint16(dd.DecodeUint(16)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceUint32R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]uint32) + v, changed := fastpathTV.DecSliceUint32V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint32) + fastpathTV.DecSliceUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUint32X(vp *[]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUint32V(v []uint32, checkNil bool, canChange bool, d *Decoder) (_ []uint32, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uint32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 4) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uint32, xlen) + } + } else { + v = make([]uint32, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = uint32(dd.DecodeUint(32)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = uint32(dd.DecodeUint(32)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []uint32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]uint32, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = uint32(dd.DecodeUint(32)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceUint64R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]uint64) + v, changed := fastpathTV.DecSliceUint64V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uint64) + fastpathTV.DecSliceUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUint64X(vp *[]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUint64V(v []uint64, checkNil bool, canChange bool, d *Decoder) (_ []uint64, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uint64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uint64, xlen) + } + } else { + v = make([]uint64, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = dd.DecodeUint(64) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = dd.DecodeUint(64) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []uint64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]uint64, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = dd.DecodeUint(64) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceUintptrR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]uintptr) + v, changed := fastpathTV.DecSliceUintptrV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]uintptr) + fastpathTV.DecSliceUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceUintptrX(vp *[]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecSliceUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceUintptrV(v []uintptr, checkNil bool, canChange bool, d *Decoder) (_ []uintptr, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []uintptr{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]uintptr, xlen) + } + } else { + v = make([]uintptr, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = uintptr(dd.DecodeUint(uintBitsize)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = uintptr(dd.DecodeUint(uintBitsize)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []uintptr{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]uintptr, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = uintptr(dd.DecodeUint(uintBitsize)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceIntR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]int) + v, changed := fastpathTV.DecSliceIntV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int) + fastpathTV.DecSliceIntV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceIntX(vp *[]int, checkNil bool, d *Decoder) { + v, changed := f.DecSliceIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceIntV(v []int, checkNil bool, canChange bool, d *Decoder) (_ []int, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []int{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]int, xlen) + } + } else { + v = make([]int, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = int(dd.DecodeInt(intBitsize)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = int(dd.DecodeInt(intBitsize)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []int{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]int, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = int(dd.DecodeInt(intBitsize)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceInt8R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]int8) + v, changed := fastpathTV.DecSliceInt8V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int8) + fastpathTV.DecSliceInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt8X(vp *[]int8, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt8V(v []int8, checkNil bool, canChange bool, d *Decoder) (_ []int8, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []int8{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 1) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]int8, xlen) + } + } else { + v = make([]int8, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = int8(dd.DecodeInt(8)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = int8(dd.DecodeInt(8)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []int8{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]int8, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = int8(dd.DecodeInt(8)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceInt16R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]int16) + v, changed := fastpathTV.DecSliceInt16V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int16) + fastpathTV.DecSliceInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt16X(vp *[]int16, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt16V(v []int16, checkNil bool, canChange bool, d *Decoder) (_ []int16, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []int16{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 2) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]int16, xlen) + } + } else { + v = make([]int16, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = int16(dd.DecodeInt(16)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = int16(dd.DecodeInt(16)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []int16{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]int16, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = int16(dd.DecodeInt(16)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceInt32R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]int32) + v, changed := fastpathTV.DecSliceInt32V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int32) + fastpathTV.DecSliceInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt32X(vp *[]int32, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt32V(v []int32, checkNil bool, canChange bool, d *Decoder) (_ []int32, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []int32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 4) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]int32, xlen) + } + } else { + v = make([]int32, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = int32(dd.DecodeInt(32)) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = int32(dd.DecodeInt(32)) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []int32{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]int32, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = int32(dd.DecodeInt(32)) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceInt64R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]int64) + v, changed := fastpathTV.DecSliceInt64V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]int64) + fastpathTV.DecSliceInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceInt64X(vp *[]int64, checkNil bool, d *Decoder) { + v, changed := f.DecSliceInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceInt64V(v []int64, checkNil bool, canChange bool, d *Decoder) (_ []int64, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []int64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 8) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]int64, xlen) + } + } else { + v = make([]int64, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = dd.DecodeInt(64) + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, 0) + slh.ElemContainerState(j) + v[j] = dd.DecodeInt(64) + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []int64{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]int64, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, 0) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = dd.DecodeInt(64) + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecSliceBoolR(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { + vp := rv.Addr().Interface().(*[]bool) + v, changed := fastpathTV.DecSliceBoolV(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]bool) + fastpathTV.DecSliceBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) DecSliceBoolX(vp *[]bool, checkNil bool, d *Decoder) { + v, changed := f.DecSliceBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecSliceBoolV(v []bool, checkNil bool, canChange bool, d *Decoder) (_ []bool, changed bool) { + dd := d.d + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []bool{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, 1) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]bool, xlen) + } + } else { + v = make([]bool, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + v[j] = dd.DecodeBool() + } + if xtrunc { + for ; j < containerLenS; j++ { + v = append(v, false) + slh.ElemContainerState(j) + v[j] = dd.DecodeBool() + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() + if breakFound { + if canChange { + if v == nil { + v = []bool{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]bool, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, false) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { + v[j] = dd.DecodeBool() + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]interface{}) + v, changed := fastpathTV.DecMapIntfIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]interface{}) + fastpathTV.DecMapIntfIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfIntfX(vp *map[interface{}]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32) + v = make(map[interface{}]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk interface{} + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]string) + v, changed := fastpathTV.DecMapIntfStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]string) + fastpathTV.DecMapIntfStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfStringX(vp *map[interface{}]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32) + v = make(map[interface{}]string, xlen) + changed = true + } + + var mk interface{} + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint) + v, changed := fastpathTV.DecMapIntfUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint) + fastpathTV.DecMapIntfUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUintX(vp *map[interface{}]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]uint, xlen) + changed = true + } + + var mk interface{} + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint8) + v, changed := fastpathTV.DecMapIntfUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint8) + fastpathTV.DecMapIntfUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint8X(vp *map[interface{}]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[interface{}]uint8, xlen) + changed = true + } + + var mk interface{} + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint16) + v, changed := fastpathTV.DecMapIntfUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint16) + fastpathTV.DecMapIntfUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint16X(vp *map[interface{}]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[interface{}]uint16, xlen) + changed = true + } + + var mk interface{} + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint32) + v, changed := fastpathTV.DecMapIntfUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint32) + fastpathTV.DecMapIntfUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint32X(vp *map[interface{}]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[interface{}]uint32, xlen) + changed = true + } + + var mk interface{} + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uint64) + v, changed := fastpathTV.DecMapIntfUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uint64) + fastpathTV.DecMapIntfUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUint64X(vp *map[interface{}]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]uint64, xlen) + changed = true + } + + var mk interface{} + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]uintptr) + v, changed := fastpathTV.DecMapIntfUintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]uintptr) + fastpathTV.DecMapIntfUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfUintptrX(vp *map[interface{}]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]uintptr, xlen) + changed = true + } + + var mk interface{} + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int) + v, changed := fastpathTV.DecMapIntfIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int) + fastpathTV.DecMapIntfIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfIntX(vp *map[interface{}]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]int, xlen) + changed = true + } + + var mk interface{} + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int8) + v, changed := fastpathTV.DecMapIntfInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int8) + fastpathTV.DecMapIntfInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfInt8X(vp *map[interface{}]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[interface{}]int8, xlen) + changed = true + } + + var mk interface{} + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int16) + v, changed := fastpathTV.DecMapIntfInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int16) + fastpathTV.DecMapIntfInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfInt16X(vp *map[interface{}]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[interface{}]int16, xlen) + changed = true + } + + var mk interface{} + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int32) + v, changed := fastpathTV.DecMapIntfInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int32) + fastpathTV.DecMapIntfInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfInt32X(vp *map[interface{}]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[interface{}]int32, xlen) + changed = true + } + + var mk interface{} + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]int64) + v, changed := fastpathTV.DecMapIntfInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]int64) + fastpathTV.DecMapIntfInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfInt64X(vp *map[interface{}]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]int64, xlen) + changed = true + } + + var mk interface{} + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]float32) + v, changed := fastpathTV.DecMapIntfFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]float32) + fastpathTV.DecMapIntfFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfFloat32X(vp *map[interface{}]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[interface{}]float32, xlen) + changed = true + } + + var mk interface{} + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]float64) + v, changed := fastpathTV.DecMapIntfFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]float64) + fastpathTV.DecMapIntfFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfFloat64X(vp *map[interface{}]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[interface{}]float64, xlen) + changed = true + } + + var mk interface{} + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntfBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[interface{}]bool) + v, changed := fastpathTV.DecMapIntfBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[interface{}]bool) + fastpathTV.DecMapIntfBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntfBoolX(vp *map[interface{}]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntfBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[interface{}]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[interface{}]bool, xlen) + changed = true + } + + var mk interface{} + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) + } + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]interface{}) + v, changed := fastpathTV.DecMapStringIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]interface{}) + fastpathTV.DecMapStringIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringIntfX(vp *map[string]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[string]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32) + v = make(map[string]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk string + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]string) + v, changed := fastpathTV.DecMapStringStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]string) + fastpathTV.DecMapStringStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringStringX(vp *map[string]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringStringV(v map[string]string, checkNil bool, canChange bool, + d *Decoder) (_ map[string]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32) + v = make(map[string]string, xlen) + changed = true + } + + var mk string + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint) + v, changed := fastpathTV.DecMapStringUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uint) + fastpathTV.DecMapStringUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUintX(vp *map[string]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUintV(v map[string]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]uint, xlen) + changed = true + } + + var mk string + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint8) + v, changed := fastpathTV.DecMapStringUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uint8) + fastpathTV.DecMapStringUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUint8X(vp *map[string]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[string]uint8, xlen) + changed = true + } + + var mk string + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint16) + v, changed := fastpathTV.DecMapStringUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uint16) + fastpathTV.DecMapStringUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUint16X(vp *map[string]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[string]uint16, xlen) + changed = true + } + + var mk string + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint32) + v, changed := fastpathTV.DecMapStringUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uint32) + fastpathTV.DecMapStringUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUint32X(vp *map[string]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[string]uint32, xlen) + changed = true + } + + var mk string + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uint64) + v, changed := fastpathTV.DecMapStringUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uint64) + fastpathTV.DecMapStringUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUint64X(vp *map[string]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]uint64, xlen) + changed = true + } + + var mk string + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]uintptr) + v, changed := fastpathTV.DecMapStringUintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]uintptr) + fastpathTV.DecMapStringUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringUintptrX(vp *map[string]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[string]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]uintptr, xlen) + changed = true + } + + var mk string + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]int) + v, changed := fastpathTV.DecMapStringIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]int) + fastpathTV.DecMapStringIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringIntX(vp *map[string]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringIntV(v map[string]int, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]int, xlen) + changed = true + } + + var mk string + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]int8) + v, changed := fastpathTV.DecMapStringInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]int8) + fastpathTV.DecMapStringInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringInt8X(vp *map[string]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringInt8V(v map[string]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[string]int8, xlen) + changed = true + } + + var mk string + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]int16) + v, changed := fastpathTV.DecMapStringInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]int16) + fastpathTV.DecMapStringInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringInt16X(vp *map[string]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringInt16V(v map[string]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[string]int16, xlen) + changed = true + } + + var mk string + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]int32) + v, changed := fastpathTV.DecMapStringInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]int32) + fastpathTV.DecMapStringInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringInt32X(vp *map[string]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringInt32V(v map[string]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[string]int32, xlen) + changed = true + } + + var mk string + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]int64) + v, changed := fastpathTV.DecMapStringInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]int64) + fastpathTV.DecMapStringInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringInt64X(vp *map[string]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringInt64V(v map[string]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[string]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]int64, xlen) + changed = true + } + + var mk string + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]float32) + v, changed := fastpathTV.DecMapStringFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]float32) + fastpathTV.DecMapStringFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringFloat32X(vp *map[string]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[string]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[string]float32, xlen) + changed = true + } + + var mk string + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]float64) + v, changed := fastpathTV.DecMapStringFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]float64) + fastpathTV.DecMapStringFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringFloat64X(vp *map[string]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[string]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[string]float64, xlen) + changed = true + } + + var mk string + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapStringBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[string]bool) + v, changed := fastpathTV.DecMapStringBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[string]bool) + fastpathTV.DecMapStringBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapStringBoolX(vp *map[string]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapStringBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapStringBoolV(v map[string]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[string]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[string]bool, xlen) + changed = true + } + + var mk string + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeString() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]interface{}) + v, changed := fastpathTV.DecMapFloat32IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]interface{}) + fastpathTV.DecMapFloat32IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32IntfX(vp *map[float32]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[float32]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk float32 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]string) + v, changed := fastpathTV.DecMapFloat32StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]string) + fastpathTV.DecMapFloat32StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32StringX(vp *map[float32]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[float32]string, xlen) + changed = true + } + + var mk float32 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uint) + v, changed := fastpathTV.DecMapFloat32UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uint) + fastpathTV.DecMapFloat32UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32UintX(vp *map[float32]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]uint, xlen) + changed = true + } + + var mk float32 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uint8) + v, changed := fastpathTV.DecMapFloat32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uint8) + fastpathTV.DecMapFloat32Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Uint8X(vp *map[float32]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[float32]uint8, xlen) + changed = true + } + + var mk float32 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uint16) + v, changed := fastpathTV.DecMapFloat32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uint16) + fastpathTV.DecMapFloat32Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Uint16X(vp *map[float32]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[float32]uint16, xlen) + changed = true + } + + var mk float32 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uint32) + v, changed := fastpathTV.DecMapFloat32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uint32) + fastpathTV.DecMapFloat32Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Uint32X(vp *map[float32]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[float32]uint32, xlen) + changed = true + } + + var mk float32 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uint64) + v, changed := fastpathTV.DecMapFloat32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uint64) + fastpathTV.DecMapFloat32Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Uint64X(vp *map[float32]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]uint64, xlen) + changed = true + } + + var mk float32 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]uintptr) + v, changed := fastpathTV.DecMapFloat32UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]uintptr) + fastpathTV.DecMapFloat32UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32UintptrX(vp *map[float32]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]uintptr, xlen) + changed = true + } + + var mk float32 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]int) + v, changed := fastpathTV.DecMapFloat32IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]int) + fastpathTV.DecMapFloat32IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32IntX(vp *map[float32]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]int, xlen) + changed = true + } + + var mk float32 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]int8) + v, changed := fastpathTV.DecMapFloat32Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]int8) + fastpathTV.DecMapFloat32Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Int8X(vp *map[float32]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[float32]int8, xlen) + changed = true + } + + var mk float32 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]int16) + v, changed := fastpathTV.DecMapFloat32Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]int16) + fastpathTV.DecMapFloat32Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Int16X(vp *map[float32]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[float32]int16, xlen) + changed = true + } + + var mk float32 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]int32) + v, changed := fastpathTV.DecMapFloat32Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]int32) + fastpathTV.DecMapFloat32Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Int32X(vp *map[float32]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[float32]int32, xlen) + changed = true + } + + var mk float32 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]int64) + v, changed := fastpathTV.DecMapFloat32Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]int64) + fastpathTV.DecMapFloat32Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Int64X(vp *map[float32]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]int64, xlen) + changed = true + } + + var mk float32 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]float32) + v, changed := fastpathTV.DecMapFloat32Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]float32) + fastpathTV.DecMapFloat32Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Float32X(vp *map[float32]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[float32]float32, xlen) + changed = true + } + + var mk float32 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]float64) + v, changed := fastpathTV.DecMapFloat32Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]float64) + fastpathTV.DecMapFloat32Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32Float64X(vp *map[float32]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float32]float64, xlen) + changed = true + } + + var mk float32 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat32BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float32]bool) + v, changed := fastpathTV.DecMapFloat32BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float32]bool) + fastpathTV.DecMapFloat32BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat32BoolX(vp *map[float32]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat32BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[float32]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[float32]bool, xlen) + changed = true + } + + var mk float32 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = float32(dd.DecodeFloat(true)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]interface{}) + v, changed := fastpathTV.DecMapFloat64IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]interface{}) + fastpathTV.DecMapFloat64IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64IntfX(vp *map[float64]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[float64]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk float64 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]string) + v, changed := fastpathTV.DecMapFloat64StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]string) + fastpathTV.DecMapFloat64StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64StringX(vp *map[float64]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[float64]string, xlen) + changed = true + } + + var mk float64 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uint) + v, changed := fastpathTV.DecMapFloat64UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uint) + fastpathTV.DecMapFloat64UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64UintX(vp *map[float64]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]uint, xlen) + changed = true + } + + var mk float64 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uint8) + v, changed := fastpathTV.DecMapFloat64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uint8) + fastpathTV.DecMapFloat64Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Uint8X(vp *map[float64]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[float64]uint8, xlen) + changed = true + } + + var mk float64 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uint16) + v, changed := fastpathTV.DecMapFloat64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uint16) + fastpathTV.DecMapFloat64Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Uint16X(vp *map[float64]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[float64]uint16, xlen) + changed = true + } + + var mk float64 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uint32) + v, changed := fastpathTV.DecMapFloat64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uint32) + fastpathTV.DecMapFloat64Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Uint32X(vp *map[float64]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float64]uint32, xlen) + changed = true + } + + var mk float64 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uint64) + v, changed := fastpathTV.DecMapFloat64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uint64) + fastpathTV.DecMapFloat64Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Uint64X(vp *map[float64]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]uint64, xlen) + changed = true + } + + var mk float64 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]uintptr) + v, changed := fastpathTV.DecMapFloat64UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]uintptr) + fastpathTV.DecMapFloat64UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64UintptrX(vp *map[float64]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]uintptr, xlen) + changed = true + } + + var mk float64 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]int) + v, changed := fastpathTV.DecMapFloat64IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]int) + fastpathTV.DecMapFloat64IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64IntX(vp *map[float64]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]int, xlen) + changed = true + } + + var mk float64 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]int8) + v, changed := fastpathTV.DecMapFloat64Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]int8) + fastpathTV.DecMapFloat64Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Int8X(vp *map[float64]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[float64]int8, xlen) + changed = true + } + + var mk float64 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]int16) + v, changed := fastpathTV.DecMapFloat64Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]int16) + fastpathTV.DecMapFloat64Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Int16X(vp *map[float64]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[float64]int16, xlen) + changed = true + } + + var mk float64 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]int32) + v, changed := fastpathTV.DecMapFloat64Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]int32) + fastpathTV.DecMapFloat64Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Int32X(vp *map[float64]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float64]int32, xlen) + changed = true + } + + var mk float64 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]int64) + v, changed := fastpathTV.DecMapFloat64Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]int64) + fastpathTV.DecMapFloat64Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Int64X(vp *map[float64]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]int64, xlen) + changed = true + } + + var mk float64 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]float32) + v, changed := fastpathTV.DecMapFloat64Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]float32) + fastpathTV.DecMapFloat64Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Float32X(vp *map[float64]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[float64]float32, xlen) + changed = true + } + + var mk float64 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]float64) + v, changed := fastpathTV.DecMapFloat64Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]float64) + fastpathTV.DecMapFloat64Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64Float64X(vp *map[float64]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[float64]float64, xlen) + changed = true + } + + var mk float64 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapFloat64BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[float64]bool) + v, changed := fastpathTV.DecMapFloat64BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[float64]bool) + fastpathTV.DecMapFloat64BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapFloat64BoolX(vp *map[float64]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapFloat64BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[float64]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[float64]bool, xlen) + changed = true + } + + var mk float64 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeFloat(false) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]interface{}) + v, changed := fastpathTV.DecMapUintIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]interface{}) + fastpathTV.DecMapUintIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintIntfX(vp *map[uint]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uint]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]string) + v, changed := fastpathTV.DecMapUintStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]string) + fastpathTV.DecMapUintStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintStringX(vp *map[uint]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintStringV(v map[uint]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uint]string, xlen) + changed = true + } + + var mk uint + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uint) + v, changed := fastpathTV.DecMapUintUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uint) + fastpathTV.DecMapUintUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUintX(vp *map[uint]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUintV(v map[uint]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]uint, xlen) + changed = true + } + + var mk uint + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uint8) + v, changed := fastpathTV.DecMapUintUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uint8) + fastpathTV.DecMapUintUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUint8X(vp *map[uint]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint]uint8, xlen) + changed = true + } + + var mk uint + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uint16) + v, changed := fastpathTV.DecMapUintUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uint16) + fastpathTV.DecMapUintUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUint16X(vp *map[uint]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint]uint16, xlen) + changed = true + } + + var mk uint + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uint32) + v, changed := fastpathTV.DecMapUintUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uint32) + fastpathTV.DecMapUintUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUint32X(vp *map[uint]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint]uint32, xlen) + changed = true + } + + var mk uint + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uint64) + v, changed := fastpathTV.DecMapUintUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uint64) + fastpathTV.DecMapUintUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUint64X(vp *map[uint]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]uint64, xlen) + changed = true + } + + var mk uint + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]uintptr) + v, changed := fastpathTV.DecMapUintUintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]uintptr) + fastpathTV.DecMapUintUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintUintptrX(vp *map[uint]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]uintptr, xlen) + changed = true + } + + var mk uint + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]int) + v, changed := fastpathTV.DecMapUintIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]int) + fastpathTV.DecMapUintIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintIntX(vp *map[uint]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintIntV(v map[uint]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]int, xlen) + changed = true + } + + var mk uint + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]int8) + v, changed := fastpathTV.DecMapUintInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]int8) + fastpathTV.DecMapUintInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintInt8X(vp *map[uint]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint]int8, xlen) + changed = true + } + + var mk uint + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]int16) + v, changed := fastpathTV.DecMapUintInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]int16) + fastpathTV.DecMapUintInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintInt16X(vp *map[uint]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint]int16, xlen) + changed = true + } + + var mk uint + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]int32) + v, changed := fastpathTV.DecMapUintInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]int32) + fastpathTV.DecMapUintInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintInt32X(vp *map[uint]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint]int32, xlen) + changed = true + } + + var mk uint + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]int64) + v, changed := fastpathTV.DecMapUintInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]int64) + fastpathTV.DecMapUintInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintInt64X(vp *map[uint]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]int64, xlen) + changed = true + } + + var mk uint + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]float32) + v, changed := fastpathTV.DecMapUintFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]float32) + fastpathTV.DecMapUintFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintFloat32X(vp *map[uint]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint]float32, xlen) + changed = true + } + + var mk uint + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]float64) + v, changed := fastpathTV.DecMapUintFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]float64) + fastpathTV.DecMapUintFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintFloat64X(vp *map[uint]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint]float64, xlen) + changed = true + } + + var mk uint + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint]bool) + v, changed := fastpathTV.DecMapUintBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint]bool) + fastpathTV.DecMapUintBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintBoolX(vp *map[uint]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint]bool, xlen) + changed = true + } + + var mk uint + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]interface{}) + v, changed := fastpathTV.DecMapUint8IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]interface{}) + fastpathTV.DecMapUint8IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8IntfX(vp *map[uint8]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[uint8]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint8 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]string) + v, changed := fastpathTV.DecMapUint8StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]string) + fastpathTV.DecMapUint8StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8StringX(vp *map[uint8]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[uint8]string, xlen) + changed = true + } + + var mk uint8 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uint) + v, changed := fastpathTV.DecMapUint8UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uint) + fastpathTV.DecMapUint8UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8UintX(vp *map[uint8]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]uint, xlen) + changed = true + } + + var mk uint8 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uint8) + v, changed := fastpathTV.DecMapUint8Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uint8) + fastpathTV.DecMapUint8Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Uint8X(vp *map[uint8]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[uint8]uint8, xlen) + changed = true + } + + var mk uint8 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uint16) + v, changed := fastpathTV.DecMapUint8Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uint16) + fastpathTV.DecMapUint8Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Uint16X(vp *map[uint8]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[uint8]uint16, xlen) + changed = true + } + + var mk uint8 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uint32) + v, changed := fastpathTV.DecMapUint8Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uint32) + fastpathTV.DecMapUint8Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Uint32X(vp *map[uint8]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint8]uint32, xlen) + changed = true + } + + var mk uint8 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uint64) + v, changed := fastpathTV.DecMapUint8Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uint64) + fastpathTV.DecMapUint8Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Uint64X(vp *map[uint8]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]uint64, xlen) + changed = true + } + + var mk uint8 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]uintptr) + v, changed := fastpathTV.DecMapUint8UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]uintptr) + fastpathTV.DecMapUint8UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8UintptrX(vp *map[uint8]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]uintptr, xlen) + changed = true + } + + var mk uint8 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]int) + v, changed := fastpathTV.DecMapUint8IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]int) + fastpathTV.DecMapUint8IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8IntX(vp *map[uint8]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]int, xlen) + changed = true + } + + var mk uint8 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]int8) + v, changed := fastpathTV.DecMapUint8Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]int8) + fastpathTV.DecMapUint8Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Int8X(vp *map[uint8]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[uint8]int8, xlen) + changed = true + } + + var mk uint8 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]int16) + v, changed := fastpathTV.DecMapUint8Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]int16) + fastpathTV.DecMapUint8Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Int16X(vp *map[uint8]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[uint8]int16, xlen) + changed = true + } + + var mk uint8 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]int32) + v, changed := fastpathTV.DecMapUint8Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]int32) + fastpathTV.DecMapUint8Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Int32X(vp *map[uint8]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint8]int32, xlen) + changed = true + } + + var mk uint8 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]int64) + v, changed := fastpathTV.DecMapUint8Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]int64) + fastpathTV.DecMapUint8Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Int64X(vp *map[uint8]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]int64, xlen) + changed = true + } + + var mk uint8 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]float32) + v, changed := fastpathTV.DecMapUint8Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]float32) + fastpathTV.DecMapUint8Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Float32X(vp *map[uint8]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint8]float32, xlen) + changed = true + } + + var mk uint8 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]float64) + v, changed := fastpathTV.DecMapUint8Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]float64) + fastpathTV.DecMapUint8Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8Float64X(vp *map[uint8]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint8]float64, xlen) + changed = true + } + + var mk uint8 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint8BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint8]bool) + v, changed := fastpathTV.DecMapUint8BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint8]bool) + fastpathTV.DecMapUint8BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint8BoolX(vp *map[uint8]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint8BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint8]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[uint8]bool, xlen) + changed = true + } + + var mk uint8 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint8(dd.DecodeUint(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]interface{}) + v, changed := fastpathTV.DecMapUint16IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]interface{}) + fastpathTV.DecMapUint16IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16IntfX(vp *map[uint16]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[uint16]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint16 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]string) + v, changed := fastpathTV.DecMapUint16StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]string) + fastpathTV.DecMapUint16StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16StringX(vp *map[uint16]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[uint16]string, xlen) + changed = true + } + + var mk uint16 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uint) + v, changed := fastpathTV.DecMapUint16UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uint) + fastpathTV.DecMapUint16UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16UintX(vp *map[uint16]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]uint, xlen) + changed = true + } + + var mk uint16 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uint8) + v, changed := fastpathTV.DecMapUint16Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uint8) + fastpathTV.DecMapUint16Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Uint8X(vp *map[uint16]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[uint16]uint8, xlen) + changed = true + } + + var mk uint16 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uint16) + v, changed := fastpathTV.DecMapUint16Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uint16) + fastpathTV.DecMapUint16Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Uint16X(vp *map[uint16]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4) + v = make(map[uint16]uint16, xlen) + changed = true + } + + var mk uint16 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uint32) + v, changed := fastpathTV.DecMapUint16Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uint32) + fastpathTV.DecMapUint16Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Uint32X(vp *map[uint16]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[uint16]uint32, xlen) + changed = true + } + + var mk uint16 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uint64) + v, changed := fastpathTV.DecMapUint16Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uint64) + fastpathTV.DecMapUint16Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Uint64X(vp *map[uint16]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]uint64, xlen) + changed = true + } + + var mk uint16 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]uintptr) + v, changed := fastpathTV.DecMapUint16UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]uintptr) + fastpathTV.DecMapUint16UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16UintptrX(vp *map[uint16]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]uintptr, xlen) + changed = true + } + + var mk uint16 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int) + v, changed := fastpathTV.DecMapUint16IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]int) + fastpathTV.DecMapUint16IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16IntX(vp *map[uint16]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]int, xlen) + changed = true + } + + var mk uint16 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int8) + v, changed := fastpathTV.DecMapUint16Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]int8) + fastpathTV.DecMapUint16Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Int8X(vp *map[uint16]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[uint16]int8, xlen) + changed = true + } + + var mk uint16 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int16) + v, changed := fastpathTV.DecMapUint16Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]int16) + fastpathTV.DecMapUint16Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Int16X(vp *map[uint16]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4) + v = make(map[uint16]int16, xlen) + changed = true + } + + var mk uint16 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int32) + v, changed := fastpathTV.DecMapUint16Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]int32) + fastpathTV.DecMapUint16Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Int32X(vp *map[uint16]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[uint16]int32, xlen) + changed = true + } + + var mk uint16 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]int64) + v, changed := fastpathTV.DecMapUint16Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]int64) + fastpathTV.DecMapUint16Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Int64X(vp *map[uint16]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]int64, xlen) + changed = true + } + + var mk uint16 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]float32) + v, changed := fastpathTV.DecMapUint16Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]float32) + fastpathTV.DecMapUint16Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Float32X(vp *map[uint16]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[uint16]float32, xlen) + changed = true + } + + var mk uint16 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]float64) + v, changed := fastpathTV.DecMapUint16Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]float64) + fastpathTV.DecMapUint16Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16Float64X(vp *map[uint16]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint16]float64, xlen) + changed = true + } + + var mk uint16 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint16BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint16]bool) + v, changed := fastpathTV.DecMapUint16BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint16]bool) + fastpathTV.DecMapUint16BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint16BoolX(vp *map[uint16]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint16BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint16]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[uint16]bool, xlen) + changed = true + } + + var mk uint16 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint16(dd.DecodeUint(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]interface{}) + v, changed := fastpathTV.DecMapUint32IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]interface{}) + fastpathTV.DecMapUint32IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32IntfX(vp *map[uint32]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[uint32]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint32 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]string) + v, changed := fastpathTV.DecMapUint32StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]string) + fastpathTV.DecMapUint32StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32StringX(vp *map[uint32]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[uint32]string, xlen) + changed = true + } + + var mk uint32 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uint) + v, changed := fastpathTV.DecMapUint32UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uint) + fastpathTV.DecMapUint32UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32UintX(vp *map[uint32]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]uint, xlen) + changed = true + } + + var mk uint32 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uint8) + v, changed := fastpathTV.DecMapUint32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uint8) + fastpathTV.DecMapUint32Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Uint8X(vp *map[uint32]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint32]uint8, xlen) + changed = true + } + + var mk uint32 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uint16) + v, changed := fastpathTV.DecMapUint32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uint16) + fastpathTV.DecMapUint32Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Uint16X(vp *map[uint32]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[uint32]uint16, xlen) + changed = true + } + + var mk uint32 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uint32) + v, changed := fastpathTV.DecMapUint32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uint32) + fastpathTV.DecMapUint32Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Uint32X(vp *map[uint32]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[uint32]uint32, xlen) + changed = true + } + + var mk uint32 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uint64) + v, changed := fastpathTV.DecMapUint32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uint64) + fastpathTV.DecMapUint32Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Uint64X(vp *map[uint32]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]uint64, xlen) + changed = true + } + + var mk uint32 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]uintptr) + v, changed := fastpathTV.DecMapUint32UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]uintptr) + fastpathTV.DecMapUint32UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32UintptrX(vp *map[uint32]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]uintptr, xlen) + changed = true + } + + var mk uint32 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]int) + v, changed := fastpathTV.DecMapUint32IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]int) + fastpathTV.DecMapUint32IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32IntX(vp *map[uint32]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]int, xlen) + changed = true + } + + var mk uint32 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]int8) + v, changed := fastpathTV.DecMapUint32Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]int8) + fastpathTV.DecMapUint32Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Int8X(vp *map[uint32]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint32]int8, xlen) + changed = true + } + + var mk uint32 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]int16) + v, changed := fastpathTV.DecMapUint32Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]int16) + fastpathTV.DecMapUint32Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Int16X(vp *map[uint32]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[uint32]int16, xlen) + changed = true + } + + var mk uint32 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]int32) + v, changed := fastpathTV.DecMapUint32Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]int32) + fastpathTV.DecMapUint32Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Int32X(vp *map[uint32]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[uint32]int32, xlen) + changed = true + } + + var mk uint32 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]int64) + v, changed := fastpathTV.DecMapUint32Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]int64) + fastpathTV.DecMapUint32Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Int64X(vp *map[uint32]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]int64, xlen) + changed = true + } + + var mk uint32 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]float32) + v, changed := fastpathTV.DecMapUint32Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]float32) + fastpathTV.DecMapUint32Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Float32X(vp *map[uint32]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[uint32]float32, xlen) + changed = true + } + + var mk uint32 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]float64) + v, changed := fastpathTV.DecMapUint32Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]float64) + fastpathTV.DecMapUint32Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32Float64X(vp *map[uint32]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint32]float64, xlen) + changed = true + } + + var mk uint32 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint32BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint32]bool) + v, changed := fastpathTV.DecMapUint32BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint32]bool) + fastpathTV.DecMapUint32BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint32BoolX(vp *map[uint32]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint32BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint32]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[uint32]bool, xlen) + changed = true + } + + var mk uint32 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uint32(dd.DecodeUint(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]interface{}) + v, changed := fastpathTV.DecMapUint64IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]interface{}) + fastpathTV.DecMapUint64IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64IntfX(vp *map[uint64]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uint64]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uint64 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]string) + v, changed := fastpathTV.DecMapUint64StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]string) + fastpathTV.DecMapUint64StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64StringX(vp *map[uint64]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uint64]string, xlen) + changed = true + } + + var mk uint64 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uint) + v, changed := fastpathTV.DecMapUint64UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uint) + fastpathTV.DecMapUint64UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64UintX(vp *map[uint64]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]uint, xlen) + changed = true + } + + var mk uint64 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uint8) + v, changed := fastpathTV.DecMapUint64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uint8) + fastpathTV.DecMapUint64Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Uint8X(vp *map[uint64]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint64]uint8, xlen) + changed = true + } + + var mk uint64 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uint16) + v, changed := fastpathTV.DecMapUint64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uint16) + fastpathTV.DecMapUint64Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Uint16X(vp *map[uint64]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint64]uint16, xlen) + changed = true + } + + var mk uint64 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uint32) + v, changed := fastpathTV.DecMapUint64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uint32) + fastpathTV.DecMapUint64Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Uint32X(vp *map[uint64]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint64]uint32, xlen) + changed = true + } + + var mk uint64 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uint64) + v, changed := fastpathTV.DecMapUint64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uint64) + fastpathTV.DecMapUint64Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Uint64X(vp *map[uint64]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]uint64, xlen) + changed = true + } + + var mk uint64 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]uintptr) + v, changed := fastpathTV.DecMapUint64UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]uintptr) + fastpathTV.DecMapUint64UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64UintptrX(vp *map[uint64]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]uintptr, xlen) + changed = true + } + + var mk uint64 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]int) + v, changed := fastpathTV.DecMapUint64IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]int) + fastpathTV.DecMapUint64IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64IntX(vp *map[uint64]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]int, xlen) + changed = true + } + + var mk uint64 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]int8) + v, changed := fastpathTV.DecMapUint64Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]int8) + fastpathTV.DecMapUint64Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Int8X(vp *map[uint64]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint64]int8, xlen) + changed = true + } + + var mk uint64 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]int16) + v, changed := fastpathTV.DecMapUint64Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]int16) + fastpathTV.DecMapUint64Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Int16X(vp *map[uint64]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uint64]int16, xlen) + changed = true + } + + var mk uint64 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]int32) + v, changed := fastpathTV.DecMapUint64Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]int32) + fastpathTV.DecMapUint64Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Int32X(vp *map[uint64]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint64]int32, xlen) + changed = true + } + + var mk uint64 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]int64) + v, changed := fastpathTV.DecMapUint64Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]int64) + fastpathTV.DecMapUint64Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Int64X(vp *map[uint64]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]int64, xlen) + changed = true + } + + var mk uint64 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]float32) + v, changed := fastpathTV.DecMapUint64Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]float32) + fastpathTV.DecMapUint64Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Float32X(vp *map[uint64]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uint64]float32, xlen) + changed = true + } + + var mk uint64 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]float64) + v, changed := fastpathTV.DecMapUint64Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]float64) + fastpathTV.DecMapUint64Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64Float64X(vp *map[uint64]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uint64]float64, xlen) + changed = true + } + + var mk uint64 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUint64BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uint64]bool) + v, changed := fastpathTV.DecMapUint64BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uint64]bool) + fastpathTV.DecMapUint64BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUint64BoolX(vp *map[uint64]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUint64BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uint64]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uint64]bool, xlen) + changed = true + } + + var mk uint64 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeUint(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]interface{}) + v, changed := fastpathTV.DecMapUintptrIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]interface{}) + fastpathTV.DecMapUintptrIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrIntfX(vp *map[uintptr]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uintptr]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk uintptr + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]string) + v, changed := fastpathTV.DecMapUintptrStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]string) + fastpathTV.DecMapUintptrStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrStringX(vp *map[uintptr]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[uintptr]string, xlen) + changed = true + } + + var mk uintptr + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]uint) + v, changed := fastpathTV.DecMapUintptrUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]uint) + fastpathTV.DecMapUintptrUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrUintX(vp *map[uintptr]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]uint, xlen) + changed = true + } + + var mk uintptr + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]uint8) + v, changed := fastpathTV.DecMapUintptrUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]uint8) + fastpathTV.DecMapUintptrUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrUint8X(vp *map[uintptr]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uintptr]uint8, xlen) + changed = true + } + + var mk uintptr + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]uint16) + v, changed := fastpathTV.DecMapUintptrUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]uint16) + fastpathTV.DecMapUintptrUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrUint16X(vp *map[uintptr]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uintptr]uint16, xlen) + changed = true + } + + var mk uintptr + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]uint32) + v, changed := fastpathTV.DecMapUintptrUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]uint32) + fastpathTV.DecMapUintptrUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrUint32X(vp *map[uintptr]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uintptr]uint32, xlen) + changed = true + } + + var mk uintptr + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]uint64) + v, changed := fastpathTV.DecMapUintptrUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]uint64) + fastpathTV.DecMapUintptrUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrUint64X(vp *map[uintptr]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]uint64, xlen) + changed = true + } + + var mk uintptr + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]uintptr) + v, changed := fastpathTV.DecMapUintptrUintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]uintptr) + fastpathTV.DecMapUintptrUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrUintptrX(vp *map[uintptr]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]uintptr, xlen) + changed = true + } + + var mk uintptr + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]int) + v, changed := fastpathTV.DecMapUintptrIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]int) + fastpathTV.DecMapUintptrIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrIntX(vp *map[uintptr]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]int, xlen) + changed = true + } + + var mk uintptr + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]int8) + v, changed := fastpathTV.DecMapUintptrInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]int8) + fastpathTV.DecMapUintptrInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrInt8X(vp *map[uintptr]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uintptr]int8, xlen) + changed = true + } + + var mk uintptr + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]int16) + v, changed := fastpathTV.DecMapUintptrInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]int16) + fastpathTV.DecMapUintptrInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrInt16X(vp *map[uintptr]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[uintptr]int16, xlen) + changed = true + } + + var mk uintptr + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]int32) + v, changed := fastpathTV.DecMapUintptrInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]int32) + fastpathTV.DecMapUintptrInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrInt32X(vp *map[uintptr]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uintptr]int32, xlen) + changed = true + } + + var mk uintptr + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]int64) + v, changed := fastpathTV.DecMapUintptrInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]int64) + fastpathTV.DecMapUintptrInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrInt64X(vp *map[uintptr]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]int64, xlen) + changed = true + } + + var mk uintptr + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]float32) + v, changed := fastpathTV.DecMapUintptrFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]float32) + fastpathTV.DecMapUintptrFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrFloat32X(vp *map[uintptr]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[uintptr]float32, xlen) + changed = true + } + + var mk uintptr + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]float64) + v, changed := fastpathTV.DecMapUintptrFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]float64) + fastpathTV.DecMapUintptrFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrFloat64X(vp *map[uintptr]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[uintptr]float64, xlen) + changed = true + } + + var mk uintptr + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapUintptrBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[uintptr]bool) + v, changed := fastpathTV.DecMapUintptrBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[uintptr]bool) + fastpathTV.DecMapUintptrBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapUintptrBoolX(vp *map[uintptr]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapUintptrBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[uintptr]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[uintptr]bool, xlen) + changed = true + } + + var mk uintptr + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = uintptr(dd.DecodeUint(uintBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]interface{}) + v, changed := fastpathTV.DecMapIntIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]interface{}) + fastpathTV.DecMapIntIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntIntfX(vp *map[int]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[int]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[int]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk int + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]string) + v, changed := fastpathTV.DecMapIntStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]string) + fastpathTV.DecMapIntStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntStringX(vp *map[int]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntStringV(v map[int]string, checkNil bool, canChange bool, + d *Decoder) (_ map[int]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[int]string, xlen) + changed = true + } + + var mk int + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uint) + v, changed := fastpathTV.DecMapIntUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uint) + fastpathTV.DecMapIntUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUintX(vp *map[int]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUintV(v map[int]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]uint, xlen) + changed = true + } + + var mk int + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uint8) + v, changed := fastpathTV.DecMapIntUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uint8) + fastpathTV.DecMapIntUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUint8X(vp *map[int]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int]uint8, xlen) + changed = true + } + + var mk int + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uint16) + v, changed := fastpathTV.DecMapIntUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uint16) + fastpathTV.DecMapIntUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUint16X(vp *map[int]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int]uint16, xlen) + changed = true + } + + var mk int + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uint32) + v, changed := fastpathTV.DecMapIntUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uint32) + fastpathTV.DecMapIntUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUint32X(vp *map[int]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int]uint32, xlen) + changed = true + } + + var mk int + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uint64) + v, changed := fastpathTV.DecMapIntUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uint64) + fastpathTV.DecMapIntUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUint64X(vp *map[int]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]uint64, xlen) + changed = true + } + + var mk int + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]uintptr) + v, changed := fastpathTV.DecMapIntUintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]uintptr) + fastpathTV.DecMapIntUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntUintptrX(vp *map[int]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[int]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]uintptr, xlen) + changed = true + } + + var mk int + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]int) + v, changed := fastpathTV.DecMapIntIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]int) + fastpathTV.DecMapIntIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntIntX(vp *map[int]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntIntV(v map[int]int, checkNil bool, canChange bool, + d *Decoder) (_ map[int]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]int, xlen) + changed = true + } + + var mk int + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]int8) + v, changed := fastpathTV.DecMapIntInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]int8) + fastpathTV.DecMapIntInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntInt8X(vp *map[int]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntInt8V(v map[int]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[int]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int]int8, xlen) + changed = true + } + + var mk int + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]int16) + v, changed := fastpathTV.DecMapIntInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]int16) + fastpathTV.DecMapIntInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntInt16X(vp *map[int]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntInt16V(v map[int]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[int]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int]int16, xlen) + changed = true + } + + var mk int + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]int32) + v, changed := fastpathTV.DecMapIntInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]int32) + fastpathTV.DecMapIntInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntInt32X(vp *map[int]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntInt32V(v map[int]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[int]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int]int32, xlen) + changed = true + } + + var mk int + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]int64) + v, changed := fastpathTV.DecMapIntInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]int64) + fastpathTV.DecMapIntInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntInt64X(vp *map[int]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntInt64V(v map[int]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[int]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]int64, xlen) + changed = true + } + + var mk int + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]float32) + v, changed := fastpathTV.DecMapIntFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]float32) + fastpathTV.DecMapIntFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntFloat32X(vp *map[int]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[int]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int]float32, xlen) + changed = true + } + + var mk int + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]float64) + v, changed := fastpathTV.DecMapIntFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]float64) + fastpathTV.DecMapIntFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntFloat64X(vp *map[int]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[int]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int]float64, xlen) + changed = true + } + + var mk int + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapIntBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int]bool) + v, changed := fastpathTV.DecMapIntBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int]bool) + fastpathTV.DecMapIntBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapIntBoolX(vp *map[int]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapIntBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapIntBoolV(v map[int]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[int]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int]bool, xlen) + changed = true + } + + var mk int + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int(dd.DecodeInt(intBitsize)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]interface{}) + v, changed := fastpathTV.DecMapInt8IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]interface{}) + fastpathTV.DecMapInt8IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8IntfX(vp *map[int8]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[int8]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk int8 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]string) + v, changed := fastpathTV.DecMapInt8StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]string) + fastpathTV.DecMapInt8StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8StringX(vp *map[int8]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8StringV(v map[int8]string, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[int8]string, xlen) + changed = true + } + + var mk int8 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uint) + v, changed := fastpathTV.DecMapInt8UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uint) + fastpathTV.DecMapInt8UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8UintX(vp *map[int8]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]uint, xlen) + changed = true + } + + var mk int8 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uint8) + v, changed := fastpathTV.DecMapInt8Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uint8) + fastpathTV.DecMapInt8Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Uint8X(vp *map[int8]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[int8]uint8, xlen) + changed = true + } + + var mk int8 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uint16) + v, changed := fastpathTV.DecMapInt8Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uint16) + fastpathTV.DecMapInt8Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Uint16X(vp *map[int8]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[int8]uint16, xlen) + changed = true + } + + var mk int8 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uint32) + v, changed := fastpathTV.DecMapInt8Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uint32) + fastpathTV.DecMapInt8Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Uint32X(vp *map[int8]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int8]uint32, xlen) + changed = true + } + + var mk int8 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uint64) + v, changed := fastpathTV.DecMapInt8Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uint64) + fastpathTV.DecMapInt8Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Uint64X(vp *map[int8]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]uint64, xlen) + changed = true + } + + var mk int8 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]uintptr) + v, changed := fastpathTV.DecMapInt8UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]uintptr) + fastpathTV.DecMapInt8UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8UintptrX(vp *map[int8]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]uintptr, xlen) + changed = true + } + + var mk int8 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]int) + v, changed := fastpathTV.DecMapInt8IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]int) + fastpathTV.DecMapInt8IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8IntX(vp *map[int8]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8IntV(v map[int8]int, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]int, xlen) + changed = true + } + + var mk int8 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]int8) + v, changed := fastpathTV.DecMapInt8Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]int8) + fastpathTV.DecMapInt8Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Int8X(vp *map[int8]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[int8]int8, xlen) + changed = true + } + + var mk int8 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]int16) + v, changed := fastpathTV.DecMapInt8Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]int16) + fastpathTV.DecMapInt8Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Int16X(vp *map[int8]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[int8]int16, xlen) + changed = true + } + + var mk int8 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]int32) + v, changed := fastpathTV.DecMapInt8Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]int32) + fastpathTV.DecMapInt8Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Int32X(vp *map[int8]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int8]int32, xlen) + changed = true + } + + var mk int8 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]int64) + v, changed := fastpathTV.DecMapInt8Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]int64) + fastpathTV.DecMapInt8Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Int64X(vp *map[int8]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]int64, xlen) + changed = true + } + + var mk int8 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]float32) + v, changed := fastpathTV.DecMapInt8Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]float32) + fastpathTV.DecMapInt8Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Float32X(vp *map[int8]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int8]float32, xlen) + changed = true + } + + var mk int8 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]float64) + v, changed := fastpathTV.DecMapInt8Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]float64) + fastpathTV.DecMapInt8Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8Float64X(vp *map[int8]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int8]float64, xlen) + changed = true + } + + var mk int8 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt8BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int8]bool) + v, changed := fastpathTV.DecMapInt8BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int8]bool) + fastpathTV.DecMapInt8BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt8BoolX(vp *map[int8]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt8BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[int8]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[int8]bool, xlen) + changed = true + } + + var mk int8 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int8(dd.DecodeInt(8)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]interface{}) + v, changed := fastpathTV.DecMapInt16IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]interface{}) + fastpathTV.DecMapInt16IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16IntfX(vp *map[int16]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[int16]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk int16 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]string) + v, changed := fastpathTV.DecMapInt16StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]string) + fastpathTV.DecMapInt16StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16StringX(vp *map[int16]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16StringV(v map[int16]string, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18) + v = make(map[int16]string, xlen) + changed = true + } + + var mk int16 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uint) + v, changed := fastpathTV.DecMapInt16UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uint) + fastpathTV.DecMapInt16UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16UintX(vp *map[int16]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]uint, xlen) + changed = true + } + + var mk int16 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uint8) + v, changed := fastpathTV.DecMapInt16Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uint8) + fastpathTV.DecMapInt16Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Uint8X(vp *map[int16]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[int16]uint8, xlen) + changed = true + } + + var mk int16 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uint16) + v, changed := fastpathTV.DecMapInt16Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uint16) + fastpathTV.DecMapInt16Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Uint16X(vp *map[int16]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4) + v = make(map[int16]uint16, xlen) + changed = true + } + + var mk int16 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uint32) + v, changed := fastpathTV.DecMapInt16Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uint32) + fastpathTV.DecMapInt16Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Uint32X(vp *map[int16]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[int16]uint32, xlen) + changed = true + } + + var mk int16 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uint64) + v, changed := fastpathTV.DecMapInt16Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uint64) + fastpathTV.DecMapInt16Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Uint64X(vp *map[int16]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]uint64, xlen) + changed = true + } + + var mk int16 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]uintptr) + v, changed := fastpathTV.DecMapInt16UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]uintptr) + fastpathTV.DecMapInt16UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16UintptrX(vp *map[int16]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]uintptr, xlen) + changed = true + } + + var mk int16 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]int) + v, changed := fastpathTV.DecMapInt16IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]int) + fastpathTV.DecMapInt16IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16IntX(vp *map[int16]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16IntV(v map[int16]int, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]int, xlen) + changed = true + } + + var mk int16 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]int8) + v, changed := fastpathTV.DecMapInt16Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]int8) + fastpathTV.DecMapInt16Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Int8X(vp *map[int16]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[int16]int8, xlen) + changed = true + } + + var mk int16 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]int16) + v, changed := fastpathTV.DecMapInt16Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]int16) + fastpathTV.DecMapInt16Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Int16X(vp *map[int16]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4) + v = make(map[int16]int16, xlen) + changed = true + } + + var mk int16 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]int32) + v, changed := fastpathTV.DecMapInt16Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]int32) + fastpathTV.DecMapInt16Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Int32X(vp *map[int16]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[int16]int32, xlen) + changed = true + } + + var mk int16 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]int64) + v, changed := fastpathTV.DecMapInt16Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]int64) + fastpathTV.DecMapInt16Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Int64X(vp *map[int16]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]int64, xlen) + changed = true + } + + var mk int16 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]float32) + v, changed := fastpathTV.DecMapInt16Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]float32) + fastpathTV.DecMapInt16Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Float32X(vp *map[int16]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[int16]float32, xlen) + changed = true + } + + var mk int16 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]float64) + v, changed := fastpathTV.DecMapInt16Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]float64) + fastpathTV.DecMapInt16Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16Float64X(vp *map[int16]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int16]float64, xlen) + changed = true + } + + var mk int16 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt16BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int16]bool) + v, changed := fastpathTV.DecMapInt16BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int16]bool) + fastpathTV.DecMapInt16BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt16BoolX(vp *map[int16]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt16BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[int16]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[int16]bool, xlen) + changed = true + } + + var mk int16 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int16(dd.DecodeInt(16)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]interface{}) + v, changed := fastpathTV.DecMapInt32IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]interface{}) + fastpathTV.DecMapInt32IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32IntfX(vp *map[int32]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[int32]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk int32 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]string) + v, changed := fastpathTV.DecMapInt32StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]string) + fastpathTV.DecMapInt32StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32StringX(vp *map[int32]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32StringV(v map[int32]string, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20) + v = make(map[int32]string, xlen) + changed = true + } + + var mk int32 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint) + v, changed := fastpathTV.DecMapInt32UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint) + fastpathTV.DecMapInt32UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32UintX(vp *map[int32]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]uint, xlen) + changed = true + } + + var mk int32 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint8) + v, changed := fastpathTV.DecMapInt32Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint8) + fastpathTV.DecMapInt32Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Uint8X(vp *map[int32]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int32]uint8, xlen) + changed = true + } + + var mk int32 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint16) + v, changed := fastpathTV.DecMapInt32Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint16) + fastpathTV.DecMapInt32Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Uint16X(vp *map[int32]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[int32]uint16, xlen) + changed = true + } + + var mk int32 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint32) + v, changed := fastpathTV.DecMapInt32Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint32) + fastpathTV.DecMapInt32Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Uint32X(vp *map[int32]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[int32]uint32, xlen) + changed = true + } + + var mk int32 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uint64) + v, changed := fastpathTV.DecMapInt32Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uint64) + fastpathTV.DecMapInt32Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Uint64X(vp *map[int32]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]uint64, xlen) + changed = true + } + + var mk int32 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]uintptr) + v, changed := fastpathTV.DecMapInt32UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]uintptr) + fastpathTV.DecMapInt32UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32UintptrX(vp *map[int32]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]uintptr, xlen) + changed = true + } + + var mk int32 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]int) + v, changed := fastpathTV.DecMapInt32IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]int) + fastpathTV.DecMapInt32IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32IntX(vp *map[int32]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32IntV(v map[int32]int, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]int, xlen) + changed = true + } + + var mk int32 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]int8) + v, changed := fastpathTV.DecMapInt32Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]int8) + fastpathTV.DecMapInt32Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Int8X(vp *map[int32]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int32]int8, xlen) + changed = true + } + + var mk int32 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]int16) + v, changed := fastpathTV.DecMapInt32Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]int16) + fastpathTV.DecMapInt32Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Int16X(vp *map[int32]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6) + v = make(map[int32]int16, xlen) + changed = true + } + + var mk int32 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]int32) + v, changed := fastpathTV.DecMapInt32Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]int32) + fastpathTV.DecMapInt32Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Int32X(vp *map[int32]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[int32]int32, xlen) + changed = true + } + + var mk int32 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]int64) + v, changed := fastpathTV.DecMapInt32Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]int64) + fastpathTV.DecMapInt32Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Int64X(vp *map[int32]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]int64, xlen) + changed = true + } + + var mk int32 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]float32) + v, changed := fastpathTV.DecMapInt32Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]float32) + fastpathTV.DecMapInt32Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Float32X(vp *map[int32]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8) + v = make(map[int32]float32, xlen) + changed = true + } + + var mk int32 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]float64) + v, changed := fastpathTV.DecMapInt32Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]float64) + fastpathTV.DecMapInt32Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32Float64X(vp *map[int32]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int32]float64, xlen) + changed = true + } + + var mk int32 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt32BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int32]bool) + v, changed := fastpathTV.DecMapInt32BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int32]bool) + fastpathTV.DecMapInt32BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt32BoolX(vp *map[int32]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt32BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[int32]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[int32]bool, xlen) + changed = true + } + + var mk int32 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = int32(dd.DecodeInt(32)) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64IntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]interface{}) + v, changed := fastpathTV.DecMapInt64IntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]interface{}) + fastpathTV.DecMapInt64IntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64IntfX(vp *map[int64]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64IntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[int64]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk int64 + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64StringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]string) + v, changed := fastpathTV.DecMapInt64StringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]string) + fastpathTV.DecMapInt64StringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64StringX(vp *map[int64]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64StringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64StringV(v map[int64]string, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24) + v = make(map[int64]string, xlen) + changed = true + } + + var mk int64 + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64UintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uint) + v, changed := fastpathTV.DecMapInt64UintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uint) + fastpathTV.DecMapInt64UintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64UintX(vp *map[int64]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64UintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]uint, xlen) + changed = true + } + + var mk int64 + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Uint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uint8) + v, changed := fastpathTV.DecMapInt64Uint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uint8) + fastpathTV.DecMapInt64Uint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Uint8X(vp *map[int64]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Uint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int64]uint8, xlen) + changed = true + } + + var mk int64 + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Uint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uint16) + v, changed := fastpathTV.DecMapInt64Uint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uint16) + fastpathTV.DecMapInt64Uint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Uint16X(vp *map[int64]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Uint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int64]uint16, xlen) + changed = true + } + + var mk int64 + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Uint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uint32) + v, changed := fastpathTV.DecMapInt64Uint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uint32) + fastpathTV.DecMapInt64Uint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Uint32X(vp *map[int64]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Uint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int64]uint32, xlen) + changed = true + } + + var mk int64 + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Uint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uint64) + v, changed := fastpathTV.DecMapInt64Uint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uint64) + fastpathTV.DecMapInt64Uint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Uint64X(vp *map[int64]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Uint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]uint64, xlen) + changed = true + } + + var mk int64 + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64UintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]uintptr) + v, changed := fastpathTV.DecMapInt64UintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]uintptr) + fastpathTV.DecMapInt64UintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64UintptrX(vp *map[int64]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64UintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]uintptr, xlen) + changed = true + } + + var mk int64 + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64IntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]int) + v, changed := fastpathTV.DecMapInt64IntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]int) + fastpathTV.DecMapInt64IntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64IntX(vp *map[int64]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64IntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64IntV(v map[int64]int, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]int, xlen) + changed = true + } + + var mk int64 + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Int8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]int8) + v, changed := fastpathTV.DecMapInt64Int8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]int8) + fastpathTV.DecMapInt64Int8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Int8X(vp *map[int64]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Int8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int64]int8, xlen) + changed = true + } + + var mk int64 + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Int16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]int16) + v, changed := fastpathTV.DecMapInt64Int16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]int16) + fastpathTV.DecMapInt64Int16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Int16X(vp *map[int64]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Int16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10) + v = make(map[int64]int16, xlen) + changed = true + } + + var mk int64 + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Int32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]int32) + v, changed := fastpathTV.DecMapInt64Int32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]int32) + fastpathTV.DecMapInt64Int32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Int32X(vp *map[int64]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Int32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int64]int32, xlen) + changed = true + } + + var mk int64 + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Int64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]int64) + v, changed := fastpathTV.DecMapInt64Int64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]int64) + fastpathTV.DecMapInt64Int64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Int64X(vp *map[int64]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Int64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]int64, xlen) + changed = true + } + + var mk int64 + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Float32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]float32) + v, changed := fastpathTV.DecMapInt64Float32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]float32) + fastpathTV.DecMapInt64Float32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Float32X(vp *map[int64]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Float32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12) + v = make(map[int64]float32, xlen) + changed = true + } + + var mk int64 + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64Float64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]float64) + v, changed := fastpathTV.DecMapInt64Float64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]float64) + fastpathTV.DecMapInt64Float64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64Float64X(vp *map[int64]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64Float64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16) + v = make(map[int64]float64, xlen) + changed = true + } + + var mk int64 + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapInt64BoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[int64]bool) + v, changed := fastpathTV.DecMapInt64BoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[int64]bool) + fastpathTV.DecMapInt64BoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapInt64BoolX(vp *map[int64]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapInt64BoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[int64]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[int64]bool, xlen) + changed = true + } + + var mk int64 + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeInt(64) + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolIntfR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]interface{}) + v, changed := fastpathTV.DecMapBoolIntfV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]interface{}) + fastpathTV.DecMapBoolIntfV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolIntfX(vp *map[bool]interface{}, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolIntfV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]interface{}, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[bool]interface{}, xlen) + changed = true + } + mapGet := !d.h.MapValueReset && !d.h.InterfaceReset + var mk bool + var mv interface{} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + if mapGet { + mv = v[mk] + } else { + mv = nil + } + d.decode(&mv) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolStringR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]string) + v, changed := fastpathTV.DecMapBoolStringV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]string) + fastpathTV.DecMapBoolStringV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolStringX(vp *map[bool]string, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolStringV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolStringV(v map[bool]string, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]string, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17) + v = make(map[bool]string, xlen) + changed = true + } + + var mk bool + var mv string + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeString() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolUintR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uint) + v, changed := fastpathTV.DecMapBoolUintV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uint) + fastpathTV.DecMapBoolUintV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUintX(vp *map[bool]uint, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUintV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uint, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]uint, xlen) + changed = true + } + + var mk bool + var mv uint + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolUint8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uint8) + v, changed := fastpathTV.DecMapBoolUint8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uint8) + fastpathTV.DecMapBoolUint8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUint8X(vp *map[bool]uint8, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUint8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uint8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[bool]uint8, xlen) + changed = true + } + + var mk bool + var mv uint8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint8(dd.DecodeUint(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolUint16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uint16) + v, changed := fastpathTV.DecMapBoolUint16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uint16) + fastpathTV.DecMapBoolUint16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUint16X(vp *map[bool]uint16, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUint16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uint16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[bool]uint16, xlen) + changed = true + } + + var mk bool + var mv uint16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint16(dd.DecodeUint(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolUint32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uint32) + v, changed := fastpathTV.DecMapBoolUint32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uint32) + fastpathTV.DecMapBoolUint32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUint32X(vp *map[bool]uint32, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUint32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uint32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[bool]uint32, xlen) + changed = true + } + + var mk bool + var mv uint32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uint32(dd.DecodeUint(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolUint64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uint64) + v, changed := fastpathTV.DecMapBoolUint64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uint64) + fastpathTV.DecMapBoolUint64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUint64X(vp *map[bool]uint64, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUint64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uint64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]uint64, xlen) + changed = true + } + + var mk bool + var mv uint64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeUint(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolUintptrR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]uintptr) + v, changed := fastpathTV.DecMapBoolUintptrV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]uintptr) + fastpathTV.DecMapBoolUintptrV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolUintptrX(vp *map[bool]uintptr, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolUintptrV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]uintptr, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]uintptr, xlen) + changed = true + } + + var mk bool + var mv uintptr + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = uintptr(dd.DecodeUint(uintBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolIntR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]int) + v, changed := fastpathTV.DecMapBoolIntV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]int) + fastpathTV.DecMapBoolIntV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolIntX(vp *map[bool]int, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolIntV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolIntV(v map[bool]int, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]int, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]int, xlen) + changed = true + } + + var mk bool + var mv int + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int(dd.DecodeInt(intBitsize)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolInt8R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]int8) + v, changed := fastpathTV.DecMapBoolInt8V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]int8) + fastpathTV.DecMapBoolInt8V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolInt8X(vp *map[bool]int8, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolInt8V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]int8, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[bool]int8, xlen) + changed = true + } + + var mk bool + var mv int8 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int8(dd.DecodeInt(8)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolInt16R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]int16) + v, changed := fastpathTV.DecMapBoolInt16V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]int16) + fastpathTV.DecMapBoolInt16V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolInt16X(vp *map[bool]int16, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolInt16V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]int16, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3) + v = make(map[bool]int16, xlen) + changed = true + } + + var mk bool + var mv int16 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int16(dd.DecodeInt(16)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolInt32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]int32) + v, changed := fastpathTV.DecMapBoolInt32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]int32) + fastpathTV.DecMapBoolInt32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolInt32X(vp *map[bool]int32, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolInt32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]int32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[bool]int32, xlen) + changed = true + } + + var mk bool + var mv int32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = int32(dd.DecodeInt(32)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolInt64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]int64) + v, changed := fastpathTV.DecMapBoolInt64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]int64) + fastpathTV.DecMapBoolInt64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolInt64X(vp *map[bool]int64, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolInt64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]int64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]int64, xlen) + changed = true + } + + var mk bool + var mv int64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeInt(64) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolFloat32R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]float32) + v, changed := fastpathTV.DecMapBoolFloat32V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]float32) + fastpathTV.DecMapBoolFloat32V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolFloat32X(vp *map[bool]float32, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolFloat32V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]float32, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5) + v = make(map[bool]float32, xlen) + changed = true + } + + var mk bool + var mv float32 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = float32(dd.DecodeFloat(true)) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolFloat64R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]float64) + v, changed := fastpathTV.DecMapBoolFloat64V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]float64) + fastpathTV.DecMapBoolFloat64V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolFloat64X(vp *map[bool]float64, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolFloat64V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]float64, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9) + v = make(map[bool]float64, xlen) + changed = true + } + + var mk bool + var mv float64 + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeFloat(false) + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} + +func (f *decFnInfo) fastpathDecMapBoolBoolR(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[bool]bool) + v, changed := fastpathTV.DecMapBoolBoolV(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[bool]bool) + fastpathTV.DecMapBoolBoolV(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) DecMapBoolBoolX(vp *map[bool]bool, checkNil bool, d *Decoder) { + v, changed := f.DecMapBoolBoolV(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, checkNil bool, canChange bool, + d *Decoder) (_ map[bool]bool, changed bool) { + dd := d.d + cr := d.cr + + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2) + v = make(map[bool]bool, xlen) + changed = true + } + + var mk bool + var mv bool + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { + cr.sendContainerState(containerMapKey) + } + mk = dd.DecodeBool() + if cr != nil { + cr.sendContainerState(containerMapValue) + } + mv = dd.DecodeBool() + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { + cr.sendContainerState(containerMapEnd) + } + return v, changed +} diff --git a/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl b/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl new file mode 100644 index 000000000..04c173fba --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl @@ -0,0 +1,540 @@ +// +build !notfastpath + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED from fast-path.go.tmpl +// ************************************************************ + +package codec + +// Fast path functions try to create a fast path encode or decode implementation +// for common maps and slices. +// +// We define the functions and register then in this single file +// so as not to pollute the encode.go and decode.go, and create a dependency in there. +// This file can be omitted without causing a build failure. +// +// The advantage of fast paths is: +// - Many calls bypass reflection altogether +// +// Currently support +// - slice of all builtin types, +// - map of all builtin types to string or interface value +// - symetrical maps of all builtin types (e.g. str-str, uint8-uint8) +// This should provide adequate "typical" implementations. +// +// Note that fast track decode functions must handle values for which an address cannot be obtained. +// For example: +// m2 := map[string]int{} +// p2 := []interface{}{m2} +// // decoding into p2 will bomb if fast track functions do not treat like unaddressable. +// + +import ( + "reflect" + "sort" +) + +const fastpathCheckNilFalse = false // for reflect +const fastpathCheckNilTrue = true // for type switch + +type fastpathT struct {} + +var fastpathTV fastpathT + +type fastpathE struct { + rtid uintptr + rt reflect.Type + encfn func(*encFnInfo, reflect.Value) + decfn func(*decFnInfo, reflect.Value) +} + +type fastpathA [{{ .FastpathLen }}]fastpathE + +func (x *fastpathA) index(rtid uintptr) int { + // use binary search to grab the index (adapted from sort/search.go) + h, i, j := 0, 0, {{ .FastpathLen }} // len(x) + for i < j { + h = i + (j-i)/2 + if x[h].rtid < rtid { + i = h + 1 + } else { + j = h + } + } + if i < {{ .FastpathLen }} && x[i].rtid == rtid { + return i + } + return -1 +} + +type fastpathAslice []fastpathE + +func (x fastpathAslice) Len() int { return len(x) } +func (x fastpathAslice) Less(i, j int) bool { return x[i].rtid < x[j].rtid } +func (x fastpathAslice) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +var fastpathAV fastpathA + +// due to possible initialization loop error, make fastpath in an init() +func init() { + if !fastpathEnabled { + return + } + i := 0 + fn := func(v interface{}, fe func(*encFnInfo, reflect.Value), fd func(*decFnInfo, reflect.Value)) (f fastpathE) { + xrt := reflect.TypeOf(v) + xptr := reflect.ValueOf(xrt).Pointer() + fastpathAV[i] = fastpathE{xptr, xrt, fe, fd} + i++ + return + } + + {{range .Values}}{{if not .Primitive}}{{if not .MapKey }} + fn([]{{ .Elem }}(nil), (*encFnInfo).{{ .MethodNamePfx "fastpathEnc" false }}R, (*decFnInfo).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} + + {{range .Values}}{{if not .Primitive}}{{if .MapKey }} + fn(map[{{ .MapKey }}]{{ .Elem }}(nil), (*encFnInfo).{{ .MethodNamePfx "fastpathEnc" false }}R, (*decFnInfo).{{ .MethodNamePfx "fastpathDec" false }}R){{end}}{{end}}{{end}} + + sort.Sort(fastpathAslice(fastpathAV[:])) +} + +// -- encode + +// -- -- fast path type switch +func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} + case []{{ .Elem }}:{{else}} + case map[{{ .MapKey }}]{{ .Elem }}:{{end}} + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e){{if not .MapKey }} + case *[]{{ .Elem }}:{{else}} + case *map[{{ .MapKey }}]{{ .Elem }}:{{end}} + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e) +{{end}}{{end}} + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} + case []{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e) + case *[]{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e) +{{end}}{{end}}{{end}} + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { +{{range .Values}}{{if not .Primitive}}{{if .MapKey }} + case map[{{ .MapKey }}]{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(v, fastpathCheckNilTrue, e) + case *map[{{ .MapKey }}]{{ .Elem }}: + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(*v, fastpathCheckNilTrue, e) +{{end}}{{end}}{{end}} + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +// -- -- fast path functions +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} + +func (f *encFnInfo) {{ .MethodNamePfx "fastpathEnc" false }}R(rv reflect.Value) { + if f.ti.mbs { + fastpathTV.{{ .MethodNamePfx "EncAsMap" false }}V(rv.Interface().([]{{ .Elem }}), fastpathCheckNilFalse, f.e) + } else { + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv.Interface().([]{{ .Elem }}), fastpathCheckNilFalse, f.e) + } +} +func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v []{{ .Elem }}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeArrayStart(len(v)) + for _, v2 := range v { + if cr != nil { cr.sendContainerState(containerArrayElem) } + {{ encmd .Elem "v2"}} + } + if cr != nil { cr.sendContainerState(containerArrayEnd) }{{/* ee.EncodeEnd() */}} +} + +func (_ fastpathT) {{ .MethodNamePfx "EncAsMap" false }}V(v []{{ .Elem }}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + if len(v)%2 == 1 { + e.errorf("mapBySlice requires even slice length, but got %v", len(v)) + return + } + ee.EncodeMapStart(len(v) / 2) + for j, v2 := range v { + if cr != nil { + if j%2 == 0 { + cr.sendContainerState(containerMapKey) + } else { + cr.sendContainerState(containerMapValue) + } + } + {{ encmd .Elem "v2"}} + } + if cr != nil { cr.sendContainerState(containerMapEnd) } +} + +{{end}}{{end}}{{end}} + +{{range .Values}}{{if not .Primitive}}{{if .MapKey }} + +func (f *encFnInfo) {{ .MethodNamePfx "fastpathEnc" false }}R(rv reflect.Value) { + fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv.Interface().(map[{{ .MapKey }}]{{ .Elem }}), fastpathCheckNilFalse, f.e) +} +func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, e *Encoder) { + ee := e.e + cr := e.cr + if checkNil && v == nil { + ee.EncodeNil() + return + } + ee.EncodeMapStart(len(v)) + {{if eq .MapKey "string"}}asSymbols := e.h.AsSymbols&AsSymbolMapStringKeysFlag != 0 + {{end}}if e.h.Canonical { + {{if eq .MapKey "interface{}"}}{{/* out of band + */}}var mksv []byte = make([]byte, 0, len(v)*16) // temporary byte slice for the encoding + e2 := NewEncoderBytes(&mksv, e.hh) + v2 := make([]bytesI, len(v)) + var i, l int + var vp *bytesI {{/* put loop variables outside. seems currently needed for better perf */}} + for k2, _ := range v { + l = len(mksv) + e2.MustEncode(k2) + vp = &v2[i] + vp.v = mksv[l:] + vp.i = k2 + i++ + } + sort.Sort(bytesISlice(v2)) + for j := range v2 { + if cr != nil { cr.sendContainerState(containerMapKey) } + e.asis(v2[j].v) + if cr != nil { cr.sendContainerState(containerMapValue) } + e.encode(v[v2[j].i]) + } {{else}}{{ $x := sorttype .MapKey true}}v2 := make([]{{ $x }}, len(v)) + var i int + for k, _ := range v { + v2[i] = {{ $x }}(k) + i++ + } + sort.Sort({{ sorttype .MapKey false}}(v2)) + for _, k2 := range v2 { + if cr != nil { cr.sendContainerState(containerMapKey) } + {{if eq .MapKey "string"}}if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + }{{else}}{{ $y := printf "%s(k2)" .MapKey }}{{ encmd .MapKey $y }}{{end}} + if cr != nil { cr.sendContainerState(containerMapValue) } + {{ $y := printf "v[%s(k2)]" .MapKey }}{{ encmd .Elem $y }} + } {{end}} + } else { + for k2, v2 := range v { + if cr != nil { cr.sendContainerState(containerMapKey) } + {{if eq .MapKey "string"}}if asSymbols { + ee.EncodeSymbol(k2) + } else { + ee.EncodeString(c_UTF8, k2) + }{{else}}{{ encmd .MapKey "k2"}}{{end}} + if cr != nil { cr.sendContainerState(containerMapValue) } + {{ encmd .Elem "v2"}} + } + } + if cr != nil { cr.sendContainerState(containerMapEnd) }{{/* ee.EncodeEnd() */}} +} + +{{end}}{{end}}{{end}} + +// -- decode + +// -- -- fast path type switch +func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { + if !fastpathEnabled { + return false + } + switch v := iv.(type) { +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} + case []{{ .Elem }}:{{else}} + case map[{{ .MapKey }}]{{ .Elem }}:{{end}} + fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, d){{if not .MapKey }} + case *[]{{ .Elem }}:{{else}} + case *map[{{ .MapKey }}]{{ .Elem }}:{{end}} + v2, changed2 := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*v, fastpathCheckNilFalse, true, d) + if changed2 { + *v = v2 + } +{{end}}{{end}} + default: + _ = v // TODO: workaround https://github.com/golang/go/issues/12927 (remove after go 1.6 release) + return false + } + return true +} + +// -- -- fast path functions +{{range .Values}}{{if not .Primitive}}{{if not .MapKey }} +{{/* +Slices can change if they +- did not come from an array +- are addressable (from a ptr) +- are settable (e.g. contained in an interface{}) +*/}} +func (f *decFnInfo) {{ .MethodNamePfx "fastpathDec" false }}R(rv reflect.Value) { + array := f.seq == seqTypeArray + if !array && rv.CanAddr() { {{/* // CanSet => CanAddr + Exported */}} + vp := rv.Addr().Interface().(*[]{{ .Elem }}) + v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, fastpathCheckNilFalse, !array, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().([]{{ .Elem }}) + fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, f.d) + } +} + +func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *[]{{ .Elem }}, checkNil bool, d *Decoder) { + v, changed := f.{{ .MethodNamePfx "Dec" false }}V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, checkNil bool, canChange bool, d *Decoder) (_ []{{ .Elem }}, changed bool) { + dd := d.d + {{/* // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() */}} + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + slh, containerLenS := d.decSliceHelperStart() + if containerLenS == 0 { + if canChange { + if v == nil { + v = []{{ .Elem }}{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + + if containerLenS > 0 { + x2read := containerLenS + var xtrunc bool + if containerLenS > cap(v) { + if canChange { {{/* + // fast-path is for "basic" immutable types, so no need to copy them over + // s := make([]{{ .Elem }}, decInferLen(containerLenS, d.h.MaxInitLen)) + // copy(s, v[:cap(v)]) + // v = s */}} + var xlen int + xlen, xtrunc = decInferLen(containerLenS, d.h.MaxInitLen, {{ .Size }}) + if xtrunc { + if xlen <= cap(v) { + v = v[:xlen] + } else { + v = make([]{{ .Elem }}, xlen) + } + } else { + v = make([]{{ .Elem }}, xlen) + } + changed = true + } else { + d.arrayCannotExpand(len(v), containerLenS) + } + x2read = len(v) + } else if containerLenS != len(v) { + if canChange { + v = v[:containerLenS] + changed = true + } + } {{/* // all checks done. cannot go past len. */}} + j := 0 + for ; j < x2read; j++ { + slh.ElemContainerState(j) + {{ if eq .Elem "interface{}" }}d.decode(&v[j]){{ else }}v[j] = {{ decmd .Elem }}{{ end }} + } + if xtrunc { {{/* // means canChange=true, changed=true already. */}} + for ; j < containerLenS; j++ { + v = append(v, {{ zerocmd .Elem }}) + slh.ElemContainerState(j) + {{ if eq .Elem "interface{}" }}d.decode(&v[j]){{ else }}v[j] = {{ decmd .Elem }}{{ end }} + } + } else if !canChange { + for ; j < containerLenS; j++ { + slh.ElemContainerState(j) + d.swallow() + } + } + } else { + breakFound := dd.CheckBreak() {{/* check break first, so we can initialize v with a capacity of 4 if necessary */}} + if breakFound { + if canChange { + if v == nil { + v = []{{ .Elem }}{} + } else if len(v) != 0 { + v = v[:0] + } + changed = true + } + slh.End() + return v, changed + } + if cap(v) == 0 { + v = make([]{{ .Elem }}, 1, 4) + changed = true + } + j := 0 + for ; !breakFound; j++ { + if j >= len(v) { + if canChange { + v = append(v, {{ zerocmd .Elem }}) + changed = true + } else { + d.arrayCannotExpand(len(v), j+1) + } + } + slh.ElemContainerState(j) + if j < len(v) { {{/* // all checks done. cannot go past len. */}} + {{ if eq .Elem "interface{}" }}d.decode(&v[j]) + {{ else }}v[j] = {{ decmd .Elem }}{{ end }} + } else { + d.swallow() + } + breakFound = dd.CheckBreak() + } + if canChange && j < len(v) { + v = v[:j] + changed = true + } + } + slh.End() + return v, changed +} + +{{end}}{{end}}{{end}} + + +{{range .Values}}{{if not .Primitive}}{{if .MapKey }} +{{/* +Maps can change if they are +- addressable (from a ptr) +- settable (e.g. contained in an interface{}) +*/}} +func (f *decFnInfo) {{ .MethodNamePfx "fastpathDec" false }}R(rv reflect.Value) { + if rv.CanAddr() { + vp := rv.Addr().Interface().(*map[{{ .MapKey }}]{{ .Elem }}) + v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, fastpathCheckNilFalse, true, f.d) + if changed { + *vp = v + } + } else { + v := rv.Interface().(map[{{ .MapKey }}]{{ .Elem }}) + fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, f.d) + } +} +func (f fastpathT) {{ .MethodNamePfx "Dec" false }}X(vp *map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, d *Decoder) { + v, changed := f.{{ .MethodNamePfx "Dec" false }}V(*vp, checkNil, true, d) + if changed { + *vp = v + } +} +func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, canChange bool, + d *Decoder) (_ map[{{ .MapKey }}]{{ .Elem }}, changed bool) { + dd := d.d + cr := d.cr + {{/* // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() */}} + if checkNil && dd.TryDecodeAsNil() { + if v != nil { + changed = true + } + return nil, changed + } + + containerLen := dd.ReadMapStart() + if canChange && v == nil { + xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, {{ .Size }}) + v = make(map[{{ .MapKey }}]{{ .Elem }}, xlen) + changed = true + } + {{ if eq .Elem "interface{}" }}mapGet := !d.h.MapValueReset && !d.h.InterfaceReset{{end}} + var mk {{ .MapKey }} + var mv {{ .Elem }} + if containerLen > 0 { + for j := 0; j < containerLen; j++ { + if cr != nil { cr.sendContainerState(containerMapKey) } + {{ if eq .MapKey "interface{}" }}mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) {{/* // maps cannot have []byte as key. switch to string. */}} + }{{ else }}mk = {{ decmd .MapKey }}{{ end }} + if cr != nil { cr.sendContainerState(containerMapValue) } + {{ if eq .Elem "interface{}" }}if mapGet { mv = v[mk] } else { mv = nil } + d.decode(&mv){{ else }}mv = {{ decmd .Elem }}{{ end }} + if v != nil { + v[mk] = mv + } + } + } else if containerLen < 0 { + for j := 0; !dd.CheckBreak(); j++ { + if cr != nil { cr.sendContainerState(containerMapKey) } + {{ if eq .MapKey "interface{}" }}mk = nil + d.decode(&mk) + if bv, bok := mk.([]byte); bok { + mk = d.string(bv) {{/* // maps cannot have []byte as key. switch to string. */}} + }{{ else }}mk = {{ decmd .MapKey }}{{ end }} + if cr != nil { cr.sendContainerState(containerMapValue) } + {{ if eq .Elem "interface{}" }}if mapGet { mv = v[mk] } else { mv = nil } + d.decode(&mv){{ else }}mv = {{ decmd .Elem }}{{ end }} + if v != nil { + v[mk] = mv + } + } + } + if cr != nil { cr.sendContainerState(containerMapEnd) } + return v, changed +} + +{{end}}{{end}}{{end}} diff --git a/vendor/github.com/ugorji/go/codec/fast-path.not.go b/vendor/github.com/ugorji/go/codec/fast-path.not.go new file mode 100644 index 000000000..d6f5f0c91 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/fast-path.not.go @@ -0,0 +1,32 @@ +// +build notfastpath + +package codec + +import "reflect" + +// The generated fast-path code is very large, and adds a few seconds to the build time. +// This causes test execution, execution of small tools which use codec, etc +// to take a long time. +// +// To mitigate, we now support the notfastpath tag. +// This tag disables fastpath during build, allowing for faster build, test execution, +// short-program runs, etc. + +func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { return false } +func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { return false } +func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { return false } +func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { return false } + +type fastpathT struct{} +type fastpathE struct { + rtid uintptr + rt reflect.Type + encfn func(*encFnInfo, reflect.Value) + decfn func(*decFnInfo, reflect.Value) +} +type fastpathA [0]fastpathE + +func (x fastpathA) index(rtid uintptr) int { return -1 } + +var fastpathAV fastpathA +var fastpathTV fastpathT diff --git a/vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl b/vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl new file mode 100644 index 000000000..32df54144 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl @@ -0,0 +1,104 @@ +{{var "v"}} := {{if not isArray}}*{{end}}{{ .Varname }} +{{var "h"}}, {{var "l"}} := z.DecSliceHelperStart() {{/* // helper, containerLenS */}}{{if not isArray}} +var {{var "c"}} bool {{/* // changed */}} +_ = {{var "c"}}{{end}} +if {{var "l"}} == 0 { + {{if isSlice }}if {{var "v"}} == nil { + {{var "v"}} = []{{ .Typ }}{} + {{var "c"}} = true + } else if len({{var "v"}}) != 0 { + {{var "v"}} = {{var "v"}}[:0] + {{var "c"}} = true + } {{end}} {{if isChan }}if {{var "v"}} == nil { + {{var "v"}} = make({{ .CTyp }}, 0) + {{var "c"}} = true + } {{end}} +} else if {{var "l"}} > 0 { + {{if isChan }}if {{var "v"}} == nil { + {{var "rl"}}, _ = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) + {{var "v"}} = make({{ .CTyp }}, {{var "rl"}}) + {{var "c"}} = true + } + for {{var "r"}} := 0; {{var "r"}} < {{var "l"}}; {{var "r"}}++ { + {{var "h"}}.ElemContainerState({{var "r"}}) + var {{var "t"}} {{ .Typ }} + {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} + {{var "v"}} <- {{var "t"}} + } + {{ else }} var {{var "rr"}}, {{var "rl"}} int {{/* // num2read, length of slice/array/chan */}} + var {{var "rt"}} bool {{/* truncated */}} + _, _ = {{var "rl"}}, {{var "rt"}} + {{var "rr"}} = {{var "l"}} // len({{var "v"}}) + if {{var "l"}} > cap({{var "v"}}) { + {{if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "l"}}) + {{ else }}{{if not .Immutable }} + {{var "rg"}} := len({{var "v"}}) > 0 + {{var "v2"}} := {{var "v"}} {{end}} + {{var "rl"}}, {{var "rt"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) + if {{var "rt"}} { + if {{var "rl"}} <= cap({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "rl"}}] + } else { + {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}}) + } + } else { + {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}}) + } + {{var "c"}} = true + {{var "rr"}} = len({{var "v"}}) {{if not .Immutable }} + if {{var "rg"}} { copy({{var "v"}}, {{var "v2"}}) } {{end}} {{end}}{{/* end not Immutable, isArray */}} + } {{if isSlice }} else if {{var "l"}} != len({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "l"}}] + {{var "c"}} = true + } {{end}} {{/* end isSlice:47 */}} + {{var "j"}} := 0 + for ; {{var "j"}} < {{var "rr"}} ; {{var "j"}}++ { + {{var "h"}}.ElemContainerState({{var "j"}}) + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } + {{if isArray }}for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + {{var "h"}}.ElemContainerState({{var "j"}}) + z.DecSwallow() + } + {{ else }}if {{var "rt"}} { + for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + {{var "v"}} = append({{var "v"}}, {{ zero}}) + {{var "h"}}.ElemContainerState({{var "j"}}) + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } + } {{end}} {{/* end isArray:56 */}} + {{end}} {{/* end isChan:16 */}} +} else { {{/* len < 0 */}} + {{var "j"}} := 0 + for ; !r.CheckBreak(); {{var "j"}}++ { + {{if isChan }} + {{var "h"}}.ElemContainerState({{var "j"}}) + var {{var "t"}} {{ .Typ }} + {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} + {{var "v"}} <- {{var "t"}} + {{ else }} + if {{var "j"}} >= len({{var "v"}}) { + {{if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "j"}}+1) + {{ else }}{{var "v"}} = append({{var "v"}}, {{zero}})// var {{var "z"}} {{ .Typ }} + {{var "c"}} = true {{end}} + } + {{var "h"}}.ElemContainerState({{var "j"}}) + if {{var "j"}} < len({{var "v"}}) { + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } else { + z.DecSwallow() + } + {{end}} + } + {{if isSlice }}if {{var "j"}} < len({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "j"}}] + {{var "c"}} = true + } else if {{var "j"}} == 0 && {{var "v"}} == nil { + {{var "v"}} = []{{ .Typ }}{} + {{var "c"}} = true + }{{end}} +} +{{var "h"}}.End() +{{if not isArray }}if {{var "c"}} { + *{{ .Varname }} = {{var "v"}} +}{{end}} diff --git a/vendor/github.com/ugorji/go/codec/gen-dec-map.go.tmpl b/vendor/github.com/ugorji/go/codec/gen-dec-map.go.tmpl new file mode 100644 index 000000000..77400e0a1 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/gen-dec-map.go.tmpl @@ -0,0 +1,58 @@ +{{var "v"}} := *{{ .Varname }} +{{var "l"}} := r.ReadMapStart() +{{var "bh"}} := z.DecBasicHandle() +if {{var "v"}} == nil { + {{var "rl"}}, _ := z.DecInferLen({{var "l"}}, {{var "bh"}}.MaxInitLen, {{ .Size }}) + {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "rl"}}) + *{{ .Varname }} = {{var "v"}} +} +var {{var "mk"}} {{ .KTyp }} +var {{var "mv"}} {{ .Typ }} +var {{var "mg"}} {{if decElemKindPtr}}, {{var "ms"}}, {{var "mok"}}{{end}} bool +if {{var "bh"}}.MapValueReset { + {{if decElemKindPtr}}{{var "mg"}} = true + {{else if decElemKindIntf}}if !{{var "bh"}}.InterfaceReset { {{var "mg"}} = true } + {{else if not decElemKindImmutable}}{{var "mg"}} = true + {{end}} } +if {{var "l"}} > 0 { +for {{var "j"}} := 0; {{var "j"}} < {{var "l"}}; {{var "j"}}++ { + z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) + {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} +{{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */}}if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { + {{var "mk"}} = string({{var "bv"}}) + }{{ end }}{{if decElemKindPtr}} + {{var "ms"}} = true{{end}} + if {{var "mg"}} { + {{if decElemKindPtr}}{{var "mv"}}, {{var "mok"}} = {{var "v"}}[{{var "mk"}}] + if {{var "mok"}} { + {{var "ms"}} = false + } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} + } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} + z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} + if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { + {{var "v"}}[{{var "mk"}}] = {{var "mv"}} + } +} +} else if {{var "l"}} < 0 { +for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ { + z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) + {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} +{{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */}}if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { + {{var "mk"}} = string({{var "bv"}}) + }{{ end }}{{if decElemKindPtr}} + {{var "ms"}} = true {{ end }} + if {{var "mg"}} { + {{if decElemKindPtr}}{{var "mv"}}, {{var "mok"}} = {{var "v"}}[{{var "mk"}}] + if {{var "mok"}} { + {{var "ms"}} = false + } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} + } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} + z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} + if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { + {{var "v"}}[{{var "mk"}}] = {{var "mv"}} + } +} +} // else len==0: TODO: Should we clear map entries? +z.DecSendContainerState(codecSelfer_containerMapEnd{{ .Sfx }}) diff --git a/vendor/github.com/ugorji/go/codec/gen-helper.generated.go b/vendor/github.com/ugorji/go/codec/gen-helper.generated.go new file mode 100644 index 000000000..22bce776b --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/gen-helper.generated.go @@ -0,0 +1,233 @@ +// //+build ignore + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED from gen-helper.go.tmpl +// ************************************************************ + +package codec + +import ( + "encoding" + "reflect" +) + +// This file is used to generate helper code for codecgen. +// The values here i.e. genHelper(En|De)coder are not to be used directly by +// library users. They WILL change continously and without notice. +// +// To help enforce this, we create an unexported type with exported members. +// The only way to get the type is via the one exported type that we control (somewhat). +// +// When static codecs are created for types, they will use this value +// to perform encoding or decoding of primitives or known slice or map types. + +// GenHelperEncoder is exported so that it can be used externally by codecgen. +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func GenHelperEncoder(e *Encoder) (genHelperEncoder, encDriver) { + return genHelperEncoder{e: e}, e.e +} + +// GenHelperDecoder is exported so that it can be used externally by codecgen. +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func GenHelperDecoder(d *Decoder) (genHelperDecoder, decDriver) { + return genHelperDecoder{d: d}, d.d +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +type genHelperEncoder struct { + e *Encoder + F fastpathT +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +type genHelperDecoder struct { + d *Decoder + F fastpathT +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBasicHandle() *BasicHandle { + return f.e.h +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBinary() bool { + return f.e.be // f.e.hh.isBinaryEncoding() +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncFallback(iv interface{}) { + // println(">>>>>>>>> EncFallback") + f.e.encodeI(iv, false, false) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncTextMarshal(iv encoding.TextMarshaler) { + bs, fnerr := iv.MarshalText() + f.e.marshal(bs, fnerr, false, c_UTF8) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncJSONMarshal(iv jsonMarshaler) { + bs, fnerr := iv.MarshalJSON() + f.e.marshal(bs, fnerr, true, c_UTF8) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBinaryMarshal(iv encoding.BinaryMarshaler) { + bs, fnerr := iv.MarshalBinary() + f.e.marshal(bs, fnerr, false, c_RAW) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) TimeRtidIfBinc() uintptr { + if _, ok := f.e.hh.(*BincHandle); ok { + return timeTypId + } + return 0 +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) IsJSONHandle() bool { + return f.e.js +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) HasExtensions() bool { + return len(f.e.h.extHandle) != 0 +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncExt(v interface{}) (r bool) { + rt := reflect.TypeOf(v) + if rt.Kind() == reflect.Ptr { + rt = rt.Elem() + } + rtid := reflect.ValueOf(rt).Pointer() + if xfFn := f.e.h.getExt(rtid); xfFn != nil { + f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext, f.e) + return true + } + return false +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncSendContainerState(c containerState) { + if f.e.cr != nil { + f.e.cr.sendContainerState(c) + } +} + +// ---------------- DECODER FOLLOWS ----------------- + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBasicHandle() *BasicHandle { + return f.d.h +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBinary() bool { + return f.d.be // f.d.hh.isBinaryEncoding() +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSwallow() { + f.d.swallow() +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecScratchBuffer() []byte { + return f.d.b[:] +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecFallback(iv interface{}, chkPtr bool) { + // println(">>>>>>>>> DecFallback") + f.d.decodeI(iv, chkPtr, false, false, false) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSliceHelperStart() (decSliceHelper, int) { + return f.d.decSliceHelperStart() +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecStructFieldNotFound(index int, name string) { + f.d.structFieldNotFound(index, name) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayCannotExpand(sliceLen, streamLen int) { + f.d.arrayCannotExpand(sliceLen, streamLen) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecTextUnmarshal(tm encoding.TextUnmarshaler) { + fnerr := tm.UnmarshalText(f.d.d.DecodeBytes(f.d.b[:], true, true)) + if fnerr != nil { + panic(fnerr) + } +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecJSONUnmarshal(tm jsonUnmarshaler) { + // bs := f.dd.DecodeBytes(f.d.b[:], true, true) + // grab the bytes to be read, as UnmarshalJSON needs the full JSON so as to unmarshal it itself. + fnerr := tm.UnmarshalJSON(f.d.nextValueBytes()) + if fnerr != nil { + panic(fnerr) + } +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBinaryUnmarshal(bm encoding.BinaryUnmarshaler) { + fnerr := bm.UnmarshalBinary(f.d.d.DecodeBytes(nil, false, true)) + if fnerr != nil { + panic(fnerr) + } +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) TimeRtidIfBinc() uintptr { + if _, ok := f.d.hh.(*BincHandle); ok { + return timeTypId + } + return 0 +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) IsJSONHandle() bool { + return f.d.js +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) HasExtensions() bool { + return len(f.d.h.extHandle) != 0 +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecExt(v interface{}) (r bool) { + rt := reflect.TypeOf(v).Elem() + rtid := reflect.ValueOf(rt).Pointer() + if xfFn := f.d.h.getExt(rtid); xfFn != nil { + f.d.d.DecodeExt(v, xfFn.tag, xfFn.ext) + return true + } + return false +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int, truncated bool) { + return decInferLen(clen, maxlen, unit) +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSendContainerState(c containerState) { + if f.d.cr != nil { + f.d.cr.sendContainerState(c) + } +} diff --git a/vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl b/vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl new file mode 100644 index 000000000..31958574f --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl @@ -0,0 +1,364 @@ +// //+build ignore + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED from gen-helper.go.tmpl +// ************************************************************ + +package codec + +import ( + "encoding" + "reflect" +) + +// This file is used to generate helper code for codecgen. +// The values here i.e. genHelper(En|De)coder are not to be used directly by +// library users. They WILL change continously and without notice. +// +// To help enforce this, we create an unexported type with exported members. +// The only way to get the type is via the one exported type that we control (somewhat). +// +// When static codecs are created for types, they will use this value +// to perform encoding or decoding of primitives or known slice or map types. + +// GenHelperEncoder is exported so that it can be used externally by codecgen. +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func GenHelperEncoder(e *Encoder) (genHelperEncoder, encDriver) { + return genHelperEncoder{e:e}, e.e +} + +// GenHelperDecoder is exported so that it can be used externally by codecgen. +// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE. +func GenHelperDecoder(d *Decoder) (genHelperDecoder, decDriver) { + return genHelperDecoder{d:d}, d.d +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +type genHelperEncoder struct { + e *Encoder + F fastpathT +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +type genHelperDecoder struct { + d *Decoder + F fastpathT +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBasicHandle() *BasicHandle { + return f.e.h +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBinary() bool { + return f.e.be // f.e.hh.isBinaryEncoding() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncFallback(iv interface{}) { + // println(">>>>>>>>> EncFallback") + f.e.encodeI(iv, false, false) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncTextMarshal(iv encoding.TextMarshaler) { + bs, fnerr := iv.MarshalText() + f.e.marshal(bs, fnerr, false, c_UTF8) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncJSONMarshal(iv jsonMarshaler) { + bs, fnerr := iv.MarshalJSON() + f.e.marshal(bs, fnerr, true, c_UTF8) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBinaryMarshal(iv encoding.BinaryMarshaler) { + bs, fnerr := iv.MarshalBinary() + f.e.marshal(bs, fnerr, false, c_RAW) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) TimeRtidIfBinc() uintptr { + if _, ok := f.e.hh.(*BincHandle); ok { + return timeTypId + } + return 0 +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) IsJSONHandle() bool { + return f.e.js +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) HasExtensions() bool { + return len(f.e.h.extHandle) != 0 +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncExt(v interface{}) (r bool) { + rt := reflect.TypeOf(v) + if rt.Kind() == reflect.Ptr { + rt = rt.Elem() + } + rtid := reflect.ValueOf(rt).Pointer() + if xfFn := f.e.h.getExt(rtid); xfFn != nil { + f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext, f.e) + return true + } + return false +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncSendContainerState(c containerState) { + if f.e.cr != nil { + f.e.cr.sendContainerState(c) + } +} + +// ---------------- DECODER FOLLOWS ----------------- + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBasicHandle() *BasicHandle { + return f.d.h +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBinary() bool { + return f.d.be // f.d.hh.isBinaryEncoding() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSwallow() { + f.d.swallow() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecScratchBuffer() []byte { + return f.d.b[:] +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecFallback(iv interface{}, chkPtr bool) { + // println(">>>>>>>>> DecFallback") + f.d.decodeI(iv, chkPtr, false, false, false) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSliceHelperStart() (decSliceHelper, int) { + return f.d.decSliceHelperStart() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecStructFieldNotFound(index int, name string) { + f.d.structFieldNotFound(index, name) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayCannotExpand(sliceLen, streamLen int) { + f.d.arrayCannotExpand(sliceLen, streamLen) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecTextUnmarshal(tm encoding.TextUnmarshaler) { + fnerr := tm.UnmarshalText(f.d.d.DecodeBytes(f.d.b[:], true, true)) + if fnerr != nil { + panic(fnerr) + } +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecJSONUnmarshal(tm jsonUnmarshaler) { + // bs := f.dd.DecodeBytes(f.d.b[:], true, true) + // grab the bytes to be read, as UnmarshalJSON needs the full JSON so as to unmarshal it itself. + fnerr := tm.UnmarshalJSON(f.d.nextValueBytes()) + if fnerr != nil { + panic(fnerr) + } +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBinaryUnmarshal(bm encoding.BinaryUnmarshaler) { + fnerr := bm.UnmarshalBinary(f.d.d.DecodeBytes(nil, false, true)) + if fnerr != nil { + panic(fnerr) + } +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) TimeRtidIfBinc() uintptr { + if _, ok := f.d.hh.(*BincHandle); ok { + return timeTypId + } + return 0 +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) IsJSONHandle() bool { + return f.d.js +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) HasExtensions() bool { + return len(f.d.h.extHandle) != 0 +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecExt(v interface{}) (r bool) { + rt := reflect.TypeOf(v).Elem() + rtid := reflect.ValueOf(rt).Pointer() + if xfFn := f.d.h.getExt(rtid); xfFn != nil { + f.d.d.DecodeExt(v, xfFn.tag, xfFn.ext) + return true + } + return false +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int, truncated bool) { + return decInferLen(clen, maxlen, unit) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecSendContainerState(c containerState) { + if f.d.cr != nil { + f.d.cr.sendContainerState(c) + } +} + +{{/* + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncDriver() encDriver { + return f.e.e +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecDriver() decDriver { + return f.d.d +} + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncNil() { + f.e.e.EncodeNil() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncBytes(v []byte) { + f.e.e.EncodeStringBytes(c_RAW, v) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncArrayStart(length int) { + f.e.e.EncodeArrayStart(length) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncArrayEnd() { + f.e.e.EncodeArrayEnd() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncArrayEntrySeparator() { + f.e.e.EncodeArrayEntrySeparator() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncMapStart(length int) { + f.e.e.EncodeMapStart(length) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncMapEnd() { + f.e.e.EncodeMapEnd() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncMapEntrySeparator() { + f.e.e.EncodeMapEntrySeparator() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) EncMapKVSeparator() { + f.e.e.EncodeMapKVSeparator() +} + +// --------- + +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecBytes(v *[]byte) { + *v = f.d.d.DecodeBytes(*v) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecTryNil() bool { + return f.d.d.TryDecodeAsNil() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecContainerIsNil() (b bool) { + return f.d.d.IsContainerType(valueTypeNil) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecContainerIsMap() (b bool) { + return f.d.d.IsContainerType(valueTypeMap) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecContainerIsArray() (b bool) { + return f.d.d.IsContainerType(valueTypeArray) +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecCheckBreak() bool { + return f.d.d.CheckBreak() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecMapStart() int { + return f.d.d.ReadMapStart() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayStart() int { + return f.d.d.ReadArrayStart() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecMapEnd() { + f.d.d.ReadMapEnd() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayEnd() { + f.d.d.ReadArrayEnd() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecArrayEntrySeparator() { + f.d.d.ReadArrayEntrySeparator() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecMapEntrySeparator() { + f.d.d.ReadMapEntrySeparator() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) DecMapKVSeparator() { + f.d.d.ReadMapKVSeparator() +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) ReadStringAsBytes(bs []byte) []byte { + return f.d.d.DecodeStringAsBytes(bs) +} + + +// -- encode calls (primitives) +{{range .Values}}{{if .Primitive }}{{if ne .Primitive "interface{}" }} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) {{ .MethodNamePfx "Enc" true }}(v {{ .Primitive }}) { + ee := f.e.e + {{ encmd .Primitive "v" }} +} +{{ end }}{{ end }}{{ end }} + +// -- decode calls (primitives) +{{range .Values}}{{if .Primitive }}{{if ne .Primitive "interface{}" }} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) {{ .MethodNamePfx "Dec" true }}(vp *{{ .Primitive }}) { + dd := f.d.d + *vp = {{ decmd .Primitive }} +} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperDecoder) {{ .MethodNamePfx "Read" true }}() (v {{ .Primitive }}) { + dd := f.d.d + v = {{ decmd .Primitive }} + return +} +{{ end }}{{ end }}{{ end }} + + +// -- encode calls (slices/maps) +{{range .Values}}{{if not .Primitive }}{{if .Slice }} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) {{ .MethodNamePfx "Enc" false }}(v []{{ .Elem }}) { {{ else }} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +func (f genHelperEncoder) {{ .MethodNamePfx "Enc" false }}(v map[{{ .MapKey }}]{{ .Elem }}) { {{end}} + f.F.{{ .MethodNamePfx "Enc" false }}V(v, false, f.e) +} +{{ end }}{{ end }} + +// -- decode calls (slices/maps) +{{range .Values}}{{if not .Primitive }} +// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE* +{{if .Slice }}func (f genHelperDecoder) {{ .MethodNamePfx "Dec" false }}(vp *[]{{ .Elem }}) { +{{else}}func (f genHelperDecoder) {{ .MethodNamePfx "Dec" false }}(vp *map[{{ .MapKey }}]{{ .Elem }}) { {{end}} + v, changed := f.F.{{ .MethodNamePfx "Dec" false }}V(*vp, false, true, f.d) + if changed { + *vp = v + } +} +{{ end }}{{ end }} +*/}} diff --git a/vendor/github.com/ugorji/go/codec/gen.generated.go b/vendor/github.com/ugorji/go/codec/gen.generated.go new file mode 100644 index 000000000..2ace97b78 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/gen.generated.go @@ -0,0 +1,175 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// DO NOT EDIT. THIS FILE IS AUTO-GENERATED FROM gen-dec-(map|array).go.tmpl + +const genDecMapTmpl = ` +{{var "v"}} := *{{ .Varname }} +{{var "l"}} := r.ReadMapStart() +{{var "bh"}} := z.DecBasicHandle() +if {{var "v"}} == nil { + {{var "rl"}}, _ := z.DecInferLen({{var "l"}}, {{var "bh"}}.MaxInitLen, {{ .Size }}) + {{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "rl"}}) + *{{ .Varname }} = {{var "v"}} +} +var {{var "mk"}} {{ .KTyp }} +var {{var "mv"}} {{ .Typ }} +var {{var "mg"}} {{if decElemKindPtr}}, {{var "ms"}}, {{var "mok"}}{{end}} bool +if {{var "bh"}}.MapValueReset { + {{if decElemKindPtr}}{{var "mg"}} = true + {{else if decElemKindIntf}}if !{{var "bh"}}.InterfaceReset { {{var "mg"}} = true } + {{else if not decElemKindImmutable}}{{var "mg"}} = true + {{end}} } +if {{var "l"}} > 0 { +for {{var "j"}} := 0; {{var "j"}} < {{var "l"}}; {{var "j"}}++ { + z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) + {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} +{{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */}}if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { + {{var "mk"}} = string({{var "bv"}}) + }{{ end }}{{if decElemKindPtr}} + {{var "ms"}} = true{{end}} + if {{var "mg"}} { + {{if decElemKindPtr}}{{var "mv"}}, {{var "mok"}} = {{var "v"}}[{{var "mk"}}] + if {{var "mok"}} { + {{var "ms"}} = false + } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} + } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} + z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} + if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { + {{var "v"}}[{{var "mk"}}] = {{var "mv"}} + } +} +} else if {{var "l"}} < 0 { +for {{var "j"}} := 0; !r.CheckBreak(); {{var "j"}}++ { + z.DecSendContainerState(codecSelfer_containerMapKey{{ .Sfx }}) + {{ $x := printf "%vmk%v" .TempVar .Rand }}{{ decLineVarK $x }} +{{ if eq .KTyp "interface{}" }}{{/* // special case if a byte array. */}}if {{var "bv"}}, {{var "bok"}} := {{var "mk"}}.([]byte); {{var "bok"}} { + {{var "mk"}} = string({{var "bv"}}) + }{{ end }}{{if decElemKindPtr}} + {{var "ms"}} = true {{ end }} + if {{var "mg"}} { + {{if decElemKindPtr}}{{var "mv"}}, {{var "mok"}} = {{var "v"}}[{{var "mk"}}] + if {{var "mok"}} { + {{var "ms"}} = false + } {{else}}{{var "mv"}} = {{var "v"}}[{{var "mk"}}] {{end}} + } {{if not decElemKindImmutable}}else { {{var "mv"}} = {{decElemZero}} }{{end}} + z.DecSendContainerState(codecSelfer_containerMapValue{{ .Sfx }}) + {{ $x := printf "%vmv%v" .TempVar .Rand }}{{ decLineVar $x }} + if {{if decElemKindPtr}} {{var "ms"}} && {{end}} {{var "v"}} != nil { + {{var "v"}}[{{var "mk"}}] = {{var "mv"}} + } +} +} // else len==0: TODO: Should we clear map entries? +z.DecSendContainerState(codecSelfer_containerMapEnd{{ .Sfx }}) +` + +const genDecListTmpl = ` +{{var "v"}} := {{if not isArray}}*{{end}}{{ .Varname }} +{{var "h"}}, {{var "l"}} := z.DecSliceHelperStart() {{/* // helper, containerLenS */}}{{if not isArray}} +var {{var "c"}} bool {{/* // changed */}} +_ = {{var "c"}}{{end}} +if {{var "l"}} == 0 { + {{if isSlice }}if {{var "v"}} == nil { + {{var "v"}} = []{{ .Typ }}{} + {{var "c"}} = true + } else if len({{var "v"}}) != 0 { + {{var "v"}} = {{var "v"}}[:0] + {{var "c"}} = true + } {{end}} {{if isChan }}if {{var "v"}} == nil { + {{var "v"}} = make({{ .CTyp }}, 0) + {{var "c"}} = true + } {{end}} +} else if {{var "l"}} > 0 { + {{if isChan }}if {{var "v"}} == nil { + {{var "rl"}}, _ = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) + {{var "v"}} = make({{ .CTyp }}, {{var "rl"}}) + {{var "c"}} = true + } + for {{var "r"}} := 0; {{var "r"}} < {{var "l"}}; {{var "r"}}++ { + {{var "h"}}.ElemContainerState({{var "r"}}) + var {{var "t"}} {{ .Typ }} + {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} + {{var "v"}} <- {{var "t"}} + } + {{ else }} var {{var "rr"}}, {{var "rl"}} int {{/* // num2read, length of slice/array/chan */}} + var {{var "rt"}} bool {{/* truncated */}} + _, _ = {{var "rl"}}, {{var "rt"}} + {{var "rr"}} = {{var "l"}} // len({{var "v"}}) + if {{var "l"}} > cap({{var "v"}}) { + {{if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "l"}}) + {{ else }}{{if not .Immutable }} + {{var "rg"}} := len({{var "v"}}) > 0 + {{var "v2"}} := {{var "v"}} {{end}} + {{var "rl"}}, {{var "rt"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }}) + if {{var "rt"}} { + if {{var "rl"}} <= cap({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "rl"}}] + } else { + {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}}) + } + } else { + {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}}) + } + {{var "c"}} = true + {{var "rr"}} = len({{var "v"}}) {{if not .Immutable }} + if {{var "rg"}} { copy({{var "v"}}, {{var "v2"}}) } {{end}} {{end}}{{/* end not Immutable, isArray */}} + } {{if isSlice }} else if {{var "l"}} != len({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "l"}}] + {{var "c"}} = true + } {{end}} {{/* end isSlice:47 */}} + {{var "j"}} := 0 + for ; {{var "j"}} < {{var "rr"}} ; {{var "j"}}++ { + {{var "h"}}.ElemContainerState({{var "j"}}) + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } + {{if isArray }}for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + {{var "h"}}.ElemContainerState({{var "j"}}) + z.DecSwallow() + } + {{ else }}if {{var "rt"}} { + for ; {{var "j"}} < {{var "l"}} ; {{var "j"}}++ { + {{var "v"}} = append({{var "v"}}, {{ zero}}) + {{var "h"}}.ElemContainerState({{var "j"}}) + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } + } {{end}} {{/* end isArray:56 */}} + {{end}} {{/* end isChan:16 */}} +} else { {{/* len < 0 */}} + {{var "j"}} := 0 + for ; !r.CheckBreak(); {{var "j"}}++ { + {{if isChan }} + {{var "h"}}.ElemContainerState({{var "j"}}) + var {{var "t"}} {{ .Typ }} + {{ $x := printf "%st%s" .TempVar .Rand }}{{ decLineVar $x }} + {{var "v"}} <- {{var "t"}} + {{ else }} + if {{var "j"}} >= len({{var "v"}}) { + {{if isArray }}z.DecArrayCannotExpand(len({{var "v"}}), {{var "j"}}+1) + {{ else }}{{var "v"}} = append({{var "v"}}, {{zero}})// var {{var "z"}} {{ .Typ }} + {{var "c"}} = true {{end}} + } + {{var "h"}}.ElemContainerState({{var "j"}}) + if {{var "j"}} < len({{var "v"}}) { + {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }} + } else { + z.DecSwallow() + } + {{end}} + } + {{if isSlice }}if {{var "j"}} < len({{var "v"}}) { + {{var "v"}} = {{var "v"}}[:{{var "j"}}] + {{var "c"}} = true + } else if {{var "j"}} == 0 && {{var "v"}} == nil { + {{var "v"}} = []{{ .Typ }}{} + {{var "c"}} = true + }{{end}} +} +{{var "h"}}.End() +{{if not isArray }}if {{var "c"}} { + *{{ .Varname }} = {{var "v"}} +}{{end}} +` + diff --git a/vendor/github.com/ugorji/go/codec/gen.go b/vendor/github.com/ugorji/go/codec/gen.go new file mode 100644 index 000000000..ac8cc6ddc --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/gen.go @@ -0,0 +1,1995 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "bytes" + "encoding/base64" + "errors" + "fmt" + "go/format" + "io" + "io/ioutil" + "math/rand" + "reflect" + "regexp" + "sort" + "strconv" + "strings" + "sync" + "text/template" + "time" + "unicode" + "unicode/utf8" +) + +// --------------------------------------------------- +// codecgen supports the full cycle of reflection-based codec: +// - RawExt +// - Builtins +// - Extensions +// - (Binary|Text|JSON)(Unm|M)arshal +// - generic by-kind +// +// This means that, for dynamic things, we MUST use reflection to at least get the reflect.Type. +// In those areas, we try to only do reflection or interface-conversion when NECESSARY: +// - Extensions, only if Extensions are configured. +// +// However, codecgen doesn't support the following: +// - Canonical option. (codecgen IGNORES it currently) +// This is just because it has not been implemented. +// +// During encode/decode, Selfer takes precedence. +// A type implementing Selfer will know how to encode/decode itself statically. +// +// The following field types are supported: +// array: [n]T +// slice: []T +// map: map[K]V +// primitive: [u]int[n], float(32|64), bool, string +// struct +// +// --------------------------------------------------- +// Note that a Selfer cannot call (e|d).(En|De)code on itself, +// as this will cause a circular reference, as (En|De)code will call Selfer methods. +// Any type that implements Selfer must implement completely and not fallback to (En|De)code. +// +// In addition, code in this file manages the generation of fast-path implementations of +// encode/decode of slices/maps of primitive keys/values. +// +// Users MUST re-generate their implementations whenever the code shape changes. +// The generated code will panic if it was generated with a version older than the supporting library. +// --------------------------------------------------- +// +// codec framework is very feature rich. +// When encoding or decoding into an interface, it depends on the runtime type of the interface. +// The type of the interface may be a named type, an extension, etc. +// Consequently, we fallback to runtime codec for encoding/decoding interfaces. +// In addition, we fallback for any value which cannot be guaranteed at runtime. +// This allows us support ANY value, including any named types, specifically those which +// do not implement our interfaces (e.g. Selfer). +// +// This explains some slowness compared to other code generation codecs (e.g. msgp). +// This reduction in speed is only seen when your refers to interfaces, +// e.g. type T struct { A interface{}; B []interface{}; C map[string]interface{} } +// +// codecgen will panic if the file was generated with an old version of the library in use. +// +// Note: +// It was a concious decision to have gen.go always explicitly call EncodeNil or TryDecodeAsNil. +// This way, there isn't a function call overhead just to see that we should not enter a block of code. + +// GenVersion is the current version of codecgen. +// +// NOTE: Increment this value each time codecgen changes fundamentally. +// Fundamental changes are: +// - helper methods change (signature change, new ones added, some removed, etc) +// - codecgen command line changes +// +// v1: Initial Version +// v2: +// v3: Changes for Kubernetes: +// changes in signature of some unpublished helper methods and codecgen cmdline arguments. +// v4: Removed separator support from (en|de)cDriver, and refactored codec(gen) +// v5: changes to support faster json decoding. Let encoder/decoder maintain state of collections. +const GenVersion = 5 + +const ( + genCodecPkg = "codec1978" + genTempVarPfx = "yy" + genTopLevelVarName = "x" + + // ignore canBeNil parameter, and always set to true. + // This is because nil can appear anywhere, so we should always check. + genAnythingCanBeNil = true + + // if genUseOneFunctionForDecStructMap, make a single codecDecodeSelferFromMap function; + // else make codecDecodeSelferFromMap{LenPrefix,CheckBreak} so that conditionals + // are not executed a lot. + // + // From testing, it didn't make much difference in runtime, so keep as true (one function only) + genUseOneFunctionForDecStructMap = true +) + +type genStructMapStyle uint8 + +const ( + genStructMapStyleConsolidated genStructMapStyle = iota + genStructMapStyleLenPrefix + genStructMapStyleCheckBreak +) + +var ( + genAllTypesSamePkgErr = errors.New("All types must be in the same package") + genExpectArrayOrMapErr = errors.New("unexpected type. Expecting array/map/slice") + genBase64enc = base64.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__") + genQNameRegex = regexp.MustCompile(`[A-Za-z_.]+`) + genCheckVendor bool +) + +// genRunner holds some state used during a Gen run. +type genRunner struct { + w io.Writer // output + c uint64 // counter used for generating varsfx + t []reflect.Type // list of types to run selfer on + + tc reflect.Type // currently running selfer on this type + te map[uintptr]bool // types for which the encoder has been created + td map[uintptr]bool // types for which the decoder has been created + cp string // codec import path + + im map[string]reflect.Type // imports to add + imn map[string]string // package names of imports to add + imc uint64 // counter for import numbers + + is map[reflect.Type]struct{} // types seen during import search + bp string // base PkgPath, for which we are generating for + + cpfx string // codec package prefix + unsafe bool // is unsafe to be used in generated code? + + tm map[reflect.Type]struct{} // types for which enc/dec must be generated + ts []reflect.Type // types for which enc/dec must be generated + + xs string // top level variable/constant suffix + hn string // fn helper type name + + ti *TypeInfos + // rr *rand.Rand // random generator for file-specific types +} + +// Gen will write a complete go file containing Selfer implementations for each +// type passed. All the types must be in the same package. +// +// Library users: *DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE.* +func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, ti *TypeInfos, typ ...reflect.Type) { + // trim out all types which already implement Selfer + typ2 := make([]reflect.Type, 0, len(typ)) + for _, t := range typ { + if reflect.PtrTo(t).Implements(selferTyp) || t.Implements(selferTyp) { + continue + } + typ2 = append(typ2, t) + } + typ = typ2 + + if len(typ) == 0 { + return + } + x := genRunner{ + unsafe: useUnsafe, + w: w, + t: typ, + te: make(map[uintptr]bool), + td: make(map[uintptr]bool), + im: make(map[string]reflect.Type), + imn: make(map[string]string), + is: make(map[reflect.Type]struct{}), + tm: make(map[reflect.Type]struct{}), + ts: []reflect.Type{}, + bp: genImportPath(typ[0]), + xs: uid, + ti: ti, + } + if x.ti == nil { + x.ti = defTypeInfos + } + if x.xs == "" { + rr := rand.New(rand.NewSource(time.Now().UnixNano())) + x.xs = strconv.FormatInt(rr.Int63n(9999), 10) + } + + // gather imports first: + x.cp = genImportPath(reflect.TypeOf(x)) + x.imn[x.cp] = genCodecPkg + for _, t := range typ { + // fmt.Printf("###########: PkgPath: '%v', Name: '%s'\n", genImportPath(t), t.Name()) + if genImportPath(t) != x.bp { + panic(genAllTypesSamePkgErr) + } + x.genRefPkgs(t) + } + if buildTags != "" { + x.line("//+build " + buildTags) + x.line("") + } + x.line(` + +// ************************************************************ +// DO NOT EDIT. +// THIS FILE IS AUTO-GENERATED BY codecgen. +// ************************************************************ + +`) + x.line("package " + pkgName) + x.line("") + x.line("import (") + if x.cp != x.bp { + x.cpfx = genCodecPkg + "." + x.linef("%s \"%s\"", genCodecPkg, x.cp) + } + // use a sorted set of im keys, so that we can get consistent output + imKeys := make([]string, 0, len(x.im)) + for k, _ := range x.im { + imKeys = append(imKeys, k) + } + sort.Strings(imKeys) + for _, k := range imKeys { // for k, _ := range x.im { + x.linef("%s \"%s\"", x.imn[k], k) + } + // add required packages + for _, k := range [...]string{"reflect", "unsafe", "runtime", "fmt", "errors"} { + if _, ok := x.im[k]; !ok { + if k == "unsafe" && !x.unsafe { + continue + } + x.line("\"" + k + "\"") + } + } + x.line(")") + x.line("") + + x.line("const (") + x.linef("// ----- content types ----") + x.linef("codecSelferC_UTF8%s = %v", x.xs, int64(c_UTF8)) + x.linef("codecSelferC_RAW%s = %v", x.xs, int64(c_RAW)) + x.linef("// ----- value types used ----") + x.linef("codecSelferValueTypeArray%s = %v", x.xs, int64(valueTypeArray)) + x.linef("codecSelferValueTypeMap%s = %v", x.xs, int64(valueTypeMap)) + x.linef("// ----- containerStateValues ----") + x.linef("codecSelfer_containerMapKey%s = %v", x.xs, int64(containerMapKey)) + x.linef("codecSelfer_containerMapValue%s = %v", x.xs, int64(containerMapValue)) + x.linef("codecSelfer_containerMapEnd%s = %v", x.xs, int64(containerMapEnd)) + x.linef("codecSelfer_containerArrayElem%s = %v", x.xs, int64(containerArrayElem)) + x.linef("codecSelfer_containerArrayEnd%s = %v", x.xs, int64(containerArrayEnd)) + x.line(")") + x.line("var (") + x.line("codecSelferBitsize" + x.xs + " = uint8(reflect.TypeOf(uint(0)).Bits())") + x.line("codecSelferOnlyMapOrArrayEncodeToStructErr" + x.xs + " = errors.New(`only encoded map or array can be decoded into a struct`)") + x.line(")") + x.line("") + + if x.unsafe { + x.line("type codecSelferUnsafeString" + x.xs + " struct { Data uintptr; Len int}") + x.line("") + } + x.hn = "codecSelfer" + x.xs + x.line("type " + x.hn + " struct{}") + x.line("") + + x.varsfxreset() + x.line("func init() {") + x.linef("if %sGenVersion != %v {", x.cpfx, GenVersion) + x.line("_, file, _, _ := runtime.Caller(0)") + x.line(`err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v", `) + x.linef(`%v, %sGenVersion, file)`, GenVersion, x.cpfx) + x.line("panic(err)") + x.linef("}") + x.line("if false { // reference the types, but skip this branch at build/run time") + var n int + // for k, t := range x.im { + for _, k := range imKeys { + t := x.im[k] + x.linef("var v%v %s.%s", n, x.imn[k], t.Name()) + n++ + } + if x.unsafe { + x.linef("var v%v unsafe.Pointer", n) + n++ + } + if n > 0 { + x.out("_") + for i := 1; i < n; i++ { + x.out(", _") + } + x.out(" = v0") + for i := 1; i < n; i++ { + x.outf(", v%v", i) + } + } + x.line("} ") // close if false + x.line("}") // close init + x.line("") + + // generate rest of type info + for _, t := range typ { + x.tc = t + x.selfer(true) + x.selfer(false) + } + + for _, t := range x.ts { + rtid := reflect.ValueOf(t).Pointer() + // generate enc functions for all these slice/map types. + x.varsfxreset() + x.linef("func (x %s) enc%s(v %s%s, e *%sEncoder) {", x.hn, x.genMethodNameT(t), x.arr2str(t, "*"), x.genTypeName(t), x.cpfx) + x.genRequiredMethodVars(true) + switch t.Kind() { + case reflect.Array, reflect.Slice, reflect.Chan: + x.encListFallback("v", t) + case reflect.Map: + x.encMapFallback("v", t) + default: + panic(genExpectArrayOrMapErr) + } + x.line("}") + x.line("") + + // generate dec functions for all these slice/map types. + x.varsfxreset() + x.linef("func (x %s) dec%s(v *%s, d *%sDecoder) {", x.hn, x.genMethodNameT(t), x.genTypeName(t), x.cpfx) + x.genRequiredMethodVars(false) + switch t.Kind() { + case reflect.Array, reflect.Slice, reflect.Chan: + x.decListFallback("v", rtid, t) + case reflect.Map: + x.decMapFallback("v", rtid, t) + default: + panic(genExpectArrayOrMapErr) + } + x.line("}") + x.line("") + } + + x.line("") +} + +func (x *genRunner) checkForSelfer(t reflect.Type, varname string) bool { + // return varname != genTopLevelVarName && t != x.tc + // the only time we checkForSelfer is if we are not at the TOP of the generated code. + return varname != genTopLevelVarName +} + +func (x *genRunner) arr2str(t reflect.Type, s string) string { + if t.Kind() == reflect.Array { + return s + } + return "" +} + +func (x *genRunner) genRequiredMethodVars(encode bool) { + x.line("var h " + x.hn) + if encode { + x.line("z, r := " + x.cpfx + "GenHelperEncoder(e)") + } else { + x.line("z, r := " + x.cpfx + "GenHelperDecoder(d)") + } + x.line("_, _, _ = h, z, r") +} + +func (x *genRunner) genRefPkgs(t reflect.Type) { + if _, ok := x.is[t]; ok { + return + } + // fmt.Printf(">>>>>>: PkgPath: '%v', Name: '%s'\n", genImportPath(t), t.Name()) + x.is[t] = struct{}{} + tpkg, tname := genImportPath(t), t.Name() + if tpkg != "" && tpkg != x.bp && tpkg != x.cp && tname != "" && tname[0] >= 'A' && tname[0] <= 'Z' { + if _, ok := x.im[tpkg]; !ok { + x.im[tpkg] = t + if idx := strings.LastIndex(tpkg, "/"); idx < 0 { + x.imn[tpkg] = tpkg + } else { + x.imc++ + x.imn[tpkg] = "pkg" + strconv.FormatUint(x.imc, 10) + "_" + genGoIdentifier(tpkg[idx+1:], false) + } + } + } + switch t.Kind() { + case reflect.Array, reflect.Slice, reflect.Ptr, reflect.Chan: + x.genRefPkgs(t.Elem()) + case reflect.Map: + x.genRefPkgs(t.Elem()) + x.genRefPkgs(t.Key()) + case reflect.Struct: + for i := 0; i < t.NumField(); i++ { + if fname := t.Field(i).Name; fname != "" && fname[0] >= 'A' && fname[0] <= 'Z' { + x.genRefPkgs(t.Field(i).Type) + } + } + } +} + +func (x *genRunner) line(s string) { + x.out(s) + if len(s) == 0 || s[len(s)-1] != '\n' { + x.out("\n") + } +} + +func (x *genRunner) varsfx() string { + x.c++ + return strconv.FormatUint(x.c, 10) +} + +func (x *genRunner) varsfxreset() { + x.c = 0 +} + +func (x *genRunner) out(s string) { + if _, err := io.WriteString(x.w, s); err != nil { + panic(err) + } +} + +func (x *genRunner) linef(s string, params ...interface{}) { + x.line(fmt.Sprintf(s, params...)) +} + +func (x *genRunner) outf(s string, params ...interface{}) { + x.out(fmt.Sprintf(s, params...)) +} + +func (x *genRunner) genTypeName(t reflect.Type) (n string) { + // defer func() { fmt.Printf(">>>> ####: genTypeName: t: %v, name: '%s'\n", t, n) }() + + // if the type has a PkgPath, which doesn't match the current package, + // then include it. + // We cannot depend on t.String() because it includes current package, + // or t.PkgPath because it includes full import path, + // + var ptrPfx string + for t.Kind() == reflect.Ptr { + ptrPfx += "*" + t = t.Elem() + } + if tn := t.Name(); tn != "" { + return ptrPfx + x.genTypeNamePrim(t) + } + switch t.Kind() { + case reflect.Map: + return ptrPfx + "map[" + x.genTypeName(t.Key()) + "]" + x.genTypeName(t.Elem()) + case reflect.Slice: + return ptrPfx + "[]" + x.genTypeName(t.Elem()) + case reflect.Array: + return ptrPfx + "[" + strconv.FormatInt(int64(t.Len()), 10) + "]" + x.genTypeName(t.Elem()) + case reflect.Chan: + return ptrPfx + t.ChanDir().String() + " " + x.genTypeName(t.Elem()) + default: + if t == intfTyp { + return ptrPfx + "interface{}" + } else { + return ptrPfx + x.genTypeNamePrim(t) + } + } +} + +func (x *genRunner) genTypeNamePrim(t reflect.Type) (n string) { + if t.Name() == "" { + return t.String() + } else if genImportPath(t) == "" || genImportPath(t) == genImportPath(x.tc) { + return t.Name() + } else { + return x.imn[genImportPath(t)] + "." + t.Name() + // return t.String() // best way to get the package name inclusive + } +} + +func (x *genRunner) genZeroValueR(t reflect.Type) string { + // if t is a named type, w + switch t.Kind() { + case reflect.Ptr, reflect.Interface, reflect.Chan, reflect.Func, + reflect.Slice, reflect.Map, reflect.Invalid: + return "nil" + case reflect.Bool: + return "false" + case reflect.String: + return `""` + case reflect.Struct, reflect.Array: + return x.genTypeName(t) + "{}" + default: // all numbers + return "0" + } +} + +func (x *genRunner) genMethodNameT(t reflect.Type) (s string) { + return genMethodNameT(t, x.tc) +} + +func (x *genRunner) selfer(encode bool) { + t := x.tc + t0 := t + // always make decode use a pointer receiver, + // and structs always use a ptr receiver (encode|decode) + isptr := !encode || t.Kind() == reflect.Struct + x.varsfxreset() + fnSigPfx := "func (x " + if isptr { + fnSigPfx += "*" + } + fnSigPfx += x.genTypeName(t) + + x.out(fnSigPfx) + if isptr { + t = reflect.PtrTo(t) + } + if encode { + x.line(") CodecEncodeSelf(e *" + x.cpfx + "Encoder) {") + x.genRequiredMethodVars(true) + // x.enc(genTopLevelVarName, t) + x.encVar(genTopLevelVarName, t) + } else { + x.line(") CodecDecodeSelf(d *" + x.cpfx + "Decoder) {") + x.genRequiredMethodVars(false) + // do not use decVar, as there is no need to check TryDecodeAsNil + // or way to elegantly handle that, and also setting it to a + // non-nil value doesn't affect the pointer passed. + // x.decVar(genTopLevelVarName, t, false) + x.dec(genTopLevelVarName, t0) + } + x.line("}") + x.line("") + + if encode || t0.Kind() != reflect.Struct { + return + } + + // write is containerMap + if genUseOneFunctionForDecStructMap { + x.out(fnSigPfx) + x.line(") codecDecodeSelfFromMap(l int, d *" + x.cpfx + "Decoder) {") + x.genRequiredMethodVars(false) + x.decStructMap(genTopLevelVarName, "l", reflect.ValueOf(t0).Pointer(), t0, genStructMapStyleConsolidated) + x.line("}") + x.line("") + } else { + x.out(fnSigPfx) + x.line(") codecDecodeSelfFromMapLenPrefix(l int, d *" + x.cpfx + "Decoder) {") + x.genRequiredMethodVars(false) + x.decStructMap(genTopLevelVarName, "l", reflect.ValueOf(t0).Pointer(), t0, genStructMapStyleLenPrefix) + x.line("}") + x.line("") + + x.out(fnSigPfx) + x.line(") codecDecodeSelfFromMapCheckBreak(l int, d *" + x.cpfx + "Decoder) {") + x.genRequiredMethodVars(false) + x.decStructMap(genTopLevelVarName, "l", reflect.ValueOf(t0).Pointer(), t0, genStructMapStyleCheckBreak) + x.line("}") + x.line("") + } + + // write containerArray + x.out(fnSigPfx) + x.line(") codecDecodeSelfFromArray(l int, d *" + x.cpfx + "Decoder) {") + x.genRequiredMethodVars(false) + x.decStructArray(genTopLevelVarName, "l", "return", reflect.ValueOf(t0).Pointer(), t0) + x.line("}") + x.line("") + +} + +// used for chan, array, slice, map +func (x *genRunner) xtraSM(varname string, encode bool, t reflect.Type) { + if encode { + x.linef("h.enc%s((%s%s)(%s), e)", x.genMethodNameT(t), x.arr2str(t, "*"), x.genTypeName(t), varname) + } else { + x.linef("h.dec%s((*%s)(%s), d)", x.genMethodNameT(t), x.genTypeName(t), varname) + } + x.registerXtraT(t) +} + +func (x *genRunner) registerXtraT(t reflect.Type) { + // recursively register the types + if _, ok := x.tm[t]; ok { + return + } + var tkey reflect.Type + switch t.Kind() { + case reflect.Chan, reflect.Slice, reflect.Array: + case reflect.Map: + tkey = t.Key() + default: + return + } + x.tm[t] = struct{}{} + x.ts = append(x.ts, t) + // check if this refers to any xtra types eg. a slice of array: add the array + x.registerXtraT(t.Elem()) + if tkey != nil { + x.registerXtraT(tkey) + } +} + +// encVar will encode a variable. +// The parameter, t, is the reflect.Type of the variable itself +func (x *genRunner) encVar(varname string, t reflect.Type) { + // fmt.Printf(">>>>>> varname: %s, t: %v\n", varname, t) + var checkNil bool + switch t.Kind() { + case reflect.Ptr, reflect.Interface, reflect.Slice, reflect.Map, reflect.Chan: + checkNil = true + } + if checkNil { + x.linef("if %s == nil { r.EncodeNil() } else { ", varname) + } + switch t.Kind() { + case reflect.Ptr: + switch t.Elem().Kind() { + case reflect.Struct, reflect.Array: + x.enc(varname, genNonPtr(t)) + default: + i := x.varsfx() + x.line(genTempVarPfx + i + " := *" + varname) + x.enc(genTempVarPfx+i, genNonPtr(t)) + } + case reflect.Struct, reflect.Array: + i := x.varsfx() + x.line(genTempVarPfx + i + " := &" + varname) + x.enc(genTempVarPfx+i, t) + default: + x.enc(varname, t) + } + + if checkNil { + x.line("}") + } + +} + +// enc will encode a variable (varname) of type t, +// except t is of kind reflect.Struct or reflect.Array, wherein varname is of type ptrTo(T) (to prevent copying) +func (x *genRunner) enc(varname string, t reflect.Type) { + rtid := reflect.ValueOf(t).Pointer() + // We call CodecEncodeSelf if one of the following are honored: + // - the type already implements Selfer, call that + // - the type has a Selfer implementation just created, use that + // - the type is in the list of the ones we will generate for, but it is not currently being generated + + mi := x.varsfx() + tptr := reflect.PtrTo(t) + tk := t.Kind() + if x.checkForSelfer(t, varname) { + if tk == reflect.Array || tk == reflect.Struct { // varname is of type *T + if tptr.Implements(selferTyp) || t.Implements(selferTyp) { + x.line(varname + ".CodecEncodeSelf(e)") + return + } + } else { // varname is of type T + if t.Implements(selferTyp) { + x.line(varname + ".CodecEncodeSelf(e)") + return + } else if tptr.Implements(selferTyp) { + x.linef("%ssf%s := &%s", genTempVarPfx, mi, varname) + x.linef("%ssf%s.CodecEncodeSelf(e)", genTempVarPfx, mi) + return + } + } + + if _, ok := x.te[rtid]; ok { + x.line(varname + ".CodecEncodeSelf(e)") + return + } + } + + inlist := false + for _, t0 := range x.t { + if t == t0 { + inlist = true + if x.checkForSelfer(t, varname) { + x.line(varname + ".CodecEncodeSelf(e)") + return + } + break + } + } + + var rtidAdded bool + if t == x.tc { + x.te[rtid] = true + rtidAdded = true + } + + // check if + // - type is RawExt + // - the type implements (Text|JSON|Binary)(Unm|M)arshal + x.linef("%sm%s := z.EncBinary()", genTempVarPfx, mi) + x.linef("_ = %sm%s", genTempVarPfx, mi) + x.line("if false {") //start if block + defer func() { x.line("}") }() //end if block + + if t == rawExtTyp { + x.linef("} else { r.EncodeRawExt(%v, e)", varname) + return + } + // HACK: Support for Builtins. + // Currently, only Binc supports builtins, and the only builtin type is time.Time. + // Have a method that returns the rtid for time.Time if Handle is Binc. + if t == timeTyp { + vrtid := genTempVarPfx + "m" + x.varsfx() + x.linef("} else if %s := z.TimeRtidIfBinc(); %s != 0 { ", vrtid, vrtid) + x.linef("r.EncodeBuiltin(%s, %s)", vrtid, varname) + } + // only check for extensions if the type is named, and has a packagePath. + if genImportPath(t) != "" && t.Name() != "" { + // first check if extensions are configued, before doing the interface conversion + x.linef("} else if z.HasExtensions() && z.EncExt(%s) {", varname) + } + if tk == reflect.Array || tk == reflect.Struct { // varname is of type *T + if t.Implements(binaryMarshalerTyp) || tptr.Implements(binaryMarshalerTyp) { + x.linef("} else if %sm%s { z.EncBinaryMarshal(%v) ", genTempVarPfx, mi, varname) + } + if t.Implements(jsonMarshalerTyp) || tptr.Implements(jsonMarshalerTyp) { + x.linef("} else if !%sm%s && z.IsJSONHandle() { z.EncJSONMarshal(%v) ", genTempVarPfx, mi, varname) + } else if t.Implements(textMarshalerTyp) || tptr.Implements(textMarshalerTyp) { + x.linef("} else if !%sm%s { z.EncTextMarshal(%v) ", genTempVarPfx, mi, varname) + } + } else { // varname is of type T + if t.Implements(binaryMarshalerTyp) { + x.linef("} else if %sm%s { z.EncBinaryMarshal(%v) ", genTempVarPfx, mi, varname) + } else if tptr.Implements(binaryMarshalerTyp) { + x.linef("} else if %sm%s { z.EncBinaryMarshal(&%v) ", genTempVarPfx, mi, varname) + } + if t.Implements(jsonMarshalerTyp) { + x.linef("} else if !%sm%s && z.IsJSONHandle() { z.EncJSONMarshal(%v) ", genTempVarPfx, mi, varname) + } else if tptr.Implements(jsonMarshalerTyp) { + x.linef("} else if !%sm%s && z.IsJSONHandle() { z.EncJSONMarshal(&%v) ", genTempVarPfx, mi, varname) + } else if t.Implements(textMarshalerTyp) { + x.linef("} else if !%sm%s { z.EncTextMarshal(%v) ", genTempVarPfx, mi, varname) + } else if tptr.Implements(textMarshalerTyp) { + x.linef("} else if !%sm%s { z.EncTextMarshal(&%v) ", genTempVarPfx, mi, varname) + } + } + x.line("} else {") + + switch t.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + x.line("r.EncodeInt(int64(" + varname + "))") + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + x.line("r.EncodeUint(uint64(" + varname + "))") + case reflect.Float32: + x.line("r.EncodeFloat32(float32(" + varname + "))") + case reflect.Float64: + x.line("r.EncodeFloat64(float64(" + varname + "))") + case reflect.Bool: + x.line("r.EncodeBool(bool(" + varname + "))") + case reflect.String: + x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + ", string(" + varname + "))") + case reflect.Chan: + x.xtraSM(varname, true, t) + // x.encListFallback(varname, rtid, t) + case reflect.Array: + x.xtraSM(varname, true, t) + case reflect.Slice: + // if nil, call dedicated function + // if a []uint8, call dedicated function + // if a known fastpath slice, call dedicated function + // else write encode function in-line. + // - if elements are primitives or Selfers, call dedicated function on each member. + // - else call Encoder.encode(XXX) on it. + if rtid == uint8SliceTypId { + x.line("r.EncodeStringBytes(codecSelferC_RAW" + x.xs + ", []byte(" + varname + "))") + } else if fastpathAV.index(rtid) != -1 { + g := x.newGenV(t) + x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", false, e)") + } else { + x.xtraSM(varname, true, t) + // x.encListFallback(varname, rtid, t) + } + case reflect.Map: + // if nil, call dedicated function + // if a known fastpath map, call dedicated function + // else write encode function in-line. + // - if elements are primitives or Selfers, call dedicated function on each member. + // - else call Encoder.encode(XXX) on it. + // x.line("if " + varname + " == nil { \nr.EncodeNil()\n } else { ") + if fastpathAV.index(rtid) != -1 { + g := x.newGenV(t) + x.line("z.F." + g.MethodNamePfx("Enc", false) + "V(" + varname + ", false, e)") + } else { + x.xtraSM(varname, true, t) + // x.encMapFallback(varname, rtid, t) + } + case reflect.Struct: + if !inlist { + delete(x.te, rtid) + x.line("z.EncFallback(" + varname + ")") + break + } + x.encStruct(varname, rtid, t) + default: + if rtidAdded { + delete(x.te, rtid) + } + x.line("z.EncFallback(" + varname + ")") + } +} + +func (x *genRunner) encZero(t reflect.Type) { + switch t.Kind() { + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + x.line("r.EncodeInt(0)") + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + x.line("r.EncodeUint(0)") + case reflect.Float32: + x.line("r.EncodeFloat32(0)") + case reflect.Float64: + x.line("r.EncodeFloat64(0)") + case reflect.Bool: + x.line("r.EncodeBool(false)") + case reflect.String: + x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + `, "")`) + default: + x.line("r.EncodeNil()") + } +} + +func (x *genRunner) encStruct(varname string, rtid uintptr, t reflect.Type) { + // Use knowledge from structfieldinfo (mbs, encodable fields. Ignore omitempty. ) + // replicate code in kStruct i.e. for each field, deref type to non-pointer, and call x.enc on it + + // if t === type currently running selfer on, do for all + ti := x.ti.get(rtid, t) + i := x.varsfx() + sepVarname := genTempVarPfx + "sep" + i + numfieldsvar := genTempVarPfx + "q" + i + ti2arrayvar := genTempVarPfx + "r" + i + struct2arrvar := genTempVarPfx + "2arr" + i + + x.line(sepVarname + " := !z.EncBinary()") + x.linef("%s := z.EncBasicHandle().StructToArray", struct2arrvar) + tisfi := ti.sfip // always use sequence from file. decStruct expects same thing. + // due to omitEmpty, we need to calculate the + // number of non-empty things we write out first. + // This is required as we need to pre-determine the size of the container, + // to support length-prefixing. + x.linef("var %s [%v]bool", numfieldsvar, len(tisfi)) + x.linef("_, _, _ = %s, %s, %s", sepVarname, numfieldsvar, struct2arrvar) + x.linef("const %s bool = %v", ti2arrayvar, ti.toArray) + nn := 0 + for j, si := range tisfi { + if !si.omitEmpty { + nn++ + continue + } + var t2 reflect.StructField + var omitline string + if si.i != -1 { + t2 = t.Field(int(si.i)) + } else { + t2typ := t + varname3 := varname + for _, ix := range si.is { + for t2typ.Kind() == reflect.Ptr { + t2typ = t2typ.Elem() + } + t2 = t2typ.Field(ix) + t2typ = t2.Type + varname3 = varname3 + "." + t2.Name + if t2typ.Kind() == reflect.Ptr { + omitline += varname3 + " != nil && " + } + } + } + // never check omitEmpty on a struct type, as it may contain uncomparable map/slice/etc. + // also, for maps/slices/arrays, check if len ! 0 (not if == zero value) + switch t2.Type.Kind() { + case reflect.Struct: + omitline += " true" + case reflect.Map, reflect.Slice, reflect.Array, reflect.Chan: + omitline += "len(" + varname + "." + t2.Name + ") != 0" + default: + omitline += varname + "." + t2.Name + " != " + x.genZeroValueR(t2.Type) + } + x.linef("%s[%v] = %s", numfieldsvar, j, omitline) + } + x.linef("var %snn%s int", genTempVarPfx, i) + x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray { + x.line("r.EncodeArrayStart(" + strconv.FormatInt(int64(len(tisfi)), 10) + ")") + x.linef("} else {") // if not ti.toArray + x.linef("%snn%s = %v", genTempVarPfx, i, nn) + x.linef("for _, b := range %s { if b { %snn%s++ } }", numfieldsvar, genTempVarPfx, i) + x.linef("r.EncodeMapStart(%snn%s)", genTempVarPfx, i) + x.linef("%snn%s = %v", genTempVarPfx, i, 0) + // x.line("r.EncodeMapStart(" + strconv.FormatInt(int64(len(tisfi)), 10) + ")") + x.line("}") // close if not StructToArray + + for j, si := range tisfi { + i := x.varsfx() + isNilVarName := genTempVarPfx + "n" + i + var labelUsed bool + var t2 reflect.StructField + if si.i != -1 { + t2 = t.Field(int(si.i)) + } else { + t2typ := t + varname3 := varname + for _, ix := range si.is { + // fmt.Printf("%%%% %v, ix: %v\n", t2typ, ix) + for t2typ.Kind() == reflect.Ptr { + t2typ = t2typ.Elem() + } + t2 = t2typ.Field(ix) + t2typ = t2.Type + varname3 = varname3 + "." + t2.Name + if t2typ.Kind() == reflect.Ptr { + if !labelUsed { + x.line("var " + isNilVarName + " bool") + } + x.line("if " + varname3 + " == nil { " + isNilVarName + " = true ") + x.line("goto LABEL" + i) + x.line("}") + labelUsed = true + // "varname3 = new(" + x.genTypeName(t3.Elem()) + ") }") + } + } + // t2 = t.FieldByIndex(si.is) + } + if labelUsed { + x.line("LABEL" + i + ":") + } + // if the type of the field is a Selfer, or one of the ones + + x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray + if labelUsed { + x.line("if " + isNilVarName + " { r.EncodeNil() } else { ") + } + x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + if si.omitEmpty { + x.linef("if %s[%v] {", numfieldsvar, j) + } + x.encVar(varname+"."+t2.Name, t2.Type) + if si.omitEmpty { + x.linef("} else {") + x.encZero(t2.Type) + x.linef("}") + } + if labelUsed { + x.line("}") + } + + x.linef("} else {") // if not ti.toArray + + if si.omitEmpty { + x.linef("if %s[%v] {", numfieldsvar, j) + } + x.linef("z.EncSendContainerState(codecSelfer_containerMapKey%s)", x.xs) + x.line("r.EncodeString(codecSelferC_UTF8" + x.xs + ", string(\"" + si.encName + "\"))") + x.linef("z.EncSendContainerState(codecSelfer_containerMapValue%s)", x.xs) + if labelUsed { + x.line("if " + isNilVarName + " { r.EncodeNil() } else { ") + x.encVar(varname+"."+t2.Name, t2.Type) + x.line("}") + } else { + x.encVar(varname+"."+t2.Name, t2.Type) + } + if si.omitEmpty { + x.line("}") + } + x.linef("} ") // end if/else ti.toArray + } + x.linef("if %s || %s {", ti2arrayvar, struct2arrvar) // if ti.toArray { + x.linef("z.EncSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) + x.line("} else {") + x.linef("z.EncSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) + x.line("}") + +} + +func (x *genRunner) encListFallback(varname string, t reflect.Type) { + i := x.varsfx() + g := genTempVarPfx + x.line("r.EncodeArrayStart(len(" + varname + "))") + if t.Kind() == reflect.Chan { + x.linef("for %si%s, %si2%s := 0, len(%s); %si%s < %si2%s; %si%s++ {", g, i, g, i, varname, g, i, g, i, g, i) + x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + x.linef("%sv%s := <-%s", g, i, varname) + } else { + // x.linef("for %si%s, %sv%s := range %s {", genTempVarPfx, i, genTempVarPfx, i, varname) + x.linef("for _, %sv%s := range %s {", genTempVarPfx, i, varname) + x.linef("z.EncSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + } + x.encVar(genTempVarPfx+"v"+i, t.Elem()) + x.line("}") + x.linef("z.EncSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) +} + +func (x *genRunner) encMapFallback(varname string, t reflect.Type) { + // TODO: expand this to handle canonical. + i := x.varsfx() + x.line("r.EncodeMapStart(len(" + varname + "))") + x.linef("for %sk%s, %sv%s := range %s {", genTempVarPfx, i, genTempVarPfx, i, varname) + // x.line("for " + genTempVarPfx + "k" + i + ", " + genTempVarPfx + "v" + i + " := range " + varname + " {") + x.linef("z.EncSendContainerState(codecSelfer_containerMapKey%s)", x.xs) + x.encVar(genTempVarPfx+"k"+i, t.Key()) + x.linef("z.EncSendContainerState(codecSelfer_containerMapValue%s)", x.xs) + x.encVar(genTempVarPfx+"v"+i, t.Elem()) + x.line("}") + x.linef("z.EncSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) +} + +func (x *genRunner) decVar(varname string, t reflect.Type, canBeNil bool) { + // We only encode as nil if a nillable value. + // This removes some of the wasted checks for TryDecodeAsNil. + // We need to think about this more, to see what happens if omitempty, etc + // cause a nil value to be stored when something is expected. + // This could happen when decoding from a struct encoded as an array. + // For that, decVar should be called with canNil=true, to force true as its value. + i := x.varsfx() + if !canBeNil { + canBeNil = genAnythingCanBeNil || !genIsImmutable(t) + } + if canBeNil { + x.line("if r.TryDecodeAsNil() {") + if t.Kind() == reflect.Ptr { + x.line("if " + varname + " != nil { ") + + // if varname is a field of a struct (has a dot in it), + // then just set it to nil + if strings.IndexByte(varname, '.') != -1 { + x.line(varname + " = nil") + } else { + x.line("*" + varname + " = " + x.genZeroValueR(t.Elem())) + } + x.line("}") + } else { + x.line(varname + " = " + x.genZeroValueR(t)) + } + x.line("} else {") + } else { + x.line("// cannot be nil") + } + if t.Kind() != reflect.Ptr { + if x.decTryAssignPrimitive(varname, t) { + x.line(genTempVarPfx + "v" + i + " := &" + varname) + x.dec(genTempVarPfx+"v"+i, t) + } + } else { + x.linef("if %s == nil { %s = new(%s) }", varname, varname, x.genTypeName(t.Elem())) + // Ensure we set underlying ptr to a non-nil value (so we can deref to it later). + // There's a chance of a **T in here which is nil. + var ptrPfx string + for t = t.Elem(); t.Kind() == reflect.Ptr; t = t.Elem() { + ptrPfx += "*" + x.linef("if %s%s == nil { %s%s = new(%s)}", + ptrPfx, varname, ptrPfx, varname, x.genTypeName(t)) + } + // if varname has [ in it, then create temp variable for this ptr thingie + if strings.Index(varname, "[") >= 0 { + varname2 := genTempVarPfx + "w" + i + x.line(varname2 + " := " + varname) + varname = varname2 + } + + if ptrPfx == "" { + x.dec(varname, t) + } else { + x.line(genTempVarPfx + "z" + i + " := " + ptrPfx + varname) + x.dec(genTempVarPfx+"z"+i, t) + } + + } + + if canBeNil { + x.line("} ") + } +} + +// dec will decode a variable (varname) of type ptrTo(t). +// t is always a basetype (i.e. not of kind reflect.Ptr). +func (x *genRunner) dec(varname string, t reflect.Type) { + // assumptions: + // - the varname is to a pointer already. No need to take address of it + // - t is always a baseType T (not a *T, etc). + rtid := reflect.ValueOf(t).Pointer() + tptr := reflect.PtrTo(t) + if x.checkForSelfer(t, varname) { + if t.Implements(selferTyp) || tptr.Implements(selferTyp) { + x.line(varname + ".CodecDecodeSelf(d)") + return + } + if _, ok := x.td[rtid]; ok { + x.line(varname + ".CodecDecodeSelf(d)") + return + } + } + + inlist := false + for _, t0 := range x.t { + if t == t0 { + inlist = true + if x.checkForSelfer(t, varname) { + x.line(varname + ".CodecDecodeSelf(d)") + return + } + break + } + } + + var rtidAdded bool + if t == x.tc { + x.td[rtid] = true + rtidAdded = true + } + + // check if + // - type is RawExt + // - the type implements (Text|JSON|Binary)(Unm|M)arshal + mi := x.varsfx() + x.linef("%sm%s := z.DecBinary()", genTempVarPfx, mi) + x.linef("_ = %sm%s", genTempVarPfx, mi) + x.line("if false {") //start if block + defer func() { x.line("}") }() //end if block + + if t == rawExtTyp { + x.linef("} else { r.DecodeExt(%v, 0, nil)", varname) + return + } + + // HACK: Support for Builtins. + // Currently, only Binc supports builtins, and the only builtin type is time.Time. + // Have a method that returns the rtid for time.Time if Handle is Binc. + if t == timeTyp { + vrtid := genTempVarPfx + "m" + x.varsfx() + x.linef("} else if %s := z.TimeRtidIfBinc(); %s != 0 { ", vrtid, vrtid) + x.linef("r.DecodeBuiltin(%s, %s)", vrtid, varname) + } + // only check for extensions if the type is named, and has a packagePath. + if genImportPath(t) != "" && t.Name() != "" { + // first check if extensions are configued, before doing the interface conversion + x.linef("} else if z.HasExtensions() && z.DecExt(%s) {", varname) + } + + if t.Implements(binaryUnmarshalerTyp) || tptr.Implements(binaryUnmarshalerTyp) { + x.linef("} else if %sm%s { z.DecBinaryUnmarshal(%v) ", genTempVarPfx, mi, varname) + } + if t.Implements(jsonUnmarshalerTyp) || tptr.Implements(jsonUnmarshalerTyp) { + x.linef("} else if !%sm%s && z.IsJSONHandle() { z.DecJSONUnmarshal(%v)", genTempVarPfx, mi, varname) + } else if t.Implements(textUnmarshalerTyp) || tptr.Implements(textUnmarshalerTyp) { + x.linef("} else if !%sm%s { z.DecTextUnmarshal(%v)", genTempVarPfx, mi, varname) + } + + x.line("} else {") + + // Since these are pointers, we cannot share, and have to use them one by one + switch t.Kind() { + case reflect.Int: + x.line("*((*int)(" + varname + ")) = int(r.DecodeInt(codecSelferBitsize" + x.xs + "))") + // x.line("z.DecInt((*int)(" + varname + "))") + case reflect.Int8: + x.line("*((*int8)(" + varname + ")) = int8(r.DecodeInt(8))") + // x.line("z.DecInt8((*int8)(" + varname + "))") + case reflect.Int16: + x.line("*((*int16)(" + varname + ")) = int16(r.DecodeInt(16))") + // x.line("z.DecInt16((*int16)(" + varname + "))") + case reflect.Int32: + x.line("*((*int32)(" + varname + ")) = int32(r.DecodeInt(32))") + // x.line("z.DecInt32((*int32)(" + varname + "))") + case reflect.Int64: + x.line("*((*int64)(" + varname + ")) = int64(r.DecodeInt(64))") + // x.line("z.DecInt64((*int64)(" + varname + "))") + + case reflect.Uint: + x.line("*((*uint)(" + varname + ")) = uint(r.DecodeUint(codecSelferBitsize" + x.xs + "))") + // x.line("z.DecUint((*uint)(" + varname + "))") + case reflect.Uint8: + x.line("*((*uint8)(" + varname + ")) = uint8(r.DecodeUint(8))") + // x.line("z.DecUint8((*uint8)(" + varname + "))") + case reflect.Uint16: + x.line("*((*uint16)(" + varname + ")) = uint16(r.DecodeUint(16))") + //x.line("z.DecUint16((*uint16)(" + varname + "))") + case reflect.Uint32: + x.line("*((*uint32)(" + varname + ")) = uint32(r.DecodeUint(32))") + //x.line("z.DecUint32((*uint32)(" + varname + "))") + case reflect.Uint64: + x.line("*((*uint64)(" + varname + ")) = uint64(r.DecodeUint(64))") + //x.line("z.DecUint64((*uint64)(" + varname + "))") + case reflect.Uintptr: + x.line("*((*uintptr)(" + varname + ")) = uintptr(r.DecodeUint(codecSelferBitsize" + x.xs + "))") + + case reflect.Float32: + x.line("*((*float32)(" + varname + ")) = float32(r.DecodeFloat(true))") + //x.line("z.DecFloat32((*float32)(" + varname + "))") + case reflect.Float64: + x.line("*((*float64)(" + varname + ")) = float64(r.DecodeFloat(false))") + // x.line("z.DecFloat64((*float64)(" + varname + "))") + + case reflect.Bool: + x.line("*((*bool)(" + varname + ")) = r.DecodeBool()") + // x.line("z.DecBool((*bool)(" + varname + "))") + case reflect.String: + x.line("*((*string)(" + varname + ")) = r.DecodeString()") + // x.line("z.DecString((*string)(" + varname + "))") + case reflect.Array, reflect.Chan: + x.xtraSM(varname, false, t) + // x.decListFallback(varname, rtid, true, t) + case reflect.Slice: + // if a []uint8, call dedicated function + // if a known fastpath slice, call dedicated function + // else write encode function in-line. + // - if elements are primitives or Selfers, call dedicated function on each member. + // - else call Encoder.encode(XXX) on it. + if rtid == uint8SliceTypId { + x.line("*" + varname + " = r.DecodeBytes(*(*[]byte)(" + varname + "), false, false)") + } else if fastpathAV.index(rtid) != -1 { + g := x.newGenV(t) + x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", false, d)") + } else { + x.xtraSM(varname, false, t) + // x.decListFallback(varname, rtid, false, t) + } + case reflect.Map: + // if a known fastpath map, call dedicated function + // else write encode function in-line. + // - if elements are primitives or Selfers, call dedicated function on each member. + // - else call Encoder.encode(XXX) on it. + if fastpathAV.index(rtid) != -1 { + g := x.newGenV(t) + x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", false, d)") + } else { + x.xtraSM(varname, false, t) + // x.decMapFallback(varname, rtid, t) + } + case reflect.Struct: + if inlist { + x.decStruct(varname, rtid, t) + } else { + // delete(x.td, rtid) + x.line("z.DecFallback(" + varname + ", false)") + } + default: + if rtidAdded { + delete(x.te, rtid) + } + x.line("z.DecFallback(" + varname + ", true)") + } +} + +func (x *genRunner) decTryAssignPrimitive(varname string, t reflect.Type) (tryAsPtr bool) { + // This should only be used for exact primitives (ie un-named types). + // Named types may be implementations of Selfer, Unmarshaler, etc. + // They should be handled by dec(...) + + if t.Name() != "" { + tryAsPtr = true + return + } + + switch t.Kind() { + case reflect.Int: + x.linef("%s = r.DecodeInt(codecSelferBitsize%s)", varname, x.xs) + case reflect.Int8: + x.linef("%s = r.DecodeInt(8)", varname) + case reflect.Int16: + x.linef("%s = r.DecodeInt(16)", varname) + case reflect.Int32: + x.linef("%s = r.DecodeInt(32)", varname) + case reflect.Int64: + x.linef("%s = r.DecodeInt(64)", varname) + + case reflect.Uint: + x.linef("%s = r.DecodeUint(codecSelferBitsize%s)", varname, x.xs) + case reflect.Uint8: + x.linef("%s = r.DecodeUint(8)", varname) + case reflect.Uint16: + x.linef("%s = r.DecodeUint(16)", varname) + case reflect.Uint32: + x.linef("%s = r.DecodeUint(32)", varname) + case reflect.Uint64: + x.linef("%s = r.DecodeUint(64)", varname) + case reflect.Uintptr: + x.linef("%s = r.DecodeUint(codecSelferBitsize%s)", varname, x.xs) + + case reflect.Float32: + x.linef("%s = r.DecodeFloat(true)", varname) + case reflect.Float64: + x.linef("%s = r.DecodeFloat(false)", varname) + + case reflect.Bool: + x.linef("%s = r.DecodeBool()", varname) + case reflect.String: + x.linef("%s = r.DecodeString()", varname) + default: + tryAsPtr = true + } + return +} + +func (x *genRunner) decListFallback(varname string, rtid uintptr, t reflect.Type) { + type tstruc struct { + TempVar string + Rand string + Varname string + CTyp string + Typ string + Immutable bool + Size int + } + telem := t.Elem() + ts := tstruc{genTempVarPfx, x.varsfx(), varname, x.genTypeName(t), x.genTypeName(telem), genIsImmutable(telem), int(telem.Size())} + + funcs := make(template.FuncMap) + + funcs["decLineVar"] = func(varname string) string { + x.decVar(varname, telem, false) + return "" + } + funcs["decLine"] = func(pfx string) string { + x.decVar(ts.TempVar+pfx+ts.Rand, reflect.PtrTo(telem), false) + return "" + } + funcs["var"] = func(s string) string { + return ts.TempVar + s + ts.Rand + } + funcs["zero"] = func() string { + return x.genZeroValueR(telem) + } + funcs["isArray"] = func() bool { + return t.Kind() == reflect.Array + } + funcs["isSlice"] = func() bool { + return t.Kind() == reflect.Slice + } + funcs["isChan"] = func() bool { + return t.Kind() == reflect.Chan + } + tm, err := template.New("").Funcs(funcs).Parse(genDecListTmpl) + if err != nil { + panic(err) + } + if err = tm.Execute(x.w, &ts); err != nil { + panic(err) + } +} + +func (x *genRunner) decMapFallback(varname string, rtid uintptr, t reflect.Type) { + type tstruc struct { + TempVar string + Sfx string + Rand string + Varname string + KTyp string + Typ string + Size int + } + telem := t.Elem() + tkey := t.Key() + ts := tstruc{ + genTempVarPfx, x.xs, x.varsfx(), varname, x.genTypeName(tkey), + x.genTypeName(telem), int(telem.Size() + tkey.Size()), + } + + funcs := make(template.FuncMap) + funcs["decElemZero"] = func() string { + return x.genZeroValueR(telem) + } + funcs["decElemKindImmutable"] = func() bool { + return genIsImmutable(telem) + } + funcs["decElemKindPtr"] = func() bool { + return telem.Kind() == reflect.Ptr + } + funcs["decElemKindIntf"] = func() bool { + return telem.Kind() == reflect.Interface + } + funcs["decLineVarK"] = func(varname string) string { + x.decVar(varname, tkey, false) + return "" + } + funcs["decLineVar"] = func(varname string) string { + x.decVar(varname, telem, false) + return "" + } + funcs["decLineK"] = func(pfx string) string { + x.decVar(ts.TempVar+pfx+ts.Rand, reflect.PtrTo(tkey), false) + return "" + } + funcs["decLine"] = func(pfx string) string { + x.decVar(ts.TempVar+pfx+ts.Rand, reflect.PtrTo(telem), false) + return "" + } + funcs["var"] = func(s string) string { + return ts.TempVar + s + ts.Rand + } + + tm, err := template.New("").Funcs(funcs).Parse(genDecMapTmpl) + if err != nil { + panic(err) + } + if err = tm.Execute(x.w, &ts); err != nil { + panic(err) + } +} + +func (x *genRunner) decStructMapSwitch(kName string, varname string, rtid uintptr, t reflect.Type) { + ti := x.ti.get(rtid, t) + tisfi := ti.sfip // always use sequence from file. decStruct expects same thing. + x.line("switch (" + kName + ") {") + for _, si := range tisfi { + x.line("case \"" + si.encName + "\":") + var t2 reflect.StructField + if si.i != -1 { + t2 = t.Field(int(si.i)) + } else { + //we must accomodate anonymous fields, where the embedded field is a nil pointer in the value. + // t2 = t.FieldByIndex(si.is) + t2typ := t + varname3 := varname + for _, ix := range si.is { + for t2typ.Kind() == reflect.Ptr { + t2typ = t2typ.Elem() + } + t2 = t2typ.Field(ix) + t2typ = t2.Type + varname3 = varname3 + "." + t2.Name + if t2typ.Kind() == reflect.Ptr { + x.linef("if %s == nil { %s = new(%s) }", varname3, varname3, x.genTypeName(t2typ.Elem())) + } + } + } + x.decVar(varname+"."+t2.Name, t2.Type, false) + } + x.line("default:") + // pass the slice here, so that the string will not escape, and maybe save allocation + x.line("z.DecStructFieldNotFound(-1, " + kName + ")") + x.line("} // end switch " + kName) +} + +func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t reflect.Type, style genStructMapStyle) { + tpfx := genTempVarPfx + i := x.varsfx() + kName := tpfx + "s" + i + + // We thought to use ReadStringAsBytes, as go compiler might optimize the copy out. + // However, using that was more expensive, as it seems that the switch expression + // is evaluated each time. + // + // We could depend on decodeString using a temporary/shared buffer internally. + // However, this model of creating a byte array, and using explicitly is faster, + // and allows optional use of unsafe []byte->string conversion without alloc. + + // Also, ensure that the slice array doesn't escape. + // That will help escape analysis prevent allocation when it gets better. + + // x.line("var " + kName + "Arr = [32]byte{} // default string to decode into") + // x.line("var " + kName + "Slc = " + kName + "Arr[:] // default slice to decode into") + // use the scratch buffer to avoid allocation (most field names are < 32). + + x.line("var " + kName + "Slc = z.DecScratchBuffer() // default slice to decode into") + + x.line("_ = " + kName + "Slc") + switch style { + case genStructMapStyleLenPrefix: + x.linef("for %sj%s := 0; %sj%s < %s; %sj%s++ {", tpfx, i, tpfx, i, lenvarname, tpfx, i) + case genStructMapStyleCheckBreak: + x.linef("for %sj%s := 0; !r.CheckBreak(); %sj%s++ {", tpfx, i, tpfx, i) + default: // 0, otherwise. + x.linef("var %shl%s bool = %s >= 0", tpfx, i, lenvarname) // has length + x.linef("for %sj%s := 0; ; %sj%s++ {", tpfx, i, tpfx, i) + x.linef("if %shl%s { if %sj%s >= %s { break }", tpfx, i, tpfx, i, lenvarname) + x.line("} else { if r.CheckBreak() { break }; }") + } + x.linef("z.DecSendContainerState(codecSelfer_containerMapKey%s)", x.xs) + x.line(kName + "Slc = r.DecodeBytes(" + kName + "Slc, true, true)") + // let string be scoped to this loop alone, so it doesn't escape. + if x.unsafe { + x.line(kName + "SlcHdr := codecSelferUnsafeString" + x.xs + "{uintptr(unsafe.Pointer(&" + + kName + "Slc[0])), len(" + kName + "Slc)}") + x.line(kName + " := *(*string)(unsafe.Pointer(&" + kName + "SlcHdr))") + } else { + x.line(kName + " := string(" + kName + "Slc)") + } + x.linef("z.DecSendContainerState(codecSelfer_containerMapValue%s)", x.xs) + x.decStructMapSwitch(kName, varname, rtid, t) + + x.line("} // end for " + tpfx + "j" + i) + x.linef("z.DecSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) +} + +func (x *genRunner) decStructArray(varname, lenvarname, breakString string, rtid uintptr, t reflect.Type) { + tpfx := genTempVarPfx + i := x.varsfx() + ti := x.ti.get(rtid, t) + tisfi := ti.sfip // always use sequence from file. decStruct expects same thing. + x.linef("var %sj%s int", tpfx, i) + x.linef("var %sb%s bool", tpfx, i) // break + x.linef("var %shl%s bool = %s >= 0", tpfx, i, lenvarname) // has length + for _, si := range tisfi { + var t2 reflect.StructField + if si.i != -1 { + t2 = t.Field(int(si.i)) + } else { + //we must accomodate anonymous fields, where the embedded field is a nil pointer in the value. + // t2 = t.FieldByIndex(si.is) + t2typ := t + varname3 := varname + for _, ix := range si.is { + for t2typ.Kind() == reflect.Ptr { + t2typ = t2typ.Elem() + } + t2 = t2typ.Field(ix) + t2typ = t2.Type + varname3 = varname3 + "." + t2.Name + if t2typ.Kind() == reflect.Ptr { + x.linef("if %s == nil { %s = new(%s) }", varname3, varname3, x.genTypeName(t2typ.Elem())) + } + } + } + + x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = r.CheckBreak() }", + tpfx, i, tpfx, i, tpfx, i, + tpfx, i, lenvarname, tpfx, i) + x.linef("if %sb%s { z.DecSendContainerState(codecSelfer_containerArrayEnd%s); %s }", + tpfx, i, x.xs, breakString) + x.linef("z.DecSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + x.decVar(varname+"."+t2.Name, t2.Type, true) + } + // read remaining values and throw away. + x.line("for {") + x.linef("%sj%s++; if %shl%s { %sb%s = %sj%s > %s } else { %sb%s = r.CheckBreak() }", + tpfx, i, tpfx, i, tpfx, i, + tpfx, i, lenvarname, tpfx, i) + x.linef("if %sb%s { break }", tpfx, i) + x.linef("z.DecSendContainerState(codecSelfer_containerArrayElem%s)", x.xs) + x.linef(`z.DecStructFieldNotFound(%sj%s - 1, "")`, tpfx, i) + x.line("}") + x.linef("z.DecSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) +} + +func (x *genRunner) decStruct(varname string, rtid uintptr, t reflect.Type) { + // if container is map + i := x.varsfx() + x.linef("%sct%s := r.ContainerType()", genTempVarPfx, i) + x.linef("if %sct%s == codecSelferValueTypeMap%s {", genTempVarPfx, i, x.xs) + x.line(genTempVarPfx + "l" + i + " := r.ReadMapStart()") + x.linef("if %sl%s == 0 {", genTempVarPfx, i) + x.linef("z.DecSendContainerState(codecSelfer_containerMapEnd%s)", x.xs) + if genUseOneFunctionForDecStructMap { + x.line("} else { ") + x.linef("x.codecDecodeSelfFromMap(%sl%s, d)", genTempVarPfx, i) + } else { + x.line("} else if " + genTempVarPfx + "l" + i + " > 0 { ") + x.line("x.codecDecodeSelfFromMapLenPrefix(" + genTempVarPfx + "l" + i + ", d)") + x.line("} else {") + x.line("x.codecDecodeSelfFromMapCheckBreak(" + genTempVarPfx + "l" + i + ", d)") + } + x.line("}") + + // else if container is array + x.linef("} else if %sct%s == codecSelferValueTypeArray%s {", genTempVarPfx, i, x.xs) + x.line(genTempVarPfx + "l" + i + " := r.ReadArrayStart()") + x.linef("if %sl%s == 0 {", genTempVarPfx, i) + x.linef("z.DecSendContainerState(codecSelfer_containerArrayEnd%s)", x.xs) + x.line("} else { ") + x.linef("x.codecDecodeSelfFromArray(%sl%s, d)", genTempVarPfx, i) + x.line("}") + // else panic + x.line("} else { ") + x.line("panic(codecSelferOnlyMapOrArrayEncodeToStructErr" + x.xs + ")") + x.line("} ") +} + +// -------- + +type genV struct { + // genV is either a primitive (Primitive != "") or a map (MapKey != "") or a slice + MapKey string + Elem string + Primitive string + Size int +} + +func (x *genRunner) newGenV(t reflect.Type) (v genV) { + switch t.Kind() { + case reflect.Slice, reflect.Array: + te := t.Elem() + v.Elem = x.genTypeName(te) + v.Size = int(te.Size()) + case reflect.Map: + te, tk := t.Elem(), t.Key() + v.Elem = x.genTypeName(te) + v.MapKey = x.genTypeName(tk) + v.Size = int(te.Size() + tk.Size()) + default: + panic("unexpected type for newGenV. Requires map or slice type") + } + return +} + +func (x *genV) MethodNamePfx(prefix string, prim bool) string { + var name []byte + if prefix != "" { + name = append(name, prefix...) + } + if prim { + name = append(name, genTitleCaseName(x.Primitive)...) + } else { + if x.MapKey == "" { + name = append(name, "Slice"...) + } else { + name = append(name, "Map"...) + name = append(name, genTitleCaseName(x.MapKey)...) + } + name = append(name, genTitleCaseName(x.Elem)...) + } + return string(name) + +} + +// genImportPath returns import path of a non-predeclared named typed, or an empty string otherwise. +// +// This handles the misbehaviour that occurs when 1.5-style vendoring is enabled, +// where PkgPath returns the full path, including the vendoring pre-fix that should have been stripped. +// We strip it here. +func genImportPath(t reflect.Type) (s string) { + s = t.PkgPath() + if genCheckVendor { + // HACK: Misbehaviour occurs in go 1.5. May have to re-visit this later. + // if s contains /vendor/ OR startsWith vendor/, then return everything after it. + const vendorStart = "vendor/" + const vendorInline = "/vendor/" + if i := strings.LastIndex(s, vendorInline); i >= 0 { + s = s[i+len(vendorInline):] + } else if strings.HasPrefix(s, vendorStart) { + s = s[len(vendorStart):] + } + } + return +} + +// A go identifier is (letter|_)[letter|number|_]* +func genGoIdentifier(s string, checkFirstChar bool) string { + b := make([]byte, 0, len(s)) + t := make([]byte, 4) + var n int + for i, r := range s { + if checkFirstChar && i == 0 && !unicode.IsLetter(r) { + b = append(b, '_') + } + // r must be unicode_letter, unicode_digit or _ + if unicode.IsLetter(r) || unicode.IsDigit(r) { + n = utf8.EncodeRune(t, r) + b = append(b, t[:n]...) + } else { + b = append(b, '_') + } + } + return string(b) +} + +func genNonPtr(t reflect.Type) reflect.Type { + for t.Kind() == reflect.Ptr { + t = t.Elem() + } + return t +} + +func genTitleCaseName(s string) string { + switch s { + case "interface{}", "interface {}": + return "Intf" + default: + return strings.ToUpper(s[0:1]) + s[1:] + } +} + +func genMethodNameT(t reflect.Type, tRef reflect.Type) (n string) { + var ptrPfx string + for t.Kind() == reflect.Ptr { + ptrPfx += "Ptrto" + t = t.Elem() + } + tstr := t.String() + if tn := t.Name(); tn != "" { + if tRef != nil && genImportPath(t) == genImportPath(tRef) { + return ptrPfx + tn + } else { + if genQNameRegex.MatchString(tstr) { + return ptrPfx + strings.Replace(tstr, ".", "_", 1000) + } else { + return ptrPfx + genCustomTypeName(tstr) + } + } + } + switch t.Kind() { + case reflect.Map: + return ptrPfx + "Map" + genMethodNameT(t.Key(), tRef) + genMethodNameT(t.Elem(), tRef) + case reflect.Slice: + return ptrPfx + "Slice" + genMethodNameT(t.Elem(), tRef) + case reflect.Array: + return ptrPfx + "Array" + strconv.FormatInt(int64(t.Len()), 10) + genMethodNameT(t.Elem(), tRef) + case reflect.Chan: + var cx string + switch t.ChanDir() { + case reflect.SendDir: + cx = "ChanSend" + case reflect.RecvDir: + cx = "ChanRecv" + default: + cx = "Chan" + } + return ptrPfx + cx + genMethodNameT(t.Elem(), tRef) + default: + if t == intfTyp { + return ptrPfx + "Interface" + } else { + if tRef != nil && genImportPath(t) == genImportPath(tRef) { + if t.Name() != "" { + return ptrPfx + t.Name() + } else { + return ptrPfx + genCustomTypeName(tstr) + } + } else { + // best way to get the package name inclusive + // return ptrPfx + strings.Replace(tstr, ".", "_", 1000) + // return ptrPfx + genBase64enc.EncodeToString([]byte(tstr)) + if t.Name() != "" && genQNameRegex.MatchString(tstr) { + return ptrPfx + strings.Replace(tstr, ".", "_", 1000) + } else { + return ptrPfx + genCustomTypeName(tstr) + } + } + } + } +} + +// genCustomNameForType base64encodes the t.String() value in such a way +// that it can be used within a function name. +func genCustomTypeName(tstr string) string { + len2 := genBase64enc.EncodedLen(len(tstr)) + bufx := make([]byte, len2) + genBase64enc.Encode(bufx, []byte(tstr)) + for i := len2 - 1; i >= 0; i-- { + if bufx[i] == '=' { + len2-- + } else { + break + } + } + return string(bufx[:len2]) +} + +func genIsImmutable(t reflect.Type) (v bool) { + return isImmutableKind(t.Kind()) +} + +type genInternal struct { + Values []genV + Unsafe bool +} + +func (x genInternal) FastpathLen() (l int) { + for _, v := range x.Values { + if v.Primitive == "" { + l++ + } + } + return +} + +func genInternalZeroValue(s string) string { + switch s { + case "interface{}", "interface {}": + return "nil" + case "bool": + return "false" + case "string": + return `""` + default: + return "0" + } +} + +func genInternalEncCommandAsString(s string, vname string) string { + switch s { + case "uint", "uint8", "uint16", "uint32", "uint64": + return "ee.EncodeUint(uint64(" + vname + "))" + case "int", "int8", "int16", "int32", "int64": + return "ee.EncodeInt(int64(" + vname + "))" + case "string": + return "ee.EncodeString(c_UTF8, " + vname + ")" + case "float32": + return "ee.EncodeFloat32(" + vname + ")" + case "float64": + return "ee.EncodeFloat64(" + vname + ")" + case "bool": + return "ee.EncodeBool(" + vname + ")" + case "symbol": + return "ee.EncodeSymbol(" + vname + ")" + default: + return "e.encode(" + vname + ")" + } +} + +func genInternalDecCommandAsString(s string) string { + switch s { + case "uint": + return "uint(dd.DecodeUint(uintBitsize))" + case "uint8": + return "uint8(dd.DecodeUint(8))" + case "uint16": + return "uint16(dd.DecodeUint(16))" + case "uint32": + return "uint32(dd.DecodeUint(32))" + case "uint64": + return "dd.DecodeUint(64)" + case "uintptr": + return "uintptr(dd.DecodeUint(uintBitsize))" + case "int": + return "int(dd.DecodeInt(intBitsize))" + case "int8": + return "int8(dd.DecodeInt(8))" + case "int16": + return "int16(dd.DecodeInt(16))" + case "int32": + return "int32(dd.DecodeInt(32))" + case "int64": + return "dd.DecodeInt(64)" + + case "string": + return "dd.DecodeString()" + case "float32": + return "float32(dd.DecodeFloat(true))" + case "float64": + return "dd.DecodeFloat(false)" + case "bool": + return "dd.DecodeBool()" + default: + panic(errors.New("gen internal: unknown type for decode: " + s)) + } +} + +func genInternalSortType(s string, elem bool) string { + for _, v := range [...]string{"int", "uint", "float", "bool", "string"} { + if strings.HasPrefix(s, v) { + if elem { + if v == "int" || v == "uint" || v == "float" { + return v + "64" + } else { + return v + } + } + return v + "Slice" + } + } + panic("sorttype: unexpected type: " + s) +} + +// var genInternalMu sync.Mutex +var genInternalV genInternal +var genInternalTmplFuncs template.FuncMap +var genInternalOnce sync.Once + +func genInternalInit() { + types := [...]string{ + "interface{}", + "string", + "float32", + "float64", + "uint", + "uint8", + "uint16", + "uint32", + "uint64", + "uintptr", + "int", + "int8", + "int16", + "int32", + "int64", + "bool", + } + // keep as slice, so it is in specific iteration order. + // Initial order was uint64, string, interface{}, int, int64 + mapvaltypes := [...]string{ + "interface{}", + "string", + "uint", + "uint8", + "uint16", + "uint32", + "uint64", + "uintptr", + "int", + "int8", + "int16", + "int32", + "int64", + "float32", + "float64", + "bool", + } + wordSizeBytes := int(intBitsize) / 8 + + mapvaltypes2 := map[string]int{ + "interface{}": 2 * wordSizeBytes, + "string": 2 * wordSizeBytes, + "uint": 1 * wordSizeBytes, + "uint8": 1, + "uint16": 2, + "uint32": 4, + "uint64": 8, + "uintptr": 1 * wordSizeBytes, + "int": 1 * wordSizeBytes, + "int8": 1, + "int16": 2, + "int32": 4, + "int64": 8, + "float32": 4, + "float64": 8, + "bool": 1, + } + var gt genInternal + + // For each slice or map type, there must be a (symetrical) Encode and Decode fast-path function + for _, s := range types { + gt.Values = append(gt.Values, genV{Primitive: s, Size: mapvaltypes2[s]}) + if s != "uint8" { // do not generate fast path for slice of bytes. Treat specially already. + gt.Values = append(gt.Values, genV{Elem: s, Size: mapvaltypes2[s]}) + } + if _, ok := mapvaltypes2[s]; !ok { + gt.Values = append(gt.Values, genV{MapKey: s, Elem: s, Size: 2 * mapvaltypes2[s]}) + } + for _, ms := range mapvaltypes { + gt.Values = append(gt.Values, genV{MapKey: s, Elem: ms, Size: mapvaltypes2[s] + mapvaltypes2[ms]}) + } + } + + funcs := make(template.FuncMap) + // funcs["haspfx"] = strings.HasPrefix + funcs["encmd"] = genInternalEncCommandAsString + funcs["decmd"] = genInternalDecCommandAsString + funcs["zerocmd"] = genInternalZeroValue + funcs["hasprefix"] = strings.HasPrefix + funcs["sorttype"] = genInternalSortType + + genInternalV = gt + genInternalTmplFuncs = funcs +} + +// genInternalGoFile is used to generate source files from templates. +// It is run by the program author alone. +// Unfortunately, it has to be exported so that it can be called from a command line tool. +// *** DO NOT USE *** +func genInternalGoFile(r io.Reader, w io.Writer, safe bool) (err error) { + genInternalOnce.Do(genInternalInit) + + gt := genInternalV + gt.Unsafe = !safe + + t := template.New("").Funcs(genInternalTmplFuncs) + + tmplstr, err := ioutil.ReadAll(r) + if err != nil { + return + } + + if t, err = t.Parse(string(tmplstr)); err != nil { + return + } + + var out bytes.Buffer + err = t.Execute(&out, gt) + if err != nil { + return + } + + bout, err := format.Source(out.Bytes()) + if err != nil { + w.Write(out.Bytes()) // write out if error, so we can still see. + // w.Write(bout) // write out if error, as much as possible, so we can still see. + return + } + w.Write(bout) + return +} diff --git a/vendor/github.com/ugorji/go/codec/gen_15.go b/vendor/github.com/ugorji/go/codec/gen_15.go new file mode 100644 index 000000000..ab76c3102 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/gen_15.go @@ -0,0 +1,12 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// +build go1.5,!go1.6 + +package codec + +import "os" + +func init() { + genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") == "1" +} diff --git a/vendor/github.com/ugorji/go/codec/gen_16.go b/vendor/github.com/ugorji/go/codec/gen_16.go new file mode 100644 index 000000000..87c04e2e1 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/gen_16.go @@ -0,0 +1,12 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +// +build go1.6 + +package codec + +import "os" + +func init() { + genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") != "0" +} diff --git a/vendor/github.com/ugorji/go/codec/helper.go b/vendor/github.com/ugorji/go/codec/helper.go new file mode 100644 index 000000000..f3d2600d3 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/helper.go @@ -0,0 +1,1272 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// Contains code shared by both encode and decode. + +// Some shared ideas around encoding/decoding +// ------------------------------------------ +// +// If an interface{} is passed, we first do a type assertion to see if it is +// a primitive type or a map/slice of primitive types, and use a fastpath to handle it. +// +// If we start with a reflect.Value, we are already in reflect.Value land and +// will try to grab the function for the underlying Type and directly call that function. +// This is more performant than calling reflect.Value.Interface(). +// +// This still helps us bypass many layers of reflection, and give best performance. +// +// Containers +// ------------ +// Containers in the stream are either associative arrays (key-value pairs) or +// regular arrays (indexed by incrementing integers). +// +// Some streams support indefinite-length containers, and use a breaking +// byte-sequence to denote that the container has come to an end. +// +// Some streams also are text-based, and use explicit separators to denote the +// end/beginning of different values. +// +// During encode, we use a high-level condition to determine how to iterate through +// the container. That decision is based on whether the container is text-based (with +// separators) or binary (without separators). If binary, we do not even call the +// encoding of separators. +// +// During decode, we use a different high-level condition to determine how to iterate +// through the containers. That decision is based on whether the stream contained +// a length prefix, or if it used explicit breaks. If length-prefixed, we assume that +// it has to be binary, and we do not even try to read separators. +// +// The only codec that may suffer (slightly) is cbor, and only when decoding indefinite-length. +// It may suffer because we treat it like a text-based codec, and read separators. +// However, this read is a no-op and the cost is insignificant. +// +// Philosophy +// ------------ +// On decode, this codec will update containers appropriately: +// - If struct, update fields from stream into fields of struct. +// If field in stream not found in struct, handle appropriately (based on option). +// If a struct field has no corresponding value in the stream, leave it AS IS. +// If nil in stream, set value to nil/zero value. +// - If map, update map from stream. +// If the stream value is NIL, set the map to nil. +// - if slice, try to update up to length of array in stream. +// if container len is less than stream array length, +// and container cannot be expanded, handled (based on option). +// This means you can decode 4-element stream array into 1-element array. +// +// ------------------------------------ +// On encode, user can specify omitEmpty. This means that the value will be omitted +// if the zero value. The problem may occur during decode, where omitted values do not affect +// the value being decoded into. This means that if decoding into a struct with an +// int field with current value=5, and the field is omitted in the stream, then after +// decoding, the value will still be 5 (not 0). +// omitEmpty only works if you guarantee that you always decode into zero-values. +// +// ------------------------------------ +// We could have truncated a map to remove keys not available in the stream, +// or set values in the struct which are not in the stream to their zero values. +// We decided against it because there is no efficient way to do it. +// We may introduce it as an option later. +// However, that will require enabling it for both runtime and code generation modes. +// +// To support truncate, we need to do 2 passes over the container: +// map +// - first collect all keys (e.g. in k1) +// - for each key in stream, mark k1 that the key should not be removed +// - after updating map, do second pass and call delete for all keys in k1 which are not marked +// struct: +// - for each field, track the *typeInfo s1 +// - iterate through all s1, and for each one not marked, set value to zero +// - this involves checking the possible anonymous fields which are nil ptrs. +// too much work. +// +// ------------------------------------------ +// Error Handling is done within the library using panic. +// +// This way, the code doesn't have to keep checking if an error has happened, +// and we don't have to keep sending the error value along with each call +// or storing it in the En|Decoder and checking it constantly along the way. +// +// The disadvantage is that small functions which use panics cannot be inlined. +// The code accounts for that by only using panics behind an interface; +// since interface calls cannot be inlined, this is irrelevant. +// +// We considered storing the error is En|Decoder. +// - once it has its err field set, it cannot be used again. +// - panicing will be optional, controlled by const flag. +// - code should always check error first and return early. +// We eventually decided against it as it makes the code clumsier to always +// check for these error conditions. + +import ( + "bytes" + "encoding" + "encoding/binary" + "errors" + "fmt" + "math" + "reflect" + "sort" + "strings" + "sync" + "time" +) + +const ( + scratchByteArrayLen = 32 + initCollectionCap = 32 // 32 is defensive. 16 is preferred. + + // Support encoding.(Binary|Text)(Unm|M)arshaler. + // This constant flag will enable or disable it. + supportMarshalInterfaces = true + + // Each Encoder or Decoder uses a cache of functions based on conditionals, + // so that the conditionals are not run every time. + // + // Either a map or a slice is used to keep track of the functions. + // The map is more natural, but has a higher cost than a slice/array. + // This flag (useMapForCodecCache) controls which is used. + // + // From benchmarks, slices with linear search perform better with < 32 entries. + // We have typically seen a high threshold of about 24 entries. + useMapForCodecCache = false + + // for debugging, set this to false, to catch panic traces. + // Note that this will always cause rpc tests to fail, since they need io.EOF sent via panic. + recoverPanicToErr = true + + // Fast path functions try to create a fast path encode or decode implementation + // for common maps and slices, by by-passing reflection altogether. + fastpathEnabled = true + + // if checkStructForEmptyValue, check structs fields to see if an empty value. + // This could be an expensive call, so possibly disable it. + checkStructForEmptyValue = false + + // if derefForIsEmptyValue, deref pointers and interfaces when checking isEmptyValue + derefForIsEmptyValue = false + + // if resetSliceElemToZeroValue, then on decoding a slice, reset the element to a zero value first. + // Only concern is that, if the slice already contained some garbage, we will decode into that garbage. + // The chances of this are slim, so leave this "optimization". + // TODO: should this be true, to ensure that we always decode into a "zero" "empty" value? + resetSliceElemToZeroValue bool = false +) + +var ( + oneByteArr = [1]byte{0} + zeroByteSlice = oneByteArr[:0:0] +) + +type charEncoding uint8 + +const ( + c_RAW charEncoding = iota + c_UTF8 + c_UTF16LE + c_UTF16BE + c_UTF32LE + c_UTF32BE +) + +// valueType is the stream type +type valueType uint8 + +const ( + valueTypeUnset valueType = iota + valueTypeNil + valueTypeInt + valueTypeUint + valueTypeFloat + valueTypeBool + valueTypeString + valueTypeSymbol + valueTypeBytes + valueTypeMap + valueTypeArray + valueTypeTimestamp + valueTypeExt + + // valueTypeInvalid = 0xff +) + +type seqType uint8 + +const ( + _ seqType = iota + seqTypeArray + seqTypeSlice + seqTypeChan +) + +// note that containerMapStart and containerArraySend are not sent. +// This is because the ReadXXXStart and EncodeXXXStart already does these. +type containerState uint8 + +const ( + _ containerState = iota + + containerMapStart // slot left open, since Driver method already covers it + containerMapKey + containerMapValue + containerMapEnd + containerArrayStart // slot left open, since Driver methods already cover it + containerArrayElem + containerArrayEnd +) + +type rgetPoolT struct { + encNames [8]string + fNames [8]string + etypes [8]uintptr + sfis [8]*structFieldInfo +} + +var rgetPool = sync.Pool{ + New: func() interface{} { return new(rgetPoolT) }, +} + +type rgetT struct { + fNames []string + encNames []string + etypes []uintptr + sfis []*structFieldInfo +} + +type containerStateRecv interface { + sendContainerState(containerState) +} + +// mirror json.Marshaler and json.Unmarshaler here, +// so we don't import the encoding/json package +type jsonMarshaler interface { + MarshalJSON() ([]byte, error) +} +type jsonUnmarshaler interface { + UnmarshalJSON([]byte) error +} + +var ( + bigen = binary.BigEndian + structInfoFieldName = "_struct" + + mapStrIntfTyp = reflect.TypeOf(map[string]interface{}(nil)) + mapIntfIntfTyp = reflect.TypeOf(map[interface{}]interface{}(nil)) + intfSliceTyp = reflect.TypeOf([]interface{}(nil)) + intfTyp = intfSliceTyp.Elem() + + stringTyp = reflect.TypeOf("") + timeTyp = reflect.TypeOf(time.Time{}) + rawExtTyp = reflect.TypeOf(RawExt{}) + uint8SliceTyp = reflect.TypeOf([]uint8(nil)) + + mapBySliceTyp = reflect.TypeOf((*MapBySlice)(nil)).Elem() + + binaryMarshalerTyp = reflect.TypeOf((*encoding.BinaryMarshaler)(nil)).Elem() + binaryUnmarshalerTyp = reflect.TypeOf((*encoding.BinaryUnmarshaler)(nil)).Elem() + + textMarshalerTyp = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() + textUnmarshalerTyp = reflect.TypeOf((*encoding.TextUnmarshaler)(nil)).Elem() + + jsonMarshalerTyp = reflect.TypeOf((*jsonMarshaler)(nil)).Elem() + jsonUnmarshalerTyp = reflect.TypeOf((*jsonUnmarshaler)(nil)).Elem() + + selferTyp = reflect.TypeOf((*Selfer)(nil)).Elem() + + uint8SliceTypId = reflect.ValueOf(uint8SliceTyp).Pointer() + rawExtTypId = reflect.ValueOf(rawExtTyp).Pointer() + intfTypId = reflect.ValueOf(intfTyp).Pointer() + timeTypId = reflect.ValueOf(timeTyp).Pointer() + stringTypId = reflect.ValueOf(stringTyp).Pointer() + + mapStrIntfTypId = reflect.ValueOf(mapStrIntfTyp).Pointer() + mapIntfIntfTypId = reflect.ValueOf(mapIntfIntfTyp).Pointer() + intfSliceTypId = reflect.ValueOf(intfSliceTyp).Pointer() + // mapBySliceTypId = reflect.ValueOf(mapBySliceTyp).Pointer() + + intBitsize uint8 = uint8(reflect.TypeOf(int(0)).Bits()) + uintBitsize uint8 = uint8(reflect.TypeOf(uint(0)).Bits()) + + bsAll0x00 = []byte{0, 0, 0, 0, 0, 0, 0, 0} + bsAll0xff = []byte{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff} + + chkOvf checkOverflow + + noFieldNameToStructFieldInfoErr = errors.New("no field name passed to parseStructFieldInfo") +) + +var defTypeInfos = NewTypeInfos([]string{"codec", "json"}) + +// Selfer defines methods by which a value can encode or decode itself. +// +// Any type which implements Selfer will be able to encode or decode itself. +// Consequently, during (en|de)code, this takes precedence over +// (text|binary)(M|Unm)arshal or extension support. +type Selfer interface { + CodecEncodeSelf(*Encoder) + CodecDecodeSelf(*Decoder) +} + +// MapBySlice represents a slice which should be encoded as a map in the stream. +// The slice contains a sequence of key-value pairs. +// This affords storing a map in a specific sequence in the stream. +// +// The support of MapBySlice affords the following: +// - A slice type which implements MapBySlice will be encoded as a map +// - A slice can be decoded from a map in the stream +type MapBySlice interface { + MapBySlice() +} + +// WARNING: DO NOT USE DIRECTLY. EXPORTED FOR GODOC BENEFIT. WILL BE REMOVED. +// +// BasicHandle encapsulates the common options and extension functions. +type BasicHandle struct { + // TypeInfos is used to get the type info for any type. + // + // If not configured, the default TypeInfos is used, which uses struct tag keys: codec, json + TypeInfos *TypeInfos + + extHandle + EncodeOptions + DecodeOptions +} + +func (x *BasicHandle) getBasicHandle() *BasicHandle { + return x +} + +func (x *BasicHandle) getTypeInfo(rtid uintptr, rt reflect.Type) (pti *typeInfo) { + if x.TypeInfos != nil { + return x.TypeInfos.get(rtid, rt) + } + return defTypeInfos.get(rtid, rt) +} + +// Handle is the interface for a specific encoding format. +// +// Typically, a Handle is pre-configured before first time use, +// and not modified while in use. Such a pre-configured Handle +// is safe for concurrent access. +type Handle interface { + getBasicHandle() *BasicHandle + newEncDriver(w *Encoder) encDriver + newDecDriver(r *Decoder) decDriver + isBinary() bool +} + +// RawExt represents raw unprocessed extension data. +// Some codecs will decode extension data as a *RawExt if there is no registered extension for the tag. +// +// Only one of Data or Value is nil. If Data is nil, then the content of the RawExt is in the Value. +type RawExt struct { + Tag uint64 + // Data is the []byte which represents the raw ext. If Data is nil, ext is exposed in Value. + // Data is used by codecs (e.g. binc, msgpack, simple) which do custom serialization of the types + Data []byte + // Value represents the extension, if Data is nil. + // Value is used by codecs (e.g. cbor) which use the format to do custom serialization of the types. + Value interface{} +} + +// BytesExt handles custom (de)serialization of types to/from []byte. +// It is used by codecs (e.g. binc, msgpack, simple) which do custom serialization of the types. +type BytesExt interface { + // WriteExt converts a value to a []byte. + // + // Note: v *may* be a pointer to the extension type, if the extension type was a struct or array. + WriteExt(v interface{}) []byte + + // ReadExt updates a value from a []byte. + ReadExt(dst interface{}, src []byte) +} + +// InterfaceExt handles custom (de)serialization of types to/from another interface{} value. +// The Encoder or Decoder will then handle the further (de)serialization of that known type. +// +// It is used by codecs (e.g. cbor, json) which use the format to do custom serialization of the types. +type InterfaceExt interface { + // ConvertExt converts a value into a simpler interface for easy encoding e.g. convert time.Time to int64. + // + // Note: v *may* be a pointer to the extension type, if the extension type was a struct or array. + ConvertExt(v interface{}) interface{} + + // UpdateExt updates a value from a simpler interface for easy decoding e.g. convert int64 to time.Time. + UpdateExt(dst interface{}, src interface{}) +} + +// Ext handles custom (de)serialization of custom types / extensions. +type Ext interface { + BytesExt + InterfaceExt +} + +// addExtWrapper is a wrapper implementation to support former AddExt exported method. +type addExtWrapper struct { + encFn func(reflect.Value) ([]byte, error) + decFn func(reflect.Value, []byte) error +} + +func (x addExtWrapper) WriteExt(v interface{}) []byte { + bs, err := x.encFn(reflect.ValueOf(v)) + if err != nil { + panic(err) + } + return bs +} + +func (x addExtWrapper) ReadExt(v interface{}, bs []byte) { + if err := x.decFn(reflect.ValueOf(v), bs); err != nil { + panic(err) + } +} + +func (x addExtWrapper) ConvertExt(v interface{}) interface{} { + return x.WriteExt(v) +} + +func (x addExtWrapper) UpdateExt(dest interface{}, v interface{}) { + x.ReadExt(dest, v.([]byte)) +} + +type setExtWrapper struct { + b BytesExt + i InterfaceExt +} + +func (x *setExtWrapper) WriteExt(v interface{}) []byte { + if x.b == nil { + panic("BytesExt.WriteExt is not supported") + } + return x.b.WriteExt(v) +} + +func (x *setExtWrapper) ReadExt(v interface{}, bs []byte) { + if x.b == nil { + panic("BytesExt.WriteExt is not supported") + + } + x.b.ReadExt(v, bs) +} + +func (x *setExtWrapper) ConvertExt(v interface{}) interface{} { + if x.i == nil { + panic("InterfaceExt.ConvertExt is not supported") + + } + return x.i.ConvertExt(v) +} + +func (x *setExtWrapper) UpdateExt(dest interface{}, v interface{}) { + if x.i == nil { + panic("InterfaceExxt.UpdateExt is not supported") + + } + x.i.UpdateExt(dest, v) +} + +// type errorString string +// func (x errorString) Error() string { return string(x) } + +type binaryEncodingType struct{} + +func (_ binaryEncodingType) isBinary() bool { return true } + +type textEncodingType struct{} + +func (_ textEncodingType) isBinary() bool { return false } + +// noBuiltInTypes is embedded into many types which do not support builtins +// e.g. msgpack, simple, cbor. +type noBuiltInTypes struct{} + +func (_ noBuiltInTypes) IsBuiltinType(rt uintptr) bool { return false } +func (_ noBuiltInTypes) EncodeBuiltin(rt uintptr, v interface{}) {} +func (_ noBuiltInTypes) DecodeBuiltin(rt uintptr, v interface{}) {} + +type noStreamingCodec struct{} + +func (_ noStreamingCodec) CheckBreak() bool { return false } + +// bigenHelper. +// Users must already slice the x completely, because we will not reslice. +type bigenHelper struct { + x []byte // must be correctly sliced to appropriate len. slicing is a cost. + w encWriter +} + +func (z bigenHelper) writeUint16(v uint16) { + bigen.PutUint16(z.x, v) + z.w.writeb(z.x) +} + +func (z bigenHelper) writeUint32(v uint32) { + bigen.PutUint32(z.x, v) + z.w.writeb(z.x) +} + +func (z bigenHelper) writeUint64(v uint64) { + bigen.PutUint64(z.x, v) + z.w.writeb(z.x) +} + +type extTypeTagFn struct { + rtid uintptr + rt reflect.Type + tag uint64 + ext Ext +} + +type extHandle []extTypeTagFn + +// DEPRECATED: Use SetBytesExt or SetInterfaceExt on the Handle instead. +// +// AddExt registes an encode and decode function for a reflect.Type. +// AddExt internally calls SetExt. +// To deregister an Ext, call AddExt with nil encfn and/or nil decfn. +func (o *extHandle) AddExt( + rt reflect.Type, tag byte, + encfn func(reflect.Value) ([]byte, error), decfn func(reflect.Value, []byte) error, +) (err error) { + if encfn == nil || decfn == nil { + return o.SetExt(rt, uint64(tag), nil) + } + return o.SetExt(rt, uint64(tag), addExtWrapper{encfn, decfn}) +} + +// DEPRECATED: Use SetBytesExt or SetInterfaceExt on the Handle instead. +// +// Note that the type must be a named type, and specifically not +// a pointer or Interface. An error is returned if that is not honored. +// +// To Deregister an ext, call SetExt with nil Ext +func (o *extHandle) SetExt(rt reflect.Type, tag uint64, ext Ext) (err error) { + // o is a pointer, because we may need to initialize it + if rt.PkgPath() == "" || rt.Kind() == reflect.Interface { + err = fmt.Errorf("codec.Handle.AddExt: Takes named type, especially not a pointer or interface: %T", + reflect.Zero(rt).Interface()) + return + } + + rtid := reflect.ValueOf(rt).Pointer() + for _, v := range *o { + if v.rtid == rtid { + v.tag, v.ext = tag, ext + return + } + } + + if *o == nil { + *o = make([]extTypeTagFn, 0, 4) + } + *o = append(*o, extTypeTagFn{rtid, rt, tag, ext}) + return +} + +func (o extHandle) getExt(rtid uintptr) *extTypeTagFn { + var v *extTypeTagFn + for i := range o { + v = &o[i] + if v.rtid == rtid { + return v + } + } + return nil +} + +func (o extHandle) getExtForTag(tag uint64) *extTypeTagFn { + var v *extTypeTagFn + for i := range o { + v = &o[i] + if v.tag == tag { + return v + } + } + return nil +} + +type structFieldInfo struct { + encName string // encode name + + // only one of 'i' or 'is' can be set. If 'i' is -1, then 'is' has been set. + + is []int // (recursive/embedded) field index in struct + i int16 // field index in struct + omitEmpty bool + toArray bool // if field is _struct, is the toArray set? +} + +// func (si *structFieldInfo) isZero() bool { +// return si.encName == "" && len(si.is) == 0 && si.i == 0 && !si.omitEmpty && !si.toArray +// } + +// rv returns the field of the struct. +// If anonymous, it returns an Invalid +func (si *structFieldInfo) field(v reflect.Value, update bool) (rv2 reflect.Value) { + if si.i != -1 { + v = v.Field(int(si.i)) + return v + } + // replicate FieldByIndex + for _, x := range si.is { + for v.Kind() == reflect.Ptr { + if v.IsNil() { + if !update { + return + } + v.Set(reflect.New(v.Type().Elem())) + } + v = v.Elem() + } + v = v.Field(x) + } + return v +} + +func (si *structFieldInfo) setToZeroValue(v reflect.Value) { + if si.i != -1 { + v = v.Field(int(si.i)) + v.Set(reflect.Zero(v.Type())) + // v.Set(reflect.New(v.Type()).Elem()) + // v.Set(reflect.New(v.Type())) + } else { + // replicate FieldByIndex + for _, x := range si.is { + for v.Kind() == reflect.Ptr { + if v.IsNil() { + return + } + v = v.Elem() + } + v = v.Field(x) + } + v.Set(reflect.Zero(v.Type())) + } +} + +func parseStructFieldInfo(fname string, stag string) *structFieldInfo { + // if fname == "" { + // panic(noFieldNameToStructFieldInfoErr) + // } + si := structFieldInfo{ + encName: fname, + } + + if stag != "" { + for i, s := range strings.Split(stag, ",") { + if i == 0 { + if s != "" { + si.encName = s + } + } else { + if s == "omitempty" { + si.omitEmpty = true + } else if s == "toarray" { + si.toArray = true + } + } + } + } + // si.encNameBs = []byte(si.encName) + return &si +} + +type sfiSortedByEncName []*structFieldInfo + +func (p sfiSortedByEncName) Len() int { + return len(p) +} + +func (p sfiSortedByEncName) Less(i, j int) bool { + return p[i].encName < p[j].encName +} + +func (p sfiSortedByEncName) Swap(i, j int) { + p[i], p[j] = p[j], p[i] +} + +// typeInfo keeps information about each type referenced in the encode/decode sequence. +// +// During an encode/decode sequence, we work as below: +// - If base is a built in type, en/decode base value +// - If base is registered as an extension, en/decode base value +// - If type is binary(M/Unm)arshaler, call Binary(M/Unm)arshal method +// - If type is text(M/Unm)arshaler, call Text(M/Unm)arshal method +// - Else decode appropriately based on the reflect.Kind +type typeInfo struct { + sfi []*structFieldInfo // sorted. Used when enc/dec struct to map. + sfip []*structFieldInfo // unsorted. Used when enc/dec struct to array. + + rt reflect.Type + rtid uintptr + + numMeth uint16 // number of methods + + // baseId gives pointer to the base reflect.Type, after deferencing + // the pointers. E.g. base type of ***time.Time is time.Time. + base reflect.Type + baseId uintptr + baseIndir int8 // number of indirections to get to base + + mbs bool // base type (T or *T) is a MapBySlice + + bm bool // base type (T or *T) is a binaryMarshaler + bunm bool // base type (T or *T) is a binaryUnmarshaler + bmIndir int8 // number of indirections to get to binaryMarshaler type + bunmIndir int8 // number of indirections to get to binaryUnmarshaler type + + tm bool // base type (T or *T) is a textMarshaler + tunm bool // base type (T or *T) is a textUnmarshaler + tmIndir int8 // number of indirections to get to textMarshaler type + tunmIndir int8 // number of indirections to get to textUnmarshaler type + + jm bool // base type (T or *T) is a jsonMarshaler + junm bool // base type (T or *T) is a jsonUnmarshaler + jmIndir int8 // number of indirections to get to jsonMarshaler type + junmIndir int8 // number of indirections to get to jsonUnmarshaler type + + cs bool // base type (T or *T) is a Selfer + csIndir int8 // number of indirections to get to Selfer type + + toArray bool // whether this (struct) type should be encoded as an array +} + +func (ti *typeInfo) indexForEncName(name string) int { + // NOTE: name may be a stringView, so don't pass it to another function. + //tisfi := ti.sfi + const binarySearchThreshold = 16 + if sfilen := len(ti.sfi); sfilen < binarySearchThreshold { + // linear search. faster than binary search in my testing up to 16-field structs. + for i, si := range ti.sfi { + if si.encName == name { + return i + } + } + } else { + // binary search. adapted from sort/search.go. + h, i, j := 0, 0, sfilen + for i < j { + h = i + (j-i)/2 + if ti.sfi[h].encName < name { + i = h + 1 + } else { + j = h + } + } + if i < sfilen && ti.sfi[i].encName == name { + return i + } + } + return -1 +} + +// TypeInfos caches typeInfo for each type on first inspection. +// +// It is configured with a set of tag keys, which are used to get +// configuration for the type. +type TypeInfos struct { + infos map[uintptr]*typeInfo + mu sync.RWMutex + tags []string +} + +// NewTypeInfos creates a TypeInfos given a set of struct tags keys. +// +// This allows users customize the struct tag keys which contain configuration +// of their types. +func NewTypeInfos(tags []string) *TypeInfos { + return &TypeInfos{tags: tags, infos: make(map[uintptr]*typeInfo, 64)} +} + +func (x *TypeInfos) structTag(t reflect.StructTag) (s string) { + // check for tags: codec, json, in that order. + // this allows seamless support for many configured structs. + for _, x := range x.tags { + s = t.Get(x) + if s != "" { + return s + } + } + return +} + +func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) { + var ok bool + x.mu.RLock() + pti, ok = x.infos[rtid] + x.mu.RUnlock() + if ok { + return + } + + // do not hold lock while computing this. + // it may lead to duplication, but that's ok. + ti := typeInfo{rt: rt, rtid: rtid} + ti.numMeth = uint16(rt.NumMethod()) + + var indir int8 + if ok, indir = implementsIntf(rt, binaryMarshalerTyp); ok { + ti.bm, ti.bmIndir = true, indir + } + if ok, indir = implementsIntf(rt, binaryUnmarshalerTyp); ok { + ti.bunm, ti.bunmIndir = true, indir + } + if ok, indir = implementsIntf(rt, textMarshalerTyp); ok { + ti.tm, ti.tmIndir = true, indir + } + if ok, indir = implementsIntf(rt, textUnmarshalerTyp); ok { + ti.tunm, ti.tunmIndir = true, indir + } + if ok, indir = implementsIntf(rt, jsonMarshalerTyp); ok { + ti.jm, ti.jmIndir = true, indir + } + if ok, indir = implementsIntf(rt, jsonUnmarshalerTyp); ok { + ti.junm, ti.junmIndir = true, indir + } + if ok, indir = implementsIntf(rt, selferTyp); ok { + ti.cs, ti.csIndir = true, indir + } + if ok, _ = implementsIntf(rt, mapBySliceTyp); ok { + ti.mbs = true + } + + pt := rt + var ptIndir int8 + // for ; pt.Kind() == reflect.Ptr; pt, ptIndir = pt.Elem(), ptIndir+1 { } + for pt.Kind() == reflect.Ptr { + pt = pt.Elem() + ptIndir++ + } + if ptIndir == 0 { + ti.base = rt + ti.baseId = rtid + } else { + ti.base = pt + ti.baseId = reflect.ValueOf(pt).Pointer() + ti.baseIndir = ptIndir + } + + if rt.Kind() == reflect.Struct { + var siInfo *structFieldInfo + if f, ok := rt.FieldByName(structInfoFieldName); ok { + siInfo = parseStructFieldInfo(structInfoFieldName, x.structTag(f.Tag)) + ti.toArray = siInfo.toArray + } + pi := rgetPool.Get() + pv := pi.(*rgetPoolT) + pv.etypes[0] = ti.baseId + vv := rgetT{pv.fNames[:0], pv.encNames[:0], pv.etypes[:1], pv.sfis[:0]} + x.rget(rt, rtid, nil, &vv, siInfo) + ti.sfip = make([]*structFieldInfo, len(vv.sfis)) + ti.sfi = make([]*structFieldInfo, len(vv.sfis)) + copy(ti.sfip, vv.sfis) + sort.Sort(sfiSortedByEncName(vv.sfis)) + copy(ti.sfi, vv.sfis) + rgetPool.Put(pi) + } + // sfi = sfip + + x.mu.Lock() + if pti, ok = x.infos[rtid]; !ok { + pti = &ti + x.infos[rtid] = pti + } + x.mu.Unlock() + return +} + +func (x *TypeInfos) rget(rt reflect.Type, rtid uintptr, + indexstack []int, pv *rgetT, siInfo *structFieldInfo, +) { + // This will read up the fields and store how to access the value. + // It uses the go language's rules for embedding, as below: + // - if a field has been seen while traversing, skip it + // - if an encName has been seen while traversing, skip it + // - if an embedded type has been seen, skip it + // + // Also, per Go's rules, embedded fields must be analyzed AFTER all top-level fields. + // + // Note: we consciously use slices, not a map, to simulate a set. + // Typically, types have < 16 fields, and iteration using equals is faster than maps there + + type anonField struct { + ft reflect.Type + idx int + } + + var anonFields []anonField + +LOOP: + for j, jlen := 0, rt.NumField(); j < jlen; j++ { + f := rt.Field(j) + fkind := f.Type.Kind() + // skip if a func type, or is unexported, or structTag value == "-" + switch fkind { + case reflect.Func, reflect.Complex64, reflect.Complex128, reflect.UnsafePointer: + continue LOOP + } + + // if r1, _ := utf8.DecodeRuneInString(f.Name); r1 == utf8.RuneError || !unicode.IsUpper(r1) { + if f.PkgPath != "" && !f.Anonymous { // unexported, not embedded + continue + } + stag := x.structTag(f.Tag) + if stag == "-" { + continue + } + var si *structFieldInfo + // if anonymous and no struct tag (or it's blank), and a struct (or pointer to struct), inline it. + if f.Anonymous && fkind != reflect.Interface { + doInline := stag == "" + if !doInline { + si = parseStructFieldInfo("", stag) + doInline = si.encName == "" + // doInline = si.isZero() + } + if doInline { + ft := f.Type + for ft.Kind() == reflect.Ptr { + ft = ft.Elem() + } + if ft.Kind() == reflect.Struct { + // handle anonymous fields after handling all the non-anon fields + anonFields = append(anonFields, anonField{ft, j}) + continue + } + } + } + + // after the anonymous dance: if an unexported field, skip + if f.PkgPath != "" { // unexported + continue + } + + if f.Name == "" { + panic(noFieldNameToStructFieldInfoErr) + } + + for _, k := range pv.fNames { + if k == f.Name { + continue LOOP + } + } + pv.fNames = append(pv.fNames, f.Name) + + if si == nil { + si = parseStructFieldInfo(f.Name, stag) + } else if si.encName == "" { + si.encName = f.Name + } + + for _, k := range pv.encNames { + if k == si.encName { + continue LOOP + } + } + pv.encNames = append(pv.encNames, si.encName) + + // si.ikind = int(f.Type.Kind()) + if len(indexstack) == 0 { + si.i = int16(j) + } else { + si.i = -1 + si.is = make([]int, len(indexstack)+1) + copy(si.is, indexstack) + si.is[len(indexstack)] = j + // si.is = append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) + } + + if siInfo != nil { + if siInfo.omitEmpty { + si.omitEmpty = true + } + } + pv.sfis = append(pv.sfis, si) + } + + // now handle anonymous fields +LOOP2: + for _, af := range anonFields { + // if etypes contains this, then do not call rget again (as the fields are already seen here) + ftid := reflect.ValueOf(af.ft).Pointer() + for _, k := range pv.etypes { + if k == ftid { + continue LOOP2 + } + } + pv.etypes = append(pv.etypes, ftid) + + indexstack2 := make([]int, len(indexstack)+1) + copy(indexstack2, indexstack) + indexstack2[len(indexstack)] = af.idx + // indexstack2 := append(append(make([]int, 0, len(indexstack)+4), indexstack...), j) + x.rget(af.ft, ftid, indexstack2, pv, siInfo) + } +} + +func panicToErr(err *error) { + if recoverPanicToErr { + if x := recover(); x != nil { + //debug.PrintStack() + panicValToErr(x, err) + } + } +} + +// func doPanic(tag string, format string, params ...interface{}) { +// params2 := make([]interface{}, len(params)+1) +// params2[0] = tag +// copy(params2[1:], params) +// panic(fmt.Errorf("%s: "+format, params2...)) +// } + +func isImmutableKind(k reflect.Kind) (v bool) { + return false || + k == reflect.Int || + k == reflect.Int8 || + k == reflect.Int16 || + k == reflect.Int32 || + k == reflect.Int64 || + k == reflect.Uint || + k == reflect.Uint8 || + k == reflect.Uint16 || + k == reflect.Uint32 || + k == reflect.Uint64 || + k == reflect.Uintptr || + k == reflect.Float32 || + k == reflect.Float64 || + k == reflect.Bool || + k == reflect.String +} + +// these functions must be inlinable, and not call anybody +type checkOverflow struct{} + +func (_ checkOverflow) Float32(f float64) (overflow bool) { + if f < 0 { + f = -f + } + return math.MaxFloat32 < f && f <= math.MaxFloat64 +} + +func (_ checkOverflow) Uint(v uint64, bitsize uint8) (overflow bool) { + if bitsize == 0 || bitsize >= 64 || v == 0 { + return + } + if trunc := (v << (64 - bitsize)) >> (64 - bitsize); v != trunc { + overflow = true + } + return +} + +func (_ checkOverflow) Int(v int64, bitsize uint8) (overflow bool) { + if bitsize == 0 || bitsize >= 64 || v == 0 { + return + } + if trunc := (v << (64 - bitsize)) >> (64 - bitsize); v != trunc { + overflow = true + } + return +} + +func (_ checkOverflow) SignedInt(v uint64) (i int64, overflow bool) { + //e.g. -127 to 128 for int8 + pos := (v >> 63) == 0 + ui2 := v & 0x7fffffffffffffff + if pos { + if ui2 > math.MaxInt64 { + overflow = true + return + } + } else { + if ui2 > math.MaxInt64-1 { + overflow = true + return + } + } + i = int64(v) + return +} + +// ------------------ SORT ----------------- + +func isNaN(f float64) bool { return f != f } + +// ----------------------- + +type intSlice []int64 +type uintSlice []uint64 +type floatSlice []float64 +type boolSlice []bool +type stringSlice []string +type bytesSlice [][]byte + +func (p intSlice) Len() int { return len(p) } +func (p intSlice) Less(i, j int) bool { return p[i] < p[j] } +func (p intSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p uintSlice) Len() int { return len(p) } +func (p uintSlice) Less(i, j int) bool { return p[i] < p[j] } +func (p uintSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p floatSlice) Len() int { return len(p) } +func (p floatSlice) Less(i, j int) bool { + return p[i] < p[j] || isNaN(p[i]) && !isNaN(p[j]) +} +func (p floatSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p stringSlice) Len() int { return len(p) } +func (p stringSlice) Less(i, j int) bool { return p[i] < p[j] } +func (p stringSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p bytesSlice) Len() int { return len(p) } +func (p bytesSlice) Less(i, j int) bool { return bytes.Compare(p[i], p[j]) == -1 } +func (p bytesSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p boolSlice) Len() int { return len(p) } +func (p boolSlice) Less(i, j int) bool { return !p[i] && p[j] } +func (p boolSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +// --------------------- + +type intRv struct { + v int64 + r reflect.Value +} +type intRvSlice []intRv +type uintRv struct { + v uint64 + r reflect.Value +} +type uintRvSlice []uintRv +type floatRv struct { + v float64 + r reflect.Value +} +type floatRvSlice []floatRv +type boolRv struct { + v bool + r reflect.Value +} +type boolRvSlice []boolRv +type stringRv struct { + v string + r reflect.Value +} +type stringRvSlice []stringRv +type bytesRv struct { + v []byte + r reflect.Value +} +type bytesRvSlice []bytesRv + +func (p intRvSlice) Len() int { return len(p) } +func (p intRvSlice) Less(i, j int) bool { return p[i].v < p[j].v } +func (p intRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p uintRvSlice) Len() int { return len(p) } +func (p uintRvSlice) Less(i, j int) bool { return p[i].v < p[j].v } +func (p uintRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p floatRvSlice) Len() int { return len(p) } +func (p floatRvSlice) Less(i, j int) bool { + return p[i].v < p[j].v || isNaN(p[i].v) && !isNaN(p[j].v) +} +func (p floatRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p stringRvSlice) Len() int { return len(p) } +func (p stringRvSlice) Less(i, j int) bool { return p[i].v < p[j].v } +func (p stringRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p bytesRvSlice) Len() int { return len(p) } +func (p bytesRvSlice) Less(i, j int) bool { return bytes.Compare(p[i].v, p[j].v) == -1 } +func (p bytesRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +func (p boolRvSlice) Len() int { return len(p) } +func (p boolRvSlice) Less(i, j int) bool { return !p[i].v && p[j].v } +func (p boolRvSlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +// ----------------- + +type bytesI struct { + v []byte + i interface{} +} + +type bytesISlice []bytesI + +func (p bytesISlice) Len() int { return len(p) } +func (p bytesISlice) Less(i, j int) bool { return bytes.Compare(p[i].v, p[j].v) == -1 } +func (p bytesISlice) Swap(i, j int) { p[i], p[j] = p[j], p[i] } + +// ----------------- + +type set []uintptr + +func (s *set) add(v uintptr) (exists bool) { + // e.ci is always nil, or len >= 1 + // defer func() { fmt.Printf("$$$$$$$$$$$ cirRef Add: %v, exists: %v\n", v, exists) }() + x := *s + if x == nil { + x = make([]uintptr, 1, 8) + x[0] = v + *s = x + return + } + // typically, length will be 1. make this perform. + if len(x) == 1 { + if j := x[0]; j == 0 { + x[0] = v + } else if j == v { + exists = true + } else { + x = append(x, v) + *s = x + } + return + } + // check if it exists + for _, j := range x { + if j == v { + exists = true + return + } + } + // try to replace a "deleted" slot + for i, j := range x { + if j == 0 { + x[i] = v + return + } + } + // if unable to replace deleted slot, just append it. + x = append(x, v) + *s = x + return +} + +func (s *set) remove(v uintptr) (exists bool) { + // defer func() { fmt.Printf("$$$$$$$$$$$ cirRef Rm: %v, exists: %v\n", v, exists) }() + x := *s + if len(x) == 0 { + return + } + if len(x) == 1 { + if x[0] == v { + x[0] = 0 + } + return + } + for i, j := range x { + if j == v { + exists = true + x[i] = 0 // set it to 0, as way to delete it. + // copy(x[i:], x[i+1:]) + // x = x[:len(x)-1] + return + } + } + return +} diff --git a/vendor/github.com/ugorji/go/codec/helper_internal.go b/vendor/github.com/ugorji/go/codec/helper_internal.go new file mode 100644 index 000000000..dea981fbb --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/helper_internal.go @@ -0,0 +1,242 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// All non-std package dependencies live in this file, +// so porting to different environment is easy (just update functions). + +import ( + "errors" + "fmt" + "math" + "reflect" +) + +func panicValToErr(panicVal interface{}, err *error) { + if panicVal == nil { + return + } + // case nil + switch xerr := panicVal.(type) { + case error: + *err = xerr + case string: + *err = errors.New(xerr) + default: + *err = fmt.Errorf("%v", panicVal) + } + return +} + +func hIsEmptyValue(v reflect.Value, deref, checkStruct bool) bool { + switch v.Kind() { + case reflect.Invalid: + return true + case reflect.Array, reflect.Map, reflect.Slice, reflect.String: + return v.Len() == 0 + case reflect.Bool: + return !v.Bool() + case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64: + return v.Int() == 0 + case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr: + return v.Uint() == 0 + case reflect.Float32, reflect.Float64: + return v.Float() == 0 + case reflect.Interface, reflect.Ptr: + if deref { + if v.IsNil() { + return true + } + return hIsEmptyValue(v.Elem(), deref, checkStruct) + } else { + return v.IsNil() + } + case reflect.Struct: + if !checkStruct { + return false + } + // return true if all fields are empty. else return false. + // we cannot use equality check, because some fields may be maps/slices/etc + // and consequently the structs are not comparable. + // return v.Interface() == reflect.Zero(v.Type()).Interface() + for i, n := 0, v.NumField(); i < n; i++ { + if !hIsEmptyValue(v.Field(i), deref, checkStruct) { + return false + } + } + return true + } + return false +} + +func isEmptyValue(v reflect.Value) bool { + return hIsEmptyValue(v, derefForIsEmptyValue, checkStructForEmptyValue) +} + +func pruneSignExt(v []byte, pos bool) (n int) { + if len(v) < 2 { + } else if pos && v[0] == 0 { + for ; v[n] == 0 && n+1 < len(v) && (v[n+1]&(1<<7) == 0); n++ { + } + } else if !pos && v[0] == 0xff { + for ; v[n] == 0xff && n+1 < len(v) && (v[n+1]&(1<<7) != 0); n++ { + } + } + return +} + +func implementsIntf(typ, iTyp reflect.Type) (success bool, indir int8) { + if typ == nil { + return + } + rt := typ + // The type might be a pointer and we need to keep + // dereferencing to the base type until we find an implementation. + for { + if rt.Implements(iTyp) { + return true, indir + } + if p := rt; p.Kind() == reflect.Ptr { + indir++ + if indir >= math.MaxInt8 { // insane number of indirections + return false, 0 + } + rt = p.Elem() + continue + } + break + } + // No luck yet, but if this is a base type (non-pointer), the pointer might satisfy. + if typ.Kind() != reflect.Ptr { + // Not a pointer, but does the pointer work? + if reflect.PtrTo(typ).Implements(iTyp) { + return true, -1 + } + } + return false, 0 +} + +// validate that this function is correct ... +// culled from OGRE (Object-Oriented Graphics Rendering Engine) +// function: halfToFloatI (http://stderr.org/doc/ogre-doc/api/OgreBitwise_8h-source.html) +func halfFloatToFloatBits(yy uint16) (d uint32) { + y := uint32(yy) + s := (y >> 15) & 0x01 + e := (y >> 10) & 0x1f + m := y & 0x03ff + + if e == 0 { + if m == 0 { // plu or minus 0 + return s << 31 + } else { // Denormalized number -- renormalize it + for (m & 0x00000400) == 0 { + m <<= 1 + e -= 1 + } + e += 1 + const zz uint32 = 0x0400 + m &= ^zz + } + } else if e == 31 { + if m == 0 { // Inf + return (s << 31) | 0x7f800000 + } else { // NaN + return (s << 31) | 0x7f800000 | (m << 13) + } + } + e = e + (127 - 15) + m = m << 13 + return (s << 31) | (e << 23) | m +} + +// GrowCap will return a new capacity for a slice, given the following: +// - oldCap: current capacity +// - unit: in-memory size of an element +// - num: number of elements to add +func growCap(oldCap, unit, num int) (newCap int) { + // appendslice logic (if cap < 1024, *2, else *1.25): + // leads to many copy calls, especially when copying bytes. + // bytes.Buffer model (2*cap + n): much better for bytes. + // smarter way is to take the byte-size of the appended element(type) into account + + // maintain 3 thresholds: + // t1: if cap <= t1, newcap = 2x + // t2: if cap <= t2, newcap = 1.75x + // t3: if cap <= t3, newcap = 1.5x + // else newcap = 1.25x + // + // t1, t2, t3 >= 1024 always. + // i.e. if unit size >= 16, then always do 2x or 1.25x (ie t1, t2, t3 are all same) + // + // With this, appending for bytes increase by: + // 100% up to 4K + // 75% up to 8K + // 50% up to 16K + // 25% beyond that + + // unit can be 0 e.g. for struct{}{}; handle that appropriately + var t1, t2, t3 int // thresholds + if unit <= 1 { + t1, t2, t3 = 4*1024, 8*1024, 16*1024 + } else if unit < 16 { + t3 = 16 / unit * 1024 + t1 = t3 * 1 / 4 + t2 = t3 * 2 / 4 + } else { + t1, t2, t3 = 1024, 1024, 1024 + } + + var x int // temporary variable + + // x is multiplier here: one of 5, 6, 7 or 8; incr of 25%, 50%, 75% or 100% respectively + if oldCap <= t1 { // [0,t1] + x = 8 + } else if oldCap > t3 { // (t3,infinity] + x = 5 + } else if oldCap <= t2 { // (t1,t2] + x = 7 + } else { // (t2,t3] + x = 6 + } + newCap = x * oldCap / 4 + + if num > 0 { + newCap += num + } + + // ensure newCap is a multiple of 64 (if it is > 64) or 16. + if newCap > 64 { + if x = newCap % 64; x != 0 { + x = newCap / 64 + newCap = 64 * (x + 1) + } + } else { + if x = newCap % 16; x != 0 { + x = newCap / 16 + newCap = 16 * (x + 1) + } + } + return +} + +func expandSliceValue(s reflect.Value, num int) reflect.Value { + if num <= 0 { + return s + } + l0 := s.Len() + l1 := l0 + num // new slice length + if l1 < l0 { + panic("ExpandSlice: slice overflow") + } + c0 := s.Cap() + if l1 <= c0 { + return s.Slice(0, l1) + } + st := s.Type() + c1 := growCap(c0, int(st.Elem().Size()), num) + s2 := reflect.MakeSlice(st, l1, c1) + // println("expandslicevalue: cap-old: ", c0, ", cap-new: ", c1, ", len-new: ", l1) + reflect.Copy(s2, s) + return s2 +} diff --git a/vendor/github.com/ugorji/go/codec/helper_not_unsafe.go b/vendor/github.com/ugorji/go/codec/helper_not_unsafe.go new file mode 100644 index 000000000..7c2ffc0fd --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/helper_not_unsafe.go @@ -0,0 +1,20 @@ +//+build !unsafe + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// stringView returns a view of the []byte as a string. +// In unsafe mode, it doesn't incur allocation and copying caused by conversion. +// In regular safe mode, it is an allocation and copy. +func stringView(v []byte) string { + return string(v) +} + +// bytesView returns a view of the string as a []byte. +// In unsafe mode, it doesn't incur allocation and copying caused by conversion. +// In regular safe mode, it is an allocation and copy. +func bytesView(v string) []byte { + return []byte(v) +} diff --git a/vendor/github.com/ugorji/go/codec/helper_unsafe.go b/vendor/github.com/ugorji/go/codec/helper_unsafe.go new file mode 100644 index 000000000..2928e4f77 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/helper_unsafe.go @@ -0,0 +1,49 @@ +//+build unsafe + +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "unsafe" +) + +// This file has unsafe variants of some helper methods. + +type unsafeString struct { + Data uintptr + Len int +} + +type unsafeSlice struct { + Data uintptr + Len int + Cap int +} + +// stringView returns a view of the []byte as a string. +// In unsafe mode, it doesn't incur allocation and copying caused by conversion. +// In regular safe mode, it is an allocation and copy. +func stringView(v []byte) string { + if len(v) == 0 { + return "" + } + + bx := (*unsafeSlice)(unsafe.Pointer(&v)) + sx := unsafeString{bx.Data, bx.Len} + return *(*string)(unsafe.Pointer(&sx)) +} + +// bytesView returns a view of the string as a []byte. +// In unsafe mode, it doesn't incur allocation and copying caused by conversion. +// In regular safe mode, it is an allocation and copy. +func bytesView(v string) []byte { + if len(v) == 0 { + return zeroByteSlice + } + + sx := (*unsafeString)(unsafe.Pointer(&v)) + bx := unsafeSlice{sx.Data, sx.Len, sx.Len} + return *(*[]byte)(unsafe.Pointer(&bx)) +} diff --git a/vendor/github.com/ugorji/go/codec/json.go b/vendor/github.com/ugorji/go/codec/json.go new file mode 100644 index 000000000..a04dfcb9d --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/json.go @@ -0,0 +1,1213 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +// By default, this json support uses base64 encoding for bytes, because you cannot +// store and read any arbitrary string in json (only unicode). +// However, the user can configre how to encode/decode bytes. +// +// This library specifically supports UTF-8 for encoding and decoding only. +// +// Note that the library will happily encode/decode things which are not valid +// json e.g. a map[int64]string. We do it for consistency. With valid json, +// we will encode and decode appropriately. +// Users can specify their map type if necessary to force it. +// +// Note: +// - we cannot use strconv.Quote and strconv.Unquote because json quotes/unquotes differently. +// We implement it here. +// - Also, strconv.ParseXXX for floats and integers +// - only works on strings resulting in unnecessary allocation and []byte-string conversion. +// - it does a lot of redundant checks, because json numbers are simpler that what it supports. +// - We parse numbers (floats and integers) directly here. +// We only delegate parsing floats if it is a hairy float which could cause a loss of precision. +// In that case, we delegate to strconv.ParseFloat. +// +// Note: +// - encode does not beautify. There is no whitespace when encoding. +// - rpc calls which take single integer arguments or write single numeric arguments will need care. + +// Top-level methods of json(End|Dec)Driver (which are implementations of (en|de)cDriver +// MUST not call one-another. + +import ( + "bytes" + "encoding/base64" + "fmt" + "reflect" + "strconv" + "unicode/utf16" + "unicode/utf8" +) + +//-------------------------------- + +var ( + jsonLiterals = [...]byte{'t', 'r', 'u', 'e', 'f', 'a', 'l', 's', 'e', 'n', 'u', 'l', 'l'} + + jsonFloat64Pow10 = [...]float64{ + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, + 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, + 1e20, 1e21, 1e22, + } + + jsonUint64Pow10 = [...]uint64{ + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, + 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, + } + + // jsonTabs and jsonSpaces are used as caches for indents + jsonTabs, jsonSpaces string +) + +const ( + // jsonUnreadAfterDecNum controls whether we unread after decoding a number. + // + // instead of unreading, just update d.tok (iff it's not a whitespace char) + // However, doing this means that we may HOLD onto some data which belongs to another stream. + // Thus, it is safest to unread the data when done. + // keep behind a constant flag for now. + jsonUnreadAfterDecNum = true + + // If !jsonValidateSymbols, decoding will be faster, by skipping some checks: + // - If we see first character of null, false or true, + // do not validate subsequent characters. + // - e.g. if we see a n, assume null and skip next 3 characters, + // and do not validate they are ull. + // P.S. Do not expect a significant decoding boost from this. + jsonValidateSymbols = true + + // if jsonTruncateMantissa, truncate mantissa if trailing 0's. + // This is important because it could allow some floats to be decoded without + // deferring to strconv.ParseFloat. + jsonTruncateMantissa = true + + // if mantissa >= jsonNumUintCutoff before multiplying by 10, this is an overflow + jsonNumUintCutoff = (1<<64-1)/uint64(10) + 1 // cutoff64(base) + + // if mantissa >= jsonNumUintMaxVal, this is an overflow + jsonNumUintMaxVal = 1< 1<<53 || v < -(1<<53)) { + e.w.writen1('"') + e.w.writeb(strconv.AppendInt(e.b[:0], v, 10)) + e.w.writen1('"') + return + } + e.w.writeb(strconv.AppendInt(e.b[:0], v, 10)) +} + +func (e *jsonEncDriver) EncodeUint(v uint64) { + if x := e.h.IntegerAsString; x == 'A' || x == 'L' && v > 1<<53 { + e.w.writen1('"') + e.w.writeb(strconv.AppendUint(e.b[:0], v, 10)) + e.w.writen1('"') + return + } + e.w.writeb(strconv.AppendUint(e.b[:0], v, 10)) +} + +func (e *jsonEncDriver) EncodeExt(rv interface{}, xtag uint64, ext Ext, en *Encoder) { + if v := ext.ConvertExt(rv); v == nil { + e.w.writeb(jsonLiterals[9:13]) // null // e.EncodeNil() + } else { + en.encode(v) + } +} + +func (e *jsonEncDriver) EncodeRawExt(re *RawExt, en *Encoder) { + // only encodes re.Value (never re.Data) + if re.Value == nil { + e.w.writeb(jsonLiterals[9:13]) // null // e.EncodeNil() + } else { + en.encode(re.Value) + } +} + +func (e *jsonEncDriver) EncodeArrayStart(length int) { + if e.d { + e.dl++ + } + e.w.writen1('[') + e.c = containerArrayStart +} + +func (e *jsonEncDriver) EncodeMapStart(length int) { + if e.d { + e.dl++ + } + e.w.writen1('{') + e.c = containerMapStart +} + +func (e *jsonEncDriver) EncodeString(c charEncoding, v string) { + // e.w.writestr(strconv.Quote(v)) + e.quoteStr(v) +} + +func (e *jsonEncDriver) EncodeSymbol(v string) { + // e.EncodeString(c_UTF8, v) + e.quoteStr(v) +} + +func (e *jsonEncDriver) EncodeStringBytes(c charEncoding, v []byte) { + // if encoding raw bytes and RawBytesExt is configured, use it to encode + if c == c_RAW && e.se.i != nil { + e.EncodeExt(v, 0, &e.se, e.e) + return + } + if c == c_RAW { + slen := base64.StdEncoding.EncodedLen(len(v)) + if cap(e.bs) >= slen { + e.bs = e.bs[:slen] + } else { + e.bs = make([]byte, slen) + } + base64.StdEncoding.Encode(e.bs, v) + e.w.writen1('"') + e.w.writeb(e.bs) + e.w.writen1('"') + } else { + // e.EncodeString(c, string(v)) + e.quoteStr(stringView(v)) + } +} + +func (e *jsonEncDriver) EncodeAsis(v []byte) { + e.w.writeb(v) +} + +func (e *jsonEncDriver) quoteStr(s string) { + // adapted from std pkg encoding/json + const hex = "0123456789abcdef" + w := e.w + w.writen1('"') + start := 0 + for i := 0; i < len(s); { + if b := s[i]; b < utf8.RuneSelf { + if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' { + i++ + continue + } + if start < i { + w.writestr(s[start:i]) + } + switch b { + case '\\', '"': + w.writen2('\\', b) + case '\n': + w.writen2('\\', 'n') + case '\r': + w.writen2('\\', 'r') + case '\b': + w.writen2('\\', 'b') + case '\f': + w.writen2('\\', 'f') + case '\t': + w.writen2('\\', 't') + default: + // encode all bytes < 0x20 (except \r, \n). + // also encode < > & to prevent security holes when served to some browsers. + w.writestr(`\u00`) + w.writen2(hex[b>>4], hex[b&0xF]) + } + i++ + start = i + continue + } + c, size := utf8.DecodeRuneInString(s[i:]) + if c == utf8.RuneError && size == 1 { + if start < i { + w.writestr(s[start:i]) + } + w.writestr(`\ufffd`) + i += size + start = i + continue + } + // U+2028 is LINE SEPARATOR. U+2029 is PARAGRAPH SEPARATOR. + // Both technically valid JSON, but bomb on JSONP, so fix here. + if c == '\u2028' || c == '\u2029' { + if start < i { + w.writestr(s[start:i]) + } + w.writestr(`\u202`) + w.writen1(hex[c&0xF]) + i += size + start = i + continue + } + i += size + } + if start < len(s) { + w.writestr(s[start:]) + } + w.writen1('"') +} + +//-------------------------------- + +type jsonNum struct { + // bytes []byte // may have [+-.eE0-9] + mantissa uint64 // where mantissa ends, and maybe dot begins. + exponent int16 // exponent value. + manOverflow bool + neg bool // started with -. No initial sign in the bytes above. + dot bool // has dot + explicitExponent bool // explicit exponent +} + +func (x *jsonNum) reset() { + x.manOverflow = false + x.neg = false + x.dot = false + x.explicitExponent = false + x.mantissa = 0 + x.exponent = 0 +} + +// uintExp is called only if exponent > 0. +func (x *jsonNum) uintExp() (n uint64, overflow bool) { + n = x.mantissa + e := x.exponent + if e >= int16(len(jsonUint64Pow10)) { + overflow = true + return + } + n *= jsonUint64Pow10[e] + if n < x.mantissa || n > jsonNumUintMaxVal { + overflow = true + return + } + return + // for i := int16(0); i < e; i++ { + // if n >= jsonNumUintCutoff { + // overflow = true + // return + // } + // n *= 10 + // } + // return +} + +// these constants are only used withn floatVal. +// They are brought out, so that floatVal can be inlined. +const ( + jsonUint64MantissaBits = 52 + jsonMaxExponent = int16(len(jsonFloat64Pow10)) - 1 +) + +func (x *jsonNum) floatVal() (f float64, parseUsingStrConv bool) { + // We do not want to lose precision. + // Consequently, we will delegate to strconv.ParseFloat if any of the following happen: + // - There are more digits than in math.MaxUint64: 18446744073709551615 (20 digits) + // We expect up to 99.... (19 digits) + // - The mantissa cannot fit into a 52 bits of uint64 + // - The exponent is beyond our scope ie beyong 22. + parseUsingStrConv = x.manOverflow || + x.exponent > jsonMaxExponent || + (x.exponent < 0 && -(x.exponent) > jsonMaxExponent) || + x.mantissa>>jsonUint64MantissaBits != 0 + + if parseUsingStrConv { + return + } + + // all good. so handle parse here. + f = float64(x.mantissa) + // fmt.Printf(".Float: uint64 value: %v, float: %v\n", m, f) + if x.neg { + f = -f + } + if x.exponent > 0 { + f *= jsonFloat64Pow10[x.exponent] + } else if x.exponent < 0 { + f /= jsonFloat64Pow10[-x.exponent] + } + return +} + +type jsonDecDriver struct { + noBuiltInTypes + d *Decoder + h *JsonHandle + r decReader + + c containerState + // tok is used to store the token read right after skipWhiteSpace. + tok uint8 + + bstr [8]byte // scratch used for string \UXXX parsing + b [64]byte // scratch, used for parsing strings or numbers + b2 [64]byte // scratch, used only for decodeBytes (after base64) + bs []byte // scratch. Initialized from b. Used for parsing strings or numbers. + + se setExtWrapper + + n jsonNum +} + +func jsonIsWS(b byte) bool { + return b == ' ' || b == '\t' || b == '\r' || b == '\n' +} + +// // This will skip whitespace characters and return the next byte to read. +// // The next byte determines what the value will be one of. +// func (d *jsonDecDriver) skipWhitespace() { +// // fast-path: do not enter loop. Just check first (in case no whitespace). +// b := d.r.readn1() +// if jsonIsWS(b) { +// r := d.r +// for b = r.readn1(); jsonIsWS(b); b = r.readn1() { +// } +// } +// d.tok = b +// } + +func (d *jsonDecDriver) uncacheRead() { + if d.tok != 0 { + d.r.unreadn1() + d.tok = 0 + } +} + +func (d *jsonDecDriver) sendContainerState(c containerState) { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + var xc uint8 // char expected + if c == containerMapKey { + if d.c != containerMapStart { + xc = ',' + } + } else if c == containerMapValue { + xc = ':' + } else if c == containerMapEnd { + xc = '}' + } else if c == containerArrayElem { + if d.c != containerArrayStart { + xc = ',' + } + } else if c == containerArrayEnd { + xc = ']' + } + if xc != 0 { + if d.tok != xc { + d.d.errorf("json: expect char '%c' but got char '%c'", xc, d.tok) + } + d.tok = 0 + } + d.c = c +} + +func (d *jsonDecDriver) CheckBreak() bool { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if d.tok == '}' || d.tok == ']' { + // d.tok = 0 // only checking, not consuming + return true + } + return false +} + +func (d *jsonDecDriver) readStrIdx(fromIdx, toIdx uint8) { + bs := d.r.readx(int(toIdx - fromIdx)) + d.tok = 0 + if jsonValidateSymbols { + if !bytes.Equal(bs, jsonLiterals[fromIdx:toIdx]) { + d.d.errorf("json: expecting %s: got %s", jsonLiterals[fromIdx:toIdx], bs) + return + } + } +} + +func (d *jsonDecDriver) TryDecodeAsNil() bool { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if d.tok == 'n' { + d.readStrIdx(10, 13) // ull + return true + } + return false +} + +func (d *jsonDecDriver) DecodeBool() bool { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if d.tok == 'f' { + d.readStrIdx(5, 9) // alse + return false + } + if d.tok == 't' { + d.readStrIdx(1, 4) // rue + return true + } + d.d.errorf("json: decode bool: got first char %c", d.tok) + return false // "unreachable" +} + +func (d *jsonDecDriver) ReadMapStart() int { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if d.tok != '{' { + d.d.errorf("json: expect char '%c' but got char '%c'", '{', d.tok) + } + d.tok = 0 + d.c = containerMapStart + return -1 +} + +func (d *jsonDecDriver) ReadArrayStart() int { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if d.tok != '[' { + d.d.errorf("json: expect char '%c' but got char '%c'", '[', d.tok) + } + d.tok = 0 + d.c = containerArrayStart + return -1 +} + +func (d *jsonDecDriver) ContainerType() (vt valueType) { + // check container type by checking the first char + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if b := d.tok; b == '{' { + return valueTypeMap + } else if b == '[' { + return valueTypeArray + } else if b == 'n' { + return valueTypeNil + } else if b == '"' { + return valueTypeString + } + return valueTypeUnset + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + // return false // "unreachable" +} + +func (d *jsonDecDriver) decNum(storeBytes bool) { + // If it is has a . or an e|E, decode as a float; else decode as an int. + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + b := d.tok + var str bool + if b == '"' { + str = true + b = d.r.readn1() + } + if !(b == '+' || b == '-' || b == '.' || (b >= '0' && b <= '9')) { + d.d.errorf("json: decNum: got first char '%c'", b) + return + } + d.tok = 0 + + const cutoff = (1<<64-1)/uint64(10) + 1 // cutoff64(base) + const jsonNumUintMaxVal = 1<= jsonNumUintCutoff { + n.manOverflow = true + break + } + v := uint64(b - '0') + n.mantissa *= 10 + if v != 0 { + n1 := n.mantissa + v + if n1 < n.mantissa || n1 > jsonNumUintMaxVal { + n.manOverflow = true // n+v overflows + break + } + n.mantissa = n1 + } + case 6: + state = 7 + fallthrough + case 7: + if !(b == '0' && e == 0) { + e = e*10 + int16(b-'0') + } + default: + break LOOP + } + case '"': + if str { + if storeBytes { + d.bs = append(d.bs, '"') + } + b, eof = r.readn1eof() + } + break LOOP + default: + break LOOP + } + if storeBytes { + d.bs = append(d.bs, b) + } + b, eof = r.readn1eof() + } + + if jsonTruncateMantissa && n.mantissa != 0 { + for n.mantissa%10 == 0 { + n.mantissa /= 10 + n.exponent++ + } + } + + if e != 0 { + if eNeg { + n.exponent -= e + } else { + n.exponent += e + } + } + + // d.n = n + + if !eof { + if jsonUnreadAfterDecNum { + r.unreadn1() + } else { + if !jsonIsWS(b) { + d.tok = b + } + } + } + // fmt.Printf("1: n: bytes: %s, neg: %v, dot: %v, exponent: %v, mantissaEndIndex: %v\n", + // n.bytes, n.neg, n.dot, n.exponent, n.mantissaEndIndex) + return +} + +func (d *jsonDecDriver) DecodeInt(bitsize uint8) (i int64) { + d.decNum(false) + n := &d.n + if n.manOverflow { + d.d.errorf("json: overflow integer after: %v", n.mantissa) + return + } + var u uint64 + if n.exponent == 0 { + u = n.mantissa + } else if n.exponent < 0 { + d.d.errorf("json: fractional integer") + return + } else if n.exponent > 0 { + var overflow bool + if u, overflow = n.uintExp(); overflow { + d.d.errorf("json: overflow integer") + return + } + } + i = int64(u) + if n.neg { + i = -i + } + if chkOvf.Int(i, bitsize) { + d.d.errorf("json: overflow %v bits: %s", bitsize, d.bs) + return + } + // fmt.Printf("DecodeInt: %v\n", i) + return +} + +// floatVal MUST only be called after a decNum, as d.bs now contains the bytes of the number +func (d *jsonDecDriver) floatVal() (f float64) { + f, useStrConv := d.n.floatVal() + if useStrConv { + var err error + if f, err = strconv.ParseFloat(stringView(d.bs), 64); err != nil { + panic(fmt.Errorf("parse float: %s, %v", d.bs, err)) + } + if d.n.neg { + f = -f + } + } + return +} + +func (d *jsonDecDriver) DecodeUint(bitsize uint8) (u uint64) { + d.decNum(false) + n := &d.n + if n.neg { + d.d.errorf("json: unsigned integer cannot be negative") + return + } + if n.manOverflow { + d.d.errorf("json: overflow integer after: %v", n.mantissa) + return + } + if n.exponent == 0 { + u = n.mantissa + } else if n.exponent < 0 { + d.d.errorf("json: fractional integer") + return + } else if n.exponent > 0 { + var overflow bool + if u, overflow = n.uintExp(); overflow { + d.d.errorf("json: overflow integer") + return + } + } + if chkOvf.Uint(u, bitsize) { + d.d.errorf("json: overflow %v bits: %s", bitsize, d.bs) + return + } + // fmt.Printf("DecodeUint: %v\n", u) + return +} + +func (d *jsonDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + d.decNum(true) + f = d.floatVal() + if chkOverflow32 && chkOvf.Float32(f) { + d.d.errorf("json: overflow float32: %v, %s", f, d.bs) + return + } + return +} + +func (d *jsonDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { + if ext == nil { + re := rv.(*RawExt) + re.Tag = xtag + d.d.decode(&re.Value) + } else { + var v interface{} + d.d.decode(&v) + ext.UpdateExt(rv, v) + } + return +} + +func (d *jsonDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) { + // if decoding into raw bytes, and the RawBytesExt is configured, use it to decode. + if !isstring && d.se.i != nil { + bsOut = bs + d.DecodeExt(&bsOut, 0, &d.se) + return + } + d.appendStringAsBytes() + // if isstring, then just return the bytes, even if it is using the scratch buffer. + // the bytes will be converted to a string as needed. + if isstring { + return d.bs + } + bs0 := d.bs + slen := base64.StdEncoding.DecodedLen(len(bs0)) + if slen <= cap(bs) { + bsOut = bs[:slen] + } else if zerocopy && slen <= cap(d.b2) { + bsOut = d.b2[:slen] + } else { + bsOut = make([]byte, slen) + } + slen2, err := base64.StdEncoding.Decode(bsOut, bs0) + if err != nil { + d.d.errorf("json: error decoding base64 binary '%s': %v", bs0, err) + return nil + } + if slen != slen2 { + bsOut = bsOut[:slen2] + } + return +} + +func (d *jsonDecDriver) DecodeString() (s string) { + d.appendStringAsBytes() + // if x := d.s.sc; x != nil && x.so && x.st == '}' { // map key + if d.c == containerMapKey { + return d.d.string(d.bs) + } + return string(d.bs) +} + +func (d *jsonDecDriver) appendStringAsBytes() { + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + if d.tok != '"' { + d.d.errorf("json: expect char '%c' but got char '%c'", '"', d.tok) + } + d.tok = 0 + + v := d.bs[:0] + var c uint8 + r := d.r + for { + c = r.readn1() + if c == '"' { + break + } else if c == '\\' { + c = r.readn1() + switch c { + case '"', '\\', '/', '\'': + v = append(v, c) + case 'b': + v = append(v, '\b') + case 'f': + v = append(v, '\f') + case 'n': + v = append(v, '\n') + case 'r': + v = append(v, '\r') + case 't': + v = append(v, '\t') + case 'u': + rr := d.jsonU4(false) + // fmt.Printf("$$$$$$$$$: is surrogate: %v\n", utf16.IsSurrogate(rr)) + if utf16.IsSurrogate(rr) { + rr = utf16.DecodeRune(rr, d.jsonU4(true)) + } + w2 := utf8.EncodeRune(d.bstr[:], rr) + v = append(v, d.bstr[:w2]...) + default: + d.d.errorf("json: unsupported escaped value: %c", c) + } + } else { + v = append(v, c) + } + } + d.bs = v +} + +func (d *jsonDecDriver) jsonU4(checkSlashU bool) rune { + r := d.r + if checkSlashU && !(r.readn1() == '\\' && r.readn1() == 'u') { + d.d.errorf(`json: unquoteStr: invalid unicode sequence. Expecting \u`) + return 0 + } + // u, _ := strconv.ParseUint(string(d.bstr[:4]), 16, 64) + var u uint32 + for i := 0; i < 4; i++ { + v := r.readn1() + if '0' <= v && v <= '9' { + v = v - '0' + } else if 'a' <= v && v <= 'z' { + v = v - 'a' + 10 + } else if 'A' <= v && v <= 'Z' { + v = v - 'A' + 10 + } else { + d.d.errorf(`json: unquoteStr: invalid hex char in \u unicode sequence: %q`, v) + return 0 + } + u = u*16 + uint32(v) + } + return rune(u) +} + +func (d *jsonDecDriver) DecodeNaked() { + z := &d.d.n + // var decodeFurther bool + + if d.tok == 0 { + var b byte + r := d.r + for b = r.readn1(); jsonIsWS(b); b = r.readn1() { + } + d.tok = b + } + switch d.tok { + case 'n': + d.readStrIdx(10, 13) // ull + z.v = valueTypeNil + case 'f': + d.readStrIdx(5, 9) // alse + z.v = valueTypeBool + z.b = false + case 't': + d.readStrIdx(1, 4) // rue + z.v = valueTypeBool + z.b = true + case '{': + z.v = valueTypeMap + // d.tok = 0 // don't consume. kInterfaceNaked will call ReadMapStart + // decodeFurther = true + case '[': + z.v = valueTypeArray + // d.tok = 0 // don't consume. kInterfaceNaked will call ReadArrayStart + // decodeFurther = true + case '"': + z.v = valueTypeString + z.s = d.DecodeString() + default: // number + d.decNum(true) + n := &d.n + // if the string had a any of [.eE], then decode as float. + switch { + case n.explicitExponent, n.dot, n.exponent < 0, n.manOverflow: + z.v = valueTypeFloat + z.f = d.floatVal() + case n.exponent == 0: + u := n.mantissa + switch { + case n.neg: + z.v = valueTypeInt + z.i = -int64(u) + case d.h.SignedInteger: + z.v = valueTypeInt + z.i = int64(u) + default: + z.v = valueTypeUint + z.u = u + } + default: + u, overflow := n.uintExp() + switch { + case overflow: + z.v = valueTypeFloat + z.f = d.floatVal() + case n.neg: + z.v = valueTypeInt + z.i = -int64(u) + case d.h.SignedInteger: + z.v = valueTypeInt + z.i = int64(u) + default: + z.v = valueTypeUint + z.u = u + } + } + // fmt.Printf("DecodeNaked: Number: %T, %v\n", v, v) + } + // if decodeFurther { + // d.s.sc.retryRead() + // } + return +} + +//---------------------- + +// JsonHandle is a handle for JSON encoding format. +// +// Json is comprehensively supported: +// - decodes numbers into interface{} as int, uint or float64 +// - configurable way to encode/decode []byte . +// by default, encodes and decodes []byte using base64 Std Encoding +// - UTF-8 support for encoding and decoding +// +// It has better performance than the json library in the standard library, +// by leveraging the performance improvements of the codec library and +// minimizing allocations. +// +// In addition, it doesn't read more bytes than necessary during a decode, which allows +// reading multiple values from a stream containing json and non-json content. +// For example, a user can read a json value, then a cbor value, then a msgpack value, +// all from the same stream in sequence. +type JsonHandle struct { + textEncodingType + BasicHandle + // RawBytesExt, if configured, is used to encode and decode raw bytes in a custom way. + // If not configured, raw bytes are encoded to/from base64 text. + RawBytesExt InterfaceExt + + // Indent indicates how a value is encoded. + // - If positive, indent by that number of spaces. + // - If negative, indent by that number of tabs. + Indent int8 + + // IntegerAsString controls how integers (signed and unsigned) are encoded. + // + // Per the JSON Spec, JSON numbers are 64-bit floating point numbers. + // Consequently, integers > 2^53 cannot be represented as a JSON number without losing precision. + // This can be mitigated by configuring how to encode integers. + // + // IntegerAsString interpretes the following values: + // - if 'L', then encode integers > 2^53 as a json string. + // - if 'A', then encode all integers as a json string + // containing the exact integer representation as a decimal. + // - else encode all integers as a json number (default) + IntegerAsString uint8 +} + +func (h *JsonHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) { + return h.SetExt(rt, tag, &setExtWrapper{i: ext}) +} + +func (h *JsonHandle) newEncDriver(e *Encoder) encDriver { + hd := jsonEncDriver{e: e, h: h} + hd.bs = hd.b[:0] + + hd.reset() + + return &hd +} + +func (h *JsonHandle) newDecDriver(d *Decoder) decDriver { + // d := jsonDecDriver{r: r.(*bytesDecReader), h: h} + hd := jsonDecDriver{d: d, h: h} + hd.bs = hd.b[:0] + hd.reset() + return &hd +} + +func (e *jsonEncDriver) reset() { + e.w = e.e.w + e.se.i = e.h.RawBytesExt + if e.bs != nil { + e.bs = e.bs[:0] + } + e.d, e.dt, e.dl, e.ds = false, false, 0, "" + e.c = 0 + if e.h.Indent > 0 { + e.d = true + e.ds = jsonSpaces[:e.h.Indent] + } else if e.h.Indent < 0 { + e.d = true + e.dt = true + e.ds = jsonTabs[:-(e.h.Indent)] + } +} + +func (d *jsonDecDriver) reset() { + d.r = d.d.r + d.se.i = d.h.RawBytesExt + if d.bs != nil { + d.bs = d.bs[:0] + } + d.c, d.tok = 0, 0 + d.n.reset() +} + +var jsonEncodeTerminate = []byte{' '} + +func (h *JsonHandle) rpcEncodeTerminate() []byte { + return jsonEncodeTerminate +} + +var _ decDriver = (*jsonDecDriver)(nil) +var _ encDriver = (*jsonEncDriver)(nil) diff --git a/vendor/github.com/ugorji/go/codec/msgpack.go b/vendor/github.com/ugorji/go/codec/msgpack.go new file mode 100644 index 000000000..f9f872362 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/msgpack.go @@ -0,0 +1,845 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +/* +MSGPACK + +Msgpack-c implementation powers the c, c++, python, ruby, etc libraries. +We need to maintain compatibility with it and how it encodes integer values +without caring about the type. + +For compatibility with behaviour of msgpack-c reference implementation: + - Go intX (>0) and uintX + IS ENCODED AS + msgpack +ve fixnum, unsigned + - Go intX (<0) + IS ENCODED AS + msgpack -ve fixnum, signed + +*/ +package codec + +import ( + "fmt" + "io" + "math" + "net/rpc" + "reflect" +) + +const ( + mpPosFixNumMin byte = 0x00 + mpPosFixNumMax = 0x7f + mpFixMapMin = 0x80 + mpFixMapMax = 0x8f + mpFixArrayMin = 0x90 + mpFixArrayMax = 0x9f + mpFixStrMin = 0xa0 + mpFixStrMax = 0xbf + mpNil = 0xc0 + _ = 0xc1 + mpFalse = 0xc2 + mpTrue = 0xc3 + mpFloat = 0xca + mpDouble = 0xcb + mpUint8 = 0xcc + mpUint16 = 0xcd + mpUint32 = 0xce + mpUint64 = 0xcf + mpInt8 = 0xd0 + mpInt16 = 0xd1 + mpInt32 = 0xd2 + mpInt64 = 0xd3 + + // extensions below + mpBin8 = 0xc4 + mpBin16 = 0xc5 + mpBin32 = 0xc6 + mpExt8 = 0xc7 + mpExt16 = 0xc8 + mpExt32 = 0xc9 + mpFixExt1 = 0xd4 + mpFixExt2 = 0xd5 + mpFixExt4 = 0xd6 + mpFixExt8 = 0xd7 + mpFixExt16 = 0xd8 + + mpStr8 = 0xd9 // new + mpStr16 = 0xda + mpStr32 = 0xdb + + mpArray16 = 0xdc + mpArray32 = 0xdd + + mpMap16 = 0xde + mpMap32 = 0xdf + + mpNegFixNumMin = 0xe0 + mpNegFixNumMax = 0xff +) + +// MsgpackSpecRpcMultiArgs is a special type which signifies to the MsgpackSpecRpcCodec +// that the backend RPC service takes multiple arguments, which have been arranged +// in sequence in the slice. +// +// The Codec then passes it AS-IS to the rpc service (without wrapping it in an +// array of 1 element). +type MsgpackSpecRpcMultiArgs []interface{} + +// A MsgpackContainer type specifies the different types of msgpackContainers. +type msgpackContainerType struct { + fixCutoff int + bFixMin, b8, b16, b32 byte + hasFixMin, has8, has8Always bool +} + +var ( + msgpackContainerStr = msgpackContainerType{32, mpFixStrMin, mpStr8, mpStr16, mpStr32, true, true, false} + msgpackContainerBin = msgpackContainerType{0, 0, mpBin8, mpBin16, mpBin32, false, true, true} + msgpackContainerList = msgpackContainerType{16, mpFixArrayMin, 0, mpArray16, mpArray32, true, false, false} + msgpackContainerMap = msgpackContainerType{16, mpFixMapMin, 0, mpMap16, mpMap32, true, false, false} +) + +//--------------------------------------------- + +type msgpackEncDriver struct { + noBuiltInTypes + encNoSeparator + e *Encoder + w encWriter + h *MsgpackHandle + x [8]byte +} + +func (e *msgpackEncDriver) EncodeNil() { + e.w.writen1(mpNil) +} + +func (e *msgpackEncDriver) EncodeInt(i int64) { + if i >= 0 { + e.EncodeUint(uint64(i)) + } else if i >= -32 { + e.w.writen1(byte(i)) + } else if i >= math.MinInt8 { + e.w.writen2(mpInt8, byte(i)) + } else if i >= math.MinInt16 { + e.w.writen1(mpInt16) + bigenHelper{e.x[:2], e.w}.writeUint16(uint16(i)) + } else if i >= math.MinInt32 { + e.w.writen1(mpInt32) + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(i)) + } else { + e.w.writen1(mpInt64) + bigenHelper{e.x[:8], e.w}.writeUint64(uint64(i)) + } +} + +func (e *msgpackEncDriver) EncodeUint(i uint64) { + if i <= math.MaxInt8 { + e.w.writen1(byte(i)) + } else if i <= math.MaxUint8 { + e.w.writen2(mpUint8, byte(i)) + } else if i <= math.MaxUint16 { + e.w.writen1(mpUint16) + bigenHelper{e.x[:2], e.w}.writeUint16(uint16(i)) + } else if i <= math.MaxUint32 { + e.w.writen1(mpUint32) + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(i)) + } else { + e.w.writen1(mpUint64) + bigenHelper{e.x[:8], e.w}.writeUint64(uint64(i)) + } +} + +func (e *msgpackEncDriver) EncodeBool(b bool) { + if b { + e.w.writen1(mpTrue) + } else { + e.w.writen1(mpFalse) + } +} + +func (e *msgpackEncDriver) EncodeFloat32(f float32) { + e.w.writen1(mpFloat) + bigenHelper{e.x[:4], e.w}.writeUint32(math.Float32bits(f)) +} + +func (e *msgpackEncDriver) EncodeFloat64(f float64) { + e.w.writen1(mpDouble) + bigenHelper{e.x[:8], e.w}.writeUint64(math.Float64bits(f)) +} + +func (e *msgpackEncDriver) EncodeExt(v interface{}, xtag uint64, ext Ext, _ *Encoder) { + bs := ext.WriteExt(v) + if bs == nil { + e.EncodeNil() + return + } + if e.h.WriteExt { + e.encodeExtPreamble(uint8(xtag), len(bs)) + e.w.writeb(bs) + } else { + e.EncodeStringBytes(c_RAW, bs) + } +} + +func (e *msgpackEncDriver) EncodeRawExt(re *RawExt, _ *Encoder) { + e.encodeExtPreamble(uint8(re.Tag), len(re.Data)) + e.w.writeb(re.Data) +} + +func (e *msgpackEncDriver) encodeExtPreamble(xtag byte, l int) { + if l == 1 { + e.w.writen2(mpFixExt1, xtag) + } else if l == 2 { + e.w.writen2(mpFixExt2, xtag) + } else if l == 4 { + e.w.writen2(mpFixExt4, xtag) + } else if l == 8 { + e.w.writen2(mpFixExt8, xtag) + } else if l == 16 { + e.w.writen2(mpFixExt16, xtag) + } else if l < 256 { + e.w.writen2(mpExt8, byte(l)) + e.w.writen1(xtag) + } else if l < 65536 { + e.w.writen1(mpExt16) + bigenHelper{e.x[:2], e.w}.writeUint16(uint16(l)) + e.w.writen1(xtag) + } else { + e.w.writen1(mpExt32) + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(l)) + e.w.writen1(xtag) + } +} + +func (e *msgpackEncDriver) EncodeArrayStart(length int) { + e.writeContainerLen(msgpackContainerList, length) +} + +func (e *msgpackEncDriver) EncodeMapStart(length int) { + e.writeContainerLen(msgpackContainerMap, length) +} + +func (e *msgpackEncDriver) EncodeString(c charEncoding, s string) { + if c == c_RAW && e.h.WriteExt { + e.writeContainerLen(msgpackContainerBin, len(s)) + } else { + e.writeContainerLen(msgpackContainerStr, len(s)) + } + if len(s) > 0 { + e.w.writestr(s) + } +} + +func (e *msgpackEncDriver) EncodeSymbol(v string) { + e.EncodeString(c_UTF8, v) +} + +func (e *msgpackEncDriver) EncodeStringBytes(c charEncoding, bs []byte) { + if c == c_RAW && e.h.WriteExt { + e.writeContainerLen(msgpackContainerBin, len(bs)) + } else { + e.writeContainerLen(msgpackContainerStr, len(bs)) + } + if len(bs) > 0 { + e.w.writeb(bs) + } +} + +func (e *msgpackEncDriver) writeContainerLen(ct msgpackContainerType, l int) { + if ct.hasFixMin && l < ct.fixCutoff { + e.w.writen1(ct.bFixMin | byte(l)) + } else if ct.has8 && l < 256 && (ct.has8Always || e.h.WriteExt) { + e.w.writen2(ct.b8, uint8(l)) + } else if l < 65536 { + e.w.writen1(ct.b16) + bigenHelper{e.x[:2], e.w}.writeUint16(uint16(l)) + } else { + e.w.writen1(ct.b32) + bigenHelper{e.x[:4], e.w}.writeUint32(uint32(l)) + } +} + +//--------------------------------------------- + +type msgpackDecDriver struct { + d *Decoder + r decReader // *Decoder decReader decReaderT + h *MsgpackHandle + b [scratchByteArrayLen]byte + bd byte + bdRead bool + br bool // bytes reader + noBuiltInTypes + noStreamingCodec + decNoSeparator +} + +// Note: This returns either a primitive (int, bool, etc) for non-containers, +// or a containerType, or a specific type denoting nil or extension. +// It is called when a nil interface{} is passed, leaving it up to the DecDriver +// to introspect the stream and decide how best to decode. +// It deciphers the value by looking at the stream first. +func (d *msgpackDecDriver) DecodeNaked() { + if !d.bdRead { + d.readNextBd() + } + bd := d.bd + n := &d.d.n + var decodeFurther bool + + switch bd { + case mpNil: + n.v = valueTypeNil + d.bdRead = false + case mpFalse: + n.v = valueTypeBool + n.b = false + case mpTrue: + n.v = valueTypeBool + n.b = true + + case mpFloat: + n.v = valueTypeFloat + n.f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + case mpDouble: + n.v = valueTypeFloat + n.f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + + case mpUint8: + n.v = valueTypeUint + n.u = uint64(d.r.readn1()) + case mpUint16: + n.v = valueTypeUint + n.u = uint64(bigen.Uint16(d.r.readx(2))) + case mpUint32: + n.v = valueTypeUint + n.u = uint64(bigen.Uint32(d.r.readx(4))) + case mpUint64: + n.v = valueTypeUint + n.u = uint64(bigen.Uint64(d.r.readx(8))) + + case mpInt8: + n.v = valueTypeInt + n.i = int64(int8(d.r.readn1())) + case mpInt16: + n.v = valueTypeInt + n.i = int64(int16(bigen.Uint16(d.r.readx(2)))) + case mpInt32: + n.v = valueTypeInt + n.i = int64(int32(bigen.Uint32(d.r.readx(4)))) + case mpInt64: + n.v = valueTypeInt + n.i = int64(int64(bigen.Uint64(d.r.readx(8)))) + + default: + switch { + case bd >= mpPosFixNumMin && bd <= mpPosFixNumMax: + // positive fixnum (always signed) + n.v = valueTypeInt + n.i = int64(int8(bd)) + case bd >= mpNegFixNumMin && bd <= mpNegFixNumMax: + // negative fixnum + n.v = valueTypeInt + n.i = int64(int8(bd)) + case bd == mpStr8, bd == mpStr16, bd == mpStr32, bd >= mpFixStrMin && bd <= mpFixStrMax: + if d.h.RawToString { + n.v = valueTypeString + n.s = d.DecodeString() + } else { + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) + } + case bd == mpBin8, bd == mpBin16, bd == mpBin32: + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) + case bd == mpArray16, bd == mpArray32, bd >= mpFixArrayMin && bd <= mpFixArrayMax: + n.v = valueTypeArray + decodeFurther = true + case bd == mpMap16, bd == mpMap32, bd >= mpFixMapMin && bd <= mpFixMapMax: + n.v = valueTypeMap + decodeFurther = true + case bd >= mpFixExt1 && bd <= mpFixExt16, bd >= mpExt8 && bd <= mpExt32: + n.v = valueTypeExt + clen := d.readExtLen() + n.u = uint64(d.r.readn1()) + n.l = d.r.readx(clen) + default: + d.d.errorf("Nil-Deciphered DecodeValue: %s: hex: %x, dec: %d", msgBadDesc, bd, bd) + } + } + if !decodeFurther { + d.bdRead = false + } + if n.v == valueTypeUint && d.h.SignedInteger { + n.v = valueTypeInt + n.i = int64(n.u) + } + return +} + +// int can be decoded from msgpack type: intXXX or uintXXX +func (d *msgpackDecDriver) DecodeInt(bitsize uint8) (i int64) { + if !d.bdRead { + d.readNextBd() + } + switch d.bd { + case mpUint8: + i = int64(uint64(d.r.readn1())) + case mpUint16: + i = int64(uint64(bigen.Uint16(d.r.readx(2)))) + case mpUint32: + i = int64(uint64(bigen.Uint32(d.r.readx(4)))) + case mpUint64: + i = int64(bigen.Uint64(d.r.readx(8))) + case mpInt8: + i = int64(int8(d.r.readn1())) + case mpInt16: + i = int64(int16(bigen.Uint16(d.r.readx(2)))) + case mpInt32: + i = int64(int32(bigen.Uint32(d.r.readx(4)))) + case mpInt64: + i = int64(bigen.Uint64(d.r.readx(8))) + default: + switch { + case d.bd >= mpPosFixNumMin && d.bd <= mpPosFixNumMax: + i = int64(int8(d.bd)) + case d.bd >= mpNegFixNumMin && d.bd <= mpNegFixNumMax: + i = int64(int8(d.bd)) + default: + d.d.errorf("Unhandled single-byte unsigned integer value: %s: %x", msgBadDesc, d.bd) + return + } + } + // check overflow (logic adapted from std pkg reflect/value.go OverflowUint() + if bitsize > 0 { + if trunc := (i << (64 - bitsize)) >> (64 - bitsize); i != trunc { + d.d.errorf("Overflow int value: %v", i) + return + } + } + d.bdRead = false + return +} + +// uint can be decoded from msgpack type: intXXX or uintXXX +func (d *msgpackDecDriver) DecodeUint(bitsize uint8) (ui uint64) { + if !d.bdRead { + d.readNextBd() + } + switch d.bd { + case mpUint8: + ui = uint64(d.r.readn1()) + case mpUint16: + ui = uint64(bigen.Uint16(d.r.readx(2))) + case mpUint32: + ui = uint64(bigen.Uint32(d.r.readx(4))) + case mpUint64: + ui = bigen.Uint64(d.r.readx(8)) + case mpInt8: + if i := int64(int8(d.r.readn1())); i >= 0 { + ui = uint64(i) + } else { + d.d.errorf("Assigning negative signed value: %v, to unsigned type", i) + return + } + case mpInt16: + if i := int64(int16(bigen.Uint16(d.r.readx(2)))); i >= 0 { + ui = uint64(i) + } else { + d.d.errorf("Assigning negative signed value: %v, to unsigned type", i) + return + } + case mpInt32: + if i := int64(int32(bigen.Uint32(d.r.readx(4)))); i >= 0 { + ui = uint64(i) + } else { + d.d.errorf("Assigning negative signed value: %v, to unsigned type", i) + return + } + case mpInt64: + if i := int64(bigen.Uint64(d.r.readx(8))); i >= 0 { + ui = uint64(i) + } else { + d.d.errorf("Assigning negative signed value: %v, to unsigned type", i) + return + } + default: + switch { + case d.bd >= mpPosFixNumMin && d.bd <= mpPosFixNumMax: + ui = uint64(d.bd) + case d.bd >= mpNegFixNumMin && d.bd <= mpNegFixNumMax: + d.d.errorf("Assigning negative signed value: %v, to unsigned type", int(d.bd)) + return + default: + d.d.errorf("Unhandled single-byte unsigned integer value: %s: %x", msgBadDesc, d.bd) + return + } + } + // check overflow (logic adapted from std pkg reflect/value.go OverflowUint() + if bitsize > 0 { + if trunc := (ui << (64 - bitsize)) >> (64 - bitsize); ui != trunc { + d.d.errorf("Overflow uint value: %v", ui) + return + } + } + d.bdRead = false + return +} + +// float can either be decoded from msgpack type: float, double or intX +func (d *msgpackDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == mpFloat { + f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + } else if d.bd == mpDouble { + f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + } else { + f = float64(d.DecodeInt(0)) + } + if chkOverflow32 && chkOvf.Float32(f) { + d.d.errorf("msgpack: float32 overflow: %v", f) + return + } + d.bdRead = false + return +} + +// bool can be decoded from bool, fixnum 0 or 1. +func (d *msgpackDecDriver) DecodeBool() (b bool) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == mpFalse || d.bd == 0 { + // b = false + } else if d.bd == mpTrue || d.bd == 1 { + b = true + } else { + d.d.errorf("Invalid single-byte value for bool: %s: %x", msgBadDesc, d.bd) + return + } + d.bdRead = false + return +} + +func (d *msgpackDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) { + if !d.bdRead { + d.readNextBd() + } + var clen int + // ignore isstring. Expect that the bytes may be found from msgpackContainerStr or msgpackContainerBin + if bd := d.bd; bd == mpBin8 || bd == mpBin16 || bd == mpBin32 { + clen = d.readContainerLen(msgpackContainerBin) + } else { + clen = d.readContainerLen(msgpackContainerStr) + } + // println("DecodeBytes: clen: ", clen) + d.bdRead = false + // bytes may be nil, so handle it. if nil, clen=-1. + if clen < 0 { + return nil + } + if zerocopy { + if d.br { + return d.r.readx(clen) + } else if len(bs) == 0 { + bs = d.b[:] + } + } + return decByteSlice(d.r, clen, bs) +} + +func (d *msgpackDecDriver) DecodeString() (s string) { + return string(d.DecodeBytes(d.b[:], true, true)) +} + +func (d *msgpackDecDriver) readNextBd() { + d.bd = d.r.readn1() + d.bdRead = true +} + +func (d *msgpackDecDriver) ContainerType() (vt valueType) { + bd := d.bd + if bd == mpNil { + return valueTypeNil + } else if bd == mpBin8 || bd == mpBin16 || bd == mpBin32 || + (!d.h.RawToString && + (bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || (bd >= mpFixStrMin && bd <= mpFixStrMax))) { + return valueTypeBytes + } else if d.h.RawToString && + (bd == mpStr8 || bd == mpStr16 || bd == mpStr32 || (bd >= mpFixStrMin && bd <= mpFixStrMax)) { + return valueTypeString + } else if bd == mpArray16 || bd == mpArray32 || (bd >= mpFixArrayMin && bd <= mpFixArrayMax) { + return valueTypeArray + } else if bd == mpMap16 || bd == mpMap32 || (bd >= mpFixMapMin && bd <= mpFixMapMax) { + return valueTypeMap + } else { + // d.d.errorf("isContainerType: unsupported parameter: %v", vt) + } + return valueTypeUnset +} + +func (d *msgpackDecDriver) TryDecodeAsNil() (v bool) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == mpNil { + d.bdRead = false + v = true + } + return +} + +func (d *msgpackDecDriver) readContainerLen(ct msgpackContainerType) (clen int) { + bd := d.bd + if bd == mpNil { + clen = -1 // to represent nil + } else if bd == ct.b8 { + clen = int(d.r.readn1()) + } else if bd == ct.b16 { + clen = int(bigen.Uint16(d.r.readx(2))) + } else if bd == ct.b32 { + clen = int(bigen.Uint32(d.r.readx(4))) + } else if (ct.bFixMin & bd) == ct.bFixMin { + clen = int(ct.bFixMin ^ bd) + } else { + d.d.errorf("readContainerLen: %s: hex: %x, decimal: %d", msgBadDesc, bd, bd) + return + } + d.bdRead = false + return +} + +func (d *msgpackDecDriver) ReadMapStart() int { + return d.readContainerLen(msgpackContainerMap) +} + +func (d *msgpackDecDriver) ReadArrayStart() int { + return d.readContainerLen(msgpackContainerList) +} + +func (d *msgpackDecDriver) readExtLen() (clen int) { + switch d.bd { + case mpNil: + clen = -1 // to represent nil + case mpFixExt1: + clen = 1 + case mpFixExt2: + clen = 2 + case mpFixExt4: + clen = 4 + case mpFixExt8: + clen = 8 + case mpFixExt16: + clen = 16 + case mpExt8: + clen = int(d.r.readn1()) + case mpExt16: + clen = int(bigen.Uint16(d.r.readx(2))) + case mpExt32: + clen = int(bigen.Uint32(d.r.readx(4))) + default: + d.d.errorf("decoding ext bytes: found unexpected byte: %x", d.bd) + return + } + return +} + +func (d *msgpackDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { + if xtag > 0xff { + d.d.errorf("decodeExt: tag must be <= 0xff; got: %v", xtag) + return + } + realxtag1, xbs := d.decodeExtV(ext != nil, uint8(xtag)) + realxtag = uint64(realxtag1) + if ext == nil { + re := rv.(*RawExt) + re.Tag = realxtag + re.Data = detachZeroCopyBytes(d.br, re.Data, xbs) + } else { + ext.ReadExt(rv, xbs) + } + return +} + +func (d *msgpackDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs []byte) { + if !d.bdRead { + d.readNextBd() + } + xbd := d.bd + if xbd == mpBin8 || xbd == mpBin16 || xbd == mpBin32 { + xbs = d.DecodeBytes(nil, false, true) + } else if xbd == mpStr8 || xbd == mpStr16 || xbd == mpStr32 || + (xbd >= mpFixStrMin && xbd <= mpFixStrMax) { + xbs = d.DecodeBytes(nil, true, true) + } else { + clen := d.readExtLen() + xtag = d.r.readn1() + if verifyTag && xtag != tag { + d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", xtag, tag) + return + } + xbs = d.r.readx(clen) + } + d.bdRead = false + return +} + +//-------------------------------------------------- + +//MsgpackHandle is a Handle for the Msgpack Schema-Free Encoding Format. +type MsgpackHandle struct { + BasicHandle + + // RawToString controls how raw bytes are decoded into a nil interface{}. + RawToString bool + + // WriteExt flag supports encoding configured extensions with extension tags. + // It also controls whether other elements of the new spec are encoded (ie Str8). + // + // With WriteExt=false, configured extensions are serialized as raw bytes + // and Str8 is not encoded. + // + // A stream can still be decoded into a typed value, provided an appropriate value + // is provided, but the type cannot be inferred from the stream. If no appropriate + // type is provided (e.g. decoding into a nil interface{}), you get back + // a []byte or string based on the setting of RawToString. + WriteExt bool + binaryEncodingType +} + +func (h *MsgpackHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { + return h.SetExt(rt, tag, &setExtWrapper{b: ext}) +} + +func (h *MsgpackHandle) newEncDriver(e *Encoder) encDriver { + return &msgpackEncDriver{e: e, w: e.w, h: h} +} + +func (h *MsgpackHandle) newDecDriver(d *Decoder) decDriver { + return &msgpackDecDriver{d: d, r: d.r, h: h, br: d.bytes} +} + +func (e *msgpackEncDriver) reset() { + e.w = e.e.w +} + +func (d *msgpackDecDriver) reset() { + d.r = d.d.r + d.bd, d.bdRead = 0, false +} + +//-------------------------------------------------- + +type msgpackSpecRpcCodec struct { + rpcCodec +} + +// /////////////// Spec RPC Codec /////////////////// +func (c *msgpackSpecRpcCodec) WriteRequest(r *rpc.Request, body interface{}) error { + // WriteRequest can write to both a Go service, and other services that do + // not abide by the 1 argument rule of a Go service. + // We discriminate based on if the body is a MsgpackSpecRpcMultiArgs + var bodyArr []interface{} + if m, ok := body.(MsgpackSpecRpcMultiArgs); ok { + bodyArr = ([]interface{})(m) + } else { + bodyArr = []interface{}{body} + } + r2 := []interface{}{0, uint32(r.Seq), r.ServiceMethod, bodyArr} + return c.write(r2, nil, false, true) +} + +func (c *msgpackSpecRpcCodec) WriteResponse(r *rpc.Response, body interface{}) error { + var moe interface{} + if r.Error != "" { + moe = r.Error + } + if moe != nil && body != nil { + body = nil + } + r2 := []interface{}{1, uint32(r.Seq), moe, body} + return c.write(r2, nil, false, true) +} + +func (c *msgpackSpecRpcCodec) ReadResponseHeader(r *rpc.Response) error { + return c.parseCustomHeader(1, &r.Seq, &r.Error) +} + +func (c *msgpackSpecRpcCodec) ReadRequestHeader(r *rpc.Request) error { + return c.parseCustomHeader(0, &r.Seq, &r.ServiceMethod) +} + +func (c *msgpackSpecRpcCodec) ReadRequestBody(body interface{}) error { + if body == nil { // read and discard + return c.read(nil) + } + bodyArr := []interface{}{body} + return c.read(&bodyArr) +} + +func (c *msgpackSpecRpcCodec) parseCustomHeader(expectTypeByte byte, msgid *uint64, methodOrError *string) (err error) { + + if c.isClosed() { + return io.EOF + } + + // We read the response header by hand + // so that the body can be decoded on its own from the stream at a later time. + + const fia byte = 0x94 //four item array descriptor value + // Not sure why the panic of EOF is swallowed above. + // if bs1 := c.dec.r.readn1(); bs1 != fia { + // err = fmt.Errorf("Unexpected value for array descriptor: Expecting %v. Received %v", fia, bs1) + // return + // } + var b byte + b, err = c.br.ReadByte() + if err != nil { + return + } + if b != fia { + err = fmt.Errorf("Unexpected value for array descriptor: Expecting %v. Received %v", fia, b) + return + } + + if err = c.read(&b); err != nil { + return + } + if b != expectTypeByte { + err = fmt.Errorf("Unexpected byte descriptor in header. Expecting %v. Received %v", expectTypeByte, b) + return + } + if err = c.read(msgid); err != nil { + return + } + if err = c.read(methodOrError); err != nil { + return + } + return +} + +//-------------------------------------------------- + +// msgpackSpecRpc is the implementation of Rpc that uses custom communication protocol +// as defined in the msgpack spec at https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md +type msgpackSpecRpc struct{} + +// MsgpackSpecRpc implements Rpc using the communication protocol defined in +// the msgpack spec at https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md . +// Its methods (ServerCodec and ClientCodec) return values that implement RpcCodecBuffered. +var MsgpackSpecRpc msgpackSpecRpc + +func (x msgpackSpecRpc) ServerCodec(conn io.ReadWriteCloser, h Handle) rpc.ServerCodec { + return &msgpackSpecRpcCodec{newRPCCodec(conn, h)} +} + +func (x msgpackSpecRpc) ClientCodec(conn io.ReadWriteCloser, h Handle) rpc.ClientCodec { + return &msgpackSpecRpcCodec{newRPCCodec(conn, h)} +} + +var _ decDriver = (*msgpackDecDriver)(nil) +var _ encDriver = (*msgpackEncDriver)(nil) diff --git a/vendor/github.com/ugorji/go/codec/noop.go b/vendor/github.com/ugorji/go/codec/noop.go new file mode 100644 index 000000000..cfee3d084 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/noop.go @@ -0,0 +1,213 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "math/rand" + "time" +) + +// NoopHandle returns a no-op handle. It basically does nothing. +// It is only useful for benchmarking, as it gives an idea of the +// overhead from the codec framework. +// +// LIBRARY USERS: *** DO NOT USE *** +func NoopHandle(slen int) *noopHandle { + h := noopHandle{} + h.rand = rand.New(rand.NewSource(time.Now().UnixNano())) + h.B = make([][]byte, slen) + h.S = make([]string, slen) + for i := 0; i < len(h.S); i++ { + b := make([]byte, i+1) + for j := 0; j < len(b); j++ { + b[j] = 'a' + byte(i) + } + h.B[i] = b + h.S[i] = string(b) + } + return &h +} + +// noopHandle does nothing. +// It is used to simulate the overhead of the codec framework. +type noopHandle struct { + BasicHandle + binaryEncodingType + noopDrv // noopDrv is unexported here, so we can get a copy of it when needed. +} + +type noopDrv struct { + d *Decoder + e *Encoder + i int + S []string + B [][]byte + mks []bool // stack. if map (true), else if array (false) + mk bool // top of stack. what container are we on? map or array? + ct valueType // last response for IsContainerType. + cb int // counter for ContainerType + rand *rand.Rand +} + +func (h *noopDrv) r(v int) int { return h.rand.Intn(v) } +func (h *noopDrv) m(v int) int { h.i++; return h.i % v } + +func (h *noopDrv) newEncDriver(e *Encoder) encDriver { h.e = e; return h } +func (h *noopDrv) newDecDriver(d *Decoder) decDriver { h.d = d; return h } + +func (h *noopDrv) reset() {} +func (h *noopDrv) uncacheRead() {} + +// --- encDriver + +// stack functions (for map and array) +func (h *noopDrv) start(b bool) { + // println("start", len(h.mks)+1) + h.mks = append(h.mks, b) + h.mk = b +} +func (h *noopDrv) end() { + // println("end: ", len(h.mks)-1) + h.mks = h.mks[:len(h.mks)-1] + if len(h.mks) > 0 { + h.mk = h.mks[len(h.mks)-1] + } else { + h.mk = false + } +} + +func (h *noopDrv) EncodeBuiltin(rt uintptr, v interface{}) {} +func (h *noopDrv) EncodeNil() {} +func (h *noopDrv) EncodeInt(i int64) {} +func (h *noopDrv) EncodeUint(i uint64) {} +func (h *noopDrv) EncodeBool(b bool) {} +func (h *noopDrv) EncodeFloat32(f float32) {} +func (h *noopDrv) EncodeFloat64(f float64) {} +func (h *noopDrv) EncodeRawExt(re *RawExt, e *Encoder) {} +func (h *noopDrv) EncodeArrayStart(length int) { h.start(true) } +func (h *noopDrv) EncodeMapStart(length int) { h.start(false) } +func (h *noopDrv) EncodeEnd() { h.end() } + +func (h *noopDrv) EncodeString(c charEncoding, v string) {} +func (h *noopDrv) EncodeSymbol(v string) {} +func (h *noopDrv) EncodeStringBytes(c charEncoding, v []byte) {} + +func (h *noopDrv) EncodeExt(rv interface{}, xtag uint64, ext Ext, e *Encoder) {} + +// ---- decDriver +func (h *noopDrv) initReadNext() {} +func (h *noopDrv) CheckBreak() bool { return false } +func (h *noopDrv) IsBuiltinType(rt uintptr) bool { return false } +func (h *noopDrv) DecodeBuiltin(rt uintptr, v interface{}) {} +func (h *noopDrv) DecodeInt(bitsize uint8) (i int64) { return int64(h.m(15)) } +func (h *noopDrv) DecodeUint(bitsize uint8) (ui uint64) { return uint64(h.m(35)) } +func (h *noopDrv) DecodeFloat(chkOverflow32 bool) (f float64) { return float64(h.m(95)) } +func (h *noopDrv) DecodeBool() (b bool) { return h.m(2) == 0 } +func (h *noopDrv) DecodeString() (s string) { return h.S[h.m(8)] } + +// func (h *noopDrv) DecodeStringAsBytes(bs []byte) []byte { return h.DecodeBytes(bs) } + +func (h *noopDrv) DecodeBytes(bs []byte, isstring, zerocopy bool) []byte { return h.B[h.m(len(h.B))] } + +func (h *noopDrv) ReadEnd() { h.end() } + +// toggle map/slice +func (h *noopDrv) ReadMapStart() int { h.start(true); return h.m(10) } +func (h *noopDrv) ReadArrayStart() int { h.start(false); return h.m(10) } + +func (h *noopDrv) ContainerType() (vt valueType) { + // return h.m(2) == 0 + // handle kStruct, which will bomb is it calls this and doesn't get back a map or array. + // consequently, if the return value is not map or array, reset it to one of them based on h.m(7) % 2 + // for kstruct: at least one out of every 2 times, return one of valueTypeMap or Array (else kstruct bombs) + // however, every 10th time it is called, we just return something else. + var vals = [...]valueType{valueTypeArray, valueTypeMap} + // ------------ TAKE ------------ + // if h.cb%2 == 0 { + // if h.ct == valueTypeMap || h.ct == valueTypeArray { + // } else { + // h.ct = vals[h.m(2)] + // } + // } else if h.cb%5 == 0 { + // h.ct = valueType(h.m(8)) + // } else { + // h.ct = vals[h.m(2)] + // } + // ------------ TAKE ------------ + // if h.cb%16 == 0 { + // h.ct = valueType(h.cb % 8) + // } else { + // h.ct = vals[h.cb%2] + // } + h.ct = vals[h.cb%2] + h.cb++ + return h.ct + + // if h.ct == valueTypeNil || h.ct == valueTypeString || h.ct == valueTypeBytes { + // return h.ct + // } + // return valueTypeUnset + // TODO: may need to tweak this so it works. + // if h.ct == valueTypeMap && vt == valueTypeArray || h.ct == valueTypeArray && vt == valueTypeMap { + // h.cb = !h.cb + // h.ct = vt + // return h.cb + // } + // // go in a loop and check it. + // h.ct = vt + // h.cb = h.m(7) == 0 + // return h.cb +} +func (h *noopDrv) TryDecodeAsNil() bool { + if h.mk { + return false + } else { + return h.m(8) == 0 + } +} +func (h *noopDrv) DecodeExt(rv interface{}, xtag uint64, ext Ext) uint64 { + return 0 +} + +func (h *noopDrv) DecodeNaked() { + // use h.r (random) not h.m() because h.m() could cause the same value to be given. + var sk int + if h.mk { + // if mapkey, do not support values of nil OR bytes, array, map or rawext + sk = h.r(7) + 1 + } else { + sk = h.r(12) + } + n := &h.d.n + switch sk { + case 0: + n.v = valueTypeNil + case 1: + n.v, n.b = valueTypeBool, false + case 2: + n.v, n.b = valueTypeBool, true + case 3: + n.v, n.i = valueTypeInt, h.DecodeInt(64) + case 4: + n.v, n.u = valueTypeUint, h.DecodeUint(64) + case 5: + n.v, n.f = valueTypeFloat, h.DecodeFloat(true) + case 6: + n.v, n.f = valueTypeFloat, h.DecodeFloat(false) + case 7: + n.v, n.s = valueTypeString, h.DecodeString() + case 8: + n.v, n.l = valueTypeBytes, h.B[h.m(len(h.B))] + case 9: + n.v = valueTypeArray + case 10: + n.v = valueTypeMap + default: + n.v = valueTypeExt + n.u = h.DecodeUint(64) + n.l = h.B[h.m(len(h.B))] + } + h.ct = n.v + return +} diff --git a/vendor/github.com/ugorji/go/codec/prebuild.go b/vendor/github.com/ugorji/go/codec/prebuild.go new file mode 100644 index 000000000..2353263e8 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/prebuild.go @@ -0,0 +1,3 @@ +package codec + +//go:generate bash prebuild.sh diff --git a/vendor/github.com/ugorji/go/codec/prebuild.sh b/vendor/github.com/ugorji/go/codec/prebuild.sh new file mode 100755 index 000000000..909f4bb0f --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/prebuild.sh @@ -0,0 +1,199 @@ +#!/bin/bash + +# _needgen is a helper function to tell if we need to generate files for msgp, codecgen. +_needgen() { + local a="$1" + zneedgen=0 + if [[ ! -e "$a" ]] + then + zneedgen=1 + echo 1 + return 0 + fi + for i in `ls -1 *.go.tmpl gen.go values_test.go` + do + if [[ "$a" -ot "$i" ]] + then + zneedgen=1 + echo 1 + return 0 + fi + done + echo 0 +} + +# _build generates fast-path.go and gen-helper.go. +# +# It is needed because there is some dependency between the generated code +# and the other classes. Consequently, we have to totally remove the +# generated files and put stubs in place, before calling "go run" again +# to recreate them. +_build() { + if ! [[ "${zforce}" == "1" || + "1" == $( _needgen "fast-path.generated.go" ) || + "1" == $( _needgen "gen-helper.generated.go" ) || + "1" == $( _needgen "gen.generated.go" ) || + 1 == 0 ]] + then + return 0 + fi + + # echo "Running prebuild" + if [ "${zbak}" == "1" ] + then + # echo "Backing up old generated files" + _zts=`date '+%m%d%Y_%H%M%S'` + _gg=".generated.go" + [ -e "gen-helper${_gg}" ] && mv gen-helper${_gg} gen-helper${_gg}__${_zts}.bak + [ -e "fast-path${_gg}" ] && mv fast-path${_gg} fast-path${_gg}__${_zts}.bak + # [ -e "safe${_gg}" ] && mv safe${_gg} safe${_gg}__${_zts}.bak + # [ -e "unsafe${_gg}" ] && mv unsafe${_gg} unsafe${_gg}__${_zts}.bak + else + rm -f fast-path.generated.go gen.generated.go gen-helper.generated.go \ + *safe.generated.go *_generated_test.go *.generated_ffjson_expose.go + fi + + cat > gen.generated.go <> gen.generated.go < gen-dec-map.go.tmpl + + cat >> gen.generated.go <> gen.generated.go < gen-dec-array.go.tmpl + + cat >> gen.generated.go < gen-from-tmpl.codec.generated.go < gen-from-tmpl.generated.go < math.MaxInt64 { + // d.d.errorf("decIntAny: Integer out of range for signed int64: %v", ui) + // return + // } + return +} + +func (d *simpleDecDriver) DecodeInt(bitsize uint8) (i int64) { + ui, neg := d.decCheckInteger() + i, overflow := chkOvf.SignedInt(ui) + if overflow { + d.d.errorf("simple: overflow converting %v to signed integer", ui) + return + } + if neg { + i = -i + } + if chkOvf.Int(i, bitsize) { + d.d.errorf("simple: overflow integer: %v", i) + return + } + d.bdRead = false + return +} + +func (d *simpleDecDriver) DecodeUint(bitsize uint8) (ui uint64) { + ui, neg := d.decCheckInteger() + if neg { + d.d.errorf("Assigning negative signed value to unsigned type") + return + } + if chkOvf.Uint(ui, bitsize) { + d.d.errorf("simple: overflow integer: %v", ui) + return + } + d.bdRead = false + return +} + +func (d *simpleDecDriver) DecodeFloat(chkOverflow32 bool) (f float64) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == simpleVdFloat32 { + f = float64(math.Float32frombits(bigen.Uint32(d.r.readx(4)))) + } else if d.bd == simpleVdFloat64 { + f = math.Float64frombits(bigen.Uint64(d.r.readx(8))) + } else { + if d.bd >= simpleVdPosInt && d.bd <= simpleVdNegInt+3 { + f = float64(d.DecodeInt(64)) + } else { + d.d.errorf("Float only valid from float32/64: Invalid descriptor: %v", d.bd) + return + } + } + if chkOverflow32 && chkOvf.Float32(f) { + d.d.errorf("msgpack: float32 overflow: %v", f) + return + } + d.bdRead = false + return +} + +// bool can be decoded from bool only (single byte). +func (d *simpleDecDriver) DecodeBool() (b bool) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == simpleVdTrue { + b = true + } else if d.bd == simpleVdFalse { + } else { + d.d.errorf("Invalid single-byte value for bool: %s: %x", msgBadDesc, d.bd) + return + } + d.bdRead = false + return +} + +func (d *simpleDecDriver) ReadMapStart() (length int) { + d.bdRead = false + return d.decLen() +} + +func (d *simpleDecDriver) ReadArrayStart() (length int) { + d.bdRead = false + return d.decLen() +} + +func (d *simpleDecDriver) decLen() int { + switch d.bd % 8 { + case 0: + return 0 + case 1: + return int(d.r.readn1()) + case 2: + return int(bigen.Uint16(d.r.readx(2))) + case 3: + ui := uint64(bigen.Uint32(d.r.readx(4))) + if chkOvf.Uint(ui, intBitsize) { + d.d.errorf("simple: overflow integer: %v", ui) + return 0 + } + return int(ui) + case 4: + ui := bigen.Uint64(d.r.readx(8)) + if chkOvf.Uint(ui, intBitsize) { + d.d.errorf("simple: overflow integer: %v", ui) + return 0 + } + return int(ui) + } + d.d.errorf("decLen: Cannot read length: bd%8 must be in range 0..4. Got: %d", d.bd%8) + return -1 +} + +func (d *simpleDecDriver) DecodeString() (s string) { + return string(d.DecodeBytes(d.b[:], true, true)) +} + +func (d *simpleDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) { + if !d.bdRead { + d.readNextBd() + } + if d.bd == simpleVdNil { + d.bdRead = false + return + } + clen := d.decLen() + d.bdRead = false + if zerocopy { + if d.br { + return d.r.readx(clen) + } else if len(bs) == 0 { + bs = d.b[:] + } + } + return decByteSlice(d.r, clen, bs) +} + +func (d *simpleDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) { + if xtag > 0xff { + d.d.errorf("decodeExt: tag must be <= 0xff; got: %v", xtag) + return + } + realxtag1, xbs := d.decodeExtV(ext != nil, uint8(xtag)) + realxtag = uint64(realxtag1) + if ext == nil { + re := rv.(*RawExt) + re.Tag = realxtag + re.Data = detachZeroCopyBytes(d.br, re.Data, xbs) + } else { + ext.ReadExt(rv, xbs) + } + return +} + +func (d *simpleDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs []byte) { + if !d.bdRead { + d.readNextBd() + } + switch d.bd { + case simpleVdExt, simpleVdExt + 1, simpleVdExt + 2, simpleVdExt + 3, simpleVdExt + 4: + l := d.decLen() + xtag = d.r.readn1() + if verifyTag && xtag != tag { + d.d.errorf("Wrong extension tag. Got %b. Expecting: %v", xtag, tag) + return + } + xbs = d.r.readx(l) + case simpleVdByteArray, simpleVdByteArray + 1, simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4: + xbs = d.DecodeBytes(nil, false, true) + default: + d.d.errorf("Invalid d.bd for extensions (Expecting extensions or byte array). Got: 0x%x", d.bd) + return + } + d.bdRead = false + return +} + +func (d *simpleDecDriver) DecodeNaked() { + if !d.bdRead { + d.readNextBd() + } + + n := &d.d.n + var decodeFurther bool + + switch d.bd { + case simpleVdNil: + n.v = valueTypeNil + case simpleVdFalse: + n.v = valueTypeBool + n.b = false + case simpleVdTrue: + n.v = valueTypeBool + n.b = true + case simpleVdPosInt, simpleVdPosInt + 1, simpleVdPosInt + 2, simpleVdPosInt + 3: + if d.h.SignedInteger { + n.v = valueTypeInt + n.i = d.DecodeInt(64) + } else { + n.v = valueTypeUint + n.u = d.DecodeUint(64) + } + case simpleVdNegInt, simpleVdNegInt + 1, simpleVdNegInt + 2, simpleVdNegInt + 3: + n.v = valueTypeInt + n.i = d.DecodeInt(64) + case simpleVdFloat32: + n.v = valueTypeFloat + n.f = d.DecodeFloat(true) + case simpleVdFloat64: + n.v = valueTypeFloat + n.f = d.DecodeFloat(false) + case simpleVdString, simpleVdString + 1, simpleVdString + 2, simpleVdString + 3, simpleVdString + 4: + n.v = valueTypeString + n.s = d.DecodeString() + case simpleVdByteArray, simpleVdByteArray + 1, simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4: + n.v = valueTypeBytes + n.l = d.DecodeBytes(nil, false, false) + case simpleVdExt, simpleVdExt + 1, simpleVdExt + 2, simpleVdExt + 3, simpleVdExt + 4: + n.v = valueTypeExt + l := d.decLen() + n.u = uint64(d.r.readn1()) + n.l = d.r.readx(l) + case simpleVdArray, simpleVdArray + 1, simpleVdArray + 2, simpleVdArray + 3, simpleVdArray + 4: + n.v = valueTypeArray + decodeFurther = true + case simpleVdMap, simpleVdMap + 1, simpleVdMap + 2, simpleVdMap + 3, simpleVdMap + 4: + n.v = valueTypeMap + decodeFurther = true + default: + d.d.errorf("decodeNaked: Unrecognized d.bd: 0x%x", d.bd) + } + + if !decodeFurther { + d.bdRead = false + } + return +} + +//------------------------------------ + +// SimpleHandle is a Handle for a very simple encoding format. +// +// simple is a simplistic codec similar to binc, but not as compact. +// - Encoding of a value is always preceeded by the descriptor byte (bd) +// - True, false, nil are encoded fully in 1 byte (the descriptor) +// - Integers (intXXX, uintXXX) are encoded in 1, 2, 4 or 8 bytes (plus a descriptor byte). +// There are positive (uintXXX and intXXX >= 0) and negative (intXXX < 0) integers. +// - Floats are encoded in 4 or 8 bytes (plus a descriptor byte) +// - Lenght of containers (strings, bytes, array, map, extensions) +// are encoded in 0, 1, 2, 4 or 8 bytes. +// Zero-length containers have no length encoded. +// For others, the number of bytes is given by pow(2, bd%3) +// - maps are encoded as [bd] [length] [[key][value]]... +// - arrays are encoded as [bd] [length] [value]... +// - extensions are encoded as [bd] [length] [tag] [byte]... +// - strings/bytearrays are encoded as [bd] [length] [byte]... +// +// The full spec will be published soon. +type SimpleHandle struct { + BasicHandle + binaryEncodingType +} + +func (h *SimpleHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) { + return h.SetExt(rt, tag, &setExtWrapper{b: ext}) +} + +func (h *SimpleHandle) newEncDriver(e *Encoder) encDriver { + return &simpleEncDriver{e: e, w: e.w, h: h} +} + +func (h *SimpleHandle) newDecDriver(d *Decoder) decDriver { + return &simpleDecDriver{d: d, r: d.r, h: h, br: d.bytes} +} + +func (e *simpleEncDriver) reset() { + e.w = e.e.w +} + +func (d *simpleDecDriver) reset() { + d.r = d.d.r + d.bd, d.bdRead = 0, false +} + +var _ decDriver = (*simpleDecDriver)(nil) +var _ encDriver = (*simpleEncDriver)(nil) diff --git a/vendor/github.com/ugorji/go/codec/test-cbor-goldens.json b/vendor/github.com/ugorji/go/codec/test-cbor-goldens.json new file mode 100644 index 000000000..902858671 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/test-cbor-goldens.json @@ -0,0 +1,639 @@ +[ + { + "cbor": "AA==", + "hex": "00", + "roundtrip": true, + "decoded": 0 + }, + { + "cbor": "AQ==", + "hex": "01", + "roundtrip": true, + "decoded": 1 + }, + { + "cbor": "Cg==", + "hex": "0a", + "roundtrip": true, + "decoded": 10 + }, + { + "cbor": "Fw==", + "hex": "17", + "roundtrip": true, + "decoded": 23 + }, + { + "cbor": "GBg=", + "hex": "1818", + "roundtrip": true, + "decoded": 24 + }, + { + "cbor": "GBk=", + "hex": "1819", + "roundtrip": true, + "decoded": 25 + }, + { + "cbor": "GGQ=", + "hex": "1864", + "roundtrip": true, + "decoded": 100 + }, + { + "cbor": "GQPo", + "hex": "1903e8", + "roundtrip": true, + "decoded": 1000 + }, + { + "cbor": "GgAPQkA=", + "hex": "1a000f4240", + "roundtrip": true, + "decoded": 1000000 + }, + { + "cbor": "GwAAAOjUpRAA", + "hex": "1b000000e8d4a51000", + "roundtrip": true, + "decoded": 1000000000000 + }, + { + "cbor": "G///////////", + "hex": "1bffffffffffffffff", + "roundtrip": true, + "decoded": 18446744073709551615 + }, + { + "cbor": "wkkBAAAAAAAAAAA=", + "hex": "c249010000000000000000", + "roundtrip": true, + "decoded": 18446744073709551616 + }, + { + "cbor": "O///////////", + "hex": "3bffffffffffffffff", + "roundtrip": true, + "decoded": -18446744073709551616, + "skip": true + }, + { + "cbor": "w0kBAAAAAAAAAAA=", + "hex": "c349010000000000000000", + "roundtrip": true, + "decoded": -18446744073709551617 + }, + { + "cbor": "IA==", + "hex": "20", + "roundtrip": true, + "decoded": -1 + }, + { + "cbor": "KQ==", + "hex": "29", + "roundtrip": true, + "decoded": -10 + }, + { + "cbor": "OGM=", + "hex": "3863", + "roundtrip": true, + "decoded": -100 + }, + { + "cbor": "OQPn", + "hex": "3903e7", + "roundtrip": true, + "decoded": -1000 + }, + { + "cbor": "+QAA", + "hex": "f90000", + "roundtrip": true, + "decoded": 0.0 + }, + { + "cbor": "+YAA", + "hex": "f98000", + "roundtrip": true, + "decoded": -0.0 + }, + { + "cbor": "+TwA", + "hex": "f93c00", + "roundtrip": true, + "decoded": 1.0 + }, + { + "cbor": "+z/xmZmZmZma", + "hex": "fb3ff199999999999a", + "roundtrip": true, + "decoded": 1.1 + }, + { + "cbor": "+T4A", + "hex": "f93e00", + "roundtrip": true, + "decoded": 1.5 + }, + { + "cbor": "+Xv/", + "hex": "f97bff", + "roundtrip": true, + "decoded": 65504.0 + }, + { + "cbor": "+kfDUAA=", + "hex": "fa47c35000", + "roundtrip": true, + "decoded": 100000.0 + }, + { + "cbor": "+n9///8=", + "hex": "fa7f7fffff", + "roundtrip": true, + "decoded": 3.4028234663852886e+38 + }, + { + "cbor": "+3435DyIAHWc", + "hex": "fb7e37e43c8800759c", + "roundtrip": true, + "decoded": 1.0e+300 + }, + { + "cbor": "+QAB", + "hex": "f90001", + "roundtrip": true, + "decoded": 5.960464477539063e-08 + }, + { + "cbor": "+QQA", + "hex": "f90400", + "roundtrip": true, + "decoded": 6.103515625e-05 + }, + { + "cbor": "+cQA", + "hex": "f9c400", + "roundtrip": true, + "decoded": -4.0 + }, + { + "cbor": "+8AQZmZmZmZm", + "hex": "fbc010666666666666", + "roundtrip": true, + "decoded": -4.1 + }, + { + "cbor": "+XwA", + "hex": "f97c00", + "roundtrip": true, + "diagnostic": "Infinity" + }, + { + "cbor": "+X4A", + "hex": "f97e00", + "roundtrip": true, + "diagnostic": "NaN" + }, + { + "cbor": "+fwA", + "hex": "f9fc00", + "roundtrip": true, + "diagnostic": "-Infinity" + }, + { + "cbor": "+n+AAAA=", + "hex": "fa7f800000", + "roundtrip": false, + "diagnostic": "Infinity" + }, + { + "cbor": "+n/AAAA=", + "hex": "fa7fc00000", + "roundtrip": false, + "diagnostic": "NaN" + }, + { + "cbor": "+v+AAAA=", + "hex": "faff800000", + "roundtrip": false, + "diagnostic": "-Infinity" + }, + { + "cbor": "+3/wAAAAAAAA", + "hex": "fb7ff0000000000000", + "roundtrip": false, + "diagnostic": "Infinity" + }, + { + "cbor": "+3/4AAAAAAAA", + "hex": "fb7ff8000000000000", + "roundtrip": false, + "diagnostic": "NaN" + }, + { + "cbor": "+//wAAAAAAAA", + "hex": "fbfff0000000000000", + "roundtrip": false, + "diagnostic": "-Infinity" + }, + { + "cbor": "9A==", + "hex": "f4", + "roundtrip": true, + "decoded": false + }, + { + "cbor": "9Q==", + "hex": "f5", + "roundtrip": true, + "decoded": true + }, + { + "cbor": "9g==", + "hex": "f6", + "roundtrip": true, + "decoded": null + }, + { + "cbor": "9w==", + "hex": "f7", + "roundtrip": true, + "diagnostic": "undefined" + }, + { + "cbor": "8A==", + "hex": "f0", + "roundtrip": true, + "diagnostic": "simple(16)" + }, + { + "cbor": "+Bg=", + "hex": "f818", + "roundtrip": true, + "diagnostic": "simple(24)" + }, + { + "cbor": "+P8=", + "hex": "f8ff", + "roundtrip": true, + "diagnostic": "simple(255)" + }, + { + "cbor": "wHQyMDEzLTAzLTIxVDIwOjA0OjAwWg==", + "hex": "c074323031332d30332d32315432303a30343a30305a", + "roundtrip": true, + "diagnostic": "0(\"2013-03-21T20:04:00Z\")" + }, + { + "cbor": "wRpRS2ew", + "hex": "c11a514b67b0", + "roundtrip": true, + "diagnostic": "1(1363896240)" + }, + { + "cbor": "wftB1FLZ7CAAAA==", + "hex": "c1fb41d452d9ec200000", + "roundtrip": true, + "diagnostic": "1(1363896240.5)" + }, + { + "cbor": "10QBAgME", + "hex": "d74401020304", + "roundtrip": true, + "diagnostic": "23(h'01020304')" + }, + { + "cbor": "2BhFZElFVEY=", + "hex": "d818456449455446", + "roundtrip": true, + "diagnostic": "24(h'6449455446')" + }, + { + "cbor": "2CB2aHR0cDovL3d3dy5leGFtcGxlLmNvbQ==", + "hex": "d82076687474703a2f2f7777772e6578616d706c652e636f6d", + "roundtrip": true, + "diagnostic": "32(\"http://www.example.com\")" + }, + { + "cbor": "QA==", + "hex": "40", + "roundtrip": true, + "diagnostic": "h''" + }, + { + "cbor": "RAECAwQ=", + "hex": "4401020304", + "roundtrip": true, + "diagnostic": "h'01020304'" + }, + { + "cbor": "YA==", + "hex": "60", + "roundtrip": true, + "decoded": "" + }, + { + "cbor": "YWE=", + "hex": "6161", + "roundtrip": true, + "decoded": "a" + }, + { + "cbor": "ZElFVEY=", + "hex": "6449455446", + "roundtrip": true, + "decoded": "IETF" + }, + { + "cbor": "YiJc", + "hex": "62225c", + "roundtrip": true, + "decoded": "\"\\" + }, + { + "cbor": "YsO8", + "hex": "62c3bc", + "roundtrip": true, + "decoded": "ü" + }, + { + "cbor": "Y+awtA==", + "hex": "63e6b0b4", + "roundtrip": true, + "decoded": "水" + }, + { + "cbor": "ZPCQhZE=", + "hex": "64f0908591", + "roundtrip": true, + "decoded": "𐅑" + }, + { + "cbor": "gA==", + "hex": "80", + "roundtrip": true, + "decoded": [ + + ] + }, + { + "cbor": "gwECAw==", + "hex": "83010203", + "roundtrip": true, + "decoded": [ + 1, + 2, + 3 + ] + }, + { + "cbor": "gwGCAgOCBAU=", + "hex": "8301820203820405", + "roundtrip": true, + "decoded": [ + 1, + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "cbor": "mBkBAgMEBQYHCAkKCwwNDg8QERITFBUWFxgYGBk=", + "hex": "98190102030405060708090a0b0c0d0e0f101112131415161718181819", + "roundtrip": true, + "decoded": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25 + ] + }, + { + "cbor": "oA==", + "hex": "a0", + "roundtrip": true, + "decoded": { + } + }, + { + "cbor": "ogECAwQ=", + "hex": "a201020304", + "roundtrip": true, + "skip": true, + "diagnostic": "{1: 2, 3: 4}" + }, + { + "cbor": "omFhAWFiggID", + "hex": "a26161016162820203", + "roundtrip": true, + "decoded": { + "a": 1, + "b": [ + 2, + 3 + ] + } + }, + { + "cbor": "gmFhoWFiYWM=", + "hex": "826161a161626163", + "roundtrip": true, + "decoded": [ + "a", + { + "b": "c" + } + ] + }, + { + "cbor": "pWFhYUFhYmFCYWNhQ2FkYURhZWFF", + "hex": "a56161614161626142616361436164614461656145", + "roundtrip": true, + "decoded": { + "a": "A", + "b": "B", + "c": "C", + "d": "D", + "e": "E" + } + }, + { + "cbor": "X0IBAkMDBAX/", + "hex": "5f42010243030405ff", + "roundtrip": false, + "skip": true, + "diagnostic": "(_ h'0102', h'030405')" + }, + { + "cbor": "f2VzdHJlYWRtaW5n/w==", + "hex": "7f657374726561646d696e67ff", + "roundtrip": false, + "decoded": "streaming" + }, + { + "cbor": "n/8=", + "hex": "9fff", + "roundtrip": false, + "decoded": [ + + ] + }, + { + "cbor": "nwGCAgOfBAX//w==", + "hex": "9f018202039f0405ffff", + "roundtrip": false, + "decoded": [ + 1, + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "cbor": "nwGCAgOCBAX/", + "hex": "9f01820203820405ff", + "roundtrip": false, + "decoded": [ + 1, + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "cbor": "gwGCAgOfBAX/", + "hex": "83018202039f0405ff", + "roundtrip": false, + "decoded": [ + 1, + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "cbor": "gwGfAgP/ggQF", + "hex": "83019f0203ff820405", + "roundtrip": false, + "decoded": [ + 1, + [ + 2, + 3 + ], + [ + 4, + 5 + ] + ] + }, + { + "cbor": "nwECAwQFBgcICQoLDA0ODxAREhMUFRYXGBgYGf8=", + "hex": "9f0102030405060708090a0b0c0d0e0f101112131415161718181819ff", + "roundtrip": false, + "decoded": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25 + ] + }, + { + "cbor": "v2FhAWFinwID//8=", + "hex": "bf61610161629f0203ffff", + "roundtrip": false, + "decoded": { + "a": 1, + "b": [ + 2, + 3 + ] + } + }, + { + "cbor": "gmFhv2FiYWP/", + "hex": "826161bf61626163ff", + "roundtrip": false, + "decoded": [ + "a", + { + "b": "c" + } + ] + }, + { + "cbor": "v2NGdW71Y0FtdCH/", + "hex": "bf6346756ef563416d7421ff", + "roundtrip": false, + "decoded": { + "Fun": true, + "Amt": -2 + } + } +] diff --git a/vendor/github.com/ugorji/go/codec/test.py b/vendor/github.com/ugorji/go/codec/test.py new file mode 100755 index 000000000..c0ad20b34 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/test.py @@ -0,0 +1,126 @@ +#!/usr/bin/env python + +# This will create golden files in a directory passed to it. +# A Test calls this internally to create the golden files +# So it can process them (so we don't have to checkin the files). + +# Ensure msgpack-python and cbor are installed first, using: +# sudo apt-get install python-dev +# sudo apt-get install python-pip +# pip install --user msgpack-python msgpack-rpc-python cbor + +# Ensure all "string" keys are utf strings (else encoded as bytes) + +import cbor, msgpack, msgpackrpc, sys, os, threading + +def get_test_data_list(): + # get list with all primitive types, and a combo type + l0 = [ + -8, + -1616, + -32323232, + -6464646464646464, + 192, + 1616, + 32323232, + 6464646464646464, + 192, + -3232.0, + -6464646464.0, + 3232.0, + 6464.0, + 6464646464.0, + False, + True, + u"null", + None, + u"someday", + 1328176922000002000, + u"", + -2206187877999998000, + u"bytestring", + 270, + u"none", + -2013855847999995777, + #-6795364578871345152, + ] + l1 = [ + { "true": True, + "false": False }, + { "true": u"True", + "false": False, + "uint16(1616)": 1616 }, + { "list": [1616, 32323232, True, -3232.0, {"TRUE":True, "FALSE":False}, [True, False] ], + "int32":32323232, "bool": True, + "LONG STRING": u"123456789012345678901234567890123456789012345678901234567890", + "SHORT STRING": u"1234567890" }, + { True: "true", 138: False, "false": 200 } + ] + + l = [] + l.extend(l0) + l.append(l0) + l.append(1) + l.extend(l1) + return l + +def build_test_data(destdir): + l = get_test_data_list() + for i in range(len(l)): + # packer = msgpack.Packer() + serialized = msgpack.dumps(l[i]) + f = open(os.path.join(destdir, str(i) + '.msgpack.golden'), 'wb') + f.write(serialized) + f.close() + serialized = cbor.dumps(l[i]) + f = open(os.path.join(destdir, str(i) + '.cbor.golden'), 'wb') + f.write(serialized) + f.close() + +def doRpcServer(port, stopTimeSec): + class EchoHandler(object): + def Echo123(self, msg1, msg2, msg3): + return ("1:%s 2:%s 3:%s" % (msg1, msg2, msg3)) + def EchoStruct(self, msg): + return ("%s" % msg) + + addr = msgpackrpc.Address('localhost', port) + server = msgpackrpc.Server(EchoHandler()) + server.listen(addr) + # run thread to stop it after stopTimeSec seconds if > 0 + if stopTimeSec > 0: + def myStopRpcServer(): + server.stop() + t = threading.Timer(stopTimeSec, myStopRpcServer) + t.start() + server.start() + +def doRpcClientToPythonSvc(port): + address = msgpackrpc.Address('localhost', port) + client = msgpackrpc.Client(address, unpack_encoding='utf-8') + print client.call("Echo123", "A1", "B2", "C3") + print client.call("EchoStruct", {"A" :"Aa", "B":"Bb", "C":"Cc"}) + +def doRpcClientToGoSvc(port): + # print ">>>> port: ", port, " <<<<<" + address = msgpackrpc.Address('localhost', port) + client = msgpackrpc.Client(address, unpack_encoding='utf-8') + print client.call("TestRpcInt.Echo123", ["A1", "B2", "C3"]) + print client.call("TestRpcInt.EchoStruct", {"A" :"Aa", "B":"Bb", "C":"Cc"}) + +def doMain(args): + if len(args) == 2 and args[0] == "testdata": + build_test_data(args[1]) + elif len(args) == 3 and args[0] == "rpc-server": + doRpcServer(int(args[1]), int(args[2])) + elif len(args) == 2 and args[0] == "rpc-client-python-service": + doRpcClientToPythonSvc(int(args[1])) + elif len(args) == 2 and args[0] == "rpc-client-go-service": + doRpcClientToGoSvc(int(args[1])) + else: + print("Usage: test.py " + + "[testdata|rpc-server|rpc-client-python-service|rpc-client-go-service] ...") + +if __name__ == "__main__": + doMain(sys.argv[1:]) + diff --git a/vendor/github.com/ugorji/go/codec/tests.sh b/vendor/github.com/ugorji/go/codec/tests.sh new file mode 100755 index 000000000..00857b620 --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/tests.sh @@ -0,0 +1,80 @@ +#!/bin/bash + +# Run all the different permutations of all the tests. +# This helps ensure that nothing gets broken. + +_run() { + # 1. VARIATIONS: regular (t), canonical (c), IO R/W (i), + # binc-nosymbols (n), struct2array (s), intern string (e), + # json-indent (d), circular (l) + # 2. MODE: reflection (r), external (x), codecgen (g), unsafe (u), notfastpath (f) + # 3. OPTIONS: verbose (v), reset (z), must (m), + # + # Use combinations of mode to get exactly what you want, + # and then pass the variations you need. + + ztags="" + zargs="" + local OPTIND + OPTIND=1 + while getopts "_xurtcinsvgzmefdl" flag + do + case "x$flag" in + 'xr') ;; + 'xf') ztags="$ztags notfastpath" ;; + 'xg') ztags="$ztags codecgen" ;; + 'xx') ztags="$ztags x" ;; + 'xu') ztags="$ztags unsafe" ;; + 'xv') zargs="$zargs -tv" ;; + 'xz') zargs="$zargs -tr" ;; + 'xm') zargs="$zargs -tm" ;; + 'xl') zargs="$zargs -tl" ;; + *) ;; + esac + done + # shift $((OPTIND-1)) + printf '............. TAGS: %s .............\n' "$ztags" + # echo ">>>>>>> TAGS: $ztags" + + OPTIND=1 + while getopts "_xurtcinsvgzmefdl" flag + do + case "x$flag" in + 'xt') printf ">>>>>>> REGULAR : "; go test "-tags=$ztags" $zargs ; sleep 2 ;; + 'xc') printf ">>>>>>> CANONICAL : "; go test "-tags=$ztags" $zargs -tc; sleep 2 ;; + 'xi') printf ">>>>>>> I/O : "; go test "-tags=$ztags" $zargs -ti; sleep 2 ;; + 'xn') printf ">>>>>>> NO_SYMBOLS : "; go test "-tags=$ztags" -run=Binc $zargs -tn; sleep 2 ;; + 'xs') printf ">>>>>>> TO_ARRAY : "; go test "-tags=$ztags" $zargs -ts; sleep 2 ;; + 'xe') printf ">>>>>>> INTERN : "; go test "-tags=$ztags" $zargs -te; sleep 2 ;; + 'xd') printf ">>>>>>> INDENT : "; + go test "-tags=$ztags" -run=JsonCodecsTable -td=-1 $zargs; + go test "-tags=$ztags" -run=JsonCodecsTable -td=8 $zargs; + sleep 2 ;; + *) ;; + esac + done + shift $((OPTIND-1)) + + OPTIND=1 +} + +# echo ">>>>>>> RUNNING VARIATIONS OF TESTS" +if [[ "x$@" = "x" ]]; then + # All: r, x, g, gu + _run "-_tcinsed_ml" # regular + _run "-_tcinsed_ml_z" # regular with reset + _run "-_tcinsed_ml_f" # regular with no fastpath (notfastpath) + _run "-x_tcinsed_ml" # external + _run "-gx_tcinsed_ml" # codecgen: requires external + _run "-gxu_tcinsed_ml" # codecgen + unsafe +elif [[ "x$@" = "x-Z" ]]; then + # Regular + _run "-_tcinsed_ml" # regular + _run "-_tcinsed_ml_z" # regular with reset +elif [[ "x$@" = "x-F" ]]; then + # regular with notfastpath + _run "-_tcinsed_ml_f" # regular + _run "-_tcinsed_ml_zf" # regular with reset +else + _run "$@" +fi diff --git a/vendor/github.com/ugorji/go/codec/time.go b/vendor/github.com/ugorji/go/codec/time.go new file mode 100644 index 000000000..718b731ec --- /dev/null +++ b/vendor/github.com/ugorji/go/codec/time.go @@ -0,0 +1,233 @@ +// Copyright (c) 2012-2015 Ugorji Nwoke. All rights reserved. +// Use of this source code is governed by a MIT license found in the LICENSE file. + +package codec + +import ( + "fmt" + "reflect" + "time" +) + +var ( + timeDigits = [...]byte{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9'} + timeExtEncFn = func(rv reflect.Value) (bs []byte, err error) { + defer panicToErr(&err) + bs = timeExt{}.WriteExt(rv.Interface()) + return + } + timeExtDecFn = func(rv reflect.Value, bs []byte) (err error) { + defer panicToErr(&err) + timeExt{}.ReadExt(rv.Interface(), bs) + return + } +) + +type timeExt struct{} + +func (x timeExt) WriteExt(v interface{}) (bs []byte) { + switch v2 := v.(type) { + case time.Time: + bs = encodeTime(v2) + case *time.Time: + bs = encodeTime(*v2) + default: + panic(fmt.Errorf("unsupported format for time conversion: expecting time.Time; got %T", v2)) + } + return +} +func (x timeExt) ReadExt(v interface{}, bs []byte) { + tt, err := decodeTime(bs) + if err != nil { + panic(err) + } + *(v.(*time.Time)) = tt +} + +func (x timeExt) ConvertExt(v interface{}) interface{} { + return x.WriteExt(v) +} +func (x timeExt) UpdateExt(v interface{}, src interface{}) { + x.ReadExt(v, src.([]byte)) +} + +// EncodeTime encodes a time.Time as a []byte, including +// information on the instant in time and UTC offset. +// +// Format Description +// +// A timestamp is composed of 3 components: +// +// - secs: signed integer representing seconds since unix epoch +// - nsces: unsigned integer representing fractional seconds as a +// nanosecond offset within secs, in the range 0 <= nsecs < 1e9 +// - tz: signed integer representing timezone offset in minutes east of UTC, +// and a dst (daylight savings time) flag +// +// When encoding a timestamp, the first byte is the descriptor, which +// defines which components are encoded and how many bytes are used to +// encode secs and nsecs components. *If secs/nsecs is 0 or tz is UTC, it +// is not encoded in the byte array explicitly*. +// +// Descriptor 8 bits are of the form `A B C DDD EE`: +// A: Is secs component encoded? 1 = true +// B: Is nsecs component encoded? 1 = true +// C: Is tz component encoded? 1 = true +// DDD: Number of extra bytes for secs (range 0-7). +// If A = 1, secs encoded in DDD+1 bytes. +// If A = 0, secs is not encoded, and is assumed to be 0. +// If A = 1, then we need at least 1 byte to encode secs. +// DDD says the number of extra bytes beyond that 1. +// E.g. if DDD=0, then secs is represented in 1 byte. +// if DDD=2, then secs is represented in 3 bytes. +// EE: Number of extra bytes for nsecs (range 0-3). +// If B = 1, nsecs encoded in EE+1 bytes (similar to secs/DDD above) +// +// Following the descriptor bytes, subsequent bytes are: +// +// secs component encoded in `DDD + 1` bytes (if A == 1) +// nsecs component encoded in `EE + 1` bytes (if B == 1) +// tz component encoded in 2 bytes (if C == 1) +// +// secs and nsecs components are integers encoded in a BigEndian +// 2-complement encoding format. +// +// tz component is encoded as 2 bytes (16 bits). Most significant bit 15 to +// Least significant bit 0 are described below: +// +// Timezone offset has a range of -12:00 to +14:00 (ie -720 to +840 minutes). +// Bit 15 = have\_dst: set to 1 if we set the dst flag. +// Bit 14 = dst\_on: set to 1 if dst is in effect at the time, or 0 if not. +// Bits 13..0 = timezone offset in minutes. It is a signed integer in Big Endian format. +// +func encodeTime(t time.Time) []byte { + //t := rv.Interface().(time.Time) + tsecs, tnsecs := t.Unix(), t.Nanosecond() + var ( + bd byte + btmp [8]byte + bs [16]byte + i int = 1 + ) + l := t.Location() + if l == time.UTC { + l = nil + } + if tsecs != 0 { + bd = bd | 0x80 + bigen.PutUint64(btmp[:], uint64(tsecs)) + f := pruneSignExt(btmp[:], tsecs >= 0) + bd = bd | (byte(7-f) << 2) + copy(bs[i:], btmp[f:]) + i = i + (8 - f) + } + if tnsecs != 0 { + bd = bd | 0x40 + bigen.PutUint32(btmp[:4], uint32(tnsecs)) + f := pruneSignExt(btmp[:4], true) + bd = bd | byte(3-f) + copy(bs[i:], btmp[f:4]) + i = i + (4 - f) + } + if l != nil { + bd = bd | 0x20 + // Note that Go Libs do not give access to dst flag. + _, zoneOffset := t.Zone() + //zoneName, zoneOffset := t.Zone() + zoneOffset /= 60 + z := uint16(zoneOffset) + bigen.PutUint16(btmp[:2], z) + // clear dst flags + bs[i] = btmp[0] & 0x3f + bs[i+1] = btmp[1] + i = i + 2 + } + bs[0] = bd + return bs[0:i] +} + +// DecodeTime decodes a []byte into a time.Time. +func decodeTime(bs []byte) (tt time.Time, err error) { + bd := bs[0] + var ( + tsec int64 + tnsec uint32 + tz uint16 + i byte = 1 + i2 byte + n byte + ) + if bd&(1<<7) != 0 { + var btmp [8]byte + n = ((bd >> 2) & 0x7) + 1 + i2 = i + n + copy(btmp[8-n:], bs[i:i2]) + //if first bit of bs[i] is set, then fill btmp[0..8-n] with 0xff (ie sign extend it) + if bs[i]&(1<<7) != 0 { + copy(btmp[0:8-n], bsAll0xff) + //for j,k := byte(0), 8-n; j < k; j++ { btmp[j] = 0xff } + } + i = i2 + tsec = int64(bigen.Uint64(btmp[:])) + } + if bd&(1<<6) != 0 { + var btmp [4]byte + n = (bd & 0x3) + 1 + i2 = i + n + copy(btmp[4-n:], bs[i:i2]) + i = i2 + tnsec = bigen.Uint32(btmp[:]) + } + if bd&(1<<5) == 0 { + tt = time.Unix(tsec, int64(tnsec)).UTC() + return + } + // In stdlib time.Parse, when a date is parsed without a zone name, it uses "" as zone name. + // However, we need name here, so it can be shown when time is printed. + // Zone name is in form: UTC-08:00. + // Note that Go Libs do not give access to dst flag, so we ignore dst bits + + i2 = i + 2 + tz = bigen.Uint16(bs[i:i2]) + i = i2 + // sign extend sign bit into top 2 MSB (which were dst bits): + if tz&(1<<13) == 0 { // positive + tz = tz & 0x3fff //clear 2 MSBs: dst bits + } else { // negative + tz = tz | 0xc000 //set 2 MSBs: dst bits + //tzname[3] = '-' (TODO: verify. this works here) + } + tzint := int16(tz) + if tzint == 0 { + tt = time.Unix(tsec, int64(tnsec)).UTC() + } else { + // For Go Time, do not use a descriptive timezone. + // It's unnecessary, and makes it harder to do a reflect.DeepEqual. + // The Offset already tells what the offset should be, if not on UTC and unknown zone name. + // var zoneName = timeLocUTCName(tzint) + tt = time.Unix(tsec, int64(tnsec)).In(time.FixedZone("", int(tzint)*60)) + } + return +} + +func timeLocUTCName(tzint int16) string { + if tzint == 0 { + return "UTC" + } + var tzname = []byte("UTC+00:00") + //tzname := fmt.Sprintf("UTC%s%02d:%02d", tzsign, tz/60, tz%60) //perf issue using Sprintf. inline below. + //tzhr, tzmin := tz/60, tz%60 //faster if u convert to int first + var tzhr, tzmin int16 + if tzint < 0 { + tzname[3] = '-' // (TODO: verify. this works here) + tzhr, tzmin = -tzint/60, (-tzint)%60 + } else { + tzhr, tzmin = tzint/60, tzint%60 + } + tzname[4] = timeDigits[tzhr/10] + tzname[5] = timeDigits[tzhr%10] + tzname[7] = timeDigits[tzmin/10] + tzname[8] = timeDigits[tzmin%10] + return string(tzname) + //return time.FixedZone(string(tzname), int(tzint)*60) +} diff --git a/vendor/golang.org/x/sys/LICENSE b/vendor/golang.org/x/sys/LICENSE new file mode 100644 index 000000000..6a66aea5e --- /dev/null +++ b/vendor/golang.org/x/sys/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) 2009 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/golang.org/x/sys/PATENTS b/vendor/golang.org/x/sys/PATENTS new file mode 100644 index 000000000..733099041 --- /dev/null +++ b/vendor/golang.org/x/sys/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/golang.org/x/sys/unix/asm.s b/vendor/golang.org/x/sys/unix/asm.s new file mode 100644 index 000000000..8ed2fdb94 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm.s @@ -0,0 +1,10 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +TEXT ·use(SB),NOSPLIT,$0 + RET diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_386.s b/vendor/golang.org/x/sys/unix/asm_darwin_386.s new file mode 100644 index 000000000..8a7278319 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_darwin_386.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for 386, Darwin +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-52 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s b/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s new file mode 100644 index 000000000..6321421f2 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for AMD64, Darwin +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-104 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_arm.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm.s new file mode 100644 index 000000000..333242d50 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_darwin_arm.s @@ -0,0 +1,30 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo +// +build arm,darwin + +#include "textflag.h" + +// +// System call support for ARM, Darwin +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + B syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + B syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-52 + B syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + B syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s new file mode 100644 index 000000000..97e017437 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s @@ -0,0 +1,30 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo +// +build arm64,darwin + +#include "textflag.h" + +// +// System call support for AMD64, Darwin +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + B syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + B syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-104 + B syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + B syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s b/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s new file mode 100644 index 000000000..d5ed6726c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for AMD64, DragonFly +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-64 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-88 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-112 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-64 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_386.s b/vendor/golang.org/x/sys/unix/asm_freebsd_386.s new file mode 100644 index 000000000..c9a0a2601 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_freebsd_386.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for 386, FreeBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-52 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s new file mode 100644 index 000000000..35172477c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for AMD64, FreeBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-104 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s b/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s new file mode 100644 index 000000000..9227c875b --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s @@ -0,0 +1,29 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for ARM, FreeBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + B syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + B syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-52 + B syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + B syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_386.s b/vendor/golang.org/x/sys/unix/asm_linux_386.s new file mode 100644 index 000000000..4db290932 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_linux_386.s @@ -0,0 +1,35 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System calls for 386, Linux +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + JMP syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + JMP syscall·RawSyscall6(SB) + +TEXT ·socketcall(SB),NOSPLIT,$0-36 + JMP syscall·socketcall(SB) + +TEXT ·rawsocketcall(SB),NOSPLIT,$0-36 + JMP syscall·rawsocketcall(SB) + +TEXT ·seek(SB),NOSPLIT,$0-28 + JMP syscall·seek(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_amd64.s b/vendor/golang.org/x/sys/unix/asm_linux_amd64.s new file mode 100644 index 000000000..44e25c62f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_linux_amd64.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System calls for AMD64, Linux +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + JMP syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + JMP syscall·RawSyscall6(SB) + +TEXT ·gettimeofday(SB),NOSPLIT,$0-16 + JMP syscall·gettimeofday(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_arm.s b/vendor/golang.org/x/sys/unix/asm_linux_arm.s new file mode 100644 index 000000000..cf0b57465 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_linux_arm.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System calls for arm, Linux +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + B syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + B syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + B syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + B syscall·RawSyscall6(SB) + +TEXT ·seek(SB),NOSPLIT,$0-32 + B syscall·seek(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_arm64.s b/vendor/golang.org/x/sys/unix/asm_linux_arm64.s new file mode 100644 index 000000000..4be9bfede --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_linux_arm64.s @@ -0,0 +1,24 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux +// +build arm64 +// +build !gccgo + +#include "textflag.h" + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + B syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + B syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + B syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s b/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s new file mode 100644 index 000000000..724e580c4 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s @@ -0,0 +1,28 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux +// +build mips64 mips64le +// +build !gccgo + +#include "textflag.h" + +// +// System calls for mips64, Linux +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + JMP syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s new file mode 100644 index 000000000..8d231feb4 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s @@ -0,0 +1,28 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux +// +build ppc64 ppc64le +// +build !gccgo + +#include "textflag.h" + +// +// System calls for ppc64, Linux +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + BR syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + BR syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + BR syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + BR syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_linux_s390x.s b/vendor/golang.org/x/sys/unix/asm_linux_s390x.s new file mode 100644 index 000000000..11889859f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_linux_s390x.s @@ -0,0 +1,28 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build s390x +// +build linux +// +build !gccgo + +#include "textflag.h" + +// +// System calls for s390x, Linux +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + BR syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + BR syscall·Syscall6(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + BR syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + BR syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_386.s b/vendor/golang.org/x/sys/unix/asm_netbsd_386.s new file mode 100644 index 000000000..48bdcd763 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_netbsd_386.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for 386, NetBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-52 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s new file mode 100644 index 000000000..2ede05c72 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for AMD64, NetBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-104 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s b/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s new file mode 100644 index 000000000..e8928571c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s @@ -0,0 +1,29 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for ARM, NetBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + B syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + B syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-52 + B syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + B syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + B syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_386.s b/vendor/golang.org/x/sys/unix/asm_openbsd_386.s new file mode 100644 index 000000000..00576f3c8 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_openbsd_386.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for 386, OpenBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-28 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-40 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-52 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-28 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s new file mode 100644 index 000000000..790ef77f8 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s @@ -0,0 +1,29 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System call support for AMD64, OpenBSD +// + +// Just jump to package syscall's implementation for all these functions. +// The runtime may know about them. + +TEXT ·Syscall(SB),NOSPLIT,$0-56 + JMP syscall·Syscall(SB) + +TEXT ·Syscall6(SB),NOSPLIT,$0-80 + JMP syscall·Syscall6(SB) + +TEXT ·Syscall9(SB),NOSPLIT,$0-104 + JMP syscall·Syscall9(SB) + +TEXT ·RawSyscall(SB),NOSPLIT,$0-56 + JMP syscall·RawSyscall(SB) + +TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 + JMP syscall·RawSyscall6(SB) diff --git a/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s new file mode 100644 index 000000000..43ed17a05 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s @@ -0,0 +1,17 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !gccgo + +#include "textflag.h" + +// +// System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go +// + +TEXT ·sysvicall6(SB),NOSPLIT,$0-64 + JMP syscall·sysvicall6(SB) + +TEXT ·rawSysvicall6(SB),NOSPLIT,$0-64 + JMP syscall·rawSysvicall6(SB) diff --git a/vendor/golang.org/x/sys/unix/bluetooth_linux.go b/vendor/golang.org/x/sys/unix/bluetooth_linux.go new file mode 100644 index 000000000..6e3229697 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/bluetooth_linux.go @@ -0,0 +1,35 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Bluetooth sockets and messages + +package unix + +// Bluetooth Protocols +const ( + BTPROTO_L2CAP = 0 + BTPROTO_HCI = 1 + BTPROTO_SCO = 2 + BTPROTO_RFCOMM = 3 + BTPROTO_BNEP = 4 + BTPROTO_CMTP = 5 + BTPROTO_HIDP = 6 + BTPROTO_AVDTP = 7 +) + +const ( + HCI_CHANNEL_RAW = 0 + HCI_CHANNEL_USER = 1 + HCI_CHANNEL_MONITOR = 2 + HCI_CHANNEL_CONTROL = 3 +) + +// Socketoption Level +const ( + SOL_BLUETOOTH = 0x112 + SOL_HCI = 0x0 + SOL_L2CAP = 0x6 + SOL_RFCOMM = 0x12 + SOL_SCO = 0x11 +) diff --git a/vendor/golang.org/x/sys/unix/constants.go b/vendor/golang.org/x/sys/unix/constants.go new file mode 100644 index 000000000..a96f0ebc2 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/constants.go @@ -0,0 +1,13 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix + +const ( + R_OK = 0x4 + W_OK = 0x2 + X_OK = 0x1 +) diff --git a/vendor/golang.org/x/sys/unix/env_unix.go b/vendor/golang.org/x/sys/unix/env_unix.go new file mode 100644 index 000000000..45e281a04 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/env_unix.go @@ -0,0 +1,27 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +// Unix environment variables. + +package unix + +import "syscall" + +func Getenv(key string) (value string, found bool) { + return syscall.Getenv(key) +} + +func Setenv(key, value string) error { + return syscall.Setenv(key, value) +} + +func Clearenv() { + syscall.Clearenv() +} + +func Environ() []string { + return syscall.Environ() +} diff --git a/vendor/golang.org/x/sys/unix/env_unset.go b/vendor/golang.org/x/sys/unix/env_unset.go new file mode 100644 index 000000000..922226255 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/env_unset.go @@ -0,0 +1,14 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.4 + +package unix + +import "syscall" + +func Unsetenv(key string) error { + // This was added in Go 1.4. + return syscall.Unsetenv(key) +} diff --git a/vendor/golang.org/x/sys/unix/flock.go b/vendor/golang.org/x/sys/unix/flock.go new file mode 100644 index 000000000..ce67a5952 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/flock.go @@ -0,0 +1,24 @@ +// +build linux darwin freebsd openbsd netbsd dragonfly + +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd + +package unix + +import "unsafe" + +// fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux +// systems by flock_linux_32bit.go to be SYS_FCNTL64. +var fcntl64Syscall uintptr = SYS_FCNTL + +// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. +func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { + _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) + if errno == 0 { + return nil + } + return errno +} diff --git a/vendor/golang.org/x/sys/unix/flock_linux_32bit.go b/vendor/golang.org/x/sys/unix/flock_linux_32bit.go new file mode 100644 index 000000000..362831c3f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/flock_linux_32bit.go @@ -0,0 +1,13 @@ +// +build linux,386 linux,arm + +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix + +func init() { + // On 32-bit Linux systems, the fcntl syscall that matches Go's + // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. + fcntl64Syscall = SYS_FCNTL64 +} diff --git a/vendor/golang.org/x/sys/unix/gccgo.go b/vendor/golang.org/x/sys/unix/gccgo.go new file mode 100644 index 000000000..94c823212 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/gccgo.go @@ -0,0 +1,46 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build gccgo + +package unix + +import "syscall" + +// We can't use the gc-syntax .s files for gccgo. On the plus side +// much of the functionality can be written directly in Go. + +//extern gccgoRealSyscall +func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr) + +func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { + syscall.Entersyscall() + r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) + syscall.Exitsyscall() + return r, 0, syscall.Errno(errno) +} + +func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { + syscall.Entersyscall() + r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0) + syscall.Exitsyscall() + return r, 0, syscall.Errno(errno) +} + +func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) { + syscall.Entersyscall() + r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9) + syscall.Exitsyscall() + return r, 0, syscall.Errno(errno) +} + +func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) { + r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0) + return r, 0, syscall.Errno(errno) +} + +func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) { + r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0) + return r, 0, syscall.Errno(errno) +} diff --git a/vendor/golang.org/x/sys/unix/gccgo_c.c b/vendor/golang.org/x/sys/unix/gccgo_c.c new file mode 100644 index 000000000..07f6be039 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/gccgo_c.c @@ -0,0 +1,41 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build gccgo + +#include +#include +#include + +#define _STRINGIFY2_(x) #x +#define _STRINGIFY_(x) _STRINGIFY2_(x) +#define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__) + +// Call syscall from C code because the gccgo support for calling from +// Go to C does not support varargs functions. + +struct ret { + uintptr_t r; + uintptr_t err; +}; + +struct ret +gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9) +{ + struct ret r; + + errno = 0; + r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9); + r.err = errno; + return r; +} + +// Define the use function in C so that it is not inlined. + +extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline)); + +void +use(void *p __attribute__ ((unused))) +{ +} diff --git a/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go b/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go new file mode 100644 index 000000000..bffe1a77d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go @@ -0,0 +1,20 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build gccgo,linux,amd64 + +package unix + +import "syscall" + +//extern gettimeofday +func realGettimeofday(*Timeval, *byte) int32 + +func gettimeofday(tv *Timeval) (err syscall.Errno) { + r := realGettimeofday(tv, nil) + if r < 0 { + return syscall.GetErrno() + } + return 0 +} diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh new file mode 100755 index 000000000..3e224c57e --- /dev/null +++ b/vendor/golang.org/x/sys/unix/mkall.sh @@ -0,0 +1,285 @@ +#!/usr/bin/env bash +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +# The unix package provides access to the raw system call +# interface of the underlying operating system. Porting Go to +# a new architecture/operating system combination requires +# some manual effort, though there are tools that automate +# much of the process. The auto-generated files have names +# beginning with z. +# +# This script runs or (given -n) prints suggested commands to generate z files +# for the current system. Running those commands is not automatic. +# This script is documentation more than anything else. +# +# * asm_${GOOS}_${GOARCH}.s +# +# This hand-written assembly file implements system call dispatch. +# There are three entry points: +# +# func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr); +# func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr); +# func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr); +# +# The first and second are the standard ones; they differ only in +# how many arguments can be passed to the kernel. +# The third is for low-level use by the ForkExec wrapper; +# unlike the first two, it does not call into the scheduler to +# let it know that a system call is running. +# +# * syscall_${GOOS}.go +# +# This hand-written Go file implements system calls that need +# special handling and lists "//sys" comments giving prototypes +# for ones that can be auto-generated. Mksyscall reads those +# comments to generate the stubs. +# +# * syscall_${GOOS}_${GOARCH}.go +# +# Same as syscall_${GOOS}.go except that it contains code specific +# to ${GOOS} on one particular architecture. +# +# * types_${GOOS}.c +# +# This hand-written C file includes standard C headers and then +# creates typedef or enum names beginning with a dollar sign +# (use of $ in variable names is a gcc extension). The hardest +# part about preparing this file is figuring out which headers to +# include and which symbols need to be #defined to get the +# actual data structures that pass through to the kernel system calls. +# Some C libraries present alternate versions for binary compatibility +# and translate them on the way in and out of system calls, but +# there is almost always a #define that can get the real ones. +# See types_darwin.c and types_linux.c for examples. +# +# * zerror_${GOOS}_${GOARCH}.go +# +# This machine-generated file defines the system's error numbers, +# error strings, and signal numbers. The generator is "mkerrors.sh". +# Usually no arguments are needed, but mkerrors.sh will pass its +# arguments on to godefs. +# +# * zsyscall_${GOOS}_${GOARCH}.go +# +# Generated by mksyscall.pl; see syscall_${GOOS}.go above. +# +# * zsysnum_${GOOS}_${GOARCH}.go +# +# Generated by mksysnum_${GOOS}. +# +# * ztypes_${GOOS}_${GOARCH}.go +# +# Generated by godefs; see types_${GOOS}.c above. + +GOOSARCH="${GOOS}_${GOARCH}" + +# defaults +mksyscall="./mksyscall.pl" +mkerrors="./mkerrors.sh" +zerrors="zerrors_$GOOSARCH.go" +mksysctl="" +zsysctl="zsysctl_$GOOSARCH.go" +mksysnum= +mktypes= +run="sh" + +case "$1" in +-syscalls) + for i in zsyscall*go + do + sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i + rm _$i + done + exit 0 + ;; +-n) + run="cat" + shift +esac + +case "$#" in +0) + ;; +*) + echo 'usage: mkall.sh [-n]' 1>&2 + exit 2 +esac + +GOOSARCH_in=syscall_$GOOSARCH.go +case "$GOOSARCH" in +_* | *_ | _) + echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2 + exit 1 + ;; +darwin_386) + mkerrors="$mkerrors -m32" + mksyscall="./mksyscall.pl -l32" + mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +darwin_amd64) + mkerrors="$mkerrors -m64" + mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +darwin_arm) + mkerrors="$mkerrors" + mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +darwin_arm64) + mkerrors="$mkerrors -m64" + mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +dragonfly_386) + mkerrors="$mkerrors -m32" + mksyscall="./mksyscall.pl -l32 -dragonfly" + mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +dragonfly_amd64) + mkerrors="$mkerrors -m64" + mksyscall="./mksyscall.pl -dragonfly" + mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +freebsd_386) + mkerrors="$mkerrors -m32" + mksyscall="./mksyscall.pl -l32" + mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +freebsd_amd64) + mkerrors="$mkerrors -m64" + mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +freebsd_arm) + mkerrors="$mkerrors" + mksyscall="./mksyscall.pl -l32 -arm" + mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl" + # Let the type of C char be signed for making the bare syscall + # API consistent across over platforms. + mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" + ;; +linux_386) + mkerrors="$mkerrors -m32" + mksyscall="./mksyscall.pl -l32" + mksysnum="./mksysnum_linux.pl /usr/include/asm/unistd_32.h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +linux_amd64) + unistd_h=$(ls -1 /usr/include/asm/unistd_64.h /usr/include/x86_64-linux-gnu/asm/unistd_64.h 2>/dev/null | head -1) + if [ "$unistd_h" = "" ]; then + echo >&2 cannot find unistd_64.h + exit 1 + fi + mkerrors="$mkerrors -m64" + mksysnum="./mksysnum_linux.pl $unistd_h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +linux_arm) + mkerrors="$mkerrors" + mksyscall="./mksyscall.pl -l32 -arm" + mksysnum="curl -s 'http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/arch/arm/include/uapi/asm/unistd.h' | ./mksysnum_linux.pl -" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +linux_arm64) + unistd_h=$(ls -1 /usr/include/asm/unistd.h /usr/include/asm-generic/unistd.h 2>/dev/null | head -1) + if [ "$unistd_h" = "" ]; then + echo >&2 cannot find unistd_64.h + exit 1 + fi + mksysnum="./mksysnum_linux.pl $unistd_h" + # Let the type of C char be signed for making the bare syscall + # API consistent across over platforms. + mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" + ;; +linux_ppc64) + GOOSARCH_in=syscall_linux_ppc64x.go + unistd_h=/usr/include/asm/unistd.h + mkerrors="$mkerrors -m64" + mksysnum="./mksysnum_linux.pl $unistd_h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +linux_ppc64le) + GOOSARCH_in=syscall_linux_ppc64x.go + unistd_h=/usr/include/powerpc64le-linux-gnu/asm/unistd.h + mkerrors="$mkerrors -m64" + mksysnum="./mksysnum_linux.pl $unistd_h" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +linux_s390x) + GOOSARCH_in=syscall_linux_s390x.go + unistd_h=/usr/include/asm/unistd.h + mkerrors="$mkerrors -m64" + mksysnum="./mksysnum_linux.pl $unistd_h" + # Let the type of C char be signed to make the bare sys + # API more consistent between platforms. + # This is a deliberate departure from the way the syscall + # package generates its version of the types file. + mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char" + ;; +netbsd_386) + mkerrors="$mkerrors -m32" + mksyscall="./mksyscall.pl -l32 -netbsd" + mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +netbsd_amd64) + mkerrors="$mkerrors -m64" + mksyscall="./mksyscall.pl -netbsd" + mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +openbsd_386) + mkerrors="$mkerrors -m32" + mksyscall="./mksyscall.pl -l32 -openbsd" + mksysctl="./mksysctl_openbsd.pl" + zsysctl="zsysctl_openbsd.go" + mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +openbsd_amd64) + mkerrors="$mkerrors -m64" + mksyscall="./mksyscall.pl -openbsd" + mksysctl="./mksysctl_openbsd.pl" + zsysctl="zsysctl_openbsd.go" + mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl" + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +solaris_amd64) + mksyscall="./mksyscall_solaris.pl" + mkerrors="$mkerrors -m64" + mksysnum= + mktypes="GOARCH=$GOARCH go tool cgo -godefs" + ;; +*) + echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2 + exit 1 + ;; +esac + +( + if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi + case "$GOOS" in + *) + syscall_goos="syscall_$GOOS.go" + case "$GOOS" in + darwin | dragonfly | freebsd | netbsd | openbsd) + syscall_goos="syscall_bsd.go $syscall_goos" + ;; + esac + if [ -n "$mksyscall" ]; then echo "$mksyscall $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"; fi + ;; + esac + if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi + if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi + if [ -n "$mktypes" ]; then + echo "echo // +build $GOARCH,$GOOS > ztypes_$GOOSARCH.go"; + echo "$mktypes types_$GOOS.go | go run mkpost.go >>ztypes_$GOOSARCH.go"; + fi +) | $run diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh new file mode 100755 index 000000000..c40d788c4 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -0,0 +1,476 @@ +#!/usr/bin/env bash +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +# Generate Go code listing errors and other #defined constant +# values (ENAMETOOLONG etc.), by asking the preprocessor +# about the definitions. + +unset LANG +export LC_ALL=C +export LC_CTYPE=C + +if test -z "$GOARCH" -o -z "$GOOS"; then + echo 1>&2 "GOARCH or GOOS not defined in environment" + exit 1 +fi + +CC=${CC:-cc} + +if [[ "$GOOS" -eq "solaris" ]]; then + # Assumes GNU versions of utilities in PATH. + export PATH=/usr/gnu/bin:$PATH +fi + +uname=$(uname) + +includes_Darwin=' +#define _DARWIN_C_SOURCE +#define KERNEL +#define _DARWIN_USE_64_BIT_INODE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +' + +includes_DragonFly=' +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +' + +includes_FreeBSD=' +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if __FreeBSD__ >= 10 +#define IFT_CARP 0xf8 // IFT_CARP is deprecated in FreeBSD 10 +#undef SIOCAIFADDR +#define SIOCAIFADDR _IOW(105, 26, struct oifaliasreq) // ifaliasreq contains if_data +#undef SIOCSIFPHYADDR +#define SIOCSIFPHYADDR _IOW(105, 70, struct oifaliasreq) // ifaliasreq contains if_data +#endif +' + +includes_Linux=' +#define _LARGEFILE_SOURCE +#define _LARGEFILE64_SOURCE +#ifndef __LP64__ +#define _FILE_OFFSET_BITS 64 +#endif +#define _GNU_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef MSG_FASTOPEN +#define MSG_FASTOPEN 0x20000000 +#endif + +#ifndef PTRACE_GETREGS +#define PTRACE_GETREGS 0xc +#endif + +#ifndef PTRACE_SETREGS +#define PTRACE_SETREGS 0xd +#endif +' + +includes_NetBSD=' +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Needed since refers to it... +#define schedppq 1 +' + +includes_OpenBSD=' +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// We keep some constants not supported in OpenBSD 5.5 and beyond for +// the promise of compatibility. +#define EMUL_ENABLED 0x1 +#define EMUL_NATIVE 0x2 +#define IPV6_FAITH 0x1d +#define IPV6_OPTIONS 0x1 +#define IPV6_RTHDR_STRICT 0x1 +#define IPV6_SOCKOPT_RESERVED1 0x3 +#define SIOCGIFGENERIC 0xc020693a +#define SIOCSIFGENERIC 0x80206939 +#define WALTSIG 0x4 +' + +includes_SunOS=' +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +' + + +includes=' +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +' +ccflags="$@" + +# Write go tool cgo -godefs input. +( + echo package unix + echo + echo '/*' + indirect="includes_$(uname)" + echo "${!indirect} $includes" + echo '*/' + echo 'import "C"' + echo 'import "syscall"' + echo + echo 'const (' + + # The gcc command line prints all the #defines + # it encounters while processing the input + echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags | + awk ' + $1 != "#define" || $2 ~ /\(/ || $3 == "" {next} + + $2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next} # 386 registers + $2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next} + $2 ~ /^(SCM_SRCRT)$/ {next} + $2 ~ /^(MAP_FAILED)$/ {next} + $2 ~ /^ELF_.*$/ {next}# contains ELF_ARCH, etc. + + $2 ~ /^EXTATTR_NAMESPACE_NAMES/ || + $2 ~ /^EXTATTR_NAMESPACE_[A-Z]+_STRING/ {next} + + $2 !~ /^ETH_/ && + $2 !~ /^EPROC_/ && + $2 !~ /^EQUIV_/ && + $2 !~ /^EXPR_/ && + $2 ~ /^E[A-Z0-9_]+$/ || + $2 ~ /^B[0-9_]+$/ || + $2 == "BOTHER" || + $2 ~ /^CI?BAUD(EX)?$/ || + $2 == "IBSHIFT" || + $2 ~ /^V[A-Z0-9]+$/ || + $2 ~ /^CS[A-Z0-9]/ || + $2 ~ /^I(SIG|CANON|CRNL|UCLC|EXTEN|MAXBEL|STRIP|UTF8)$/ || + $2 ~ /^IGN/ || + $2 ~ /^IX(ON|ANY|OFF)$/ || + $2 ~ /^IN(LCR|PCK)$/ || + $2 ~ /(^FLU?SH)|(FLU?SH$)/ || + $2 ~ /^C(LOCAL|READ|MSPAR|RTSCTS)$/ || + $2 == "BRKINT" || + $2 == "HUPCL" || + $2 == "PENDIN" || + $2 == "TOSTOP" || + $2 == "XCASE" || + $2 == "ALTWERASE" || + $2 == "NOKERNINFO" || + $2 ~ /^PAR/ || + $2 ~ /^SIG[^_]/ || + $2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ || + $2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ || + $2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ || + $2 ~ /^O?XTABS$/ || + $2 ~ /^TC[IO](ON|OFF)$/ || + $2 ~ /^IN_/ || + $2 ~ /^LOCK_(SH|EX|NB|UN)$/ || + $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ || + $2 == "ICMPV6_FILTER" || + $2 == "SOMAXCONN" || + $2 == "NAME_MAX" || + $2 == "IFNAMSIZ" || + $2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ || + $2 ~ /^SYSCTL_VERS/ || + $2 ~ /^(MS|MNT)_/ || + $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ || + $2 ~ /^(O|F|FD|NAME|S|PTRACE|PT)_/ || + $2 ~ /^LINUX_REBOOT_CMD_/ || + $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ || + $2 !~ "NLA_TYPE_MASK" && + $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ || + $2 ~ /^SIOC/ || + $2 ~ /^TIOC/ || + $2 ~ /^TCGET/ || + $2 ~ /^TCSET/ || + $2 ~ /^TC(FLSH|SBRKP?|XONC)$/ || + $2 !~ "RTF_BITS" && + $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ || + $2 ~ /^BIOC/ || + $2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ || + $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|NOFILE|STACK)|RLIM_INFINITY/ || + $2 ~ /^PRIO_(PROCESS|PGRP|USER)/ || + $2 ~ /^CLONE_[A-Z_]+/ || + $2 !~ /^(BPF_TIMEVAL)$/ && + $2 ~ /^(BPF|DLT)_/ || + $2 ~ /^CLOCK_/ || + $2 !~ "WMESGLEN" && + $2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)} + $2 ~ /^__WCOREFLAG$/ {next} + $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)} + + {next} + ' | sort + + echo ')' +) >_const.go + +# Pull out the error names for later. +errors=$( + echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' | + sort +) + +# Pull out the signal names for later. +signals=$( + echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' | + egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' | + sort +) + +# Again, writing regexps to a file. +echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' | + sort >_error.grep +echo '#include ' | $CC -x c - -E -dM $ccflags | + awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' | + egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' | + sort >_signal.grep + +echo '// mkerrors.sh' "$@" +echo '// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT' +echo +echo "// +build ${GOARCH},${GOOS}" +echo +go tool cgo -godefs -- "$@" _const.go >_error.out +cat _error.out | grep -vf _error.grep | grep -vf _signal.grep +echo +echo '// Errors' +echo 'const (' +cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= syscall.Errno(\1)/' +echo ')' + +echo +echo '// Signals' +echo 'const (' +cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= syscall.Signal(\1)/' +echo ')' + +# Run C program to print error and syscall strings. +( + echo -E " +#include +#include +#include +#include +#include +#include + +#define nelem(x) (sizeof(x)/sizeof((x)[0])) + +enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below + +int errors[] = { +" + for i in $errors + do + echo -E ' '$i, + done + + echo -E " +}; + +int signals[] = { +" + for i in $signals + do + echo -E ' '$i, + done + + # Use -E because on some systems bash builtin interprets \n itself. + echo -E ' +}; + +static int +intcmp(const void *a, const void *b) +{ + return *(int*)a - *(int*)b; +} + +int +main(void) +{ + int i, j, e; + char buf[1024], *p; + + printf("\n\n// Error table\n"); + printf("var errors = [...]string {\n"); + qsort(errors, nelem(errors), sizeof errors[0], intcmp); + for(i=0; i 0 && errors[i-1] == e) + continue; + strcpy(buf, strerror(e)); + // lowercase first letter: Bad -> bad, but STREAM -> STREAM. + if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) + buf[0] += a - A; + printf("\t%d: \"%s\",\n", e, buf); + } + printf("}\n\n"); + + printf("\n\n// Signal table\n"); + printf("var signals = [...]string {\n"); + qsort(signals, nelem(signals), sizeof signals[0], intcmp); + for(i=0; i 0 && signals[i-1] == e) + continue; + strcpy(buf, strsignal(e)); + // lowercase first letter: Bad -> bad, but STREAM -> STREAM. + if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z) + buf[0] += a - A; + // cut trailing : number. + p = strrchr(buf, ":"[0]); + if(p) + *p = '\0'; + printf("\t%d: \"%s\",\n", e, buf); + } + printf("}\n\n"); + + return 0; +} + +' +) >_errors.c + +$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out diff --git a/vendor/golang.org/x/sys/unix/mkpost.go b/vendor/golang.org/x/sys/unix/mkpost.go new file mode 100644 index 000000000..ed50d902a --- /dev/null +++ b/vendor/golang.org/x/sys/unix/mkpost.go @@ -0,0 +1,62 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +// mkpost processes the output of cgo -godefs to +// modify the generated types. It is used to clean up +// the sys API in an architecture specific manner. +// +// mkpost is run after cgo -godefs by mkall.sh. +package main + +import ( + "fmt" + "go/format" + "io/ioutil" + "log" + "os" + "regexp" +) + +func main() { + b, err := ioutil.ReadAll(os.Stdin) + if err != nil { + log.Fatal(err) + } + s := string(b) + + goarch := os.Getenv("GOARCH") + goos := os.Getenv("GOOS") + if goarch == "s390x" && goos == "linux" { + // Export the types of PtraceRegs fields. + re := regexp.MustCompile("ptrace(Psw|Fpregs|Per)") + s = re.ReplaceAllString(s, "Ptrace$1") + + // Replace padding fields inserted by cgo with blank identifiers. + re = regexp.MustCompile("Pad_cgo[A-Za-z0-9_]*") + s = re.ReplaceAllString(s, "_") + + // Replace other unwanted fields with blank identifiers. + re = regexp.MustCompile("X_[A-Za-z0-9_]*") + s = re.ReplaceAllString(s, "_") + + // Replace the control_regs union with a blank identifier for now. + re = regexp.MustCompile("(Control_regs)\\s+\\[0\\]uint64") + s = re.ReplaceAllString(s, "_ [0]uint64") + } + + // gofmt + b, err = format.Source([]byte(s)) + if err != nil { + log.Fatal(err) + } + + // Append this command to the header to show where the new file + // came from. + re := regexp.MustCompile("(cgo -godefs [a-zA-Z0-9_]+\\.go.*)") + b = re.ReplaceAll(b, []byte("$1 | go run mkpost.go")) + + fmt.Printf("%s", b) +} diff --git a/vendor/golang.org/x/sys/unix/mksyscall.pl b/vendor/golang.org/x/sys/unix/mksyscall.pl new file mode 100755 index 000000000..b1e7766da --- /dev/null +++ b/vendor/golang.org/x/sys/unix/mksyscall.pl @@ -0,0 +1,323 @@ +#!/usr/bin/env perl +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +# This program reads a file containing function prototypes +# (like syscall_darwin.go) and generates system call bodies. +# The prototypes are marked by lines beginning with "//sys" +# and read like func declarations if //sys is replaced by func, but: +# * The parameter lists must give a name for each argument. +# This includes return parameters. +# * The parameter lists must give a type for each argument: +# the (x, y, z int) shorthand is not allowed. +# * If the return parameter is an error number, it must be named errno. + +# A line beginning with //sysnb is like //sys, except that the +# goroutine will not be suspended during the execution of the system +# call. This must only be used for system calls which can never +# block, as otherwise the system call could cause all goroutines to +# hang. + +use strict; + +my $cmdline = "mksyscall.pl " . join(' ', @ARGV); +my $errors = 0; +my $_32bit = ""; +my $plan9 = 0; +my $openbsd = 0; +my $netbsd = 0; +my $dragonfly = 0; +my $arm = 0; # 64-bit value should use (even, odd)-pair + +if($ARGV[0] eq "-b32") { + $_32bit = "big-endian"; + shift; +} elsif($ARGV[0] eq "-l32") { + $_32bit = "little-endian"; + shift; +} +if($ARGV[0] eq "-plan9") { + $plan9 = 1; + shift; +} +if($ARGV[0] eq "-openbsd") { + $openbsd = 1; + shift; +} +if($ARGV[0] eq "-netbsd") { + $netbsd = 1; + shift; +} +if($ARGV[0] eq "-dragonfly") { + $dragonfly = 1; + shift; +} +if($ARGV[0] eq "-arm") { + $arm = 1; + shift; +} + +if($ARGV[0] =~ /^-/) { + print STDERR "usage: mksyscall.pl [-b32 | -l32] [file ...]\n"; + exit 1; +} + +if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { + print STDERR "GOARCH or GOOS not defined in environment\n"; + exit 1; +} + +sub parseparamlist($) { + my ($list) = @_; + $list =~ s/^\s*//; + $list =~ s/\s*$//; + if($list eq "") { + return (); + } + return split(/\s*,\s*/, $list); +} + +sub parseparam($) { + my ($p) = @_; + if($p !~ /^(\S*) (\S*)$/) { + print STDERR "$ARGV:$.: malformed parameter: $p\n"; + $errors = 1; + return ("xx", "int"); + } + return ($1, $2); +} + +my $text = ""; +while(<>) { + chomp; + s/\s+/ /g; + s/^\s+//; + s/\s+$//; + my $nonblock = /^\/\/sysnb /; + next if !/^\/\/sys / && !$nonblock; + + # Line must be of the form + # func Open(path string, mode int, perm int) (fd int, errno error) + # Split into name, in params, out params. + if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) { + print STDERR "$ARGV:$.: malformed //sys declaration\n"; + $errors = 1; + next; + } + my ($func, $in, $out, $sysname) = ($2, $3, $4, $5); + + # Split argument lists on comma. + my @in = parseparamlist($in); + my @out = parseparamlist($out); + + # Try in vain to keep people from editing this file. + # The theory is that they jump into the middle of the file + # without reading the header. + $text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n"; + + # Go function header. + my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : ""; + $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl; + + # Check if err return available + my $errvar = ""; + foreach my $p (@out) { + my ($name, $type) = parseparam($p); + if($type eq "error") { + $errvar = $name; + last; + } + } + + # Prepare arguments to Syscall. + my @args = (); + my @uses = (); + my $n = 0; + foreach my $p (@in) { + my ($name, $type) = parseparam($p); + if($type =~ /^\*/) { + push @args, "uintptr(unsafe.Pointer($name))"; + } elsif($type eq "string" && $errvar ne "") { + $text .= "\tvar _p$n *byte\n"; + $text .= "\t_p$n, $errvar = BytePtrFromString($name)\n"; + $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n"; + push @args, "uintptr(unsafe.Pointer(_p$n))"; + push @uses, "use(unsafe.Pointer(_p$n))"; + $n++; + } elsif($type eq "string") { + print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n"; + $text .= "\tvar _p$n *byte\n"; + $text .= "\t_p$n, _ = BytePtrFromString($name)\n"; + push @args, "uintptr(unsafe.Pointer(_p$n))"; + push @uses, "use(unsafe.Pointer(_p$n))"; + $n++; + } elsif($type =~ /^\[\](.*)/) { + # Convert slice into pointer, length. + # Have to be careful not to take address of &a[0] if len == 0: + # pass dummy pointer in that case. + # Used to pass nil, but some OSes or simulators reject write(fd, nil, 0). + $text .= "\tvar _p$n unsafe.Pointer\n"; + $text .= "\tif len($name) > 0 {\n\t\t_p$n = unsafe.Pointer(\&${name}[0])\n\t}"; + $text .= " else {\n\t\t_p$n = unsafe.Pointer(&_zero)\n\t}"; + $text .= "\n"; + push @args, "uintptr(_p$n)", "uintptr(len($name))"; + $n++; + } elsif($type eq "int64" && ($openbsd || $netbsd)) { + push @args, "0"; + if($_32bit eq "big-endian") { + push @args, "uintptr($name>>32)", "uintptr($name)"; + } elsif($_32bit eq "little-endian") { + push @args, "uintptr($name)", "uintptr($name>>32)"; + } else { + push @args, "uintptr($name)"; + } + } elsif($type eq "int64" && $dragonfly) { + if ($func !~ /^extp(read|write)/i) { + push @args, "0"; + } + if($_32bit eq "big-endian") { + push @args, "uintptr($name>>32)", "uintptr($name)"; + } elsif($_32bit eq "little-endian") { + push @args, "uintptr($name)", "uintptr($name>>32)"; + } else { + push @args, "uintptr($name)"; + } + } elsif($type eq "int64" && $_32bit ne "") { + if(@args % 2 && $arm) { + # arm abi specifies 64-bit argument uses + # (even, odd) pair + push @args, "0" + } + if($_32bit eq "big-endian") { + push @args, "uintptr($name>>32)", "uintptr($name)"; + } else { + push @args, "uintptr($name)", "uintptr($name>>32)"; + } + } else { + push @args, "uintptr($name)"; + } + } + + # Determine which form to use; pad args with zeros. + my $asm = "Syscall"; + if ($nonblock) { + $asm = "RawSyscall"; + } + if(@args <= 3) { + while(@args < 3) { + push @args, "0"; + } + } elsif(@args <= 6) { + $asm .= "6"; + while(@args < 6) { + push @args, "0"; + } + } elsif(@args <= 9) { + $asm .= "9"; + while(@args < 9) { + push @args, "0"; + } + } else { + print STDERR "$ARGV:$.: too many arguments to system call\n"; + } + + # System call number. + if($sysname eq "") { + $sysname = "SYS_$func"; + $sysname =~ s/([a-z])([A-Z])/${1}_$2/g; # turn FooBar into Foo_Bar + $sysname =~ y/a-z/A-Z/; + } + + # Actual call. + my $args = join(', ', @args); + my $call = "$asm($sysname, $args)"; + + # Assign return values. + my $body = ""; + my @ret = ("_", "_", "_"); + my $do_errno = 0; + for(my $i=0; $i<@out; $i++) { + my $p = $out[$i]; + my ($name, $type) = parseparam($p); + my $reg = ""; + if($name eq "err" && !$plan9) { + $reg = "e1"; + $ret[2] = $reg; + $do_errno = 1; + } elsif($name eq "err" && $plan9) { + $ret[0] = "r0"; + $ret[2] = "e1"; + next; + } else { + $reg = sprintf("r%d", $i); + $ret[$i] = $reg; + } + if($type eq "bool") { + $reg = "$reg != 0"; + } + if($type eq "int64" && $_32bit ne "") { + # 64-bit number in r1:r0 or r0:r1. + if($i+2 > @out) { + print STDERR "$ARGV:$.: not enough registers for int64 return\n"; + } + if($_32bit eq "big-endian") { + $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1); + } else { + $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i); + } + $ret[$i] = sprintf("r%d", $i); + $ret[$i+1] = sprintf("r%d", $i+1); + } + if($reg ne "e1" || $plan9) { + $body .= "\t$name = $type($reg)\n"; + } + } + if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") { + $text .= "\t$call\n"; + } else { + $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n"; + } + foreach my $use (@uses) { + $text .= "\t$use\n"; + } + $text .= $body; + + if ($plan9 && $ret[2] eq "e1") { + $text .= "\tif int32(r0) == -1 {\n"; + $text .= "\t\terr = e1\n"; + $text .= "\t}\n"; + } elsif ($do_errno) { + $text .= "\tif e1 != 0 {\n"; + $text .= "\t\terr = errnoErr(e1)\n"; + $text .= "\t}\n"; + } + $text .= "\treturn\n"; + $text .= "}\n\n"; +} + +chomp $text; +chomp $text; + +if($errors) { + exit 1; +} + +print <) { + chomp; + s/\s+/ /g; + s/^\s+//; + s/\s+$//; + $package = $1 if !$package && /^package (\S+)$/; + my $nonblock = /^\/\/sysnb /; + next if !/^\/\/sys / && !$nonblock; + + # Line must be of the form + # func Open(path string, mode int, perm int) (fd int, err error) + # Split into name, in params, out params. + if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) { + print STDERR "$ARGV:$.: malformed //sys declaration\n"; + $errors = 1; + next; + } + my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6); + + # Split argument lists on comma. + my @in = parseparamlist($in); + my @out = parseparamlist($out); + + # So file name. + if($modname eq "") { + $modname = "libc"; + } + + # System call name. + if($sysname eq "") { + $sysname = "$func"; + } + + # System call pointer variable name. + my $sysvarname = "proc$sysname"; + + my $strconvfunc = "BytePtrFromString"; + my $strconvtype = "*byte"; + + $sysname =~ y/A-Z/a-z/; # All libc functions are lowercase. + + # Runtime import of function to allow cross-platform builds. + $dynimports .= "//go:cgo_import_dynamic libc_${sysname} ${sysname} \"$modname.so\"\n"; + # Link symbol to proc address variable. + $linknames .= "//go:linkname ${sysvarname} libc_${sysname}\n"; + # Library proc address variable. + push @vars, $sysvarname; + + # Go function header. + $out = join(', ', @out); + if($out ne "") { + $out = " ($out)"; + } + if($text ne "") { + $text .= "\n" + } + $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out; + + # Check if err return available + my $errvar = ""; + foreach my $p (@out) { + my ($name, $type) = parseparam($p); + if($type eq "error") { + $errvar = $name; + last; + } + } + + # Prepare arguments to Syscall. + my @args = (); + my @uses = (); + my $n = 0; + foreach my $p (@in) { + my ($name, $type) = parseparam($p); + if($type =~ /^\*/) { + push @args, "uintptr(unsafe.Pointer($name))"; + } elsif($type eq "string" && $errvar ne "") { + $text .= "\tvar _p$n $strconvtype\n"; + $text .= "\t_p$n, $errvar = $strconvfunc($name)\n"; + $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n"; + push @args, "uintptr(unsafe.Pointer(_p$n))"; + push @uses, "use(unsafe.Pointer(_p$n))"; + $n++; + } elsif($type eq "string") { + print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n"; + $text .= "\tvar _p$n $strconvtype\n"; + $text .= "\t_p$n, _ = $strconvfunc($name)\n"; + push @args, "uintptr(unsafe.Pointer(_p$n))"; + push @uses, "use(unsafe.Pointer(_p$n))"; + $n++; + } elsif($type =~ /^\[\](.*)/) { + # Convert slice into pointer, length. + # Have to be careful not to take address of &a[0] if len == 0: + # pass nil in that case. + $text .= "\tvar _p$n *$1\n"; + $text .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n"; + push @args, "uintptr(unsafe.Pointer(_p$n))", "uintptr(len($name))"; + $n++; + } elsif($type eq "int64" && $_32bit ne "") { + if($_32bit eq "big-endian") { + push @args, "uintptr($name >> 32)", "uintptr($name)"; + } else { + push @args, "uintptr($name)", "uintptr($name >> 32)"; + } + } elsif($type eq "bool") { + $text .= "\tvar _p$n uint32\n"; + $text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n"; + push @args, "uintptr(_p$n)"; + $n++; + } else { + push @args, "uintptr($name)"; + } + } + my $nargs = @args; + + # Determine which form to use; pad args with zeros. + my $asm = "sysvicall6"; + if ($nonblock) { + $asm = "rawSysvicall6"; + } + if(@args <= 6) { + while(@args < 6) { + push @args, "0"; + } + } else { + print STDERR "$ARGV:$.: too many arguments to system call\n"; + } + + # Actual call. + my $args = join(', ', @args); + my $call = "$asm(uintptr(unsafe.Pointer(&$sysvarname)), $nargs, $args)"; + + # Assign return values. + my $body = ""; + my $failexpr = ""; + my @ret = ("_", "_", "_"); + my @pout= (); + my $do_errno = 0; + for(my $i=0; $i<@out; $i++) { + my $p = $out[$i]; + my ($name, $type) = parseparam($p); + my $reg = ""; + if($name eq "err") { + $reg = "e1"; + $ret[2] = $reg; + $do_errno = 1; + } else { + $reg = sprintf("r%d", $i); + $ret[$i] = $reg; + } + if($type eq "bool") { + $reg = "$reg != 0"; + } + if($type eq "int64" && $_32bit ne "") { + # 64-bit number in r1:r0 or r0:r1. + if($i+2 > @out) { + print STDERR "$ARGV:$.: not enough registers for int64 return\n"; + } + if($_32bit eq "big-endian") { + $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1); + } else { + $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i); + } + $ret[$i] = sprintf("r%d", $i); + $ret[$i+1] = sprintf("r%d", $i+1); + } + if($reg ne "e1") { + $body .= "\t$name = $type($reg)\n"; + } + } + if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") { + $text .= "\t$call\n"; + } else { + $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n"; + } + foreach my $use (@uses) { + $text .= "\t$use\n"; + } + $text .= $body; + + if ($do_errno) { + $text .= "\tif e1 != 0 {\n"; + $text .= "\t\terr = e1\n"; + $text .= "\t}\n"; + } + $text .= "\treturn\n"; + $text .= "}\n"; +} + +if($errors) { + exit 1; +} + +print < "net.inet", + "net.inet.ipproto" => "net.inet", + "net.inet6.ipv6proto" => "net.inet6", + "net.inet6.ipv6" => "net.inet6.ip6", + "net.inet.icmpv6" => "net.inet6.icmp6", + "net.inet6.divert6" => "net.inet6.divert", + "net.inet6.tcp6" => "net.inet.tcp", + "net.inet6.udp6" => "net.inet.udp", + "mpls" => "net.mpls", + "swpenc" => "vm.swapencrypt" +); + +# Node mappings +my %node_map = ( + "net.inet.ip.ifq" => "net.ifq", + "net.inet.pfsync" => "net.pfsync", + "net.mpls.ifq" => "net.ifq" +); + +my $ctlname; +my %mib = (); +my %sysctl = (); +my $node; + +sub debug() { + print STDERR "$_[0]\n" if $debug; +} + +# Walk the MIB and build a sysctl name to OID mapping. +sub build_sysctl() { + my ($node, $name, $oid) = @_; + my %node = %{$node}; + my @oid = @{$oid}; + + foreach my $key (sort keys %node) { + my @node = @{$node{$key}}; + my $nodename = $name.($name ne '' ? '.' : '').$key; + my @nodeoid = (@oid, $node[0]); + if ($node[1] eq 'CTLTYPE_NODE') { + if (exists $node_map{$nodename}) { + $node = \%mib; + $ctlname = $node_map{$nodename}; + foreach my $part (split /\./, $ctlname) { + $node = \%{@{$$node{$part}}[2]}; + } + } else { + $node = $node[2]; + } + &build_sysctl($node, $nodename, \@nodeoid); + } elsif ($node[1] ne '') { + $sysctl{$nodename} = \@nodeoid; + } + } +} + +foreach my $ctl (@ctls) { + $ctls{$ctl} = $ctl; +} + +# Build MIB +foreach my $header (@headers) { + &debug("Processing $header..."); + open HEADER, "/usr/include/$header" || + print STDERR "Failed to open $header\n"; + while (
) { + if ($_ =~ /^#define\s+(CTL_NAMES)\s+{/ || + $_ =~ /^#define\s+(CTL_(.*)_NAMES)\s+{/ || + $_ =~ /^#define\s+((.*)CTL_NAMES)\s+{/) { + if ($1 eq 'CTL_NAMES') { + # Top level. + $node = \%mib; + } else { + # Node. + my $nodename = lc($2); + if ($header =~ /^netinet\//) { + $ctlname = "net.inet.$nodename"; + } elsif ($header =~ /^netinet6\//) { + $ctlname = "net.inet6.$nodename"; + } elsif ($header =~ /^net\//) { + $ctlname = "net.$nodename"; + } else { + $ctlname = "$nodename"; + $ctlname =~ s/^(fs|net|kern)_/$1\./; + } + if (exists $ctl_map{$ctlname}) { + $ctlname = $ctl_map{$ctlname}; + } + if (not exists $ctls{$ctlname}) { + &debug("Ignoring $ctlname..."); + next; + } + + # Walk down from the top of the MIB. + $node = \%mib; + foreach my $part (split /\./, $ctlname) { + if (not exists $$node{$part}) { + &debug("Missing node $part"); + $$node{$part} = [ 0, '', {} ]; + } + $node = \%{@{$$node{$part}}[2]}; + } + } + + # Populate current node with entries. + my $i = -1; + while (defined($_) && $_ !~ /^}/) { + $_ =
; + $i++ if $_ =~ /{.*}/; + next if $_ !~ /{\s+"(\w+)",\s+(CTLTYPE_[A-Z]+)\s+}/; + $$node{$1} = [ $i, $2, {} ]; + } + } + } + close HEADER; +} + +&build_sysctl(\%mib, "", []); + +print <){ + if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ + my $name = $1; + my $num = $2; + $name =~ y/a-z/A-Z/; + print " SYS_$name = $num;" + } +} + +print <){ + if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){ + my $num = $1; + my $proto = $2; + my $name = "SYS_$3"; + $name =~ y/a-z/A-Z/; + + # There are multiple entries for enosys and nosys, so comment them out. + if($name =~ /^SYS_E?NOSYS$/){ + $name = "// $name"; + } + if($name eq 'SYS_SYS_EXIT'){ + $name = 'SYS_EXIT'; + } + + print " $name = $num; // $proto\n"; + } +} + +print <){ + if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){ + my $num = $1; + my $proto = $2; + my $name = "SYS_$3"; + $name =~ y/a-z/A-Z/; + + # There are multiple entries for enosys and nosys, so comment them out. + if($name =~ /^SYS_E?NOSYS$/){ + $name = "// $name"; + } + if($name eq 'SYS_SYS_EXIT'){ + $name = 'SYS_EXIT'; + } + if($name =~ /^SYS_CAP_+/ || $name =~ /^SYS___CAP_+/){ + next + } + + print " $name = $num; // $proto\n"; + + # We keep Capsicum syscall numbers for FreeBSD + # 9-STABLE here because we are not sure whether they + # are mature and stable. + if($num == 513){ + print " SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }\n"; + print " SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \\\n"; + print " SYS_CAP_ENTER = 516 // { int cap_enter(void); }\n"; + print " SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }\n"; + } + } +} + +print < 999){ + # ignore deprecated syscalls that are no longer implemented + # https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h?id=refs/heads/master#n716 + return; + } + $name =~ y/a-z/A-Z/; + print " SYS_$name = $num;\n"; +} + +my $prev; +open(GCC, "gcc -E -dD $ARGV[0] |") || die "can't run gcc"; +while(){ + if(/^#define __NR_syscalls\s+/) { + # ignore redefinitions of __NR_syscalls + } + elsif(/^#define __NR_(\w+)\s+([0-9]+)/){ + $prev = $2; + fmt($1, $2); + } + elsif(/^#define __NR3264_(\w+)\s+([0-9]+)/){ + $prev = $2; + fmt($1, $2); + } + elsif(/^#define __NR_(\w+)\s+\(\w+\+\s*([0-9]+)\)/){ + fmt($1, $prev+$2) + } +} + +print <){ + if($line =~ /^(.*)\\$/) { + # Handle continuation + $line = $1; + $_ =~ s/^\s+//; + $line .= $_; + } else { + # New line + $line = $_; + } + next if $line =~ /\\$/; + if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) { + my $num = $1; + my $proto = $6; + my $compat = $8; + my $name = "$7_$9"; + + $name = "$7_$11" if $11 ne ''; + $name =~ y/a-z/A-Z/; + + if($compat eq '' || $compat eq '30' || $compat eq '50') { + print " $name = $num; // $proto\n"; + } + } +} + +print <){ + if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){ + my $num = $1; + my $proto = $3; + my $name = $4; + $name =~ y/a-z/A-Z/; + + # There are multiple entries for enosys and nosys, so comment them out. + if($name =~ /^SYS_E?NOSYS$/){ + $name = "// $name"; + } + if($name eq 'SYS_SYS_EXIT'){ + $name = 'SYS_EXIT'; + } + + print " $name = $num; // $proto\n"; + } +} + +print < uint64(len(b)) { + return nil, nil, EINVAL + } + return h, b[cmsgAlignOf(SizeofCmsghdr):h.Len], nil +} + +// UnixRights encodes a set of open file descriptors into a socket +// control message for sending to another process. +func UnixRights(fds ...int) []byte { + datalen := len(fds) * 4 + b := make([]byte, CmsgSpace(datalen)) + h := (*Cmsghdr)(unsafe.Pointer(&b[0])) + h.Level = SOL_SOCKET + h.Type = SCM_RIGHTS + h.SetLen(CmsgLen(datalen)) + data := cmsgData(h) + for _, fd := range fds { + *(*int32)(data) = int32(fd) + data = unsafe.Pointer(uintptr(data) + 4) + } + return b +} + +// ParseUnixRights decodes a socket control message that contains an +// integer array of open file descriptors from another process. +func ParseUnixRights(m *SocketControlMessage) ([]int, error) { + if m.Header.Level != SOL_SOCKET { + return nil, EINVAL + } + if m.Header.Type != SCM_RIGHTS { + return nil, EINVAL + } + fds := make([]int, len(m.Data)>>2) + for i, j := 0, 0; i < len(m.Data); i += 4 { + fds[j] = int(*(*int32)(unsafe.Pointer(&m.Data[i]))) + j++ + } + return fds, nil +} diff --git a/vendor/golang.org/x/sys/unix/str.go b/vendor/golang.org/x/sys/unix/str.go new file mode 100644 index 000000000..35ed66435 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/str.go @@ -0,0 +1,26 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix + +func itoa(val int) string { // do it here rather than with fmt to avoid dependency + if val < 0 { + return "-" + uitoa(uint(-val)) + } + return uitoa(uint(val)) +} + +func uitoa(val uint) string { + var buf [32]byte // big enough for int64 + i := len(buf) - 1 + for val >= 10 { + buf[i] = byte(val%10 + '0') + i-- + val /= 10 + } + buf[i] = byte(val + '0') + return string(buf[i:]) +} diff --git a/vendor/golang.org/x/sys/unix/syscall.go b/vendor/golang.org/x/sys/unix/syscall.go new file mode 100644 index 000000000..a0bcf842c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall.go @@ -0,0 +1,76 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +// Package unix contains an interface to the low-level operating system +// primitives. OS details vary depending on the underlying system, and +// by default, godoc will display OS-specific documentation for the current +// system. If you want godoc to display OS documentation for another +// system, set $GOOS and $GOARCH to the desired system. For example, if +// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS +// to freebsd and $GOARCH to arm. +// The primary use of this package is inside other packages that provide a more +// portable interface to the system, such as "os", "time" and "net". Use +// those packages rather than this one if you can. +// For details of the functions and data types in this package consult +// the manuals for the appropriate operating system. +// These calls return err == nil to indicate success; otherwise +// err represents an operating system error describing the failure and +// holds a value of type syscall.Errno. +package unix // import "golang.org/x/sys/unix" + +import "unsafe" + +// ByteSliceFromString returns a NUL-terminated slice of bytes +// containing the text of s. If s contains a NUL byte at any +// location, it returns (nil, EINVAL). +func ByteSliceFromString(s string) ([]byte, error) { + for i := 0; i < len(s); i++ { + if s[i] == 0 { + return nil, EINVAL + } + } + a := make([]byte, len(s)+1) + copy(a, s) + return a, nil +} + +// BytePtrFromString returns a pointer to a NUL-terminated array of +// bytes containing the text of s. If s contains a NUL byte at any +// location, it returns (nil, EINVAL). +func BytePtrFromString(s string) (*byte, error) { + a, err := ByteSliceFromString(s) + if err != nil { + return nil, err + } + return &a[0], nil +} + +// Single-word zero for use when we need a valid pointer to 0 bytes. +// See mkunix.pl. +var _zero uintptr + +func (ts *Timespec) Unix() (sec int64, nsec int64) { + return int64(ts.Sec), int64(ts.Nsec) +} + +func (tv *Timeval) Unix() (sec int64, nsec int64) { + return int64(tv.Sec), int64(tv.Usec) * 1000 +} + +func (ts *Timespec) Nano() int64 { + return int64(ts.Sec)*1e9 + int64(ts.Nsec) +} + +func (tv *Timeval) Nano() int64 { + return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000 +} + +func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 } + +// use is a no-op, but the compiler cannot see that it is. +// Calling use(p) ensures that p is kept live until that point. +//go:noescape +func use(p unsafe.Pointer) diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go new file mode 100644 index 000000000..e9671764c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go @@ -0,0 +1,628 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd netbsd openbsd + +// BSD system call wrappers shared by *BSD based systems +// including OS X (Darwin) and FreeBSD. Like the other +// syscall_*.go files it is compiled as Go code but also +// used as input to mksyscall which parses the //sys +// lines and generates system call stubs. + +package unix + +import ( + "runtime" + "syscall" + "unsafe" +) + +/* + * Wrapped + */ + +//sysnb getgroups(ngid int, gid *_Gid_t) (n int, err error) +//sysnb setgroups(ngid int, gid *_Gid_t) (err error) + +func Getgroups() (gids []int, err error) { + n, err := getgroups(0, nil) + if err != nil { + return nil, err + } + if n == 0 { + return nil, nil + } + + // Sanity check group count. Max is 16 on BSD. + if n < 0 || n > 1000 { + return nil, EINVAL + } + + a := make([]_Gid_t, n) + n, err = getgroups(n, &a[0]) + if err != nil { + return nil, err + } + gids = make([]int, n) + for i, v := range a[0:n] { + gids[i] = int(v) + } + return +} + +func Setgroups(gids []int) (err error) { + if len(gids) == 0 { + return setgroups(0, nil) + } + + a := make([]_Gid_t, len(gids)) + for i, v := range gids { + a[i] = _Gid_t(v) + } + return setgroups(len(a), &a[0]) +} + +func ReadDirent(fd int, buf []byte) (n int, err error) { + // Final argument is (basep *uintptr) and the syscall doesn't take nil. + // 64 bits should be enough. (32 bits isn't even on 386). Since the + // actual system call is getdirentries64, 64 is a good guess. + // TODO(rsc): Can we use a single global basep for all calls? + var base = (*uintptr)(unsafe.Pointer(new(uint64))) + return Getdirentries(fd, buf, base) +} + +// Wait status is 7 bits at bottom, either 0 (exited), +// 0x7F (stopped), or a signal number that caused an exit. +// The 0x80 bit is whether there was a core dump. +// An extra number (exit code, signal causing a stop) +// is in the high bits. + +type WaitStatus uint32 + +const ( + mask = 0x7F + core = 0x80 + shift = 8 + + exited = 0 + stopped = 0x7F +) + +func (w WaitStatus) Exited() bool { return w&mask == exited } + +func (w WaitStatus) ExitStatus() int { + if w&mask != exited { + return -1 + } + return int(w >> shift) +} + +func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 } + +func (w WaitStatus) Signal() syscall.Signal { + sig := syscall.Signal(w & mask) + if sig == stopped || sig == 0 { + return -1 + } + return sig +} + +func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 } + +func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP } + +func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP } + +func (w WaitStatus) StopSignal() syscall.Signal { + if !w.Stopped() { + return -1 + } + return syscall.Signal(w>>shift) & 0xFF +} + +func (w WaitStatus) TrapCause() int { return -1 } + +//sys wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) + +func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { + var status _C_int + wpid, err = wait4(pid, &status, options, rusage) + if wstatus != nil { + *wstatus = WaitStatus(status) + } + return +} + +//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) +//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sysnb socket(domain int, typ int, proto int) (fd int, err error) +//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) +//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) +//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sys Shutdown(s int, how int) (err error) + +func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, EINVAL + } + sa.raw.Len = SizeofSockaddrInet4 + sa.raw.Family = AF_INET + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil +} + +func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, EINVAL + } + sa.raw.Len = SizeofSockaddrInet6 + sa.raw.Family = AF_INET6 + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + sa.raw.Scope_id = sa.ZoneId + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil +} + +func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { + name := sa.Name + n := len(name) + if n >= len(sa.raw.Path) || n == 0 { + return nil, 0, EINVAL + } + sa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL + sa.raw.Family = AF_UNIX + for i := 0; i < n; i++ { + sa.raw.Path[i] = int8(name[i]) + } + return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil +} + +func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Index == 0 { + return nil, 0, EINVAL + } + sa.raw.Len = sa.Len + sa.raw.Family = AF_LINK + sa.raw.Index = sa.Index + sa.raw.Type = sa.Type + sa.raw.Nlen = sa.Nlen + sa.raw.Alen = sa.Alen + sa.raw.Slen = sa.Slen + for i := 0; i < len(sa.raw.Data); i++ { + sa.raw.Data[i] = sa.Data[i] + } + return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil +} + +func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) { + switch rsa.Addr.Family { + case AF_LINK: + pp := (*RawSockaddrDatalink)(unsafe.Pointer(rsa)) + sa := new(SockaddrDatalink) + sa.Len = pp.Len + sa.Family = pp.Family + sa.Index = pp.Index + sa.Type = pp.Type + sa.Nlen = pp.Nlen + sa.Alen = pp.Alen + sa.Slen = pp.Slen + for i := 0; i < len(sa.Data); i++ { + sa.Data[i] = pp.Data[i] + } + return sa, nil + + case AF_UNIX: + pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa)) + if pp.Len < 2 || pp.Len > SizeofSockaddrUnix { + return nil, EINVAL + } + sa := new(SockaddrUnix) + + // Some BSDs include the trailing NUL in the length, whereas + // others do not. Work around this by subtracting the leading + // family and len. The path is then scanned to see if a NUL + // terminator still exists within the length. + n := int(pp.Len) - 2 // subtract leading Family, Len + for i := 0; i < n; i++ { + if pp.Path[i] == 0 { + // found early NUL; assume Len included the NUL + // or was overestimating. + n = i + break + } + } + bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] + sa.Name = string(bytes) + return sa, nil + + case AF_INET: + pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet4) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + + case AF_INET6: + pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet6) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + sa.ZoneId = pp.Scope_id + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + } + return nil, EAFNOSUPPORT +} + +func Accept(fd int) (nfd int, sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + nfd, err = accept(fd, &rsa, &len) + if err != nil { + return + } + if runtime.GOOS == "darwin" && len == 0 { + // Accepted socket has no address. + // This is likely due to a bug in xnu kernels, + // where instead of ECONNABORTED error socket + // is accepted, but has no address. + Close(nfd) + return 0, nil, ECONNABORTED + } + sa, err = anyToSockaddr(&rsa) + if err != nil { + Close(nfd) + nfd = 0 + } + return +} + +func Getsockname(fd int) (sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + if err = getsockname(fd, &rsa, &len); err != nil { + return + } + // TODO(jsing): DragonFly has a "bug" (see issue 3349), which should be + // reported upstream. + if runtime.GOOS == "dragonfly" && rsa.Addr.Family == AF_UNSPEC && rsa.Addr.Len == 0 { + rsa.Addr.Family = AF_UNIX + rsa.Addr.Len = SizeofSockaddrUnix + } + return anyToSockaddr(&rsa) +} + +//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) + +func GetsockoptByte(fd, level, opt int) (value byte, err error) { + var n byte + vallen := _Socklen(1) + err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen) + return n, err +} + +func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) { + vallen := _Socklen(4) + err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) + return value, err +} + +func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) { + var value IPMreq + vallen := _Socklen(SizeofIPMreq) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) { + var value IPv6Mreq + vallen := _Socklen(SizeofIPv6Mreq) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) { + var value IPv6MTUInfo + vallen := _Socklen(SizeofIPv6MTUInfo) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) { + var value ICMPv6Filter + vallen := _Socklen(SizeofICMPv6Filter) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) +//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) + +func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { + var msg Msghdr + var rsa RawSockaddrAny + msg.Name = (*byte)(unsafe.Pointer(&rsa)) + msg.Namelen = uint32(SizeofSockaddrAny) + var iov Iovec + if len(p) > 0 { + iov.Base = (*byte)(unsafe.Pointer(&p[0])) + iov.SetLen(len(p)) + } + var dummy byte + if len(oob) > 0 { + // receive at least one normal byte + if len(p) == 0 { + iov.Base = &dummy + iov.SetLen(1) + } + msg.Control = (*byte)(unsafe.Pointer(&oob[0])) + msg.SetControllen(len(oob)) + } + msg.Iov = &iov + msg.Iovlen = 1 + if n, err = recvmsg(fd, &msg, flags); err != nil { + return + } + oobn = int(msg.Controllen) + recvflags = int(msg.Flags) + // source address is only specified if the socket is unconnected + if rsa.Addr.Family != AF_UNSPEC { + from, err = anyToSockaddr(&rsa) + } + return +} + +//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) + +func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { + _, err = SendmsgN(fd, p, oob, to, flags) + return +} + +func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) { + var ptr unsafe.Pointer + var salen _Socklen + if to != nil { + ptr, salen, err = to.sockaddr() + if err != nil { + return 0, err + } + } + var msg Msghdr + msg.Name = (*byte)(unsafe.Pointer(ptr)) + msg.Namelen = uint32(salen) + var iov Iovec + if len(p) > 0 { + iov.Base = (*byte)(unsafe.Pointer(&p[0])) + iov.SetLen(len(p)) + } + var dummy byte + if len(oob) > 0 { + // send at least one normal byte + if len(p) == 0 { + iov.Base = &dummy + iov.SetLen(1) + } + msg.Control = (*byte)(unsafe.Pointer(&oob[0])) + msg.SetControllen(len(oob)) + } + msg.Iov = &iov + msg.Iovlen = 1 + if n, err = sendmsg(fd, &msg, flags); err != nil { + return 0, err + } + if len(oob) > 0 && len(p) == 0 { + n = 0 + } + return n, nil +} + +//sys kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) + +func Kevent(kq int, changes, events []Kevent_t, timeout *Timespec) (n int, err error) { + var change, event unsafe.Pointer + if len(changes) > 0 { + change = unsafe.Pointer(&changes[0]) + } + if len(events) > 0 { + event = unsafe.Pointer(&events[0]) + } + return kevent(kq, change, len(changes), event, len(events), timeout) +} + +//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL + +// sysctlmib translates name to mib number and appends any additional args. +func sysctlmib(name string, args ...int) ([]_C_int, error) { + // Translate name to mib number. + mib, err := nametomib(name) + if err != nil { + return nil, err + } + + for _, a := range args { + mib = append(mib, _C_int(a)) + } + + return mib, nil +} + +func Sysctl(name string) (string, error) { + return SysctlArgs(name) +} + +func SysctlArgs(name string, args ...int) (string, error) { + mib, err := sysctlmib(name, args...) + if err != nil { + return "", err + } + + // Find size. + n := uintptr(0) + if err := sysctl(mib, nil, &n, nil, 0); err != nil { + return "", err + } + if n == 0 { + return "", nil + } + + // Read into buffer of that size. + buf := make([]byte, n) + if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil { + return "", err + } + + // Throw away terminating NUL. + if n > 0 && buf[n-1] == '\x00' { + n-- + } + return string(buf[0:n]), nil +} + +func SysctlUint32(name string) (uint32, error) { + return SysctlUint32Args(name) +} + +func SysctlUint32Args(name string, args ...int) (uint32, error) { + mib, err := sysctlmib(name, args...) + if err != nil { + return 0, err + } + + n := uintptr(4) + buf := make([]byte, 4) + if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil { + return 0, err + } + if n != 4 { + return 0, EIO + } + return *(*uint32)(unsafe.Pointer(&buf[0])), nil +} + +func SysctlUint64(name string, args ...int) (uint64, error) { + mib, err := sysctlmib(name, args...) + if err != nil { + return 0, err + } + + n := uintptr(8) + buf := make([]byte, 8) + if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil { + return 0, err + } + if n != 8 { + return 0, EIO + } + return *(*uint64)(unsafe.Pointer(&buf[0])), nil +} + +func SysctlRaw(name string, args ...int) ([]byte, error) { + mib, err := sysctlmib(name, args...) + if err != nil { + return nil, err + } + + // Find size. + n := uintptr(0) + if err := sysctl(mib, nil, &n, nil, 0); err != nil { + return nil, err + } + if n == 0 { + return nil, nil + } + + // Read into buffer of that size. + buf := make([]byte, n) + if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil { + return nil, err + } + + // The actual call may return less than the original reported required + // size so ensure we deal with that. + return buf[:n], nil +} + +//sys utimes(path string, timeval *[2]Timeval) (err error) + +func Utimes(path string, tv []Timeval) error { + if tv == nil { + return utimes(path, nil) + } + if len(tv) != 2 { + return EINVAL + } + return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +func UtimesNano(path string, ts []Timespec) error { + if ts == nil { + return utimes(path, nil) + } + // TODO: The BSDs can do utimensat with SYS_UTIMENSAT but it + // isn't supported by darwin so this uses utimes instead + if len(ts) != 2 { + return EINVAL + } + // Not as efficient as it could be because Timespec and + // Timeval have different types in the different OSes + tv := [2]Timeval{ + NsecToTimeval(TimespecToNsec(ts[0])), + NsecToTimeval(TimespecToNsec(ts[1])), + } + return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +//sys futimes(fd int, timeval *[2]Timeval) (err error) + +func Futimes(fd int, tv []Timeval) error { + if tv == nil { + return futimes(fd, nil) + } + if len(tv) != 2 { + return EINVAL + } + return futimes(fd, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +//sys fcntl(fd int, cmd int, arg int) (val int, err error) + +// TODO: wrap +// Acct(name nil-string) (err error) +// Gethostuuid(uuid *byte, timeout *Timespec) (err error) +// Madvise(addr *byte, len int, behav int) (err error) +// Mprotect(addr *byte, len int, prot int) (err error) +// Msync(addr *byte, len int, flags int) (err error) +// Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error) + +var mapper = &mmapper{ + active: make(map[*byte][]byte), + mmap: mmap, + munmap: munmap, +} + +func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { + return mapper.Mmap(fd, offset, length, prot, flags) +} + +func Munmap(b []byte) (err error) { + return mapper.Munmap(b) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go new file mode 100644 index 000000000..3d534d2da --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -0,0 +1,511 @@ +// Copyright 2009,2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Darwin system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and wrap +// it in our own nicer implementation, either here or in +// syscall_bsd.go or syscall_unix.go. + +package unix + +import ( + errorspkg "errors" + "syscall" + "unsafe" +) + +const ImplementsGetwd = true + +func Getwd() (string, error) { + buf := make([]byte, 2048) + attrs, err := getAttrList(".", attrList{CommonAttr: attrCmnFullpath}, buf, 0) + if err == nil && len(attrs) == 1 && len(attrs[0]) >= 2 { + wd := string(attrs[0]) + // Sanity check that it's an absolute path and ends + // in a null byte, which we then strip. + if wd[0] == '/' && wd[len(wd)-1] == 0 { + return wd[:len(wd)-1], nil + } + } + // If pkg/os/getwd.go gets ENOTSUP, it will fall back to the + // slow algorithm. + return "", ENOTSUP +} + +type SockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 + raw RawSockaddrDatalink +} + +// Translate "kern.hostname" to []_C_int{0,1,2,3}. +func nametomib(name string) (mib []_C_int, err error) { + const siz = unsafe.Sizeof(mib[0]) + + // NOTE(rsc): It seems strange to set the buffer to have + // size CTL_MAXNAME+2 but use only CTL_MAXNAME + // as the size. I don't know why the +2 is here, but the + // kernel uses +2 for its own implementation of this function. + // I am scared that if we don't include the +2 here, the kernel + // will silently write 2 words farther than we specify + // and we'll get memory corruption. + var buf [CTL_MAXNAME + 2]_C_int + n := uintptr(CTL_MAXNAME) * siz + + p := (*byte)(unsafe.Pointer(&buf[0])) + bytes, err := ByteSliceFromString(name) + if err != nil { + return nil, err + } + + // Magic sysctl: "setting" 0.3 to a string name + // lets you read back the array of integers form. + if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil { + return nil, err + } + return buf[0 : n/siz], nil +} + +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + if dirent.Reclen == 0 { + buf = nil + break + } + buf = buf[dirent.Reclen:] + if dirent.Ino == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:dirent.Namlen]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names +} + +//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error) +func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) } +func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) } + +const ( + attrBitMapCount = 5 + attrCmnFullpath = 0x08000000 +) + +type attrList struct { + bitmapCount uint16 + _ uint16 + CommonAttr uint32 + VolAttr uint32 + DirAttr uint32 + FileAttr uint32 + Forkattr uint32 +} + +func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (attrs [][]byte, err error) { + if len(attrBuf) < 4 { + return nil, errorspkg.New("attrBuf too small") + } + attrList.bitmapCount = attrBitMapCount + + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return nil, err + } + + _, _, e1 := Syscall6( + SYS_GETATTRLIST, + uintptr(unsafe.Pointer(_p0)), + uintptr(unsafe.Pointer(&attrList)), + uintptr(unsafe.Pointer(&attrBuf[0])), + uintptr(len(attrBuf)), + uintptr(options), + 0, + ) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + return nil, e1 + } + size := *(*uint32)(unsafe.Pointer(&attrBuf[0])) + + // dat is the section of attrBuf that contains valid data, + // without the 4 byte length header. All attribute offsets + // are relative to dat. + dat := attrBuf + if int(size) < len(attrBuf) { + dat = dat[:size] + } + dat = dat[4:] // remove length prefix + + for i := uint32(0); int(i) < len(dat); { + header := dat[i:] + if len(header) < 8 { + return attrs, errorspkg.New("truncated attribute header") + } + datOff := *(*int32)(unsafe.Pointer(&header[0])) + attrLen := *(*uint32)(unsafe.Pointer(&header[4])) + if datOff < 0 || uint32(datOff)+attrLen > uint32(len(dat)) { + return attrs, errorspkg.New("truncated results; attrBuf too small") + } + end := uint32(datOff) + attrLen + attrs = append(attrs, dat[datOff:end]) + i = end + if r := i % 4; r != 0 { + i += (4 - r) + } + } + return +} + +//sysnb pipe() (r int, w int, err error) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + p[0], p[1], err = pipe() + return +} + +func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { + var _p0 unsafe.Pointer + var bufsize uintptr + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf)) + } + r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(_p0), bufsize, uintptr(flags)) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +/* + * Wrapped + */ + +//sys kill(pid int, signum int, posix int) (err error) + +func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) } + +/* + * Exposed directly + */ +//sys Access(path string, mode uint32) (err error) +//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) +//sys Chdir(path string) (err error) +//sys Chflags(path string, flags int) (err error) +//sys Chmod(path string, mode uint32) (err error) +//sys Chown(path string, uid int, gid int) (err error) +//sys Chroot(path string) (err error) +//sys Close(fd int) (err error) +//sys Dup(fd int) (nfd int, err error) +//sys Dup2(from int, to int) (err error) +//sys Exchangedata(path1 string, path2 string, options int) (err error) +//sys Exit(code int) +//sys Fchdir(fd int) (err error) +//sys Fchflags(fd int, flags int) (err error) +//sys Fchmod(fd int, mode uint32) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Flock(fd int, how int) (err error) +//sys Fpathconf(fd int, name int) (val int, err error) +//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 +//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64 +//sys Fsync(fd int) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64 +//sys Getdtablesize() (size int) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (uid int) +//sysnb Getgid() (gid int) +//sysnb Getpgid(pid int) (pgid int, err error) +//sysnb Getpgrp() (pgrp int) +//sysnb Getpid() (pid int) +//sysnb Getppid() (ppid int) +//sys Getpriority(which int, who int) (prio int, err error) +//sysnb Getrlimit(which int, lim *Rlimit) (err error) +//sysnb Getrusage(who int, rusage *Rusage) (err error) +//sysnb Getsid(pid int) (sid int, err error) +//sysnb Getuid() (uid int) +//sysnb Issetugid() (tainted bool) +//sys Kqueue() (fd int, err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Link(path string, link string) (err error) +//sys Listen(s int, backlog int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 +//sys Mkdir(path string, mode uint32) (err error) +//sys Mkfifo(path string, mode uint32) (err error) +//sys Mknod(path string, mode uint32, dev int) (err error) +//sys Mlock(b []byte) (err error) +//sys Mlockall(flags int) (err error) +//sys Mprotect(b []byte, prot int) (err error) +//sys Munlock(b []byte) (err error) +//sys Munlockall() (err error) +//sys Open(path string, mode int, perm uint32) (fd int, err error) +//sys Pathconf(path string, name int) (val int, err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) +//sys read(fd int, p []byte) (n int, err error) +//sys Readlink(path string, buf []byte) (n int, err error) +//sys Rename(from string, to string) (err error) +//sys Revoke(path string) (err error) +//sys Rmdir(path string) (err error) +//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK +//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) +//sys Setegid(egid int) (err error) +//sysnb Seteuid(euid int) (err error) +//sysnb Setgid(gid int) (err error) +//sys Setlogin(name string) (err error) +//sysnb Setpgid(pid int, pgid int) (err error) +//sys Setpriority(which int, who int, prio int) (err error) +//sys Setprivexec(flag int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sysnb Setrlimit(which int, lim *Rlimit) (err error) +//sysnb Setsid() (pid int, err error) +//sysnb Settimeofday(tp *Timeval) (err error) +//sysnb Setuid(uid int) (err error) +//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 +//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64 +//sys Symlink(path string, link string) (err error) +//sys Sync() (err error) +//sys Truncate(path string, length int64) (err error) +//sys Umask(newmask int) (oldmask int) +//sys Undelete(path string) (err error) +//sys Unlink(path string) (err error) +//sys Unmount(path string, flags int) (err error) +//sys write(fd int, p []byte) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) +//sys munmap(addr uintptr, length uintptr) (err error) +//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ +//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE + +/* + * Unimplemented + */ +// Profil +// Sigaction +// Sigprocmask +// Getlogin +// Sigpending +// Sigaltstack +// Ioctl +// Reboot +// Execve +// Vfork +// Sbrk +// Sstk +// Ovadvise +// Mincore +// Setitimer +// Swapon +// Select +// Sigsuspend +// Readv +// Writev +// Nfssvc +// Getfh +// Quotactl +// Mount +// Csops +// Waitid +// Add_profil +// Kdebug_trace +// Sigreturn +// Mmap +// Mlock +// Munlock +// Atsocket +// Kqueue_from_portset_np +// Kqueue_portset +// Getattrlist +// Setattrlist +// Getdirentriesattr +// Searchfs +// Delete +// Copyfile +// Poll +// Watchevent +// Waitevent +// Modwatch +// Getxattr +// Fgetxattr +// Setxattr +// Fsetxattr +// Removexattr +// Fremovexattr +// Listxattr +// Flistxattr +// Fsctl +// Initgroups +// Posix_spawn +// Nfsclnt +// Fhopen +// Minherit +// Semsys +// Msgsys +// Shmsys +// Semctl +// Semget +// Semop +// Msgctl +// Msgget +// Msgsnd +// Msgrcv +// Shmat +// Shmctl +// Shmdt +// Shmget +// Shm_open +// Shm_unlink +// Sem_open +// Sem_close +// Sem_unlink +// Sem_wait +// Sem_trywait +// Sem_post +// Sem_getvalue +// Sem_init +// Sem_destroy +// Open_extended +// Umask_extended +// Stat_extended +// Lstat_extended +// Fstat_extended +// Chmod_extended +// Fchmod_extended +// Access_extended +// Settid +// Gettid +// Setsgroups +// Getsgroups +// Setwgroups +// Getwgroups +// Mkfifo_extended +// Mkdir_extended +// Identitysvc +// Shared_region_check_np +// Shared_region_map_np +// __pthread_mutex_destroy +// __pthread_mutex_init +// __pthread_mutex_lock +// __pthread_mutex_trylock +// __pthread_mutex_unlock +// __pthread_cond_init +// __pthread_cond_destroy +// __pthread_cond_broadcast +// __pthread_cond_signal +// Setsid_with_pid +// __pthread_cond_timedwait +// Aio_fsync +// Aio_return +// Aio_suspend +// Aio_cancel +// Aio_error +// Aio_read +// Aio_write +// Lio_listio +// __pthread_cond_wait +// Iopolicysys +// Mlockall +// Munlockall +// __pthread_kill +// __pthread_sigmask +// __sigwait +// __disable_threadsignal +// __pthread_markcancel +// __pthread_canceled +// __semwait_signal +// Proc_info +// sendfile +// Stat64_extended +// Lstat64_extended +// Fstat64_extended +// __pthread_chdir +// __pthread_fchdir +// Audit +// Auditon +// Getauid +// Setauid +// Getaudit +// Setaudit +// Getaudit_addr +// Setaudit_addr +// Auditctl +// Bsdthread_create +// Bsdthread_terminate +// Stack_snapshot +// Bsdthread_register +// Workq_open +// Workq_ops +// __mac_execve +// __mac_syscall +// __mac_get_file +// __mac_set_file +// __mac_get_link +// __mac_set_link +// __mac_get_proc +// __mac_set_proc +// __mac_get_fd +// __mac_set_fd +// __mac_get_pid +// __mac_get_lcid +// __mac_get_lctx +// __mac_set_lctx +// Setlcid +// Read_nocancel +// Write_nocancel +// Open_nocancel +// Close_nocancel +// Wait4_nocancel +// Recvmsg_nocancel +// Sendmsg_nocancel +// Recvfrom_nocancel +// Accept_nocancel +// Msync_nocancel +// Fcntl_nocancel +// Select_nocancel +// Fsync_nocancel +// Connect_nocancel +// Sigsuspend_nocancel +// Readv_nocancel +// Writev_nocancel +// Sendto_nocancel +// Pread_nocancel +// Pwrite_nocancel +// Waitid_nocancel +// Poll_nocancel +// Msgsnd_nocancel +// Msgrcv_nocancel +// Sem_wait_nocancel +// Aio_suspend_nocancel +// __sigwait_nocancel +// __semwait_signal_nocancel +// __mac_mount +// __mac_get_mount +// __mac_getfsstat diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go new file mode 100644 index 000000000..c172a3da5 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go @@ -0,0 +1,77 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build 386,darwin + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int32(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int32(nsec / 1e9) + return +} + +//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error) +func Gettimeofday(tv *Timeval) (err error) { + // The tv passed to gettimeofday must be non-nil + // but is otherwise unused. The answers come back + // in the two registers. + sec, usec, err := gettimeofday(tv) + tv.Sec = int32(sec) + tv.Usec = int32(usec) + return err +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var length = uint64(count) + + _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0) + + written = int(length) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) + +// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions +// of darwin/386 the syscall is called sysctl instead of __sysctl. +const SYS___SYSCTL = SYS_SYSCTL diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go new file mode 100644 index 000000000..fc1e5a4a8 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go @@ -0,0 +1,79 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,darwin + +package unix + +import ( + "syscall" + "unsafe" +) + +//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int64(nsec / 1e9) + return +} + +//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error) +func Gettimeofday(tv *Timeval) (err error) { + // The tv passed to gettimeofday must be non-nil + // but is otherwise unused. The answers come back + // in the two registers. + sec, usec, err := gettimeofday(tv) + tv.Sec = sec + tv.Usec = usec + return err +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint64(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var length = uint64(count) + + _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0) + + written = int(length) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) + +// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions +// of darwin/amd64 the syscall is called sysctl instead of __sysctl. +const SYS___SYSCTL = SYS_SYSCTL diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go new file mode 100644 index 000000000..d286cf408 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go @@ -0,0 +1,71 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int32(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int32(nsec / 1e9) + return +} + +//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error) +func Gettimeofday(tv *Timeval) (err error) { + // The tv passed to gettimeofday must be non-nil + // but is otherwise unused. The answers come back + // in the two registers. + sec, usec, err := gettimeofday(tv) + tv.Sec = int32(sec) + tv.Usec = int32(usec) + return err +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var length = uint64(count) + + _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0) + + written = int(length) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go new file mode 100644 index 000000000..c33905cdc --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go @@ -0,0 +1,77 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm64,darwin + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 16384 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int64(nsec / 1e9) + return +} + +//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error) +func Gettimeofday(tv *Timeval) (err error) { + // The tv passed to gettimeofday must be non-nil + // but is otherwise unused. The answers come back + // in the two registers. + sec, usec, err := gettimeofday(tv) + tv.Sec = sec + tv.Usec = usec + return err +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint64(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var length = uint64(count) + + _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0) + + written = int(length) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic + +// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions +// of darwin/arm64 the syscall is called sysctl instead of __sysctl. +const SYS___SYSCTL = SYS_SYSCTL diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go new file mode 100644 index 000000000..ec408ee78 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go @@ -0,0 +1,412 @@ +// Copyright 2009,2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// FreeBSD system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and wrap +// it in our own nicer implementation, either here or in +// syscall_bsd.go or syscall_unix.go. + +package unix + +import "unsafe" + +type SockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 + Rcf uint16 + Route [16]uint16 + raw RawSockaddrDatalink +} + +// Translate "kern.hostname" to []_C_int{0,1,2,3}. +func nametomib(name string) (mib []_C_int, err error) { + const siz = unsafe.Sizeof(mib[0]) + + // NOTE(rsc): It seems strange to set the buffer to have + // size CTL_MAXNAME+2 but use only CTL_MAXNAME + // as the size. I don't know why the +2 is here, but the + // kernel uses +2 for its own implementation of this function. + // I am scared that if we don't include the +2 here, the kernel + // will silently write 2 words farther than we specify + // and we'll get memory corruption. + var buf [CTL_MAXNAME + 2]_C_int + n := uintptr(CTL_MAXNAME) * siz + + p := (*byte)(unsafe.Pointer(&buf[0])) + bytes, err := ByteSliceFromString(name) + if err != nil { + return nil, err + } + + // Magic sysctl: "setting" 0.3 to a string name + // lets you read back the array of integers form. + if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil { + return nil, err + } + return buf[0 : n/siz], nil +} + +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + reclen := int(16+dirent.Namlen+1+7) & ^7 + buf = buf[reclen:] + if dirent.Fileno == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:dirent.Namlen]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names +} + +//sysnb pipe() (r int, w int, err error) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + p[0], p[1], err = pipe() + return +} + +//sys extpread(fd int, p []byte, flags int, offset int64) (n int, err error) +func Pread(fd int, p []byte, offset int64) (n int, err error) { + return extpread(fd, p, 0, offset) +} + +//sys extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + return extpwrite(fd, p, 0, offset) +} + +func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { + var _p0 unsafe.Pointer + var bufsize uintptr + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf)) + } + r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags)) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +/* + * Exposed directly + */ +//sys Access(path string, mode uint32) (err error) +//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) +//sys Chdir(path string) (err error) +//sys Chflags(path string, flags int) (err error) +//sys Chmod(path string, mode uint32) (err error) +//sys Chown(path string, uid int, gid int) (err error) +//sys Chroot(path string) (err error) +//sys Close(fd int) (err error) +//sys Dup(fd int) (nfd int, err error) +//sys Dup2(from int, to int) (err error) +//sys Exit(code int) +//sys Fchdir(fd int) (err error) +//sys Fchflags(fd int, flags int) (err error) +//sys Fchmod(fd int, mode uint32) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Flock(fd int, how int) (err error) +//sys Fpathconf(fd int, name int) (val int, err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatfs(fd int, stat *Statfs_t) (err error) +//sys Fsync(fd int) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) +//sys Getdtablesize() (size int) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (uid int) +//sysnb Getgid() (gid int) +//sysnb Getpgid(pid int) (pgid int, err error) +//sysnb Getpgrp() (pgrp int) +//sysnb Getpid() (pid int) +//sysnb Getppid() (ppid int) +//sys Getpriority(which int, who int) (prio int, err error) +//sysnb Getrlimit(which int, lim *Rlimit) (err error) +//sysnb Getrusage(who int, rusage *Rusage) (err error) +//sysnb Getsid(pid int) (sid int, err error) +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Getuid() (uid int) +//sys Issetugid() (tainted bool) +//sys Kill(pid int, signum syscall.Signal) (err error) +//sys Kqueue() (fd int, err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Link(path string, link string) (err error) +//sys Listen(s int, backlog int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) +//sys Mkdir(path string, mode uint32) (err error) +//sys Mkfifo(path string, mode uint32) (err error) +//sys Mknod(path string, mode uint32, dev int) (err error) +//sys Mlock(b []byte) (err error) +//sys Mlockall(flags int) (err error) +//sys Mprotect(b []byte, prot int) (err error) +//sys Munlock(b []byte) (err error) +//sys Munlockall() (err error) +//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) +//sys Open(path string, mode int, perm uint32) (fd int, err error) +//sys Pathconf(path string, name int) (val int, err error) +//sys read(fd int, p []byte) (n int, err error) +//sys Readlink(path string, buf []byte) (n int, err error) +//sys Rename(from string, to string) (err error) +//sys Revoke(path string) (err error) +//sys Rmdir(path string) (err error) +//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK +//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) +//sysnb Setegid(egid int) (err error) +//sysnb Seteuid(euid int) (err error) +//sysnb Setgid(gid int) (err error) +//sys Setlogin(name string) (err error) +//sysnb Setpgid(pid int, pgid int) (err error) +//sys Setpriority(which int, who int, prio int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) +//sysnb Setresuid(ruid int, euid int, suid int) (err error) +//sysnb Setrlimit(which int, lim *Rlimit) (err error) +//sysnb Setsid() (pid int, err error) +//sysnb Settimeofday(tp *Timeval) (err error) +//sysnb Setuid(uid int) (err error) +//sys Stat(path string, stat *Stat_t) (err error) +//sys Statfs(path string, stat *Statfs_t) (err error) +//sys Symlink(path string, link string) (err error) +//sys Sync() (err error) +//sys Truncate(path string, length int64) (err error) +//sys Umask(newmask int) (oldmask int) +//sys Undelete(path string) (err error) +//sys Unlink(path string) (err error) +//sys Unmount(path string, flags int) (err error) +//sys write(fd int, p []byte) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) +//sys munmap(addr uintptr, length uintptr) (err error) +//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ +//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE + +/* + * Unimplemented + * TODO(jsing): Update this list for DragonFly. + */ +// Profil +// Sigaction +// Sigprocmask +// Getlogin +// Sigpending +// Sigaltstack +// Ioctl +// Reboot +// Execve +// Vfork +// Sbrk +// Sstk +// Ovadvise +// Mincore +// Setitimer +// Swapon +// Select +// Sigsuspend +// Readv +// Writev +// Nfssvc +// Getfh +// Quotactl +// Mount +// Csops +// Waitid +// Add_profil +// Kdebug_trace +// Sigreturn +// Mmap +// Atsocket +// Kqueue_from_portset_np +// Kqueue_portset +// Getattrlist +// Setattrlist +// Getdirentriesattr +// Searchfs +// Delete +// Copyfile +// Poll +// Watchevent +// Waitevent +// Modwatch +// Getxattr +// Fgetxattr +// Setxattr +// Fsetxattr +// Removexattr +// Fremovexattr +// Listxattr +// Flistxattr +// Fsctl +// Initgroups +// Posix_spawn +// Nfsclnt +// Fhopen +// Minherit +// Semsys +// Msgsys +// Shmsys +// Semctl +// Semget +// Semop +// Msgctl +// Msgget +// Msgsnd +// Msgrcv +// Shmat +// Shmctl +// Shmdt +// Shmget +// Shm_open +// Shm_unlink +// Sem_open +// Sem_close +// Sem_unlink +// Sem_wait +// Sem_trywait +// Sem_post +// Sem_getvalue +// Sem_init +// Sem_destroy +// Open_extended +// Umask_extended +// Stat_extended +// Lstat_extended +// Fstat_extended +// Chmod_extended +// Fchmod_extended +// Access_extended +// Settid +// Gettid +// Setsgroups +// Getsgroups +// Setwgroups +// Getwgroups +// Mkfifo_extended +// Mkdir_extended +// Identitysvc +// Shared_region_check_np +// Shared_region_map_np +// __pthread_mutex_destroy +// __pthread_mutex_init +// __pthread_mutex_lock +// __pthread_mutex_trylock +// __pthread_mutex_unlock +// __pthread_cond_init +// __pthread_cond_destroy +// __pthread_cond_broadcast +// __pthread_cond_signal +// Setsid_with_pid +// __pthread_cond_timedwait +// Aio_fsync +// Aio_return +// Aio_suspend +// Aio_cancel +// Aio_error +// Aio_read +// Aio_write +// Lio_listio +// __pthread_cond_wait +// Iopolicysys +// __pthread_kill +// __pthread_sigmask +// __sigwait +// __disable_threadsignal +// __pthread_markcancel +// __pthread_canceled +// __semwait_signal +// Proc_info +// Stat64_extended +// Lstat64_extended +// Fstat64_extended +// __pthread_chdir +// __pthread_fchdir +// Audit +// Auditon +// Getauid +// Setauid +// Getaudit +// Setaudit +// Getaudit_addr +// Setaudit_addr +// Auditctl +// Bsdthread_create +// Bsdthread_terminate +// Stack_snapshot +// Bsdthread_register +// Workq_open +// Workq_ops +// __mac_execve +// __mac_syscall +// __mac_get_file +// __mac_set_file +// __mac_get_link +// __mac_set_link +// __mac_get_proc +// __mac_set_proc +// __mac_get_fd +// __mac_set_fd +// __mac_get_pid +// __mac_get_lcid +// __mac_get_lctx +// __mac_set_lctx +// Setlcid +// Read_nocancel +// Write_nocancel +// Open_nocancel +// Close_nocancel +// Wait4_nocancel +// Recvmsg_nocancel +// Sendmsg_nocancel +// Recvfrom_nocancel +// Accept_nocancel +// Msync_nocancel +// Fcntl_nocancel +// Select_nocancel +// Fsync_nocancel +// Connect_nocancel +// Sigsuspend_nocancel +// Readv_nocancel +// Writev_nocancel +// Sendto_nocancel +// Pread_nocancel +// Pwrite_nocancel +// Waitid_nocancel +// Poll_nocancel +// Msgsnd_nocancel +// Msgrcv_nocancel +// Sem_wait_nocancel +// Aio_suspend_nocancel +// __sigwait_nocancel +// __semwait_signal_nocancel +// __mac_mount +// __mac_get_mount +// __mac_getfsstat diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go new file mode 100644 index 000000000..da7cb7982 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go @@ -0,0 +1,61 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,dragonfly + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = nsec % 1e9 / 1e3 + tv.Sec = int64(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint64(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var writtenOut uint64 = 0 + _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) + + written = int(writtenOut) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go new file mode 100644 index 000000000..520ccbeaf --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go @@ -0,0 +1,683 @@ +// Copyright 2009,2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// FreeBSD system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and wrap +// it in our own nicer implementation, either here or in +// syscall_bsd.go or syscall_unix.go. + +package unix + +import "unsafe" + +type SockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [46]int8 + raw RawSockaddrDatalink +} + +// Translate "kern.hostname" to []_C_int{0,1,2,3}. +func nametomib(name string) (mib []_C_int, err error) { + const siz = unsafe.Sizeof(mib[0]) + + // NOTE(rsc): It seems strange to set the buffer to have + // size CTL_MAXNAME+2 but use only CTL_MAXNAME + // as the size. I don't know why the +2 is here, but the + // kernel uses +2 for its own implementation of this function. + // I am scared that if we don't include the +2 here, the kernel + // will silently write 2 words farther than we specify + // and we'll get memory corruption. + var buf [CTL_MAXNAME + 2]_C_int + n := uintptr(CTL_MAXNAME) * siz + + p := (*byte)(unsafe.Pointer(&buf[0])) + bytes, err := ByteSliceFromString(name) + if err != nil { + return nil, err + } + + // Magic sysctl: "setting" 0.3 to a string name + // lets you read back the array of integers form. + if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil { + return nil, err + } + return buf[0 : n/siz], nil +} + +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + if dirent.Reclen == 0 { + buf = nil + break + } + buf = buf[dirent.Reclen:] + if dirent.Fileno == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:dirent.Namlen]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names +} + +//sysnb pipe() (r int, w int, err error) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + p[0], p[1], err = pipe() + return +} + +func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) { + var value IPMreqn + vallen := _Socklen(SizeofIPMreqn) + errno := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, errno +} + +func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq)) +} + +func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + nfd, err = accept4(fd, &rsa, &len, flags) + if err != nil { + return + } + if len > SizeofSockaddrAny { + panic("RawSockaddrAny too small") + } + sa, err = anyToSockaddr(&rsa) + if err != nil { + Close(nfd) + nfd = 0 + } + return +} + +func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { + var _p0 unsafe.Pointer + var bufsize uintptr + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf)) + } + r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags)) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +// Derive extattr namespace and attribute name + +func xattrnamespace(fullattr string) (ns int, attr string, err error) { + s := -1 + for idx, val := range fullattr { + if val == '.' { + s = idx + break + } + } + + if s == -1 { + return -1, "", ENOATTR + } + + namespace := fullattr[0:s] + attr = fullattr[s+1:] + + switch namespace { + case "user": + return EXTATTR_NAMESPACE_USER, attr, nil + case "system": + return EXTATTR_NAMESPACE_SYSTEM, attr, nil + default: + return -1, "", ENOATTR + } +} + +func initxattrdest(dest []byte, idx int) (d unsafe.Pointer) { + if len(dest) > idx { + return unsafe.Pointer(&dest[idx]) + } else { + return unsafe.Pointer(_zero) + } +} + +// FreeBSD implements its own syscalls to handle extended attributes + +func Getxattr(file string, attr string, dest []byte) (sz int, err error) { + d := initxattrdest(dest, 0) + destsize := len(dest) + + nsid, a, err := xattrnamespace(attr) + if err != nil { + return -1, err + } + + return ExtattrGetFile(file, nsid, a, uintptr(d), destsize) +} + +func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { + d := initxattrdest(dest, 0) + destsize := len(dest) + + nsid, a, err := xattrnamespace(attr) + if err != nil { + return -1, err + } + + return ExtattrGetFd(fd, nsid, a, uintptr(d), destsize) +} + +func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) { + d := initxattrdest(dest, 0) + destsize := len(dest) + + nsid, a, err := xattrnamespace(attr) + if err != nil { + return -1, err + } + + return ExtattrGetLink(link, nsid, a, uintptr(d), destsize) +} + +// flags are unused on FreeBSD + +func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) { + d := unsafe.Pointer(&data[0]) + datasiz := len(data) + + nsid, a, err := xattrnamespace(attr) + if err != nil { + return + } + + _, err = ExtattrSetFd(fd, nsid, a, uintptr(d), datasiz) + return +} + +func Setxattr(file string, attr string, data []byte, flags int) (err error) { + d := unsafe.Pointer(&data[0]) + datasiz := len(data) + + nsid, a, err := xattrnamespace(attr) + if err != nil { + return + } + + _, err = ExtattrSetFile(file, nsid, a, uintptr(d), datasiz) + return +} + +func Lsetxattr(link string, attr string, data []byte, flags int) (err error) { + d := unsafe.Pointer(&data[0]) + datasiz := len(data) + + nsid, a, err := xattrnamespace(attr) + if err != nil { + return + } + + _, err = ExtattrSetLink(link, nsid, a, uintptr(d), datasiz) + return +} + +func Removexattr(file string, attr string) (err error) { + nsid, a, err := xattrnamespace(attr) + if err != nil { + return + } + + err = ExtattrDeleteFile(file, nsid, a) + return +} + +func Fremovexattr(fd int, attr string) (err error) { + nsid, a, err := xattrnamespace(attr) + if err != nil { + return + } + + err = ExtattrDeleteFd(fd, nsid, a) + return +} + +func Lremovexattr(link string, attr string) (err error) { + nsid, a, err := xattrnamespace(attr) + if err != nil { + return + } + + err = ExtattrDeleteLink(link, nsid, a) + return +} + +func Listxattr(file string, dest []byte) (sz int, err error) { + d := initxattrdest(dest, 0) + destsiz := len(dest) + + // FreeBSD won't allow you to list xattrs from multiple namespaces + s := 0 + var e error + for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { + stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz) + + /* Errors accessing system attrs are ignored so that + * we can implement the Linux-like behavior of omitting errors that + * we don't have read permissions on + * + * Linux will still error if we ask for user attributes on a file that + * we don't have read permissions on, so don't ignore those errors + */ + if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { + e = nil + continue + } else if e != nil { + return s, e + } + + s += stmp + destsiz -= s + if destsiz < 0 { + destsiz = 0 + } + d = initxattrdest(dest, s) + } + + return s, e +} + +func Flistxattr(fd int, dest []byte) (sz int, err error) { + d := initxattrdest(dest, 0) + destsiz := len(dest) + + s := 0 + var e error + for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { + stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz) + if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { + e = nil + continue + } else if e != nil { + return s, e + } + + s += stmp + destsiz -= s + if destsiz < 0 { + destsiz = 0 + } + d = initxattrdest(dest, s) + } + + return s, e +} + +func Llistxattr(link string, dest []byte) (sz int, err error) { + d := initxattrdest(dest, 0) + destsiz := len(dest) + + s := 0 + var e error + for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} { + stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz) + if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER { + e = nil + continue + } else if e != nil { + return s, e + } + + s += stmp + destsiz -= s + if destsiz < 0 { + destsiz = 0 + } + d = initxattrdest(dest, s) + } + + return s, e +} + +/* + * Exposed directly + */ +//sys Access(path string, mode uint32) (err error) +//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) +//sys Chdir(path string) (err error) +//sys Chflags(path string, flags int) (err error) +//sys Chmod(path string, mode uint32) (err error) +//sys Chown(path string, uid int, gid int) (err error) +//sys Chroot(path string) (err error) +//sys Close(fd int) (err error) +//sys Dup(fd int) (nfd int, err error) +//sys Dup2(from int, to int) (err error) +//sys Exit(code int) +//sys ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) +//sys ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) +//sys ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) +//sys ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) +//sys ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) +//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE +//sys Fchdir(fd int) (err error) +//sys Fchflags(fd int, flags int) (err error) +//sys Fchmod(fd int, mode uint32) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Flock(fd int, how int) (err error) +//sys Fpathconf(fd int, name int) (val int, err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatfs(fd int, stat *Statfs_t) (err error) +//sys Fsync(fd int) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) +//sys Getdtablesize() (size int) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (uid int) +//sysnb Getgid() (gid int) +//sysnb Getpgid(pid int) (pgid int, err error) +//sysnb Getpgrp() (pgrp int) +//sysnb Getpid() (pid int) +//sysnb Getppid() (ppid int) +//sys Getpriority(which int, who int) (prio int, err error) +//sysnb Getrlimit(which int, lim *Rlimit) (err error) +//sysnb Getrusage(who int, rusage *Rusage) (err error) +//sysnb Getsid(pid int) (sid int, err error) +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Getuid() (uid int) +//sys Issetugid() (tainted bool) +//sys Kill(pid int, signum syscall.Signal) (err error) +//sys Kqueue() (fd int, err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Link(path string, link string) (err error) +//sys Listen(s int, backlog int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) +//sys Mkdir(path string, mode uint32) (err error) +//sys Mkfifo(path string, mode uint32) (err error) +//sys Mknod(path string, mode uint32, dev int) (err error) +//sys Mlock(b []byte) (err error) +//sys Mlockall(flags int) (err error) +//sys Mprotect(b []byte, prot int) (err error) +//sys Munlock(b []byte) (err error) +//sys Munlockall() (err error) +//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) +//sys Open(path string, mode int, perm uint32) (fd int, err error) +//sys Pathconf(path string, name int) (val int, err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) +//sys read(fd int, p []byte) (n int, err error) +//sys Readlink(path string, buf []byte) (n int, err error) +//sys Rename(from string, to string) (err error) +//sys Revoke(path string) (err error) +//sys Rmdir(path string) (err error) +//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK +//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) +//sysnb Setegid(egid int) (err error) +//sysnb Seteuid(euid int) (err error) +//sysnb Setgid(gid int) (err error) +//sys Setlogin(name string) (err error) +//sysnb Setpgid(pid int, pgid int) (err error) +//sys Setpriority(which int, who int, prio int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) +//sysnb Setresuid(ruid int, euid int, suid int) (err error) +//sysnb Setrlimit(which int, lim *Rlimit) (err error) +//sysnb Setsid() (pid int, err error) +//sysnb Settimeofday(tp *Timeval) (err error) +//sysnb Setuid(uid int) (err error) +//sys Stat(path string, stat *Stat_t) (err error) +//sys Statfs(path string, stat *Statfs_t) (err error) +//sys Symlink(path string, link string) (err error) +//sys Sync() (err error) +//sys Truncate(path string, length int64) (err error) +//sys Umask(newmask int) (oldmask int) +//sys Undelete(path string) (err error) +//sys Unlink(path string) (err error) +//sys Unmount(path string, flags int) (err error) +//sys write(fd int, p []byte) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) +//sys munmap(addr uintptr, length uintptr) (err error) +//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ +//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE +//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) + +/* + * Unimplemented + */ +// Profil +// Sigaction +// Sigprocmask +// Getlogin +// Sigpending +// Sigaltstack +// Ioctl +// Reboot +// Execve +// Vfork +// Sbrk +// Sstk +// Ovadvise +// Mincore +// Setitimer +// Swapon +// Select +// Sigsuspend +// Readv +// Writev +// Nfssvc +// Getfh +// Quotactl +// Mount +// Csops +// Waitid +// Add_profil +// Kdebug_trace +// Sigreturn +// Mmap +// Mlock +// Munlock +// Atsocket +// Kqueue_from_portset_np +// Kqueue_portset +// Getattrlist +// Setattrlist +// Getdirentriesattr +// Searchfs +// Delete +// Copyfile +// Poll +// Watchevent +// Waitevent +// Modwatch +// Getxattr +// Fgetxattr +// Setxattr +// Fsetxattr +// Removexattr +// Fremovexattr +// Listxattr +// Flistxattr +// Fsctl +// Initgroups +// Posix_spawn +// Nfsclnt +// Fhopen +// Minherit +// Semsys +// Msgsys +// Shmsys +// Semctl +// Semget +// Semop +// Msgctl +// Msgget +// Msgsnd +// Msgrcv +// Shmat +// Shmctl +// Shmdt +// Shmget +// Shm_open +// Shm_unlink +// Sem_open +// Sem_close +// Sem_unlink +// Sem_wait +// Sem_trywait +// Sem_post +// Sem_getvalue +// Sem_init +// Sem_destroy +// Open_extended +// Umask_extended +// Stat_extended +// Lstat_extended +// Fstat_extended +// Chmod_extended +// Fchmod_extended +// Access_extended +// Settid +// Gettid +// Setsgroups +// Getsgroups +// Setwgroups +// Getwgroups +// Mkfifo_extended +// Mkdir_extended +// Identitysvc +// Shared_region_check_np +// Shared_region_map_np +// __pthread_mutex_destroy +// __pthread_mutex_init +// __pthread_mutex_lock +// __pthread_mutex_trylock +// __pthread_mutex_unlock +// __pthread_cond_init +// __pthread_cond_destroy +// __pthread_cond_broadcast +// __pthread_cond_signal +// Setsid_with_pid +// __pthread_cond_timedwait +// Aio_fsync +// Aio_return +// Aio_suspend +// Aio_cancel +// Aio_error +// Aio_read +// Aio_write +// Lio_listio +// __pthread_cond_wait +// Iopolicysys +// Mlockall +// Munlockall +// __pthread_kill +// __pthread_sigmask +// __sigwait +// __disable_threadsignal +// __pthread_markcancel +// __pthread_canceled +// __semwait_signal +// Proc_info +// Stat64_extended +// Lstat64_extended +// Fstat64_extended +// __pthread_chdir +// __pthread_fchdir +// Audit +// Auditon +// Getauid +// Setauid +// Getaudit +// Setaudit +// Getaudit_addr +// Setaudit_addr +// Auditctl +// Bsdthread_create +// Bsdthread_terminate +// Stack_snapshot +// Bsdthread_register +// Workq_open +// Workq_ops +// __mac_execve +// __mac_syscall +// __mac_get_file +// __mac_set_file +// __mac_get_link +// __mac_set_link +// __mac_get_proc +// __mac_set_proc +// __mac_get_fd +// __mac_set_fd +// __mac_get_pid +// __mac_get_lcid +// __mac_get_lctx +// __mac_set_lctx +// Setlcid +// Read_nocancel +// Write_nocancel +// Open_nocancel +// Close_nocancel +// Wait4_nocancel +// Recvmsg_nocancel +// Sendmsg_nocancel +// Recvfrom_nocancel +// Accept_nocancel +// Msync_nocancel +// Fcntl_nocancel +// Select_nocancel +// Fsync_nocancel +// Connect_nocancel +// Sigsuspend_nocancel +// Readv_nocancel +// Writev_nocancel +// Sendto_nocancel +// Pread_nocancel +// Pwrite_nocancel +// Waitid_nocancel +// Poll_nocancel +// Msgsnd_nocancel +// Msgrcv_nocancel +// Sem_wait_nocancel +// Aio_suspend_nocancel +// __sigwait_nocancel +// __semwait_signal_nocancel +// __mac_mount +// __mac_get_mount +// __mac_getfsstat diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go new file mode 100644 index 000000000..6a0cd804d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go @@ -0,0 +1,61 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build 386,freebsd + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int32(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int32(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var writtenOut uint64 = 0 + _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0) + + written = int(writtenOut) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go new file mode 100644 index 000000000..e142540ef --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go @@ -0,0 +1,61 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,freebsd + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = nsec % 1e9 / 1e3 + tv.Sec = int64(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint64(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var writtenOut uint64 = 0 + _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0) + + written = int(writtenOut) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go new file mode 100644 index 000000000..5504cb125 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go @@ -0,0 +1,61 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm,freebsd + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return ts.Sec*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = int32(nsec % 1e9) + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = nsec / 1e9 + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + var writtenOut uint64 = 0 + _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0) + + written = int(writtenOut) + + if e1 != 0 { + err = e1 + } + return +} + +func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go new file mode 100644 index 000000000..6d10c9cff --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -0,0 +1,1115 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Linux system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and +// wrap it in our own nicer implementation. + +package unix + +import ( + "syscall" + "unsafe" +) + +/* + * Wrapped + */ + +func Access(path string, mode uint32) (err error) { + return Faccessat(AT_FDCWD, path, mode, 0) +} + +func Chmod(path string, mode uint32) (err error) { + return Fchmodat(AT_FDCWD, path, mode, 0) +} + +func Chown(path string, uid int, gid int) (err error) { + return Fchownat(AT_FDCWD, path, uid, gid, 0) +} + +func Creat(path string, mode uint32) (fd int, err error) { + return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode) +} + +//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) + +func Link(oldpath string, newpath string) (err error) { + return Linkat(AT_FDCWD, oldpath, AT_FDCWD, newpath, 0) +} + +func Mkdir(path string, mode uint32) (err error) { + return Mkdirat(AT_FDCWD, path, mode) +} + +func Mknod(path string, mode uint32, dev int) (err error) { + return Mknodat(AT_FDCWD, path, mode, dev) +} + +func Open(path string, mode int, perm uint32) (fd int, err error) { + return openat(AT_FDCWD, path, mode|O_LARGEFILE, perm) +} + +//sys openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) + +func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + return openat(dirfd, path, flags|O_LARGEFILE, mode) +} + +//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) + +func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + if len(fds) == 0 { + return ppoll(nil, 0, timeout, sigmask) + } + return ppoll(&fds[0], len(fds), timeout, sigmask) +} + +//sys readlinkat(dirfd int, path string, buf []byte) (n int, err error) + +func Readlink(path string, buf []byte) (n int, err error) { + return readlinkat(AT_FDCWD, path, buf) +} + +func Rename(oldpath string, newpath string) (err error) { + return Renameat(AT_FDCWD, oldpath, AT_FDCWD, newpath) +} + +func Rmdir(path string) error { + return unlinkat(AT_FDCWD, path, AT_REMOVEDIR) +} + +//sys symlinkat(oldpath string, newdirfd int, newpath string) (err error) + +func Symlink(oldpath string, newpath string) (err error) { + return symlinkat(oldpath, AT_FDCWD, newpath) +} + +func Unlink(path string) error { + return unlinkat(AT_FDCWD, path, 0) +} + +//sys unlinkat(dirfd int, path string, flags int) (err error) + +func Unlinkat(dirfd int, path string, flags int) error { + return unlinkat(dirfd, path, flags) +} + +//sys utimes(path string, times *[2]Timeval) (err error) + +func Utimes(path string, tv []Timeval) error { + if tv == nil { + err := utimensat(AT_FDCWD, path, nil, 0) + if err != ENOSYS { + return err + } + return utimes(path, nil) + } + if len(tv) != 2 { + return EINVAL + } + var ts [2]Timespec + ts[0] = NsecToTimespec(TimevalToNsec(tv[0])) + ts[1] = NsecToTimespec(TimevalToNsec(tv[1])) + err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) + if err != ENOSYS { + return err + } + return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) + +func UtimesNano(path string, ts []Timespec) error { + if ts == nil { + err := utimensat(AT_FDCWD, path, nil, 0) + if err != ENOSYS { + return err + } + return utimes(path, nil) + } + if len(ts) != 2 { + return EINVAL + } + err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) + if err != ENOSYS { + return err + } + // If the utimensat syscall isn't available (utimensat was added to Linux + // in 2.6.22, Released, 8 July 2007) then fall back to utimes + var tv [2]Timeval + for i := 0; i < 2; i++ { + tv[i].Sec = ts[i].Sec + tv[i].Usec = ts[i].Nsec / 1000 + } + return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error { + if ts == nil { + return utimensat(dirfd, path, nil, flags) + } + if len(ts) != 2 { + return EINVAL + } + return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags) +} + +//sys futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) + +func Futimesat(dirfd int, path string, tv []Timeval) error { + pathp, err := BytePtrFromString(path) + if err != nil { + return err + } + if tv == nil { + return futimesat(dirfd, pathp, nil) + } + if len(tv) != 2 { + return EINVAL + } + return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +func Futimes(fd int, tv []Timeval) (err error) { + // Believe it or not, this is the best we can do on Linux + // (and is what glibc does). + return Utimes("/proc/self/fd/"+itoa(fd), tv) +} + +const ImplementsGetwd = true + +//sys Getcwd(buf []byte) (n int, err error) + +func Getwd() (wd string, err error) { + var buf [PathMax]byte + n, err := Getcwd(buf[0:]) + if err != nil { + return "", err + } + // Getcwd returns the number of bytes written to buf, including the NUL. + if n < 1 || n > len(buf) || buf[n-1] != 0 { + return "", EINVAL + } + return string(buf[0 : n-1]), nil +} + +func Getgroups() (gids []int, err error) { + n, err := getgroups(0, nil) + if err != nil { + return nil, err + } + if n == 0 { + return nil, nil + } + + // Sanity check group count. Max is 1<<16 on Linux. + if n < 0 || n > 1<<20 { + return nil, EINVAL + } + + a := make([]_Gid_t, n) + n, err = getgroups(n, &a[0]) + if err != nil { + return nil, err + } + gids = make([]int, n) + for i, v := range a[0:n] { + gids[i] = int(v) + } + return +} + +func Setgroups(gids []int) (err error) { + if len(gids) == 0 { + return setgroups(0, nil) + } + + a := make([]_Gid_t, len(gids)) + for i, v := range gids { + a[i] = _Gid_t(v) + } + return setgroups(len(a), &a[0]) +} + +type WaitStatus uint32 + +// Wait status is 7 bits at bottom, either 0 (exited), +// 0x7F (stopped), or a signal number that caused an exit. +// The 0x80 bit is whether there was a core dump. +// An extra number (exit code, signal causing a stop) +// is in the high bits. At least that's the idea. +// There are various irregularities. For example, the +// "continued" status is 0xFFFF, distinguishing itself +// from stopped via the core dump bit. + +const ( + mask = 0x7F + core = 0x80 + exited = 0x00 + stopped = 0x7F + shift = 8 +) + +func (w WaitStatus) Exited() bool { return w&mask == exited } + +func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited } + +func (w WaitStatus) Stopped() bool { return w&0xFF == stopped } + +func (w WaitStatus) Continued() bool { return w == 0xFFFF } + +func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 } + +func (w WaitStatus) ExitStatus() int { + if !w.Exited() { + return -1 + } + return int(w>>shift) & 0xFF +} + +func (w WaitStatus) Signal() syscall.Signal { + if !w.Signaled() { + return -1 + } + return syscall.Signal(w & mask) +} + +func (w WaitStatus) StopSignal() syscall.Signal { + if !w.Stopped() { + return -1 + } + return syscall.Signal(w>>shift) & 0xFF +} + +func (w WaitStatus) TrapCause() int { + if w.StopSignal() != SIGTRAP { + return -1 + } + return int(w>>shift) >> 8 +} + +//sys wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) + +func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { + var status _C_int + wpid, err = wait4(pid, &status, options, rusage) + if wstatus != nil { + *wstatus = WaitStatus(status) + } + return +} + +func Mkfifo(path string, mode uint32) (err error) { + return Mknod(path, mode|S_IFIFO, 0) +} + +func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, EINVAL + } + sa.raw.Family = AF_INET + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil +} + +func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, EINVAL + } + sa.raw.Family = AF_INET6 + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + sa.raw.Scope_id = sa.ZoneId + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil +} + +func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { + name := sa.Name + n := len(name) + if n >= len(sa.raw.Path) { + return nil, 0, EINVAL + } + sa.raw.Family = AF_UNIX + for i := 0; i < n; i++ { + sa.raw.Path[i] = int8(name[i]) + } + // length is family (uint16), name, NUL. + sl := _Socklen(2) + if n > 0 { + sl += _Socklen(n) + 1 + } + if sa.raw.Path[0] == '@' { + sa.raw.Path[0] = 0 + // Don't count trailing NUL for abstract address. + sl-- + } + + return unsafe.Pointer(&sa.raw), sl, nil +} + +type SockaddrLinklayer struct { + Protocol uint16 + Ifindex int + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]byte + raw RawSockaddrLinklayer +} + +func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff { + return nil, 0, EINVAL + } + sa.raw.Family = AF_PACKET + sa.raw.Protocol = sa.Protocol + sa.raw.Ifindex = int32(sa.Ifindex) + sa.raw.Hatype = sa.Hatype + sa.raw.Pkttype = sa.Pkttype + sa.raw.Halen = sa.Halen + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil +} + +type SockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 + raw RawSockaddrNetlink +} + +func (sa *SockaddrNetlink) sockaddr() (unsafe.Pointer, _Socklen, error) { + sa.raw.Family = AF_NETLINK + sa.raw.Pad = sa.Pad + sa.raw.Pid = sa.Pid + sa.raw.Groups = sa.Groups + return unsafe.Pointer(&sa.raw), SizeofSockaddrNetlink, nil +} + +type SockaddrHCI struct { + Dev uint16 + Channel uint16 + raw RawSockaddrHCI +} + +func (sa *SockaddrHCI) sockaddr() (unsafe.Pointer, _Socklen, error) { + sa.raw.Family = AF_BLUETOOTH + sa.raw.Dev = sa.Dev + sa.raw.Channel = sa.Channel + return unsafe.Pointer(&sa.raw), SizeofSockaddrHCI, nil +} + +func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) { + switch rsa.Addr.Family { + case AF_NETLINK: + pp := (*RawSockaddrNetlink)(unsafe.Pointer(rsa)) + sa := new(SockaddrNetlink) + sa.Family = pp.Family + sa.Pad = pp.Pad + sa.Pid = pp.Pid + sa.Groups = pp.Groups + return sa, nil + + case AF_PACKET: + pp := (*RawSockaddrLinklayer)(unsafe.Pointer(rsa)) + sa := new(SockaddrLinklayer) + sa.Protocol = pp.Protocol + sa.Ifindex = int(pp.Ifindex) + sa.Hatype = pp.Hatype + sa.Pkttype = pp.Pkttype + sa.Halen = pp.Halen + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + + case AF_UNIX: + pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa)) + sa := new(SockaddrUnix) + if pp.Path[0] == 0 { + // "Abstract" Unix domain socket. + // Rewrite leading NUL as @ for textual display. + // (This is the standard convention.) + // Not friendly to overwrite in place, + // but the callers below don't care. + pp.Path[0] = '@' + } + + // Assume path ends at NUL. + // This is not technically the Linux semantics for + // abstract Unix domain sockets--they are supposed + // to be uninterpreted fixed-size binary blobs--but + // everyone uses this convention. + n := 0 + for n < len(pp.Path) && pp.Path[n] != 0 { + n++ + } + bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] + sa.Name = string(bytes) + return sa, nil + + case AF_INET: + pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet4) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + + case AF_INET6: + pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet6) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + sa.ZoneId = pp.Scope_id + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + } + return nil, EAFNOSUPPORT +} + +func Accept(fd int) (nfd int, sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + nfd, err = accept(fd, &rsa, &len) + if err != nil { + return + } + sa, err = anyToSockaddr(&rsa) + if err != nil { + Close(nfd) + nfd = 0 + } + return +} + +func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + nfd, err = accept4(fd, &rsa, &len, flags) + if err != nil { + return + } + if len > SizeofSockaddrAny { + panic("RawSockaddrAny too small") + } + sa, err = anyToSockaddr(&rsa) + if err != nil { + Close(nfd) + nfd = 0 + } + return +} + +func Getsockname(fd int) (sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + if err = getsockname(fd, &rsa, &len); err != nil { + return + } + return anyToSockaddr(&rsa) +} + +func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) { + vallen := _Socklen(4) + err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen) + return value, err +} + +func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) { + var value IPMreq + vallen := _Socklen(SizeofIPMreq) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) { + var value IPMreqn + vallen := _Socklen(SizeofIPMreqn) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) { + var value IPv6Mreq + vallen := _Socklen(SizeofIPv6Mreq) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) { + var value IPv6MTUInfo + vallen := _Socklen(SizeofIPv6MTUInfo) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) { + var value ICMPv6Filter + vallen := _Socklen(SizeofICMPv6Filter) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func GetsockoptUcred(fd, level, opt int) (*Ucred, error) { + var value Ucred + vallen := _Socklen(SizeofUcred) + err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen) + return &value, err +} + +func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq)) +} + +func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { + var msg Msghdr + var rsa RawSockaddrAny + msg.Name = (*byte)(unsafe.Pointer(&rsa)) + msg.Namelen = uint32(SizeofSockaddrAny) + var iov Iovec + if len(p) > 0 { + iov.Base = (*byte)(unsafe.Pointer(&p[0])) + iov.SetLen(len(p)) + } + var dummy byte + if len(oob) > 0 { + // receive at least one normal byte + if len(p) == 0 { + iov.Base = &dummy + iov.SetLen(1) + } + msg.Control = (*byte)(unsafe.Pointer(&oob[0])) + msg.SetControllen(len(oob)) + } + msg.Iov = &iov + msg.Iovlen = 1 + if n, err = recvmsg(fd, &msg, flags); err != nil { + return + } + oobn = int(msg.Controllen) + recvflags = int(msg.Flags) + // source address is only specified if the socket is unconnected + if rsa.Addr.Family != AF_UNSPEC { + from, err = anyToSockaddr(&rsa) + } + return +} + +func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { + _, err = SendmsgN(fd, p, oob, to, flags) + return +} + +func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) { + var ptr unsafe.Pointer + var salen _Socklen + if to != nil { + var err error + ptr, salen, err = to.sockaddr() + if err != nil { + return 0, err + } + } + var msg Msghdr + msg.Name = (*byte)(unsafe.Pointer(ptr)) + msg.Namelen = uint32(salen) + var iov Iovec + if len(p) > 0 { + iov.Base = (*byte)(unsafe.Pointer(&p[0])) + iov.SetLen(len(p)) + } + var dummy byte + if len(oob) > 0 { + // send at least one normal byte + if len(p) == 0 { + iov.Base = &dummy + iov.SetLen(1) + } + msg.Control = (*byte)(unsafe.Pointer(&oob[0])) + msg.SetControllen(len(oob)) + } + msg.Iov = &iov + msg.Iovlen = 1 + if n, err = sendmsg(fd, &msg, flags); err != nil { + return 0, err + } + if len(oob) > 0 && len(p) == 0 { + n = 0 + } + return n, nil +} + +// BindToDevice binds the socket associated with fd to device. +func BindToDevice(fd int, device string) (err error) { + return SetsockoptString(fd, SOL_SOCKET, SO_BINDTODEVICE, device) +} + +//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error) + +func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err error) { + // The peek requests are machine-size oriented, so we wrap it + // to retrieve arbitrary-length data. + + // The ptrace syscall differs from glibc's ptrace. + // Peeks returns the word in *data, not as the return value. + + var buf [sizeofPtr]byte + + // Leading edge. PEEKTEXT/PEEKDATA don't require aligned + // access (PEEKUSER warns that it might), but if we don't + // align our reads, we might straddle an unmapped page + // boundary and not get the bytes leading up to the page + // boundary. + n := 0 + if addr%sizeofPtr != 0 { + err = ptrace(req, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0]))) + if err != nil { + return 0, err + } + n += copy(out, buf[addr%sizeofPtr:]) + out = out[n:] + } + + // Remainder. + for len(out) > 0 { + // We use an internal buffer to guarantee alignment. + // It's not documented if this is necessary, but we're paranoid. + err = ptrace(req, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0]))) + if err != nil { + return n, err + } + copied := copy(out, buf[0:]) + n += copied + out = out[copied:] + } + + return n, nil +} + +func PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error) { + return ptracePeek(PTRACE_PEEKTEXT, pid, addr, out) +} + +func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) { + return ptracePeek(PTRACE_PEEKDATA, pid, addr, out) +} + +func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (count int, err error) { + // As for ptracePeek, we need to align our accesses to deal + // with the possibility of straddling an invalid page. + + // Leading edge. + n := 0 + if addr%sizeofPtr != 0 { + var buf [sizeofPtr]byte + err = ptrace(peekReq, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0]))) + if err != nil { + return 0, err + } + n += copy(buf[addr%sizeofPtr:], data) + word := *((*uintptr)(unsafe.Pointer(&buf[0]))) + err = ptrace(pokeReq, pid, addr-addr%sizeofPtr, word) + if err != nil { + return 0, err + } + data = data[n:] + } + + // Interior. + for len(data) > sizeofPtr { + word := *((*uintptr)(unsafe.Pointer(&data[0]))) + err = ptrace(pokeReq, pid, addr+uintptr(n), word) + if err != nil { + return n, err + } + n += sizeofPtr + data = data[sizeofPtr:] + } + + // Trailing edge. + if len(data) > 0 { + var buf [sizeofPtr]byte + err = ptrace(peekReq, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0]))) + if err != nil { + return n, err + } + copy(buf[0:], data) + word := *((*uintptr)(unsafe.Pointer(&buf[0]))) + err = ptrace(pokeReq, pid, addr+uintptr(n), word) + if err != nil { + return n, err + } + n += len(data) + } + + return n, nil +} + +func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) { + return ptracePoke(PTRACE_POKETEXT, PTRACE_PEEKTEXT, pid, addr, data) +} + +func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) { + return ptracePoke(PTRACE_POKEDATA, PTRACE_PEEKDATA, pid, addr, data) +} + +func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) { + return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout))) +} + +func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) { + return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs))) +} + +func PtraceSetOptions(pid int, options int) (err error) { + return ptrace(PTRACE_SETOPTIONS, pid, 0, uintptr(options)) +} + +func PtraceGetEventMsg(pid int) (msg uint, err error) { + var data _C_long + err = ptrace(PTRACE_GETEVENTMSG, pid, 0, uintptr(unsafe.Pointer(&data))) + msg = uint(data) + return +} + +func PtraceCont(pid int, signal int) (err error) { + return ptrace(PTRACE_CONT, pid, 0, uintptr(signal)) +} + +func PtraceSyscall(pid int, signal int) (err error) { + return ptrace(PTRACE_SYSCALL, pid, 0, uintptr(signal)) +} + +func PtraceSingleStep(pid int) (err error) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) } + +func PtraceAttach(pid int) (err error) { return ptrace(PTRACE_ATTACH, pid, 0, 0) } + +func PtraceDetach(pid int) (err error) { return ptrace(PTRACE_DETACH, pid, 0, 0) } + +//sys reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) + +func Reboot(cmd int) (err error) { + return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, "") +} + +func clen(n []byte) int { + for i := 0; i < len(n); i++ { + if n[i] == 0 { + return i + } + } + return len(n) +} + +func ReadDirent(fd int, buf []byte) (n int, err error) { + return Getdents(fd, buf) +} + +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + count = 0 + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + buf = buf[dirent.Reclen:] + if dirent.Ino == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:clen(bytes[:])]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names +} + +//sys mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) + +func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) { + // Certain file systems get rather angry and EINVAL if you give + // them an empty string of data, rather than NULL. + if data == "" { + return mount(source, target, fstype, flags, nil) + } + datap, err := BytePtrFromString(data) + if err != nil { + return err + } + return mount(source, target, fstype, flags, datap) +} + +// Sendto +// Recvfrom +// Socketpair + +/* + * Direct access + */ +//sys Acct(path string) (err error) +//sys Adjtimex(buf *Timex) (state int, err error) +//sys Chdir(path string) (err error) +//sys Chroot(path string) (err error) +//sys ClockGettime(clockid int32, time *Timespec) (err error) +//sys Close(fd int) (err error) +//sys Dup(oldfd int) (fd int, err error) +//sys Dup3(oldfd int, newfd int, flags int) (err error) +//sysnb EpollCreate(size int) (fd int, err error) +//sysnb EpollCreate1(flag int) (fd int, err error) +//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) +//sys Exit(code int) = SYS_EXIT_GROUP +//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error) +//sys Fallocate(fd int, mode uint32, off int64, len int64) (err error) +//sys Fchdir(fd int) (err error) +//sys Fchmod(fd int, mode uint32) (err error) +//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) +//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) +//sys fcntl(fd int, cmd int, arg int) (val int, err error) +//sys Fdatasync(fd int) (err error) +//sys Flock(fd int, how int) (err error) +//sys Fsync(fd int) (err error) +//sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64 +//sysnb Getpgid(pid int) (pgid int, err error) + +func Getpgrp() (pid int) { + pid, _ = Getpgid(0) + return +} + +//sysnb Getpid() (pid int) +//sysnb Getppid() (ppid int) +//sys Getpriority(which int, who int) (prio int, err error) +//sysnb Getrusage(who int, rusage *Rusage) (err error) +//sysnb Gettid() (tid int) +//sys Getxattr(path string, attr string, dest []byte) (sz int, err error) +//sys InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) +//sysnb InotifyInit1(flags int) (fd int, err error) +//sysnb InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) +//sysnb Kill(pid int, sig syscall.Signal) (err error) +//sys Klogctl(typ int, buf []byte) (n int, err error) = SYS_SYSLOG +//sys Listxattr(path string, dest []byte) (sz int, err error) +//sys Mkdirat(dirfd int, path string, mode uint32) (err error) +//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) +//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) +//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT +//sysnb prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) = SYS_PRLIMIT64 +//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) +//sys read(fd int, p []byte) (n int, err error) +//sys Removexattr(path string, attr string) (err error) +//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) +//sys Setdomainname(p []byte) (err error) +//sys Sethostname(p []byte) (err error) +//sysnb Setpgid(pid int, pgid int) (err error) +//sysnb Setsid() (pid int, err error) +//sysnb Settimeofday(tv *Timeval) (err error) +//sys Setns(fd int, nstype int) (err error) + +// issue 1435. +// On linux Setuid and Setgid only affects the current thread, not the process. +// This does not match what most callers expect so we must return an error +// here rather than letting the caller think that the call succeeded. + +func Setuid(uid int) (err error) { + return EOPNOTSUPP +} + +func Setgid(uid int) (err error) { + return EOPNOTSUPP +} + +//sys Setpriority(which int, who int, prio int) (err error) +//sys Setxattr(path string, attr string, data []byte, flags int) (err error) +//sys Sync() +//sysnb Sysinfo(info *Sysinfo_t) (err error) +//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error) +//sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error) +//sysnb Times(tms *Tms) (ticks uintptr, err error) +//sysnb Umask(mask int) (oldmask int) +//sysnb Uname(buf *Utsname) (err error) +//sys Unmount(target string, flags int) (err error) = SYS_UMOUNT2 +//sys Unshare(flags int) (err error) +//sys Ustat(dev int, ubuf *Ustat_t) (err error) +//sys write(fd int, p []byte) (n int, err error) +//sys exitThread(code int) (err error) = SYS_EXIT +//sys readlen(fd int, p *byte, np int) (n int, err error) = SYS_READ +//sys writelen(fd int, p *byte, np int) (n int, err error) = SYS_WRITE + +// mmap varies by architecture; see syscall_linux_*.go. +//sys munmap(addr uintptr, length uintptr) (err error) + +var mapper = &mmapper{ + active: make(map[*byte][]byte), + mmap: mmap, + munmap: munmap, +} + +func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { + return mapper.Mmap(fd, offset, length, prot, flags) +} + +func Munmap(b []byte) (err error) { + return mapper.Munmap(b) +} + +//sys Madvise(b []byte, advice int) (err error) +//sys Mprotect(b []byte, prot int) (err error) +//sys Mlock(b []byte) (err error) +//sys Munlock(b []byte) (err error) +//sys Mlockall(flags int) (err error) +//sys Munlockall() (err error) + +/* + * Unimplemented + */ +// AddKey +// AfsSyscall +// Alarm +// ArchPrctl +// Brk +// Capget +// Capset +// ClockGetres +// ClockNanosleep +// ClockSettime +// Clone +// CreateModule +// DeleteModule +// EpollCtlOld +// EpollPwait +// EpollWaitOld +// Eventfd +// Execve +// Fgetxattr +// Flistxattr +// Fork +// Fremovexattr +// Fsetxattr +// Futex +// GetKernelSyms +// GetMempolicy +// GetRobustList +// GetThreadArea +// Getitimer +// Getpmsg +// IoCancel +// IoDestroy +// IoGetevents +// IoSetup +// IoSubmit +// Ioctl +// IoprioGet +// IoprioSet +// KexecLoad +// Keyctl +// Lgetxattr +// Llistxattr +// LookupDcookie +// Lremovexattr +// Lsetxattr +// Mbind +// MigratePages +// Mincore +// ModifyLdt +// Mount +// MovePages +// Mprotect +// MqGetsetattr +// MqNotify +// MqOpen +// MqTimedreceive +// MqTimedsend +// MqUnlink +// Mremap +// Msgctl +// Msgget +// Msgrcv +// Msgsnd +// Msync +// Newfstatat +// Nfsservctl +// Personality +// Pselect6 +// Ptrace +// Putpmsg +// QueryModule +// Quotactl +// Readahead +// Readv +// RemapFilePages +// RequestKey +// RestartSyscall +// RtSigaction +// RtSigpending +// RtSigprocmask +// RtSigqueueinfo +// RtSigreturn +// RtSigsuspend +// RtSigtimedwait +// SchedGetPriorityMax +// SchedGetPriorityMin +// SchedGetaffinity +// SchedGetparam +// SchedGetscheduler +// SchedRrGetInterval +// SchedSetaffinity +// SchedSetparam +// SchedYield +// Security +// Semctl +// Semget +// Semop +// Semtimedop +// SetMempolicy +// SetRobustList +// SetThreadArea +// SetTidAddress +// Shmat +// Shmctl +// Shmdt +// Shmget +// Sigaltstack +// Signalfd +// Swapoff +// Swapon +// Sysfs +// TimerCreate +// TimerDelete +// TimerGetoverrun +// TimerGettime +// TimerSettime +// Timerfd +// Tkill (obsolete) +// Tuxcall +// Umount2 +// Uselib +// Utimensat +// Vfork +// Vhangup +// Vmsplice +// Vserver +// Waitid +// _Sysctl diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go new file mode 100644 index 000000000..2b881b979 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go @@ -0,0 +1,399 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP) +// so that go vet can check that they are correct. + +// +build 386,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int32(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Sec = int32(nsec / 1e9) + tv.Usec = int32(nsec % 1e9 / 1e3) + return +} + +//sysnb pipe(p *[2]_C_int) (err error) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe(&pp) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +//sysnb pipe2(p *[2]_C_int, flags int) (err error) + +func Pipe2(p []int, flags int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, flags) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +// 64-bit file system and 32-bit uid calls +// (386 default is 32-bit file system and 16-bit uid). +//sys Dup2(oldfd int, newfd int) (err error) +//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64 +//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32 +//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 +//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64 +//sysnb Getegid() (egid int) = SYS_GETEGID32 +//sysnb Geteuid() (euid int) = SYS_GETEUID32 +//sysnb Getgid() (gid int) = SYS_GETGID32 +//sysnb Getuid() (uid int) = SYS_GETUID32 +//sysnb InotifyInit() (fd int, err error) +//sys Ioperm(from int, num int, on int) (err error) +//sys Iopl(level int) (err error) +//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32 +//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 +//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 +//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 +//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32 +//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32 +//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32 +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32 +//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32 +//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32 +//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) +//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 +//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) +//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64 +//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32 +//sysnb setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32 +//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT + +//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) +//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) +//sys Pause() (err error) + +func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + page := uintptr(offset / 4096) + if offset != int64(page)*4096 { + return 0, EINVAL + } + return mmap2(addr, length, prot, flags, fd, page) +} + +type rlimit32 struct { + Cur uint32 + Max uint32 +} + +//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT + +const rlimInf32 = ^uint32(0) +const rlimInf64 = ^uint64(0) + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + err = prlimit(0, resource, nil, rlim) + if err != ENOSYS { + return err + } + + rl := rlimit32{} + err = getrlimit(resource, &rl) + if err != nil { + return + } + + if rl.Cur == rlimInf32 { + rlim.Cur = rlimInf64 + } else { + rlim.Cur = uint64(rl.Cur) + } + + if rl.Max == rlimInf32 { + rlim.Max = rlimInf64 + } else { + rlim.Max = uint64(rl.Max) + } + return +} + +//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT + +func Setrlimit(resource int, rlim *Rlimit) (err error) { + err = prlimit(0, resource, rlim, nil) + if err != ENOSYS { + return err + } + + rl := rlimit32{} + if rlim.Cur == rlimInf64 { + rl.Cur = rlimInf32 + } else if rlim.Cur < uint64(rlimInf32) { + rl.Cur = uint32(rlim.Cur) + } else { + return EINVAL + } + if rlim.Max == rlimInf64 { + rl.Max = rlimInf32 + } else if rlim.Max < uint64(rlimInf32) { + rl.Max = uint32(rlim.Max) + } else { + return EINVAL + } + + return setrlimit(resource, &rl) +} + +// Underlying system call writes to newoffset via pointer. +// Implemented in assembly to avoid allocation. +func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + newoffset, errno := seek(fd, offset, whence) + if errno != 0 { + return 0, errno + } + return newoffset, nil +} + +// Vsyscalls on amd64. +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Time(t *Time_t) (tt Time_t, err error) + +//sys Utime(path string, buf *Utimbuf) (err error) + +// On x86 Linux, all the socket calls go through an extra indirection, +// I think because the 5-register system call interface can't handle +// the 6-argument calls like sendto and recvfrom. Instead the +// arguments to the underlying system call are the number below +// and a pointer to an array of uintptr. We hide the pointer in the +// socketcall assembly to avoid allocation on every system call. + +const ( + // see linux/net.h + _SOCKET = 1 + _BIND = 2 + _CONNECT = 3 + _LISTEN = 4 + _ACCEPT = 5 + _GETSOCKNAME = 6 + _GETPEERNAME = 7 + _SOCKETPAIR = 8 + _SEND = 9 + _RECV = 10 + _SENDTO = 11 + _RECVFROM = 12 + _SHUTDOWN = 13 + _SETSOCKOPT = 14 + _GETSOCKOPT = 15 + _SENDMSG = 16 + _RECVMSG = 17 + _ACCEPT4 = 18 + _RECVMMSG = 19 + _SENDMMSG = 20 +) + +func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) +func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + fd, e := socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + fd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + if e != 0 { + err = e + } + return +} + +func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, e := rawsocketcall(_GETSOCKNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, e := rawsocketcall(_GETPEERNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) { + _, e := rawsocketcall(_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0) + if e != 0 { + err = e + } + return +} + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, e := socketcall(_BIND, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, e := socketcall(_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func socket(domain int, typ int, proto int) (fd int, err error) { + fd, e := rawsocketcall(_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, e := socketcall(_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e != 0 { + err = e + } + return +} + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, e := socketcall(_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), vallen, 0) + if e != 0 { + err = e + } + return +} + +func recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var base uintptr + if len(p) > 0 { + base = uintptr(unsafe.Pointer(&p[0])) + } + n, e := socketcall(_RECVFROM, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + if e != 0 { + err = e + } + return +} + +func sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var base uintptr + if len(p) > 0 { + base = uintptr(unsafe.Pointer(&p[0])) + } + _, e := socketcall(_SENDTO, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e != 0 { + err = e + } + return +} + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + n, e := socketcall(_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + n, e := socketcall(_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func Listen(s int, n int) (err error) { + _, e := socketcall(_LISTEN, uintptr(s), uintptr(n), 0, 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func Shutdown(s, how int) (err error) { + _, e := socketcall(_SHUTDOWN, uintptr(s), uintptr(how), 0, 0, 0, 0) + if e != 0 { + err = e + } + return +} + +func Fstatfs(fd int, buf *Statfs_t) (err error) { + _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf))) + if e != 0 { + err = e + } + return +} + +func Statfs(path string, buf *Statfs_t) (err error) { + pathp, err := BytePtrFromString(path) + if err != nil { + return err + } + _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf))) + if e != 0 { + err = e + } + return +} + +func (r *PtraceRegs) PC() uint64 { return uint64(uint32(r.Eip)) } + +func (r *PtraceRegs) SetPC(pc uint64) { r.Eip = int32(pc) } + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) + +func Poll(fds []PollFd, timeout int) (n int, err error) { + if len(fds) == 0 { + return poll(nil, 0, timeout) + } + return poll(&fds[0], len(fds), timeout) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go new file mode 100644 index 000000000..18911c2d9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go @@ -0,0 +1,157 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,linux + +package unix + +import "syscall" + +//sys Dup2(oldfd int, newfd int) (err error) +//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) +//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatfs(fd int, buf *Statfs_t) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (euid int) +//sysnb Getgid() (gid int) +//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) +//sysnb Getuid() (uid int) +//sysnb InotifyInit() (fd int, err error) +//sys Ioperm(from int, num int, on int) (err error) +//sys Iopl(level int) (err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Listen(s int, n int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) +//sys Pause() (err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 +//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK +//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) +//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) +//sys Setfsgid(gid int) (err error) +//sys Setfsuid(uid int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) +//sysnb Setresuid(ruid int, euid int, suid int) (err error) +//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sys Shutdown(fd int, how int) (err error) +//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) +//sys Stat(path string, stat *Stat_t) (err error) +//sys Statfs(path string, buf *Statfs_t) (err error) +//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) +//sys Truncate(path string, length int64) (err error) +//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) +//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) +//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) +//sysnb setgroups(n int, list *_Gid_t) (err error) +//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) +//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) +//sysnb socket(domain int, typ int, proto int) (fd int, err error) +//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) +//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) +//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) + +//go:noescape +func gettimeofday(tv *Timeval) (err syscall.Errno) + +func Gettimeofday(tv *Timeval) (err error) { + errno := gettimeofday(tv) + if errno != 0 { + return errno + } + return nil +} + +func Getpagesize() int { return 4096 } + +func Time(t *Time_t) (tt Time_t, err error) { + var tv Timeval + errno := gettimeofday(&tv) + if errno != 0 { + return 0, errno + } + if t != nil { + *t = Time_t(tv.Sec) + } + return Time_t(tv.Sec), nil +} + +//sys Utime(path string, buf *Utimbuf) (err error) + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Sec = nsec / 1e9 + tv.Usec = nsec % 1e9 / 1e3 + return +} + +//sysnb pipe(p *[2]_C_int) (err error) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe(&pp) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +//sysnb pipe2(p *[2]_C_int, flags int) (err error) + +func Pipe2(p []int, flags int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, flags) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +func (r *PtraceRegs) PC() uint64 { return r.Rip } + +func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc } + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint64(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint64(length) +} + +//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) + +func Poll(fds []PollFd, timeout int) (n int, err error) { + if len(fds) == 0 { + return poll(nil, 0, timeout) + } + return poll(&fds[0], len(fds), timeout) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go new file mode 100644 index 000000000..71d870228 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go @@ -0,0 +1,263 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int32(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Sec = int32(nsec / 1e9) + tv.Usec = int32(nsec % 1e9 / 1e3) + return +} + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, 0) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +//sysnb pipe2(p *[2]_C_int, flags int) (err error) + +func Pipe2(p []int, flags int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, flags) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +// Underlying system call writes to newoffset via pointer. +// Implemented in assembly to avoid allocation. +func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + newoffset, errno := seek(fd, offset, whence) + if errno != 0 { + return 0, errno + } + return newoffset, nil +} + +//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) +//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) +//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32 +//sysnb setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32 +//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) +//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) +//sysnb socket(domain int, typ int, proto int) (fd int, err error) +//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) +//sysnb socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) +//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) + +// 64-bit file system and 32-bit uid calls +// (16-bit uid calls are not always supported in newer kernels) +//sys Dup2(oldfd int, newfd int) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32 +//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64 +//sysnb Getegid() (egid int) = SYS_GETEGID32 +//sysnb Geteuid() (euid int) = SYS_GETEUID32 +//sysnb Getgid() (gid int) = SYS_GETGID32 +//sysnb Getuid() (uid int) = SYS_GETUID32 +//sysnb InotifyInit() (fd int, err error) +//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32 +//sys Listen(s int, n int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64 +//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64 +//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT +//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32 +//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32 +//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32 +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32 +//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32 +//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32 +//sys Shutdown(fd int, how int) (err error) +//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) +//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64 + +// Vsyscalls on amd64. +//sysnb Gettimeofday(tv *Timeval) (err error) +//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) +//sys Pause() (err error) + +func Time(t *Time_t) (Time_t, error) { + var tv Timeval + err := Gettimeofday(&tv) + if err != nil { + return 0, err + } + if t != nil { + *t = Time_t(tv.Sec) + } + return Time_t(tv.Sec), nil +} + +func Utime(path string, buf *Utimbuf) error { + tv := []Timeval{ + {Sec: buf.Actime}, + {Sec: buf.Modtime}, + } + return Utimes(path, tv) +} + +//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 +//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64 +//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64 + +func Fadvise(fd int, offset int64, length int64, advice int) (err error) { + _, _, e1 := Syscall6(SYS_ARM_FADVISE64_64, uintptr(fd), uintptr(advice), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) + +func Fstatfs(fd int, buf *Statfs_t) (err error) { + _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf))) + if e != 0 { + err = e + } + return +} + +func Statfs(path string, buf *Statfs_t) (err error) { + pathp, err := BytePtrFromString(path) + if err != nil { + return err + } + _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf))) + if e != 0 { + err = e + } + return +} + +func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + page := uintptr(offset / 4096) + if offset != int64(page)*4096 { + return 0, EINVAL + } + return mmap2(addr, length, prot, flags, fd, page) +} + +type rlimit32 struct { + Cur uint32 + Max uint32 +} + +//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT + +const rlimInf32 = ^uint32(0) +const rlimInf64 = ^uint64(0) + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + err = prlimit(0, resource, nil, rlim) + if err != ENOSYS { + return err + } + + rl := rlimit32{} + err = getrlimit(resource, &rl) + if err != nil { + return + } + + if rl.Cur == rlimInf32 { + rlim.Cur = rlimInf64 + } else { + rlim.Cur = uint64(rl.Cur) + } + + if rl.Max == rlimInf32 { + rlim.Max = rlimInf64 + } else { + rlim.Max = uint64(rl.Max) + } + return +} + +//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT + +func Setrlimit(resource int, rlim *Rlimit) (err error) { + err = prlimit(0, resource, rlim, nil) + if err != ENOSYS { + return err + } + + rl := rlimit32{} + if rlim.Cur == rlimInf64 { + rl.Cur = rlimInf32 + } else if rlim.Cur < uint64(rlimInf32) { + rl.Cur = uint32(rlim.Cur) + } else { + return EINVAL + } + if rlim.Max == rlimInf64 { + rl.Max = rlimInf32 + } else if rlim.Max < uint64(rlimInf32) { + rl.Max = uint32(rlim.Max) + } else { + return EINVAL + } + + return setrlimit(resource, &rl) +} + +func (r *PtraceRegs) PC() uint64 { return uint64(r.Uregs[15]) } + +func (r *PtraceRegs) SetPC(pc uint64) { r.Uregs[15] = uint32(pc) } + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) + +func Poll(fds []PollFd, timeout int) (n int, err error) { + if len(fds) == 0 { + return poll(nil, 0, timeout) + } + return poll(&fds[0], len(fds), timeout) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go new file mode 100644 index 000000000..4b6ff2a80 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go @@ -0,0 +1,192 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm64,linux + +package unix + +const _SYS_dup = SYS_DUP3 + +//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) +//sys Fstatfs(fd int, buf *Statfs_t) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (euid int) +//sysnb Getgid() (gid int) +//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) +//sysnb Getuid() (uid int) +//sys Listen(s int, n int) (err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 +//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK +//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS_PSELECT6 +//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) +//sys Setfsgid(gid int) (err error) +//sys Setfsuid(uid int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) +//sysnb Setresuid(ruid int, euid int, suid int) (err error) +//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sys Shutdown(fd int, how int) (err error) +//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) + +func Stat(path string, stat *Stat_t) (err error) { + return Fstatat(AT_FDCWD, path, stat, 0) +} + +func Lchown(path string, uid int, gid int) (err error) { + return Fchownat(AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW) +} + +func Lstat(path string, stat *Stat_t) (err error) { + return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW) +} + +//sys Statfs(path string, buf *Statfs_t) (err error) +//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) +//sys Truncate(path string, length int64) (err error) +//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) +//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) +//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) +//sysnb setgroups(n int, list *_Gid_t) (err error) +//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) +//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) +//sysnb socket(domain int, typ int, proto int) (fd int, err error) +//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) +//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) +//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) + +func Getpagesize() int { return 65536 } + +//sysnb Gettimeofday(tv *Timeval) (err error) + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Sec = nsec / 1e9 + tv.Usec = nsec % 1e9 / 1e3 + return +} + +func Time(t *Time_t) (Time_t, error) { + var tv Timeval + err := Gettimeofday(&tv) + if err != nil { + return 0, err + } + if t != nil { + *t = Time_t(tv.Sec) + } + return Time_t(tv.Sec), nil +} + +func Utime(path string, buf *Utimbuf) error { + tv := []Timeval{ + {Sec: buf.Actime}, + {Sec: buf.Modtime}, + } + return Utimes(path, tv) +} + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, 0) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +//sysnb pipe2(p *[2]_C_int, flags int) (err error) + +func Pipe2(p []int, flags int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, flags) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +func (r *PtraceRegs) PC() uint64 { return r.Pc } + +func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc } + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint64(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint64(length) +} + +func InotifyInit() (fd int, err error) { + return InotifyInit1(0) +} + +func Dup2(oldfd int, newfd int) (err error) { + return Dup3(oldfd, newfd, 0) +} + +func Pause() (err error) { + _, _, e1 := Syscall6(SYS_PPOLL, 0, 0, 0, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// TODO(dfc): constants that should be in zsysnum_linux_arm64.go, remove +// these when the deprecated syscalls that the syscall package relies on +// are removed. +const ( + SYS_GETPGRP = 1060 + SYS_UTIMES = 1037 + SYS_FUTIMESAT = 1066 + SYS_PAUSE = 1061 + SYS_USTAT = 1070 + SYS_UTIME = 1063 + SYS_LCHOWN = 1032 + SYS_TIME = 1062 + SYS_EPOLL_CREATE = 1042 + SYS_EPOLL_WAIT = 1069 +) + +func Poll(fds []PollFd, timeout int) (n int, err error) { + var ts *Timespec + if timeout >= 0 { + ts = new(Timespec) + *ts = NsecToTimespec(int64(timeout) * 1e6) + } + if len(fds) == 0 { + return ppoll(nil, 0, ts, nil) + } + return ppoll(&fds[0], len(fds), ts, nil) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go new file mode 100644 index 000000000..440f54ee9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go @@ -0,0 +1,215 @@ +// Copyright 2015 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux +// +build mips64 mips64le + +package unix + +// Linux introduced getdents64 syscall for N64 ABI only in 3.10 +// (May 21 2013, rev dec33abaafc89bcbd78f85fad0513170415a26d5), +// to support older kernels, we have to use getdents for mips64. +// Also note that struct dirent is different for these two. +// Lookup linux_dirent{,64} in kernel source code for details. +const _SYS_getdents = SYS_GETDENTS + +//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Fstatfs(fd int, buf *Statfs_t) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (euid int) +//sysnb Getgid() (gid int) +//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) +//sysnb Getuid() (uid int) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Listen(s int, n int) (err error) +//sys Pause() (err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 +//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK +//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS_PSELECT6 +//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) +//sys Setfsgid(gid int) (err error) +//sys Setfsuid(uid int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) +//sysnb Setresuid(ruid int, euid int, suid int) (err error) +//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sys Shutdown(fd int, how int) (err error) +//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) +//sys Statfs(path string, buf *Statfs_t) (err error) +//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) +//sys Truncate(path string, length int64) (err error) +//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) +//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) +//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) +//sysnb setgroups(n int, list *_Gid_t) (err error) +//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) +//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) +//sysnb socket(domain int, typ int, proto int) (fd int, err error) +//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) +//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) +//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) + +func Getpagesize() int { return 65536 } + +//sysnb Gettimeofday(tv *Timeval) (err error) + +func Time(t *Time_t) (tt Time_t, err error) { + var tv Timeval + err = Gettimeofday(&tv) + if err != nil { + return 0, err + } + if t != nil { + *t = Time_t(tv.Sec) + } + return Time_t(tv.Sec), nil +} + +//sys Utime(path string, buf *Utimbuf) (err error) + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Sec = nsec / 1e9 + tv.Usec = nsec % 1e9 / 1e3 + return +} + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, 0) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +//sysnb pipe2(p *[2]_C_int, flags int) (err error) + +func Pipe2(p []int, flags int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, flags) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +func Ioperm(from int, num int, on int) (err error) { + return ENOSYS +} + +func Iopl(level int) (err error) { + return ENOSYS +} + +type stat_t struct { + Dev uint32 + Pad0 [3]int32 + Ino uint64 + Mode uint32 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev uint32 + Pad1 [3]uint32 + Size int64 + Atime uint32 + Atime_nsec uint32 + Mtime uint32 + Mtime_nsec uint32 + Ctime uint32 + Ctime_nsec uint32 + Blksize uint32 + Pad2 uint32 + Blocks int64 +} + +//sys fstat(fd int, st *stat_t) (err error) +//sys lstat(path string, st *stat_t) (err error) +//sys stat(path string, st *stat_t) (err error) + +func Fstat(fd int, s *Stat_t) (err error) { + st := &stat_t{} + err = fstat(fd, st) + fillStat_t(s, st) + return +} + +func Lstat(path string, s *Stat_t) (err error) { + st := &stat_t{} + err = lstat(path, st) + fillStat_t(s, st) + return +} + +func Stat(path string, s *Stat_t) (err error) { + st := &stat_t{} + err = stat(path, st) + fillStat_t(s, st) + return +} + +func fillStat_t(s *Stat_t, st *stat_t) { + s.Dev = st.Dev + s.Ino = st.Ino + s.Mode = st.Mode + s.Nlink = st.Nlink + s.Uid = st.Uid + s.Gid = st.Gid + s.Rdev = st.Rdev + s.Size = st.Size + s.Atim = Timespec{int64(st.Atime), int64(st.Atime_nsec)} + s.Mtim = Timespec{int64(st.Mtime), int64(st.Mtime_nsec)} + s.Ctim = Timespec{int64(st.Ctime), int64(st.Ctime_nsec)} + s.Blksize = st.Blksize + s.Blocks = st.Blocks +} + +func (r *PtraceRegs) PC() uint64 { return r.Regs[64] } + +func (r *PtraceRegs) SetPC(pc uint64) { r.Regs[64] = pc } + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint64(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint64(length) +} + +//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) + +func Poll(fds []PollFd, timeout int) (n int, err error) { + if len(fds) == 0 { + return poll(nil, 0, timeout) + } + return poll(&fds[0], len(fds), timeout) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go new file mode 100644 index 000000000..60770f627 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go @@ -0,0 +1,135 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build linux +// +build ppc64 ppc64le + +package unix + +//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) +//sys Dup2(oldfd int, newfd int) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatfs(fd int, buf *Statfs_t) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (euid int) +//sysnb Getgid() (gid int) +//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT +//sysnb Getuid() (uid int) +//sysnb InotifyInit() (fd int, err error) +//sys Ioperm(from int, num int, on int) (err error) +//sys Iopl(level int) (err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Listen(s int, n int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) +//sys Pause() (err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 +//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK +//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) +//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) +//sys Setfsgid(gid int) (err error) +//sys Setfsuid(uid int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) +//sysnb Setresuid(ruid int, euid int, suid int) (err error) +//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sys Shutdown(fd int, how int) (err error) +//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) +//sys Stat(path string, stat *Stat_t) (err error) +//sys Statfs(path string, buf *Statfs_t) (err error) +//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) = SYS_SYNC_FILE_RANGE2 +//sys Truncate(path string, length int64) (err error) +//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) +//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) +//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) +//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) +//sysnb setgroups(n int, list *_Gid_t) (err error) +//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) +//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) +//sysnb socket(domain int, typ int, proto int) (fd int, err error) +//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) +//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) +//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) +//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) + +func Getpagesize() int { return 65536 } + +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Time(t *Time_t) (tt Time_t, err error) + +//sys Utime(path string, buf *Utimbuf) (err error) + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Sec = nsec / 1e9 + tv.Usec = nsec % 1e9 / 1e3 + return +} + +func (r *PtraceRegs) PC() uint64 { return r.Nip } + +func (r *PtraceRegs) SetPC(pc uint64) { r.Nip = pc } + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint64(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint64(length) +} + +//sysnb pipe(p *[2]_C_int) (err error) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe(&pp) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +//sysnb pipe2(p *[2]_C_int, flags int) (err error) + +func Pipe2(p []int, flags int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, flags) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) + +func Poll(fds []PollFd, timeout int) (n int, err error) { + if len(fds) == 0 { + return poll(nil, 0, timeout) + } + return poll(&fds[0], len(fds), timeout) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go new file mode 100644 index 000000000..81c5f4732 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go @@ -0,0 +1,329 @@ +// Copyright 2016 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build s390x,linux + +package unix + +import ( + "unsafe" +) + +//sys Dup2(oldfd int, newfd int) (err error) +//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) +//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64 +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatfs(fd int, buf *Statfs_t) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (euid int) +//sysnb Getgid() (gid int) +//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) +//sysnb Getuid() (uid int) +//sysnb InotifyInit() (fd int, err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) +//sys Pause() (err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64 +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64 +//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK +//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) +//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) +//sys Setfsgid(gid int) (err error) +//sys Setfsuid(uid int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) +//sysnb Setresuid(ruid int, euid int, suid int) (err error) +//sysnb Setrlimit(resource int, rlim *Rlimit) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) +//sys Stat(path string, stat *Stat_t) (err error) +//sys Statfs(path string, buf *Statfs_t) (err error) +//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) +//sys Truncate(path string, length int64) (err error) +//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) +//sysnb setgroups(n int, list *_Gid_t) (err error) + +func Getpagesize() int { return 4096 } + +//sysnb Gettimeofday(tv *Timeval) (err error) + +func Time(t *Time_t) (tt Time_t, err error) { + var tv Timeval + err = Gettimeofday(&tv) + if err != nil { + return 0, err + } + if t != nil { + *t = Time_t(tv.Sec) + } + return Time_t(tv.Sec), nil +} + +//sys Utime(path string, buf *Utimbuf) (err error) + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Sec = nsec / 1e9 + tv.Usec = nsec % 1e9 / 1e3 + return +} + +//sysnb pipe2(p *[2]_C_int, flags int) (err error) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0. + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +func Pipe2(p []int, flags int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe2(&pp, flags) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +func Ioperm(from int, num int, on int) (err error) { + return ENOSYS +} + +func Iopl(level int) (err error) { + return ENOSYS +} + +func (r *PtraceRegs) PC() uint64 { return r.Psw.Addr } + +func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = pc } + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint64(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint64(length) +} + +// Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct. +// mmap2 also requires arguments to be passed in a struct; it is currently not exposed in . +func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + mmap_args := [6]uintptr{addr, length, uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)} + r0, _, e1 := Syscall(SYS_MMAP, uintptr(unsafe.Pointer(&mmap_args[0])), 0, 0) + use(unsafe.Pointer(&mmap_args[0])) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// On s390x Linux, all the socket calls go through an extra indirection. +// The arguments to the underlying system call (SYS_SOCKETCALL) are the +// number below and a pointer to an array of uintptr. +const ( + // see linux/net.h + netSocket = 1 + netBind = 2 + netConnect = 3 + netListen = 4 + netAccept = 5 + netGetSockName = 6 + netGetPeerName = 7 + netSocketPair = 8 + netSend = 9 + netRecv = 10 + netSendTo = 11 + netRecvFrom = 12 + netShutdown = 13 + netSetSockOpt = 14 + netGetSockOpt = 15 + netSendMsg = 16 + netRecvMsg = 17 + netAccept4 = 18 + netRecvMMsg = 19 + netSendMMsg = 20 +) + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (int, error) { + args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))} + fd, _, err := Syscall(SYS_SOCKETCALL, netAccept, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return 0, err + } + return int(fd), nil +} + +func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) { + args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)} + fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return 0, err + } + return int(fd), nil +} + +func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error { + args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))} + _, _, err := RawSyscall(SYS_SOCKETCALL, netGetSockName, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return err + } + return nil +} + +func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error { + args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))} + _, _, err := RawSyscall(SYS_SOCKETCALL, netGetPeerName, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return err + } + return nil +} + +func socketpair(domain int, typ int, flags int, fd *[2]int32) error { + args := [4]uintptr{uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd))} + _, _, err := RawSyscall(SYS_SOCKETCALL, netSocketPair, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return err + } + return nil +} + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) error { + args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)} + _, _, err := Syscall(SYS_SOCKETCALL, netBind, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return err + } + return nil +} + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) error { + args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)} + _, _, err := Syscall(SYS_SOCKETCALL, netConnect, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return err + } + return nil +} + +func socket(domain int, typ int, proto int) (int, error) { + args := [3]uintptr{uintptr(domain), uintptr(typ), uintptr(proto)} + fd, _, err := RawSyscall(SYS_SOCKETCALL, netSocket, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return 0, err + } + return int(fd), nil +} + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) error { + args := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen))} + _, _, err := Syscall(SYS_SOCKETCALL, netGetSockOpt, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return err + } + return nil +} + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error { + args := [4]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val)} + _, _, err := Syscall(SYS_SOCKETCALL, netSetSockOpt, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return err + } + return nil +} + +func recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (int, error) { + var base uintptr + if len(p) > 0 { + base = uintptr(unsafe.Pointer(&p[0])) + } + args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))} + n, _, err := Syscall(SYS_SOCKETCALL, netRecvFrom, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return 0, err + } + return int(n), nil +} + +func sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) error { + var base uintptr + if len(p) > 0 { + base = uintptr(unsafe.Pointer(&p[0])) + } + args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen)} + _, _, err := Syscall(SYS_SOCKETCALL, netSendTo, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return err + } + return nil +} + +func recvmsg(s int, msg *Msghdr, flags int) (int, error) { + args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)} + n, _, err := Syscall(SYS_SOCKETCALL, netRecvMsg, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return 0, err + } + return int(n), nil +} + +func sendmsg(s int, msg *Msghdr, flags int) (int, error) { + args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)} + n, _, err := Syscall(SYS_SOCKETCALL, netSendMsg, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return 0, err + } + return int(n), nil +} + +func Listen(s int, n int) error { + args := [2]uintptr{uintptr(s), uintptr(n)} + _, _, err := Syscall(SYS_SOCKETCALL, netListen, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return err + } + return nil +} + +func Shutdown(s, how int) error { + args := [2]uintptr{uintptr(s), uintptr(how)} + _, _, err := Syscall(SYS_SOCKETCALL, netShutdown, uintptr(unsafe.Pointer(&args)), 0) + if err != 0 { + return err + } + return nil +} + +//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error) + +func Poll(fds []PollFd, timeout int) (n int, err error) { + if len(fds) == 0 { + return poll(nil, 0, timeout) + } + return poll(&fds[0], len(fds), timeout) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go new file mode 100644 index 000000000..c4e945cd6 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go @@ -0,0 +1,492 @@ +// Copyright 2009,2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// NetBSD system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and wrap +// it in our own nicer implementation, either here or in +// syscall_bsd.go or syscall_unix.go. + +package unix + +import ( + "syscall" + "unsafe" +) + +type SockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 + raw RawSockaddrDatalink +} + +func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) + +func sysctlNodes(mib []_C_int) (nodes []Sysctlnode, err error) { + var olen uintptr + + // Get a list of all sysctl nodes below the given MIB by performing + // a sysctl for the given MIB with CTL_QUERY appended. + mib = append(mib, CTL_QUERY) + qnode := Sysctlnode{Flags: SYSCTL_VERS_1} + qp := (*byte)(unsafe.Pointer(&qnode)) + sz := unsafe.Sizeof(qnode) + if err = sysctl(mib, nil, &olen, qp, sz); err != nil { + return nil, err + } + + // Now that we know the size, get the actual nodes. + nodes = make([]Sysctlnode, olen/sz) + np := (*byte)(unsafe.Pointer(&nodes[0])) + if err = sysctl(mib, np, &olen, qp, sz); err != nil { + return nil, err + } + + return nodes, nil +} + +func nametomib(name string) (mib []_C_int, err error) { + + // Split name into components. + var parts []string + last := 0 + for i := 0; i < len(name); i++ { + if name[i] == '.' { + parts = append(parts, name[last:i]) + last = i + 1 + } + } + parts = append(parts, name[last:]) + + // Discover the nodes and construct the MIB OID. + for partno, part := range parts { + nodes, err := sysctlNodes(mib) + if err != nil { + return nil, err + } + for _, node := range nodes { + n := make([]byte, 0) + for i := range node.Name { + if node.Name[i] != 0 { + n = append(n, byte(node.Name[i])) + } + } + if string(n) == part { + mib = append(mib, _C_int(node.Num)) + break + } + } + if len(mib) != partno+1 { + return nil, EINVAL + } + } + + return mib, nil +} + +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + if dirent.Reclen == 0 { + buf = nil + break + } + buf = buf[dirent.Reclen:] + if dirent.Fileno == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:dirent.Namlen]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names +} + +//sysnb pipe() (fd1 int, fd2 int, err error) +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + p[0], p[1], err = pipe() + return +} + +//sys getdents(fd int, buf []byte) (n int, err error) +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + return getdents(fd, buf) +} + +// TODO +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + return -1, ENOSYS +} + +/* + * Exposed directly + */ +//sys Access(path string, mode uint32) (err error) +//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) +//sys Chdir(path string) (err error) +//sys Chflags(path string, flags int) (err error) +//sys Chmod(path string, mode uint32) (err error) +//sys Chown(path string, uid int, gid int) (err error) +//sys Chroot(path string) (err error) +//sys Close(fd int) (err error) +//sys Dup(fd int) (nfd int, err error) +//sys Dup2(from int, to int) (err error) +//sys Exit(code int) +//sys Fchdir(fd int) (err error) +//sys Fchflags(fd int, flags int) (err error) +//sys Fchmod(fd int, mode uint32) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Flock(fd int, how int) (err error) +//sys Fpathconf(fd int, name int) (val int, err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fsync(fd int) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (uid int) +//sysnb Getgid() (gid int) +//sysnb Getpgid(pid int) (pgid int, err error) +//sysnb Getpgrp() (pgrp int) +//sysnb Getpid() (pid int) +//sysnb Getppid() (ppid int) +//sys Getpriority(which int, who int) (prio int, err error) +//sysnb Getrlimit(which int, lim *Rlimit) (err error) +//sysnb Getrusage(who int, rusage *Rusage) (err error) +//sysnb Getsid(pid int) (sid int, err error) +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Getuid() (uid int) +//sys Issetugid() (tainted bool) +//sys Kill(pid int, signum syscall.Signal) (err error) +//sys Kqueue() (fd int, err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Link(path string, link string) (err error) +//sys Listen(s int, backlog int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) +//sys Mkdir(path string, mode uint32) (err error) +//sys Mkfifo(path string, mode uint32) (err error) +//sys Mknod(path string, mode uint32, dev int) (err error) +//sys Mlock(b []byte) (err error) +//sys Mlockall(flags int) (err error) +//sys Mprotect(b []byte, prot int) (err error) +//sys Munlock(b []byte) (err error) +//sys Munlockall() (err error) +//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) +//sys Open(path string, mode int, perm uint32) (fd int, err error) +//sys Pathconf(path string, name int) (val int, err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) +//sys read(fd int, p []byte) (n int, err error) +//sys Readlink(path string, buf []byte) (n int, err error) +//sys Rename(from string, to string) (err error) +//sys Revoke(path string) (err error) +//sys Rmdir(path string) (err error) +//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK +//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) +//sysnb Setegid(egid int) (err error) +//sysnb Seteuid(euid int) (err error) +//sysnb Setgid(gid int) (err error) +//sysnb Setpgid(pid int, pgid int) (err error) +//sys Setpriority(which int, who int, prio int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sysnb Setrlimit(which int, lim *Rlimit) (err error) +//sysnb Setsid() (pid int, err error) +//sysnb Settimeofday(tp *Timeval) (err error) +//sysnb Setuid(uid int) (err error) +//sys Stat(path string, stat *Stat_t) (err error) +//sys Symlink(path string, link string) (err error) +//sys Sync() (err error) +//sys Truncate(path string, length int64) (err error) +//sys Umask(newmask int) (oldmask int) +//sys Unlink(path string) (err error) +//sys Unmount(path string, flags int) (err error) +//sys write(fd int, p []byte) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) +//sys munmap(addr uintptr, length uintptr) (err error) +//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ +//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE + +/* + * Unimplemented + */ +// ____semctl13 +// __clone +// __fhopen40 +// __fhstat40 +// __fhstatvfs140 +// __fstat30 +// __getcwd +// __getfh30 +// __getlogin +// __lstat30 +// __mount50 +// __msgctl13 +// __msync13 +// __ntp_gettime30 +// __posix_chown +// __posix_fadvise50 +// __posix_fchown +// __posix_lchown +// __posix_rename +// __setlogin +// __shmctl13 +// __sigaction_sigtramp +// __sigaltstack14 +// __sigpending14 +// __sigprocmask14 +// __sigsuspend14 +// __sigtimedwait +// __stat30 +// __syscall +// __vfork14 +// _ksem_close +// _ksem_destroy +// _ksem_getvalue +// _ksem_init +// _ksem_open +// _ksem_post +// _ksem_trywait +// _ksem_unlink +// _ksem_wait +// _lwp_continue +// _lwp_create +// _lwp_ctl +// _lwp_detach +// _lwp_exit +// _lwp_getname +// _lwp_getprivate +// _lwp_kill +// _lwp_park +// _lwp_self +// _lwp_setname +// _lwp_setprivate +// _lwp_suspend +// _lwp_unpark +// _lwp_unpark_all +// _lwp_wait +// _lwp_wakeup +// _pset_bind +// _sched_getaffinity +// _sched_getparam +// _sched_setaffinity +// _sched_setparam +// acct +// aio_cancel +// aio_error +// aio_fsync +// aio_read +// aio_return +// aio_suspend +// aio_write +// break +// clock_getres +// clock_gettime +// clock_settime +// compat_09_ogetdomainname +// compat_09_osetdomainname +// compat_09_ouname +// compat_10_omsgsys +// compat_10_osemsys +// compat_10_oshmsys +// compat_12_fstat12 +// compat_12_getdirentries +// compat_12_lstat12 +// compat_12_msync +// compat_12_oreboot +// compat_12_oswapon +// compat_12_stat12 +// compat_13_sigaction13 +// compat_13_sigaltstack13 +// compat_13_sigpending13 +// compat_13_sigprocmask13 +// compat_13_sigreturn13 +// compat_13_sigsuspend13 +// compat_14___semctl +// compat_14_msgctl +// compat_14_shmctl +// compat_16___sigaction14 +// compat_16___sigreturn14 +// compat_20_fhstatfs +// compat_20_fstatfs +// compat_20_getfsstat +// compat_20_statfs +// compat_30___fhstat30 +// compat_30___fstat13 +// compat_30___lstat13 +// compat_30___stat13 +// compat_30_fhopen +// compat_30_fhstat +// compat_30_fhstatvfs1 +// compat_30_getdents +// compat_30_getfh +// compat_30_ntp_gettime +// compat_30_socket +// compat_40_mount +// compat_43_fstat43 +// compat_43_lstat43 +// compat_43_oaccept +// compat_43_ocreat +// compat_43_oftruncate +// compat_43_ogetdirentries +// compat_43_ogetdtablesize +// compat_43_ogethostid +// compat_43_ogethostname +// compat_43_ogetkerninfo +// compat_43_ogetpagesize +// compat_43_ogetpeername +// compat_43_ogetrlimit +// compat_43_ogetsockname +// compat_43_okillpg +// compat_43_olseek +// compat_43_ommap +// compat_43_oquota +// compat_43_orecv +// compat_43_orecvfrom +// compat_43_orecvmsg +// compat_43_osend +// compat_43_osendmsg +// compat_43_osethostid +// compat_43_osethostname +// compat_43_osetrlimit +// compat_43_osigblock +// compat_43_osigsetmask +// compat_43_osigstack +// compat_43_osigvec +// compat_43_otruncate +// compat_43_owait +// compat_43_stat43 +// execve +// extattr_delete_fd +// extattr_delete_file +// extattr_delete_link +// extattr_get_fd +// extattr_get_file +// extattr_get_link +// extattr_list_fd +// extattr_list_file +// extattr_list_link +// extattr_set_fd +// extattr_set_file +// extattr_set_link +// extattrctl +// fchroot +// fdatasync +// fgetxattr +// fktrace +// flistxattr +// fork +// fremovexattr +// fsetxattr +// fstatvfs1 +// fsync_range +// getcontext +// getitimer +// getvfsstat +// getxattr +// ioctl +// ktrace +// lchflags +// lchmod +// lfs_bmapv +// lfs_markv +// lfs_segclean +// lfs_segwait +// lgetxattr +// lio_listio +// listxattr +// llistxattr +// lremovexattr +// lseek +// lsetxattr +// lutimes +// madvise +// mincore +// minherit +// modctl +// mq_close +// mq_getattr +// mq_notify +// mq_open +// mq_receive +// mq_send +// mq_setattr +// mq_timedreceive +// mq_timedsend +// mq_unlink +// mremap +// msgget +// msgrcv +// msgsnd +// nfssvc +// ntp_adjtime +// pmc_control +// pmc_get_info +// poll +// pollts +// preadv +// profil +// pselect +// pset_assign +// pset_create +// pset_destroy +// ptrace +// pwritev +// quotactl +// rasctl +// readv +// reboot +// removexattr +// sa_enable +// sa_preempt +// sa_register +// sa_setconcurrency +// sa_stacks +// sa_yield +// sbrk +// sched_yield +// semconfig +// semget +// semop +// setcontext +// setitimer +// setxattr +// shmat +// shmdt +// shmget +// sstk +// statvfs1 +// swapctl +// sysarch +// syscall +// timer_create +// timer_delete +// timer_getoverrun +// timer_gettime +// timer_settime +// undelete +// utrace +// uuidgen +// vadvise +// vfork +// writev diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go new file mode 100644 index 000000000..afaca0983 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go @@ -0,0 +1,42 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build 386,netbsd + +package unix + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int64(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int64(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = uint32(mode) + k.Flags = uint32(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go new file mode 100644 index 000000000..a6ff04ce5 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go @@ -0,0 +1,42 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,netbsd + +package unix + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int64(nsec / 1e9) + ts.Nsec = int64(nsec % 1e9) + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int64(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint64(fd) + k.Filter = uint32(mode) + k.Flags = uint32(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go new file mode 100644 index 000000000..68a6969b2 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go @@ -0,0 +1,42 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build arm,netbsd + +package unix + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int64(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int64(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = uint32(mode) + k.Flags = uint32(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_no_getwd.go b/vendor/golang.org/x/sys/unix/syscall_no_getwd.go new file mode 100644 index 000000000..530792ea9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_no_getwd.go @@ -0,0 +1,11 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build dragonfly freebsd netbsd openbsd + +package unix + +const ImplementsGetwd = false + +func Getwd() (string, error) { return "", ENOTSUP } diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go new file mode 100644 index 000000000..554a82342 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -0,0 +1,304 @@ +// Copyright 2009,2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// OpenBSD system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and wrap +// it in our own nicer implementation, either here or in +// syscall_bsd.go or syscall_unix.go. + +package unix + +import ( + "syscall" + "unsafe" +) + +type SockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [24]int8 + raw RawSockaddrDatalink +} + +func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) + +func nametomib(name string) (mib []_C_int, err error) { + + // Perform lookup via a binary search + left := 0 + right := len(sysctlMib) - 1 + for { + idx := left + (right-left)/2 + switch { + case name == sysctlMib[idx].ctlname: + return sysctlMib[idx].ctloid, nil + case name > sysctlMib[idx].ctlname: + left = idx + 1 + default: + right = idx - 1 + } + if left > right { + break + } + } + return nil, EINVAL +} + +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + if dirent.Reclen == 0 { + buf = nil + break + } + buf = buf[dirent.Reclen:] + if dirent.Fileno == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:dirent.Namlen]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names +} + +//sysnb pipe(p *[2]_C_int) (err error) +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + var pp [2]_C_int + err = pipe(&pp) + p[0] = int(pp[0]) + p[1] = int(pp[1]) + return +} + +//sys getdents(fd int, buf []byte) (n int, err error) +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + return getdents(fd, buf) +} + +// TODO +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + return -1, ENOSYS +} + +func Getfsstat(buf []Statfs_t, flags int) (n int, err error) { + var _p0 unsafe.Pointer + var bufsize uintptr + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf)) + } + r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags)) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +/* + * Exposed directly + */ +//sys Access(path string, mode uint32) (err error) +//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) +//sys Chdir(path string) (err error) +//sys Chflags(path string, flags int) (err error) +//sys Chmod(path string, mode uint32) (err error) +//sys Chown(path string, uid int, gid int) (err error) +//sys Chroot(path string) (err error) +//sys Close(fd int) (err error) +//sys Dup(fd int) (nfd int, err error) +//sys Dup2(from int, to int) (err error) +//sys Exit(code int) +//sys Fchdir(fd int) (err error) +//sys Fchflags(fd int, flags int) (err error) +//sys Fchmod(fd int, mode uint32) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Flock(fd int, how int) (err error) +//sys Fpathconf(fd int, name int) (val int, err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Fstatfs(fd int, stat *Statfs_t) (err error) +//sys Fsync(fd int) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sysnb Getegid() (egid int) +//sysnb Geteuid() (uid int) +//sysnb Getgid() (gid int) +//sysnb Getpgid(pid int) (pgid int, err error) +//sysnb Getpgrp() (pgrp int) +//sysnb Getpid() (pid int) +//sysnb Getppid() (ppid int) +//sys Getpriority(which int, who int) (prio int, err error) +//sysnb Getrlimit(which int, lim *Rlimit) (err error) +//sysnb Getrusage(who int, rusage *Rusage) (err error) +//sysnb Getsid(pid int) (sid int, err error) +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Getuid() (uid int) +//sys Issetugid() (tainted bool) +//sys Kill(pid int, signum syscall.Signal) (err error) +//sys Kqueue() (fd int, err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Link(path string, link string) (err error) +//sys Listen(s int, backlog int) (err error) +//sys Lstat(path string, stat *Stat_t) (err error) +//sys Mkdir(path string, mode uint32) (err error) +//sys Mkfifo(path string, mode uint32) (err error) +//sys Mknod(path string, mode uint32, dev int) (err error) +//sys Mlock(b []byte) (err error) +//sys Mlockall(flags int) (err error) +//sys Mprotect(b []byte, prot int) (err error) +//sys Munlock(b []byte) (err error) +//sys Munlockall() (err error) +//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) +//sys Open(path string, mode int, perm uint32) (fd int, err error) +//sys Pathconf(path string, name int) (val int, err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) +//sys read(fd int, p []byte) (n int, err error) +//sys Readlink(path string, buf []byte) (n int, err error) +//sys Rename(from string, to string) (err error) +//sys Revoke(path string) (err error) +//sys Rmdir(path string) (err error) +//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK +//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) +//sysnb Setegid(egid int) (err error) +//sysnb Seteuid(euid int) (err error) +//sysnb Setgid(gid int) (err error) +//sys Setlogin(name string) (err error) +//sysnb Setpgid(pid int, pgid int) (err error) +//sys Setpriority(which int, who int, prio int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sysnb Setresgid(rgid int, egid int, sgid int) (err error) +//sysnb Setresuid(ruid int, euid int, suid int) (err error) +//sysnb Setrlimit(which int, lim *Rlimit) (err error) +//sysnb Setsid() (pid int, err error) +//sysnb Settimeofday(tp *Timeval) (err error) +//sysnb Setuid(uid int) (err error) +//sys Stat(path string, stat *Stat_t) (err error) +//sys Statfs(path string, stat *Statfs_t) (err error) +//sys Symlink(path string, link string) (err error) +//sys Sync() (err error) +//sys Truncate(path string, length int64) (err error) +//sys Umask(newmask int) (oldmask int) +//sys Unlink(path string) (err error) +//sys Unmount(path string, flags int) (err error) +//sys write(fd int, p []byte) (n int, err error) +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) +//sys munmap(addr uintptr, length uintptr) (err error) +//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ +//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE + +/* + * Unimplemented + */ +// __getcwd +// __semctl +// __syscall +// __sysctl +// adjfreq +// break +// clock_getres +// clock_gettime +// clock_settime +// closefrom +// execve +// faccessat +// fchmodat +// fchownat +// fcntl +// fhopen +// fhstat +// fhstatfs +// fork +// fstatat +// futimens +// getfh +// getgid +// getitimer +// getlogin +// getresgid +// getresuid +// getrtable +// getthrid +// ioctl +// ktrace +// lfs_bmapv +// lfs_markv +// lfs_segclean +// lfs_segwait +// linkat +// mincore +// minherit +// mkdirat +// mkfifoat +// mknodat +// mount +// mquery +// msgctl +// msgget +// msgrcv +// msgsnd +// nfssvc +// nnpfspioctl +// openat +// poll +// preadv +// profil +// pwritev +// quotactl +// readlinkat +// readv +// reboot +// renameat +// rfork +// sched_yield +// semget +// semop +// setgroups +// setitimer +// setrtable +// setsockopt +// shmat +// shmctl +// shmdt +// shmget +// sigaction +// sigaltstack +// sigpending +// sigprocmask +// sigreturn +// sigsuspend +// symlinkat +// sysarch +// syscall +// threxit +// thrsigdivert +// thrsleep +// thrwakeup +// unlinkat +// utimensat +// vfork +// writev diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go new file mode 100644 index 000000000..a66ddc59c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go @@ -0,0 +1,42 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build 386,openbsd + +package unix + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = int64(nsec / 1e9) + ts.Nsec = int32(nsec % 1e9) + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = int32(nsec % 1e9 / 1e3) + tv.Sec = int64(nsec / 1e9) + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint32(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint32(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go new file mode 100644 index 000000000..0776c1faf --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go @@ -0,0 +1,42 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,openbsd + +package unix + +func Getpagesize() int { return 4096 } + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = nsec % 1e9 / 1e3 + tv.Sec = nsec / 1e9 + return +} + +func SetKevent(k *Kevent_t, fd, mode, flags int) { + k.Ident = uint64(fd) + k.Filter = int16(mode) + k.Flags = uint16(flags) +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (msghdr *Msghdr) SetControllen(length int) { + msghdr.Controllen = uint32(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go new file mode 100644 index 000000000..eb489b159 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go @@ -0,0 +1,713 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Solaris system calls. +// This file is compiled as ordinary Go code, +// but it is also input to mksyscall, +// which parses the //sys lines and generates system call stubs. +// Note that sometimes we use a lowercase //sys name and wrap +// it in our own nicer implementation, either here or in +// syscall_solaris.go or syscall_unix.go. + +package unix + +import ( + "sync/atomic" + "syscall" + "unsafe" +) + +// Implemented in runtime/syscall_solaris.go. +type syscallFunc uintptr + +func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) +func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) + +type SockaddrDatalink struct { + Family uint16 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [244]int8 + raw RawSockaddrDatalink +} + +func clen(n []byte) int { + for i := 0; i < len(n); i++ { + if n[i] == 0 { + return i + } + } + return len(n) +} + +// ParseDirent parses up to max directory entries in buf, +// appending the names to names. It returns the number +// bytes consumed from buf, the number of entries added +// to names, and the new names slice. +func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) { + origlen := len(buf) + for max != 0 && len(buf) > 0 { + dirent := (*Dirent)(unsafe.Pointer(&buf[0])) + if dirent.Reclen == 0 { + buf = nil + break + } + buf = buf[dirent.Reclen:] + if dirent.Ino == 0 { // File absent in directory. + continue + } + bytes := (*[10000]byte)(unsafe.Pointer(&dirent.Name[0])) + var name = string(bytes[0:clen(bytes[:])]) + if name == "." || name == ".." { // Useless names + continue + } + max-- + count++ + names = append(names, name) + } + return origlen - len(buf), count, names +} + +func pipe() (r uintptr, w uintptr, err uintptr) + +func Pipe(p []int) (err error) { + if len(p) != 2 { + return EINVAL + } + r0, w0, e1 := pipe() + if e1 != 0 { + err = syscall.Errno(e1) + } + p[0], p[1] = int(r0), int(w0) + return +} + +func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, EINVAL + } + sa.raw.Family = AF_INET + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil +} + +func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, EINVAL + } + sa.raw.Family = AF_INET6 + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + sa.raw.Scope_id = sa.ZoneId + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil +} + +func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) { + name := sa.Name + n := len(name) + if n >= len(sa.raw.Path) { + return nil, 0, EINVAL + } + sa.raw.Family = AF_UNIX + for i := 0; i < n; i++ { + sa.raw.Path[i] = int8(name[i]) + } + // length is family (uint16), name, NUL. + sl := _Socklen(2) + if n > 0 { + sl += _Socklen(n) + 1 + } + if sa.raw.Path[0] == '@' { + sa.raw.Path[0] = 0 + // Don't count trailing NUL for abstract address. + sl-- + } + + return unsafe.Pointer(&sa.raw), sl, nil +} + +//sys getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getsockname + +func Getsockname(fd int) (sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + if err = getsockname(fd, &rsa, &len); err != nil { + return + } + return anyToSockaddr(&rsa) +} + +const ImplementsGetwd = true + +//sys Getcwd(buf []byte) (n int, err error) + +func Getwd() (wd string, err error) { + var buf [PathMax]byte + // Getcwd will return an error if it failed for any reason. + _, err = Getcwd(buf[0:]) + if err != nil { + return "", err + } + n := clen(buf[:]) + if n < 1 { + return "", EINVAL + } + return string(buf[:n]), nil +} + +/* + * Wrapped + */ + +//sysnb getgroups(ngid int, gid *_Gid_t) (n int, err error) +//sysnb setgroups(ngid int, gid *_Gid_t) (err error) + +func Getgroups() (gids []int, err error) { + n, err := getgroups(0, nil) + // Check for error and sanity check group count. Newer versions of + // Solaris allow up to 1024 (NGROUPS_MAX). + if n < 0 || n > 1024 { + if err != nil { + return nil, err + } + return nil, EINVAL + } else if n == 0 { + return nil, nil + } + + a := make([]_Gid_t, n) + n, err = getgroups(n, &a[0]) + if n == -1 { + return nil, err + } + gids = make([]int, n) + for i, v := range a[0:n] { + gids[i] = int(v) + } + return +} + +func Setgroups(gids []int) (err error) { + if len(gids) == 0 { + return setgroups(0, nil) + } + + a := make([]_Gid_t, len(gids)) + for i, v := range gids { + a[i] = _Gid_t(v) + } + return setgroups(len(a), &a[0]) +} + +func ReadDirent(fd int, buf []byte) (n int, err error) { + // Final argument is (basep *uintptr) and the syscall doesn't take nil. + // TODO(rsc): Can we use a single global basep for all calls? + return Getdents(fd, buf, new(uintptr)) +} + +// Wait status is 7 bits at bottom, either 0 (exited), +// 0x7F (stopped), or a signal number that caused an exit. +// The 0x80 bit is whether there was a core dump. +// An extra number (exit code, signal causing a stop) +// is in the high bits. + +type WaitStatus uint32 + +const ( + mask = 0x7F + core = 0x80 + shift = 8 + + exited = 0 + stopped = 0x7F +) + +func (w WaitStatus) Exited() bool { return w&mask == exited } + +func (w WaitStatus) ExitStatus() int { + if w&mask != exited { + return -1 + } + return int(w >> shift) +} + +func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 } + +func (w WaitStatus) Signal() syscall.Signal { + sig := syscall.Signal(w & mask) + if sig == stopped || sig == 0 { + return -1 + } + return sig +} + +func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 } + +func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP } + +func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP } + +func (w WaitStatus) StopSignal() syscall.Signal { + if !w.Stopped() { + return -1 + } + return syscall.Signal(w>>shift) & 0xFF +} + +func (w WaitStatus) TrapCause() int { return -1 } + +func wait4(pid uintptr, wstatus *WaitStatus, options uintptr, rusage *Rusage) (wpid uintptr, err uintptr) + +func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) { + r0, e1 := wait4(uintptr(pid), wstatus, uintptr(options), rusage) + if e1 != 0 { + err = syscall.Errno(e1) + } + return int(r0), err +} + +func gethostname() (name string, err uintptr) + +func Gethostname() (name string, err error) { + name, e1 := gethostname() + if e1 != 0 { + err = syscall.Errno(e1) + } + return name, err +} + +//sys utimes(path string, times *[2]Timeval) (err error) + +func Utimes(path string, tv []Timeval) (err error) { + if tv == nil { + return utimes(path, nil) + } + if len(tv) != 2 { + return EINVAL + } + return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +//sys utimensat(fd int, path string, times *[2]Timespec, flag int) (err error) + +func UtimesNano(path string, ts []Timespec) error { + if ts == nil { + return utimensat(AT_FDCWD, path, nil, 0) + } + if len(ts) != 2 { + return EINVAL + } + return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0) +} + +func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error { + if ts == nil { + return utimensat(dirfd, path, nil, flags) + } + if len(ts) != 2 { + return EINVAL + } + return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags) +} + +//sys fcntl(fd int, cmd int, arg int) (val int, err error) + +// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. +func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(lk)), 0, 0, 0) + if e1 != 0 { + return e1 + } + return nil +} + +//sys futimesat(fildes int, path *byte, times *[2]Timeval) (err error) + +func Futimesat(dirfd int, path string, tv []Timeval) error { + pathp, err := BytePtrFromString(path) + if err != nil { + return err + } + if tv == nil { + return futimesat(dirfd, pathp, nil) + } + if len(tv) != 2 { + return EINVAL + } + return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +// Solaris doesn't have an futimes function because it allows NULL to be +// specified as the path for futimesat. However, Go doesn't like +// NULL-style string interfaces, so this simple wrapper is provided. +func Futimes(fd int, tv []Timeval) error { + if tv == nil { + return futimesat(fd, nil, nil) + } + if len(tv) != 2 { + return EINVAL + } + return futimesat(fd, nil, (*[2]Timeval)(unsafe.Pointer(&tv[0]))) +} + +func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) { + switch rsa.Addr.Family { + case AF_UNIX: + pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa)) + sa := new(SockaddrUnix) + // Assume path ends at NUL. + // This is not technically the Solaris semantics for + // abstract Unix domain sockets -- they are supposed + // to be uninterpreted fixed-size binary blobs -- but + // everyone uses this convention. + n := 0 + for n < len(pp.Path) && pp.Path[n] != 0 { + n++ + } + bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n] + sa.Name = string(bytes) + return sa, nil + + case AF_INET: + pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet4) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + + case AF_INET6: + pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet6) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + sa.ZoneId = pp.Scope_id + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + } + return nil, EAFNOSUPPORT +} + +//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = libsocket.accept + +func Accept(fd int) (nfd int, sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + nfd, err = accept(fd, &rsa, &len) + if nfd == -1 { + return + } + sa, err = anyToSockaddr(&rsa) + if err != nil { + Close(nfd) + nfd = 0 + } + return +} + +//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.recvmsg + +func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) { + var msg Msghdr + var rsa RawSockaddrAny + msg.Name = (*byte)(unsafe.Pointer(&rsa)) + msg.Namelen = uint32(SizeofSockaddrAny) + var iov Iovec + if len(p) > 0 { + iov.Base = (*int8)(unsafe.Pointer(&p[0])) + iov.SetLen(len(p)) + } + var dummy int8 + if len(oob) > 0 { + // receive at least one normal byte + if len(p) == 0 { + iov.Base = &dummy + iov.SetLen(1) + } + msg.Accrights = (*int8)(unsafe.Pointer(&oob[0])) + } + msg.Iov = &iov + msg.Iovlen = 1 + if n, err = recvmsg(fd, &msg, flags); n == -1 { + return + } + oobn = int(msg.Accrightslen) + // source address is only specified if the socket is unconnected + if rsa.Addr.Family != AF_UNSPEC { + from, err = anyToSockaddr(&rsa) + } + return +} + +func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) { + _, err = SendmsgN(fd, p, oob, to, flags) + return +} + +//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.sendmsg + +func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) { + var ptr unsafe.Pointer + var salen _Socklen + if to != nil { + ptr, salen, err = to.sockaddr() + if err != nil { + return 0, err + } + } + var msg Msghdr + msg.Name = (*byte)(unsafe.Pointer(ptr)) + msg.Namelen = uint32(salen) + var iov Iovec + if len(p) > 0 { + iov.Base = (*int8)(unsafe.Pointer(&p[0])) + iov.SetLen(len(p)) + } + var dummy int8 + if len(oob) > 0 { + // send at least one normal byte + if len(p) == 0 { + iov.Base = &dummy + iov.SetLen(1) + } + msg.Accrights = (*int8)(unsafe.Pointer(&oob[0])) + } + msg.Iov = &iov + msg.Iovlen = 1 + if n, err = sendmsg(fd, &msg, flags); err != nil { + return 0, err + } + if len(oob) > 0 && len(p) == 0 { + n = 0 + } + return n, nil +} + +//sys acct(path *byte) (err error) + +func Acct(path string) (err error) { + if len(path) == 0 { + // Assume caller wants to disable accounting. + return acct(nil) + } + + pathp, err := BytePtrFromString(path) + if err != nil { + return err + } + return acct(pathp) +} + +/* + * Expose the ioctl function + */ + +//sys ioctl(fd int, req int, arg uintptr) (err error) + +func IoctlSetInt(fd int, req int, value int) (err error) { + return ioctl(fd, req, uintptr(value)) +} + +func IoctlSetWinsize(fd int, req int, value *Winsize) (err error) { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +func IoctlSetTermios(fd int, req int, value *Termios) (err error) { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +func IoctlSetTermio(fd int, req int, value *Termio) (err error) { + return ioctl(fd, req, uintptr(unsafe.Pointer(value))) +} + +func IoctlGetInt(fd int, req int) (int, error) { + var value int + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return value, err +} + +func IoctlGetWinsize(fd int, req int) (*Winsize, error) { + var value Winsize + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +func IoctlGetTermios(fd int, req int) (*Termios, error) { + var value Termios + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +func IoctlGetTermio(fd int, req int) (*Termio, error) { + var value Termio + err := ioctl(fd, req, uintptr(unsafe.Pointer(&value))) + return &value, err +} + +/* + * Exposed directly + */ +//sys Access(path string, mode uint32) (err error) +//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error) +//sys Chdir(path string) (err error) +//sys Chmod(path string, mode uint32) (err error) +//sys Chown(path string, uid int, gid int) (err error) +//sys Chroot(path string) (err error) +//sys Close(fd int) (err error) +//sys Creat(path string, mode uint32) (fd int, err error) +//sys Dup(fd int) (nfd int, err error) +//sys Dup2(oldfd int, newfd int) (err error) +//sys Exit(code int) +//sys Fchdir(fd int) (err error) +//sys Fchmod(fd int, mode uint32) (err error) +//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) +//sys Fchown(fd int, uid int, gid int) (err error) +//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) +//sys Fdatasync(fd int) (err error) +//sys Fpathconf(fd int, name int) (val int, err error) +//sys Fstat(fd int, stat *Stat_t) (err error) +//sys Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) +//sysnb Getgid() (gid int) +//sysnb Getpid() (pid int) +//sysnb Getpgid(pid int) (pgid int, err error) +//sysnb Getpgrp() (pgid int, err error) +//sys Geteuid() (euid int) +//sys Getegid() (egid int) +//sys Getppid() (ppid int) +//sys Getpriority(which int, who int) (n int, err error) +//sysnb Getrlimit(which int, lim *Rlimit) (err error) +//sysnb Getrusage(who int, rusage *Rusage) (err error) +//sysnb Gettimeofday(tv *Timeval) (err error) +//sysnb Getuid() (uid int) +//sys Kill(pid int, signum syscall.Signal) (err error) +//sys Lchown(path string, uid int, gid int) (err error) +//sys Link(path string, link string) (err error) +//sys Listen(s int, backlog int) (err error) = libsocket.listen +//sys Lstat(path string, stat *Stat_t) (err error) +//sys Madvise(b []byte, advice int) (err error) +//sys Mkdir(path string, mode uint32) (err error) +//sys Mkdirat(dirfd int, path string, mode uint32) (err error) +//sys Mkfifo(path string, mode uint32) (err error) +//sys Mkfifoat(dirfd int, path string, mode uint32) (err error) +//sys Mknod(path string, mode uint32, dev int) (err error) +//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) +//sys Mlock(b []byte) (err error) +//sys Mlockall(flags int) (err error) +//sys Mprotect(b []byte, prot int) (err error) +//sys Munlock(b []byte) (err error) +//sys Munlockall() (err error) +//sys Nanosleep(time *Timespec, leftover *Timespec) (err error) +//sys Open(path string, mode int, perm uint32) (fd int, err error) +//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) +//sys Pathconf(path string, name int) (val int, err error) +//sys Pause() (err error) +//sys Pread(fd int, p []byte, offset int64) (n int, err error) +//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) +//sys read(fd int, p []byte) (n int, err error) +//sys Readlink(path string, buf []byte) (n int, err error) +//sys Rename(from string, to string) (err error) +//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) +//sys Rmdir(path string) (err error) +//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = lseek +//sysnb Setegid(egid int) (err error) +//sysnb Seteuid(euid int) (err error) +//sysnb Setgid(gid int) (err error) +//sys Sethostname(p []byte) (err error) +//sysnb Setpgid(pid int, pgid int) (err error) +//sys Setpriority(which int, who int, prio int) (err error) +//sysnb Setregid(rgid int, egid int) (err error) +//sysnb Setreuid(ruid int, euid int) (err error) +//sysnb Setrlimit(which int, lim *Rlimit) (err error) +//sysnb Setsid() (pid int, err error) +//sysnb Setuid(uid int) (err error) +//sys Shutdown(s int, how int) (err error) = libsocket.shutdown +//sys Stat(path string, stat *Stat_t) (err error) +//sys Symlink(path string, link string) (err error) +//sys Sync() (err error) +//sysnb Times(tms *Tms) (ticks uintptr, err error) +//sys Truncate(path string, length int64) (err error) +//sys Fsync(fd int) (err error) +//sys Ftruncate(fd int, length int64) (err error) +//sys Umask(mask int) (oldmask int) +//sysnb Uname(buf *Utsname) (err error) +//sys Unmount(target string, flags int) (err error) = libc.umount +//sys Unlink(path string) (err error) +//sys Unlinkat(dirfd int, path string, flags int) (err error) +//sys Ustat(dev int, ubuf *Ustat_t) (err error) +//sys Utime(path string, buf *Utimbuf) (err error) +//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.bind +//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.connect +//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) +//sys munmap(addr uintptr, length uintptr) (err error) +//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.sendto +//sys socket(domain int, typ int, proto int) (fd int, err error) = libsocket.socket +//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.socketpair +//sys write(fd int, p []byte) (n int, err error) +//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) = libsocket.getsockopt +//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getpeername +//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) = libsocket.setsockopt +//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = libsocket.recvfrom + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +var mapper = &mmapper{ + active: make(map[*byte][]byte), + mmap: mmap, + munmap: munmap, +} + +func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { + return mapper.Mmap(fd, offset, length, prot, flags) +} + +func Munmap(b []byte) (err error) { + return mapper.Munmap(b) +} + +//sys sysconf(name int) (n int64, err error) + +// pageSize caches the value of Getpagesize, since it can't change +// once the system is booted. +var pageSize int64 // accessed atomically + +func Getpagesize() int { + n := atomic.LoadInt64(&pageSize) + if n == 0 { + n, _ = sysconf(_SC_PAGESIZE) + atomic.StoreInt64(&pageSize, n) + } + return int(n) +} diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go new file mode 100644 index 000000000..5aff62c3b --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go @@ -0,0 +1,35 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,solaris + +package unix + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + nsec += 999 // round up to microsecond + tv.Usec = nsec % 1e9 / 1e3 + tv.Sec = int64(nsec / 1e9) + return +} + +func (iov *Iovec) SetLen(length int) { + iov.Len = uint64(length) +} + +func (cmsg *Cmsghdr) SetLen(length int) { + cmsg.Len = uint32(length) +} + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + // TODO(aram): implement this, see issue 5847. + panic("unimplemented") +} diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go new file mode 100644 index 000000000..b46b25028 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -0,0 +1,297 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build darwin dragonfly freebsd linux netbsd openbsd solaris + +package unix + +import ( + "runtime" + "sync" + "syscall" + "unsafe" +) + +var ( + Stdin = 0 + Stdout = 1 + Stderr = 2 +) + +const ( + darwin64Bit = runtime.GOOS == "darwin" && sizeofPtr == 8 + dragonfly64Bit = runtime.GOOS == "dragonfly" && sizeofPtr == 8 + netbsd32Bit = runtime.GOOS == "netbsd" && sizeofPtr == 4 +) + +// Do the interface allocations only once for common +// Errno values. +var ( + errEAGAIN error = syscall.EAGAIN + errEINVAL error = syscall.EINVAL + errENOENT error = syscall.ENOENT +) + +// errnoErr returns common boxed Errno values, to prevent +// allocations at runtime. +func errnoErr(e syscall.Errno) error { + switch e { + case 0: + return nil + case EAGAIN: + return errEAGAIN + case EINVAL: + return errEINVAL + case ENOENT: + return errENOENT + } + return e +} + +func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) +func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) +func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) +func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) + +// Mmap manager, for use by operating system-specific implementations. + +type mmapper struct { + sync.Mutex + active map[*byte][]byte // active mappings; key is last byte in mapping + mmap func(addr, length uintptr, prot, flags, fd int, offset int64) (uintptr, error) + munmap func(addr uintptr, length uintptr) error +} + +func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) { + if length <= 0 { + return nil, EINVAL + } + + // Map the requested memory. + addr, errno := m.mmap(0, uintptr(length), prot, flags, fd, offset) + if errno != nil { + return nil, errno + } + + // Slice memory layout + var sl = struct { + addr uintptr + len int + cap int + }{addr, length, length} + + // Use unsafe to turn sl into a []byte. + b := *(*[]byte)(unsafe.Pointer(&sl)) + + // Register mapping in m and return it. + p := &b[cap(b)-1] + m.Lock() + defer m.Unlock() + m.active[p] = b + return b, nil +} + +func (m *mmapper) Munmap(data []byte) (err error) { + if len(data) == 0 || len(data) != cap(data) { + return EINVAL + } + + // Find the base of the mapping. + p := &data[cap(data)-1] + m.Lock() + defer m.Unlock() + b := m.active[p] + if b == nil || &b[0] != &data[0] { + return EINVAL + } + + // Unmap the memory and update m. + if errno := m.munmap(uintptr(unsafe.Pointer(&b[0])), uintptr(len(b))); errno != nil { + return errno + } + delete(m.active, p) + return nil +} + +func Read(fd int, p []byte) (n int, err error) { + n, err = read(fd, p) + if raceenabled { + if n > 0 { + raceWriteRange(unsafe.Pointer(&p[0]), n) + } + if err == nil { + raceAcquire(unsafe.Pointer(&ioSync)) + } + } + return +} + +func Write(fd int, p []byte) (n int, err error) { + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + n, err = write(fd, p) + if raceenabled && n > 0 { + raceReadRange(unsafe.Pointer(&p[0]), n) + } + return +} + +// For testing: clients can set this flag to force +// creation of IPv6 sockets to return EAFNOSUPPORT. +var SocketDisableIPv6 bool + +type Sockaddr interface { + sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs +} + +type SockaddrInet4 struct { + Port int + Addr [4]byte + raw RawSockaddrInet4 +} + +type SockaddrInet6 struct { + Port int + ZoneId uint32 + Addr [16]byte + raw RawSockaddrInet6 +} + +type SockaddrUnix struct { + Name string + raw RawSockaddrUnix +} + +func Bind(fd int, sa Sockaddr) (err error) { + ptr, n, err := sa.sockaddr() + if err != nil { + return err + } + return bind(fd, ptr, n) +} + +func Connect(fd int, sa Sockaddr) (err error) { + ptr, n, err := sa.sockaddr() + if err != nil { + return err + } + return connect(fd, ptr, n) +} + +func Getpeername(fd int) (sa Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + if err = getpeername(fd, &rsa, &len); err != nil { + return + } + return anyToSockaddr(&rsa) +} + +func GetsockoptInt(fd, level, opt int) (value int, err error) { + var n int32 + vallen := _Socklen(4) + err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen) + return int(n), err +} + +func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) { + var rsa RawSockaddrAny + var len _Socklen = SizeofSockaddrAny + if n, err = recvfrom(fd, p, flags, &rsa, &len); err != nil { + return + } + if rsa.Addr.Family != AF_UNSPEC { + from, err = anyToSockaddr(&rsa) + } + return +} + +func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) { + ptr, n, err := to.sockaddr() + if err != nil { + return err + } + return sendto(fd, p, flags, ptr, n) +} + +func SetsockoptByte(fd, level, opt int, value byte) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(&value), 1) +} + +func SetsockoptInt(fd, level, opt int, value int) (err error) { + var n = int32(value) + return setsockopt(fd, level, opt, unsafe.Pointer(&n), 4) +} + +func SetsockoptInet4Addr(fd, level, opt int, value [4]byte) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(&value[0]), 4) +} + +func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPMreq) +} + +func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPv6Mreq) +} + +func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error { + return setsockopt(fd, level, opt, unsafe.Pointer(filter), SizeofICMPv6Filter) +} + +func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(l), SizeofLinger) +} + +func SetsockoptString(fd, level, opt int, s string) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(&[]byte(s)[0]), uintptr(len(s))) +} + +func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) { + return setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv)) +} + +func Socket(domain, typ, proto int) (fd int, err error) { + if domain == AF_INET6 && SocketDisableIPv6 { + return -1, EAFNOSUPPORT + } + fd, err = socket(domain, typ, proto) + return +} + +func Socketpair(domain, typ, proto int) (fd [2]int, err error) { + var fdx [2]int32 + err = socketpair(domain, typ, proto, &fdx) + if err == nil { + fd[0] = int(fdx[0]) + fd[1] = int(fdx[1]) + } + return +} + +func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + return sendfile(outfd, infd, offset, count) +} + +var ioSync int64 + +func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) } + +func SetNonblock(fd int, nonblocking bool) (err error) { + flag, err := fcntl(fd, F_GETFL, 0) + if err != nil { + return err + } + if nonblocking { + flag |= O_NONBLOCK + } else { + flag &= ^O_NONBLOCK + } + _, err = fcntl(fd, F_SETFL, flag) + return err +} diff --git a/vendor/golang.org/x/sys/unix/types_darwin.go b/vendor/golang.org/x/sys/unix/types_darwin.go new file mode 100644 index 000000000..115326182 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_darwin.go @@ -0,0 +1,250 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +Input to cgo -godefs. See also mkerrors.sh and mkall.sh +*/ + +// +godefs map struct_in_addr [4]byte /* in_addr */ +// +godefs map struct_in6_addr [16]byte /* in6_addr */ + +package unix + +/* +#define __DARWIN_UNIX03 0 +#define KERNEL +#define _DARWIN_USE_64_BIT_INODE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + sizeofPtr = sizeof(void*), +}; + +union sockaddr_all { + struct sockaddr s1; // this one gets used for fields + struct sockaddr_in s2; // these pad it out + struct sockaddr_in6 s3; + struct sockaddr_un s4; + struct sockaddr_dl s5; +}; + +struct sockaddr_any { + struct sockaddr addr; + char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; +}; + +*/ +import "C" + +// Machine characteristics; for internal use. + +const ( + sizeofPtr = C.sizeofPtr + sizeofShort = C.sizeof_short + sizeofInt = C.sizeof_int + sizeofLong = C.sizeof_long + sizeofLongLong = C.sizeof_longlong +) + +// Basic types + +type ( + _C_short C.short + _C_int C.int + _C_long C.long + _C_long_long C.longlong +) + +// Time + +type Timespec C.struct_timespec + +type Timeval C.struct_timeval + +type Timeval32 C.struct_timeval32 + +// Processes + +type Rusage C.struct_rusage + +type Rlimit C.struct_rlimit + +type _Gid_t C.gid_t + +// Files + +type Stat_t C.struct_stat64 + +type Statfs_t C.struct_statfs64 + +type Flock_t C.struct_flock + +type Fstore_t C.struct_fstore + +type Radvisory_t C.struct_radvisory + +type Fbootstraptransfer_t C.struct_fbootstraptransfer + +type Log2phys_t C.struct_log2phys + +type Fsid C.struct_fsid + +type Dirent C.struct_dirent + +// Sockets + +type RawSockaddrInet4 C.struct_sockaddr_in + +type RawSockaddrInet6 C.struct_sockaddr_in6 + +type RawSockaddrUnix C.struct_sockaddr_un + +type RawSockaddrDatalink C.struct_sockaddr_dl + +type RawSockaddr C.struct_sockaddr + +type RawSockaddrAny C.struct_sockaddr_any + +type _Socklen C.socklen_t + +type Linger C.struct_linger + +type Iovec C.struct_iovec + +type IPMreq C.struct_ip_mreq + +type IPv6Mreq C.struct_ipv6_mreq + +type Msghdr C.struct_msghdr + +type Cmsghdr C.struct_cmsghdr + +type Inet4Pktinfo C.struct_in_pktinfo + +type Inet6Pktinfo C.struct_in6_pktinfo + +type IPv6MTUInfo C.struct_ip6_mtuinfo + +type ICMPv6Filter C.struct_icmp6_filter + +const ( + SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in + SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 + SizeofSockaddrAny = C.sizeof_struct_sockaddr_any + SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un + SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl + SizeofLinger = C.sizeof_struct_linger + SizeofIPMreq = C.sizeof_struct_ip_mreq + SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofMsghdr = C.sizeof_struct_msghdr + SizeofCmsghdr = C.sizeof_struct_cmsghdr + SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo + SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo + SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo + SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter +) + +// Ptrace requests + +const ( + PTRACE_TRACEME = C.PT_TRACE_ME + PTRACE_CONT = C.PT_CONTINUE + PTRACE_KILL = C.PT_KILL +) + +// Events (kqueue, kevent) + +type Kevent_t C.struct_kevent + +// Select + +type FdSet C.fd_set + +// Routing and interface messages + +const ( + SizeofIfMsghdr = C.sizeof_struct_if_msghdr + SizeofIfData = C.sizeof_struct_if_data + SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr + SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr + SizeofIfmaMsghdr2 = C.sizeof_struct_ifma_msghdr2 + SizeofRtMsghdr = C.sizeof_struct_rt_msghdr + SizeofRtMetrics = C.sizeof_struct_rt_metrics +) + +type IfMsghdr C.struct_if_msghdr + +type IfData C.struct_if_data + +type IfaMsghdr C.struct_ifa_msghdr + +type IfmaMsghdr C.struct_ifma_msghdr + +type IfmaMsghdr2 C.struct_ifma_msghdr2 + +type RtMsghdr C.struct_rt_msghdr + +type RtMetrics C.struct_rt_metrics + +// Berkeley packet filter + +const ( + SizeofBpfVersion = C.sizeof_struct_bpf_version + SizeofBpfStat = C.sizeof_struct_bpf_stat + SizeofBpfProgram = C.sizeof_struct_bpf_program + SizeofBpfInsn = C.sizeof_struct_bpf_insn + SizeofBpfHdr = C.sizeof_struct_bpf_hdr +) + +type BpfVersion C.struct_bpf_version + +type BpfStat C.struct_bpf_stat + +type BpfProgram C.struct_bpf_program + +type BpfInsn C.struct_bpf_insn + +type BpfHdr C.struct_bpf_hdr + +// Terminal handling + +type Termios C.struct_termios + +// fchmodat-like syscalls. + +const ( + AT_FDCWD = C.AT_FDCWD + AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW +) diff --git a/vendor/golang.org/x/sys/unix/types_dragonfly.go b/vendor/golang.org/x/sys/unix/types_dragonfly.go new file mode 100644 index 000000000..f3c971dff --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_dragonfly.go @@ -0,0 +1,242 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +Input to cgo -godefs. See also mkerrors.sh and mkall.sh +*/ + +// +godefs map struct_in_addr [4]byte /* in_addr */ +// +godefs map struct_in6_addr [16]byte /* in6_addr */ + +package unix + +/* +#define KERNEL +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + sizeofPtr = sizeof(void*), +}; + +union sockaddr_all { + struct sockaddr s1; // this one gets used for fields + struct sockaddr_in s2; // these pad it out + struct sockaddr_in6 s3; + struct sockaddr_un s4; + struct sockaddr_dl s5; +}; + +struct sockaddr_any { + struct sockaddr addr; + char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; +}; + +*/ +import "C" + +// Machine characteristics; for internal use. + +const ( + sizeofPtr = C.sizeofPtr + sizeofShort = C.sizeof_short + sizeofInt = C.sizeof_int + sizeofLong = C.sizeof_long + sizeofLongLong = C.sizeof_longlong +) + +// Basic types + +type ( + _C_short C.short + _C_int C.int + _C_long C.long + _C_long_long C.longlong +) + +// Time + +type Timespec C.struct_timespec + +type Timeval C.struct_timeval + +// Processes + +type Rusage C.struct_rusage + +type Rlimit C.struct_rlimit + +type _Gid_t C.gid_t + +// Files + +const ( // Directory mode bits + S_IFMT = C.S_IFMT + S_IFIFO = C.S_IFIFO + S_IFCHR = C.S_IFCHR + S_IFDIR = C.S_IFDIR + S_IFBLK = C.S_IFBLK + S_IFREG = C.S_IFREG + S_IFLNK = C.S_IFLNK + S_IFSOCK = C.S_IFSOCK + S_ISUID = C.S_ISUID + S_ISGID = C.S_ISGID + S_ISVTX = C.S_ISVTX + S_IRUSR = C.S_IRUSR + S_IWUSR = C.S_IWUSR + S_IXUSR = C.S_IXUSR +) + +type Stat_t C.struct_stat + +type Statfs_t C.struct_statfs + +type Flock_t C.struct_flock + +type Dirent C.struct_dirent + +type Fsid C.struct_fsid + +// Sockets + +type RawSockaddrInet4 C.struct_sockaddr_in + +type RawSockaddrInet6 C.struct_sockaddr_in6 + +type RawSockaddrUnix C.struct_sockaddr_un + +type RawSockaddrDatalink C.struct_sockaddr_dl + +type RawSockaddr C.struct_sockaddr + +type RawSockaddrAny C.struct_sockaddr_any + +type _Socklen C.socklen_t + +type Linger C.struct_linger + +type Iovec C.struct_iovec + +type IPMreq C.struct_ip_mreq + +type IPv6Mreq C.struct_ipv6_mreq + +type Msghdr C.struct_msghdr + +type Cmsghdr C.struct_cmsghdr + +type Inet6Pktinfo C.struct_in6_pktinfo + +type IPv6MTUInfo C.struct_ip6_mtuinfo + +type ICMPv6Filter C.struct_icmp6_filter + +const ( + SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in + SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 + SizeofSockaddrAny = C.sizeof_struct_sockaddr_any + SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un + SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl + SizeofLinger = C.sizeof_struct_linger + SizeofIPMreq = C.sizeof_struct_ip_mreq + SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofMsghdr = C.sizeof_struct_msghdr + SizeofCmsghdr = C.sizeof_struct_cmsghdr + SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo + SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo + SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter +) + +// Ptrace requests + +const ( + PTRACE_TRACEME = C.PT_TRACE_ME + PTRACE_CONT = C.PT_CONTINUE + PTRACE_KILL = C.PT_KILL +) + +// Events (kqueue, kevent) + +type Kevent_t C.struct_kevent + +// Select + +type FdSet C.fd_set + +// Routing and interface messages + +const ( + SizeofIfMsghdr = C.sizeof_struct_if_msghdr + SizeofIfData = C.sizeof_struct_if_data + SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr + SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr + SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr + SizeofRtMsghdr = C.sizeof_struct_rt_msghdr + SizeofRtMetrics = C.sizeof_struct_rt_metrics +) + +type IfMsghdr C.struct_if_msghdr + +type IfData C.struct_if_data + +type IfaMsghdr C.struct_ifa_msghdr + +type IfmaMsghdr C.struct_ifma_msghdr + +type IfAnnounceMsghdr C.struct_if_announcemsghdr + +type RtMsghdr C.struct_rt_msghdr + +type RtMetrics C.struct_rt_metrics + +// Berkeley packet filter + +const ( + SizeofBpfVersion = C.sizeof_struct_bpf_version + SizeofBpfStat = C.sizeof_struct_bpf_stat + SizeofBpfProgram = C.sizeof_struct_bpf_program + SizeofBpfInsn = C.sizeof_struct_bpf_insn + SizeofBpfHdr = C.sizeof_struct_bpf_hdr +) + +type BpfVersion C.struct_bpf_version + +type BpfStat C.struct_bpf_stat + +type BpfProgram C.struct_bpf_program + +type BpfInsn C.struct_bpf_insn + +type BpfHdr C.struct_bpf_hdr + +// Terminal handling + +type Termios C.struct_termios diff --git a/vendor/golang.org/x/sys/unix/types_freebsd.go b/vendor/golang.org/x/sys/unix/types_freebsd.go new file mode 100644 index 000000000..ae24557ad --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_freebsd.go @@ -0,0 +1,353 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +Input to cgo -godefs. See also mkerrors.sh and mkall.sh +*/ + +// +godefs map struct_in_addr [4]byte /* in_addr */ +// +godefs map struct_in6_addr [16]byte /* in6_addr */ + +package unix + +/* +#define KERNEL +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + sizeofPtr = sizeof(void*), +}; + +union sockaddr_all { + struct sockaddr s1; // this one gets used for fields + struct sockaddr_in s2; // these pad it out + struct sockaddr_in6 s3; + struct sockaddr_un s4; + struct sockaddr_dl s5; +}; + +struct sockaddr_any { + struct sockaddr addr; + char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; +}; + +// This structure is a duplicate of stat on FreeBSD 8-STABLE. +// See /usr/include/sys/stat.h. +struct stat8 { +#undef st_atimespec st_atim +#undef st_mtimespec st_mtim +#undef st_ctimespec st_ctim +#undef st_birthtimespec st_birthtim + __dev_t st_dev; + ino_t st_ino; + mode_t st_mode; + nlink_t st_nlink; + uid_t st_uid; + gid_t st_gid; + __dev_t st_rdev; +#if __BSD_VISIBLE + struct timespec st_atimespec; + struct timespec st_mtimespec; + struct timespec st_ctimespec; +#else + time_t st_atime; + long __st_atimensec; + time_t st_mtime; + long __st_mtimensec; + time_t st_ctime; + long __st_ctimensec; +#endif + off_t st_size; + blkcnt_t st_blocks; + blksize_t st_blksize; + fflags_t st_flags; + __uint32_t st_gen; + __int32_t st_lspare; +#if __BSD_VISIBLE + struct timespec st_birthtimespec; + unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); + unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec)); +#else + time_t st_birthtime; + long st_birthtimensec; + unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); + unsigned int :(8 / 2) * (16 - (int)sizeof(struct __timespec)); +#endif +}; + +// This structure is a duplicate of if_data on FreeBSD 8-STABLE. +// See /usr/include/net/if.h. +struct if_data8 { + u_char ifi_type; + u_char ifi_physical; + u_char ifi_addrlen; + u_char ifi_hdrlen; + u_char ifi_link_state; + u_char ifi_spare_char1; + u_char ifi_spare_char2; + u_char ifi_datalen; + u_long ifi_mtu; + u_long ifi_metric; + u_long ifi_baudrate; + u_long ifi_ipackets; + u_long ifi_ierrors; + u_long ifi_opackets; + u_long ifi_oerrors; + u_long ifi_collisions; + u_long ifi_ibytes; + u_long ifi_obytes; + u_long ifi_imcasts; + u_long ifi_omcasts; + u_long ifi_iqdrops; + u_long ifi_noproto; + u_long ifi_hwassist; + time_t ifi_epoch; + struct timeval ifi_lastchange; +}; + +// This structure is a duplicate of if_msghdr on FreeBSD 8-STABLE. +// See /usr/include/net/if.h. +struct if_msghdr8 { + u_short ifm_msglen; + u_char ifm_version; + u_char ifm_type; + int ifm_addrs; + int ifm_flags; + u_short ifm_index; + struct if_data8 ifm_data; +}; +*/ +import "C" + +// Machine characteristics; for internal use. + +const ( + sizeofPtr = C.sizeofPtr + sizeofShort = C.sizeof_short + sizeofInt = C.sizeof_int + sizeofLong = C.sizeof_long + sizeofLongLong = C.sizeof_longlong +) + +// Basic types + +type ( + _C_short C.short + _C_int C.int + _C_long C.long + _C_long_long C.longlong +) + +// Time + +type Timespec C.struct_timespec + +type Timeval C.struct_timeval + +// Processes + +type Rusage C.struct_rusage + +type Rlimit C.struct_rlimit + +type _Gid_t C.gid_t + +// Files + +const ( // Directory mode bits + S_IFMT = C.S_IFMT + S_IFIFO = C.S_IFIFO + S_IFCHR = C.S_IFCHR + S_IFDIR = C.S_IFDIR + S_IFBLK = C.S_IFBLK + S_IFREG = C.S_IFREG + S_IFLNK = C.S_IFLNK + S_IFSOCK = C.S_IFSOCK + S_ISUID = C.S_ISUID + S_ISGID = C.S_ISGID + S_ISVTX = C.S_ISVTX + S_IRUSR = C.S_IRUSR + S_IWUSR = C.S_IWUSR + S_IXUSR = C.S_IXUSR +) + +type Stat_t C.struct_stat8 + +type Statfs_t C.struct_statfs + +type Flock_t C.struct_flock + +type Dirent C.struct_dirent + +type Fsid C.struct_fsid + +// Advice to Fadvise + +const ( + FADV_NORMAL = C.POSIX_FADV_NORMAL + FADV_RANDOM = C.POSIX_FADV_RANDOM + FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL + FADV_WILLNEED = C.POSIX_FADV_WILLNEED + FADV_DONTNEED = C.POSIX_FADV_DONTNEED + FADV_NOREUSE = C.POSIX_FADV_NOREUSE +) + +// Sockets + +type RawSockaddrInet4 C.struct_sockaddr_in + +type RawSockaddrInet6 C.struct_sockaddr_in6 + +type RawSockaddrUnix C.struct_sockaddr_un + +type RawSockaddrDatalink C.struct_sockaddr_dl + +type RawSockaddr C.struct_sockaddr + +type RawSockaddrAny C.struct_sockaddr_any + +type _Socklen C.socklen_t + +type Linger C.struct_linger + +type Iovec C.struct_iovec + +type IPMreq C.struct_ip_mreq + +type IPMreqn C.struct_ip_mreqn + +type IPv6Mreq C.struct_ipv6_mreq + +type Msghdr C.struct_msghdr + +type Cmsghdr C.struct_cmsghdr + +type Inet6Pktinfo C.struct_in6_pktinfo + +type IPv6MTUInfo C.struct_ip6_mtuinfo + +type ICMPv6Filter C.struct_icmp6_filter + +const ( + SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in + SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 + SizeofSockaddrAny = C.sizeof_struct_sockaddr_any + SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un + SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl + SizeofLinger = C.sizeof_struct_linger + SizeofIPMreq = C.sizeof_struct_ip_mreq + SizeofIPMreqn = C.sizeof_struct_ip_mreqn + SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofMsghdr = C.sizeof_struct_msghdr + SizeofCmsghdr = C.sizeof_struct_cmsghdr + SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo + SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo + SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter +) + +// Ptrace requests + +const ( + PTRACE_TRACEME = C.PT_TRACE_ME + PTRACE_CONT = C.PT_CONTINUE + PTRACE_KILL = C.PT_KILL +) + +// Events (kqueue, kevent) + +type Kevent_t C.struct_kevent + +// Select + +type FdSet C.fd_set + +// Routing and interface messages + +const ( + sizeofIfMsghdr = C.sizeof_struct_if_msghdr + SizeofIfMsghdr = C.sizeof_struct_if_msghdr8 + sizeofIfData = C.sizeof_struct_if_data + SizeofIfData = C.sizeof_struct_if_data8 + SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr + SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr + SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr + SizeofRtMsghdr = C.sizeof_struct_rt_msghdr + SizeofRtMetrics = C.sizeof_struct_rt_metrics +) + +type ifMsghdr C.struct_if_msghdr + +type IfMsghdr C.struct_if_msghdr8 + +type ifData C.struct_if_data + +type IfData C.struct_if_data8 + +type IfaMsghdr C.struct_ifa_msghdr + +type IfmaMsghdr C.struct_ifma_msghdr + +type IfAnnounceMsghdr C.struct_if_announcemsghdr + +type RtMsghdr C.struct_rt_msghdr + +type RtMetrics C.struct_rt_metrics + +// Berkeley packet filter + +const ( + SizeofBpfVersion = C.sizeof_struct_bpf_version + SizeofBpfStat = C.sizeof_struct_bpf_stat + SizeofBpfZbuf = C.sizeof_struct_bpf_zbuf + SizeofBpfProgram = C.sizeof_struct_bpf_program + SizeofBpfInsn = C.sizeof_struct_bpf_insn + SizeofBpfHdr = C.sizeof_struct_bpf_hdr + SizeofBpfZbufHeader = C.sizeof_struct_bpf_zbuf_header +) + +type BpfVersion C.struct_bpf_version + +type BpfStat C.struct_bpf_stat + +type BpfZbuf C.struct_bpf_zbuf + +type BpfProgram C.struct_bpf_program + +type BpfInsn C.struct_bpf_insn + +type BpfHdr C.struct_bpf_hdr + +type BpfZbufHeader C.struct_bpf_zbuf_header + +// Terminal handling + +type Termios C.struct_termios diff --git a/vendor/golang.org/x/sys/unix/types_linux.go b/vendor/golang.org/x/sys/unix/types_linux.go new file mode 100644 index 000000000..7dea79a8e --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_linux.go @@ -0,0 +1,450 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +Input to cgo -godefs. See also mkerrors.sh and mkall.sh +*/ + +// +godefs map struct_in_addr [4]byte /* in_addr */ +// +godefs map struct_in6_addr [16]byte /* in6_addr */ + +package unix + +/* +#define _LARGEFILE_SOURCE +#define _LARGEFILE64_SOURCE +#define _FILE_OFFSET_BITS 64 +#define _GNU_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef TCSETS2 +// On systems that have "struct termios2" use this as type Termios. +typedef struct termios2 termios_t; +#else +typedef struct termios termios_t; +#endif + +enum { + sizeofPtr = sizeof(void*), +}; + +union sockaddr_all { + struct sockaddr s1; // this one gets used for fields + struct sockaddr_in s2; // these pad it out + struct sockaddr_in6 s3; + struct sockaddr_un s4; + struct sockaddr_ll s5; + struct sockaddr_nl s6; +}; + +struct sockaddr_any { + struct sockaddr addr; + char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; +}; + +// copied from /usr/include/linux/un.h +struct my_sockaddr_un { + sa_family_t sun_family; +#if defined(__ARM_EABI__) || defined(__powerpc64__) + // on ARM char is by default unsigned + signed char sun_path[108]; +#else + char sun_path[108]; +#endif +}; + +#ifdef __ARM_EABI__ +typedef struct user_regs PtraceRegs; +#elif defined(__aarch64__) +typedef struct user_pt_regs PtraceRegs; +#elif defined(__powerpc64__) +typedef struct pt_regs PtraceRegs; +#elif defined(__mips__) +typedef struct user PtraceRegs; +#elif defined(__s390x__) +typedef struct _user_regs_struct PtraceRegs; +#else +typedef struct user_regs_struct PtraceRegs; +#endif + +#if defined(__s390x__) +typedef struct _user_psw_struct ptracePsw; +typedef struct _user_fpregs_struct ptraceFpregs; +typedef struct _user_per_struct ptracePer; +#else +typedef struct {} ptracePsw; +typedef struct {} ptraceFpregs; +typedef struct {} ptracePer; +#endif + +// The real epoll_event is a union, and godefs doesn't handle it well. +struct my_epoll_event { + uint32_t events; +#if defined(__ARM_EABI__) || defined(__aarch64__) + // padding is not specified in linux/eventpoll.h but added to conform to the + // alignment requirements of EABI + int32_t padFd; +#elif defined(__powerpc64__) || defined(__s390x__) + int32_t _padFd; +#endif + int32_t fd; + int32_t pad; +}; + +*/ +import "C" + +// Machine characteristics; for internal use. + +const ( + sizeofPtr = C.sizeofPtr + sizeofShort = C.sizeof_short + sizeofInt = C.sizeof_int + sizeofLong = C.sizeof_long + sizeofLongLong = C.sizeof_longlong + PathMax = C.PATH_MAX +) + +// Basic types + +type ( + _C_short C.short + _C_int C.int + _C_long C.long + _C_long_long C.longlong +) + +// Time + +type Timespec C.struct_timespec + +type Timeval C.struct_timeval + +type Timex C.struct_timex + +type Time_t C.time_t + +type Tms C.struct_tms + +type Utimbuf C.struct_utimbuf + +// Processes + +type Rusage C.struct_rusage + +type Rlimit C.struct_rlimit + +type _Gid_t C.gid_t + +// Files + +type Stat_t C.struct_stat + +type Statfs_t C.struct_statfs + +type Dirent C.struct_dirent + +type Fsid C.fsid_t + +type Flock_t C.struct_flock + +// Advice to Fadvise + +const ( + FADV_NORMAL = C.POSIX_FADV_NORMAL + FADV_RANDOM = C.POSIX_FADV_RANDOM + FADV_SEQUENTIAL = C.POSIX_FADV_SEQUENTIAL + FADV_WILLNEED = C.POSIX_FADV_WILLNEED + FADV_DONTNEED = C.POSIX_FADV_DONTNEED + FADV_NOREUSE = C.POSIX_FADV_NOREUSE +) + +// Sockets + +type RawSockaddrInet4 C.struct_sockaddr_in + +type RawSockaddrInet6 C.struct_sockaddr_in6 + +type RawSockaddrUnix C.struct_my_sockaddr_un + +type RawSockaddrLinklayer C.struct_sockaddr_ll + +type RawSockaddrNetlink C.struct_sockaddr_nl + +type RawSockaddrHCI C.struct_sockaddr_hci + +type RawSockaddr C.struct_sockaddr + +type RawSockaddrAny C.struct_sockaddr_any + +type _Socklen C.socklen_t + +type Linger C.struct_linger + +type Iovec C.struct_iovec + +type IPMreq C.struct_ip_mreq + +type IPMreqn C.struct_ip_mreqn + +type IPv6Mreq C.struct_ipv6_mreq + +type Msghdr C.struct_msghdr + +type Cmsghdr C.struct_cmsghdr + +type Inet4Pktinfo C.struct_in_pktinfo + +type Inet6Pktinfo C.struct_in6_pktinfo + +type IPv6MTUInfo C.struct_ip6_mtuinfo + +type ICMPv6Filter C.struct_icmp6_filter + +type Ucred C.struct_ucred + +type TCPInfo C.struct_tcp_info + +const ( + SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in + SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 + SizeofSockaddrAny = C.sizeof_struct_sockaddr_any + SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un + SizeofSockaddrLinklayer = C.sizeof_struct_sockaddr_ll + SizeofSockaddrNetlink = C.sizeof_struct_sockaddr_nl + SizeofSockaddrHCI = C.sizeof_struct_sockaddr_hci + SizeofLinger = C.sizeof_struct_linger + SizeofIPMreq = C.sizeof_struct_ip_mreq + SizeofIPMreqn = C.sizeof_struct_ip_mreqn + SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofMsghdr = C.sizeof_struct_msghdr + SizeofCmsghdr = C.sizeof_struct_cmsghdr + SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo + SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo + SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo + SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter + SizeofUcred = C.sizeof_struct_ucred + SizeofTCPInfo = C.sizeof_struct_tcp_info +) + +// Netlink routing and interface messages + +const ( + IFA_UNSPEC = C.IFA_UNSPEC + IFA_ADDRESS = C.IFA_ADDRESS + IFA_LOCAL = C.IFA_LOCAL + IFA_LABEL = C.IFA_LABEL + IFA_BROADCAST = C.IFA_BROADCAST + IFA_ANYCAST = C.IFA_ANYCAST + IFA_CACHEINFO = C.IFA_CACHEINFO + IFA_MULTICAST = C.IFA_MULTICAST + IFLA_UNSPEC = C.IFLA_UNSPEC + IFLA_ADDRESS = C.IFLA_ADDRESS + IFLA_BROADCAST = C.IFLA_BROADCAST + IFLA_IFNAME = C.IFLA_IFNAME + IFLA_MTU = C.IFLA_MTU + IFLA_LINK = C.IFLA_LINK + IFLA_QDISC = C.IFLA_QDISC + IFLA_STATS = C.IFLA_STATS + IFLA_COST = C.IFLA_COST + IFLA_PRIORITY = C.IFLA_PRIORITY + IFLA_MASTER = C.IFLA_MASTER + IFLA_WIRELESS = C.IFLA_WIRELESS + IFLA_PROTINFO = C.IFLA_PROTINFO + IFLA_TXQLEN = C.IFLA_TXQLEN + IFLA_MAP = C.IFLA_MAP + IFLA_WEIGHT = C.IFLA_WEIGHT + IFLA_OPERSTATE = C.IFLA_OPERSTATE + IFLA_LINKMODE = C.IFLA_LINKMODE + IFLA_LINKINFO = C.IFLA_LINKINFO + IFLA_NET_NS_PID = C.IFLA_NET_NS_PID + IFLA_IFALIAS = C.IFLA_IFALIAS + IFLA_MAX = C.IFLA_MAX + RT_SCOPE_UNIVERSE = C.RT_SCOPE_UNIVERSE + RT_SCOPE_SITE = C.RT_SCOPE_SITE + RT_SCOPE_LINK = C.RT_SCOPE_LINK + RT_SCOPE_HOST = C.RT_SCOPE_HOST + RT_SCOPE_NOWHERE = C.RT_SCOPE_NOWHERE + RT_TABLE_UNSPEC = C.RT_TABLE_UNSPEC + RT_TABLE_COMPAT = C.RT_TABLE_COMPAT + RT_TABLE_DEFAULT = C.RT_TABLE_DEFAULT + RT_TABLE_MAIN = C.RT_TABLE_MAIN + RT_TABLE_LOCAL = C.RT_TABLE_LOCAL + RT_TABLE_MAX = C.RT_TABLE_MAX + RTA_UNSPEC = C.RTA_UNSPEC + RTA_DST = C.RTA_DST + RTA_SRC = C.RTA_SRC + RTA_IIF = C.RTA_IIF + RTA_OIF = C.RTA_OIF + RTA_GATEWAY = C.RTA_GATEWAY + RTA_PRIORITY = C.RTA_PRIORITY + RTA_PREFSRC = C.RTA_PREFSRC + RTA_METRICS = C.RTA_METRICS + RTA_MULTIPATH = C.RTA_MULTIPATH + RTA_FLOW = C.RTA_FLOW + RTA_CACHEINFO = C.RTA_CACHEINFO + RTA_TABLE = C.RTA_TABLE + RTN_UNSPEC = C.RTN_UNSPEC + RTN_UNICAST = C.RTN_UNICAST + RTN_LOCAL = C.RTN_LOCAL + RTN_BROADCAST = C.RTN_BROADCAST + RTN_ANYCAST = C.RTN_ANYCAST + RTN_MULTICAST = C.RTN_MULTICAST + RTN_BLACKHOLE = C.RTN_BLACKHOLE + RTN_UNREACHABLE = C.RTN_UNREACHABLE + RTN_PROHIBIT = C.RTN_PROHIBIT + RTN_THROW = C.RTN_THROW + RTN_NAT = C.RTN_NAT + RTN_XRESOLVE = C.RTN_XRESOLVE + RTNLGRP_NONE = C.RTNLGRP_NONE + RTNLGRP_LINK = C.RTNLGRP_LINK + RTNLGRP_NOTIFY = C.RTNLGRP_NOTIFY + RTNLGRP_NEIGH = C.RTNLGRP_NEIGH + RTNLGRP_TC = C.RTNLGRP_TC + RTNLGRP_IPV4_IFADDR = C.RTNLGRP_IPV4_IFADDR + RTNLGRP_IPV4_MROUTE = C.RTNLGRP_IPV4_MROUTE + RTNLGRP_IPV4_ROUTE = C.RTNLGRP_IPV4_ROUTE + RTNLGRP_IPV4_RULE = C.RTNLGRP_IPV4_RULE + RTNLGRP_IPV6_IFADDR = C.RTNLGRP_IPV6_IFADDR + RTNLGRP_IPV6_MROUTE = C.RTNLGRP_IPV6_MROUTE + RTNLGRP_IPV6_ROUTE = C.RTNLGRP_IPV6_ROUTE + RTNLGRP_IPV6_IFINFO = C.RTNLGRP_IPV6_IFINFO + RTNLGRP_IPV6_PREFIX = C.RTNLGRP_IPV6_PREFIX + RTNLGRP_IPV6_RULE = C.RTNLGRP_IPV6_RULE + RTNLGRP_ND_USEROPT = C.RTNLGRP_ND_USEROPT + SizeofNlMsghdr = C.sizeof_struct_nlmsghdr + SizeofNlMsgerr = C.sizeof_struct_nlmsgerr + SizeofRtGenmsg = C.sizeof_struct_rtgenmsg + SizeofNlAttr = C.sizeof_struct_nlattr + SizeofRtAttr = C.sizeof_struct_rtattr + SizeofIfInfomsg = C.sizeof_struct_ifinfomsg + SizeofIfAddrmsg = C.sizeof_struct_ifaddrmsg + SizeofRtMsg = C.sizeof_struct_rtmsg + SizeofRtNexthop = C.sizeof_struct_rtnexthop +) + +type NlMsghdr C.struct_nlmsghdr + +type NlMsgerr C.struct_nlmsgerr + +type RtGenmsg C.struct_rtgenmsg + +type NlAttr C.struct_nlattr + +type RtAttr C.struct_rtattr + +type IfInfomsg C.struct_ifinfomsg + +type IfAddrmsg C.struct_ifaddrmsg + +type RtMsg C.struct_rtmsg + +type RtNexthop C.struct_rtnexthop + +// Linux socket filter + +const ( + SizeofSockFilter = C.sizeof_struct_sock_filter + SizeofSockFprog = C.sizeof_struct_sock_fprog +) + +type SockFilter C.struct_sock_filter + +type SockFprog C.struct_sock_fprog + +// Inotify + +type InotifyEvent C.struct_inotify_event + +const SizeofInotifyEvent = C.sizeof_struct_inotify_event + +// Ptrace + +// Register structures +type PtraceRegs C.PtraceRegs + +// Structures contained in PtraceRegs on s390x (exported by mkpost.go) +type ptracePsw C.ptracePsw + +type ptraceFpregs C.ptraceFpregs + +type ptracePer C.ptracePer + +// Misc + +type FdSet C.fd_set + +type Sysinfo_t C.struct_sysinfo + +type Utsname C.struct_utsname + +type Ustat_t C.struct_ustat + +type EpollEvent C.struct_my_epoll_event + +const ( + AT_FDCWD = C.AT_FDCWD + AT_REMOVEDIR = C.AT_REMOVEDIR + AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW + AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW +) + +type PollFd C.struct_pollfd + +const ( + POLLIN = C.POLLIN + POLLPRI = C.POLLPRI + POLLOUT = C.POLLOUT + POLLRDHUP = C.POLLRDHUP + POLLERR = C.POLLERR + POLLHUP = C.POLLHUP + POLLNVAL = C.POLLNVAL +) + +type Sigset_t C.sigset_t + +// Terminal handling + +type Termios C.termios_t diff --git a/vendor/golang.org/x/sys/unix/types_netbsd.go b/vendor/golang.org/x/sys/unix/types_netbsd.go new file mode 100644 index 000000000..d15f93d19 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_netbsd.go @@ -0,0 +1,232 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +Input to cgo -godefs. See also mkerrors.sh and mkall.sh +*/ + +// +godefs map struct_in_addr [4]byte /* in_addr */ +// +godefs map struct_in6_addr [16]byte /* in6_addr */ + +package unix + +/* +#define KERNEL +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + sizeofPtr = sizeof(void*), +}; + +union sockaddr_all { + struct sockaddr s1; // this one gets used for fields + struct sockaddr_in s2; // these pad it out + struct sockaddr_in6 s3; + struct sockaddr_un s4; + struct sockaddr_dl s5; +}; + +struct sockaddr_any { + struct sockaddr addr; + char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; +}; + +*/ +import "C" + +// Machine characteristics; for internal use. + +const ( + sizeofPtr = C.sizeofPtr + sizeofShort = C.sizeof_short + sizeofInt = C.sizeof_int + sizeofLong = C.sizeof_long + sizeofLongLong = C.sizeof_longlong +) + +// Basic types + +type ( + _C_short C.short + _C_int C.int + _C_long C.long + _C_long_long C.longlong +) + +// Time + +type Timespec C.struct_timespec + +type Timeval C.struct_timeval + +// Processes + +type Rusage C.struct_rusage + +type Rlimit C.struct_rlimit + +type _Gid_t C.gid_t + +// Files + +type Stat_t C.struct_stat + +type Statfs_t C.struct_statfs + +type Flock_t C.struct_flock + +type Dirent C.struct_dirent + +type Fsid C.fsid_t + +// Sockets + +type RawSockaddrInet4 C.struct_sockaddr_in + +type RawSockaddrInet6 C.struct_sockaddr_in6 + +type RawSockaddrUnix C.struct_sockaddr_un + +type RawSockaddrDatalink C.struct_sockaddr_dl + +type RawSockaddr C.struct_sockaddr + +type RawSockaddrAny C.struct_sockaddr_any + +type _Socklen C.socklen_t + +type Linger C.struct_linger + +type Iovec C.struct_iovec + +type IPMreq C.struct_ip_mreq + +type IPv6Mreq C.struct_ipv6_mreq + +type Msghdr C.struct_msghdr + +type Cmsghdr C.struct_cmsghdr + +type Inet6Pktinfo C.struct_in6_pktinfo + +type IPv6MTUInfo C.struct_ip6_mtuinfo + +type ICMPv6Filter C.struct_icmp6_filter + +const ( + SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in + SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 + SizeofSockaddrAny = C.sizeof_struct_sockaddr_any + SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un + SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl + SizeofLinger = C.sizeof_struct_linger + SizeofIPMreq = C.sizeof_struct_ip_mreq + SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofMsghdr = C.sizeof_struct_msghdr + SizeofCmsghdr = C.sizeof_struct_cmsghdr + SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo + SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo + SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter +) + +// Ptrace requests + +const ( + PTRACE_TRACEME = C.PT_TRACE_ME + PTRACE_CONT = C.PT_CONTINUE + PTRACE_KILL = C.PT_KILL +) + +// Events (kqueue, kevent) + +type Kevent_t C.struct_kevent + +// Select + +type FdSet C.fd_set + +// Routing and interface messages + +const ( + SizeofIfMsghdr = C.sizeof_struct_if_msghdr + SizeofIfData = C.sizeof_struct_if_data + SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr + SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr + SizeofRtMsghdr = C.sizeof_struct_rt_msghdr + SizeofRtMetrics = C.sizeof_struct_rt_metrics +) + +type IfMsghdr C.struct_if_msghdr + +type IfData C.struct_if_data + +type IfaMsghdr C.struct_ifa_msghdr + +type IfAnnounceMsghdr C.struct_if_announcemsghdr + +type RtMsghdr C.struct_rt_msghdr + +type RtMetrics C.struct_rt_metrics + +type Mclpool C.struct_mclpool + +// Berkeley packet filter + +const ( + SizeofBpfVersion = C.sizeof_struct_bpf_version + SizeofBpfStat = C.sizeof_struct_bpf_stat + SizeofBpfProgram = C.sizeof_struct_bpf_program + SizeofBpfInsn = C.sizeof_struct_bpf_insn + SizeofBpfHdr = C.sizeof_struct_bpf_hdr +) + +type BpfVersion C.struct_bpf_version + +type BpfStat C.struct_bpf_stat + +type BpfProgram C.struct_bpf_program + +type BpfInsn C.struct_bpf_insn + +type BpfHdr C.struct_bpf_hdr + +type BpfTimeval C.struct_bpf_timeval + +// Terminal handling + +type Termios C.struct_termios + +// Sysctl + +type Sysctlnode C.struct_sysctlnode diff --git a/vendor/golang.org/x/sys/unix/types_openbsd.go b/vendor/golang.org/x/sys/unix/types_openbsd.go new file mode 100644 index 000000000..b66fe25f7 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_openbsd.go @@ -0,0 +1,244 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +Input to cgo -godefs. See also mkerrors.sh and mkall.sh +*/ + +// +godefs map struct_in_addr [4]byte /* in_addr */ +// +godefs map struct_in6_addr [16]byte /* in6_addr */ + +package unix + +/* +#define KERNEL +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + sizeofPtr = sizeof(void*), +}; + +union sockaddr_all { + struct sockaddr s1; // this one gets used for fields + struct sockaddr_in s2; // these pad it out + struct sockaddr_in6 s3; + struct sockaddr_un s4; + struct sockaddr_dl s5; +}; + +struct sockaddr_any { + struct sockaddr addr; + char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; +}; + +*/ +import "C" + +// Machine characteristics; for internal use. + +const ( + sizeofPtr = C.sizeofPtr + sizeofShort = C.sizeof_short + sizeofInt = C.sizeof_int + sizeofLong = C.sizeof_long + sizeofLongLong = C.sizeof_longlong +) + +// Basic types + +type ( + _C_short C.short + _C_int C.int + _C_long C.long + _C_long_long C.longlong +) + +// Time + +type Timespec C.struct_timespec + +type Timeval C.struct_timeval + +// Processes + +type Rusage C.struct_rusage + +type Rlimit C.struct_rlimit + +type _Gid_t C.gid_t + +// Files + +const ( // Directory mode bits + S_IFMT = C.S_IFMT + S_IFIFO = C.S_IFIFO + S_IFCHR = C.S_IFCHR + S_IFDIR = C.S_IFDIR + S_IFBLK = C.S_IFBLK + S_IFREG = C.S_IFREG + S_IFLNK = C.S_IFLNK + S_IFSOCK = C.S_IFSOCK + S_ISUID = C.S_ISUID + S_ISGID = C.S_ISGID + S_ISVTX = C.S_ISVTX + S_IRUSR = C.S_IRUSR + S_IWUSR = C.S_IWUSR + S_IXUSR = C.S_IXUSR +) + +type Stat_t C.struct_stat + +type Statfs_t C.struct_statfs + +type Flock_t C.struct_flock + +type Dirent C.struct_dirent + +type Fsid C.fsid_t + +// Sockets + +type RawSockaddrInet4 C.struct_sockaddr_in + +type RawSockaddrInet6 C.struct_sockaddr_in6 + +type RawSockaddrUnix C.struct_sockaddr_un + +type RawSockaddrDatalink C.struct_sockaddr_dl + +type RawSockaddr C.struct_sockaddr + +type RawSockaddrAny C.struct_sockaddr_any + +type _Socklen C.socklen_t + +type Linger C.struct_linger + +type Iovec C.struct_iovec + +type IPMreq C.struct_ip_mreq + +type IPv6Mreq C.struct_ipv6_mreq + +type Msghdr C.struct_msghdr + +type Cmsghdr C.struct_cmsghdr + +type Inet6Pktinfo C.struct_in6_pktinfo + +type IPv6MTUInfo C.struct_ip6_mtuinfo + +type ICMPv6Filter C.struct_icmp6_filter + +const ( + SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in + SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 + SizeofSockaddrAny = C.sizeof_struct_sockaddr_any + SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un + SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl + SizeofLinger = C.sizeof_struct_linger + SizeofIPMreq = C.sizeof_struct_ip_mreq + SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofMsghdr = C.sizeof_struct_msghdr + SizeofCmsghdr = C.sizeof_struct_cmsghdr + SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo + SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo + SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter +) + +// Ptrace requests + +const ( + PTRACE_TRACEME = C.PT_TRACE_ME + PTRACE_CONT = C.PT_CONTINUE + PTRACE_KILL = C.PT_KILL +) + +// Events (kqueue, kevent) + +type Kevent_t C.struct_kevent + +// Select + +type FdSet C.fd_set + +// Routing and interface messages + +const ( + SizeofIfMsghdr = C.sizeof_struct_if_msghdr + SizeofIfData = C.sizeof_struct_if_data + SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr + SizeofIfAnnounceMsghdr = C.sizeof_struct_if_announcemsghdr + SizeofRtMsghdr = C.sizeof_struct_rt_msghdr + SizeofRtMetrics = C.sizeof_struct_rt_metrics +) + +type IfMsghdr C.struct_if_msghdr + +type IfData C.struct_if_data + +type IfaMsghdr C.struct_ifa_msghdr + +type IfAnnounceMsghdr C.struct_if_announcemsghdr + +type RtMsghdr C.struct_rt_msghdr + +type RtMetrics C.struct_rt_metrics + +type Mclpool C.struct_mclpool + +// Berkeley packet filter + +const ( + SizeofBpfVersion = C.sizeof_struct_bpf_version + SizeofBpfStat = C.sizeof_struct_bpf_stat + SizeofBpfProgram = C.sizeof_struct_bpf_program + SizeofBpfInsn = C.sizeof_struct_bpf_insn + SizeofBpfHdr = C.sizeof_struct_bpf_hdr +) + +type BpfVersion C.struct_bpf_version + +type BpfStat C.struct_bpf_stat + +type BpfProgram C.struct_bpf_program + +type BpfInsn C.struct_bpf_insn + +type BpfHdr C.struct_bpf_hdr + +type BpfTimeval C.struct_bpf_timeval + +// Terminal handling + +type Termios C.struct_termios diff --git a/vendor/golang.org/x/sys/unix/types_solaris.go b/vendor/golang.org/x/sys/unix/types_solaris.go new file mode 100644 index 000000000..6ad50eaba --- /dev/null +++ b/vendor/golang.org/x/sys/unix/types_solaris.go @@ -0,0 +1,260 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build ignore + +/* +Input to cgo -godefs. See also mkerrors.sh and mkall.sh +*/ + +// +godefs map struct_in_addr [4]byte /* in_addr */ +// +godefs map struct_in6_addr [16]byte /* in6_addr */ + +package unix + +/* +#define KERNEL +// These defines ensure that builds done on newer versions of Solaris are +// backwards-compatible with older versions of Solaris and +// OpenSolaris-based derivatives. +#define __USE_SUNOS_SOCKETS__ // msghdr +#define __USE_LEGACY_PROTOTYPES__ // iovec +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +enum { + sizeofPtr = sizeof(void*), +}; + +union sockaddr_all { + struct sockaddr s1; // this one gets used for fields + struct sockaddr_in s2; // these pad it out + struct sockaddr_in6 s3; + struct sockaddr_un s4; + struct sockaddr_dl s5; +}; + +struct sockaddr_any { + struct sockaddr addr; + char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)]; +}; + +*/ +import "C" + +// Machine characteristics; for internal use. + +const ( + sizeofPtr = C.sizeofPtr + sizeofShort = C.sizeof_short + sizeofInt = C.sizeof_int + sizeofLong = C.sizeof_long + sizeofLongLong = C.sizeof_longlong + PathMax = C.PATH_MAX +) + +// Basic types + +type ( + _C_short C.short + _C_int C.int + _C_long C.long + _C_long_long C.longlong +) + +// Time + +type Timespec C.struct_timespec + +type Timeval C.struct_timeval + +type Timeval32 C.struct_timeval32 + +type Tms C.struct_tms + +type Utimbuf C.struct_utimbuf + +// Processes + +type Rusage C.struct_rusage + +type Rlimit C.struct_rlimit + +type _Gid_t C.gid_t + +// Files + +const ( // Directory mode bits + S_IFMT = C.S_IFMT + S_IFIFO = C.S_IFIFO + S_IFCHR = C.S_IFCHR + S_IFDIR = C.S_IFDIR + S_IFBLK = C.S_IFBLK + S_IFREG = C.S_IFREG + S_IFLNK = C.S_IFLNK + S_IFSOCK = C.S_IFSOCK + S_ISUID = C.S_ISUID + S_ISGID = C.S_ISGID + S_ISVTX = C.S_ISVTX + S_IRUSR = C.S_IRUSR + S_IWUSR = C.S_IWUSR + S_IXUSR = C.S_IXUSR +) + +type Stat_t C.struct_stat + +type Flock_t C.struct_flock + +type Dirent C.struct_dirent + +// Sockets + +type RawSockaddrInet4 C.struct_sockaddr_in + +type RawSockaddrInet6 C.struct_sockaddr_in6 + +type RawSockaddrUnix C.struct_sockaddr_un + +type RawSockaddrDatalink C.struct_sockaddr_dl + +type RawSockaddr C.struct_sockaddr + +type RawSockaddrAny C.struct_sockaddr_any + +type _Socklen C.socklen_t + +type Linger C.struct_linger + +type Iovec C.struct_iovec + +type IPMreq C.struct_ip_mreq + +type IPv6Mreq C.struct_ipv6_mreq + +type Msghdr C.struct_msghdr + +type Cmsghdr C.struct_cmsghdr + +type Inet6Pktinfo C.struct_in6_pktinfo + +type IPv6MTUInfo C.struct_ip6_mtuinfo + +type ICMPv6Filter C.struct_icmp6_filter + +const ( + SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in + SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6 + SizeofSockaddrAny = C.sizeof_struct_sockaddr_any + SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un + SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl + SizeofLinger = C.sizeof_struct_linger + SizeofIPMreq = C.sizeof_struct_ip_mreq + SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq + SizeofMsghdr = C.sizeof_struct_msghdr + SizeofCmsghdr = C.sizeof_struct_cmsghdr + SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo + SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo + SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter +) + +// Select + +type FdSet C.fd_set + +// Misc + +type Utsname C.struct_utsname + +type Ustat_t C.struct_ustat + +const ( + AT_FDCWD = C.AT_FDCWD + AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW + AT_SYMLINK_FOLLOW = C.AT_SYMLINK_FOLLOW + AT_REMOVEDIR = C.AT_REMOVEDIR + AT_EACCESS = C.AT_EACCESS +) + +// Routing and interface messages + +const ( + SizeofIfMsghdr = C.sizeof_struct_if_msghdr + SizeofIfData = C.sizeof_struct_if_data + SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr + SizeofRtMsghdr = C.sizeof_struct_rt_msghdr + SizeofRtMetrics = C.sizeof_struct_rt_metrics +) + +type IfMsghdr C.struct_if_msghdr + +type IfData C.struct_if_data + +type IfaMsghdr C.struct_ifa_msghdr + +type RtMsghdr C.struct_rt_msghdr + +type RtMetrics C.struct_rt_metrics + +// Berkeley packet filter + +const ( + SizeofBpfVersion = C.sizeof_struct_bpf_version + SizeofBpfStat = C.sizeof_struct_bpf_stat + SizeofBpfProgram = C.sizeof_struct_bpf_program + SizeofBpfInsn = C.sizeof_struct_bpf_insn + SizeofBpfHdr = C.sizeof_struct_bpf_hdr +) + +type BpfVersion C.struct_bpf_version + +type BpfStat C.struct_bpf_stat + +type BpfProgram C.struct_bpf_program + +type BpfInsn C.struct_bpf_insn + +type BpfTimeval C.struct_bpf_timeval + +type BpfHdr C.struct_bpf_hdr + +// sysconf information + +const _SC_PAGESIZE = C._SC_PAGESIZE + +// Terminal handling + +type Termios C.struct_termios + +type Termio C.struct_termio + +type Winsize C.struct_winsize diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go new file mode 100644 index 000000000..8e6388835 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_386.go @@ -0,0 +1,1576 @@ +// mkerrors.sh -m32 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,darwin + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m32 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1c + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1e + AF_IPX = 0x17 + AF_ISDN = 0x1c + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x28 + AF_NATM = 0x1f + AF_NDRV = 0x1b + AF_NETBIOS = 0x21 + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PPP = 0x22 + AF_PUP = 0x4 + AF_RESERVED_36 = 0x24 + AF_ROUTE = 0x11 + AF_SIP = 0x18 + AF_SNA = 0xb + AF_SYSTEM = 0x20 + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_UTUN = 0x26 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc00c4279 + BIOCGETIF = 0x4020426b + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4008426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044278 + BIOCSETF = 0x80084267 + BIOCSETFNR = 0x8008427e + BIOCSETIF = 0x8020426c + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8008426d + BIOCSSEESENT = 0x80044277 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DBUS = 0xe7 + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_DVB_CI = 0xeb + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NOFCS = 0xe6 + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xf2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_ATM_CEMIC = 0xee + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FIBRECHANNEL = 0xea + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_SRX_E2E = 0xe9 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_JUNIPER_VS = 0xe8 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_PPP_WITHDIRECTION = 0xa6 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MATCHING_MAX = 0xf5 + DLT_MATCHING_MIN = 0x68 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPEG_2_TS = 0xf3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_MUX27010 = 0xec + DLT_NETANALYZER = 0xf0 + DLT_NETANALYZER_TRANSPARENT = 0xf1 + DLT_NFC_LLCP = 0xf5 + DLT_NFLOG = 0xef + DLT_NG40 = 0xf4 + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PPP_WITH_DIRECTION = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_STANAG_5066_D_PDU = 0xed + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_MACHPORT = -0x8 + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xe + EVFILT_THREADMARKER = 0xe + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xa + EVFILT_VM = -0xc + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG0 = 0x1000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_OOBAND = 0x2000 + EV_POLL = 0x1000 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_ADDFILESIGS = 0x3d + F_ADDSIGS = 0x3b + F_ALLOCATEALL = 0x4 + F_ALLOCATECONTIG = 0x2 + F_CHKCLEAN = 0x29 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x43 + F_FINDSIGS = 0x4e + F_FLUSH_DATA = 0x28 + F_FREEZE_FS = 0x35 + F_FULLFSYNC = 0x33 + F_GETCODEDIR = 0x48 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETLKPID = 0x42 + F_GETNOSIGPIPE = 0x4a + F_GETOWN = 0x5 + F_GETPATH = 0x32 + F_GETPATH_MTMINFO = 0x47 + F_GETPROTECTIONCLASS = 0x3f + F_GETPROTECTIONLEVEL = 0x4d + F_GLOBAL_NOCACHE = 0x37 + F_LOG2PHYS = 0x31 + F_LOG2PHYS_EXT = 0x41 + F_NOCACHE = 0x30 + F_NODIRECT = 0x3e + F_OK = 0x0 + F_PATHPKG_CHECK = 0x34 + F_PEOFPOSMODE = 0x3 + F_PREALLOCATE = 0x2a + F_RDADVISE = 0x2c + F_RDAHEAD = 0x2d + F_RDLCK = 0x1 + F_SETBACKINGSTORE = 0x46 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETLKWTIMEOUT = 0xa + F_SETNOSIGPIPE = 0x49 + F_SETOWN = 0x6 + F_SETPROTECTIONCLASS = 0x40 + F_SETSIZE = 0x2b + F_SINGLE_WRITER = 0x4c + F_THAW_FS = 0x36 + F_TRANSCODEKEY = 0x4b + F_UNLCK = 0x2 + F_VOLPOSMODE = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_AAL5 = 0x31 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ATM = 0x25 + IFT_BRIDGE = 0xd1 + IFT_CARP = 0xf8 + IFT_CELLULAR = 0xff + IFT_CEPT = 0x13 + IFT_DS3 = 0x1e + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_ETHER = 0x6 + IFT_FAITH = 0x38 + IFT_FDDI = 0xf + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_GIF = 0x37 + IFT_HDH1822 = 0x3 + IFT_HIPPI = 0x2f + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IEEE1394 = 0x90 + IFT_IEEE8023ADLAG = 0x88 + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88026 = 0xa + IFT_L2VLAN = 0x87 + IFT_LAPB = 0x10 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_NSIP = 0x1b + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PDP = 0xff + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PKTAP = 0xfe + IFT_PPP = 0x17 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PTPSERIAL = 0x16 + IFT_RS232 = 0x21 + IFT_SDLC = 0x11 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_STARLAN = 0xb + IFT_STF = 0x39 + IFT_T1 = 0x12 + IFT_ULTRA = 0x1d + IFT_V35 = 0x2d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LINKLOCALNETNUM = 0xa9fe0000 + IN_LOOPBACKNET = 0x7f + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0xfe + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEP = 0x21 + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_2292DSTOPTS = 0x17 + IPV6_2292HOPLIMIT = 0x14 + IPV6_2292HOPOPTS = 0x16 + IPV6_2292NEXTHOP = 0x15 + IPV6_2292PKTINFO = 0x13 + IPV6_2292PKTOPTIONS = 0x19 + IPV6_2292RTHDR = 0x18 + IPV6_BINDV6ONLY = 0x1b + IPV6_BOUND_IF = 0x7d + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x3c + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVTCLASS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x24 + IPV6_UNICAST_HOPS = 0x4 + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BLOCK_SOURCE = 0x48 + IP_BOUND_IF = 0x19 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW_ADD = 0x28 + IP_FW_DEL = 0x29 + IP_FW_FLUSH = 0x2a + IP_FW_GET = 0x2c + IP_FW_RESETLOG = 0x2d + IP_FW_ZERO = 0x2b + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MF = 0x2000 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_IFINDEX = 0x42 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_NAT__XXX = 0x37 + IP_OFFMASK = 0x1fff + IP_OLD_FW_ADD = 0x32 + IP_OLD_FW_DEL = 0x33 + IP_OLD_FW_FLUSH = 0x34 + IP_OLD_FW_GET = 0x36 + IP_OLD_FW_RESETLOG = 0x38 + IP_OLD_FW_ZERO = 0x35 + IP_OPTIONS = 0x1 + IP_PKTINFO = 0x1a + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVPKTINFO = 0x1a + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x18 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_STRIPHDR = 0x17 + IP_TOS = 0x3 + IP_TRAFFIC_MGT_BACKGROUND = 0x41 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_CAN_REUSE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_FREE_REUSABLE = 0x7 + MADV_FREE_REUSE = 0x8 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MADV_ZERO_WIRED_PAGES = 0x6 + MAP_ANON = 0x1000 + MAP_COPY = 0x2 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_JIT = 0x800 + MAP_NOCACHE = 0x400 + MAP_NOEXTEND = 0x100 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_RESERVED0080 = 0x80 + MAP_SHARED = 0x1 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_FLUSH = 0x400 + MSG_HAVEMORE = 0x2000 + MSG_HOLD = 0x800 + MSG_NEEDSA = 0x10000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_RCVMORE = 0x4000 + MSG_SEND = 0x1000 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MSG_WAITSTREAM = 0x200 + MS_ASYNC = 0x1 + MS_DEACTIVATE = 0x8 + MS_INVALIDATE = 0x2 + MS_KILLPAGES = 0x4 + MS_SYNC = 0x10 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_DUMP2 = 0x7 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLIST2 = 0x6 + NET_RT_MAXID = 0xa + NET_RT_STAT = 0x4 + NET_RT_TRASH = 0x5 + NOFLSH = 0x80000000 + NOTE_ABSOLUTE = 0x8 + NOTE_ATTRIB = 0x8 + NOTE_BACKGROUND = 0x40 + NOTE_CHILD = 0x4 + NOTE_CRITICAL = 0x20 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXITSTATUS = 0x4000000 + NOTE_EXIT_CSERROR = 0x40000 + NOTE_EXIT_DECRYPTFAIL = 0x10000 + NOTE_EXIT_DETAIL = 0x2000000 + NOTE_EXIT_DETAIL_MASK = 0x70000 + NOTE_EXIT_MEMORY = 0x20000 + NOTE_EXIT_REPARENTED = 0x80000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FORK = 0x40000000 + NOTE_LEEWAY = 0x10 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_NONE = 0x80 + NOTE_NSECONDS = 0x4 + NOTE_PCTRLMASK = -0x100000 + NOTE_PDATAMASK = 0xfffff + NOTE_REAP = 0x10000000 + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_SECONDS = 0x1 + NOTE_SIGNAL = 0x8000000 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_USECONDS = 0x2 + NOTE_VM_ERROR = 0x10000000 + NOTE_VM_PRESSURE = 0x80000000 + NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000 + NOTE_VM_PRESSURE_TERMINATE = 0x40000000 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + OFDEL = 0x20000 + OFILL = 0x80 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_ALERT = 0x20000000 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x1000000 + O_CREAT = 0x200 + O_DIRECTORY = 0x100000 + O_DP_GETRAWENCRYPTED = 0x1 + O_DSYNC = 0x400000 + O_EVTONLY = 0x8000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x20000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_POPUP = 0x80000000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYMLINK = 0x200000 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PT_ATTACH = 0xa + PT_ATTACHEXC = 0xe + PT_CONTINUE = 0x7 + PT_DENY_ATTACH = 0x1f + PT_DETACH = 0xb + PT_FIRSTMACH = 0x20 + PT_FORCEQUOTA = 0x1e + PT_KILL = 0x8 + PT_READ_D = 0x2 + PT_READ_I = 0x1 + PT_READ_U = 0x3 + PT_SIGEXC = 0xc + PT_STEP = 0x9 + PT_THUPDATE = 0xd + PT_TRACE_ME = 0x0 + PT_WRITE_D = 0x5 + PT_WRITE_I = 0x4 + PT_WRITE_U = 0x6 + RLIMIT_AS = 0x5 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_CPU_USAGE_MONITOR = 0x2 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_CLONING = 0x100 + RTF_CONDEMNED = 0x2000000 + RTF_DELCLONE = 0x80 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_IFREF = 0x4000000 + RTF_IFSCOPE = 0x1000000 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_NOIFREF = 0x2000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_PROXY = 0x8000000 + RTF_REJECT = 0x8 + RTF_ROUTER = 0x10000000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_WASCLONED = 0x20000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_GET2 = 0x14 + RTM_IFINFO = 0xe + RTM_IFINFO2 = 0x12 + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_NEWMADDR2 = 0x13 + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SCM_TIMESTAMP_MONOTONIC = 0x4 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCARPIPLL = 0xc0206928 + SIOCATMARK = 0x40047307 + SIOCAUTOADDR = 0xc0206926 + SIOCAUTONETMASK = 0x80206927 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFPHYADDR = 0x80206941 + SIOCGDRVSPEC = 0xc01c697b + SIOCGETVLAN = 0xc020697f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFALTMTU = 0xc0206948 + SIOCGIFASYNCMAP = 0xc020697c + SIOCGIFBOND = 0xc0206947 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020695b + SIOCGIFCONF = 0xc0086924 + SIOCGIFDEVMTU = 0xc0206944 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFKPI = 0xc0206987 + SIOCGIFMAC = 0xc0206982 + SIOCGIFMEDIA = 0xc0286938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206940 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc020693f + SIOCGIFSTATUS = 0xc331693d + SIOCGIFVLAN = 0xc020697f + SIOCGIFWAKEFLAGS = 0xc0206988 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCIFCREATE = 0xc0206978 + SIOCIFCREATE2 = 0xc020697a + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc00c6981 + SIOCRSLVMULTI = 0xc008693b + SIOCSDRVSPEC = 0x801c697b + SIOCSETVLAN = 0x8020697e + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFALTMTU = 0x80206945 + SIOCSIFASYNCMAP = 0x8020697d + SIOCSIFBOND = 0x80206946 + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020695a + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFKPI = 0x80206986 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206983 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x8040693e + SIOCSIFPHYS = 0x80206936 + SIOCSIFVLAN = 0x8020697e + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_DONTTRUNC = 0x2000 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1010 + SO_LINGER = 0x80 + SO_LINGER_SEC = 0x1080 + SO_NKE = 0x1021 + SO_NOADDRERR = 0x1023 + SO_NOSIGPIPE = 0x1022 + SO_NOTIFYCONFLICT = 0x1026 + SO_NP_EXTENSIONS = 0x1083 + SO_NREAD = 0x1020 + SO_NUMRCVPKT = 0x1112 + SO_NWRITE = 0x1024 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1011 + SO_RANDOMPORT = 0x1082 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_REUSESHAREUID = 0x1025 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TIMESTAMP_MONOTONIC = 0x800 + SO_TYPE = 0x1008 + SO_UPCALLCLOSEWAIT = 0x1027 + SO_USELOOPBACK = 0x40 + SO_WANTMORE = 0x4000 + SO_WANTOOBFLAG = 0x8000 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IFWHT = 0xe000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISTXT = 0x200 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CONNECTIONTIMEOUT = 0x20 + TCP_ENABLE_ECN = 0x104 + TCP_KEEPALIVE = 0x10 + TCP_KEEPCNT = 0x102 + TCP_KEEPINTVL = 0x101 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MINMSS = 0xd8 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_NOTSENT_LOWAT = 0x201 + TCP_RXT_CONNDROPTIME = 0x80 + TCP_RXT_FINDROP = 0x100 + TCP_SENDMOREACKS = 0x103 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x40087458 + TIOCDRAIN = 0x2000745e + TIOCDSIMICROCODE = 0x20007455 + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGWINSZ = 0x40087468 + TIOCIXOFF = 0x20007480 + TIOCIXON = 0x20007481 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMODG = 0x40047403 + TIOCMODS = 0x80047404 + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTYGNAME = 0x40807453 + TIOCPTYGRANT = 0x20007454 + TIOCPTYUNLK = 0x20007452 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCONS = 0x20007463 + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2000745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40087459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VT0 = 0x0 + VT1 = 0x10000 + VTDLY = 0x10000 + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x10 + WCOREFLAG = 0x80 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOWAIT = 0x20 + WORDSIZE = 0x20 + WSTOPPED = 0x8 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADARCH = syscall.Errno(0x56) + EBADEXEC = syscall.Errno(0x55) + EBADF = syscall.Errno(0x9) + EBADMACHO = syscall.Errno(0x58) + EBADMSG = syscall.Errno(0x5e) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x59) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDEVERR = syscall.Errno(0x53) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x5a) + EILSEQ = syscall.Errno(0x5c) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x6a) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5f) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x5d) + ENOBUFS = syscall.Errno(0x37) + ENODATA = syscall.Errno(0x60) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x61) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x5b) + ENOPOLICY = syscall.Errno(0x67) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x62) + ENOSTR = syscall.Errno(0x63) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x68) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x66) + EOVERFLOW = syscall.Errno(0x54) + EOWNERDEAD = syscall.Errno(0x69) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x64) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + EPWROFF = syscall.Errno(0x52) + EQFULL = syscall.Errno(0x6a) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHLIBVERS = syscall.Errno(0x57) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIME = syscall.Errno(0x65) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "resource busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "device power is off", + 83: "device error", + 84: "value too large to be stored in data type", + 85: "bad executable (or shared library)", + 86: "bad CPU type in executable", + 87: "shared library version mismatch", + 88: "malformed Mach-o file", + 89: "operation canceled", + 90: "identifier removed", + 91: "no message of desired type", + 92: "illegal byte sequence", + 93: "attribute not found", + 94: "bad message", + 95: "EMULTIHOP (Reserved)", + 96: "no message available on STREAM", + 97: "ENOLINK (Reserved)", + 98: "no STREAM resources", + 99: "not a STREAM", + 100: "protocol error", + 101: "STREAM ioctl timeout", + 102: "operation not supported on socket", + 103: "policy not found", + 104: "state not recoverable", + 105: "previous owner died", + 106: "interface output queue is full", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go new file mode 100644 index 000000000..9594f9381 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go @@ -0,0 +1,1576 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,darwin + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1c + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1e + AF_IPX = 0x17 + AF_ISDN = 0x1c + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x28 + AF_NATM = 0x1f + AF_NDRV = 0x1b + AF_NETBIOS = 0x21 + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PPP = 0x22 + AF_PUP = 0x4 + AF_RESERVED_36 = 0x24 + AF_ROUTE = 0x11 + AF_SIP = 0x18 + AF_SNA = 0xb + AF_SYSTEM = 0x20 + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_UTUN = 0x26 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc00c4279 + BIOCGETIF = 0x4020426b + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4010426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044278 + BIOCSETF = 0x80104267 + BIOCSETFNR = 0x8010427e + BIOCSETIF = 0x8020426c + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8010426d + BIOCSSEESENT = 0x80044277 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DBUS = 0xe7 + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_DVB_CI = 0xeb + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NOFCS = 0xe6 + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xf2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_ATM_CEMIC = 0xee + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FIBRECHANNEL = 0xea + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_SRX_E2E = 0xe9 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_JUNIPER_VS = 0xe8 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_PPP_WITHDIRECTION = 0xa6 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MATCHING_MAX = 0xf5 + DLT_MATCHING_MIN = 0x68 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPEG_2_TS = 0xf3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_MUX27010 = 0xec + DLT_NETANALYZER = 0xf0 + DLT_NETANALYZER_TRANSPARENT = 0xf1 + DLT_NFC_LLCP = 0xf5 + DLT_NFLOG = 0xef + DLT_NG40 = 0xf4 + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PPP_WITH_DIRECTION = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_STANAG_5066_D_PDU = 0xed + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_MACHPORT = -0x8 + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xe + EVFILT_THREADMARKER = 0xe + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xa + EVFILT_VM = -0xc + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG0 = 0x1000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_OOBAND = 0x2000 + EV_POLL = 0x1000 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_ADDFILESIGS = 0x3d + F_ADDSIGS = 0x3b + F_ALLOCATEALL = 0x4 + F_ALLOCATECONTIG = 0x2 + F_CHKCLEAN = 0x29 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x43 + F_FINDSIGS = 0x4e + F_FLUSH_DATA = 0x28 + F_FREEZE_FS = 0x35 + F_FULLFSYNC = 0x33 + F_GETCODEDIR = 0x48 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETLKPID = 0x42 + F_GETNOSIGPIPE = 0x4a + F_GETOWN = 0x5 + F_GETPATH = 0x32 + F_GETPATH_MTMINFO = 0x47 + F_GETPROTECTIONCLASS = 0x3f + F_GETPROTECTIONLEVEL = 0x4d + F_GLOBAL_NOCACHE = 0x37 + F_LOG2PHYS = 0x31 + F_LOG2PHYS_EXT = 0x41 + F_NOCACHE = 0x30 + F_NODIRECT = 0x3e + F_OK = 0x0 + F_PATHPKG_CHECK = 0x34 + F_PEOFPOSMODE = 0x3 + F_PREALLOCATE = 0x2a + F_RDADVISE = 0x2c + F_RDAHEAD = 0x2d + F_RDLCK = 0x1 + F_SETBACKINGSTORE = 0x46 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETLKWTIMEOUT = 0xa + F_SETNOSIGPIPE = 0x49 + F_SETOWN = 0x6 + F_SETPROTECTIONCLASS = 0x40 + F_SETSIZE = 0x2b + F_SINGLE_WRITER = 0x4c + F_THAW_FS = 0x36 + F_TRANSCODEKEY = 0x4b + F_UNLCK = 0x2 + F_VOLPOSMODE = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_AAL5 = 0x31 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ATM = 0x25 + IFT_BRIDGE = 0xd1 + IFT_CARP = 0xf8 + IFT_CELLULAR = 0xff + IFT_CEPT = 0x13 + IFT_DS3 = 0x1e + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_ETHER = 0x6 + IFT_FAITH = 0x38 + IFT_FDDI = 0xf + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_GIF = 0x37 + IFT_HDH1822 = 0x3 + IFT_HIPPI = 0x2f + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IEEE1394 = 0x90 + IFT_IEEE8023ADLAG = 0x88 + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88026 = 0xa + IFT_L2VLAN = 0x87 + IFT_LAPB = 0x10 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_NSIP = 0x1b + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PDP = 0xff + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PKTAP = 0xfe + IFT_PPP = 0x17 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PTPSERIAL = 0x16 + IFT_RS232 = 0x21 + IFT_SDLC = 0x11 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_STARLAN = 0xb + IFT_STF = 0x39 + IFT_T1 = 0x12 + IFT_ULTRA = 0x1d + IFT_V35 = 0x2d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LINKLOCALNETNUM = 0xa9fe0000 + IN_LOOPBACKNET = 0x7f + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0xfe + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEP = 0x21 + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_2292DSTOPTS = 0x17 + IPV6_2292HOPLIMIT = 0x14 + IPV6_2292HOPOPTS = 0x16 + IPV6_2292NEXTHOP = 0x15 + IPV6_2292PKTINFO = 0x13 + IPV6_2292PKTOPTIONS = 0x19 + IPV6_2292RTHDR = 0x18 + IPV6_BINDV6ONLY = 0x1b + IPV6_BOUND_IF = 0x7d + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x3c + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVTCLASS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x24 + IPV6_UNICAST_HOPS = 0x4 + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BLOCK_SOURCE = 0x48 + IP_BOUND_IF = 0x19 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW_ADD = 0x28 + IP_FW_DEL = 0x29 + IP_FW_FLUSH = 0x2a + IP_FW_GET = 0x2c + IP_FW_RESETLOG = 0x2d + IP_FW_ZERO = 0x2b + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MF = 0x2000 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_IFINDEX = 0x42 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_NAT__XXX = 0x37 + IP_OFFMASK = 0x1fff + IP_OLD_FW_ADD = 0x32 + IP_OLD_FW_DEL = 0x33 + IP_OLD_FW_FLUSH = 0x34 + IP_OLD_FW_GET = 0x36 + IP_OLD_FW_RESETLOG = 0x38 + IP_OLD_FW_ZERO = 0x35 + IP_OPTIONS = 0x1 + IP_PKTINFO = 0x1a + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVPKTINFO = 0x1a + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x18 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_STRIPHDR = 0x17 + IP_TOS = 0x3 + IP_TRAFFIC_MGT_BACKGROUND = 0x41 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_CAN_REUSE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_FREE_REUSABLE = 0x7 + MADV_FREE_REUSE = 0x8 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MADV_ZERO_WIRED_PAGES = 0x6 + MAP_ANON = 0x1000 + MAP_COPY = 0x2 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_JIT = 0x800 + MAP_NOCACHE = 0x400 + MAP_NOEXTEND = 0x100 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_RESERVED0080 = 0x80 + MAP_SHARED = 0x1 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_FLUSH = 0x400 + MSG_HAVEMORE = 0x2000 + MSG_HOLD = 0x800 + MSG_NEEDSA = 0x10000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_RCVMORE = 0x4000 + MSG_SEND = 0x1000 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MSG_WAITSTREAM = 0x200 + MS_ASYNC = 0x1 + MS_DEACTIVATE = 0x8 + MS_INVALIDATE = 0x2 + MS_KILLPAGES = 0x4 + MS_SYNC = 0x10 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_DUMP2 = 0x7 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLIST2 = 0x6 + NET_RT_MAXID = 0xa + NET_RT_STAT = 0x4 + NET_RT_TRASH = 0x5 + NOFLSH = 0x80000000 + NOTE_ABSOLUTE = 0x8 + NOTE_ATTRIB = 0x8 + NOTE_BACKGROUND = 0x40 + NOTE_CHILD = 0x4 + NOTE_CRITICAL = 0x20 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXITSTATUS = 0x4000000 + NOTE_EXIT_CSERROR = 0x40000 + NOTE_EXIT_DECRYPTFAIL = 0x10000 + NOTE_EXIT_DETAIL = 0x2000000 + NOTE_EXIT_DETAIL_MASK = 0x70000 + NOTE_EXIT_MEMORY = 0x20000 + NOTE_EXIT_REPARENTED = 0x80000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FORK = 0x40000000 + NOTE_LEEWAY = 0x10 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_NONE = 0x80 + NOTE_NSECONDS = 0x4 + NOTE_PCTRLMASK = -0x100000 + NOTE_PDATAMASK = 0xfffff + NOTE_REAP = 0x10000000 + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_SECONDS = 0x1 + NOTE_SIGNAL = 0x8000000 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_USECONDS = 0x2 + NOTE_VM_ERROR = 0x10000000 + NOTE_VM_PRESSURE = 0x80000000 + NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000 + NOTE_VM_PRESSURE_TERMINATE = 0x40000000 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + OFDEL = 0x20000 + OFILL = 0x80 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_ALERT = 0x20000000 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x1000000 + O_CREAT = 0x200 + O_DIRECTORY = 0x100000 + O_DP_GETRAWENCRYPTED = 0x1 + O_DSYNC = 0x400000 + O_EVTONLY = 0x8000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x20000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_POPUP = 0x80000000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYMLINK = 0x200000 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PT_ATTACH = 0xa + PT_ATTACHEXC = 0xe + PT_CONTINUE = 0x7 + PT_DENY_ATTACH = 0x1f + PT_DETACH = 0xb + PT_FIRSTMACH = 0x20 + PT_FORCEQUOTA = 0x1e + PT_KILL = 0x8 + PT_READ_D = 0x2 + PT_READ_I = 0x1 + PT_READ_U = 0x3 + PT_SIGEXC = 0xc + PT_STEP = 0x9 + PT_THUPDATE = 0xd + PT_TRACE_ME = 0x0 + PT_WRITE_D = 0x5 + PT_WRITE_I = 0x4 + PT_WRITE_U = 0x6 + RLIMIT_AS = 0x5 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_CPU_USAGE_MONITOR = 0x2 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_CLONING = 0x100 + RTF_CONDEMNED = 0x2000000 + RTF_DELCLONE = 0x80 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_IFREF = 0x4000000 + RTF_IFSCOPE = 0x1000000 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_NOIFREF = 0x2000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_PROXY = 0x8000000 + RTF_REJECT = 0x8 + RTF_ROUTER = 0x10000000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_WASCLONED = 0x20000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_GET2 = 0x14 + RTM_IFINFO = 0xe + RTM_IFINFO2 = 0x12 + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_NEWMADDR2 = 0x13 + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SCM_TIMESTAMP_MONOTONIC = 0x4 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCARPIPLL = 0xc0206928 + SIOCATMARK = 0x40047307 + SIOCAUTOADDR = 0xc0206926 + SIOCAUTONETMASK = 0x80206927 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFPHYADDR = 0x80206941 + SIOCGDRVSPEC = 0xc028697b + SIOCGETVLAN = 0xc020697f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFALTMTU = 0xc0206948 + SIOCGIFASYNCMAP = 0xc020697c + SIOCGIFBOND = 0xc0206947 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020695b + SIOCGIFCONF = 0xc00c6924 + SIOCGIFDEVMTU = 0xc0206944 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFKPI = 0xc0206987 + SIOCGIFMAC = 0xc0206982 + SIOCGIFMEDIA = 0xc02c6938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206940 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc020693f + SIOCGIFSTATUS = 0xc331693d + SIOCGIFVLAN = 0xc020697f + SIOCGIFWAKEFLAGS = 0xc0206988 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCIFCREATE = 0xc0206978 + SIOCIFCREATE2 = 0xc020697a + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc0106981 + SIOCRSLVMULTI = 0xc010693b + SIOCSDRVSPEC = 0x8028697b + SIOCSETVLAN = 0x8020697e + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFALTMTU = 0x80206945 + SIOCSIFASYNCMAP = 0x8020697d + SIOCSIFBOND = 0x80206946 + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020695a + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFKPI = 0x80206986 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206983 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x8040693e + SIOCSIFPHYS = 0x80206936 + SIOCSIFVLAN = 0x8020697e + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_DONTTRUNC = 0x2000 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1010 + SO_LINGER = 0x80 + SO_LINGER_SEC = 0x1080 + SO_NKE = 0x1021 + SO_NOADDRERR = 0x1023 + SO_NOSIGPIPE = 0x1022 + SO_NOTIFYCONFLICT = 0x1026 + SO_NP_EXTENSIONS = 0x1083 + SO_NREAD = 0x1020 + SO_NUMRCVPKT = 0x1112 + SO_NWRITE = 0x1024 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1011 + SO_RANDOMPORT = 0x1082 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_REUSESHAREUID = 0x1025 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TIMESTAMP_MONOTONIC = 0x800 + SO_TYPE = 0x1008 + SO_UPCALLCLOSEWAIT = 0x1027 + SO_USELOOPBACK = 0x40 + SO_WANTMORE = 0x4000 + SO_WANTOOBFLAG = 0x8000 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IFWHT = 0xe000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISTXT = 0x200 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CONNECTIONTIMEOUT = 0x20 + TCP_ENABLE_ECN = 0x104 + TCP_KEEPALIVE = 0x10 + TCP_KEEPCNT = 0x102 + TCP_KEEPINTVL = 0x101 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MINMSS = 0xd8 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_NOTSENT_LOWAT = 0x201 + TCP_RXT_CONNDROPTIME = 0x80 + TCP_RXT_FINDROP = 0x100 + TCP_SENDMOREACKS = 0x103 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x40107458 + TIOCDRAIN = 0x2000745e + TIOCDSIMICROCODE = 0x20007455 + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x40487413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGWINSZ = 0x40087468 + TIOCIXOFF = 0x20007480 + TIOCIXON = 0x20007481 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMODG = 0x40047403 + TIOCMODS = 0x80047404 + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTYGNAME = 0x40807453 + TIOCPTYGRANT = 0x20007454 + TIOCPTYUNLK = 0x20007452 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCONS = 0x20007463 + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x80487414 + TIOCSETAF = 0x80487416 + TIOCSETAW = 0x80487415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2000745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40107459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VT0 = 0x0 + VT1 = 0x10000 + VTDLY = 0x10000 + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x10 + WCOREFLAG = 0x80 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOWAIT = 0x20 + WORDSIZE = 0x40 + WSTOPPED = 0x8 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADARCH = syscall.Errno(0x56) + EBADEXEC = syscall.Errno(0x55) + EBADF = syscall.Errno(0x9) + EBADMACHO = syscall.Errno(0x58) + EBADMSG = syscall.Errno(0x5e) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x59) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDEVERR = syscall.Errno(0x53) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x5a) + EILSEQ = syscall.Errno(0x5c) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x6a) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5f) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x5d) + ENOBUFS = syscall.Errno(0x37) + ENODATA = syscall.Errno(0x60) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x61) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x5b) + ENOPOLICY = syscall.Errno(0x67) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x62) + ENOSTR = syscall.Errno(0x63) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x68) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x66) + EOVERFLOW = syscall.Errno(0x54) + EOWNERDEAD = syscall.Errno(0x69) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x64) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + EPWROFF = syscall.Errno(0x52) + EQFULL = syscall.Errno(0x6a) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHLIBVERS = syscall.Errno(0x57) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIME = syscall.Errno(0x65) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "resource busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "device power is off", + 83: "device error", + 84: "value too large to be stored in data type", + 85: "bad executable (or shared library)", + 86: "bad CPU type in executable", + 87: "shared library version mismatch", + 88: "malformed Mach-o file", + 89: "operation canceled", + 90: "identifier removed", + 91: "no message of desired type", + 92: "illegal byte sequence", + 93: "attribute not found", + 94: "bad message", + 95: "EMULTIHOP (Reserved)", + 96: "no message available on STREAM", + 97: "ENOLINK (Reserved)", + 98: "no STREAM resources", + 99: "not a STREAM", + 100: "protocol error", + 101: "STREAM ioctl timeout", + 102: "operation not supported on socket", + 103: "policy not found", + 104: "state not recoverable", + 105: "previous owner died", + 106: "interface output queue is full", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go new file mode 100644 index 000000000..a410e88ed --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm.go @@ -0,0 +1,1293 @@ +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- _const.go + +// +build arm,darwin + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1c + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1e + AF_IPX = 0x17 + AF_ISDN = 0x1c + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x28 + AF_NATM = 0x1f + AF_NDRV = 0x1b + AF_NETBIOS = 0x21 + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PPP = 0x22 + AF_PUP = 0x4 + AF_RESERVED_36 = 0x24 + AF_ROUTE = 0x11 + AF_SIP = 0x18 + AF_SNA = 0xb + AF_SYSTEM = 0x20 + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_UTUN = 0x26 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc00c4279 + BIOCGETIF = 0x4020426b + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4010426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044278 + BIOCSETF = 0x80104267 + BIOCSETIF = 0x8020426c + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8010426d + BIOCSSEESENT = 0x80044277 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AX25 = 0x3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_C_HDLC = 0x68 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_FDDI = 0xa + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_NULL = 0x0 + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_SERIAL = 0x32 + DLT_PRONET = 0x4 + DLT_RAW = 0xc + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_MACHPORT = -0x8 + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xe + EVFILT_THREADMARKER = 0xe + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xa + EVFILT_VM = -0xc + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG0 = 0x1000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_OOBAND = 0x2000 + EV_POLL = 0x1000 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_ADDFILESIGS = 0x3d + F_ADDSIGS = 0x3b + F_ALLOCATEALL = 0x4 + F_ALLOCATECONTIG = 0x2 + F_CHKCLEAN = 0x29 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x43 + F_FINDSIGS = 0x4e + F_FLUSH_DATA = 0x28 + F_FREEZE_FS = 0x35 + F_FULLFSYNC = 0x33 + F_GETCODEDIR = 0x48 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETLKPID = 0x42 + F_GETNOSIGPIPE = 0x4a + F_GETOWN = 0x5 + F_GETPATH = 0x32 + F_GETPATH_MTMINFO = 0x47 + F_GETPROTECTIONCLASS = 0x3f + F_GETPROTECTIONLEVEL = 0x4d + F_GLOBAL_NOCACHE = 0x37 + F_LOG2PHYS = 0x31 + F_LOG2PHYS_EXT = 0x41 + F_NOCACHE = 0x30 + F_NODIRECT = 0x3e + F_OK = 0x0 + F_PATHPKG_CHECK = 0x34 + F_PEOFPOSMODE = 0x3 + F_PREALLOCATE = 0x2a + F_RDADVISE = 0x2c + F_RDAHEAD = 0x2d + F_RDLCK = 0x1 + F_SETBACKINGSTORE = 0x46 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETLKWTIMEOUT = 0xa + F_SETNOSIGPIPE = 0x49 + F_SETOWN = 0x6 + F_SETPROTECTIONCLASS = 0x40 + F_SETSIZE = 0x2b + F_SINGLE_WRITER = 0x4c + F_THAW_FS = 0x36 + F_TRANSCODEKEY = 0x4b + F_UNLCK = 0x2 + F_VOLPOSMODE = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_AAL5 = 0x31 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ATM = 0x25 + IFT_BRIDGE = 0xd1 + IFT_CARP = 0xf8 + IFT_CELLULAR = 0xff + IFT_CEPT = 0x13 + IFT_DS3 = 0x1e + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_ETHER = 0x6 + IFT_FAITH = 0x38 + IFT_FDDI = 0xf + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_GIF = 0x37 + IFT_HDH1822 = 0x3 + IFT_HIPPI = 0x2f + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IEEE1394 = 0x90 + IFT_IEEE8023ADLAG = 0x88 + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88026 = 0xa + IFT_L2VLAN = 0x87 + IFT_LAPB = 0x10 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_NSIP = 0x1b + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PDP = 0xff + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PPP = 0x17 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PTPSERIAL = 0x16 + IFT_RS232 = 0x21 + IFT_SDLC = 0x11 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_STARLAN = 0xb + IFT_STF = 0x39 + IFT_T1 = 0x12 + IFT_ULTRA = 0x1d + IFT_V35 = 0x2d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LINKLOCALNETNUM = 0xa9fe0000 + IN_LOOPBACKNET = 0x7f + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0xfe + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEP = 0x21 + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_2292DSTOPTS = 0x17 + IPV6_2292HOPLIMIT = 0x14 + IPV6_2292HOPOPTS = 0x16 + IPV6_2292NEXTHOP = 0x15 + IPV6_2292PKTINFO = 0x13 + IPV6_2292PKTOPTIONS = 0x19 + IPV6_2292RTHDR = 0x18 + IPV6_BINDV6ONLY = 0x1b + IPV6_BOUND_IF = 0x7d + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVTCLASS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x24 + IPV6_UNICAST_HOPS = 0x4 + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BLOCK_SOURCE = 0x48 + IP_BOUND_IF = 0x19 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW_ADD = 0x28 + IP_FW_DEL = 0x29 + IP_FW_FLUSH = 0x2a + IP_FW_GET = 0x2c + IP_FW_RESETLOG = 0x2d + IP_FW_ZERO = 0x2b + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MF = 0x2000 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_IFINDEX = 0x42 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_NAT__XXX = 0x37 + IP_OFFMASK = 0x1fff + IP_OLD_FW_ADD = 0x32 + IP_OLD_FW_DEL = 0x33 + IP_OLD_FW_FLUSH = 0x34 + IP_OLD_FW_GET = 0x36 + IP_OLD_FW_RESETLOG = 0x38 + IP_OLD_FW_ZERO = 0x35 + IP_OPTIONS = 0x1 + IP_PKTINFO = 0x1a + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVPKTINFO = 0x1a + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x18 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_STRIPHDR = 0x17 + IP_TOS = 0x3 + IP_TRAFFIC_MGT_BACKGROUND = 0x41 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_CAN_REUSE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_FREE_REUSABLE = 0x7 + MADV_FREE_REUSE = 0x8 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MADV_ZERO_WIRED_PAGES = 0x6 + MAP_ANON = 0x1000 + MAP_COPY = 0x2 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_JIT = 0x800 + MAP_NOCACHE = 0x400 + MAP_NOEXTEND = 0x100 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_RESERVED0080 = 0x80 + MAP_SHARED = 0x1 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_FLUSH = 0x400 + MSG_HAVEMORE = 0x2000 + MSG_HOLD = 0x800 + MSG_NEEDSA = 0x10000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_RCVMORE = 0x4000 + MSG_SEND = 0x1000 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MSG_WAITSTREAM = 0x200 + MS_ASYNC = 0x1 + MS_DEACTIVATE = 0x8 + MS_INVALIDATE = 0x2 + MS_KILLPAGES = 0x4 + MS_SYNC = 0x10 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_DUMP2 = 0x7 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLIST2 = 0x6 + NET_RT_MAXID = 0xa + NET_RT_STAT = 0x4 + NET_RT_TRASH = 0x5 + NOFLSH = 0x80000000 + NOTE_ABSOLUTE = 0x8 + NOTE_ATTRIB = 0x8 + NOTE_BACKGROUND = 0x40 + NOTE_CHILD = 0x4 + NOTE_CRITICAL = 0x20 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXITSTATUS = 0x4000000 + NOTE_EXIT_CSERROR = 0x40000 + NOTE_EXIT_DECRYPTFAIL = 0x10000 + NOTE_EXIT_DETAIL = 0x2000000 + NOTE_EXIT_DETAIL_MASK = 0x70000 + NOTE_EXIT_MEMORY = 0x20000 + NOTE_EXIT_REPARENTED = 0x80000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FORK = 0x40000000 + NOTE_LEEWAY = 0x10 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_NONE = 0x80 + NOTE_NSECONDS = 0x4 + NOTE_PCTRLMASK = -0x100000 + NOTE_PDATAMASK = 0xfffff + NOTE_REAP = 0x10000000 + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_SECONDS = 0x1 + NOTE_SIGNAL = 0x8000000 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_USECONDS = 0x2 + NOTE_VM_ERROR = 0x10000000 + NOTE_VM_PRESSURE = 0x80000000 + NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000 + NOTE_VM_PRESSURE_TERMINATE = 0x40000000 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + OFDEL = 0x20000 + OFILL = 0x80 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_ALERT = 0x20000000 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x1000000 + O_CREAT = 0x200 + O_DIRECTORY = 0x100000 + O_DP_GETRAWENCRYPTED = 0x1 + O_DSYNC = 0x400000 + O_EVTONLY = 0x8000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x20000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_POPUP = 0x80000000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYMLINK = 0x200000 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PT_ATTACH = 0xa + PT_ATTACHEXC = 0xe + PT_CONTINUE = 0x7 + PT_DENY_ATTACH = 0x1f + PT_DETACH = 0xb + PT_FIRSTMACH = 0x20 + PT_FORCEQUOTA = 0x1e + PT_KILL = 0x8 + PT_READ_D = 0x2 + PT_READ_I = 0x1 + PT_READ_U = 0x3 + PT_SIGEXC = 0xc + PT_STEP = 0x9 + PT_THUPDATE = 0xd + PT_TRACE_ME = 0x0 + PT_WRITE_D = 0x5 + PT_WRITE_I = 0x4 + PT_WRITE_U = 0x6 + RLIMIT_AS = 0x5 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_CPU_USAGE_MONITOR = 0x2 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_CLONING = 0x100 + RTF_CONDEMNED = 0x2000000 + RTF_DELCLONE = 0x80 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_IFREF = 0x4000000 + RTF_IFSCOPE = 0x1000000 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_PROXY = 0x8000000 + RTF_REJECT = 0x8 + RTF_ROUTER = 0x10000000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_WASCLONED = 0x20000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_GET2 = 0x14 + RTM_IFINFO = 0xe + RTM_IFINFO2 = 0x12 + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_NEWMADDR2 = 0x13 + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SCM_TIMESTAMP_MONOTONIC = 0x4 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCARPIPLL = 0xc0206928 + SIOCATMARK = 0x40047307 + SIOCAUTOADDR = 0xc0206926 + SIOCAUTONETMASK = 0x80206927 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFPHYADDR = 0x80206941 + SIOCGDRVSPEC = 0xc028697b + SIOCGETVLAN = 0xc020697f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFALTMTU = 0xc0206948 + SIOCGIFASYNCMAP = 0xc020697c + SIOCGIFBOND = 0xc0206947 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020695b + SIOCGIFCONF = 0xc00c6924 + SIOCGIFDEVMTU = 0xc0206944 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFKPI = 0xc0206987 + SIOCGIFMAC = 0xc0206982 + SIOCGIFMEDIA = 0xc02c6938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206940 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc020693f + SIOCGIFSTATUS = 0xc331693d + SIOCGIFVLAN = 0xc020697f + SIOCGIFWAKEFLAGS = 0xc0206988 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCIFCREATE = 0xc0206978 + SIOCIFCREATE2 = 0xc020697a + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc0106981 + SIOCRSLVMULTI = 0xc010693b + SIOCSDRVSPEC = 0x8028697b + SIOCSETVLAN = 0x8020697e + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFALTMTU = 0x80206945 + SIOCSIFASYNCMAP = 0x8020697d + SIOCSIFBOND = 0x80206946 + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020695a + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFKPI = 0x80206986 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206983 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x8040693e + SIOCSIFPHYS = 0x80206936 + SIOCSIFVLAN = 0x8020697e + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_DONTTRUNC = 0x2000 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1010 + SO_LINGER = 0x80 + SO_LINGER_SEC = 0x1080 + SO_NKE = 0x1021 + SO_NOADDRERR = 0x1023 + SO_NOSIGPIPE = 0x1022 + SO_NOTIFYCONFLICT = 0x1026 + SO_NP_EXTENSIONS = 0x1083 + SO_NREAD = 0x1020 + SO_NUMRCVPKT = 0x1112 + SO_NWRITE = 0x1024 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1011 + SO_RANDOMPORT = 0x1082 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_REUSESHAREUID = 0x1025 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TIMESTAMP_MONOTONIC = 0x800 + SO_TYPE = 0x1008 + SO_UPCALLCLOSEWAIT = 0x1027 + SO_USELOOPBACK = 0x40 + SO_WANTMORE = 0x4000 + SO_WANTOOBFLAG = 0x8000 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IFWHT = 0xe000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISTXT = 0x200 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CONNECTIONTIMEOUT = 0x20 + TCP_ENABLE_ECN = 0x104 + TCP_KEEPALIVE = 0x10 + TCP_KEEPCNT = 0x102 + TCP_KEEPINTVL = 0x101 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MINMSS = 0xd8 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_NOTSENT_LOWAT = 0x201 + TCP_RXT_CONNDROPTIME = 0x80 + TCP_RXT_FINDROP = 0x100 + TCP_SENDMOREACKS = 0x103 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x40107458 + TIOCDRAIN = 0x2000745e + TIOCDSIMICROCODE = 0x20007455 + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x40487413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGWINSZ = 0x40087468 + TIOCIXOFF = 0x20007480 + TIOCIXON = 0x20007481 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMODG = 0x40047403 + TIOCMODS = 0x80047404 + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTYGNAME = 0x40807453 + TIOCPTYGRANT = 0x20007454 + TIOCPTYUNLK = 0x20007452 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCONS = 0x20007463 + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x80487414 + TIOCSETAF = 0x80487416 + TIOCSETAW = 0x80487415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2000745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40107459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VT0 = 0x0 + VT1 = 0x10000 + VTDLY = 0x10000 + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x10 + WCOREFLAG = 0x80 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOWAIT = 0x20 + WORDSIZE = 0x40 + WSTOPPED = 0x8 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADARCH = syscall.Errno(0x56) + EBADEXEC = syscall.Errno(0x55) + EBADF = syscall.Errno(0x9) + EBADMACHO = syscall.Errno(0x58) + EBADMSG = syscall.Errno(0x5e) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x59) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDEVERR = syscall.Errno(0x53) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x5a) + EILSEQ = syscall.Errno(0x5c) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x6a) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5f) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x5d) + ENOBUFS = syscall.Errno(0x37) + ENODATA = syscall.Errno(0x60) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x61) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x5b) + ENOPOLICY = syscall.Errno(0x67) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x62) + ENOSTR = syscall.Errno(0x63) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x68) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x66) + EOVERFLOW = syscall.Errno(0x54) + EOWNERDEAD = syscall.Errno(0x69) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x64) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + EPWROFF = syscall.Errno(0x52) + EQFULL = syscall.Errno(0x6a) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHLIBVERS = syscall.Errno(0x57) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIME = syscall.Errno(0x65) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go new file mode 100644 index 000000000..3189c6b34 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go @@ -0,0 +1,1576 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm64,darwin + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1c + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1e + AF_IPX = 0x17 + AF_ISDN = 0x1c + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x28 + AF_NATM = 0x1f + AF_NDRV = 0x1b + AF_NETBIOS = 0x21 + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PPP = 0x22 + AF_PUP = 0x4 + AF_RESERVED_36 = 0x24 + AF_ROUTE = 0x11 + AF_SIP = 0x18 + AF_SNA = 0xb + AF_SYSTEM = 0x20 + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_UTUN = 0x26 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc00c4279 + BIOCGETIF = 0x4020426b + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4010426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044278 + BIOCSETF = 0x80104267 + BIOCSETFNR = 0x8010427e + BIOCSETIF = 0x8020426c + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8010426d + BIOCSSEESENT = 0x80044277 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DBUS = 0xe7 + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_DVB_CI = 0xeb + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NOFCS = 0xe6 + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xf2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_ATM_CEMIC = 0xee + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FIBRECHANNEL = 0xea + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_SRX_E2E = 0xe9 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_JUNIPER_VS = 0xe8 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_PPP_WITHDIRECTION = 0xa6 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MATCHING_MAX = 0xf5 + DLT_MATCHING_MIN = 0x68 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPEG_2_TS = 0xf3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_MUX27010 = 0xec + DLT_NETANALYZER = 0xf0 + DLT_NETANALYZER_TRANSPARENT = 0xf1 + DLT_NFC_LLCP = 0xf5 + DLT_NFLOG = 0xef + DLT_NG40 = 0xf4 + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PPP_WITH_DIRECTION = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_STANAG_5066_D_PDU = 0xed + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_MACHPORT = -0x8 + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xe + EVFILT_THREADMARKER = 0xe + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xa + EVFILT_VM = -0xc + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG0 = 0x1000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_OOBAND = 0x2000 + EV_POLL = 0x1000 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_ADDFILESIGS = 0x3d + F_ADDSIGS = 0x3b + F_ALLOCATEALL = 0x4 + F_ALLOCATECONTIG = 0x2 + F_CHKCLEAN = 0x29 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x43 + F_FINDSIGS = 0x4e + F_FLUSH_DATA = 0x28 + F_FREEZE_FS = 0x35 + F_FULLFSYNC = 0x33 + F_GETCODEDIR = 0x48 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETLKPID = 0x42 + F_GETNOSIGPIPE = 0x4a + F_GETOWN = 0x5 + F_GETPATH = 0x32 + F_GETPATH_MTMINFO = 0x47 + F_GETPROTECTIONCLASS = 0x3f + F_GETPROTECTIONLEVEL = 0x4d + F_GLOBAL_NOCACHE = 0x37 + F_LOG2PHYS = 0x31 + F_LOG2PHYS_EXT = 0x41 + F_NOCACHE = 0x30 + F_NODIRECT = 0x3e + F_OK = 0x0 + F_PATHPKG_CHECK = 0x34 + F_PEOFPOSMODE = 0x3 + F_PREALLOCATE = 0x2a + F_RDADVISE = 0x2c + F_RDAHEAD = 0x2d + F_RDLCK = 0x1 + F_SETBACKINGSTORE = 0x46 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETLKWTIMEOUT = 0xa + F_SETNOSIGPIPE = 0x49 + F_SETOWN = 0x6 + F_SETPROTECTIONCLASS = 0x40 + F_SETSIZE = 0x2b + F_SINGLE_WRITER = 0x4c + F_THAW_FS = 0x36 + F_TRANSCODEKEY = 0x4b + F_UNLCK = 0x2 + F_VOLPOSMODE = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_AAL5 = 0x31 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ATM = 0x25 + IFT_BRIDGE = 0xd1 + IFT_CARP = 0xf8 + IFT_CELLULAR = 0xff + IFT_CEPT = 0x13 + IFT_DS3 = 0x1e + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_ETHER = 0x6 + IFT_FAITH = 0x38 + IFT_FDDI = 0xf + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_GIF = 0x37 + IFT_HDH1822 = 0x3 + IFT_HIPPI = 0x2f + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IEEE1394 = 0x90 + IFT_IEEE8023ADLAG = 0x88 + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88026 = 0xa + IFT_L2VLAN = 0x87 + IFT_LAPB = 0x10 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_NSIP = 0x1b + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PDP = 0xff + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PKTAP = 0xfe + IFT_PPP = 0x17 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PTPSERIAL = 0x16 + IFT_RS232 = 0x21 + IFT_SDLC = 0x11 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_STARLAN = 0xb + IFT_STF = 0x39 + IFT_T1 = 0x12 + IFT_ULTRA = 0x1d + IFT_V35 = 0x2d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LINKLOCALNETNUM = 0xa9fe0000 + IN_LOOPBACKNET = 0x7f + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0xfe + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEP = 0x21 + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_2292DSTOPTS = 0x17 + IPV6_2292HOPLIMIT = 0x14 + IPV6_2292HOPOPTS = 0x16 + IPV6_2292NEXTHOP = 0x15 + IPV6_2292PKTINFO = 0x13 + IPV6_2292PKTOPTIONS = 0x19 + IPV6_2292RTHDR = 0x18 + IPV6_BINDV6ONLY = 0x1b + IPV6_BOUND_IF = 0x7d + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x3c + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVTCLASS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x24 + IPV6_UNICAST_HOPS = 0x4 + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BLOCK_SOURCE = 0x48 + IP_BOUND_IF = 0x19 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW_ADD = 0x28 + IP_FW_DEL = 0x29 + IP_FW_FLUSH = 0x2a + IP_FW_GET = 0x2c + IP_FW_RESETLOG = 0x2d + IP_FW_ZERO = 0x2b + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MF = 0x2000 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_IFINDEX = 0x42 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_NAT__XXX = 0x37 + IP_OFFMASK = 0x1fff + IP_OLD_FW_ADD = 0x32 + IP_OLD_FW_DEL = 0x33 + IP_OLD_FW_FLUSH = 0x34 + IP_OLD_FW_GET = 0x36 + IP_OLD_FW_RESETLOG = 0x38 + IP_OLD_FW_ZERO = 0x35 + IP_OPTIONS = 0x1 + IP_PKTINFO = 0x1a + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVPKTINFO = 0x1a + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x18 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_STRIPHDR = 0x17 + IP_TOS = 0x3 + IP_TRAFFIC_MGT_BACKGROUND = 0x41 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_CAN_REUSE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_FREE_REUSABLE = 0x7 + MADV_FREE_REUSE = 0x8 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MADV_ZERO_WIRED_PAGES = 0x6 + MAP_ANON = 0x1000 + MAP_COPY = 0x2 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_JIT = 0x800 + MAP_NOCACHE = 0x400 + MAP_NOEXTEND = 0x100 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_RESERVED0080 = 0x80 + MAP_SHARED = 0x1 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_FLUSH = 0x400 + MSG_HAVEMORE = 0x2000 + MSG_HOLD = 0x800 + MSG_NEEDSA = 0x10000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_RCVMORE = 0x4000 + MSG_SEND = 0x1000 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MSG_WAITSTREAM = 0x200 + MS_ASYNC = 0x1 + MS_DEACTIVATE = 0x8 + MS_INVALIDATE = 0x2 + MS_KILLPAGES = 0x4 + MS_SYNC = 0x10 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_DUMP2 = 0x7 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLIST2 = 0x6 + NET_RT_MAXID = 0xa + NET_RT_STAT = 0x4 + NET_RT_TRASH = 0x5 + NOFLSH = 0x80000000 + NOTE_ABSOLUTE = 0x8 + NOTE_ATTRIB = 0x8 + NOTE_BACKGROUND = 0x40 + NOTE_CHILD = 0x4 + NOTE_CRITICAL = 0x20 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXITSTATUS = 0x4000000 + NOTE_EXIT_CSERROR = 0x40000 + NOTE_EXIT_DECRYPTFAIL = 0x10000 + NOTE_EXIT_DETAIL = 0x2000000 + NOTE_EXIT_DETAIL_MASK = 0x70000 + NOTE_EXIT_MEMORY = 0x20000 + NOTE_EXIT_REPARENTED = 0x80000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FORK = 0x40000000 + NOTE_LEEWAY = 0x10 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_NONE = 0x80 + NOTE_NSECONDS = 0x4 + NOTE_PCTRLMASK = -0x100000 + NOTE_PDATAMASK = 0xfffff + NOTE_REAP = 0x10000000 + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_SECONDS = 0x1 + NOTE_SIGNAL = 0x8000000 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_USECONDS = 0x2 + NOTE_VM_ERROR = 0x10000000 + NOTE_VM_PRESSURE = 0x80000000 + NOTE_VM_PRESSURE_SUDDEN_TERMINATE = 0x20000000 + NOTE_VM_PRESSURE_TERMINATE = 0x40000000 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + OFDEL = 0x20000 + OFILL = 0x80 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_ALERT = 0x20000000 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x1000000 + O_CREAT = 0x200 + O_DIRECTORY = 0x100000 + O_DP_GETRAWENCRYPTED = 0x1 + O_DSYNC = 0x400000 + O_EVTONLY = 0x8000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x20000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_POPUP = 0x80000000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYMLINK = 0x200000 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PT_ATTACH = 0xa + PT_ATTACHEXC = 0xe + PT_CONTINUE = 0x7 + PT_DENY_ATTACH = 0x1f + PT_DETACH = 0xb + PT_FIRSTMACH = 0x20 + PT_FORCEQUOTA = 0x1e + PT_KILL = 0x8 + PT_READ_D = 0x2 + PT_READ_I = 0x1 + PT_READ_U = 0x3 + PT_SIGEXC = 0xc + PT_STEP = 0x9 + PT_THUPDATE = 0xd + PT_TRACE_ME = 0x0 + PT_WRITE_D = 0x5 + PT_WRITE_I = 0x4 + PT_WRITE_U = 0x6 + RLIMIT_AS = 0x5 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_CPU_USAGE_MONITOR = 0x2 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_CLONING = 0x100 + RTF_CONDEMNED = 0x2000000 + RTF_DELCLONE = 0x80 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_IFREF = 0x4000000 + RTF_IFSCOPE = 0x1000000 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_NOIFREF = 0x2000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_PROXY = 0x8000000 + RTF_REJECT = 0x8 + RTF_ROUTER = 0x10000000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_WASCLONED = 0x20000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_GET2 = 0x14 + RTM_IFINFO = 0xe + RTM_IFINFO2 = 0x12 + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_NEWMADDR2 = 0x13 + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SCM_TIMESTAMP_MONOTONIC = 0x4 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCARPIPLL = 0xc0206928 + SIOCATMARK = 0x40047307 + SIOCAUTOADDR = 0xc0206926 + SIOCAUTONETMASK = 0x80206927 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFPHYADDR = 0x80206941 + SIOCGDRVSPEC = 0xc028697b + SIOCGETVLAN = 0xc020697f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFALTMTU = 0xc0206948 + SIOCGIFASYNCMAP = 0xc020697c + SIOCGIFBOND = 0xc0206947 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020695b + SIOCGIFCONF = 0xc00c6924 + SIOCGIFDEVMTU = 0xc0206944 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFKPI = 0xc0206987 + SIOCGIFMAC = 0xc0206982 + SIOCGIFMEDIA = 0xc02c6938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206940 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc020693f + SIOCGIFSTATUS = 0xc331693d + SIOCGIFVLAN = 0xc020697f + SIOCGIFWAKEFLAGS = 0xc0206988 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCIFCREATE = 0xc0206978 + SIOCIFCREATE2 = 0xc020697a + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc0106981 + SIOCRSLVMULTI = 0xc010693b + SIOCSDRVSPEC = 0x8028697b + SIOCSETVLAN = 0x8020697e + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFALTMTU = 0x80206945 + SIOCSIFASYNCMAP = 0x8020697d + SIOCSIFBOND = 0x80206946 + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020695a + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFKPI = 0x80206986 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206983 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x8040693e + SIOCSIFPHYS = 0x80206936 + SIOCSIFVLAN = 0x8020697e + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_DONTTRUNC = 0x2000 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1010 + SO_LINGER = 0x80 + SO_LINGER_SEC = 0x1080 + SO_NKE = 0x1021 + SO_NOADDRERR = 0x1023 + SO_NOSIGPIPE = 0x1022 + SO_NOTIFYCONFLICT = 0x1026 + SO_NP_EXTENSIONS = 0x1083 + SO_NREAD = 0x1020 + SO_NUMRCVPKT = 0x1112 + SO_NWRITE = 0x1024 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1011 + SO_RANDOMPORT = 0x1082 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_REUSESHAREUID = 0x1025 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TIMESTAMP_MONOTONIC = 0x800 + SO_TYPE = 0x1008 + SO_UPCALLCLOSEWAIT = 0x1027 + SO_USELOOPBACK = 0x40 + SO_WANTMORE = 0x4000 + SO_WANTOOBFLAG = 0x8000 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IFWHT = 0xe000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISTXT = 0x200 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CONNECTIONTIMEOUT = 0x20 + TCP_ENABLE_ECN = 0x104 + TCP_KEEPALIVE = 0x10 + TCP_KEEPCNT = 0x102 + TCP_KEEPINTVL = 0x101 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MINMSS = 0xd8 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_NOTSENT_LOWAT = 0x201 + TCP_RXT_CONNDROPTIME = 0x80 + TCP_RXT_FINDROP = 0x100 + TCP_SENDMOREACKS = 0x103 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x40107458 + TIOCDRAIN = 0x2000745e + TIOCDSIMICROCODE = 0x20007455 + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x40487413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGWINSZ = 0x40087468 + TIOCIXOFF = 0x20007480 + TIOCIXON = 0x20007481 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMODG = 0x40047403 + TIOCMODS = 0x80047404 + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTYGNAME = 0x40807453 + TIOCPTYGRANT = 0x20007454 + TIOCPTYUNLK = 0x20007452 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCONS = 0x20007463 + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x80487414 + TIOCSETAF = 0x80487416 + TIOCSETAW = 0x80487415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2000745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40107459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VT0 = 0x0 + VT1 = 0x10000 + VTDLY = 0x10000 + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x10 + WCOREFLAG = 0x80 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOWAIT = 0x20 + WORDSIZE = 0x40 + WSTOPPED = 0x8 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADARCH = syscall.Errno(0x56) + EBADEXEC = syscall.Errno(0x55) + EBADF = syscall.Errno(0x9) + EBADMACHO = syscall.Errno(0x58) + EBADMSG = syscall.Errno(0x5e) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x59) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDEVERR = syscall.Errno(0x53) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x5a) + EILSEQ = syscall.Errno(0x5c) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x6a) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5f) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x5d) + ENOBUFS = syscall.Errno(0x37) + ENODATA = syscall.Errno(0x60) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x61) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x5b) + ENOPOLICY = syscall.Errno(0x67) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x62) + ENOSTR = syscall.Errno(0x63) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x68) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x66) + EOVERFLOW = syscall.Errno(0x54) + EOWNERDEAD = syscall.Errno(0x69) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x64) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + EPWROFF = syscall.Errno(0x52) + EQFULL = syscall.Errno(0x6a) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHLIBVERS = syscall.Errno(0x57) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIME = syscall.Errno(0x65) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "resource busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "device power is off", + 83: "device error", + 84: "value too large to be stored in data type", + 85: "bad executable (or shared library)", + 86: "bad CPU type in executable", + 87: "shared library version mismatch", + 88: "malformed Mach-o file", + 89: "operation canceled", + 90: "identifier removed", + 91: "no message of desired type", + 92: "illegal byte sequence", + 93: "attribute not found", + 94: "bad message", + 95: "EMULTIHOP (Reserved)", + 96: "no message available on STREAM", + 97: "ENOLINK (Reserved)", + 98: "no STREAM resources", + 99: "not a STREAM", + 100: "protocol error", + 101: "STREAM ioctl timeout", + 102: "operation not supported on socket", + 103: "policy not found", + 104: "state not recoverable", + 105: "previous owner died", + 106: "interface output queue is full", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go new file mode 100644 index 000000000..0feceee15 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_dragonfly_amd64.go @@ -0,0 +1,1530 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,dragonfly + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_ATM = 0x1e + AF_BLUETOOTH = 0x21 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x23 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1c + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x24 + AF_MPLS = 0x22 + AF_NATM = 0x1d + AF_NETGRAPH = 0x20 + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SIP = 0x18 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0104279 + BIOCGETIF = 0x4020426b + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4010426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x2000427a + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044278 + BIOCSETF = 0x80104267 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x8010427b + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8010426d + BIOCSSEESENT = 0x80044277 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x8 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DEFAULTBUFSIZE = 0x1000 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MAX_CLONES = 0x80 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DOCSIS = 0x8f + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_REDBACK_SMARTEDGE = 0x20 + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DBF = 0xf + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_EXCEPT = -0x8 + EVFILT_MARKER = 0xf + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0x8 + EVFILT_TIMER = -0x7 + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_NODATA = 0x1000 + EV_ONESHOT = 0x10 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTEXIT_LWP = 0x10000 + EXTEXIT_PROC = 0x0 + EXTEXIT_SETINT = 0x1 + EXTEXIT_SIMPLE = 0x0 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_DUP2FD = 0xa + F_DUP2FD_CLOEXEC = 0x12 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x11 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETOWN = 0x5 + F_OK = 0x0 + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x118e72 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MONITOR = 0x40000 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NPOLLING = 0x100000 + IFF_OACTIVE = 0x400 + IFF_OACTIVE_COMPAT = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_POLLING = 0x10000 + IFF_POLLING_COMPAT = 0x10000 + IFF_PPROMISC = 0x20000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_SMART = 0x20 + IFF_STATICARP = 0x80000 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf8 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PLC = 0xae + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xf3 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VOICEEM = 0x64 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CARP = 0x70 + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0xfe + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MOBILE = 0x37 + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEP = 0x21 + IPPROTO_SKIP = 0x39 + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TLSP = 0x38 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_UNKNOWN = 0x102 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_BINDV6ONLY = 0x1b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff + IPV6_MMTU = 0x500 + IPV6_MSFILTER = 0x4a + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PKTOPTIONS = 0x34 + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_PREFER_TEMPADDR = 0x3f + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW_ADD = 0x32 + IP_FW_DEL = 0x33 + IP_FW_FLUSH = 0x34 + IP_FW_GET = 0x36 + IP_FW_RESETLOG = 0x37 + IP_FW_ZERO = 0x35 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x42 + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x41 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_AUTOSYNC = 0x7 + MADV_CONTROL_END = 0xb + MADV_CONTROL_START = 0xa + MADV_CORE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_INVAL = 0xa + MADV_NOCORE = 0x8 + MADV_NORMAL = 0x0 + MADV_NOSYNC = 0x6 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_SETMAP = 0xb + MADV_WILLNEED = 0x3 + MAP_ANON = 0x1000 + MAP_COPY = 0x2 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_INHERIT = 0x80 + MAP_NOCORE = 0x20000 + MAP_NOEXTEND = 0x100 + MAP_NORESERVE = 0x40 + MAP_NOSYNC = 0x800 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_SHARED = 0x1 + MAP_SIZEALIGN = 0x40000 + MAP_STACK = 0x400 + MAP_TRYFIXED = 0x10000 + MAP_VPAGETABLE = 0x2000 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_FBLOCKING = 0x10000 + MSG_FMASK = 0xffff0000 + MSG_FNONBLOCKING = 0x20000 + MSG_NOSIGNAL = 0x400 + MSG_NOTIFICATION = 0x200 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_SYNC = 0x800 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x0 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_MAXID = 0x4 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_OOB = 0x2 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x20000 + O_CREAT = 0x200 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x8000000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FAPPEND = 0x100000 + O_FASYNCWRITE = 0x800000 + O_FBLOCKING = 0x40000 + O_FBUFFERED = 0x2000000 + O_FMASK = 0x7fc0000 + O_FNONBLOCKING = 0x80000 + O_FOFFSET = 0x200000 + O_FSYNC = 0x80 + O_FSYNCWRITE = 0x400000 + O_FUNBUFFERED = 0x1000000 + O_MAPONREAD = 0x4000000 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0xb + RTAX_MPLS1 = 0x8 + RTAX_MPLS2 = 0x9 + RTAX_MPLS3 = 0xa + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_MPLS1 = 0x100 + RTA_MPLS2 = 0x200 + RTA_MPLS3 = 0x400 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MPLSOPS = 0x1000000 + RTF_MULTICAST = 0x800000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_REJECT = 0x8 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_WASCLONED = 0x20000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x12 + RTM_IFANNOUNCE = 0x11 + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x6 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_IWCAPSEGS = 0x400 + RTV_IWMAXSEGS = 0x200 + RTV_MSL = 0x100 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCADDRT = 0x8040720a + SIOCAIFADDR = 0x8040691a + SIOCALIFADDR = 0x8118691b + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80206932 + SIOCDELRT = 0x8040720b + SIOCDIFADDR = 0x80206919 + SIOCDIFPHYADDR = 0x80206949 + SIOCDLIFADDR = 0x8118691d + SIOCGDRVSPEC = 0xc028697b + SIOCGETSGCNT = 0xc0207210 + SIOCGETVIFCNT = 0xc028720f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020691f + SIOCGIFCONF = 0xc0106924 + SIOCGIFDATA = 0xc0206926 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc028698a + SIOCGIFINDEX = 0xc0206920 + SIOCGIFMEDIA = 0xc0306938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPOLLCPU = 0xc020697e + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFSTATUS = 0xc331693b + SIOCGIFTSOLEN = 0xc0206980 + SIOCGLIFADDR = 0xc118691c + SIOCGLIFPHYADDR = 0xc118694b + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGPRIVATE_0 = 0xc0206950 + SIOCGPRIVATE_1 = 0xc0206951 + SIOCIFCREATE = 0xc020697a + SIOCIFCREATE2 = 0xc020697c + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc0106978 + SIOCSDRVSPEC = 0x8028697b + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020691e + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNAME = 0x80206928 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPHYS = 0x80206936 + SIOCSIFPOLLCPU = 0x8020697d + SIOCSIFTSOLEN = 0x8020697f + SIOCSLIFPHYADDR = 0x8118694a + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_NOSIGPIPE = 0x800 + SO_OOBINLINE = 0x100 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDSPACE = 0x100a + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_FASTKEEP = 0x80 + TCP_KEEPCNT = 0x400 + TCP_KEEPIDLE = 0x100 + TCP_KEEPINIT = 0x20 + TCP_KEEPINTVL = 0x200 + TCP_MAXBURST = 0x4 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MINMSS = 0x100 + TCP_MIN_WINSHIFT = 0x5 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_SIGNATURE_ENABLE = 0x10 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x40107458 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGSID = 0x40047463 + TIOCGSIZE = 0x40087468 + TIOCGWINSZ = 0x40087468 + TIOCISPTMASTER = 0x20007455 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMODG = 0x40047403 + TIOCMODS = 0x80047404 + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2000745f + TIOCSPGRP = 0x80047476 + TIOCSSIZE = 0x80087467 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40107459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VCHECKPT = 0x13 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VERASE2 = 0x7 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x4 + WCOREFLAG = 0x80 + WLINUXCLONE = 0x80000000 + WNOHANG = 0x1 + WSTOPPED = 0x7f + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EASYNC = syscall.Errno(0x63) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x59) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x55) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDOOFUS = syscall.Errno(0x58) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x52) + EILSEQ = syscall.Errno(0x56) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x63) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5a) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x57) + ENOBUFS = syscall.Errno(0x37) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x5b) + ENOMEDIUM = syscall.Errno(0x5d) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x53) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x54) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x5c) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUNUSED94 = syscall.Errno(0x5e) + EUNUSED95 = syscall.Errno(0x5f) + EUNUSED96 = syscall.Errno(0x60) + EUNUSED97 = syscall.Errno(0x61) + EUNUSED98 = syscall.Errno(0x62) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCKPT = syscall.Signal(0x21) + SIGCKPTEXIT = syscall.Signal(0x22) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHR = syscall.Signal(0x20) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "identifier removed", + 83: "no message of desired type", + 84: "value too large to be stored in data type", + 85: "operation canceled", + 86: "illegal byte sequence", + 87: "attribute not found", + 88: "programming error", + 89: "bad message", + 90: "multihop attempted", + 91: "link has been severed", + 92: "protocol error", + 93: "no medium found", + 94: "unknown error: 94", + 95: "unknown error: 95", + 96: "unknown error: 96", + 97: "unknown error: 97", + 98: "unknown error: 98", + 99: "unknown error: 99", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "thread Scheduler", + 33: "checkPoint", + 34: "checkPointExit", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go new file mode 100644 index 000000000..7b95751c3 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go @@ -0,0 +1,1743 @@ +// mkerrors.sh -m32 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,freebsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m32 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_ARP = 0x23 + AF_ATM = 0x1e + AF_BLUETOOTH = 0x24 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1c + AF_INET6_SDP = 0x2a + AF_INET_SDP = 0x28 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x2a + AF_NATM = 0x1d + AF_NETBIOS = 0x6 + AF_NETGRAPH = 0x20 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SCLUSTER = 0x22 + AF_SIP = 0x18 + AF_SLOW = 0x21 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VENDOR00 = 0x27 + AF_VENDOR01 = 0x29 + AF_VENDOR02 = 0x2b + AF_VENDOR03 = 0x2d + AF_VENDOR04 = 0x2f + AF_VENDOR05 = 0x31 + AF_VENDOR06 = 0x33 + AF_VENDOR07 = 0x35 + AF_VENDOR08 = 0x37 + AF_VENDOR09 = 0x39 + AF_VENDOR10 = 0x3b + AF_VENDOR11 = 0x3d + AF_VENDOR12 = 0x3f + AF_VENDOR13 = 0x41 + AF_VENDOR14 = 0x43 + AF_VENDOR15 = 0x45 + AF_VENDOR16 = 0x47 + AF_VENDOR17 = 0x49 + AF_VENDOR18 = 0x4b + AF_VENDOR19 = 0x4d + AF_VENDOR20 = 0x4f + AF_VENDOR21 = 0x51 + AF_VENDOR22 = 0x53 + AF_VENDOR23 = 0x55 + AF_VENDOR24 = 0x57 + AF_VENDOR25 = 0x59 + AF_VENDOR26 = 0x5b + AF_VENDOR27 = 0x5d + AF_VENDOR28 = 0x5f + AF_VENDOR29 = 0x61 + AF_VENDOR30 = 0x63 + AF_VENDOR31 = 0x65 + AF_VENDOR32 = 0x67 + AF_VENDOR33 = 0x69 + AF_VENDOR34 = 0x6b + AF_VENDOR35 = 0x6d + AF_VENDOR36 = 0x6f + AF_VENDOR37 = 0x71 + AF_VENDOR38 = 0x73 + AF_VENDOR39 = 0x75 + AF_VENDOR40 = 0x77 + AF_VENDOR41 = 0x79 + AF_VENDOR42 = 0x7b + AF_VENDOR43 = 0x7d + AF_VENDOR44 = 0x7f + AF_VENDOR45 = 0x81 + AF_VENDOR46 = 0x83 + AF_VENDOR47 = 0x85 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B460800 = 0x70800 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B921600 = 0xe1000 + B9600 = 0x2580 + BIOCFEEDBACK = 0x8004427c + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDIRECTION = 0x40044276 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0084279 + BIOCGETBUFMODE = 0x4004427d + BIOCGETIF = 0x4020426b + BIOCGETZMAX = 0x4004427f + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4008426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCGTSTAMP = 0x40044283 + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x2000427a + BIOCPROMISC = 0x20004269 + BIOCROTZBUF = 0x400c4280 + BIOCSBLEN = 0xc0044266 + BIOCSDIRECTION = 0x80044277 + BIOCSDLT = 0x80044278 + BIOCSETBUFMODE = 0x8004427e + BIOCSETF = 0x80084267 + BIOCSETFNR = 0x80084282 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x8008427b + BIOCSETZBUF = 0x800c4281 + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8008426d + BIOCSSEESENT = 0x80044277 + BIOCSTSTAMP = 0x80044284 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_BUFMODE_BUFFER = 0x1 + BPF_BUFMODE_ZBUF = 0x2 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_T_BINTIME = 0x2 + BPF_T_BINTIME_FAST = 0x102 + BPF_T_BINTIME_MONOTONIC = 0x202 + BPF_T_BINTIME_MONOTONIC_FAST = 0x302 + BPF_T_FAST = 0x100 + BPF_T_FLAG_MASK = 0x300 + BPF_T_FORMAT_MASK = 0x3 + BPF_T_MICROTIME = 0x0 + BPF_T_MICROTIME_FAST = 0x100 + BPF_T_MICROTIME_MONOTONIC = 0x200 + BPF_T_MICROTIME_MONOTONIC_FAST = 0x300 + BPF_T_MONOTONIC = 0x200 + BPF_T_MONOTONIC_FAST = 0x300 + BPF_T_NANOTIME = 0x1 + BPF_T_NANOTIME_FAST = 0x101 + BPF_T_NANOTIME_MONOTONIC = 0x201 + BPF_T_NANOTIME_MONOTONIC_FAST = 0x301 + BPF_T_NONE = 0x3 + BPF_T_NORMAL = 0x0 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CLOCK_MONOTONIC = 0x4 + CLOCK_MONOTONIC_FAST = 0xc + CLOCK_MONOTONIC_PRECISE = 0xb + CLOCK_PROCESS_CPUTIME_ID = 0xf + CLOCK_PROF = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_FAST = 0xa + CLOCK_REALTIME_PRECISE = 0x9 + CLOCK_SECOND = 0xd + CLOCK_THREAD_CPUTIME_ID = 0xe + CLOCK_UPTIME = 0x5 + CLOCK_UPTIME_FAST = 0x8 + CLOCK_UPTIME_PRECISE = 0x7 + CLOCK_VIRTUAL = 0x1 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0x18 + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DBUS = 0xe7 + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_DVB_CI = 0xeb + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NOFCS = 0xe6 + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xf2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_ATM_CEMIC = 0xee + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FIBRECHANNEL = 0xea + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_SRX_E2E = 0xe9 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_JUNIPER_VS = 0xe8 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_PPP_WITHDIRECTION = 0xa6 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MATCHING_MAX = 0xf6 + DLT_MATCHING_MIN = 0x68 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPEG_2_TS = 0xf3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_MUX27010 = 0xec + DLT_NETANALYZER = 0xf0 + DLT_NETANALYZER_TRANSPARENT = 0xf1 + DLT_NFC_LLCP = 0xf5 + DLT_NFLOG = 0xef + DLT_NG40 = 0xf4 + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x79 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PPP_WITH_DIRECTION = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_STANAG_5066_D_PDU = 0xed + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_LIO = -0xa + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xb + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xb + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_DROP = 0x1000 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTATTR_NAMESPACE_EMPTY = 0x0 + EXTATTR_NAMESPACE_SYSTEM = 0x2 + EXTATTR_NAMESPACE_USER = 0x1 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_CANCEL = 0x5 + F_DUP2FD = 0xa + F_DUP2FD_CLOEXEC = 0x12 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x11 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0xb + F_GETOWN = 0x5 + F_OGETLK = 0x7 + F_OK = 0x0 + F_OSETLK = 0x8 + F_OSETLKW = 0x9 + F_RDAHEAD = 0x10 + F_RDLCK = 0x1 + F_READAHEAD = 0xf + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0xc + F_SETLKW = 0xd + F_SETLK_REMOTE = 0xe + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_UNLCKSYS = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x218f72 + IFF_CANTCONFIG = 0x10000 + IFF_DEBUG = 0x4 + IFF_DRV_OACTIVE = 0x400 + IFF_DRV_RUNNING = 0x40 + IFF_DYING = 0x200000 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MONITOR = 0x40000 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PPROMISC = 0x20000 + IFF_PROMISC = 0x100 + IFF_RENAMING = 0x400000 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_SMART = 0x20 + IFF_STATICARP = 0x80000 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf8 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_IPXIP = 0xf9 + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf6 + IFT_PFSYNC = 0xf7 + IFT_PLC = 0xae + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xd7 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VOICEEM = 0x64 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IN_RFC3021_MASK = 0xfffffffe + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CARP = 0x70 + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0x102 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HIP = 0x8b + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MH = 0x87 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MOBILE = 0x37 + IPPROTO_MPLS = 0x89 + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OLD_DIVERT = 0xfe + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_RESERVED_253 = 0xfd + IPPROTO_RESERVED_254 = 0xfe + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEND = 0x103 + IPPROTO_SEP = 0x21 + IPPROTO_SHIM6 = 0x8c + IPPROTO_SKIP = 0x39 + IPPROTO_SPACER = 0x7fff + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TLSP = 0x38 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_BINDANY = 0x40 + IPV6_BINDV6ONLY = 0x1b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MSFILTER = 0x4a + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_PREFER_TEMPADDR = 0x3f + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BINDANY = 0x18 + IP_BLOCK_SOURCE = 0x48 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DONTFRAG = 0x43 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET3 = 0x31 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW3 = 0x30 + IP_FW_ADD = 0x32 + IP_FW_DEL = 0x33 + IP_FW_FLUSH = 0x34 + IP_FW_GET = 0x36 + IP_FW_NAT_CFG = 0x38 + IP_FW_NAT_DEL = 0x39 + IP_FW_NAT_GET_CONFIG = 0x3a + IP_FW_NAT_GET_LOG = 0x3b + IP_FW_RESETLOG = 0x37 + IP_FW_TABLE_ADD = 0x28 + IP_FW_TABLE_DEL = 0x29 + IP_FW_TABLE_FLUSH = 0x2a + IP_FW_TABLE_GETSIZE = 0x2b + IP_FW_TABLE_LIST = 0x2c + IP_FW_ZERO = 0x35 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MAX_SOURCE_FILTER = 0x400 + IP_MF = 0x2000 + IP_MINTTL = 0x42 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_OFFMASK = 0x1fff + IP_ONESBCAST = 0x17 + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVTOS = 0x44 + IP_RECVTTL = 0x41 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_SENDSRCADDR = 0x7 + IP_TOS = 0x3 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_AUTOSYNC = 0x7 + MADV_CORE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_NOCORE = 0x8 + MADV_NORMAL = 0x0 + MADV_NOSYNC = 0x6 + MADV_PROTECT = 0xa + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MAP_ALIGNED_SUPER = 0x1000000 + MAP_ALIGNMENT_MASK = -0x1000000 + MAP_ALIGNMENT_SHIFT = 0x18 + MAP_ANON = 0x1000 + MAP_ANONYMOUS = 0x1000 + MAP_COPY = 0x2 + MAP_EXCL = 0x4000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_NOCORE = 0x20000 + MAP_NORESERVE = 0x40 + MAP_NOSYNC = 0x800 + MAP_PREFAULT_READ = 0x40000 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_RESERVED0080 = 0x80 + MAP_RESERVED0100 = 0x100 + MAP_SHARED = 0x1 + MAP_STACK = 0x400 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CMSG_CLOEXEC = 0x40000 + MSG_COMPAT = 0x8000 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_NBIO = 0x4000 + MSG_NOSIGNAL = 0x20000 + MSG_NOTIFICATION = 0x2000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x0 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLISTL = 0x5 + NET_RT_IFMALIST = 0x4 + NET_RT_MAXID = 0x6 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x100000 + O_CREAT = 0x200 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x20000 + O_EXCL = 0x800 + O_EXEC = 0x40000 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_TTY_INIT = 0x80000 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_FMASK = 0x1004d808 + RTF_GATEWAY = 0x2 + RTF_GWFLAG_COMPAT = 0x80000000 + RTF_HOST = 0x4 + RTF_LLDATA = 0x400 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_REJECT = 0x8 + RTF_RNH_LOCKED = 0x40000000 + RTF_STATIC = 0x800 + RTF_STICKY = 0x10000000 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x12 + RTM_IFANNOUNCE = 0x11 + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RTV_WEIGHT = 0x100 + RT_ALL_FIBS = -0x1 + RT_CACHING_CONTEXT = 0x1 + RT_DEFAULT_FIB = 0x0 + RT_NORTREF = 0x2 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_BINTIME = 0x4 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCADDRT = 0x8030720a + SIOCAIFADDR = 0x8040691a + SIOCAIFGROUP = 0x80246987 + SIOCALIFADDR = 0x8118691b + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80206932 + SIOCDELRT = 0x8030720b + SIOCDIFADDR = 0x80206919 + SIOCDIFGROUP = 0x80246989 + SIOCDIFPHYADDR = 0x80206949 + SIOCDLIFADDR = 0x8118691d + SIOCGDRVSPEC = 0xc01c697b + SIOCGETSGCNT = 0xc0147210 + SIOCGETVIFCNT = 0xc014720f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020691f + SIOCGIFCONF = 0xc0086924 + SIOCGIFDESCR = 0xc020692a + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFIB = 0xc020695c + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc024698a + SIOCGIFGROUP = 0xc0246988 + SIOCGIFINDEX = 0xc0206920 + SIOCGIFMAC = 0xc0206926 + SIOCGIFMEDIA = 0xc0286938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFSTATUS = 0xc331693b + SIOCGLIFADDR = 0xc118691c + SIOCGLIFPHYADDR = 0xc118694b + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGPRIVATE_0 = 0xc0206950 + SIOCGPRIVATE_1 = 0xc0206951 + SIOCIFCREATE = 0xc020697a + SIOCIFCREATE2 = 0xc020697c + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc00c6978 + SIOCSDRVSPEC = 0x801c697b + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020691e + SIOCSIFDESCR = 0x80206929 + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFIB = 0x8020695d + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206927 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNAME = 0x80206928 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPHYS = 0x80206936 + SIOCSIFRVNET = 0xc020695b + SIOCSIFVNET = 0xc020695a + SIOCSLIFPHYADDR = 0x8118694a + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_CLOEXEC = 0x10000000 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_NONBLOCK = 0x20000000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BINTIME = 0x2000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1009 + SO_LINGER = 0x80 + SO_LISTENINCQLEN = 0x1013 + SO_LISTENQLEN = 0x1012 + SO_LISTENQLIMIT = 0x1011 + SO_NOSIGPIPE = 0x800 + SO_NO_DDP = 0x8000 + SO_NO_OFFLOAD = 0x4000 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1010 + SO_PROTOCOL = 0x1016 + SO_PROTOTYPE = 0x1016 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SETFIB = 0x1014 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SO_USER_COOKIE = 0x1015 + SO_VENDOR = 0x80000000 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CA_NAME_MAX = 0x10 + TCP_CONGESTION = 0x40 + TCP_INFO = 0x20 + TCP_KEEPCNT = 0x400 + TCP_KEEPIDLE = 0x100 + TCP_KEEPINIT = 0x80 + TCP_KEEPINTVL = 0x200 + TCP_MAXBURST = 0x4 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x10 + TCP_MINMSS = 0xd8 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_VENDOR = 0x80000000 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGPTN = 0x4004740f + TIOCGSID = 0x40047463 + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DCD = 0x40 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTMASTER = 0x2000741c + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2004745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40087459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VERASE2 = 0x7 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x4 + WCOREFLAG = 0x80 + WEXITED = 0x10 + WLINUXCLONE = 0x80000000 + WNOHANG = 0x1 + WNOWAIT = 0x8 + WSTOPPED = 0x2 + WTRAPPED = 0x20 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x59) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x55) + ECAPMODE = syscall.Errno(0x5e) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDOOFUS = syscall.Errno(0x58) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x52) + EILSEQ = syscall.Errno(0x56) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x60) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5a) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x57) + ENOBUFS = syscall.Errno(0x37) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x5b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x53) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCAPABLE = syscall.Errno(0x5d) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x5f) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x54) + EOWNERDEAD = syscall.Errno(0x60) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x5c) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGLIBRT = syscall.Signal(0x21) + SIGLWP = syscall.Signal(0x20) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHR = syscall.Signal(0x20) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "identifier removed", + 83: "no message of desired type", + 84: "value too large to be stored in data type", + 85: "operation canceled", + 86: "illegal byte sequence", + 87: "attribute not found", + 88: "programming error", + 89: "bad message", + 90: "multihop attempted", + 91: "link has been severed", + 92: "protocol error", + 93: "capabilities insufficient", + 94: "not permitted in capability mode", + 95: "state not recoverable", + 96: "previous owner died", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "unknown signal", + 33: "unknown signal", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go new file mode 100644 index 000000000..e48e7799a --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go @@ -0,0 +1,1748 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,freebsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_ARP = 0x23 + AF_ATM = 0x1e + AF_BLUETOOTH = 0x24 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1c + AF_INET6_SDP = 0x2a + AF_INET_SDP = 0x28 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x2a + AF_NATM = 0x1d + AF_NETBIOS = 0x6 + AF_NETGRAPH = 0x20 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SCLUSTER = 0x22 + AF_SIP = 0x18 + AF_SLOW = 0x21 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VENDOR00 = 0x27 + AF_VENDOR01 = 0x29 + AF_VENDOR02 = 0x2b + AF_VENDOR03 = 0x2d + AF_VENDOR04 = 0x2f + AF_VENDOR05 = 0x31 + AF_VENDOR06 = 0x33 + AF_VENDOR07 = 0x35 + AF_VENDOR08 = 0x37 + AF_VENDOR09 = 0x39 + AF_VENDOR10 = 0x3b + AF_VENDOR11 = 0x3d + AF_VENDOR12 = 0x3f + AF_VENDOR13 = 0x41 + AF_VENDOR14 = 0x43 + AF_VENDOR15 = 0x45 + AF_VENDOR16 = 0x47 + AF_VENDOR17 = 0x49 + AF_VENDOR18 = 0x4b + AF_VENDOR19 = 0x4d + AF_VENDOR20 = 0x4f + AF_VENDOR21 = 0x51 + AF_VENDOR22 = 0x53 + AF_VENDOR23 = 0x55 + AF_VENDOR24 = 0x57 + AF_VENDOR25 = 0x59 + AF_VENDOR26 = 0x5b + AF_VENDOR27 = 0x5d + AF_VENDOR28 = 0x5f + AF_VENDOR29 = 0x61 + AF_VENDOR30 = 0x63 + AF_VENDOR31 = 0x65 + AF_VENDOR32 = 0x67 + AF_VENDOR33 = 0x69 + AF_VENDOR34 = 0x6b + AF_VENDOR35 = 0x6d + AF_VENDOR36 = 0x6f + AF_VENDOR37 = 0x71 + AF_VENDOR38 = 0x73 + AF_VENDOR39 = 0x75 + AF_VENDOR40 = 0x77 + AF_VENDOR41 = 0x79 + AF_VENDOR42 = 0x7b + AF_VENDOR43 = 0x7d + AF_VENDOR44 = 0x7f + AF_VENDOR45 = 0x81 + AF_VENDOR46 = 0x83 + AF_VENDOR47 = 0x85 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B460800 = 0x70800 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B921600 = 0xe1000 + B9600 = 0x2580 + BIOCFEEDBACK = 0x8004427c + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDIRECTION = 0x40044276 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0104279 + BIOCGETBUFMODE = 0x4004427d + BIOCGETIF = 0x4020426b + BIOCGETZMAX = 0x4008427f + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4010426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCGTSTAMP = 0x40044283 + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x2000427a + BIOCPROMISC = 0x20004269 + BIOCROTZBUF = 0x40184280 + BIOCSBLEN = 0xc0044266 + BIOCSDIRECTION = 0x80044277 + BIOCSDLT = 0x80044278 + BIOCSETBUFMODE = 0x8004427e + BIOCSETF = 0x80104267 + BIOCSETFNR = 0x80104282 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x8010427b + BIOCSETZBUF = 0x80184281 + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8010426d + BIOCSSEESENT = 0x80044277 + BIOCSTSTAMP = 0x80044284 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x8 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_BUFMODE_BUFFER = 0x1 + BPF_BUFMODE_ZBUF = 0x2 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_T_BINTIME = 0x2 + BPF_T_BINTIME_FAST = 0x102 + BPF_T_BINTIME_MONOTONIC = 0x202 + BPF_T_BINTIME_MONOTONIC_FAST = 0x302 + BPF_T_FAST = 0x100 + BPF_T_FLAG_MASK = 0x300 + BPF_T_FORMAT_MASK = 0x3 + BPF_T_MICROTIME = 0x0 + BPF_T_MICROTIME_FAST = 0x100 + BPF_T_MICROTIME_MONOTONIC = 0x200 + BPF_T_MICROTIME_MONOTONIC_FAST = 0x300 + BPF_T_MONOTONIC = 0x200 + BPF_T_MONOTONIC_FAST = 0x300 + BPF_T_NANOTIME = 0x1 + BPF_T_NANOTIME_FAST = 0x101 + BPF_T_NANOTIME_MONOTONIC = 0x201 + BPF_T_NANOTIME_MONOTONIC_FAST = 0x301 + BPF_T_NONE = 0x3 + BPF_T_NORMAL = 0x0 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CLOCK_MONOTONIC = 0x4 + CLOCK_MONOTONIC_FAST = 0xc + CLOCK_MONOTONIC_PRECISE = 0xb + CLOCK_PROCESS_CPUTIME_ID = 0xf + CLOCK_PROF = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_FAST = 0xa + CLOCK_REALTIME_PRECISE = 0x9 + CLOCK_SECOND = 0xd + CLOCK_THREAD_CPUTIME_ID = 0xe + CLOCK_UPTIME = 0x5 + CLOCK_UPTIME_FAST = 0x8 + CLOCK_UPTIME_PRECISE = 0x7 + CLOCK_VIRTUAL = 0x1 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0x18 + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DBUS = 0xe7 + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_DVB_CI = 0xeb + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NOFCS = 0xe6 + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xf2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_ATM_CEMIC = 0xee + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FIBRECHANNEL = 0xea + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_SRX_E2E = 0xe9 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_JUNIPER_VS = 0xe8 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_PPP_WITHDIRECTION = 0xa6 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MATCHING_MAX = 0xf6 + DLT_MATCHING_MIN = 0x68 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPEG_2_TS = 0xf3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_MUX27010 = 0xec + DLT_NETANALYZER = 0xf0 + DLT_NETANALYZER_TRANSPARENT = 0xf1 + DLT_NFC_LLCP = 0xf5 + DLT_NFLOG = 0xef + DLT_NG40 = 0xf4 + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x79 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PPP_WITH_DIRECTION = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_STANAG_5066_D_PDU = 0xed + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_LIO = -0xa + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xb + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xb + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_DROP = 0x1000 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTATTR_NAMESPACE_EMPTY = 0x0 + EXTATTR_NAMESPACE_SYSTEM = 0x2 + EXTATTR_NAMESPACE_USER = 0x1 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_CANCEL = 0x5 + F_DUP2FD = 0xa + F_DUP2FD_CLOEXEC = 0x12 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x11 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0xb + F_GETOWN = 0x5 + F_OGETLK = 0x7 + F_OK = 0x0 + F_OSETLK = 0x8 + F_OSETLKW = 0x9 + F_RDAHEAD = 0x10 + F_RDLCK = 0x1 + F_READAHEAD = 0xf + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0xc + F_SETLKW = 0xd + F_SETLK_REMOTE = 0xe + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_UNLCKSYS = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x218f72 + IFF_CANTCONFIG = 0x10000 + IFF_DEBUG = 0x4 + IFF_DRV_OACTIVE = 0x400 + IFF_DRV_RUNNING = 0x40 + IFF_DYING = 0x200000 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MONITOR = 0x40000 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PPROMISC = 0x20000 + IFF_PROMISC = 0x100 + IFF_RENAMING = 0x400000 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_SMART = 0x20 + IFF_STATICARP = 0x80000 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf8 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_IPXIP = 0xf9 + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf6 + IFT_PFSYNC = 0xf7 + IFT_PLC = 0xae + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xd7 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VOICEEM = 0x64 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IN_RFC3021_MASK = 0xfffffffe + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CARP = 0x70 + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0x102 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HIP = 0x8b + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MH = 0x87 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MOBILE = 0x37 + IPPROTO_MPLS = 0x89 + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OLD_DIVERT = 0xfe + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_RESERVED_253 = 0xfd + IPPROTO_RESERVED_254 = 0xfe + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEND = 0x103 + IPPROTO_SEP = 0x21 + IPPROTO_SHIM6 = 0x8c + IPPROTO_SKIP = 0x39 + IPPROTO_SPACER = 0x7fff + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TLSP = 0x38 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_BINDANY = 0x40 + IPV6_BINDV6ONLY = 0x1b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MSFILTER = 0x4a + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_PREFER_TEMPADDR = 0x3f + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BINDANY = 0x18 + IP_BLOCK_SOURCE = 0x48 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DONTFRAG = 0x43 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET3 = 0x31 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW3 = 0x30 + IP_FW_ADD = 0x32 + IP_FW_DEL = 0x33 + IP_FW_FLUSH = 0x34 + IP_FW_GET = 0x36 + IP_FW_NAT_CFG = 0x38 + IP_FW_NAT_DEL = 0x39 + IP_FW_NAT_GET_CONFIG = 0x3a + IP_FW_NAT_GET_LOG = 0x3b + IP_FW_RESETLOG = 0x37 + IP_FW_TABLE_ADD = 0x28 + IP_FW_TABLE_DEL = 0x29 + IP_FW_TABLE_FLUSH = 0x2a + IP_FW_TABLE_GETSIZE = 0x2b + IP_FW_TABLE_LIST = 0x2c + IP_FW_ZERO = 0x35 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MAX_SOURCE_FILTER = 0x400 + IP_MF = 0x2000 + IP_MINTTL = 0x42 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_OFFMASK = 0x1fff + IP_ONESBCAST = 0x17 + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVTOS = 0x44 + IP_RECVTTL = 0x41 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_SENDSRCADDR = 0x7 + IP_TOS = 0x3 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_AUTOSYNC = 0x7 + MADV_CORE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_NOCORE = 0x8 + MADV_NORMAL = 0x0 + MADV_NOSYNC = 0x6 + MADV_PROTECT = 0xa + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MAP_32BIT = 0x80000 + MAP_ALIGNED_SUPER = 0x1000000 + MAP_ALIGNMENT_MASK = -0x1000000 + MAP_ALIGNMENT_SHIFT = 0x18 + MAP_ANON = 0x1000 + MAP_ANONYMOUS = 0x1000 + MAP_COPY = 0x2 + MAP_EXCL = 0x4000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_NOCORE = 0x20000 + MAP_NORESERVE = 0x40 + MAP_NOSYNC = 0x800 + MAP_PREFAULT_READ = 0x40000 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_RESERVED0080 = 0x80 + MAP_RESERVED0100 = 0x100 + MAP_SHARED = 0x1 + MAP_STACK = 0x400 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CMSG_CLOEXEC = 0x40000 + MSG_COMPAT = 0x8000 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_NBIO = 0x4000 + MSG_NOSIGNAL = 0x20000 + MSG_NOTIFICATION = 0x2000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x0 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLISTL = 0x5 + NET_RT_IFMALIST = 0x4 + NET_RT_MAXID = 0x6 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_MSECONDS = 0x2 + NOTE_NSECONDS = 0x8 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_SECONDS = 0x1 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_USECONDS = 0x4 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x100000 + O_CREAT = 0x200 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x20000 + O_EXCL = 0x800 + O_EXEC = 0x40000 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_TTY_INIT = 0x80000 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_FMASK = 0x1004d808 + RTF_GATEWAY = 0x2 + RTF_GWFLAG_COMPAT = 0x80000000 + RTF_HOST = 0x4 + RTF_LLDATA = 0x400 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_REJECT = 0x8 + RTF_RNH_LOCKED = 0x40000000 + RTF_STATIC = 0x800 + RTF_STICKY = 0x10000000 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x12 + RTM_IFANNOUNCE = 0x11 + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RTV_WEIGHT = 0x100 + RT_ALL_FIBS = -0x1 + RT_CACHING_CONTEXT = 0x1 + RT_DEFAULT_FIB = 0x0 + RT_NORTREF = 0x2 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_BINTIME = 0x4 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCADDRT = 0x8040720a + SIOCAIFADDR = 0x8040691a + SIOCAIFGROUP = 0x80286987 + SIOCALIFADDR = 0x8118691b + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80206932 + SIOCDELRT = 0x8040720b + SIOCDIFADDR = 0x80206919 + SIOCDIFGROUP = 0x80286989 + SIOCDIFPHYADDR = 0x80206949 + SIOCDLIFADDR = 0x8118691d + SIOCGDRVSPEC = 0xc028697b + SIOCGETSGCNT = 0xc0207210 + SIOCGETVIFCNT = 0xc028720f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020691f + SIOCGIFCONF = 0xc0106924 + SIOCGIFDESCR = 0xc020692a + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFIB = 0xc020695c + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc028698a + SIOCGIFGROUP = 0xc0286988 + SIOCGIFINDEX = 0xc0206920 + SIOCGIFMAC = 0xc0206926 + SIOCGIFMEDIA = 0xc0306938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFSTATUS = 0xc331693b + SIOCGLIFADDR = 0xc118691c + SIOCGLIFPHYADDR = 0xc118694b + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGPRIVATE_0 = 0xc0206950 + SIOCGPRIVATE_1 = 0xc0206951 + SIOCIFCREATE = 0xc020697a + SIOCIFCREATE2 = 0xc020697c + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc0106978 + SIOCSDRVSPEC = 0x8028697b + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020691e + SIOCSIFDESCR = 0x80206929 + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFIB = 0x8020695d + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206927 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNAME = 0x80206928 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPHYS = 0x80206936 + SIOCSIFRVNET = 0xc020695b + SIOCSIFVNET = 0xc020695a + SIOCSLIFPHYADDR = 0x8118694a + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_CLOEXEC = 0x10000000 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_NONBLOCK = 0x20000000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BINTIME = 0x2000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1009 + SO_LINGER = 0x80 + SO_LISTENINCQLEN = 0x1013 + SO_LISTENQLEN = 0x1012 + SO_LISTENQLIMIT = 0x1011 + SO_NOSIGPIPE = 0x800 + SO_NO_DDP = 0x8000 + SO_NO_OFFLOAD = 0x4000 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1010 + SO_PROTOCOL = 0x1016 + SO_PROTOTYPE = 0x1016 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SETFIB = 0x1014 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SO_USER_COOKIE = 0x1015 + SO_VENDOR = 0x80000000 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CA_NAME_MAX = 0x10 + TCP_CONGESTION = 0x40 + TCP_INFO = 0x20 + TCP_KEEPCNT = 0x400 + TCP_KEEPIDLE = 0x100 + TCP_KEEPINIT = 0x80 + TCP_KEEPINTVL = 0x200 + TCP_MAXBURST = 0x4 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x10 + TCP_MINMSS = 0xd8 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_VENDOR = 0x80000000 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGPTN = 0x4004740f + TIOCGSID = 0x40047463 + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DCD = 0x40 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTMASTER = 0x2000741c + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2004745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40107459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VERASE2 = 0x7 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x4 + WCOREFLAG = 0x80 + WEXITED = 0x10 + WLINUXCLONE = 0x80000000 + WNOHANG = 0x1 + WNOWAIT = 0x8 + WSTOPPED = 0x2 + WTRAPPED = 0x20 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x59) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x55) + ECAPMODE = syscall.Errno(0x5e) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDOOFUS = syscall.Errno(0x58) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x52) + EILSEQ = syscall.Errno(0x56) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x60) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5a) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x57) + ENOBUFS = syscall.Errno(0x37) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x5b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x53) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCAPABLE = syscall.Errno(0x5d) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x5f) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x54) + EOWNERDEAD = syscall.Errno(0x60) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x5c) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGLIBRT = syscall.Signal(0x21) + SIGLWP = syscall.Signal(0x20) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHR = syscall.Signal(0x20) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "identifier removed", + 83: "no message of desired type", + 84: "value too large to be stored in data type", + 85: "operation canceled", + 86: "illegal byte sequence", + 87: "attribute not found", + 88: "programming error", + 89: "bad message", + 90: "multihop attempted", + 91: "link has been severed", + 92: "protocol error", + 93: "capabilities insufficient", + 94: "not permitted in capability mode", + 95: "state not recoverable", + 96: "previous owner died", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "unknown signal", + 33: "unknown signal", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go new file mode 100644 index 000000000..2afbe2d5e --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go @@ -0,0 +1,1729 @@ +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm,freebsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_ARP = 0x23 + AF_ATM = 0x1e + AF_BLUETOOTH = 0x24 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x25 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1c + AF_INET6_SDP = 0x2a + AF_INET_SDP = 0x28 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x2a + AF_NATM = 0x1d + AF_NETBIOS = 0x6 + AF_NETGRAPH = 0x20 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SCLUSTER = 0x22 + AF_SIP = 0x18 + AF_SLOW = 0x21 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VENDOR00 = 0x27 + AF_VENDOR01 = 0x29 + AF_VENDOR02 = 0x2b + AF_VENDOR03 = 0x2d + AF_VENDOR04 = 0x2f + AF_VENDOR05 = 0x31 + AF_VENDOR06 = 0x33 + AF_VENDOR07 = 0x35 + AF_VENDOR08 = 0x37 + AF_VENDOR09 = 0x39 + AF_VENDOR10 = 0x3b + AF_VENDOR11 = 0x3d + AF_VENDOR12 = 0x3f + AF_VENDOR13 = 0x41 + AF_VENDOR14 = 0x43 + AF_VENDOR15 = 0x45 + AF_VENDOR16 = 0x47 + AF_VENDOR17 = 0x49 + AF_VENDOR18 = 0x4b + AF_VENDOR19 = 0x4d + AF_VENDOR20 = 0x4f + AF_VENDOR21 = 0x51 + AF_VENDOR22 = 0x53 + AF_VENDOR23 = 0x55 + AF_VENDOR24 = 0x57 + AF_VENDOR25 = 0x59 + AF_VENDOR26 = 0x5b + AF_VENDOR27 = 0x5d + AF_VENDOR28 = 0x5f + AF_VENDOR29 = 0x61 + AF_VENDOR30 = 0x63 + AF_VENDOR31 = 0x65 + AF_VENDOR32 = 0x67 + AF_VENDOR33 = 0x69 + AF_VENDOR34 = 0x6b + AF_VENDOR35 = 0x6d + AF_VENDOR36 = 0x6f + AF_VENDOR37 = 0x71 + AF_VENDOR38 = 0x73 + AF_VENDOR39 = 0x75 + AF_VENDOR40 = 0x77 + AF_VENDOR41 = 0x79 + AF_VENDOR42 = 0x7b + AF_VENDOR43 = 0x7d + AF_VENDOR44 = 0x7f + AF_VENDOR45 = 0x81 + AF_VENDOR46 = 0x83 + AF_VENDOR47 = 0x85 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B460800 = 0x70800 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B921600 = 0xe1000 + B9600 = 0x2580 + BIOCFEEDBACK = 0x8004427c + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDIRECTION = 0x40044276 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0084279 + BIOCGETBUFMODE = 0x4004427d + BIOCGETIF = 0x4020426b + BIOCGETZMAX = 0x4004427f + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044272 + BIOCGRTIMEOUT = 0x4008426e + BIOCGSEESENT = 0x40044276 + BIOCGSTATS = 0x4008426f + BIOCGTSTAMP = 0x40044283 + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x2000427a + BIOCPROMISC = 0x20004269 + BIOCROTZBUF = 0x400c4280 + BIOCSBLEN = 0xc0044266 + BIOCSDIRECTION = 0x80044277 + BIOCSDLT = 0x80044278 + BIOCSETBUFMODE = 0x8004427e + BIOCSETF = 0x80084267 + BIOCSETFNR = 0x80084282 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x8008427b + BIOCSETZBUF = 0x800c4281 + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044273 + BIOCSRTIMEOUT = 0x8008426d + BIOCSSEESENT = 0x80044277 + BIOCSTSTAMP = 0x80044284 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_BUFMODE_BUFFER = 0x1 + BPF_BUFMODE_ZBUF = 0x2 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x80000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_T_BINTIME = 0x2 + BPF_T_BINTIME_FAST = 0x102 + BPF_T_BINTIME_MONOTONIC = 0x202 + BPF_T_BINTIME_MONOTONIC_FAST = 0x302 + BPF_T_FAST = 0x100 + BPF_T_FLAG_MASK = 0x300 + BPF_T_FORMAT_MASK = 0x3 + BPF_T_MICROTIME = 0x0 + BPF_T_MICROTIME_FAST = 0x100 + BPF_T_MICROTIME_MONOTONIC = 0x200 + BPF_T_MICROTIME_MONOTONIC_FAST = 0x300 + BPF_T_MONOTONIC = 0x200 + BPF_T_MONOTONIC_FAST = 0x300 + BPF_T_NANOTIME = 0x1 + BPF_T_NANOTIME_FAST = 0x101 + BPF_T_NANOTIME_MONOTONIC = 0x201 + BPF_T_NANOTIME_MONOTONIC_FAST = 0x301 + BPF_T_NONE = 0x3 + BPF_T_NORMAL = 0x0 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0x18 + CTL_NET = 0x4 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CHDLC = 0x68 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DBUS = 0xe7 + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_DVB_CI = 0xeb + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HHDLC = 0x79 + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NOFCS = 0xe6 + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPFILTER = 0x74 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xf2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_ATM_CEMIC = 0xee + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FIBRECHANNEL = 0xea + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_SRX_E2E = 0xe9 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_JUNIPER_VS = 0xe8 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_PPP_WITHDIRECTION = 0xa6 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MATCHING_MAX = 0xf6 + DLT_MATCHING_MIN = 0x68 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPEG_2_TS = 0xf3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_MUX27010 = 0xec + DLT_NETANALYZER = 0xf0 + DLT_NETANALYZER_TRANSPARENT = 0xf1 + DLT_NFC_LLCP = 0xf5 + DLT_NFLOG = 0xef + DLT_NG40 = 0xf4 + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x79 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PPP_WITH_DIRECTION = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DLT_STANAG_5066_D_PDU = 0xed + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_USER0 = 0x93 + DLT_USER1 = 0x94 + DLT_USER10 = 0x9d + DLT_USER11 = 0x9e + DLT_USER12 = 0x9f + DLT_USER13 = 0xa0 + DLT_USER14 = 0xa1 + DLT_USER15 = 0xa2 + DLT_USER2 = 0x95 + DLT_USER3 = 0x96 + DLT_USER4 = 0x97 + DLT_USER5 = 0x98 + DLT_USER6 = 0x99 + DLT_USER7 = 0x9a + DLT_USER8 = 0x9b + DLT_USER9 = 0x9c + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EVFILT_AIO = -0x3 + EVFILT_FS = -0x9 + EVFILT_LIO = -0xa + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0xb + EVFILT_TIMER = -0x7 + EVFILT_USER = -0xb + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_DISPATCH = 0x80 + EV_DROP = 0x1000 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_RECEIPT = 0x40 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTATTR_NAMESPACE_EMPTY = 0x0 + EXTATTR_NAMESPACE_SYSTEM = 0x2 + EXTATTR_NAMESPACE_USER = 0x1 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_CANCEL = 0x5 + F_DUP2FD = 0xa + F_DUP2FD_CLOEXEC = 0x12 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x11 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0xb + F_GETOWN = 0x5 + F_OGETLK = 0x7 + F_OK = 0x0 + F_OSETLK = 0x8 + F_OSETLKW = 0x9 + F_RDAHEAD = 0x10 + F_RDLCK = 0x1 + F_READAHEAD = 0xf + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0xc + F_SETLKW = 0xd + F_SETLK_REMOTE = 0xe + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_UNLCKSYS = 0x4 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_ALTPHYS = 0x4000 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x218f72 + IFF_CANTCONFIG = 0x10000 + IFF_DEBUG = 0x4 + IFF_DRV_OACTIVE = 0x400 + IFF_DRV_RUNNING = 0x40 + IFF_DYING = 0x200000 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MONITOR = 0x40000 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PPROMISC = 0x20000 + IFF_PROMISC = 0x100 + IFF_RENAMING = 0x400000 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_SMART = 0x20 + IFF_STATICARP = 0x80000 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf8 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_IPXIP = 0xf9 + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf6 + IFT_PFSYNC = 0xf7 + IFT_PLC = 0xae + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xd7 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VOICEEM = 0x64 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IN_RFC3021_MASK = 0xfffffffe + IPPROTO_3PC = 0x22 + IPPROTO_ADFS = 0x44 + IPPROTO_AH = 0x33 + IPPROTO_AHIP = 0x3d + IPPROTO_APES = 0x63 + IPPROTO_ARGUS = 0xd + IPPROTO_AX25 = 0x5d + IPPROTO_BHA = 0x31 + IPPROTO_BLT = 0x1e + IPPROTO_BRSATMON = 0x4c + IPPROTO_CARP = 0x70 + IPPROTO_CFTP = 0x3e + IPPROTO_CHAOS = 0x10 + IPPROTO_CMTP = 0x26 + IPPROTO_CPHB = 0x49 + IPPROTO_CPNX = 0x48 + IPPROTO_DDP = 0x25 + IPPROTO_DGP = 0x56 + IPPROTO_DIVERT = 0x102 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_EMCON = 0xe + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GMTP = 0x64 + IPPROTO_GRE = 0x2f + IPPROTO_HELLO = 0x3f + IPPROTO_HIP = 0x8b + IPPROTO_HMP = 0x14 + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IDPR = 0x23 + IPPROTO_IDRP = 0x2d + IPPROTO_IGMP = 0x2 + IPPROTO_IGP = 0x55 + IPPROTO_IGRP = 0x58 + IPPROTO_IL = 0x28 + IPPROTO_INLSP = 0x34 + IPPROTO_INP = 0x20 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPCV = 0x47 + IPPROTO_IPEIP = 0x5e + IPPROTO_IPIP = 0x4 + IPPROTO_IPPC = 0x43 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IRTP = 0x1c + IPPROTO_KRYPTOLAN = 0x41 + IPPROTO_LARP = 0x5b + IPPROTO_LEAF1 = 0x19 + IPPROTO_LEAF2 = 0x1a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MEAS = 0x13 + IPPROTO_MH = 0x87 + IPPROTO_MHRP = 0x30 + IPPROTO_MICP = 0x5f + IPPROTO_MOBILE = 0x37 + IPPROTO_MPLS = 0x89 + IPPROTO_MTP = 0x5c + IPPROTO_MUX = 0x12 + IPPROTO_ND = 0x4d + IPPROTO_NHRP = 0x36 + IPPROTO_NONE = 0x3b + IPPROTO_NSP = 0x1f + IPPROTO_NVPII = 0xb + IPPROTO_OLD_DIVERT = 0xfe + IPPROTO_OSPFIGP = 0x59 + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PGM = 0x71 + IPPROTO_PIGP = 0x9 + IPPROTO_PIM = 0x67 + IPPROTO_PRM = 0x15 + IPPROTO_PUP = 0xc + IPPROTO_PVP = 0x4b + IPPROTO_RAW = 0xff + IPPROTO_RCCMON = 0xa + IPPROTO_RDP = 0x1b + IPPROTO_RESERVED_253 = 0xfd + IPPROTO_RESERVED_254 = 0xfe + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_RVD = 0x42 + IPPROTO_SATEXPAK = 0x40 + IPPROTO_SATMON = 0x45 + IPPROTO_SCCSP = 0x60 + IPPROTO_SCTP = 0x84 + IPPROTO_SDRP = 0x2a + IPPROTO_SEND = 0x103 + IPPROTO_SEP = 0x21 + IPPROTO_SHIM6 = 0x8c + IPPROTO_SKIP = 0x39 + IPPROTO_SPACER = 0x7fff + IPPROTO_SRPC = 0x5a + IPPROTO_ST = 0x7 + IPPROTO_SVMTP = 0x52 + IPPROTO_SWIPE = 0x35 + IPPROTO_TCF = 0x57 + IPPROTO_TCP = 0x6 + IPPROTO_TLSP = 0x38 + IPPROTO_TP = 0x1d + IPPROTO_TPXX = 0x27 + IPPROTO_TRUNK1 = 0x17 + IPPROTO_TRUNK2 = 0x18 + IPPROTO_TTP = 0x54 + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPPROTO_VINES = 0x53 + IPPROTO_VISA = 0x46 + IPPROTO_VMTP = 0x51 + IPPROTO_WBEXPAK = 0x4f + IPPROTO_WBMON = 0x4e + IPPROTO_WSN = 0x4a + IPPROTO_XNET = 0xf + IPPROTO_XTP = 0x24 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_BINDANY = 0x40 + IPV6_BINDV6ONLY = 0x1b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_FW_ADD = 0x1e + IPV6_FW_DEL = 0x1f + IPV6_FW_FLUSH = 0x20 + IPV6_FW_GET = 0x22 + IPV6_FW_ZERO = 0x21 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXOPTHDR = 0x800 + IPV6_MAXPACKET = 0xffff + IPV6_MAX_GROUP_SRC_FILTER = 0x200 + IPV6_MAX_MEMBERSHIPS = 0xfff + IPV6_MAX_SOCK_SRC_FILTER = 0x80 + IPV6_MIN_MEMBERSHIPS = 0x1f + IPV6_MMTU = 0x500 + IPV6_MSFILTER = 0x4a + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_PREFER_TEMPADDR = 0x3f + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_ADD_SOURCE_MEMBERSHIP = 0x46 + IP_BINDANY = 0x18 + IP_BLOCK_SOURCE = 0x48 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DONTFRAG = 0x43 + IP_DROP_MEMBERSHIP = 0xd + IP_DROP_SOURCE_MEMBERSHIP = 0x47 + IP_DUMMYNET3 = 0x31 + IP_DUMMYNET_CONFIGURE = 0x3c + IP_DUMMYNET_DEL = 0x3d + IP_DUMMYNET_FLUSH = 0x3e + IP_DUMMYNET_GET = 0x40 + IP_FAITH = 0x16 + IP_FW3 = 0x30 + IP_FW_ADD = 0x32 + IP_FW_DEL = 0x33 + IP_FW_FLUSH = 0x34 + IP_FW_GET = 0x36 + IP_FW_NAT_CFG = 0x38 + IP_FW_NAT_DEL = 0x39 + IP_FW_NAT_GET_CONFIG = 0x3a + IP_FW_NAT_GET_LOG = 0x3b + IP_FW_RESETLOG = 0x37 + IP_FW_TABLE_ADD = 0x28 + IP_FW_TABLE_DEL = 0x29 + IP_FW_TABLE_FLUSH = 0x2a + IP_FW_TABLE_GETSIZE = 0x2b + IP_FW_TABLE_LIST = 0x2c + IP_FW_ZERO = 0x35 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x15 + IP_MAXPACKET = 0xffff + IP_MAX_GROUP_SRC_FILTER = 0x200 + IP_MAX_MEMBERSHIPS = 0xfff + IP_MAX_SOCK_MUTE_FILTER = 0x80 + IP_MAX_SOCK_SRC_FILTER = 0x80 + IP_MAX_SOURCE_FILTER = 0x400 + IP_MF = 0x2000 + IP_MINTTL = 0x42 + IP_MIN_MEMBERSHIPS = 0x1f + IP_MSFILTER = 0x4a + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_VIF = 0xe + IP_OFFMASK = 0x1fff + IP_ONESBCAST = 0x17 + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVTOS = 0x44 + IP_RECVTTL = 0x41 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RSVP_OFF = 0x10 + IP_RSVP_ON = 0xf + IP_RSVP_VIF_OFF = 0x12 + IP_RSVP_VIF_ON = 0x11 + IP_SENDSRCADDR = 0x7 + IP_TOS = 0x3 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x49 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_AUTOSYNC = 0x7 + MADV_CORE = 0x9 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_NOCORE = 0x8 + MADV_NORMAL = 0x0 + MADV_NOSYNC = 0x6 + MADV_PROTECT = 0xa + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MAP_ALIGNED_SUPER = 0x1000000 + MAP_ALIGNMENT_MASK = -0x1000000 + MAP_ALIGNMENT_SHIFT = 0x18 + MAP_ANON = 0x1000 + MAP_ANONYMOUS = 0x1000 + MAP_COPY = 0x2 + MAP_EXCL = 0x4000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_NOCORE = 0x20000 + MAP_NORESERVE = 0x40 + MAP_NOSYNC = 0x800 + MAP_PREFAULT_READ = 0x40000 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_RESERVED0080 = 0x80 + MAP_RESERVED0100 = 0x100 + MAP_SHARED = 0x1 + MAP_STACK = 0x400 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CMSG_CLOEXEC = 0x40000 + MSG_COMPAT = 0x8000 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOF = 0x100 + MSG_EOR = 0x8 + MSG_NBIO = 0x4000 + MSG_NOSIGNAL = 0x20000 + MSG_NOTIFICATION = 0x2000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x0 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_IFLISTL = 0x5 + NET_RT_IFMALIST = 0x4 + NET_RT_MAXID = 0x6 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FFAND = 0x40000000 + NOTE_FFCOPY = 0xc0000000 + NOTE_FFCTRLMASK = 0xc0000000 + NOTE_FFLAGSMASK = 0xffffff + NOTE_FFNOP = 0x0 + NOTE_FFOR = 0x80000000 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRIGGER = 0x1000000 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x100000 + O_CREAT = 0x200 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x20000 + O_EXCL = 0x800 + O_EXEC = 0x40000 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_TTY_INIT = 0x80000 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x8 + RTAX_NETMASK = 0x2 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTF_BLACKHOLE = 0x1000 + RTF_BROADCAST = 0x400000 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_FMASK = 0x1004d808 + RTF_GATEWAY = 0x2 + RTF_GWFLAG_COMPAT = 0x80000000 + RTF_HOST = 0x4 + RTF_LLDATA = 0x400 + RTF_LLINFO = 0x400 + RTF_LOCAL = 0x200000 + RTF_MODIFIED = 0x20 + RTF_MULTICAST = 0x800000 + RTF_PINNED = 0x100000 + RTF_PRCLONING = 0x10000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x40000 + RTF_REJECT = 0x8 + RTF_RNH_LOCKED = 0x40000000 + RTF_STATIC = 0x800 + RTF_STICKY = 0x10000000 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DELMADDR = 0x10 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x12 + RTM_IFANNOUNCE = 0x11 + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_NEWMADDR = 0xf + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RTV_WEIGHT = 0x100 + RT_ALL_FIBS = -0x1 + RT_CACHING_CONTEXT = 0x1 + RT_DEFAULT_FIB = 0x0 + RT_NORTREF = 0x2 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_BINTIME = 0x4 + SCM_CREDS = 0x3 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x2 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCADDRT = 0x8030720a + SIOCAIFADDR = 0x8040691a + SIOCAIFGROUP = 0x80246987 + SIOCALIFADDR = 0x8118691b + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80206932 + SIOCDELRT = 0x8030720b + SIOCDIFADDR = 0x80206919 + SIOCDIFGROUP = 0x80246989 + SIOCDIFPHYADDR = 0x80206949 + SIOCDLIFADDR = 0x8118691d + SIOCGDRVSPEC = 0xc01c697b + SIOCGETSGCNT = 0xc0147210 + SIOCGETVIFCNT = 0xc014720f + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCAP = 0xc020691f + SIOCGIFCONF = 0xc0086924 + SIOCGIFDESCR = 0xc020692a + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFIB = 0xc020695c + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc024698a + SIOCGIFGROUP = 0xc0246988 + SIOCGIFINDEX = 0xc0206920 + SIOCGIFMAC = 0xc0206926 + SIOCGIFMEDIA = 0xc0286938 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc0206933 + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPHYS = 0xc0206935 + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFSTATUS = 0xc331693b + SIOCGLIFADDR = 0xc118691c + SIOCGLIFPHYADDR = 0xc118694b + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGPRIVATE_0 = 0xc0206950 + SIOCGPRIVATE_1 = 0xc0206951 + SIOCIFCREATE = 0xc020697a + SIOCIFCREATE2 = 0xc020697c + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc00c6978 + SIOCSDRVSPEC = 0x801c697b + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFCAP = 0x8020691e + SIOCSIFDESCR = 0x80206929 + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFIB = 0x8020695d + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020693c + SIOCSIFMAC = 0x80206927 + SIOCSIFMEDIA = 0xc0206937 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x80206934 + SIOCSIFNAME = 0x80206928 + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPHYS = 0x80206936 + SIOCSIFRVNET = 0xc020695b + SIOCSIFVNET = 0xc020695a + SIOCSLIFPHYADDR = 0x8118694a + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SOCK_CLOEXEC = 0x10000000 + SOCK_DGRAM = 0x2 + SOCK_MAXADDRLEN = 0xff + SOCK_NONBLOCK = 0x20000000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BINTIME = 0x2000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LABEL = 0x1009 + SO_LINGER = 0x80 + SO_LISTENINCQLEN = 0x1013 + SO_LISTENQLEN = 0x1012 + SO_LISTENQLIMIT = 0x1011 + SO_NOSIGPIPE = 0x800 + SO_NO_DDP = 0x8000 + SO_NO_OFFLOAD = 0x4000 + SO_OOBINLINE = 0x100 + SO_PEERLABEL = 0x1010 + SO_PROTOCOL = 0x1016 + SO_PROTOTYPE = 0x1016 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SETFIB = 0x1014 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_TIMESTAMP = 0x400 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SO_USER_COOKIE = 0x1015 + SO_VENDOR = 0x80000000 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CA_NAME_MAX = 0x10 + TCP_CONGESTION = 0x40 + TCP_INFO = 0x20 + TCP_KEEPCNT = 0x400 + TCP_KEEPIDLE = 0x100 + TCP_KEEPINIT = 0x80 + TCP_KEEPINTVL = 0x200 + TCP_MAXBURST = 0x4 + TCP_MAXHLEN = 0x3c + TCP_MAXOLEN = 0x28 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x4 + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x10 + TCP_MINMSS = 0xd8 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCP_NOOPT = 0x8 + TCP_NOPUSH = 0x4 + TCP_VENDOR = 0x80000000 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLUSH = 0x80047410 + TIOCGDRAINWAIT = 0x40047456 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGPGRP = 0x40047477 + TIOCGPTN = 0x4004740f + TIOCGSID = 0x40047463 + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGDTRWAIT = 0x4004745a + TIOCMGET = 0x4004746a + TIOCMSDTRWAIT = 0x8004745b + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DCD = 0x40 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTMASTER = 0x2000741c + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDRAINWAIT = 0x80047457 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSIG = 0x2004745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x20007465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCTIMESTAMP = 0x40087459 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VERASE2 = 0x7 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WCONTINUED = 0x4 + WCOREFLAG = 0x80 + WEXITED = 0x10 + WLINUXCLONE = 0x80000000 + WNOHANG = 0x1 + WNOWAIT = 0x8 + WSTOPPED = 0x2 + WTRAPPED = 0x20 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x59) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x55) + ECAPMODE = syscall.Errno(0x5e) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDOOFUS = syscall.Errno(0x58) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x52) + EILSEQ = syscall.Errno(0x56) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x60) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5a) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x57) + ENOBUFS = syscall.Errno(0x37) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x5b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x53) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCAPABLE = syscall.Errno(0x5d) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTRECOVERABLE = syscall.Errno(0x5f) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x2d) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x54) + EOWNERDEAD = syscall.Errno(0x60) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x5c) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGLIBRT = syscall.Signal(0x21) + SIGLWP = syscall.Signal(0x20) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHR = syscall.Signal(0x20) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "operation timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "identifier removed", + 83: "no message of desired type", + 84: "value too large to be stored in data type", + 85: "operation canceled", + 86: "illegal byte sequence", + 87: "attribute not found", + 88: "programming error", + 89: "bad message", + 90: "multihop attempted", + 91: "link has been severed", + 92: "protocol error", + 93: "capabilities insufficient", + 94: "not permitted in capability mode", + 95: "state not recoverable", + 96: "previous owner died", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "suspended (signal)", + 18: "suspended", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "unknown signal", + 33: "unknown signal", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go new file mode 100644 index 000000000..8f920124b --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -0,0 +1,1819 @@ +// mkerrors.sh -m32 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,linux + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m32 _const.go + +package unix + +import "syscall" + +const ( + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x28 + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_NFC = 0x27 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CAIF = 0x336 + ARPHRD_CAN = 0x118 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PHONET = 0x334 + ARPHRD_PHONET_PIPE = 0x335 + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_X25 = 0x10f + B0 = 0x0 + B1000000 = 0x1008 + B110 = 0x3 + B115200 = 0x1002 + B1152000 = 0x1009 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1500000 = 0x100a + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2000000 = 0x100b + B230400 = 0x1003 + B2400 = 0xb + B2500000 = 0x100c + B300 = 0x7 + B3000000 = 0x100d + B3500000 = 0x100e + B38400 = 0xf + B4000000 = 0x100f + B460800 = 0x1004 + B4800 = 0xc + B50 = 0x1 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B600 = 0x8 + B75 = 0x2 + B921600 = 0x1007 + B9600 = 0xd + BOTHER = 0x1000 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CFLUSH = 0xf + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWCGROUP = 0x2000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CMSPAR = 0x40000000 + CR0 = 0x0 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CRTSCTS = 0x80000000 + CS5 = 0x0 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIGNAL = 0xff + CSIZE = 0x30 + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSTOPB = 0x40 + CSUSP = 0x1a + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + ENCODING_DEFAULT = 0x0 + ENCODING_FM_MARK = 0x3 + ENCODING_FM_SPACE = 0x4 + ENCODING_MANCHESTER = 0x5 + ENCODING_NRZ = 0x1 + ENCODING_NRZI = 0x2 + EPOLLERR = 0x8 + EPOLLET = 0x80000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CLOEXEC = 0x80000 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + EPOLL_NONBLOCK = 0x800 + ETH_P_1588 = 0x88f7 + ETH_P_8021AD = 0x88a8 + ETH_P_8021AH = 0x88e7 + ETH_P_8021Q = 0x8100 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_AARP = 0x80f3 + ETH_P_AF_IUCV = 0xfbfb + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_QINQ1 = 0x9100 + ETH_P_QINQ2 = 0x9200 + ETH_P_QINQ3 = 0x9300 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TDLS = 0x890d + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + EXTA = 0xe + EXTB = 0xf + EXTPROC = 0x10000 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FF0 = 0x0 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x1000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETLK = 0xc + F_GETLK64 = 0xc + F_GETOWN = 0x9 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OK = 0x0 + F_RDLCK = 0x0 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETLK = 0xd + F_SETLK64 = 0xd + F_SETLKW = 0xe + F_SETLKW64 = 0xe + F_SETOWN = 0x8 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + IBSHIFT = 0x10 + ICANON = 0x2 + ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IEXTEN = 0x8000 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_NODAD = 0x2 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0x7 + IFF_802_1Q_VLAN = 0x1 + IFF_ALLMULTI = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BONDING = 0x20 + IFF_BRIDGE_PORT = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DISABLE_NETPOLL = 0x1000 + IFF_DONT_BRIDGE = 0x800 + IFF_DORMANT = 0x20000 + IFF_DYNAMIC = 0x8000 + IFF_EBRIDGE = 0x2 + IFF_ECHO = 0x40000 + IFF_ISATAP = 0x80 + IFF_LOOPBACK = 0x8 + IFF_LOWER_UP = 0x10000 + IFF_MACVLAN_PORT = 0x2000 + IFF_MASTER = 0x400 + IFF_MASTER_8023AD = 0x8 + IFF_MASTER_ALB = 0x10 + IFF_MASTER_ARPMON = 0x100 + IFF_MULTICAST = 0x1000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_OVS_DATAPATH = 0x8000 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_SLAVE_INACTIVE = 0x4 + IFF_SLAVE_NEEDARP = 0x40 + IFF_TAP = 0x2 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_TX_SKB_SHARING = 0x10000 + IFF_UNICAST_FLT = 0x20000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFF_VOLATILE = 0x70c5a + IFF_WAN_HDLC = 0x200 + IFF_XMIT_DST_RELEASE = 0x400 + IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOEXEC = 0x80000 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_NONBLOCK = 0x800 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_CHECKSUM = 0x7 + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_UNICAST_HOPS = 0x10 + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BLOCK_SOURCE = 0x26 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_ALL = 0x31 + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_XFRM_POLICY = 0x11 + ISIG = 0x1 + ISTRIP = 0x20 + IUCLC = 0x200 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x1000 + IXON = 0x400 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DOFORK = 0xb + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MAP_32BIT = 0x40 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_PRIVATE = 0x2 + MAP_SHARED = 0x1 + MAP_STACK = 0x20000 + MAP_TYPE = 0xf + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + NAME_MAX = 0xff + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CONNECTOR = 0xb + NETLINK_CRYPTO = 0x15 + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NL0 = 0x0 + NL1 = 0x100 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLDLY = 0x100 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_DUMP_INTR = 0x10 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + NOFLSH = 0x80 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + OLCUC = 0x2 + ONLCR = 0x4 + ONLRET = 0x20 + ONOCR = 0x10 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x4000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x8000 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_AUXDATA = 0x8 + PACKET_BROADCAST = 0x1 + PACKET_COPY_THRESH = 0x7 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FANOUT = 0x12 + PACKET_FANOUT_CPU = 0x2 + PACKET_FANOUT_FLAG_DEFRAG = 0x8000 + PACKET_FANOUT_HASH = 0x0 + PACKET_FANOUT_LB = 0x1 + PACKET_FASTROUTE = 0x6 + PACKET_HDRLEN = 0xb + PACKET_HOST = 0x0 + PACKET_LOOPBACK = 0x5 + PACKET_LOSS = 0xe + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MR_UNICAST = 0x3 + PACKET_MULTICAST = 0x2 + PACKET_ORIGDEV = 0x9 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RESERVE = 0xc + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PACKET_TIMESTAMP = 0x11 + PACKET_TX_RING = 0xd + PACKET_TX_TIMESTAMP = 0x10 + PACKET_VERSION = 0xa + PACKET_VNET_HDR = 0xf + PARENB = 0x100 + PARITY_CRC16_PR0 = 0x2 + PARITY_CRC16_PR0_CCITT = 0x4 + PARITY_CRC16_PR1 = 0x3 + PARITY_CRC16_PR1_CCITT = 0x5 + PARITY_CRC32_PR0_CCITT = 0x6 + PARITY_CRC32_PR1_CCITT = 0x7 + PARITY_DEFAULT = 0x0 + PARITY_NONE = 0x1 + PARMRK = 0x8 + PARODD = 0x200 + PENDIN = 0x4000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_NO_NEW_PRIVS = 0x27 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECUREBITS = 0x1b + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_KEEPCAPS = 0x8 + PR_SET_MM = 0x23 + PR_SET_MM_BRK = 0x7 + PR_SET_MM_END_CODE = 0x2 + PR_SET_MM_END_DATA = 0x4 + PR_SET_MM_START_BRK = 0x6 + PR_SET_MM_START_CODE = 0x1 + PR_SET_MM_START_DATA = 0x3 + PR_SET_MM_START_STACK = 0x5 + PR_SET_NAME = 0xf + PR_SET_NO_NEW_PRIVS = 0x26 + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_PTRACER_ANY = 0xffffffff + PR_SET_SECCOMP = 0x16 + PR_SET_SECUREBITS = 0x1c + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_SECCOMP = 0x7 + PTRACE_EVENT_STOP = 0x80 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETFPREGS = 0xe + PTRACE_GETFPXREGS = 0x12 + PTRACE_GETREGS = 0xc + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GET_THREAD_AREA = 0x19 + PTRACE_INTERRUPT = 0x4207 + PTRACE_KILL = 0x8 + PTRACE_LISTEN = 0x4208 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_O_MASK = 0xff + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESECCOMP = 0x80 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKUSR = 0x3 + PTRACE_POKEDATA = 0x5 + PTRACE_POKETEXT = 0x4 + PTRACE_POKEUSR = 0x6 + PTRACE_SEIZE = 0x4206 + PTRACE_SEIZE_DEVEL = 0x80000000 + PTRACE_SETFPREGS = 0xf + PTRACE_SETFPXREGS = 0x13 + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SET_THREAD_AREA = 0x1a + PTRACE_SINGLEBLOCK = 0x21 + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_SYSEMU = 0x1f + PTRACE_SYSEMU_SINGLESTEP = 0x20 + PTRACE_TRACEME = 0x0 + RLIMIT_AS = 0x9 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x7 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x1 + RTAX_ADVMSS = 0x8 + RTAX_CWND = 0x7 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0xe + RTAX_MTU = 0x2 + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x10 + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELLINK = 0x11 + RTM_DELNEIGH = 0x1d + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x4f + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWLINK = 0x10 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x10 + RTM_NR_MSGTYPES = 0x40 + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_F_DEAD = 0x1 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTN_MAX = 0xb + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_GATED = 0x8 + RTPROT_KERNEL = 0x2 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPNS = 0x23 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCATMARK = 0x8905 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGPGRP = 0x8904 + SIOCGRARP = 0x8961 + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSPGRP = 0x8902 + SIOCSRARP = 0x8962 + SOCK_CLOEXEC = 0x80000 + SOCK_DCCP = 0x6 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_AAL = 0x109 + SOL_ATM = 0x108 + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_PACKET = 0x107 + SOL_RAW = 0xff + SOL_SOCKET = 0x1 + SOL_TCP = 0x6 + SOL_X25 = 0x106 + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_FILTER = 0x1a + SO_BINDTODEVICE = 0x19 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_DEBUG = 0x1 + SO_DETACH_FILTER = 0x1b + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_MARK = 0x24 + SO_NO_CHECK = 0xb + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSSEC = 0x22 + SO_PEERCRED = 0x11 + SO_PEERNAME = 0x1c + SO_PEERSEC = 0x1f + SO_PRIORITY = 0xc + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVTIMEO = 0x14 + SO_REUSEADDR = 0x2 + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_TIMESTAMP = 0x1d + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TYPE = 0x3 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TAB0 = 0x0 + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 + TCIFLUSH = 0x0 + TCIOFF = 0x2 + TCIOFLUSH = 0x2 + TCION = 0x3 + TCOFLUSH = 0x1 + TCOOFF = 0x0 + TCOON = 0x1 + TCP_CONGESTION = 0xd + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_INFO = 0xb + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_QUICKACK = 0xc + TCP_SYNCNT = 0x7 + TCP_WINDOW_CLAMP = 0xa + TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 + TIOCGICOUNT = 0x545d + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 + TIOCGPTN = 0x80045430 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x400854d5 + TUNDETACHFILTER = 0x400854d6 + TUNGETFEATURES = 0x800454cf + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETHDRSZ = 0x800454d7 + TUNSETDEBUG = 0x400454c9 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETSNDBUF = 0x400454d4 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETHDRSZ = 0x400454d8 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x6 + VQUIT = 0x1 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT0 = 0x0 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WORDSIZE = 0x20 + WSTOPPED = 0x2 + WUNTRACED = 0x2 + XCASE = 0x4 + XTABS = 0x1800 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x62) + EADDRNOTAVAIL = syscall.Errno(0x63) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x61) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x72) + EBADE = syscall.Errno(0x34) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x4d) + EBADMSG = syscall.Errno(0x4a) + EBADR = syscall.Errno(0x35) + EBADRQC = syscall.Errno(0x38) + EBADSLT = syscall.Errno(0x39) + EBFONT = syscall.Errno(0x3b) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x7d) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x2c) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x67) + ECONNREFUSED = syscall.Errno(0x6f) + ECONNRESET = syscall.Errno(0x68) + EDEADLK = syscall.Errno(0x23) + EDEADLOCK = syscall.Errno(0x23) + EDESTADDRREQ = syscall.Errno(0x59) + EDOM = syscall.Errno(0x21) + EDOTDOT = syscall.Errno(0x49) + EDQUOT = syscall.Errno(0x7a) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x70) + EHOSTUNREACH = syscall.Errno(0x71) + EHWPOISON = syscall.Errno(0x85) + EIDRM = syscall.Errno(0x2b) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x73) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x6a) + EISDIR = syscall.Errno(0x15) + EISNAM = syscall.Errno(0x78) + EKEYEXPIRED = syscall.Errno(0x7f) + EKEYREJECTED = syscall.Errno(0x81) + EKEYREVOKED = syscall.Errno(0x80) + EL2HLT = syscall.Errno(0x33) + EL2NSYNC = syscall.Errno(0x2d) + EL3HLT = syscall.Errno(0x2e) + EL3RST = syscall.Errno(0x2f) + ELIBACC = syscall.Errno(0x4f) + ELIBBAD = syscall.Errno(0x50) + ELIBEXEC = syscall.Errno(0x53) + ELIBMAX = syscall.Errno(0x52) + ELIBSCN = syscall.Errno(0x51) + ELNRNG = syscall.Errno(0x30) + ELOOP = syscall.Errno(0x28) + EMEDIUMTYPE = syscall.Errno(0x7c) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x5a) + EMULTIHOP = syscall.Errno(0x48) + ENAMETOOLONG = syscall.Errno(0x24) + ENAVAIL = syscall.Errno(0x77) + ENETDOWN = syscall.Errno(0x64) + ENETRESET = syscall.Errno(0x66) + ENETUNREACH = syscall.Errno(0x65) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x37) + ENOBUFS = syscall.Errno(0x69) + ENOCSI = syscall.Errno(0x32) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOKEY = syscall.Errno(0x7e) + ENOLCK = syscall.Errno(0x25) + ENOLINK = syscall.Errno(0x43) + ENOMEDIUM = syscall.Errno(0x7b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x2a) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x5c) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x26) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x6b) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x27) + ENOTNAM = syscall.Errno(0x76) + ENOTRECOVERABLE = syscall.Errno(0x83) + ENOTSOCK = syscall.Errno(0x58) + ENOTSUP = syscall.Errno(0x5f) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x4c) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x5f) + EOVERFLOW = syscall.Errno(0x4b) + EOWNERDEAD = syscall.Errno(0x82) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x60) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x5d) + EPROTOTYPE = syscall.Errno(0x5b) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x4e) + EREMOTE = syscall.Errno(0x42) + EREMOTEIO = syscall.Errno(0x79) + ERESTART = syscall.Errno(0x55) + ERFKILL = syscall.Errno(0x84) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x6c) + ESOCKTNOSUPPORT = syscall.Errno(0x5e) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x74) + ESTRPIPE = syscall.Errno(0x56) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x6e) + ETOOMANYREFS = syscall.Errno(0x6d) + ETXTBSY = syscall.Errno(0x1a) + EUCLEAN = syscall.Errno(0x75) + EUNATCH = syscall.Errno(0x31) + EUSERS = syscall.Errno(0x57) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x36) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0x7) + SIGCHLD = syscall.Signal(0x11) + SIGCLD = syscall.Signal(0x11) + SIGCONT = syscall.Signal(0x12) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x1d) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x1d) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x1e) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTKFLT = syscall.Signal(0x10) + SIGSTOP = syscall.Signal(0x13) + SIGSYS = syscall.Signal(0x1f) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x14) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGUNUSED = syscall.Signal(0x1f) + SIGURG = syscall.Signal(0x17) + SIGUSR1 = syscall.Signal(0xa) + SIGUSR2 = syscall.Signal(0xc) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "no such device or address", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device or resource busy", + 17: "file exists", + 18: "invalid cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "numerical result out of range", + 35: "resource deadlock avoided", + 36: "file name too long", + 37: "no locks available", + 38: "function not implemented", + 39: "directory not empty", + 40: "too many levels of symbolic links", + 42: "no message of desired type", + 43: "identifier removed", + 44: "channel number out of range", + 45: "level 2 not synchronized", + 46: "level 3 halted", + 47: "level 3 reset", + 48: "link number out of range", + 49: "protocol driver not attached", + 50: "no CSI structure available", + 51: "level 2 halted", + 52: "invalid exchange", + 53: "invalid request descriptor", + 54: "exchange full", + 55: "no anode", + 56: "invalid request code", + 57: "invalid slot", + 59: "bad font file format", + 60: "device not a stream", + 61: "no data available", + 62: "timer expired", + 63: "out of streams resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 72: "multihop attempted", + 73: "RFS specific error", + 74: "bad message", + 75: "value too large for defined data type", + 76: "name not unique on network", + 77: "file descriptor in bad state", + 78: "remote address changed", + 79: "can not access a needed shared library", + 80: "accessing a corrupted shared library", + 81: ".lib section in a.out corrupted", + 82: "attempting to link in too many shared libraries", + 83: "cannot exec a shared library directly", + 84: "invalid or incomplete multibyte or wide character", + 85: "interrupted system call should be restarted", + 86: "streams pipe error", + 87: "too many users", + 88: "socket operation on non-socket", + 89: "destination address required", + 90: "message too long", + 91: "protocol wrong type for socket", + 92: "protocol not available", + 93: "protocol not supported", + 94: "socket type not supported", + 95: "operation not supported", + 96: "protocol family not supported", + 97: "address family not supported by protocol", + 98: "address already in use", + 99: "cannot assign requested address", + 100: "network is down", + 101: "network is unreachable", + 102: "network dropped connection on reset", + 103: "software caused connection abort", + 104: "connection reset by peer", + 105: "no buffer space available", + 106: "transport endpoint is already connected", + 107: "transport endpoint is not connected", + 108: "cannot send after transport endpoint shutdown", + 109: "too many references: cannot splice", + 110: "connection timed out", + 111: "connection refused", + 112: "host is down", + 113: "no route to host", + 114: "operation already in progress", + 115: "operation now in progress", + 116: "stale NFS file handle", + 117: "structure needs cleaning", + 118: "not a XENIX named type file", + 119: "no XENIX semaphores available", + 120: "is a named type file", + 121: "remote I/O error", + 122: "disk quota exceeded", + 123: "no medium found", + 124: "wrong medium type", + 125: "operation canceled", + 126: "required key not available", + 127: "key has expired", + 128: "key has been revoked", + 129: "key was rejected by service", + 130: "owner died", + 131: "state not recoverable", + 132: "operation not possible due to RF-kill", + 133: "unknown error 133", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "bus error", + 8: "floating point exception", + 9: "killed", + 10: "user defined signal 1", + 11: "segmentation fault", + 12: "user defined signal 2", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "stack fault", + 17: "child exited", + 18: "continued", + 19: "stopped (signal)", + 20: "stopped", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "urgent I/O condition", + 24: "CPU time limit exceeded", + 25: "file size limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window changed", + 29: "I/O possible", + 30: "power failure", + 31: "bad system call", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go new file mode 100644 index 000000000..49b6c3546 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -0,0 +1,1820 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,linux + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x28 + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_NFC = 0x27 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CAIF = 0x336 + ARPHRD_CAN = 0x118 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PHONET = 0x334 + ARPHRD_PHONET_PIPE = 0x335 + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_X25 = 0x10f + B0 = 0x0 + B1000000 = 0x1008 + B110 = 0x3 + B115200 = 0x1002 + B1152000 = 0x1009 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1500000 = 0x100a + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2000000 = 0x100b + B230400 = 0x1003 + B2400 = 0xb + B2500000 = 0x100c + B300 = 0x7 + B3000000 = 0x100d + B3500000 = 0x100e + B38400 = 0xf + B4000000 = 0x100f + B460800 = 0x1004 + B4800 = 0xc + B50 = 0x1 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B600 = 0x8 + B75 = 0x2 + B921600 = 0x1007 + B9600 = 0xd + BOTHER = 0x1000 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CFLUSH = 0xf + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWCGROUP = 0x2000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CMSPAR = 0x40000000 + CR0 = 0x0 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CRTSCTS = 0x80000000 + CS5 = 0x0 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIGNAL = 0xff + CSIZE = 0x30 + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSTOPB = 0x40 + CSUSP = 0x1a + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + ENCODING_DEFAULT = 0x0 + ENCODING_FM_MARK = 0x3 + ENCODING_FM_SPACE = 0x4 + ENCODING_MANCHESTER = 0x5 + ENCODING_NRZ = 0x1 + ENCODING_NRZI = 0x2 + EPOLLERR = 0x8 + EPOLLET = 0x80000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CLOEXEC = 0x80000 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + EPOLL_NONBLOCK = 0x800 + ETH_P_1588 = 0x88f7 + ETH_P_8021AD = 0x88a8 + ETH_P_8021AH = 0x88e7 + ETH_P_8021Q = 0x8100 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_AARP = 0x80f3 + ETH_P_AF_IUCV = 0xfbfb + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_QINQ1 = 0x9100 + ETH_P_QINQ2 = 0x9200 + ETH_P_QINQ3 = 0x9300 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TDLS = 0x890d + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + EXTA = 0xe + EXTB = 0xf + EXTPROC = 0x10000 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FF0 = 0x0 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x1000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETLK = 0x5 + F_GETLK64 = 0x5 + F_GETOWN = 0x9 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OK = 0x0 + F_RDLCK = 0x0 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETOWN = 0x8 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + IBSHIFT = 0x10 + ICANON = 0x2 + ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IEXTEN = 0x8000 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_NODAD = 0x2 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0x7 + IFF_802_1Q_VLAN = 0x1 + IFF_ALLMULTI = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BONDING = 0x20 + IFF_BRIDGE_PORT = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DISABLE_NETPOLL = 0x1000 + IFF_DONT_BRIDGE = 0x800 + IFF_DORMANT = 0x20000 + IFF_DYNAMIC = 0x8000 + IFF_EBRIDGE = 0x2 + IFF_ECHO = 0x40000 + IFF_ISATAP = 0x80 + IFF_LOOPBACK = 0x8 + IFF_LOWER_UP = 0x10000 + IFF_MACVLAN_PORT = 0x2000 + IFF_MASTER = 0x400 + IFF_MASTER_8023AD = 0x8 + IFF_MASTER_ALB = 0x10 + IFF_MASTER_ARPMON = 0x100 + IFF_MULTICAST = 0x1000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_OVS_DATAPATH = 0x8000 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_SLAVE_INACTIVE = 0x4 + IFF_SLAVE_NEEDARP = 0x40 + IFF_TAP = 0x2 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_TX_SKB_SHARING = 0x10000 + IFF_UNICAST_FLT = 0x20000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFF_VOLATILE = 0x70c5a + IFF_WAN_HDLC = 0x200 + IFF_XMIT_DST_RELEASE = 0x400 + IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOEXEC = 0x80000 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_NONBLOCK = 0x800 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_CHECKSUM = 0x7 + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_UNICAST_HOPS = 0x10 + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BLOCK_SOURCE = 0x26 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_ALL = 0x31 + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_XFRM_POLICY = 0x11 + ISIG = 0x1 + ISTRIP = 0x20 + IUCLC = 0x200 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x1000 + IXON = 0x400 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DOFORK = 0xb + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MAP_32BIT = 0x40 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_PRIVATE = 0x2 + MAP_SHARED = 0x1 + MAP_STACK = 0x20000 + MAP_TYPE = 0xf + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + NAME_MAX = 0xff + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CONNECTOR = 0xb + NETLINK_CRYPTO = 0x15 + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NL0 = 0x0 + NL1 = 0x100 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLDLY = 0x100 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_DUMP_INTR = 0x10 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + NOFLSH = 0x80 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + OLCUC = 0x2 + ONLCR = 0x4 + ONLRET = 0x20 + ONOCR = 0x10 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x4000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_AUXDATA = 0x8 + PACKET_BROADCAST = 0x1 + PACKET_COPY_THRESH = 0x7 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FANOUT = 0x12 + PACKET_FANOUT_CPU = 0x2 + PACKET_FANOUT_FLAG_DEFRAG = 0x8000 + PACKET_FANOUT_HASH = 0x0 + PACKET_FANOUT_LB = 0x1 + PACKET_FASTROUTE = 0x6 + PACKET_HDRLEN = 0xb + PACKET_HOST = 0x0 + PACKET_LOOPBACK = 0x5 + PACKET_LOSS = 0xe + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MR_UNICAST = 0x3 + PACKET_MULTICAST = 0x2 + PACKET_ORIGDEV = 0x9 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RESERVE = 0xc + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PACKET_TIMESTAMP = 0x11 + PACKET_TX_RING = 0xd + PACKET_TX_TIMESTAMP = 0x10 + PACKET_VERSION = 0xa + PACKET_VNET_HDR = 0xf + PARENB = 0x100 + PARITY_CRC16_PR0 = 0x2 + PARITY_CRC16_PR0_CCITT = 0x4 + PARITY_CRC16_PR1 = 0x3 + PARITY_CRC16_PR1_CCITT = 0x5 + PARITY_CRC32_PR0_CCITT = 0x6 + PARITY_CRC32_PR1_CCITT = 0x7 + PARITY_DEFAULT = 0x0 + PARITY_NONE = 0x1 + PARMRK = 0x8 + PARODD = 0x200 + PENDIN = 0x4000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_NO_NEW_PRIVS = 0x27 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECUREBITS = 0x1b + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_KEEPCAPS = 0x8 + PR_SET_MM = 0x23 + PR_SET_MM_BRK = 0x7 + PR_SET_MM_END_CODE = 0x2 + PR_SET_MM_END_DATA = 0x4 + PR_SET_MM_START_BRK = 0x6 + PR_SET_MM_START_CODE = 0x1 + PR_SET_MM_START_DATA = 0x3 + PR_SET_MM_START_STACK = 0x5 + PR_SET_NAME = 0xf + PR_SET_NO_NEW_PRIVS = 0x26 + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_PTRACER_ANY = -0x1 + PR_SET_SECCOMP = 0x16 + PR_SET_SECUREBITS = 0x1c + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PTRACE_ARCH_PRCTL = 0x1e + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_SECCOMP = 0x7 + PTRACE_EVENT_STOP = 0x80 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETFPREGS = 0xe + PTRACE_GETFPXREGS = 0x12 + PTRACE_GETREGS = 0xc + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GET_THREAD_AREA = 0x19 + PTRACE_INTERRUPT = 0x4207 + PTRACE_KILL = 0x8 + PTRACE_LISTEN = 0x4208 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_O_MASK = 0xff + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESECCOMP = 0x80 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKUSR = 0x3 + PTRACE_POKEDATA = 0x5 + PTRACE_POKETEXT = 0x4 + PTRACE_POKEUSR = 0x6 + PTRACE_SEIZE = 0x4206 + PTRACE_SEIZE_DEVEL = 0x80000000 + PTRACE_SETFPREGS = 0xf + PTRACE_SETFPXREGS = 0x13 + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SET_THREAD_AREA = 0x1a + PTRACE_SINGLEBLOCK = 0x21 + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_SYSEMU = 0x1f + PTRACE_SYSEMU_SINGLESTEP = 0x20 + PTRACE_TRACEME = 0x0 + RLIMIT_AS = 0x9 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x7 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x1 + RTAX_ADVMSS = 0x8 + RTAX_CWND = 0x7 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0xe + RTAX_MTU = 0x2 + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x10 + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELLINK = 0x11 + RTM_DELNEIGH = 0x1d + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x4f + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWLINK = 0x10 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x10 + RTM_NR_MSGTYPES = 0x40 + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_F_DEAD = 0x1 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTN_MAX = 0xb + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_GATED = 0x8 + RTPROT_KERNEL = 0x2 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPNS = 0x23 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCATMARK = 0x8905 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGPGRP = 0x8904 + SIOCGRARP = 0x8961 + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSPGRP = 0x8902 + SIOCSRARP = 0x8962 + SOCK_CLOEXEC = 0x80000 + SOCK_DCCP = 0x6 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_AAL = 0x109 + SOL_ATM = 0x108 + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_PACKET = 0x107 + SOL_RAW = 0xff + SOL_SOCKET = 0x1 + SOL_TCP = 0x6 + SOL_X25 = 0x106 + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_FILTER = 0x1a + SO_BINDTODEVICE = 0x19 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_DEBUG = 0x1 + SO_DETACH_FILTER = 0x1b + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_MARK = 0x24 + SO_NO_CHECK = 0xb + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSSEC = 0x22 + SO_PEERCRED = 0x11 + SO_PEERNAME = 0x1c + SO_PEERSEC = 0x1f + SO_PRIORITY = 0xc + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVTIMEO = 0x14 + SO_REUSEADDR = 0x2 + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_TIMESTAMP = 0x1d + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TYPE = 0x3 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TAB0 = 0x0 + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 + TCIFLUSH = 0x0 + TCIOFF = 0x2 + TCIOFLUSH = 0x2 + TCION = 0x3 + TCOFLUSH = 0x1 + TCOOFF = 0x0 + TCOON = 0x1 + TCP_CONGESTION = 0xd + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_INFO = 0xb + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_QUICKACK = 0xc + TCP_SYNCNT = 0x7 + TCP_WINDOW_CLAMP = 0xa + TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 + TIOCGICOUNT = 0x545d + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 + TIOCGPTN = 0x80045430 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x401054d5 + TUNDETACHFILTER = 0x401054d6 + TUNGETFEATURES = 0x800454cf + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETHDRSZ = 0x800454d7 + TUNSETDEBUG = 0x400454c9 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETSNDBUF = 0x400454d4 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETHDRSZ = 0x400454d8 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x6 + VQUIT = 0x1 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT0 = 0x0 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WORDSIZE = 0x40 + WSTOPPED = 0x2 + WUNTRACED = 0x2 + XCASE = 0x4 + XTABS = 0x1800 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x62) + EADDRNOTAVAIL = syscall.Errno(0x63) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x61) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x72) + EBADE = syscall.Errno(0x34) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x4d) + EBADMSG = syscall.Errno(0x4a) + EBADR = syscall.Errno(0x35) + EBADRQC = syscall.Errno(0x38) + EBADSLT = syscall.Errno(0x39) + EBFONT = syscall.Errno(0x3b) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x7d) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x2c) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x67) + ECONNREFUSED = syscall.Errno(0x6f) + ECONNRESET = syscall.Errno(0x68) + EDEADLK = syscall.Errno(0x23) + EDEADLOCK = syscall.Errno(0x23) + EDESTADDRREQ = syscall.Errno(0x59) + EDOM = syscall.Errno(0x21) + EDOTDOT = syscall.Errno(0x49) + EDQUOT = syscall.Errno(0x7a) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x70) + EHOSTUNREACH = syscall.Errno(0x71) + EHWPOISON = syscall.Errno(0x85) + EIDRM = syscall.Errno(0x2b) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x73) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x6a) + EISDIR = syscall.Errno(0x15) + EISNAM = syscall.Errno(0x78) + EKEYEXPIRED = syscall.Errno(0x7f) + EKEYREJECTED = syscall.Errno(0x81) + EKEYREVOKED = syscall.Errno(0x80) + EL2HLT = syscall.Errno(0x33) + EL2NSYNC = syscall.Errno(0x2d) + EL3HLT = syscall.Errno(0x2e) + EL3RST = syscall.Errno(0x2f) + ELIBACC = syscall.Errno(0x4f) + ELIBBAD = syscall.Errno(0x50) + ELIBEXEC = syscall.Errno(0x53) + ELIBMAX = syscall.Errno(0x52) + ELIBSCN = syscall.Errno(0x51) + ELNRNG = syscall.Errno(0x30) + ELOOP = syscall.Errno(0x28) + EMEDIUMTYPE = syscall.Errno(0x7c) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x5a) + EMULTIHOP = syscall.Errno(0x48) + ENAMETOOLONG = syscall.Errno(0x24) + ENAVAIL = syscall.Errno(0x77) + ENETDOWN = syscall.Errno(0x64) + ENETRESET = syscall.Errno(0x66) + ENETUNREACH = syscall.Errno(0x65) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x37) + ENOBUFS = syscall.Errno(0x69) + ENOCSI = syscall.Errno(0x32) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOKEY = syscall.Errno(0x7e) + ENOLCK = syscall.Errno(0x25) + ENOLINK = syscall.Errno(0x43) + ENOMEDIUM = syscall.Errno(0x7b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x2a) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x5c) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x26) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x6b) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x27) + ENOTNAM = syscall.Errno(0x76) + ENOTRECOVERABLE = syscall.Errno(0x83) + ENOTSOCK = syscall.Errno(0x58) + ENOTSUP = syscall.Errno(0x5f) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x4c) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x5f) + EOVERFLOW = syscall.Errno(0x4b) + EOWNERDEAD = syscall.Errno(0x82) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x60) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x5d) + EPROTOTYPE = syscall.Errno(0x5b) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x4e) + EREMOTE = syscall.Errno(0x42) + EREMOTEIO = syscall.Errno(0x79) + ERESTART = syscall.Errno(0x55) + ERFKILL = syscall.Errno(0x84) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x6c) + ESOCKTNOSUPPORT = syscall.Errno(0x5e) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x74) + ESTRPIPE = syscall.Errno(0x56) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x6e) + ETOOMANYREFS = syscall.Errno(0x6d) + ETXTBSY = syscall.Errno(0x1a) + EUCLEAN = syscall.Errno(0x75) + EUNATCH = syscall.Errno(0x31) + EUSERS = syscall.Errno(0x57) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x36) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0x7) + SIGCHLD = syscall.Signal(0x11) + SIGCLD = syscall.Signal(0x11) + SIGCONT = syscall.Signal(0x12) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x1d) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x1d) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x1e) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTKFLT = syscall.Signal(0x10) + SIGSTOP = syscall.Signal(0x13) + SIGSYS = syscall.Signal(0x1f) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x14) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGUNUSED = syscall.Signal(0x1f) + SIGURG = syscall.Signal(0x17) + SIGUSR1 = syscall.Signal(0xa) + SIGUSR2 = syscall.Signal(0xc) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "no such device or address", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device or resource busy", + 17: "file exists", + 18: "invalid cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "numerical result out of range", + 35: "resource deadlock avoided", + 36: "file name too long", + 37: "no locks available", + 38: "function not implemented", + 39: "directory not empty", + 40: "too many levels of symbolic links", + 42: "no message of desired type", + 43: "identifier removed", + 44: "channel number out of range", + 45: "level 2 not synchronized", + 46: "level 3 halted", + 47: "level 3 reset", + 48: "link number out of range", + 49: "protocol driver not attached", + 50: "no CSI structure available", + 51: "level 2 halted", + 52: "invalid exchange", + 53: "invalid request descriptor", + 54: "exchange full", + 55: "no anode", + 56: "invalid request code", + 57: "invalid slot", + 59: "bad font file format", + 60: "device not a stream", + 61: "no data available", + 62: "timer expired", + 63: "out of streams resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 72: "multihop attempted", + 73: "RFS specific error", + 74: "bad message", + 75: "value too large for defined data type", + 76: "name not unique on network", + 77: "file descriptor in bad state", + 78: "remote address changed", + 79: "can not access a needed shared library", + 80: "accessing a corrupted shared library", + 81: ".lib section in a.out corrupted", + 82: "attempting to link in too many shared libraries", + 83: "cannot exec a shared library directly", + 84: "invalid or incomplete multibyte or wide character", + 85: "interrupted system call should be restarted", + 86: "streams pipe error", + 87: "too many users", + 88: "socket operation on non-socket", + 89: "destination address required", + 90: "message too long", + 91: "protocol wrong type for socket", + 92: "protocol not available", + 93: "protocol not supported", + 94: "socket type not supported", + 95: "operation not supported", + 96: "protocol family not supported", + 97: "address family not supported by protocol", + 98: "address already in use", + 99: "cannot assign requested address", + 100: "network is down", + 101: "network is unreachable", + 102: "network dropped connection on reset", + 103: "software caused connection abort", + 104: "connection reset by peer", + 105: "no buffer space available", + 106: "transport endpoint is already connected", + 107: "transport endpoint is not connected", + 108: "cannot send after transport endpoint shutdown", + 109: "too many references: cannot splice", + 110: "connection timed out", + 111: "connection refused", + 112: "host is down", + 113: "no route to host", + 114: "operation already in progress", + 115: "operation now in progress", + 116: "stale NFS file handle", + 117: "structure needs cleaning", + 118: "not a XENIX named type file", + 119: "no XENIX semaphores available", + 120: "is a named type file", + 121: "remote I/O error", + 122: "disk quota exceeded", + 123: "no medium found", + 124: "wrong medium type", + 125: "operation canceled", + 126: "required key not available", + 127: "key has expired", + 128: "key has been revoked", + 129: "key was rejected by service", + 130: "owner died", + 131: "state not recoverable", + 132: "operation not possible due to RF-kill", + 133: "unknown error 133", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "bus error", + 8: "floating point exception", + 9: "killed", + 10: "user defined signal 1", + 11: "segmentation fault", + 12: "user defined signal 2", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "stack fault", + 17: "child exited", + 18: "continued", + 19: "stopped (signal)", + 20: "stopped", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "urgent I/O condition", + 24: "CPU time limit exceeded", + 25: "file size limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window changed", + 29: "I/O possible", + 30: "power failure", + 31: "bad system call", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go new file mode 100644 index 000000000..f036758f9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -0,0 +1,1743 @@ +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm,linux + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- _const.go + +package unix + +import "syscall" + +const ( + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x27 + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802154_PHY = 0x325 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_X25 = 0x10f + B0 = 0x0 + B1000000 = 0x1008 + B110 = 0x3 + B115200 = 0x1002 + B1152000 = 0x1009 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1500000 = 0x100a + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2000000 = 0x100b + B230400 = 0x1003 + B2400 = 0xb + B2500000 = 0x100c + B300 = 0x7 + B3000000 = 0x100d + B3500000 = 0x100e + B38400 = 0xf + B4000000 = 0x100f + B460800 = 0x1004 + B4800 = 0xc + B50 = 0x1 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B600 = 0x8 + B75 = 0x2 + B921600 = 0x1007 + B9600 = 0xd + BOTHER = 0x1000 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CFLUSH = 0xf + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWCGROUP = 0x2000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CMSPAR = 0x40000000 + CR0 = 0x0 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CRTSCTS = 0x80000000 + CS5 = 0x0 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIGNAL = 0xff + CSIZE = 0x30 + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSTOPB = 0x40 + CSUSP = 0x1a + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ELF_NGREG = 0x12 + ELF_PRARGSZ = 0x50 + ECHO = 0x8 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + EPOLLERR = 0x8 + EPOLLET = -0x80000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CLOEXEC = 0x80000 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + EPOLL_NONBLOCK = 0x800 + ETH_P_1588 = 0x88f7 + ETH_P_8021Q = 0x8100 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_AARP = 0x80f3 + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + EXTA = 0xe + EXTB = 0xf + EXTPROC = 0x10000 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FF0 = 0x0 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x1000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETLK = 0xc + F_GETLK64 = 0xc + F_GETOWN = 0x9 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OK = 0x0 + F_RDLCK = 0x0 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETLK = 0xd + F_SETLK64 = 0xd + F_SETLKW = 0xe + F_SETLKW64 = 0xe + F_SETOWN = 0x8 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + IBSHIFT = 0x10 + ICANON = 0x2 + ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IEXTEN = 0x8000 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_NODAD = 0x2 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0x7 + IFF_ALLMULTI = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DYNAMIC = 0x8000 + IFF_LOOPBACK = 0x8 + IFF_MASTER = 0x400 + IFF_MULTICAST = 0x1000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_TAP = 0x2 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOEXEC = 0x80000 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_NONBLOCK = 0x800 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_CHECKSUM = 0x7 + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_UNICAST_HOPS = 0x10 + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BLOCK_SOURCE = 0x26 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_XFRM_POLICY = 0x11 + ISIG = 0x1 + ISTRIP = 0x20 + IUCLC = 0x200 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x1000 + IXON = 0x400 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DOFORK = 0xb + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GROWSDOWN = 0x100 + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_PRIVATE = 0x2 + MAP_SHARED = 0x1 + MAP_TYPE = 0xf + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + NAME_MAX = 0xff + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CONNECTOR = 0xb + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NL0 = 0x0 + NL1 = 0x100 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLDLY = 0x100 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + NOFLSH = 0x80 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + OLCUC = 0x2 + ONLCR = 0x4 + ONLRET = 0x20 + ONOCR = 0x10 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x4000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x1000 + O_LARGEFILE = 0x20000 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x8000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x1000 + O_SYNC = 0x1000 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_BROADCAST = 0x1 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FASTROUTE = 0x6 + PACKET_HOST = 0x0 + PACKET_LOOPBACK = 0x5 + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MULTICAST = 0x2 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PARENB = 0x100 + PARMRK = 0x8 + PARODD = 0x200 + PENDIN = 0x4000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_CLEAR_SECCOMP_FILTER = 0x25 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECCOMP_FILTER = 0x23 + PR_GET_SECUREBITS = 0x1b + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_SECCOMP_FILTER_EVENT = 0x1 + PR_SECCOMP_FILTER_SYSCALL = 0x0 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_KEEPCAPS = 0x8 + PR_SET_NAME = 0xf + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_SECCOMP = 0x16 + PR_SET_SECCOMP_FILTER = 0x24 + PR_SET_SECUREBITS = 0x1c + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETCRUNCHREGS = 0x19 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETFPREGS = 0xe + PTRACE_GETHBPREGS = 0x1d + PTRACE_GETREGS = 0xc + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GETVFPREGS = 0x1b + PTRACE_GETWMMXREGS = 0x12 + PTRACE_GET_THREAD_AREA = 0x16 + PTRACE_KILL = 0x8 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_O_MASK = 0x7f + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKUSR = 0x3 + PTRACE_POKEDATA = 0x5 + PTRACE_POKETEXT = 0x4 + PTRACE_POKEUSR = 0x6 + PTRACE_SETCRUNCHREGS = 0x1a + PTRACE_SETFPREGS = 0xf + PTRACE_SETHBPREGS = 0x1e + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SETVFPREGS = 0x1c + PTRACE_SETWMMXREGS = 0x13 + PTRACE_SET_SYSCALL = 0x17 + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_TRACEME = 0x0 + PT_DATA_ADDR = 0x10004 + PT_TEXT_ADDR = 0x10000 + PT_TEXT_END_ADDR = 0x10008 + RLIMIT_AS = 0x9 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x7 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x1 + RTAX_ADVMSS = 0x8 + RTAX_CWND = 0x7 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0xe + RTAX_MTU = 0x2 + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x10 + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELLINK = 0x11 + RTM_DELNEIGH = 0x1d + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x4f + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWLINK = 0x10 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x10 + RTM_NR_MSGTYPES = 0x40 + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_F_DEAD = 0x1 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTN_MAX = 0xb + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_GATED = 0x8 + RTPROT_KERNEL = 0x2 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPNS = 0x23 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCATMARK = 0x8905 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGPGRP = 0x8904 + SIOCGRARP = 0x8961 + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSPGRP = 0x8902 + SIOCSRARP = 0x8962 + SOCK_CLOEXEC = 0x80000 + SOCK_DCCP = 0x6 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_AAL = 0x109 + SOL_ATM = 0x108 + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_PACKET = 0x107 + SOL_RAW = 0xff + SOL_SOCKET = 0x1 + SOL_TCP = 0x6 + SOL_X25 = 0x106 + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_FILTER = 0x1a + SO_BINDTODEVICE = 0x19 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_DEBUG = 0x1 + SO_DETACH_FILTER = 0x1b + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_MARK = 0x24 + SO_NO_CHECK = 0xb + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSSEC = 0x22 + SO_PEERCRED = 0x11 + SO_PEERNAME = 0x1c + SO_PEERSEC = 0x1f + SO_PRIORITY = 0xc + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVTIMEO = 0x14 + SO_REUSEADDR = 0x2 + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_TIMESTAMP = 0x1d + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TYPE = 0x3 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TAB0 = 0x0 + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 + TCIFLUSH = 0x0 + TCIOFF = 0x2 + TCIOFLUSH = 0x2 + TCION = 0x3 + TCOFLUSH = 0x1 + TCOOFF = 0x0 + TCOON = 0x1 + TCP_CONGESTION = 0xd + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_INFO = 0xb + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_QUICKACK = 0xc + TCP_SYNCNT = 0x7 + TCP_WINDOW_CLAMP = 0xa + TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 + TIOCGICOUNT = 0x545d + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 + TIOCGPTN = 0x80045430 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x400854d5 + TUNDETACHFILTER = 0x400854d6 + TUNGETFEATURES = 0x800454cf + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETHDRSZ = 0x800454d7 + TUNSETDEBUG = 0x400454c9 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETSNDBUF = 0x400454d4 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETHDRSZ = 0x400454d8 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x6 + VQUIT = 0x1 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT0 = 0x0 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WORDSIZE = 0x20 + WSTOPPED = 0x2 + WUNTRACED = 0x2 + XCASE = 0x4 + XTABS = 0x1800 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x62) + EADDRNOTAVAIL = syscall.Errno(0x63) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x61) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x72) + EBADE = syscall.Errno(0x34) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x4d) + EBADMSG = syscall.Errno(0x4a) + EBADR = syscall.Errno(0x35) + EBADRQC = syscall.Errno(0x38) + EBADSLT = syscall.Errno(0x39) + EBFONT = syscall.Errno(0x3b) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x7d) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x2c) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x67) + ECONNREFUSED = syscall.Errno(0x6f) + ECONNRESET = syscall.Errno(0x68) + EDEADLK = syscall.Errno(0x23) + EDEADLOCK = syscall.Errno(0x23) + EDESTADDRREQ = syscall.Errno(0x59) + EDOM = syscall.Errno(0x21) + EDOTDOT = syscall.Errno(0x49) + EDQUOT = syscall.Errno(0x7a) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x70) + EHOSTUNREACH = syscall.Errno(0x71) + EHWPOISON = syscall.Errno(0x85) + EIDRM = syscall.Errno(0x2b) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x73) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x6a) + EISDIR = syscall.Errno(0x15) + EISNAM = syscall.Errno(0x78) + EKEYEXPIRED = syscall.Errno(0x7f) + EKEYREJECTED = syscall.Errno(0x81) + EKEYREVOKED = syscall.Errno(0x80) + EL2HLT = syscall.Errno(0x33) + EL2NSYNC = syscall.Errno(0x2d) + EL3HLT = syscall.Errno(0x2e) + EL3RST = syscall.Errno(0x2f) + ELIBACC = syscall.Errno(0x4f) + ELIBBAD = syscall.Errno(0x50) + ELIBEXEC = syscall.Errno(0x53) + ELIBMAX = syscall.Errno(0x52) + ELIBSCN = syscall.Errno(0x51) + ELNRNG = syscall.Errno(0x30) + ELOOP = syscall.Errno(0x28) + EMEDIUMTYPE = syscall.Errno(0x7c) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x5a) + EMULTIHOP = syscall.Errno(0x48) + ENAMETOOLONG = syscall.Errno(0x24) + ENAVAIL = syscall.Errno(0x77) + ENETDOWN = syscall.Errno(0x64) + ENETRESET = syscall.Errno(0x66) + ENETUNREACH = syscall.Errno(0x65) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x37) + ENOBUFS = syscall.Errno(0x69) + ENOCSI = syscall.Errno(0x32) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOKEY = syscall.Errno(0x7e) + ENOLCK = syscall.Errno(0x25) + ENOLINK = syscall.Errno(0x43) + ENOMEDIUM = syscall.Errno(0x7b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x2a) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x5c) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x26) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x6b) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x27) + ENOTNAM = syscall.Errno(0x76) + ENOTRECOVERABLE = syscall.Errno(0x83) + ENOTSOCK = syscall.Errno(0x58) + ENOTSUP = syscall.Errno(0x5f) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x4c) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x5f) + EOVERFLOW = syscall.Errno(0x4b) + EOWNERDEAD = syscall.Errno(0x82) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x60) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x5d) + EPROTOTYPE = syscall.Errno(0x5b) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x4e) + EREMOTE = syscall.Errno(0x42) + EREMOTEIO = syscall.Errno(0x79) + ERESTART = syscall.Errno(0x55) + ERFKILL = syscall.Errno(0x84) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x6c) + ESOCKTNOSUPPORT = syscall.Errno(0x5e) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x74) + ESTRPIPE = syscall.Errno(0x56) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x6e) + ETOOMANYREFS = syscall.Errno(0x6d) + ETXTBSY = syscall.Errno(0x1a) + EUCLEAN = syscall.Errno(0x75) + EUNATCH = syscall.Errno(0x31) + EUSERS = syscall.Errno(0x57) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x36) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0x7) + SIGCHLD = syscall.Signal(0x11) + SIGCLD = syscall.Signal(0x11) + SIGCONT = syscall.Signal(0x12) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x1d) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x1d) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x1e) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTKFLT = syscall.Signal(0x10) + SIGSTOP = syscall.Signal(0x13) + SIGSYS = syscall.Signal(0x1f) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x14) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGUNUSED = syscall.Signal(0x1f) + SIGURG = syscall.Signal(0x17) + SIGUSR1 = syscall.Signal(0xa) + SIGUSR2 = syscall.Signal(0xc) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "no such device or address", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device or resource busy", + 17: "file exists", + 18: "invalid cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "numerical result out of range", + 35: "resource deadlock avoided", + 36: "file name too long", + 37: "no locks available", + 38: "function not implemented", + 39: "directory not empty", + 40: "too many levels of symbolic links", + 42: "no message of desired type", + 43: "identifier removed", + 44: "channel number out of range", + 45: "level 2 not synchronized", + 46: "level 3 halted", + 47: "level 3 reset", + 48: "link number out of range", + 49: "protocol driver not attached", + 50: "no CSI structure available", + 51: "level 2 halted", + 52: "invalid exchange", + 53: "invalid request descriptor", + 54: "exchange full", + 55: "no anode", + 56: "invalid request code", + 57: "invalid slot", + 59: "bad font file format", + 60: "device not a stream", + 61: "no data available", + 62: "timer expired", + 63: "out of streams resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 72: "multihop attempted", + 73: "RFS specific error", + 74: "bad message", + 75: "value too large for defined data type", + 76: "name not unique on network", + 77: "file descriptor in bad state", + 78: "remote address changed", + 79: "can not access a needed shared library", + 80: "accessing a corrupted shared library", + 81: ".lib section in a.out corrupted", + 82: "attempting to link in too many shared libraries", + 83: "cannot exec a shared library directly", + 84: "invalid or incomplete multibyte or wide character", + 85: "interrupted system call should be restarted", + 86: "streams pipe error", + 87: "too many users", + 88: "socket operation on non-socket", + 89: "destination address required", + 90: "message too long", + 91: "protocol wrong type for socket", + 92: "protocol not available", + 93: "protocol not supported", + 94: "socket type not supported", + 95: "operation not supported", + 96: "protocol family not supported", + 97: "address family not supported by protocol", + 98: "address already in use", + 99: "cannot assign requested address", + 100: "network is down", + 101: "network is unreachable", + 102: "network dropped connection on reset", + 103: "software caused connection abort", + 104: "connection reset by peer", + 105: "no buffer space available", + 106: "transport endpoint is already connected", + 107: "transport endpoint is not connected", + 108: "cannot send after transport endpoint shutdown", + 109: "too many references: cannot splice", + 110: "connection timed out", + 111: "connection refused", + 112: "host is down", + 113: "no route to host", + 114: "operation already in progress", + 115: "operation now in progress", + 116: "stale NFS file handle", + 117: "structure needs cleaning", + 118: "not a XENIX named type file", + 119: "no XENIX semaphores available", + 120: "is a named type file", + 121: "remote I/O error", + 122: "disk quota exceeded", + 123: "no medium found", + 124: "wrong medium type", + 125: "operation canceled", + 126: "required key not available", + 127: "key has expired", + 128: "key has been revoked", + 129: "key was rejected by service", + 130: "owner died", + 131: "state not recoverable", + 132: "operation not possible due to RF-kill", + 133: "unknown error 133", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "bus error", + 8: "floating point exception", + 9: "killed", + 10: "user defined signal 1", + 11: "segmentation fault", + 12: "user defined signal 2", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "stack fault", + 17: "child exited", + 18: "continued", + 19: "stopped (signal)", + 20: "stopped", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "urgent I/O condition", + 24: "CPU time limit exceeded", + 25: "file size limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window changed", + 29: "I/O possible", + 30: "power failure", + 31: "bad system call", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go new file mode 100644 index 000000000..16dcbc9cb --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -0,0 +1,1897 @@ +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm64,linux + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- _const.go + +package unix + +import "syscall" + +const ( + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x29 + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_NFC = 0x27 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VSOCK = 0x28 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CAIF = 0x336 + ARPHRD_CAN = 0x118 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802154_MONITOR = 0x325 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IP6GRE = 0x337 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETLINK = 0x338 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PHONET = 0x334 + ARPHRD_PHONET_PIPE = 0x335 + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_X25 = 0x10f + B0 = 0x0 + B1000000 = 0x1008 + B110 = 0x3 + B115200 = 0x1002 + B1152000 = 0x1009 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1500000 = 0x100a + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2000000 = 0x100b + B230400 = 0x1003 + B2400 = 0xb + B2500000 = 0x100c + B300 = 0x7 + B3000000 = 0x100d + B3500000 = 0x100e + B38400 = 0xf + B4000000 = 0x100f + B460800 = 0x1004 + B4800 = 0xc + B50 = 0x1 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B600 = 0x8 + B75 = 0x2 + B921600 = 0x1007 + B9600 = 0xd + BOTHER = 0x1000 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MOD = 0x90 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BPF_XOR = 0xa0 + BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CFLUSH = 0xf + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWCGROUP = 0x2000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CMSPAR = 0x40000000 + CR0 = 0x0 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CRTSCTS = 0x80000000 + CS5 = 0x0 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIGNAL = 0xff + CSIZE = 0x30 + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSTOPB = 0x40 + CSUSP = 0x1a + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + ELF_NGREG = 0x22 + ELF_PRARGSZ = 0x50 + ENCODING_DEFAULT = 0x0 + ENCODING_FM_MARK = 0x3 + ENCODING_FM_SPACE = 0x4 + ENCODING_MANCHESTER = 0x5 + ENCODING_NRZ = 0x1 + ENCODING_NRZI = 0x2 + EPOLLERR = 0x8 + EPOLLET = 0x80000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWAKEUP = 0x20000000 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CLOEXEC = 0x80000 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + ETH_P_1588 = 0x88f7 + ETH_P_8021AD = 0x88a8 + ETH_P_8021AH = 0x88e7 + ETH_P_8021Q = 0x8100 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_802_3_MIN = 0x600 + ETH_P_802_EX1 = 0x88b5 + ETH_P_AARP = 0x80f3 + ETH_P_AF_IUCV = 0xfbfb + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BATMAN = 0x4305 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CANFD = 0xd + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_MVRP = 0x88f5 + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PRP = 0x88fb + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_QINQ1 = 0x9100 + ETH_P_QINQ2 = 0x9200 + ETH_P_QINQ3 = 0x9300 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TDLS = 0x890d + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + EXTA = 0xe + EXTB = 0xf + EXTPROC = 0x10000 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FF0 = 0x0 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x1000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETLK = 0x5 + F_GETLK64 = 0x5 + F_GETOWN = 0x9 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OK = 0x0 + F_RDLCK = 0x0 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETOWN = 0x8 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + IBSHIFT = 0x10 + ICANON = 0x2 + ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IEXTEN = 0x8000 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_NODAD = 0x2 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0x7 + IFF_802_1Q_VLAN = 0x1 + IFF_ALLMULTI = 0x200 + IFF_ATTACH_QUEUE = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BONDING = 0x20 + IFF_BRIDGE_PORT = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DETACH_QUEUE = 0x400 + IFF_DISABLE_NETPOLL = 0x1000 + IFF_DONT_BRIDGE = 0x800 + IFF_DORMANT = 0x20000 + IFF_DYNAMIC = 0x8000 + IFF_EBRIDGE = 0x2 + IFF_ECHO = 0x40000 + IFF_ISATAP = 0x80 + IFF_LIVE_ADDR_CHANGE = 0x100000 + IFF_LOOPBACK = 0x8 + IFF_LOWER_UP = 0x10000 + IFF_MACVLAN = 0x200000 + IFF_MACVLAN_PORT = 0x2000 + IFF_MASTER = 0x400 + IFF_MASTER_8023AD = 0x8 + IFF_MASTER_ALB = 0x10 + IFF_MASTER_ARPMON = 0x100 + IFF_MULTICAST = 0x1000 + IFF_MULTI_QUEUE = 0x100 + IFF_NOARP = 0x80 + IFF_NOFILTER = 0x1000 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_OVS_DATAPATH = 0x8000 + IFF_PERSIST = 0x800 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_SLAVE_INACTIVE = 0x4 + IFF_SLAVE_NEEDARP = 0x40 + IFF_SUPP_NOFCS = 0x80000 + IFF_TAP = 0x2 + IFF_TEAM_PORT = 0x40000 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_TX_SKB_SHARING = 0x10000 + IFF_UNICAST_FLT = 0x20000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFF_VOLATILE = 0x70c5a + IFF_WAN_HDLC = 0x200 + IFF_XMIT_DST_RELEASE = 0x400 + IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOEXEC = 0x80000 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_NONBLOCK = 0x800 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_BEETPH = 0x5e + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MH = 0x87 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_CHECKSUM = 0x7 + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_UNICAST_HOPS = 0x10 + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BLOCK_SOURCE = 0x26 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_ALL = 0x31 + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_UNICAST_IF = 0x32 + IP_XFRM_POLICY = 0x11 + ISIG = 0x1 + ISTRIP = 0x20 + IUCLC = 0x200 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x1000 + IXON = 0x400 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DODUMP = 0x11 + MADV_DOFORK = 0xb + MADV_DONTDUMP = 0x10 + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_HUGE_MASK = 0x3f + MAP_HUGE_SHIFT = 0x1a + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_PRIVATE = 0x2 + MAP_SHARED = 0x1 + MAP_STACK = 0x20000 + MAP_TYPE = 0xf + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + NAME_MAX = 0xff + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CONNECTOR = 0xb + NETLINK_CRYPTO = 0x15 + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_RX_RING = 0x6 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_SOCK_DIAG = 0x4 + NETLINK_TX_RING = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NL0 = 0x0 + NL1 = 0x100 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLDLY = 0x100 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_DUMP_INTR = 0x10 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + NOFLSH = 0x80 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + OLCUC = 0x2 + ONLCR = 0x4 + ONLRET = 0x20 + ONOCR = 0x10 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x10000 + O_DIRECTORY = 0x4000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x8000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_AUXDATA = 0x8 + PACKET_BROADCAST = 0x1 + PACKET_COPY_THRESH = 0x7 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FANOUT = 0x12 + PACKET_FANOUT_CPU = 0x2 + PACKET_FANOUT_FLAG_DEFRAG = 0x8000 + PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_HASH = 0x0 + PACKET_FANOUT_LB = 0x1 + PACKET_FANOUT_RND = 0x4 + PACKET_FANOUT_ROLLOVER = 0x3 + PACKET_FASTROUTE = 0x6 + PACKET_HDRLEN = 0xb + PACKET_HOST = 0x0 + PACKET_LOOPBACK = 0x5 + PACKET_LOSS = 0xe + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MR_UNICAST = 0x3 + PACKET_MULTICAST = 0x2 + PACKET_ORIGDEV = 0x9 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RESERVE = 0xc + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PACKET_TIMESTAMP = 0x11 + PACKET_TX_HAS_OFF = 0x13 + PACKET_TX_RING = 0xd + PACKET_TX_TIMESTAMP = 0x10 + PACKET_VERSION = 0xa + PACKET_VNET_HDR = 0xf + PARENB = 0x100 + PARITY_CRC16_PR0 = 0x2 + PARITY_CRC16_PR0_CCITT = 0x4 + PARITY_CRC16_PR1 = 0x3 + PARITY_CRC16_PR1_CCITT = 0x5 + PARITY_CRC32_PR0_CCITT = 0x6 + PARITY_CRC32_PR1_CCITT = 0x7 + PARITY_DEFAULT = 0x0 + PARITY_NONE = 0x1 + PARMRK = 0x8 + PARODD = 0x200 + PENDIN = 0x4000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_GET_CHILD_SUBREAPER = 0x25 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_NO_NEW_PRIVS = 0x27 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECUREBITS = 0x1b + PR_GET_TID_ADDRESS = 0x28 + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_SET_CHILD_SUBREAPER = 0x24 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_KEEPCAPS = 0x8 + PR_SET_MM = 0x23 + PR_SET_MM_ARG_END = 0x9 + PR_SET_MM_ARG_START = 0x8 + PR_SET_MM_AUXV = 0xc + PR_SET_MM_BRK = 0x7 + PR_SET_MM_END_CODE = 0x2 + PR_SET_MM_END_DATA = 0x4 + PR_SET_MM_ENV_END = 0xb + PR_SET_MM_ENV_START = 0xa + PR_SET_MM_EXE_FILE = 0xd + PR_SET_MM_START_BRK = 0x6 + PR_SET_MM_START_CODE = 0x1 + PR_SET_MM_START_DATA = 0x3 + PR_SET_MM_START_STACK = 0x5 + PR_SET_NAME = 0xf + PR_SET_NO_NEW_PRIVS = 0x26 + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_PTRACER_ANY = -0x1 + PR_SET_SECCOMP = 0x16 + PR_SET_SECUREBITS = 0x1c + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_SECCOMP = 0x7 + PTRACE_EVENT_STOP = 0x80 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETREGS = 0xc + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GETSIGMASK = 0x420a + PTRACE_INTERRUPT = 0x4207 + PTRACE_KILL = 0x8 + PTRACE_LISTEN = 0x4208 + PTRACE_O_EXITKILL = 0x100000 + PTRACE_O_MASK = 0x1000ff + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESECCOMP = 0x80 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKSIGINFO = 0x4209 + PTRACE_PEEKSIGINFO_SHARED = 0x1 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKUSR = 0x3 + PTRACE_POKEDATA = 0x5 + PTRACE_POKETEXT = 0x4 + PTRACE_POKEUSR = 0x6 + PTRACE_SEIZE = 0x4206 + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SETSIGMASK = 0x420b + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_TRACEME = 0x0 + RLIMIT_AS = 0x9 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x7 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x1 + RTAX_ADVMSS = 0x8 + RTAX_CWND = 0x7 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0xf + RTAX_MTU = 0x2 + RTAX_QUICKACK = 0xf + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x11 + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELLINK = 0x11 + RTM_DELMDB = 0x55 + RTM_DELNEIGH = 0x1d + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETMDB = 0x56 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETNETCONF = 0x52 + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x57 + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWLINK = 0x10 + RTM_NEWMDB = 0x54 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWNETCONF = 0x50 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x12 + RTM_NR_MSGTYPES = 0x48 + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_F_DEAD = 0x1 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTN_MAX = 0xb + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_GATED = 0x8 + RTPROT_KERNEL = 0x2 + RTPROT_MROUTED = 0x11 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPNS = 0x23 + SCM_WIFI_STATUS = 0x29 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCATMARK = 0x8905 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGPGRP = 0x8904 + SIOCGRARP = 0x8961 + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSPGRP = 0x8902 + SIOCSRARP = 0x8962 + SOCK_CLOEXEC = 0x80000 + SOCK_DCCP = 0x6 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_AAL = 0x109 + SOL_ATM = 0x108 + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_PACKET = 0x107 + SOL_RAW = 0xff + SOL_SOCKET = 0x1 + SOL_TCP = 0x6 + SOL_X25 = 0x106 + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_FILTER = 0x1a + SO_BINDTODEVICE = 0x19 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_DEBUG = 0x1 + SO_DETACH_FILTER = 0x1b + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_GET_FILTER = 0x1a + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_NOFCS = 0x2b + SO_NO_CHECK = 0xb + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x11 + SO_PEERNAME = 0x1c + SO_PEERSEC = 0x1f + SO_PRIORITY = 0xc + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVTIMEO = 0x14 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_TIMESTAMP = 0x1d + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TAB0 = 0x0 + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 + TCIFLUSH = 0x0 + TCIOFF = 0x2 + TCIOFLUSH = 0x2 + TCION = 0x3 + TCOFLUSH = 0x1 + TCOOFF = 0x0 + TCOON = 0x1 + TCP_CONGESTION = 0xd + TCP_COOKIE_IN_ALWAYS = 0x1 + TCP_COOKIE_MAX = 0x10 + TCP_COOKIE_MIN = 0x8 + TCP_COOKIE_OUT_NEVER = 0x2 + TCP_COOKIE_PAIR_SIZE = 0x20 + TCP_COOKIE_TRANSACTIONS = 0xf + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_FASTOPEN = 0x17 + TCP_INFO = 0xb + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_MSS_DEFAULT = 0x218 + TCP_MSS_DESIRED = 0x4c4 + TCP_NODELAY = 0x1 + TCP_QUEUE_SEQ = 0x15 + TCP_QUICKACK = 0xc + TCP_REPAIR = 0x13 + TCP_REPAIR_OPTIONS = 0x16 + TCP_REPAIR_QUEUE = 0x14 + TCP_SYNCNT = 0x7 + TCP_S_DATA_IN = 0x4 + TCP_S_DATA_OUT = 0x8 + TCP_THIN_DUPACK = 0x11 + TCP_THIN_LINEAR_TIMEOUTS = 0x10 + TCP_TIMESTAMP = 0x18 + TCP_USER_TIMEOUT = 0x12 + TCP_WINDOW_CLAMP = 0xa + TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 + TIOCGICOUNT = 0x545d + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 + TIOCGPTN = 0x80045430 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x401054d5 + TUNDETACHFILTER = 0x401054d6 + TUNGETFEATURES = 0x800454cf + TUNGETFILTER = 0x801054db + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETHDRSZ = 0x800454d7 + TUNSETDEBUG = 0x400454c9 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETIFINDEX = 0x400454da + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETQUEUE = 0x400454d9 + TUNSETSNDBUF = 0x400454d4 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETHDRSZ = 0x400454d8 + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x6 + VQUIT = 0x1 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT0 = 0x0 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WORDSIZE = 0x40 + WSTOPPED = 0x2 + WUNTRACED = 0x2 + XCASE = 0x4 + XTABS = 0x1800 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x62) + EADDRNOTAVAIL = syscall.Errno(0x63) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x61) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x72) + EBADE = syscall.Errno(0x34) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x4d) + EBADMSG = syscall.Errno(0x4a) + EBADR = syscall.Errno(0x35) + EBADRQC = syscall.Errno(0x38) + EBADSLT = syscall.Errno(0x39) + EBFONT = syscall.Errno(0x3b) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x7d) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x2c) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x67) + ECONNREFUSED = syscall.Errno(0x6f) + ECONNRESET = syscall.Errno(0x68) + EDEADLK = syscall.Errno(0x23) + EDEADLOCK = syscall.Errno(0x23) + EDESTADDRREQ = syscall.Errno(0x59) + EDOM = syscall.Errno(0x21) + EDOTDOT = syscall.Errno(0x49) + EDQUOT = syscall.Errno(0x7a) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x70) + EHOSTUNREACH = syscall.Errno(0x71) + EHWPOISON = syscall.Errno(0x85) + EIDRM = syscall.Errno(0x2b) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x73) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x6a) + EISDIR = syscall.Errno(0x15) + EISNAM = syscall.Errno(0x78) + EKEYEXPIRED = syscall.Errno(0x7f) + EKEYREJECTED = syscall.Errno(0x81) + EKEYREVOKED = syscall.Errno(0x80) + EL2HLT = syscall.Errno(0x33) + EL2NSYNC = syscall.Errno(0x2d) + EL3HLT = syscall.Errno(0x2e) + EL3RST = syscall.Errno(0x2f) + ELIBACC = syscall.Errno(0x4f) + ELIBBAD = syscall.Errno(0x50) + ELIBEXEC = syscall.Errno(0x53) + ELIBMAX = syscall.Errno(0x52) + ELIBSCN = syscall.Errno(0x51) + ELNRNG = syscall.Errno(0x30) + ELOOP = syscall.Errno(0x28) + EMEDIUMTYPE = syscall.Errno(0x7c) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x5a) + EMULTIHOP = syscall.Errno(0x48) + ENAMETOOLONG = syscall.Errno(0x24) + ENAVAIL = syscall.Errno(0x77) + ENETDOWN = syscall.Errno(0x64) + ENETRESET = syscall.Errno(0x66) + ENETUNREACH = syscall.Errno(0x65) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x37) + ENOBUFS = syscall.Errno(0x69) + ENOCSI = syscall.Errno(0x32) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOKEY = syscall.Errno(0x7e) + ENOLCK = syscall.Errno(0x25) + ENOLINK = syscall.Errno(0x43) + ENOMEDIUM = syscall.Errno(0x7b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x2a) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x5c) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x26) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x6b) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x27) + ENOTNAM = syscall.Errno(0x76) + ENOTRECOVERABLE = syscall.Errno(0x83) + ENOTSOCK = syscall.Errno(0x58) + ENOTSUP = syscall.Errno(0x5f) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x4c) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x5f) + EOVERFLOW = syscall.Errno(0x4b) + EOWNERDEAD = syscall.Errno(0x82) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x60) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x5d) + EPROTOTYPE = syscall.Errno(0x5b) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x4e) + EREMOTE = syscall.Errno(0x42) + EREMOTEIO = syscall.Errno(0x79) + ERESTART = syscall.Errno(0x55) + ERFKILL = syscall.Errno(0x84) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x6c) + ESOCKTNOSUPPORT = syscall.Errno(0x5e) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x74) + ESTRPIPE = syscall.Errno(0x56) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x6e) + ETOOMANYREFS = syscall.Errno(0x6d) + ETXTBSY = syscall.Errno(0x1a) + EUCLEAN = syscall.Errno(0x75) + EUNATCH = syscall.Errno(0x31) + EUSERS = syscall.Errno(0x57) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x36) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0x7) + SIGCHLD = syscall.Signal(0x11) + SIGCLD = syscall.Signal(0x11) + SIGCONT = syscall.Signal(0x12) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x1d) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x1d) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x1e) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTKFLT = syscall.Signal(0x10) + SIGSTOP = syscall.Signal(0x13) + SIGSYS = syscall.Signal(0x1f) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x14) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGUNUSED = syscall.Signal(0x1f) + SIGURG = syscall.Signal(0x17) + SIGUSR1 = syscall.Signal(0xa) + SIGUSR2 = syscall.Signal(0xc) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "no such device or address", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device or resource busy", + 17: "file exists", + 18: "invalid cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "numerical result out of range", + 35: "resource deadlock avoided", + 36: "file name too long", + 37: "no locks available", + 38: "function not implemented", + 39: "directory not empty", + 40: "too many levels of symbolic links", + 42: "no message of desired type", + 43: "identifier removed", + 44: "channel number out of range", + 45: "level 2 not synchronized", + 46: "level 3 halted", + 47: "level 3 reset", + 48: "link number out of range", + 49: "protocol driver not attached", + 50: "no CSI structure available", + 51: "level 2 halted", + 52: "invalid exchange", + 53: "invalid request descriptor", + 54: "exchange full", + 55: "no anode", + 56: "invalid request code", + 57: "invalid slot", + 59: "bad font file format", + 60: "device not a stream", + 61: "no data available", + 62: "timer expired", + 63: "out of streams resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 72: "multihop attempted", + 73: "RFS specific error", + 74: "bad message", + 75: "value too large for defined data type", + 76: "name not unique on network", + 77: "file descriptor in bad state", + 78: "remote address changed", + 79: "can not access a needed shared library", + 80: "accessing a corrupted shared library", + 81: ".lib section in a.out corrupted", + 82: "attempting to link in too many shared libraries", + 83: "cannot exec a shared library directly", + 84: "invalid or incomplete multibyte or wide character", + 85: "interrupted system call should be restarted", + 86: "streams pipe error", + 87: "too many users", + 88: "socket operation on non-socket", + 89: "destination address required", + 90: "message too long", + 91: "protocol wrong type for socket", + 92: "protocol not available", + 93: "protocol not supported", + 94: "socket type not supported", + 95: "operation not supported", + 96: "protocol family not supported", + 97: "address family not supported by protocol", + 98: "address already in use", + 99: "cannot assign requested address", + 100: "network is down", + 101: "network is unreachable", + 102: "network dropped connection on reset", + 103: "software caused connection abort", + 104: "connection reset by peer", + 105: "no buffer space available", + 106: "transport endpoint is already connected", + 107: "transport endpoint is not connected", + 108: "cannot send after transport endpoint shutdown", + 109: "too many references: cannot splice", + 110: "connection timed out", + 111: "connection refused", + 112: "host is down", + 113: "no route to host", + 114: "operation already in progress", + 115: "operation now in progress", + 116: "stale file handle", + 117: "structure needs cleaning", + 118: "not a XENIX named type file", + 119: "no XENIX semaphores available", + 120: "is a named type file", + 121: "remote I/O error", + 122: "disk quota exceeded", + 123: "no medium found", + 124: "wrong medium type", + 125: "operation canceled", + 126: "required key not available", + 127: "key has expired", + 128: "key has been revoked", + 129: "key was rejected by service", + 130: "owner died", + 131: "state not recoverable", + 132: "operation not possible due to RF-kill", + 133: "memory page has hardware error", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "bus error", + 8: "floating point exception", + 9: "killed", + 10: "user defined signal 1", + 11: "segmentation fault", + 12: "user defined signal 2", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "stack fault", + 17: "child exited", + 18: "continued", + 19: "stopped (signal)", + 20: "stopped", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "urgent I/O condition", + 24: "CPU time limit exceeded", + 25: "file size limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window changed", + 29: "I/O possible", + 30: "power failure", + 31: "bad system call", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go new file mode 100644 index 000000000..36535b242 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -0,0 +1,1917 @@ +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build mips64,linux + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- _const.go + +package unix + +import "syscall" + +const ( + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IB = 0x1b + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x29 + AF_MPLS = 0x1c + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_NFC = 0x27 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VSOCK = 0x28 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + ARPHRD_6LOWPAN = 0x339 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CAIF = 0x336 + ARPHRD_CAN = 0x118 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802154_MONITOR = 0x325 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IP6GRE = 0x337 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETLINK = 0x338 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PHONET = 0x334 + ARPHRD_PHONET_PIPE = 0x335 + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_X25 = 0x10f + B0 = 0x0 + B1000000 = 0x1008 + B110 = 0x3 + B115200 = 0x1002 + B1152000 = 0x1009 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1500000 = 0x100a + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2000000 = 0x100b + B230400 = 0x1003 + B2400 = 0xb + B2500000 = 0x100c + B300 = 0x7 + B3000000 = 0x100d + B3500000 = 0x100e + B38400 = 0xf + B4000000 = 0x100f + B460800 = 0x1004 + B4800 = 0xc + B50 = 0x1 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B600 = 0x8 + B75 = 0x2 + B921600 = 0x1007 + B9600 = 0xd + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LL_OFF = -0x200000 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MOD = 0x90 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_NET_OFF = -0x100000 + BPF_OR = 0x40 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BPF_XOR = 0xa0 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x800 + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_TAI = 0xb + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWCGROUP = 0x2000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CREAD = 0x80 + CS5 = 0x0 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIGNAL = 0xff + CSIZE = 0x30 + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSTOPB = 0x40 + CSUSP = 0x1a + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + ENCODING_DEFAULT = 0x0 + ENCODING_FM_MARK = 0x3 + ENCODING_FM_SPACE = 0x4 + ENCODING_MANCHESTER = 0x5 + ENCODING_NRZ = 0x1 + ENCODING_NRZI = 0x2 + EPOLLERR = 0x8 + EPOLLET = 0x80000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWAKEUP = 0x20000000 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CLOEXEC = 0x80000 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + ETH_P_1588 = 0x88f7 + ETH_P_8021AD = 0x88a8 + ETH_P_8021AH = 0x88e7 + ETH_P_8021Q = 0x8100 + ETH_P_80221 = 0x8917 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_802_3_MIN = 0x600 + ETH_P_802_EX1 = 0x88b5 + ETH_P_AARP = 0x80f3 + ETH_P_AF_IUCV = 0xfbfb + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BATMAN = 0x4305 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CANFD = 0xd + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_LOOPBACK = 0x9000 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_MVRP = 0x88f5 + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PRP = 0x88fb + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_QINQ1 = 0x9100 + ETH_P_QINQ2 = 0x9200 + ETH_P_QINQ3 = 0x9300 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TDLS = 0x890d + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_TSN = 0x22f0 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + ETH_P_XDSA = 0xf8 + EXTA = 0xe + EXTB = 0xf + EXTPROC = 0x10000 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x2000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETLK = 0xe + F_GETLK64 = 0xe + F_GETOWN = 0x17 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OFD_GETLK = 0x24 + F_OFD_SETLK = 0x25 + F_OFD_SETLKW = 0x26 + F_OK = 0x0 + F_RDLCK = 0x0 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETOWN = 0x18 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + ICANON = 0x2 + ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IEXTEN = 0x100 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_MANAGETEMPADDR = 0x100 + IFA_F_MCAUTOJOIN = 0x400 + IFA_F_NODAD = 0x2 + IFA_F_NOPREFIXROUTE = 0x200 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_STABLE_PRIVACY = 0x800 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0x8 + IFF_ALLMULTI = 0x200 + IFF_ATTACH_QUEUE = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DETACH_QUEUE = 0x400 + IFF_DORMANT = 0x20000 + IFF_DYNAMIC = 0x8000 + IFF_ECHO = 0x40000 + IFF_LOOPBACK = 0x8 + IFF_LOWER_UP = 0x10000 + IFF_MASTER = 0x400 + IFF_MULTICAST = 0x1000 + IFF_MULTI_QUEUE = 0x100 + IFF_NOARP = 0x80 + IFF_NOFILTER = 0x1000 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_PERSIST = 0x800 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_TAP = 0x2 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFF_VOLATILE = 0x70c5a + IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOEXEC = 0x80000 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_NONBLOCK = 0x80 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_BEETPH = 0x5e + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MH = 0x87 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_CHECKSUM = 0x7 + IPV6_DONTFRAG = 0x3e + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_PATHMTU = 0x3d + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_INTERFACE = 0x4 + IPV6_PMTUDISC_OMIT = 0x5 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVPATHMTU = 0x3c + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_UNICAST_HOPS = 0x10 + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BLOCK_SOURCE = 0x26 + IP_CHECKSUM = 0x17 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_ALL = 0x31 + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_NODEFRAG = 0x16 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_INTERFACE = 0x4 + IP_PMTUDISC_OMIT = 0x5 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_UNICAST_IF = 0x32 + IP_XFRM_POLICY = 0x11 + ISIG = 0x1 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x1000 + IXON = 0x400 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DODUMP = 0x11 + MADV_DOFORK = 0xb + MADV_DONTDUMP = 0x10 + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MAP_ANON = 0x800 + MAP_ANONYMOUS = 0x800 + MAP_DENYWRITE = 0x2000 + MAP_EXECUTABLE = 0x4000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GROWSDOWN = 0x1000 + MAP_HUGETLB = 0x80000 + MAP_HUGE_MASK = 0x3f + MAP_HUGE_SHIFT = 0x1a + MAP_LOCKED = 0x8000 + MAP_NONBLOCK = 0x20000 + MAP_NORESERVE = 0x400 + MAP_POPULATE = 0x10000 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x800 + MAP_SHARED = 0x1 + MAP_STACK = 0x40000 + MAP_TYPE = 0xf + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_LAZYTIME = 0x2000000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x2800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + NAME_MAX = 0xff + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CAP_ACK = 0xa + NETLINK_CONNECTOR = 0xb + NETLINK_CRYPTO = 0x15 + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_LISTEN_ALL_NSID = 0x8 + NETLINK_LIST_MEMBERSHIPS = 0x9 + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_RX_RING = 0x6 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_SOCK_DIAG = 0x4 + NETLINK_TX_RING = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_DUMP_INTR = 0x10 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + NOFLSH = 0x80 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + ONLCR = 0x4 + ONLRET = 0x20 + ONOCR = 0x10 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x1000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x100 + O_DIRECT = 0x8000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x10 + O_EXCL = 0x400 + O_FSYNC = 0x4010 + O_LARGEFILE = 0x0 + O_NDELAY = 0x80 + O_NOATIME = 0x40000 + O_NOCTTY = 0x800 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x80 + O_PATH = 0x200000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x4010 + O_SYNC = 0x4010 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_AUXDATA = 0x8 + PACKET_BROADCAST = 0x1 + PACKET_COPY_THRESH = 0x7 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FANOUT = 0x12 + PACKET_FANOUT_CBPF = 0x6 + PACKET_FANOUT_CPU = 0x2 + PACKET_FANOUT_DATA = 0x16 + PACKET_FANOUT_EBPF = 0x7 + PACKET_FANOUT_FLAG_DEFRAG = 0x8000 + PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_HASH = 0x0 + PACKET_FANOUT_LB = 0x1 + PACKET_FANOUT_QM = 0x5 + PACKET_FANOUT_RND = 0x4 + PACKET_FANOUT_ROLLOVER = 0x3 + PACKET_FASTROUTE = 0x6 + PACKET_HDRLEN = 0xb + PACKET_HOST = 0x0 + PACKET_KERNEL = 0x7 + PACKET_LOOPBACK = 0x5 + PACKET_LOSS = 0xe + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MR_UNICAST = 0x3 + PACKET_MULTICAST = 0x2 + PACKET_ORIGDEV = 0x9 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_QDISC_BYPASS = 0x14 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RESERVE = 0xc + PACKET_ROLLOVER_STATS = 0x15 + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PACKET_TIMESTAMP = 0x11 + PACKET_TX_HAS_OFF = 0x13 + PACKET_TX_RING = 0xd + PACKET_TX_TIMESTAMP = 0x10 + PACKET_USER = 0x6 + PACKET_VERSION = 0xa + PACKET_VNET_HDR = 0xf + PARENB = 0x100 + PARITY_CRC16_PR0 = 0x2 + PARITY_CRC16_PR0_CCITT = 0x4 + PARITY_CRC16_PR1 = 0x3 + PARITY_CRC16_PR1_CCITT = 0x5 + PARITY_CRC32_PR0_CCITT = 0x6 + PARITY_CRC32_PR1_CCITT = 0x7 + PARITY_DEFAULT = 0x0 + PARITY_NONE = 0x1 + PARMRK = 0x8 + PARODD = 0x200 + PENDIN = 0x4000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_CAP_AMBIENT = 0x2f + PR_CAP_AMBIENT_CLEAR_ALL = 0x4 + PR_CAP_AMBIENT_IS_SET = 0x1 + PR_CAP_AMBIENT_LOWER = 0x3 + PR_CAP_AMBIENT_RAISE = 0x2 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_FP_MODE_FR = 0x1 + PR_FP_MODE_FRE = 0x2 + PR_GET_CHILD_SUBREAPER = 0x25 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_FP_MODE = 0x2e + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_NO_NEW_PRIVS = 0x27 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECUREBITS = 0x1b + PR_GET_THP_DISABLE = 0x2a + PR_GET_TID_ADDRESS = 0x28 + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_MPX_DISABLE_MANAGEMENT = 0x2c + PR_MPX_ENABLE_MANAGEMENT = 0x2b + PR_SET_CHILD_SUBREAPER = 0x24 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_FP_MODE = 0x2d + PR_SET_KEEPCAPS = 0x8 + PR_SET_MM = 0x23 + PR_SET_MM_ARG_END = 0x9 + PR_SET_MM_ARG_START = 0x8 + PR_SET_MM_AUXV = 0xc + PR_SET_MM_BRK = 0x7 + PR_SET_MM_END_CODE = 0x2 + PR_SET_MM_END_DATA = 0x4 + PR_SET_MM_ENV_END = 0xb + PR_SET_MM_ENV_START = 0xa + PR_SET_MM_EXE_FILE = 0xd + PR_SET_MM_MAP = 0xe + PR_SET_MM_MAP_SIZE = 0xf + PR_SET_MM_START_BRK = 0x6 + PR_SET_MM_START_CODE = 0x1 + PR_SET_MM_START_DATA = 0x3 + PR_SET_MM_START_STACK = 0x5 + PR_SET_NAME = 0xf + PR_SET_NO_NEW_PRIVS = 0x26 + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_PTRACER_ANY = -0x1 + PR_SET_SECCOMP = 0x16 + PR_SET_SECUREBITS = 0x1c + PR_SET_THP_DISABLE = 0x29 + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_SECCOMP = 0x7 + PTRACE_EVENT_STOP = 0x80 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETFPREGS = 0xe + PTRACE_GETREGS = 0xc + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GETSIGMASK = 0x420a + PTRACE_GET_THREAD_AREA = 0x19 + PTRACE_GET_THREAD_AREA_3264 = 0xc4 + PTRACE_GET_WATCH_REGS = 0xd0 + PTRACE_INTERRUPT = 0x4207 + PTRACE_KILL = 0x8 + PTRACE_LISTEN = 0x4208 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_O_EXITKILL = 0x100000 + PTRACE_O_MASK = 0x3000ff + PTRACE_O_SUSPEND_SECCOMP = 0x200000 + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESECCOMP = 0x80 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKDATA_3264 = 0xc1 + PTRACE_PEEKSIGINFO = 0x4209 + PTRACE_PEEKSIGINFO_SHARED = 0x1 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKTEXT_3264 = 0xc0 + PTRACE_PEEKUSR = 0x3 + PTRACE_POKEDATA = 0x5 + PTRACE_POKEDATA_3264 = 0xc3 + PTRACE_POKETEXT = 0x4 + PTRACE_POKETEXT_3264 = 0xc2 + PTRACE_POKEUSR = 0x6 + PTRACE_SEIZE = 0x4206 + PTRACE_SETFPREGS = 0xf + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SETSIGMASK = 0x420b + PTRACE_SET_THREAD_AREA = 0x1a + PTRACE_SET_WATCH_REGS = 0xd1 + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_TRACEME = 0x0 + RLIMIT_AS = 0x6 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x5 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x1 + RTAX_ADVMSS = 0x8 + RTAX_CC_ALGO = 0x10 + RTAX_CWND = 0x7 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_MASK = 0xf + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0x10 + RTAX_MTU = 0x2 + RTAX_QUICKACK = 0xf + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x16 + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELLINK = 0x11 + RTM_DELMDB = 0x55 + RTM_DELNEIGH = 0x1d + RTM_DELNSID = 0x59 + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETMDB = 0x56 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETNETCONF = 0x52 + RTM_GETNSID = 0x5a + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x5b + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWLINK = 0x10 + RTM_NEWMDB = 0x54 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWNETCONF = 0x50 + RTM_NEWNSID = 0x58 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x13 + RTM_NR_MSGTYPES = 0x4c + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_COMPARE_MASK = 0x11 + RTNH_F_DEAD = 0x1 + RTNH_F_LINKDOWN = 0x10 + RTNH_F_OFFLOAD = 0x8 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTN_MAX = 0xb + RTPROT_BABEL = 0x2a + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_GATED = 0x8 + RTPROT_KERNEL = 0x2 + RTPROT_MROUTED = 0x11 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPNS = 0x23 + SCM_WIFI_STATUS = 0x29 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCATMARK = 0x40047307 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGPGRP = 0x40047309 + SIOCGRARP = 0x8961 + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSPGRP = 0x80047308 + SIOCSRARP = 0x8962 + SOCK_CLOEXEC = 0x80000 + SOCK_DCCP = 0x6 + SOCK_DGRAM = 0x1 + SOCK_NONBLOCK = 0x80 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x2 + SOL_AAL = 0x109 + SOL_ATM = 0x108 + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_PACKET = 0x107 + SOL_RAW = 0xff + SOL_SOCKET = 0xffff + SOL_TCP = 0x6 + SOL_X25 = 0x106 + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x1009 + SO_ATTACH_BPF = 0x32 + SO_ATTACH_FILTER = 0x1a + SO_BINDTODEVICE = 0x19 + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x20 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_DEBUG = 0x1 + SO_DETACH_BPF = 0x1b + SO_DETACH_FILTER = 0x1b + SO_DOMAIN = 0x1029 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_GET_FILTER = 0x1a + SO_INCOMING_CPU = 0x31 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_NOFCS = 0x2b + SO_NO_CHECK = 0xb + SO_OOBINLINE = 0x100 + SO_PASSCRED = 0x11 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x12 + SO_PEERNAME = 0x1c + SO_PEERSEC = 0x1e + SO_PRIORITY = 0xc + SO_PROTOCOL = 0x1028 + SO_RCVBUF = 0x1002 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x1001 + SO_SNDBUFFORCE = 0x1f + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_STYLE = 0x1008 + SO_TIMESTAMP = 0x1d + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TYPE = 0x1008 + SO_WIFI_STATUS = 0x29 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCFLSH = 0x5407 + TCIFLUSH = 0x0 + TCIOFLUSH = 0x2 + TCOFLUSH = 0x1 + TCP_CONGESTION = 0xd + TCP_COOKIE_IN_ALWAYS = 0x1 + TCP_COOKIE_MAX = 0x10 + TCP_COOKIE_MIN = 0x8 + TCP_COOKIE_OUT_NEVER = 0x2 + TCP_COOKIE_PAIR_SIZE = 0x20 + TCP_COOKIE_TRANSACTIONS = 0xf + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_FASTOPEN = 0x17 + TCP_INFO = 0xb + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_MSS_DEFAULT = 0x218 + TCP_MSS_DESIRED = 0x4c4 + TCP_NODELAY = 0x1 + TCP_QUEUE_SEQ = 0x15 + TCP_QUICKACK = 0xc + TCP_REPAIR = 0x13 + TCP_REPAIR_OPTIONS = 0x16 + TCP_REPAIR_QUEUE = 0x14 + TCP_SYNCNT = 0x7 + TCP_S_DATA_IN = 0x4 + TCP_S_DATA_OUT = 0x8 + TCP_THIN_DUPACK = 0x11 + TCP_THIN_LINEAR_TIMEOUTS = 0x10 + TCP_TIMESTAMP = 0x18 + TCP_USER_TIMEOUT = 0x12 + TCP_WINDOW_CLAMP = 0xa + TCSAFLUSH = 0x5410 + TCSBRK = 0x5405 + TCXONC = 0x5406 + TIOCCBRK = 0x5428 + TIOCCONS = 0x80047478 + TIOCEXCL = 0x740d + TIOCGDEV = 0x40045432 + TIOCGETD = 0x7400 + TIOCGETP = 0x7408 + TIOCGEXCL = 0x40045440 + TIOCGICOUNT = 0x5492 + TIOCGLCKTRMIOS = 0x548b + TIOCGLTC = 0x7474 + TIOCGPGRP = 0x40047477 + TIOCGPKT = 0x40045438 + TIOCGPTLCK = 0x40045439 + TIOCGPTN = 0x40045430 + TIOCGRS485 = 0x4020542e + TIOCGSERIAL = 0x5484 + TIOCGSID = 0x7416 + TIOCGSOFTCAR = 0x5481 + TIOCGWINSZ = 0x40087468 + TIOCINQ = 0x467f + TIOCLINUX = 0x5483 + TIOCMBIC = 0x741c + TIOCMBIS = 0x741b + TIOCMGET = 0x741d + TIOCMIWAIT = 0x5491 + TIOCMSET = 0x741a + TIOCM_CAR = 0x100 + TIOCM_CD = 0x100 + TIOCM_CTS = 0x40 + TIOCM_DSR = 0x400 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x200 + TIOCM_RNG = 0x200 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x20 + TIOCM_ST = 0x10 + TIOCNOTTY = 0x5471 + TIOCNXCL = 0x740e + TIOCOUTQ = 0x7472 + TIOCPKT = 0x5470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x5480 + TIOCSERCONFIG = 0x5488 + TIOCSERGETLSR = 0x548e + TIOCSERGETMULTI = 0x548f + TIOCSERGSTRUCT = 0x548d + TIOCSERGWILD = 0x5489 + TIOCSERSETMULTI = 0x5490 + TIOCSERSWILD = 0x548a + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x7401 + TIOCSETN = 0x740a + TIOCSETP = 0x7409 + TIOCSIG = 0x80045436 + TIOCSLCKTRMIOS = 0x548c + TIOCSLTC = 0x7475 + TIOCSPGRP = 0x80047476 + TIOCSPTLCK = 0x80045431 + TIOCSRS485 = 0xc020542f + TIOCSSERIAL = 0x5485 + TIOCSSOFTCAR = 0x5482 + TIOCSTI = 0x5472 + TIOCSWINSZ = 0x80087467 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x8000 + TUNATTACHFILTER = 0x801054d5 + TUNDETACHFILTER = 0x801054d6 + TUNGETFEATURES = 0x400454cf + TUNGETFILTER = 0x401054db + TUNGETIFF = 0x400454d2 + TUNGETSNDBUF = 0x400454d3 + TUNGETVNETBE = 0x400454df + TUNGETVNETHDRSZ = 0x400454d7 + TUNGETVNETLE = 0x400454dd + TUNSETDEBUG = 0x800454c9 + TUNSETGROUP = 0x800454ce + TUNSETIFF = 0x800454ca + TUNSETIFINDEX = 0x800454da + TUNSETLINK = 0x800454cd + TUNSETNOCSUM = 0x800454c8 + TUNSETOFFLOAD = 0x800454d0 + TUNSETOWNER = 0x800454cc + TUNSETPERSIST = 0x800454cb + TUNSETQUEUE = 0x800454d9 + TUNSETSNDBUF = 0x800454d4 + TUNSETTXFILTER = 0x800454d1 + TUNSETVNETBE = 0x800454de + TUNSETVNETHDRSZ = 0x800454d8 + TUNSETVNETLE = 0x800454dc + VDISCARD = 0xd + VEOF = 0x10 + VEOL = 0x11 + VEOL2 = 0x6 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x4 + VQUIT = 0x1 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VSWTCH = 0x7 + VT0 = 0x0 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WORDSIZE = 0x40 + WSTOPPED = 0x2 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x7d) + EADDRNOTAVAIL = syscall.Errno(0x7e) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x7c) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x95) + EBADE = syscall.Errno(0x32) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x51) + EBADMSG = syscall.Errno(0x4d) + EBADR = syscall.Errno(0x33) + EBADRQC = syscall.Errno(0x36) + EBADSLT = syscall.Errno(0x37) + EBFONT = syscall.Errno(0x3b) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x9e) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x25) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x82) + ECONNREFUSED = syscall.Errno(0x92) + ECONNRESET = syscall.Errno(0x83) + EDEADLK = syscall.Errno(0x2d) + EDEADLOCK = syscall.Errno(0x38) + EDESTADDRREQ = syscall.Errno(0x60) + EDOM = syscall.Errno(0x21) + EDOTDOT = syscall.Errno(0x49) + EDQUOT = syscall.Errno(0x46d) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x93) + EHOSTUNREACH = syscall.Errno(0x94) + EHWPOISON = syscall.Errno(0xa8) + EIDRM = syscall.Errno(0x24) + EILSEQ = syscall.Errno(0x58) + EINIT = syscall.Errno(0x8d) + EINPROGRESS = syscall.Errno(0x96) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x85) + EISDIR = syscall.Errno(0x15) + EISNAM = syscall.Errno(0x8b) + EKEYEXPIRED = syscall.Errno(0xa2) + EKEYREJECTED = syscall.Errno(0xa4) + EKEYREVOKED = syscall.Errno(0xa3) + EL2HLT = syscall.Errno(0x2c) + EL2NSYNC = syscall.Errno(0x26) + EL3HLT = syscall.Errno(0x27) + EL3RST = syscall.Errno(0x28) + ELIBACC = syscall.Errno(0x53) + ELIBBAD = syscall.Errno(0x54) + ELIBEXEC = syscall.Errno(0x57) + ELIBMAX = syscall.Errno(0x56) + ELIBSCN = syscall.Errno(0x55) + ELNRNG = syscall.Errno(0x29) + ELOOP = syscall.Errno(0x5a) + EMEDIUMTYPE = syscall.Errno(0xa0) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x61) + EMULTIHOP = syscall.Errno(0x4a) + ENAMETOOLONG = syscall.Errno(0x4e) + ENAVAIL = syscall.Errno(0x8a) + ENETDOWN = syscall.Errno(0x7f) + ENETRESET = syscall.Errno(0x81) + ENETUNREACH = syscall.Errno(0x80) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x35) + ENOBUFS = syscall.Errno(0x84) + ENOCSI = syscall.Errno(0x2b) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOKEY = syscall.Errno(0xa1) + ENOLCK = syscall.Errno(0x2e) + ENOLINK = syscall.Errno(0x43) + ENOMEDIUM = syscall.Errno(0x9f) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x23) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x63) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x59) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x86) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x5d) + ENOTNAM = syscall.Errno(0x89) + ENOTRECOVERABLE = syscall.Errno(0xa6) + ENOTSOCK = syscall.Errno(0x5f) + ENOTSUP = syscall.Errno(0x7a) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x50) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x7a) + EOVERFLOW = syscall.Errno(0x4f) + EOWNERDEAD = syscall.Errno(0xa5) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x7b) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x78) + EPROTOTYPE = syscall.Errno(0x62) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x52) + EREMDEV = syscall.Errno(0x8e) + EREMOTE = syscall.Errno(0x42) + EREMOTEIO = syscall.Errno(0x8c) + ERESTART = syscall.Errno(0x5b) + ERFKILL = syscall.Errno(0xa7) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x8f) + ESOCKTNOSUPPORT = syscall.Errno(0x79) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x97) + ESTRPIPE = syscall.Errno(0x5c) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x91) + ETOOMANYREFS = syscall.Errno(0x90) + ETXTBSY = syscall.Errno(0x1a) + EUCLEAN = syscall.Errno(0x87) + EUNATCH = syscall.Errno(0x2a) + EUSERS = syscall.Errno(0x5e) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x34) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x12) + SIGCLD = syscall.Signal(0x12) + SIGCONT = syscall.Signal(0x19) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x16) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x16) + SIGPROF = syscall.Signal(0x1d) + SIGPWR = syscall.Signal(0x13) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x17) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x18) + SIGTTIN = syscall.Signal(0x1a) + SIGTTOU = syscall.Signal(0x1b) + SIGURG = syscall.Signal(0x15) + SIGUSR1 = syscall.Signal(0x10) + SIGUSR2 = syscall.Signal(0x11) + SIGVTALRM = syscall.Signal(0x1c) + SIGWINCH = syscall.Signal(0x14) + SIGXCPU = syscall.Signal(0x1e) + SIGXFSZ = syscall.Signal(0x1f) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "no such device or address", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device or resource busy", + 17: "file exists", + 18: "invalid cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "numerical result out of range", + 35: "no message of desired type", + 36: "identifier removed", + 37: "channel number out of range", + 38: "level 2 not synchronized", + 39: "level 3 halted", + 40: "level 3 reset", + 41: "link number out of range", + 42: "protocol driver not attached", + 43: "no CSI structure available", + 44: "level 2 halted", + 45: "resource deadlock avoided", + 46: "no locks available", + 50: "invalid exchange", + 51: "invalid request descriptor", + 52: "exchange full", + 53: "no anode", + 54: "invalid request code", + 55: "invalid slot", + 56: "file locking deadlock error", + 59: "bad font file format", + 60: "device not a stream", + 61: "no data available", + 62: "timer expired", + 63: "out of streams resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 73: "RFS specific error", + 74: "multihop attempted", + 77: "bad message", + 78: "file name too long", + 79: "value too large for defined data type", + 80: "name not unique on network", + 81: "file descriptor in bad state", + 82: "remote address changed", + 83: "can not access a needed shared library", + 84: "accessing a corrupted shared library", + 85: ".lib section in a.out corrupted", + 86: "attempting to link in too many shared libraries", + 87: "cannot exec a shared library directly", + 88: "invalid or incomplete multibyte or wide character", + 89: "function not implemented", + 90: "too many levels of symbolic links", + 91: "interrupted system call should be restarted", + 92: "streams pipe error", + 93: "directory not empty", + 94: "too many users", + 95: "socket operation on non-socket", + 96: "destination address required", + 97: "message too long", + 98: "protocol wrong type for socket", + 99: "protocol not available", + 120: "protocol not supported", + 121: "socket type not supported", + 122: "operation not supported", + 123: "protocol family not supported", + 124: "address family not supported by protocol", + 125: "address already in use", + 126: "cannot assign requested address", + 127: "network is down", + 128: "network is unreachable", + 129: "network dropped connection on reset", + 130: "software caused connection abort", + 131: "connection reset by peer", + 132: "no buffer space available", + 133: "transport endpoint is already connected", + 134: "transport endpoint is not connected", + 135: "structure needs cleaning", + 137: "not a XENIX named type file", + 138: "no XENIX semaphores available", + 139: "is a named type file", + 140: "remote I/O error", + 141: "unknown error 141", + 142: "unknown error 142", + 143: "cannot send after transport endpoint shutdown", + 144: "too many references: cannot splice", + 145: "connection timed out", + 146: "connection refused", + 147: "host is down", + 148: "no route to host", + 149: "operation already in progress", + 150: "operation now in progress", + 151: "stale file handle", + 158: "operation canceled", + 159: "no medium found", + 160: "wrong medium type", + 161: "required key not available", + 162: "key has expired", + 163: "key has been revoked", + 164: "key was rejected by service", + 165: "owner died", + 166: "state not recoverable", + 167: "operation not possible due to RF-kill", + 168: "memory page has hardware error", + 1133: "disk quota exceeded", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "user defined signal 1", + 17: "user defined signal 2", + 18: "child exited", + 19: "power failure", + 20: "window changed", + 21: "urgent I/O condition", + 22: "I/O possible", + 23: "stopped (signal)", + 24: "stopped", + 25: "continued", + 26: "stopped (tty input)", + 27: "stopped (tty output)", + 28: "virtual timer expired", + 29: "profiling timer expired", + 30: "CPU time limit exceeded", + 31: "file size limit exceeded", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go new file mode 100644 index 000000000..112f05de5 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -0,0 +1,1917 @@ +// mkerrors.sh +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build mips64le,linux + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- _const.go + +package unix + +import "syscall" + +const ( + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IB = 0x1b + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x29 + AF_MPLS = 0x1c + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_NFC = 0x27 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VSOCK = 0x28 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + ARPHRD_6LOWPAN = 0x339 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CAIF = 0x336 + ARPHRD_CAN = 0x118 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802154_MONITOR = 0x325 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IP6GRE = 0x337 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETLINK = 0x338 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PHONET = 0x334 + ARPHRD_PHONET_PIPE = 0x335 + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_X25 = 0x10f + B0 = 0x0 + B1000000 = 0x1008 + B110 = 0x3 + B115200 = 0x1002 + B1152000 = 0x1009 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1500000 = 0x100a + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2000000 = 0x100b + B230400 = 0x1003 + B2400 = 0xb + B2500000 = 0x100c + B300 = 0x7 + B3000000 = 0x100d + B3500000 = 0x100e + B38400 = 0xf + B4000000 = 0x100f + B460800 = 0x1004 + B4800 = 0xc + B50 = 0x1 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B600 = 0x8 + B75 = 0x2 + B921600 = 0x1007 + B9600 = 0xd + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LL_OFF = -0x200000 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MOD = 0x90 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_NET_OFF = -0x100000 + BPF_OR = 0x40 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BPF_XOR = 0xa0 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x800 + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_TAI = 0xb + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWCGROUP = 0x2000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CREAD = 0x80 + CS5 = 0x0 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIGNAL = 0xff + CSIZE = 0x30 + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSTOPB = 0x40 + CSUSP = 0x1a + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + ENCODING_DEFAULT = 0x0 + ENCODING_FM_MARK = 0x3 + ENCODING_FM_SPACE = 0x4 + ENCODING_MANCHESTER = 0x5 + ENCODING_NRZ = 0x1 + ENCODING_NRZI = 0x2 + EPOLLERR = 0x8 + EPOLLET = 0x80000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWAKEUP = 0x20000000 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CLOEXEC = 0x80000 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + ETH_P_1588 = 0x88f7 + ETH_P_8021AD = 0x88a8 + ETH_P_8021AH = 0x88e7 + ETH_P_8021Q = 0x8100 + ETH_P_80221 = 0x8917 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_802_3_MIN = 0x600 + ETH_P_802_EX1 = 0x88b5 + ETH_P_AARP = 0x80f3 + ETH_P_AF_IUCV = 0xfbfb + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BATMAN = 0x4305 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CANFD = 0xd + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_LOOPBACK = 0x9000 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_MVRP = 0x88f5 + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PRP = 0x88fb + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_QINQ1 = 0x9100 + ETH_P_QINQ2 = 0x9200 + ETH_P_QINQ3 = 0x9300 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TDLS = 0x890d + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_TSN = 0x22f0 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + ETH_P_XDSA = 0xf8 + EXTA = 0xe + EXTB = 0xf + EXTPROC = 0x10000 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x2000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETLK = 0xe + F_GETLK64 = 0xe + F_GETOWN = 0x17 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OFD_GETLK = 0x24 + F_OFD_SETLK = 0x25 + F_OFD_SETLKW = 0x26 + F_OK = 0x0 + F_RDLCK = 0x0 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETOWN = 0x18 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + ICANON = 0x2 + ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IEXTEN = 0x100 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_MANAGETEMPADDR = 0x100 + IFA_F_MCAUTOJOIN = 0x400 + IFA_F_NODAD = 0x2 + IFA_F_NOPREFIXROUTE = 0x200 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_STABLE_PRIVACY = 0x800 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0x8 + IFF_ALLMULTI = 0x200 + IFF_ATTACH_QUEUE = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DETACH_QUEUE = 0x400 + IFF_DORMANT = 0x20000 + IFF_DYNAMIC = 0x8000 + IFF_ECHO = 0x40000 + IFF_LOOPBACK = 0x8 + IFF_LOWER_UP = 0x10000 + IFF_MASTER = 0x400 + IFF_MULTICAST = 0x1000 + IFF_MULTI_QUEUE = 0x100 + IFF_NOARP = 0x80 + IFF_NOFILTER = 0x1000 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_PERSIST = 0x800 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_TAP = 0x2 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFF_VOLATILE = 0x70c5a + IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOEXEC = 0x80000 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_NONBLOCK = 0x80 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_BEETPH = 0x5e + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MH = 0x87 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_CHECKSUM = 0x7 + IPV6_DONTFRAG = 0x3e + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_PATHMTU = 0x3d + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_INTERFACE = 0x4 + IPV6_PMTUDISC_OMIT = 0x5 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVPATHMTU = 0x3c + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_UNICAST_HOPS = 0x10 + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BLOCK_SOURCE = 0x26 + IP_CHECKSUM = 0x17 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_ALL = 0x31 + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_NODEFRAG = 0x16 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_INTERFACE = 0x4 + IP_PMTUDISC_OMIT = 0x5 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_UNICAST_IF = 0x32 + IP_XFRM_POLICY = 0x11 + ISIG = 0x1 + ISTRIP = 0x20 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x1000 + IXON = 0x400 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DODUMP = 0x11 + MADV_DOFORK = 0xb + MADV_DONTDUMP = 0x10 + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MAP_ANON = 0x800 + MAP_ANONYMOUS = 0x800 + MAP_DENYWRITE = 0x2000 + MAP_EXECUTABLE = 0x4000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GROWSDOWN = 0x1000 + MAP_HUGETLB = 0x80000 + MAP_HUGE_MASK = 0x3f + MAP_HUGE_SHIFT = 0x1a + MAP_LOCKED = 0x8000 + MAP_NONBLOCK = 0x20000 + MAP_NORESERVE = 0x400 + MAP_POPULATE = 0x10000 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x800 + MAP_SHARED = 0x1 + MAP_STACK = 0x40000 + MAP_TYPE = 0xf + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_LAZYTIME = 0x2000000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x2800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + NAME_MAX = 0xff + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CAP_ACK = 0xa + NETLINK_CONNECTOR = 0xb + NETLINK_CRYPTO = 0x15 + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_LISTEN_ALL_NSID = 0x8 + NETLINK_LIST_MEMBERSHIPS = 0x9 + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_RX_RING = 0x6 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_SOCK_DIAG = 0x4 + NETLINK_TX_RING = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_DUMP_INTR = 0x10 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + NOFLSH = 0x80 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + ONLCR = 0x4 + ONLRET = 0x20 + ONOCR = 0x10 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x1000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x100 + O_DIRECT = 0x8000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x10 + O_EXCL = 0x400 + O_FSYNC = 0x4010 + O_LARGEFILE = 0x0 + O_NDELAY = 0x80 + O_NOATIME = 0x40000 + O_NOCTTY = 0x800 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x80 + O_PATH = 0x200000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x4010 + O_SYNC = 0x4010 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_AUXDATA = 0x8 + PACKET_BROADCAST = 0x1 + PACKET_COPY_THRESH = 0x7 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FANOUT = 0x12 + PACKET_FANOUT_CBPF = 0x6 + PACKET_FANOUT_CPU = 0x2 + PACKET_FANOUT_DATA = 0x16 + PACKET_FANOUT_EBPF = 0x7 + PACKET_FANOUT_FLAG_DEFRAG = 0x8000 + PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_HASH = 0x0 + PACKET_FANOUT_LB = 0x1 + PACKET_FANOUT_QM = 0x5 + PACKET_FANOUT_RND = 0x4 + PACKET_FANOUT_ROLLOVER = 0x3 + PACKET_FASTROUTE = 0x6 + PACKET_HDRLEN = 0xb + PACKET_HOST = 0x0 + PACKET_KERNEL = 0x7 + PACKET_LOOPBACK = 0x5 + PACKET_LOSS = 0xe + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MR_UNICAST = 0x3 + PACKET_MULTICAST = 0x2 + PACKET_ORIGDEV = 0x9 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_QDISC_BYPASS = 0x14 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RESERVE = 0xc + PACKET_ROLLOVER_STATS = 0x15 + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PACKET_TIMESTAMP = 0x11 + PACKET_TX_HAS_OFF = 0x13 + PACKET_TX_RING = 0xd + PACKET_TX_TIMESTAMP = 0x10 + PACKET_USER = 0x6 + PACKET_VERSION = 0xa + PACKET_VNET_HDR = 0xf + PARENB = 0x100 + PARITY_CRC16_PR0 = 0x2 + PARITY_CRC16_PR0_CCITT = 0x4 + PARITY_CRC16_PR1 = 0x3 + PARITY_CRC16_PR1_CCITT = 0x5 + PARITY_CRC32_PR0_CCITT = 0x6 + PARITY_CRC32_PR1_CCITT = 0x7 + PARITY_DEFAULT = 0x0 + PARITY_NONE = 0x1 + PARMRK = 0x8 + PARODD = 0x200 + PENDIN = 0x4000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_CAP_AMBIENT = 0x2f + PR_CAP_AMBIENT_CLEAR_ALL = 0x4 + PR_CAP_AMBIENT_IS_SET = 0x1 + PR_CAP_AMBIENT_LOWER = 0x3 + PR_CAP_AMBIENT_RAISE = 0x2 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_FP_MODE_FR = 0x1 + PR_FP_MODE_FRE = 0x2 + PR_GET_CHILD_SUBREAPER = 0x25 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_FP_MODE = 0x2e + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_NO_NEW_PRIVS = 0x27 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECUREBITS = 0x1b + PR_GET_THP_DISABLE = 0x2a + PR_GET_TID_ADDRESS = 0x28 + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_MPX_DISABLE_MANAGEMENT = 0x2c + PR_MPX_ENABLE_MANAGEMENT = 0x2b + PR_SET_CHILD_SUBREAPER = 0x24 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_FP_MODE = 0x2d + PR_SET_KEEPCAPS = 0x8 + PR_SET_MM = 0x23 + PR_SET_MM_ARG_END = 0x9 + PR_SET_MM_ARG_START = 0x8 + PR_SET_MM_AUXV = 0xc + PR_SET_MM_BRK = 0x7 + PR_SET_MM_END_CODE = 0x2 + PR_SET_MM_END_DATA = 0x4 + PR_SET_MM_ENV_END = 0xb + PR_SET_MM_ENV_START = 0xa + PR_SET_MM_EXE_FILE = 0xd + PR_SET_MM_MAP = 0xe + PR_SET_MM_MAP_SIZE = 0xf + PR_SET_MM_START_BRK = 0x6 + PR_SET_MM_START_CODE = 0x1 + PR_SET_MM_START_DATA = 0x3 + PR_SET_MM_START_STACK = 0x5 + PR_SET_NAME = 0xf + PR_SET_NO_NEW_PRIVS = 0x26 + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_PTRACER_ANY = -0x1 + PR_SET_SECCOMP = 0x16 + PR_SET_SECUREBITS = 0x1c + PR_SET_THP_DISABLE = 0x29 + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_SECCOMP = 0x7 + PTRACE_EVENT_STOP = 0x80 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETFPREGS = 0xe + PTRACE_GETREGS = 0xc + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GETSIGMASK = 0x420a + PTRACE_GET_THREAD_AREA = 0x19 + PTRACE_GET_THREAD_AREA_3264 = 0xc4 + PTRACE_GET_WATCH_REGS = 0xd0 + PTRACE_INTERRUPT = 0x4207 + PTRACE_KILL = 0x8 + PTRACE_LISTEN = 0x4208 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_O_EXITKILL = 0x100000 + PTRACE_O_MASK = 0x3000ff + PTRACE_O_SUSPEND_SECCOMP = 0x200000 + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESECCOMP = 0x80 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKDATA_3264 = 0xc1 + PTRACE_PEEKSIGINFO = 0x4209 + PTRACE_PEEKSIGINFO_SHARED = 0x1 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKTEXT_3264 = 0xc0 + PTRACE_PEEKUSR = 0x3 + PTRACE_POKEDATA = 0x5 + PTRACE_POKEDATA_3264 = 0xc3 + PTRACE_POKETEXT = 0x4 + PTRACE_POKETEXT_3264 = 0xc2 + PTRACE_POKEUSR = 0x6 + PTRACE_SEIZE = 0x4206 + PTRACE_SETFPREGS = 0xf + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SETSIGMASK = 0x420b + PTRACE_SET_THREAD_AREA = 0x1a + PTRACE_SET_WATCH_REGS = 0xd1 + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_TRACEME = 0x0 + RLIMIT_AS = 0x6 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x5 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x1 + RTAX_ADVMSS = 0x8 + RTAX_CC_ALGO = 0x10 + RTAX_CWND = 0x7 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_MASK = 0xf + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0x10 + RTAX_MTU = 0x2 + RTAX_QUICKACK = 0xf + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x16 + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELLINK = 0x11 + RTM_DELMDB = 0x55 + RTM_DELNEIGH = 0x1d + RTM_DELNSID = 0x59 + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETMDB = 0x56 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETNETCONF = 0x52 + RTM_GETNSID = 0x5a + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x5b + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWLINK = 0x10 + RTM_NEWMDB = 0x54 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWNETCONF = 0x50 + RTM_NEWNSID = 0x58 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x13 + RTM_NR_MSGTYPES = 0x4c + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_COMPARE_MASK = 0x11 + RTNH_F_DEAD = 0x1 + RTNH_F_LINKDOWN = 0x10 + RTNH_F_OFFLOAD = 0x8 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTN_MAX = 0xb + RTPROT_BABEL = 0x2a + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_GATED = 0x8 + RTPROT_KERNEL = 0x2 + RTPROT_MROUTED = 0x11 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPNS = 0x23 + SCM_WIFI_STATUS = 0x29 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCATMARK = 0x40047307 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGPGRP = 0x40047309 + SIOCGRARP = 0x8961 + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSPGRP = 0x80047308 + SIOCSRARP = 0x8962 + SOCK_CLOEXEC = 0x80000 + SOCK_DCCP = 0x6 + SOCK_DGRAM = 0x1 + SOCK_NONBLOCK = 0x80 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x2 + SOL_AAL = 0x109 + SOL_ATM = 0x108 + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_PACKET = 0x107 + SOL_RAW = 0xff + SOL_SOCKET = 0xffff + SOL_TCP = 0x6 + SOL_X25 = 0x106 + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x1009 + SO_ATTACH_BPF = 0x32 + SO_ATTACH_FILTER = 0x1a + SO_BINDTODEVICE = 0x19 + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x20 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_DEBUG = 0x1 + SO_DETACH_BPF = 0x1b + SO_DETACH_FILTER = 0x1b + SO_DOMAIN = 0x1029 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_GET_FILTER = 0x1a + SO_INCOMING_CPU = 0x31 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_NOFCS = 0x2b + SO_NO_CHECK = 0xb + SO_OOBINLINE = 0x100 + SO_PASSCRED = 0x11 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x12 + SO_PEERNAME = 0x1c + SO_PEERSEC = 0x1e + SO_PRIORITY = 0xc + SO_PROTOCOL = 0x1028 + SO_RCVBUF = 0x1002 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x1001 + SO_SNDBUFFORCE = 0x1f + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_STYLE = 0x1008 + SO_TIMESTAMP = 0x1d + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TYPE = 0x1008 + SO_WIFI_STATUS = 0x29 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCFLSH = 0x5407 + TCIFLUSH = 0x0 + TCIOFLUSH = 0x2 + TCOFLUSH = 0x1 + TCP_CONGESTION = 0xd + TCP_COOKIE_IN_ALWAYS = 0x1 + TCP_COOKIE_MAX = 0x10 + TCP_COOKIE_MIN = 0x8 + TCP_COOKIE_OUT_NEVER = 0x2 + TCP_COOKIE_PAIR_SIZE = 0x20 + TCP_COOKIE_TRANSACTIONS = 0xf + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_FASTOPEN = 0x17 + TCP_INFO = 0xb + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_MSS_DEFAULT = 0x218 + TCP_MSS_DESIRED = 0x4c4 + TCP_NODELAY = 0x1 + TCP_QUEUE_SEQ = 0x15 + TCP_QUICKACK = 0xc + TCP_REPAIR = 0x13 + TCP_REPAIR_OPTIONS = 0x16 + TCP_REPAIR_QUEUE = 0x14 + TCP_SYNCNT = 0x7 + TCP_S_DATA_IN = 0x4 + TCP_S_DATA_OUT = 0x8 + TCP_THIN_DUPACK = 0x11 + TCP_THIN_LINEAR_TIMEOUTS = 0x10 + TCP_TIMESTAMP = 0x18 + TCP_USER_TIMEOUT = 0x12 + TCP_WINDOW_CLAMP = 0xa + TCSAFLUSH = 0x5410 + TCSBRK = 0x5405 + TCXONC = 0x5406 + TIOCCBRK = 0x5428 + TIOCCONS = 0x80047478 + TIOCEXCL = 0x740d + TIOCGDEV = 0x40045432 + TIOCGETD = 0x7400 + TIOCGETP = 0x7408 + TIOCGEXCL = 0x40045440 + TIOCGICOUNT = 0x5492 + TIOCGLCKTRMIOS = 0x548b + TIOCGLTC = 0x7474 + TIOCGPGRP = 0x40047477 + TIOCGPKT = 0x40045438 + TIOCGPTLCK = 0x40045439 + TIOCGPTN = 0x40045430 + TIOCGRS485 = 0x4020542e + TIOCGSERIAL = 0x5484 + TIOCGSID = 0x7416 + TIOCGSOFTCAR = 0x5481 + TIOCGWINSZ = 0x40087468 + TIOCINQ = 0x467f + TIOCLINUX = 0x5483 + TIOCMBIC = 0x741c + TIOCMBIS = 0x741b + TIOCMGET = 0x741d + TIOCMIWAIT = 0x5491 + TIOCMSET = 0x741a + TIOCM_CAR = 0x100 + TIOCM_CD = 0x100 + TIOCM_CTS = 0x40 + TIOCM_DSR = 0x400 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x200 + TIOCM_RNG = 0x200 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x20 + TIOCM_ST = 0x10 + TIOCNOTTY = 0x5471 + TIOCNXCL = 0x740e + TIOCOUTQ = 0x7472 + TIOCPKT = 0x5470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x5480 + TIOCSERCONFIG = 0x5488 + TIOCSERGETLSR = 0x548e + TIOCSERGETMULTI = 0x548f + TIOCSERGSTRUCT = 0x548d + TIOCSERGWILD = 0x5489 + TIOCSERSETMULTI = 0x5490 + TIOCSERSWILD = 0x548a + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x7401 + TIOCSETN = 0x740a + TIOCSETP = 0x7409 + TIOCSIG = 0x80045436 + TIOCSLCKTRMIOS = 0x548c + TIOCSLTC = 0x7475 + TIOCSPGRP = 0x80047476 + TIOCSPTLCK = 0x80045431 + TIOCSRS485 = 0xc020542f + TIOCSSERIAL = 0x5485 + TIOCSSOFTCAR = 0x5482 + TIOCSTI = 0x5472 + TIOCSWINSZ = 0x80087467 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x8000 + TUNATTACHFILTER = 0x801054d5 + TUNDETACHFILTER = 0x801054d6 + TUNGETFEATURES = 0x400454cf + TUNGETFILTER = 0x401054db + TUNGETIFF = 0x400454d2 + TUNGETSNDBUF = 0x400454d3 + TUNGETVNETBE = 0x400454df + TUNGETVNETHDRSZ = 0x400454d7 + TUNGETVNETLE = 0x400454dd + TUNSETDEBUG = 0x800454c9 + TUNSETGROUP = 0x800454ce + TUNSETIFF = 0x800454ca + TUNSETIFINDEX = 0x800454da + TUNSETLINK = 0x800454cd + TUNSETNOCSUM = 0x800454c8 + TUNSETOFFLOAD = 0x800454d0 + TUNSETOWNER = 0x800454cc + TUNSETPERSIST = 0x800454cb + TUNSETQUEUE = 0x800454d9 + TUNSETSNDBUF = 0x800454d4 + TUNSETTXFILTER = 0x800454d1 + TUNSETVNETBE = 0x800454de + TUNSETVNETHDRSZ = 0x800454d8 + TUNSETVNETLE = 0x800454dc + VDISCARD = 0xd + VEOF = 0x10 + VEOL = 0x11 + VEOL2 = 0x6 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x4 + VQUIT = 0x1 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VSWTCH = 0x7 + VT0 = 0x0 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WORDSIZE = 0x40 + WSTOPPED = 0x2 + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x7d) + EADDRNOTAVAIL = syscall.Errno(0x7e) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x7c) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x95) + EBADE = syscall.Errno(0x32) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x51) + EBADMSG = syscall.Errno(0x4d) + EBADR = syscall.Errno(0x33) + EBADRQC = syscall.Errno(0x36) + EBADSLT = syscall.Errno(0x37) + EBFONT = syscall.Errno(0x3b) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x9e) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x25) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x82) + ECONNREFUSED = syscall.Errno(0x92) + ECONNRESET = syscall.Errno(0x83) + EDEADLK = syscall.Errno(0x2d) + EDEADLOCK = syscall.Errno(0x38) + EDESTADDRREQ = syscall.Errno(0x60) + EDOM = syscall.Errno(0x21) + EDOTDOT = syscall.Errno(0x49) + EDQUOT = syscall.Errno(0x46d) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x93) + EHOSTUNREACH = syscall.Errno(0x94) + EHWPOISON = syscall.Errno(0xa8) + EIDRM = syscall.Errno(0x24) + EILSEQ = syscall.Errno(0x58) + EINIT = syscall.Errno(0x8d) + EINPROGRESS = syscall.Errno(0x96) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x85) + EISDIR = syscall.Errno(0x15) + EISNAM = syscall.Errno(0x8b) + EKEYEXPIRED = syscall.Errno(0xa2) + EKEYREJECTED = syscall.Errno(0xa4) + EKEYREVOKED = syscall.Errno(0xa3) + EL2HLT = syscall.Errno(0x2c) + EL2NSYNC = syscall.Errno(0x26) + EL3HLT = syscall.Errno(0x27) + EL3RST = syscall.Errno(0x28) + ELIBACC = syscall.Errno(0x53) + ELIBBAD = syscall.Errno(0x54) + ELIBEXEC = syscall.Errno(0x57) + ELIBMAX = syscall.Errno(0x56) + ELIBSCN = syscall.Errno(0x55) + ELNRNG = syscall.Errno(0x29) + ELOOP = syscall.Errno(0x5a) + EMEDIUMTYPE = syscall.Errno(0xa0) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x61) + EMULTIHOP = syscall.Errno(0x4a) + ENAMETOOLONG = syscall.Errno(0x4e) + ENAVAIL = syscall.Errno(0x8a) + ENETDOWN = syscall.Errno(0x7f) + ENETRESET = syscall.Errno(0x81) + ENETUNREACH = syscall.Errno(0x80) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x35) + ENOBUFS = syscall.Errno(0x84) + ENOCSI = syscall.Errno(0x2b) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOKEY = syscall.Errno(0xa1) + ENOLCK = syscall.Errno(0x2e) + ENOLINK = syscall.Errno(0x43) + ENOMEDIUM = syscall.Errno(0x9f) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x23) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x63) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x59) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x86) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x5d) + ENOTNAM = syscall.Errno(0x89) + ENOTRECOVERABLE = syscall.Errno(0xa6) + ENOTSOCK = syscall.Errno(0x5f) + ENOTSUP = syscall.Errno(0x7a) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x50) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x7a) + EOVERFLOW = syscall.Errno(0x4f) + EOWNERDEAD = syscall.Errno(0xa5) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x7b) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x78) + EPROTOTYPE = syscall.Errno(0x62) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x52) + EREMDEV = syscall.Errno(0x8e) + EREMOTE = syscall.Errno(0x42) + EREMOTEIO = syscall.Errno(0x8c) + ERESTART = syscall.Errno(0x5b) + ERFKILL = syscall.Errno(0xa7) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x8f) + ESOCKTNOSUPPORT = syscall.Errno(0x79) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x97) + ESTRPIPE = syscall.Errno(0x5c) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x91) + ETOOMANYREFS = syscall.Errno(0x90) + ETXTBSY = syscall.Errno(0x1a) + EUCLEAN = syscall.Errno(0x87) + EUNATCH = syscall.Errno(0x2a) + EUSERS = syscall.Errno(0x5e) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x34) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x12) + SIGCLD = syscall.Signal(0x12) + SIGCONT = syscall.Signal(0x19) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x16) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x16) + SIGPROF = syscall.Signal(0x1d) + SIGPWR = syscall.Signal(0x13) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x17) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x18) + SIGTTIN = syscall.Signal(0x1a) + SIGTTOU = syscall.Signal(0x1b) + SIGURG = syscall.Signal(0x15) + SIGUSR1 = syscall.Signal(0x10) + SIGUSR2 = syscall.Signal(0x11) + SIGVTALRM = syscall.Signal(0x1c) + SIGWINCH = syscall.Signal(0x14) + SIGXCPU = syscall.Signal(0x1e) + SIGXFSZ = syscall.Signal(0x1f) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "no such device or address", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device or resource busy", + 17: "file exists", + 18: "invalid cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "numerical result out of range", + 35: "no message of desired type", + 36: "identifier removed", + 37: "channel number out of range", + 38: "level 2 not synchronized", + 39: "level 3 halted", + 40: "level 3 reset", + 41: "link number out of range", + 42: "protocol driver not attached", + 43: "no CSI structure available", + 44: "level 2 halted", + 45: "resource deadlock avoided", + 46: "no locks available", + 50: "invalid exchange", + 51: "invalid request descriptor", + 52: "exchange full", + 53: "no anode", + 54: "invalid request code", + 55: "invalid slot", + 56: "file locking deadlock error", + 59: "bad font file format", + 60: "device not a stream", + 61: "no data available", + 62: "timer expired", + 63: "out of streams resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 73: "RFS specific error", + 74: "multihop attempted", + 77: "bad message", + 78: "file name too long", + 79: "value too large for defined data type", + 80: "name not unique on network", + 81: "file descriptor in bad state", + 82: "remote address changed", + 83: "can not access a needed shared library", + 84: "accessing a corrupted shared library", + 85: ".lib section in a.out corrupted", + 86: "attempting to link in too many shared libraries", + 87: "cannot exec a shared library directly", + 88: "invalid or incomplete multibyte or wide character", + 89: "function not implemented", + 90: "too many levels of symbolic links", + 91: "interrupted system call should be restarted", + 92: "streams pipe error", + 93: "directory not empty", + 94: "too many users", + 95: "socket operation on non-socket", + 96: "destination address required", + 97: "message too long", + 98: "protocol wrong type for socket", + 99: "protocol not available", + 120: "protocol not supported", + 121: "socket type not supported", + 122: "operation not supported", + 123: "protocol family not supported", + 124: "address family not supported by protocol", + 125: "address already in use", + 126: "cannot assign requested address", + 127: "network is down", + 128: "network is unreachable", + 129: "network dropped connection on reset", + 130: "software caused connection abort", + 131: "connection reset by peer", + 132: "no buffer space available", + 133: "transport endpoint is already connected", + 134: "transport endpoint is not connected", + 135: "structure needs cleaning", + 137: "not a XENIX named type file", + 138: "no XENIX semaphores available", + 139: "is a named type file", + 140: "remote I/O error", + 141: "unknown error 141", + 142: "unknown error 142", + 143: "cannot send after transport endpoint shutdown", + 144: "too many references: cannot splice", + 145: "connection timed out", + 146: "connection refused", + 147: "host is down", + 148: "no route to host", + 149: "operation already in progress", + 150: "operation now in progress", + 151: "stale file handle", + 158: "operation canceled", + 159: "no medium found", + 160: "wrong medium type", + 161: "required key not available", + 162: "key has expired", + 163: "key has been revoked", + 164: "key was rejected by service", + 165: "owner died", + 166: "state not recoverable", + 167: "operation not possible due to RF-kill", + 168: "memory page has hardware error", + 1133: "disk quota exceeded", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "user defined signal 1", + 17: "user defined signal 2", + 18: "child exited", + 19: "power failure", + 20: "window changed", + 21: "urgent I/O condition", + 22: "I/O possible", + 23: "stopped (signal)", + 24: "stopped", + 25: "continued", + 26: "stopped (tty input)", + 27: "stopped (tty output)", + 28: "virtual timer expired", + 29: "profiling timer expired", + 30: "CPU time limit exceeded", + 31: "file size limit exceeded", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go new file mode 100644 index 000000000..8b42ca2fe --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -0,0 +1,1970 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build ppc64,linux + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x29 + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_NFC = 0x27 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VSOCK = 0x28 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + ARPHRD_6LOWPAN = 0x339 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CAIF = 0x336 + ARPHRD_CAN = 0x118 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802154_MONITOR = 0x325 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IP6GRE = 0x337 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETLINK = 0x338 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PHONET = 0x334 + ARPHRD_PHONET_PIPE = 0x335 + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_X25 = 0x10f + B0 = 0x0 + B1000000 = 0x17 + B110 = 0x3 + B115200 = 0x11 + B1152000 = 0x18 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1500000 = 0x19 + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2000000 = 0x1a + B230400 = 0x12 + B2400 = 0xb + B2500000 = 0x1b + B300 = 0x7 + B3000000 = 0x1c + B3500000 = 0x1d + B38400 = 0xf + B4000000 = 0x1e + B460800 = 0x13 + B4800 = 0xc + B50 = 0x1 + B500000 = 0x14 + B57600 = 0x10 + B576000 = 0x15 + B600 = 0x8 + B75 = 0x2 + B921600 = 0x16 + B9600 = 0xd + BOTHER = 0x1f + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MOD = 0x90 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BPF_XOR = 0xa0 + BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x8000 + BSDLY = 0x8000 + CBAUD = 0xff + CBAUDEX = 0x0 + CFLUSH = 0xf + CIBAUD = 0xff0000 + CLOCAL = 0x8000 + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWCGROUP = 0x2000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CMSPAR = 0x40000000 + CR0 = 0x0 + CR1 = 0x1000 + CR2 = 0x2000 + CR3 = 0x3000 + CRDLY = 0x3000 + CREAD = 0x800 + CRTSCTS = 0x80000000 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIGNAL = 0xff + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + ENCODING_DEFAULT = 0x0 + ENCODING_FM_MARK = 0x3 + ENCODING_FM_SPACE = 0x4 + ENCODING_MANCHESTER = 0x5 + ENCODING_NRZ = 0x1 + ENCODING_NRZI = 0x2 + EPOLLERR = 0x8 + EPOLLET = 0x80000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWAKEUP = 0x20000000 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CLOEXEC = 0x80000 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + ETH_P_1588 = 0x88f7 + ETH_P_8021AD = 0x88a8 + ETH_P_8021AH = 0x88e7 + ETH_P_8021Q = 0x8100 + ETH_P_80221 = 0x8917 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_802_3_MIN = 0x600 + ETH_P_802_EX1 = 0x88b5 + ETH_P_AARP = 0x80f3 + ETH_P_AF_IUCV = 0xfbfb + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BATMAN = 0x4305 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CANFD = 0xd + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_LOOPBACK = 0x9000 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_MVRP = 0x88f5 + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PRP = 0x88fb + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_QINQ1 = 0x9100 + ETH_P_QINQ2 = 0x9200 + ETH_P_QINQ3 = 0x9300 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TDLS = 0x890d + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + ETH_P_XDSA = 0xf8 + EXTA = 0xe + EXTB = 0xf + EXTPROC = 0x10000000 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FF0 = 0x0 + FF1 = 0x4000 + FFDLY = 0x4000 + FLUSHO = 0x800000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETLK = 0x5 + F_GETLK64 = 0xc + F_GETOWN = 0x9 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OFD_GETLK = 0x24 + F_OFD_SETLK = 0x25 + F_OFD_SETLKW = 0x26 + F_OK = 0x0 + F_RDLCK = 0x0 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETLK = 0x6 + F_SETLK64 = 0xd + F_SETLKW = 0x7 + F_SETLKW64 = 0xe + F_SETOWN = 0x8 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x4000 + IBSHIFT = 0x10 + ICANON = 0x100 + ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IEXTEN = 0x400 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_MANAGETEMPADDR = 0x100 + IFA_F_NODAD = 0x2 + IFA_F_NOPREFIXROUTE = 0x200 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0x8 + IFF_ALLMULTI = 0x200 + IFF_ATTACH_QUEUE = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DETACH_QUEUE = 0x400 + IFF_DORMANT = 0x20000 + IFF_DYNAMIC = 0x8000 + IFF_ECHO = 0x40000 + IFF_LOOPBACK = 0x8 + IFF_LOWER_UP = 0x10000 + IFF_MASTER = 0x400 + IFF_MULTICAST = 0x1000 + IFF_MULTI_QUEUE = 0x100 + IFF_NOARP = 0x80 + IFF_NOFILTER = 0x1000 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_PERSIST = 0x800 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_TAP = 0x2 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFF_VOLATILE = 0x70c5a + IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOEXEC = 0x80000 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_NONBLOCK = 0x800 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_BEETPH = 0x5e + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MH = 0x87 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_CHECKSUM = 0x7 + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_INTERFACE = 0x4 + IPV6_PMTUDISC_OMIT = 0x5 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_UNICAST_HOPS = 0x10 + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BLOCK_SOURCE = 0x26 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_ALL = 0x31 + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_NODEFRAG = 0x16 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_INTERFACE = 0x4 + IP_PMTUDISC_OMIT = 0x5 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_UNICAST_IF = 0x32 + IP_XFRM_POLICY = 0x11 + ISIG = 0x80 + ISTRIP = 0x20 + IUCLC = 0x1000 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DODUMP = 0x11 + MADV_DOFORK = 0xb + MADV_DONTDUMP = 0x10 + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_HUGE_MASK = 0x3f + MAP_HUGE_SHIFT = 0x1a + MAP_LOCKED = 0x80 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x40 + MAP_POPULATE = 0x8000 + MAP_PRIVATE = 0x2 + MAP_SHARED = 0x1 + MAP_STACK = 0x20000 + MAP_TYPE = 0xf + MCL_CURRENT = 0x2000 + MCL_FUTURE = 0x4000 + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + NAME_MAX = 0xff + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CONNECTOR = 0xb + NETLINK_CRYPTO = 0x15 + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_RX_RING = 0x6 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_SOCK_DIAG = 0x4 + NETLINK_TX_RING = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NL0 = 0x0 + NL1 = 0x100 + NL2 = 0x200 + NL3 = 0x300 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLDLY = 0x300 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_DUMP_INTR = 0x10 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + NOFLSH = 0x80000000 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + OLCUC = 0x4 + ONLCR = 0x2 + ONLRET = 0x20 + ONOCR = 0x10 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x20000 + O_DIRECTORY = 0x4000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x8000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_AUXDATA = 0x8 + PACKET_BROADCAST = 0x1 + PACKET_COPY_THRESH = 0x7 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FANOUT = 0x12 + PACKET_FANOUT_CPU = 0x2 + PACKET_FANOUT_FLAG_DEFRAG = 0x8000 + PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_HASH = 0x0 + PACKET_FANOUT_LB = 0x1 + PACKET_FANOUT_QM = 0x5 + PACKET_FANOUT_RND = 0x4 + PACKET_FANOUT_ROLLOVER = 0x3 + PACKET_FASTROUTE = 0x6 + PACKET_HDRLEN = 0xb + PACKET_HOST = 0x0 + PACKET_KERNEL = 0x7 + PACKET_LOOPBACK = 0x5 + PACKET_LOSS = 0xe + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MR_UNICAST = 0x3 + PACKET_MULTICAST = 0x2 + PACKET_ORIGDEV = 0x9 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_QDISC_BYPASS = 0x14 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RESERVE = 0xc + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PACKET_TIMESTAMP = 0x11 + PACKET_TX_HAS_OFF = 0x13 + PACKET_TX_RING = 0xd + PACKET_TX_TIMESTAMP = 0x10 + PACKET_USER = 0x6 + PACKET_VERSION = 0xa + PACKET_VNET_HDR = 0xf + PARENB = 0x1000 + PARITY_CRC16_PR0 = 0x2 + PARITY_CRC16_PR0_CCITT = 0x4 + PARITY_CRC16_PR1 = 0x3 + PARITY_CRC16_PR1_CCITT = 0x5 + PARITY_CRC32_PR0_CCITT = 0x6 + PARITY_CRC32_PR1_CCITT = 0x7 + PARITY_DEFAULT = 0x0 + PARITY_NONE = 0x1 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_SAO = 0x10 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_GET_CHILD_SUBREAPER = 0x25 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_NO_NEW_PRIVS = 0x27 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECUREBITS = 0x1b + PR_GET_THP_DISABLE = 0x2a + PR_GET_TID_ADDRESS = 0x28 + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_SET_CHILD_SUBREAPER = 0x24 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_KEEPCAPS = 0x8 + PR_SET_MM = 0x23 + PR_SET_MM_ARG_END = 0x9 + PR_SET_MM_ARG_START = 0x8 + PR_SET_MM_AUXV = 0xc + PR_SET_MM_BRK = 0x7 + PR_SET_MM_END_CODE = 0x2 + PR_SET_MM_END_DATA = 0x4 + PR_SET_MM_ENV_END = 0xb + PR_SET_MM_ENV_START = 0xa + PR_SET_MM_EXE_FILE = 0xd + PR_SET_MM_MAP = 0xe + PR_SET_MM_MAP_SIZE = 0xf + PR_SET_MM_START_BRK = 0x6 + PR_SET_MM_START_CODE = 0x1 + PR_SET_MM_START_DATA = 0x3 + PR_SET_MM_START_STACK = 0x5 + PR_SET_NAME = 0xf + PR_SET_NO_NEW_PRIVS = 0x26 + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_PTRACER_ANY = -0x1 + PR_SET_SECCOMP = 0x16 + PR_SET_SECUREBITS = 0x1c + PR_SET_THP_DISABLE = 0x29 + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_SECCOMP = 0x7 + PTRACE_EVENT_STOP = 0x80 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETEVRREGS = 0x14 + PTRACE_GETFPREGS = 0xe + PTRACE_GETREGS = 0xc + PTRACE_GETREGS64 = 0x16 + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GETSIGMASK = 0x420a + PTRACE_GETVRREGS = 0x12 + PTRACE_GETVSRREGS = 0x1b + PTRACE_GET_DEBUGREG = 0x19 + PTRACE_INTERRUPT = 0x4207 + PTRACE_KILL = 0x8 + PTRACE_LISTEN = 0x4208 + PTRACE_O_EXITKILL = 0x100000 + PTRACE_O_MASK = 0x1000ff + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESECCOMP = 0x80 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKSIGINFO = 0x4209 + PTRACE_PEEKSIGINFO_SHARED = 0x1 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKUSR = 0x3 + PTRACE_POKEDATA = 0x5 + PTRACE_POKETEXT = 0x4 + PTRACE_POKEUSR = 0x6 + PTRACE_SEIZE = 0x4206 + PTRACE_SETEVRREGS = 0x15 + PTRACE_SETFPREGS = 0xf + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGS64 = 0x17 + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SETSIGMASK = 0x420b + PTRACE_SETVRREGS = 0x13 + PTRACE_SETVSRREGS = 0x1c + PTRACE_SET_DEBUGREG = 0x1a + PTRACE_SINGLEBLOCK = 0x100 + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_TRACEME = 0x0 + PT_CCR = 0x26 + PT_CTR = 0x23 + PT_DAR = 0x29 + PT_DSCR = 0x2c + PT_DSISR = 0x2a + PT_FPR0 = 0x30 + PT_FPSCR = 0x50 + PT_LNK = 0x24 + PT_MSR = 0x21 + PT_NIP = 0x20 + PT_ORIG_R3 = 0x22 + PT_R0 = 0x0 + PT_R1 = 0x1 + PT_R10 = 0xa + PT_R11 = 0xb + PT_R12 = 0xc + PT_R13 = 0xd + PT_R14 = 0xe + PT_R15 = 0xf + PT_R16 = 0x10 + PT_R17 = 0x11 + PT_R18 = 0x12 + PT_R19 = 0x13 + PT_R2 = 0x2 + PT_R20 = 0x14 + PT_R21 = 0x15 + PT_R22 = 0x16 + PT_R23 = 0x17 + PT_R24 = 0x18 + PT_R25 = 0x19 + PT_R26 = 0x1a + PT_R27 = 0x1b + PT_R28 = 0x1c + PT_R29 = 0x1d + PT_R3 = 0x3 + PT_R30 = 0x1e + PT_R31 = 0x1f + PT_R4 = 0x4 + PT_R5 = 0x5 + PT_R6 = 0x6 + PT_R7 = 0x7 + PT_R8 = 0x8 + PT_R9 = 0x9 + PT_REGS_COUNT = 0x2c + PT_RESULT = 0x2b + PT_SOFTE = 0x27 + PT_TRAP = 0x28 + PT_VR0 = 0x52 + PT_VRSAVE = 0x94 + PT_VSCR = 0x93 + PT_VSR0 = 0x96 + PT_VSR31 = 0xd4 + PT_XER = 0x25 + RLIMIT_AS = 0x9 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x7 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x1 + RTAX_ADVMSS = 0x8 + RTAX_CWND = 0x7 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0xf + RTAX_MTU = 0x2 + RTAX_QUICKACK = 0xf + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x11 + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELLINK = 0x11 + RTM_DELMDB = 0x55 + RTM_DELNEIGH = 0x1d + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETMDB = 0x56 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETNETCONF = 0x52 + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x57 + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWLINK = 0x10 + RTM_NEWMDB = 0x54 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWNETCONF = 0x50 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x12 + RTM_NR_MSGTYPES = 0x48 + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_F_DEAD = 0x1 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTN_MAX = 0xb + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_GATED = 0x8 + RTPROT_KERNEL = 0x2 + RTPROT_MROUTED = 0x11 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPNS = 0x23 + SCM_WIFI_STATUS = 0x29 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCATMARK = 0x8905 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGPGRP = 0x8904 + SIOCGRARP = 0x8961 + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSPGRP = 0x8902 + SIOCSRARP = 0x8962 + SOCK_CLOEXEC = 0x80000 + SOCK_DCCP = 0x6 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_AAL = 0x109 + SOL_ATM = 0x108 + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_PACKET = 0x107 + SOL_RAW = 0xff + SOL_SOCKET = 0x1 + SOL_TCP = 0x6 + SOL_X25 = 0x106 + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_FILTER = 0x1a + SO_BINDTODEVICE = 0x19 + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_DEBUG = 0x1 + SO_DETACH_FILTER = 0x1b + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_GET_FILTER = 0x1a + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_NOFCS = 0x2b + SO_NO_CHECK = 0xb + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x14 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x15 + SO_PEERNAME = 0x1c + SO_PEERSEC = 0x1f + SO_PRIORITY = 0xc + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x10 + SO_RCVTIMEO = 0x12 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x11 + SO_SNDTIMEO = 0x13 + SO_TIMESTAMP = 0x1d + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TAB0 = 0x0 + TAB1 = 0x400 + TAB2 = 0x800 + TAB3 = 0xc00 + TABDLY = 0xc00 + TCFLSH = 0x2000741f + TCGETA = 0x40147417 + TCGETS = 0x402c7413 + TCIFLUSH = 0x0 + TCIOFF = 0x2 + TCIOFLUSH = 0x2 + TCION = 0x3 + TCOFLUSH = 0x1 + TCOOFF = 0x0 + TCOON = 0x1 + TCP_CONGESTION = 0xd + TCP_COOKIE_IN_ALWAYS = 0x1 + TCP_COOKIE_MAX = 0x10 + TCP_COOKIE_MIN = 0x8 + TCP_COOKIE_OUT_NEVER = 0x2 + TCP_COOKIE_PAIR_SIZE = 0x20 + TCP_COOKIE_TRANSACTIONS = 0xf + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_FASTOPEN = 0x17 + TCP_INFO = 0xb + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_MSS_DEFAULT = 0x218 + TCP_MSS_DESIRED = 0x4c4 + TCP_NODELAY = 0x1 + TCP_QUEUE_SEQ = 0x15 + TCP_QUICKACK = 0xc + TCP_REPAIR = 0x13 + TCP_REPAIR_OPTIONS = 0x16 + TCP_REPAIR_QUEUE = 0x14 + TCP_SYNCNT = 0x7 + TCP_S_DATA_IN = 0x4 + TCP_S_DATA_OUT = 0x8 + TCP_THIN_DUPACK = 0x11 + TCP_THIN_LINEAR_TIMEOUTS = 0x10 + TCP_TIMESTAMP = 0x18 + TCP_USER_TIMEOUT = 0x12 + TCP_WINDOW_CLAMP = 0xa + TCSAFLUSH = 0x2 + TCSBRK = 0x2000741d + TCSBRKP = 0x5425 + TCSETA = 0x80147418 + TCSETAF = 0x8014741c + TCSETAW = 0x80147419 + TCSETS = 0x802c7414 + TCSETSF = 0x802c7416 + TCSETSW = 0x802c7415 + TCXONC = 0x2000741e + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x40045432 + TIOCGETC = 0x40067412 + TIOCGETD = 0x5424 + TIOCGETP = 0x40067408 + TIOCGEXCL = 0x40045440 + TIOCGICOUNT = 0x545d + TIOCGLCKTRMIOS = 0x5456 + TIOCGLTC = 0x40067474 + TIOCGPGRP = 0x40047477 + TIOCGPKT = 0x40045438 + TIOCGPTLCK = 0x40045439 + TIOCGPTN = 0x40045430 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x40087468 + TIOCINQ = 0x4004667f + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_LOOP = 0x8000 + TIOCM_OUT1 = 0x2000 + TIOCM_OUT2 = 0x4000 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x5420 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETC = 0x80067411 + TIOCSETD = 0x5423 + TIOCSETN = 0x8006740a + TIOCSETP = 0x80067409 + TIOCSIG = 0x80045436 + TIOCSLCKTRMIOS = 0x5457 + TIOCSLTC = 0x80067475 + TIOCSPGRP = 0x80047476 + TIOCSPTLCK = 0x80045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTART = 0x2000746e + TIOCSTI = 0x5412 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x400000 + TUNATTACHFILTER = 0x801054d5 + TUNDETACHFILTER = 0x801054d6 + TUNGETFEATURES = 0x400454cf + TUNGETFILTER = 0x401054db + TUNGETIFF = 0x400454d2 + TUNGETSNDBUF = 0x400454d3 + TUNGETVNETHDRSZ = 0x400454d7 + TUNSETDEBUG = 0x800454c9 + TUNSETGROUP = 0x800454ce + TUNSETIFF = 0x800454ca + TUNSETIFINDEX = 0x800454da + TUNSETLINK = 0x800454cd + TUNSETNOCSUM = 0x800454c8 + TUNSETOFFLOAD = 0x800454d0 + TUNSETOWNER = 0x800454cc + TUNSETPERSIST = 0x800454cb + TUNSETQUEUE = 0x800454d9 + TUNSETSNDBUF = 0x800454d4 + TUNSETTXFILTER = 0x800454d1 + TUNSETVNETHDRSZ = 0x800454d8 + VDISCARD = 0x10 + VEOF = 0x4 + VEOL = 0x6 + VEOL2 = 0x8 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x5 + VQUIT = 0x1 + VREPRINT = 0xb + VSTART = 0xd + VSTOP = 0xe + VSUSP = 0xc + VSWTC = 0x9 + VT0 = 0x0 + VT1 = 0x10000 + VTDLY = 0x10000 + VTIME = 0x7 + VWERASE = 0xa + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WORDSIZE = 0x40 + WSTOPPED = 0x2 + WUNTRACED = 0x2 + XCASE = 0x4000 + XTABS = 0xc00 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x62) + EADDRNOTAVAIL = syscall.Errno(0x63) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x61) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x72) + EBADE = syscall.Errno(0x34) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x4d) + EBADMSG = syscall.Errno(0x4a) + EBADR = syscall.Errno(0x35) + EBADRQC = syscall.Errno(0x38) + EBADSLT = syscall.Errno(0x39) + EBFONT = syscall.Errno(0x3b) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x7d) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x2c) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x67) + ECONNREFUSED = syscall.Errno(0x6f) + ECONNRESET = syscall.Errno(0x68) + EDEADLK = syscall.Errno(0x23) + EDEADLOCK = syscall.Errno(0x3a) + EDESTADDRREQ = syscall.Errno(0x59) + EDOM = syscall.Errno(0x21) + EDOTDOT = syscall.Errno(0x49) + EDQUOT = syscall.Errno(0x7a) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x70) + EHOSTUNREACH = syscall.Errno(0x71) + EHWPOISON = syscall.Errno(0x85) + EIDRM = syscall.Errno(0x2b) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x73) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x6a) + EISDIR = syscall.Errno(0x15) + EISNAM = syscall.Errno(0x78) + EKEYEXPIRED = syscall.Errno(0x7f) + EKEYREJECTED = syscall.Errno(0x81) + EKEYREVOKED = syscall.Errno(0x80) + EL2HLT = syscall.Errno(0x33) + EL2NSYNC = syscall.Errno(0x2d) + EL3HLT = syscall.Errno(0x2e) + EL3RST = syscall.Errno(0x2f) + ELIBACC = syscall.Errno(0x4f) + ELIBBAD = syscall.Errno(0x50) + ELIBEXEC = syscall.Errno(0x53) + ELIBMAX = syscall.Errno(0x52) + ELIBSCN = syscall.Errno(0x51) + ELNRNG = syscall.Errno(0x30) + ELOOP = syscall.Errno(0x28) + EMEDIUMTYPE = syscall.Errno(0x7c) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x5a) + EMULTIHOP = syscall.Errno(0x48) + ENAMETOOLONG = syscall.Errno(0x24) + ENAVAIL = syscall.Errno(0x77) + ENETDOWN = syscall.Errno(0x64) + ENETRESET = syscall.Errno(0x66) + ENETUNREACH = syscall.Errno(0x65) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x37) + ENOBUFS = syscall.Errno(0x69) + ENOCSI = syscall.Errno(0x32) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOKEY = syscall.Errno(0x7e) + ENOLCK = syscall.Errno(0x25) + ENOLINK = syscall.Errno(0x43) + ENOMEDIUM = syscall.Errno(0x7b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x2a) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x5c) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x26) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x6b) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x27) + ENOTNAM = syscall.Errno(0x76) + ENOTRECOVERABLE = syscall.Errno(0x83) + ENOTSOCK = syscall.Errno(0x58) + ENOTSUP = syscall.Errno(0x5f) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x4c) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x5f) + EOVERFLOW = syscall.Errno(0x4b) + EOWNERDEAD = syscall.Errno(0x82) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x60) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x5d) + EPROTOTYPE = syscall.Errno(0x5b) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x4e) + EREMOTE = syscall.Errno(0x42) + EREMOTEIO = syscall.Errno(0x79) + ERESTART = syscall.Errno(0x55) + ERFKILL = syscall.Errno(0x84) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x6c) + ESOCKTNOSUPPORT = syscall.Errno(0x5e) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x74) + ESTRPIPE = syscall.Errno(0x56) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x6e) + ETOOMANYREFS = syscall.Errno(0x6d) + ETXTBSY = syscall.Errno(0x1a) + EUCLEAN = syscall.Errno(0x75) + EUNATCH = syscall.Errno(0x31) + EUSERS = syscall.Errno(0x57) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x36) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0x7) + SIGCHLD = syscall.Signal(0x11) + SIGCLD = syscall.Signal(0x11) + SIGCONT = syscall.Signal(0x12) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x1d) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x1d) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x1e) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTKFLT = syscall.Signal(0x10) + SIGSTOP = syscall.Signal(0x13) + SIGSYS = syscall.Signal(0x1f) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x14) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGUNUSED = syscall.Signal(0x1f) + SIGURG = syscall.Signal(0x17) + SIGUSR1 = syscall.Signal(0xa) + SIGUSR2 = syscall.Signal(0xc) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "no such device or address", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device or resource busy", + 17: "file exists", + 18: "invalid cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "numerical result out of range", + 35: "resource deadlock avoided", + 36: "file name too long", + 37: "no locks available", + 38: "function not implemented", + 39: "directory not empty", + 40: "too many levels of symbolic links", + 42: "no message of desired type", + 43: "identifier removed", + 44: "channel number out of range", + 45: "level 2 not synchronized", + 46: "level 3 halted", + 47: "level 3 reset", + 48: "link number out of range", + 49: "protocol driver not attached", + 50: "no CSI structure available", + 51: "level 2 halted", + 52: "invalid exchange", + 53: "invalid request descriptor", + 54: "exchange full", + 55: "no anode", + 56: "invalid request code", + 57: "invalid slot", + 58: "file locking deadlock error", + 59: "bad font file format", + 60: "device not a stream", + 61: "no data available", + 62: "timer expired", + 63: "out of streams resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 72: "multihop attempted", + 73: "RFS specific error", + 74: "bad message", + 75: "value too large for defined data type", + 76: "name not unique on network", + 77: "file descriptor in bad state", + 78: "remote address changed", + 79: "can not access a needed shared library", + 80: "accessing a corrupted shared library", + 81: ".lib section in a.out corrupted", + 82: "attempting to link in too many shared libraries", + 83: "cannot exec a shared library directly", + 84: "invalid or incomplete multibyte or wide character", + 85: "interrupted system call should be restarted", + 86: "streams pipe error", + 87: "too many users", + 88: "socket operation on non-socket", + 89: "destination address required", + 90: "message too long", + 91: "protocol wrong type for socket", + 92: "protocol not available", + 93: "protocol not supported", + 94: "socket type not supported", + 95: "operation not supported", + 96: "protocol family not supported", + 97: "address family not supported by protocol", + 98: "address already in use", + 99: "cannot assign requested address", + 100: "network is down", + 101: "network is unreachable", + 102: "network dropped connection on reset", + 103: "software caused connection abort", + 104: "connection reset by peer", + 105: "no buffer space available", + 106: "transport endpoint is already connected", + 107: "transport endpoint is not connected", + 108: "cannot send after transport endpoint shutdown", + 109: "too many references: cannot splice", + 110: "connection timed out", + 111: "connection refused", + 112: "host is down", + 113: "no route to host", + 114: "operation already in progress", + 115: "operation now in progress", + 116: "stale file handle", + 117: "structure needs cleaning", + 118: "not a XENIX named type file", + 119: "no XENIX semaphores available", + 120: "is a named type file", + 121: "remote I/O error", + 122: "disk quota exceeded", + 123: "no medium found", + 124: "wrong medium type", + 125: "operation canceled", + 126: "required key not available", + 127: "key has expired", + 128: "key has been revoked", + 129: "key was rejected by service", + 130: "owner died", + 131: "state not recoverable", + 132: "operation not possible due to RF-kill", + 133: "memory page has hardware error", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "bus error", + 8: "floating point exception", + 9: "killed", + 10: "user defined signal 1", + 11: "segmentation fault", + 12: "user defined signal 2", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "stack fault", + 17: "child exited", + 18: "continued", + 19: "stopped (signal)", + 20: "stopped", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "urgent I/O condition", + 24: "CPU time limit exceeded", + 25: "file size limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window changed", + 29: "I/O possible", + 30: "power failure", + 31: "bad system call", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go new file mode 100644 index 000000000..e8d12b5d6 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -0,0 +1,1969 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build ppc64le,linux + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x29 + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_NFC = 0x27 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VSOCK = 0x28 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CAIF = 0x336 + ARPHRD_CAN = 0x118 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802154_MONITOR = 0x325 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IP6GRE = 0x337 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETLINK = 0x338 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PHONET = 0x334 + ARPHRD_PHONET_PIPE = 0x335 + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_X25 = 0x10f + B0 = 0x0 + B1000000 = 0x17 + B110 = 0x3 + B115200 = 0x11 + B1152000 = 0x18 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1500000 = 0x19 + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2000000 = 0x1a + B230400 = 0x12 + B2400 = 0xb + B2500000 = 0x1b + B300 = 0x7 + B3000000 = 0x1c + B3500000 = 0x1d + B38400 = 0xf + B4000000 = 0x1e + B460800 = 0x13 + B4800 = 0xc + B50 = 0x1 + B500000 = 0x14 + B57600 = 0x10 + B576000 = 0x15 + B600 = 0x8 + B75 = 0x2 + B921600 = 0x16 + B9600 = 0xd + BOTHER = 0x1f + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MOD = 0x90 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BPF_XOR = 0xa0 + BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x8000 + BSDLY = 0x8000 + CBAUD = 0xff + CBAUDEX = 0x0 + CFLUSH = 0xf + CIBAUD = 0xff0000 + CLOCAL = 0x8000 + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWCGROUP = 0x2000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CMSPAR = 0x40000000 + CR0 = 0x0 + CR1 = 0x1000 + CR2 = 0x2000 + CR3 = 0x3000 + CRDLY = 0x3000 + CREAD = 0x800 + CRTSCTS = 0x80000000 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIGNAL = 0xff + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + ENCODING_DEFAULT = 0x0 + ENCODING_FM_MARK = 0x3 + ENCODING_FM_SPACE = 0x4 + ENCODING_MANCHESTER = 0x5 + ENCODING_NRZ = 0x1 + ENCODING_NRZI = 0x2 + EPOLLERR = 0x8 + EPOLLET = 0x80000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWAKEUP = 0x20000000 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CLOEXEC = 0x80000 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + ETH_P_1588 = 0x88f7 + ETH_P_8021AD = 0x88a8 + ETH_P_8021AH = 0x88e7 + ETH_P_8021Q = 0x8100 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_802_3_MIN = 0x600 + ETH_P_802_EX1 = 0x88b5 + ETH_P_AARP = 0x80f3 + ETH_P_AF_IUCV = 0xfbfb + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BATMAN = 0x4305 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CANFD = 0xd + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_MVRP = 0x88f5 + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PRP = 0x88fb + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_QINQ1 = 0x9100 + ETH_P_QINQ2 = 0x9200 + ETH_P_QINQ3 = 0x9300 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TDLS = 0x890d + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + EXTA = 0xe + EXTB = 0xf + EXTPROC = 0x10000000 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FF0 = 0x0 + FF1 = 0x4000 + FFDLY = 0x4000 + FLUSHO = 0x800000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETLK = 0x5 + F_GETLK64 = 0xc + F_GETOWN = 0x9 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OK = 0x0 + F_RDLCK = 0x0 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETLK = 0x6 + F_SETLK64 = 0xd + F_SETLKW = 0x7 + F_SETLKW64 = 0xe + F_SETOWN = 0x8 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x4000 + IBSHIFT = 0x10 + ICANON = 0x100 + ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IEXTEN = 0x400 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_NODAD = 0x2 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0x7 + IFF_802_1Q_VLAN = 0x1 + IFF_ALLMULTI = 0x200 + IFF_ATTACH_QUEUE = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BONDING = 0x20 + IFF_BRIDGE_PORT = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DETACH_QUEUE = 0x400 + IFF_DISABLE_NETPOLL = 0x1000 + IFF_DONT_BRIDGE = 0x800 + IFF_DORMANT = 0x20000 + IFF_DYNAMIC = 0x8000 + IFF_EBRIDGE = 0x2 + IFF_ECHO = 0x40000 + IFF_ISATAP = 0x80 + IFF_LIVE_ADDR_CHANGE = 0x100000 + IFF_LOOPBACK = 0x8 + IFF_LOWER_UP = 0x10000 + IFF_MACVLAN = 0x200000 + IFF_MACVLAN_PORT = 0x2000 + IFF_MASTER = 0x400 + IFF_MASTER_8023AD = 0x8 + IFF_MASTER_ALB = 0x10 + IFF_MASTER_ARPMON = 0x100 + IFF_MULTICAST = 0x1000 + IFF_MULTI_QUEUE = 0x100 + IFF_NOARP = 0x80 + IFF_NOFILTER = 0x1000 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_OVS_DATAPATH = 0x8000 + IFF_PERSIST = 0x800 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_SLAVE_INACTIVE = 0x4 + IFF_SLAVE_NEEDARP = 0x40 + IFF_SUPP_NOFCS = 0x80000 + IFF_TAP = 0x2 + IFF_TEAM_PORT = 0x40000 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_TX_SKB_SHARING = 0x10000 + IFF_UNICAST_FLT = 0x20000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFF_VOLATILE = 0x70c5a + IFF_WAN_HDLC = 0x200 + IFF_XMIT_DST_RELEASE = 0x400 + IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOEXEC = 0x80000 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_NONBLOCK = 0x800 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_BEETPH = 0x5e + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MH = 0x87 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_CHECKSUM = 0x7 + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_UNICAST_HOPS = 0x10 + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BLOCK_SOURCE = 0x26 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_ALL = 0x31 + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_UNICAST_IF = 0x32 + IP_XFRM_POLICY = 0x11 + ISIG = 0x80 + ISTRIP = 0x20 + IUCLC = 0x1000 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DODUMP = 0x11 + MADV_DOFORK = 0xb + MADV_DONTDUMP = 0x10 + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_HUGE_MASK = 0x3f + MAP_HUGE_SHIFT = 0x1a + MAP_LOCKED = 0x80 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x40 + MAP_POPULATE = 0x8000 + MAP_PRIVATE = 0x2 + MAP_SHARED = 0x1 + MAP_STACK = 0x20000 + MAP_TYPE = 0xf + MCL_CURRENT = 0x2000 + MCL_FUTURE = 0x4000 + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + NAME_MAX = 0xff + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CONNECTOR = 0xb + NETLINK_CRYPTO = 0x15 + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_RX_RING = 0x6 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_SOCK_DIAG = 0x4 + NETLINK_TX_RING = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NL0 = 0x0 + NL1 = 0x100 + NL2 = 0x200 + NL3 = 0x300 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLDLY = 0x300 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_DUMP_INTR = 0x10 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + NOFLSH = 0x80000000 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + OLCUC = 0x4 + ONLCR = 0x2 + ONLRET = 0x20 + ONOCR = 0x10 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x20000 + O_DIRECTORY = 0x4000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x8000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_AUXDATA = 0x8 + PACKET_BROADCAST = 0x1 + PACKET_COPY_THRESH = 0x7 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FANOUT = 0x12 + PACKET_FANOUT_CPU = 0x2 + PACKET_FANOUT_FLAG_DEFRAG = 0x8000 + PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_HASH = 0x0 + PACKET_FANOUT_LB = 0x1 + PACKET_FANOUT_RND = 0x4 + PACKET_FANOUT_ROLLOVER = 0x3 + PACKET_FASTROUTE = 0x6 + PACKET_HDRLEN = 0xb + PACKET_HOST = 0x0 + PACKET_LOOPBACK = 0x5 + PACKET_LOSS = 0xe + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MR_UNICAST = 0x3 + PACKET_MULTICAST = 0x2 + PACKET_ORIGDEV = 0x9 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RESERVE = 0xc + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PACKET_TIMESTAMP = 0x11 + PACKET_TX_HAS_OFF = 0x13 + PACKET_TX_RING = 0xd + PACKET_TX_TIMESTAMP = 0x10 + PACKET_VERSION = 0xa + PACKET_VNET_HDR = 0xf + PARENB = 0x1000 + PARITY_CRC16_PR0 = 0x2 + PARITY_CRC16_PR0_CCITT = 0x4 + PARITY_CRC16_PR1 = 0x3 + PARITY_CRC16_PR1_CCITT = 0x5 + PARITY_CRC32_PR0_CCITT = 0x6 + PARITY_CRC32_PR1_CCITT = 0x7 + PARITY_DEFAULT = 0x0 + PARITY_NONE = 0x1 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_SAO = 0x10 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_GET_CHILD_SUBREAPER = 0x25 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_NO_NEW_PRIVS = 0x27 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECUREBITS = 0x1b + PR_GET_TID_ADDRESS = 0x28 + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_SET_CHILD_SUBREAPER = 0x24 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_KEEPCAPS = 0x8 + PR_SET_MM = 0x23 + PR_SET_MM_ARG_END = 0x9 + PR_SET_MM_ARG_START = 0x8 + PR_SET_MM_AUXV = 0xc + PR_SET_MM_BRK = 0x7 + PR_SET_MM_END_CODE = 0x2 + PR_SET_MM_END_DATA = 0x4 + PR_SET_MM_ENV_END = 0xb + PR_SET_MM_ENV_START = 0xa + PR_SET_MM_EXE_FILE = 0xd + PR_SET_MM_START_BRK = 0x6 + PR_SET_MM_START_CODE = 0x1 + PR_SET_MM_START_DATA = 0x3 + PR_SET_MM_START_STACK = 0x5 + PR_SET_NAME = 0xf + PR_SET_NO_NEW_PRIVS = 0x26 + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_PTRACER_ANY = -0x1 + PR_SET_SECCOMP = 0x16 + PR_SET_SECUREBITS = 0x1c + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_SECCOMP = 0x7 + PTRACE_EVENT_STOP = 0x80 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETEVRREGS = 0x14 + PTRACE_GETFPREGS = 0xe + PTRACE_GETREGS = 0xc + PTRACE_GETREGS64 = 0x16 + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GETSIGMASK = 0x420a + PTRACE_GETVRREGS = 0x12 + PTRACE_GETVSRREGS = 0x1b + PTRACE_GET_DEBUGREG = 0x19 + PTRACE_INTERRUPT = 0x4207 + PTRACE_KILL = 0x8 + PTRACE_LISTEN = 0x4208 + PTRACE_O_EXITKILL = 0x100000 + PTRACE_O_MASK = 0x1000ff + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESECCOMP = 0x80 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKSIGINFO = 0x4209 + PTRACE_PEEKSIGINFO_SHARED = 0x1 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKUSR = 0x3 + PTRACE_POKEDATA = 0x5 + PTRACE_POKETEXT = 0x4 + PTRACE_POKEUSR = 0x6 + PTRACE_SEIZE = 0x4206 + PTRACE_SETEVRREGS = 0x15 + PTRACE_SETFPREGS = 0xf + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGS64 = 0x17 + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SETSIGMASK = 0x420b + PTRACE_SETVRREGS = 0x13 + PTRACE_SETVSRREGS = 0x1c + PTRACE_SET_DEBUGREG = 0x1a + PTRACE_SINGLEBLOCK = 0x100 + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_TRACEME = 0x0 + PT_CCR = 0x26 + PT_CTR = 0x23 + PT_DAR = 0x29 + PT_DSCR = 0x2c + PT_DSISR = 0x2a + PT_FPR0 = 0x30 + PT_FPSCR = 0x50 + PT_LNK = 0x24 + PT_MSR = 0x21 + PT_NIP = 0x20 + PT_ORIG_R3 = 0x22 + PT_R0 = 0x0 + PT_R1 = 0x1 + PT_R10 = 0xa + PT_R11 = 0xb + PT_R12 = 0xc + PT_R13 = 0xd + PT_R14 = 0xe + PT_R15 = 0xf + PT_R16 = 0x10 + PT_R17 = 0x11 + PT_R18 = 0x12 + PT_R19 = 0x13 + PT_R2 = 0x2 + PT_R20 = 0x14 + PT_R21 = 0x15 + PT_R22 = 0x16 + PT_R23 = 0x17 + PT_R24 = 0x18 + PT_R25 = 0x19 + PT_R26 = 0x1a + PT_R27 = 0x1b + PT_R28 = 0x1c + PT_R29 = 0x1d + PT_R3 = 0x3 + PT_R30 = 0x1e + PT_R31 = 0x1f + PT_R4 = 0x4 + PT_R5 = 0x5 + PT_R6 = 0x6 + PT_R7 = 0x7 + PT_R8 = 0x8 + PT_R9 = 0x9 + PT_REGS_COUNT = 0x2c + PT_RESULT = 0x2b + PT_SOFTE = 0x27 + PT_TRAP = 0x28 + PT_VR0 = 0x52 + PT_VRSAVE = 0x94 + PT_VSCR = 0x93 + PT_VSR0 = 0x96 + PT_VSR31 = 0xd4 + PT_XER = 0x25 + RLIMIT_AS = 0x9 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x7 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x1 + RTAX_ADVMSS = 0x8 + RTAX_CWND = 0x7 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0xf + RTAX_MTU = 0x2 + RTAX_QUICKACK = 0xf + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x11 + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELLINK = 0x11 + RTM_DELMDB = 0x55 + RTM_DELNEIGH = 0x1d + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETMDB = 0x56 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETNETCONF = 0x52 + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x57 + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWLINK = 0x10 + RTM_NEWMDB = 0x54 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWNETCONF = 0x50 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x12 + RTM_NR_MSGTYPES = 0x48 + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_F_DEAD = 0x1 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTN_MAX = 0xb + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_GATED = 0x8 + RTPROT_KERNEL = 0x2 + RTPROT_MROUTED = 0x11 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPNS = 0x23 + SCM_WIFI_STATUS = 0x29 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCATMARK = 0x8905 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGPGRP = 0x8904 + SIOCGRARP = 0x8961 + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSPGRP = 0x8902 + SIOCSRARP = 0x8962 + SOCK_CLOEXEC = 0x80000 + SOCK_DCCP = 0x6 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_AAL = 0x109 + SOL_ATM = 0x108 + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_PACKET = 0x107 + SOL_RAW = 0xff + SOL_SOCKET = 0x1 + SOL_TCP = 0x6 + SOL_X25 = 0x106 + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_FILTER = 0x1a + SO_BINDTODEVICE = 0x19 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_DEBUG = 0x1 + SO_DETACH_FILTER = 0x1b + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_GET_FILTER = 0x1a + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_NOFCS = 0x2b + SO_NO_CHECK = 0xb + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x14 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x15 + SO_PEERNAME = 0x1c + SO_PEERSEC = 0x1f + SO_PRIORITY = 0xc + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x10 + SO_RCVTIMEO = 0x12 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x11 + SO_SNDTIMEO = 0x13 + SO_TIMESTAMP = 0x1d + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TAB0 = 0x0 + TAB1 = 0x400 + TAB2 = 0x800 + TAB3 = 0xc00 + TABDLY = 0xc00 + TCFLSH = 0x2000741f + TCGETA = 0x40147417 + TCGETS = 0x402c7413 + TCIFLUSH = 0x0 + TCIOFF = 0x2 + TCIOFLUSH = 0x2 + TCION = 0x3 + TCOFLUSH = 0x1 + TCOOFF = 0x0 + TCOON = 0x1 + TCP_CONGESTION = 0xd + TCP_COOKIE_IN_ALWAYS = 0x1 + TCP_COOKIE_MAX = 0x10 + TCP_COOKIE_MIN = 0x8 + TCP_COOKIE_OUT_NEVER = 0x2 + TCP_COOKIE_PAIR_SIZE = 0x20 + TCP_COOKIE_TRANSACTIONS = 0xf + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_FASTOPEN = 0x17 + TCP_INFO = 0xb + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_MSS_DEFAULT = 0x218 + TCP_MSS_DESIRED = 0x4c4 + TCP_NODELAY = 0x1 + TCP_QUEUE_SEQ = 0x15 + TCP_QUICKACK = 0xc + TCP_REPAIR = 0x13 + TCP_REPAIR_OPTIONS = 0x16 + TCP_REPAIR_QUEUE = 0x14 + TCP_SYNCNT = 0x7 + TCP_S_DATA_IN = 0x4 + TCP_S_DATA_OUT = 0x8 + TCP_THIN_DUPACK = 0x11 + TCP_THIN_LINEAR_TIMEOUTS = 0x10 + TCP_TIMESTAMP = 0x18 + TCP_USER_TIMEOUT = 0x12 + TCP_WINDOW_CLAMP = 0xa + TCSAFLUSH = 0x2 + TCSBRK = 0x2000741d + TCSBRKP = 0x5425 + TCSETA = 0x80147418 + TCSETAF = 0x8014741c + TCSETAW = 0x80147419 + TCSETS = 0x802c7414 + TCSETSF = 0x802c7416 + TCSETSW = 0x802c7415 + TCXONC = 0x2000741e + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x40045432 + TIOCGETC = 0x40067412 + TIOCGETD = 0x5424 + TIOCGETP = 0x40067408 + TIOCGEXCL = 0x40045440 + TIOCGICOUNT = 0x545d + TIOCGLCKTRMIOS = 0x5456 + TIOCGLTC = 0x40067474 + TIOCGPGRP = 0x40047477 + TIOCGPKT = 0x40045438 + TIOCGPTLCK = 0x40045439 + TIOCGPTN = 0x40045430 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x40087468 + TIOCINQ = 0x4004667f + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_LOOP = 0x8000 + TIOCM_OUT1 = 0x2000 + TIOCM_OUT2 = 0x4000 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x5420 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETC = 0x80067411 + TIOCSETD = 0x5423 + TIOCSETN = 0x8006740a + TIOCSETP = 0x80067409 + TIOCSIG = 0x80045436 + TIOCSLCKTRMIOS = 0x5457 + TIOCSLTC = 0x80067475 + TIOCSPGRP = 0x80047476 + TIOCSPTLCK = 0x80045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTART = 0x2000746e + TIOCSTI = 0x5412 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x400000 + TUNATTACHFILTER = 0x801054d5 + TUNDETACHFILTER = 0x801054d6 + TUNGETFEATURES = 0x400454cf + TUNGETFILTER = 0x401054db + TUNGETIFF = 0x400454d2 + TUNGETSNDBUF = 0x400454d3 + TUNGETVNETHDRSZ = 0x400454d7 + TUNSETDEBUG = 0x800454c9 + TUNSETGROUP = 0x800454ce + TUNSETIFF = 0x800454ca + TUNSETIFINDEX = 0x800454da + TUNSETLINK = 0x800454cd + TUNSETNOCSUM = 0x800454c8 + TUNSETOFFLOAD = 0x800454d0 + TUNSETOWNER = 0x800454cc + TUNSETPERSIST = 0x800454cb + TUNSETQUEUE = 0x800454d9 + TUNSETSNDBUF = 0x800454d4 + TUNSETTXFILTER = 0x800454d1 + TUNSETVNETHDRSZ = 0x800454d8 + VDISCARD = 0x10 + VEOF = 0x4 + VEOL = 0x6 + VEOL2 = 0x8 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x5 + VQUIT = 0x1 + VREPRINT = 0xb + VSTART = 0xd + VSTOP = 0xe + VSUSP = 0xc + VSWTC = 0x9 + VT0 = 0x0 + VT1 = 0x10000 + VTDLY = 0x10000 + VTIME = 0x7 + VWERASE = 0xa + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WORDSIZE = 0x40 + WSTOPPED = 0x2 + WUNTRACED = 0x2 + XCASE = 0x4000 + XTABS = 0xc00 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x62) + EADDRNOTAVAIL = syscall.Errno(0x63) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x61) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x72) + EBADE = syscall.Errno(0x34) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x4d) + EBADMSG = syscall.Errno(0x4a) + EBADR = syscall.Errno(0x35) + EBADRQC = syscall.Errno(0x38) + EBADSLT = syscall.Errno(0x39) + EBFONT = syscall.Errno(0x3b) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x7d) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x2c) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x67) + ECONNREFUSED = syscall.Errno(0x6f) + ECONNRESET = syscall.Errno(0x68) + EDEADLK = syscall.Errno(0x23) + EDEADLOCK = syscall.Errno(0x3a) + EDESTADDRREQ = syscall.Errno(0x59) + EDOM = syscall.Errno(0x21) + EDOTDOT = syscall.Errno(0x49) + EDQUOT = syscall.Errno(0x7a) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x70) + EHOSTUNREACH = syscall.Errno(0x71) + EHWPOISON = syscall.Errno(0x85) + EIDRM = syscall.Errno(0x2b) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x73) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x6a) + EISDIR = syscall.Errno(0x15) + EISNAM = syscall.Errno(0x78) + EKEYEXPIRED = syscall.Errno(0x7f) + EKEYREJECTED = syscall.Errno(0x81) + EKEYREVOKED = syscall.Errno(0x80) + EL2HLT = syscall.Errno(0x33) + EL2NSYNC = syscall.Errno(0x2d) + EL3HLT = syscall.Errno(0x2e) + EL3RST = syscall.Errno(0x2f) + ELIBACC = syscall.Errno(0x4f) + ELIBBAD = syscall.Errno(0x50) + ELIBEXEC = syscall.Errno(0x53) + ELIBMAX = syscall.Errno(0x52) + ELIBSCN = syscall.Errno(0x51) + ELNRNG = syscall.Errno(0x30) + ELOOP = syscall.Errno(0x28) + EMEDIUMTYPE = syscall.Errno(0x7c) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x5a) + EMULTIHOP = syscall.Errno(0x48) + ENAMETOOLONG = syscall.Errno(0x24) + ENAVAIL = syscall.Errno(0x77) + ENETDOWN = syscall.Errno(0x64) + ENETRESET = syscall.Errno(0x66) + ENETUNREACH = syscall.Errno(0x65) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x37) + ENOBUFS = syscall.Errno(0x69) + ENOCSI = syscall.Errno(0x32) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOKEY = syscall.Errno(0x7e) + ENOLCK = syscall.Errno(0x25) + ENOLINK = syscall.Errno(0x43) + ENOMEDIUM = syscall.Errno(0x7b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x2a) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x5c) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x26) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x6b) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x27) + ENOTNAM = syscall.Errno(0x76) + ENOTRECOVERABLE = syscall.Errno(0x83) + ENOTSOCK = syscall.Errno(0x58) + ENOTSUP = syscall.Errno(0x5f) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x4c) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x5f) + EOVERFLOW = syscall.Errno(0x4b) + EOWNERDEAD = syscall.Errno(0x82) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x60) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x5d) + EPROTOTYPE = syscall.Errno(0x5b) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x4e) + EREMOTE = syscall.Errno(0x42) + EREMOTEIO = syscall.Errno(0x79) + ERESTART = syscall.Errno(0x55) + ERFKILL = syscall.Errno(0x84) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x6c) + ESOCKTNOSUPPORT = syscall.Errno(0x5e) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x74) + ESTRPIPE = syscall.Errno(0x56) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x6e) + ETOOMANYREFS = syscall.Errno(0x6d) + ETXTBSY = syscall.Errno(0x1a) + EUCLEAN = syscall.Errno(0x75) + EUNATCH = syscall.Errno(0x31) + EUSERS = syscall.Errno(0x57) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x36) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0x7) + SIGCHLD = syscall.Signal(0x11) + SIGCLD = syscall.Signal(0x11) + SIGCONT = syscall.Signal(0x12) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x1d) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x1d) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x1e) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTKFLT = syscall.Signal(0x10) + SIGSTOP = syscall.Signal(0x13) + SIGSYS = syscall.Signal(0x1f) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x14) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGUNUSED = syscall.Signal(0x1f) + SIGURG = syscall.Signal(0x17) + SIGUSR1 = syscall.Signal(0xa) + SIGUSR2 = syscall.Signal(0xc) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "no such device or address", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device or resource busy", + 17: "file exists", + 18: "invalid cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "numerical result out of range", + 35: "resource deadlock avoided", + 36: "file name too long", + 37: "no locks available", + 38: "function not implemented", + 39: "directory not empty", + 40: "too many levels of symbolic links", + 42: "no message of desired type", + 43: "identifier removed", + 44: "channel number out of range", + 45: "level 2 not synchronized", + 46: "level 3 halted", + 47: "level 3 reset", + 48: "link number out of range", + 49: "protocol driver not attached", + 50: "no CSI structure available", + 51: "level 2 halted", + 52: "invalid exchange", + 53: "invalid request descriptor", + 54: "exchange full", + 55: "no anode", + 56: "invalid request code", + 57: "invalid slot", + 58: "file locking deadlock error", + 59: "bad font file format", + 60: "device not a stream", + 61: "no data available", + 62: "timer expired", + 63: "out of streams resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 72: "multihop attempted", + 73: "RFS specific error", + 74: "bad message", + 75: "value too large for defined data type", + 76: "name not unique on network", + 77: "file descriptor in bad state", + 78: "remote address changed", + 79: "can not access a needed shared library", + 80: "accessing a corrupted shared library", + 81: ".lib section in a.out corrupted", + 82: "attempting to link in too many shared libraries", + 83: "cannot exec a shared library directly", + 84: "invalid or incomplete multibyte or wide character", + 85: "interrupted system call should be restarted", + 86: "streams pipe error", + 87: "too many users", + 88: "socket operation on non-socket", + 89: "destination address required", + 90: "message too long", + 91: "protocol wrong type for socket", + 92: "protocol not available", + 93: "protocol not supported", + 94: "socket type not supported", + 95: "operation not supported", + 96: "protocol family not supported", + 97: "address family not supported by protocol", + 98: "address already in use", + 99: "cannot assign requested address", + 100: "network is down", + 101: "network is unreachable", + 102: "network dropped connection on reset", + 103: "software caused connection abort", + 104: "connection reset by peer", + 105: "no buffer space available", + 106: "transport endpoint is already connected", + 107: "transport endpoint is not connected", + 108: "cannot send after transport endpoint shutdown", + 109: "too many references: cannot splice", + 110: "connection timed out", + 111: "connection refused", + 112: "host is down", + 113: "no route to host", + 114: "operation already in progress", + 115: "operation now in progress", + 116: "stale file handle", + 117: "structure needs cleaning", + 118: "not a XENIX named type file", + 119: "no XENIX semaphores available", + 120: "is a named type file", + 121: "remote I/O error", + 122: "disk quota exceeded", + 123: "no medium found", + 124: "wrong medium type", + 125: "operation canceled", + 126: "required key not available", + 127: "key has expired", + 128: "key has been revoked", + 129: "key was rejected by service", + 130: "owner died", + 131: "state not recoverable", + 132: "operation not possible due to RF-kill", + 133: "memory page has hardware error", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "bus error", + 8: "floating point exception", + 9: "killed", + 10: "user defined signal 1", + 11: "segmentation fault", + 12: "user defined signal 2", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "stack fault", + 17: "child exited", + 18: "continued", + 19: "stopped (signal)", + 20: "stopped", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "urgent I/O condition", + 24: "CPU time limit exceeded", + 25: "file size limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window changed", + 29: "I/O possible", + 30: "power failure", + 31: "bad system call", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go new file mode 100644 index 000000000..329f25e7c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -0,0 +1,2027 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build s390x,linux + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_ALG = 0x26 + AF_APPLETALK = 0x5 + AF_ASH = 0x12 + AF_ATMPVC = 0x8 + AF_ATMSVC = 0x14 + AF_AX25 = 0x3 + AF_BLUETOOTH = 0x1f + AF_BRIDGE = 0x7 + AF_CAIF = 0x25 + AF_CAN = 0x1d + AF_DECnet = 0xc + AF_ECONET = 0x13 + AF_FILE = 0x1 + AF_IB = 0x1b + AF_IEEE802154 = 0x24 + AF_INET = 0x2 + AF_INET6 = 0xa + AF_IPX = 0x4 + AF_IRDA = 0x17 + AF_ISDN = 0x22 + AF_IUCV = 0x20 + AF_KEY = 0xf + AF_LLC = 0x1a + AF_LOCAL = 0x1 + AF_MAX = 0x29 + AF_MPLS = 0x1c + AF_NETBEUI = 0xd + AF_NETLINK = 0x10 + AF_NETROM = 0x6 + AF_NFC = 0x27 + AF_PACKET = 0x11 + AF_PHONET = 0x23 + AF_PPPOX = 0x18 + AF_RDS = 0x15 + AF_ROSE = 0xb + AF_ROUTE = 0x10 + AF_RXRPC = 0x21 + AF_SECURITY = 0xe + AF_SNA = 0x16 + AF_TIPC = 0x1e + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_VSOCK = 0x28 + AF_WANPIPE = 0x19 + AF_X25 = 0x9 + ARPHRD_6LOWPAN = 0x339 + ARPHRD_ADAPT = 0x108 + ARPHRD_APPLETLK = 0x8 + ARPHRD_ARCNET = 0x7 + ARPHRD_ASH = 0x30d + ARPHRD_ATM = 0x13 + ARPHRD_AX25 = 0x3 + ARPHRD_BIF = 0x307 + ARPHRD_CAIF = 0x336 + ARPHRD_CAN = 0x118 + ARPHRD_CHAOS = 0x5 + ARPHRD_CISCO = 0x201 + ARPHRD_CSLIP = 0x101 + ARPHRD_CSLIP6 = 0x103 + ARPHRD_DDCMP = 0x205 + ARPHRD_DLCI = 0xf + ARPHRD_ECONET = 0x30e + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_EUI64 = 0x1b + ARPHRD_FCAL = 0x311 + ARPHRD_FCFABRIC = 0x313 + ARPHRD_FCPL = 0x312 + ARPHRD_FCPP = 0x310 + ARPHRD_FDDI = 0x306 + ARPHRD_FRAD = 0x302 + ARPHRD_HDLC = 0x201 + ARPHRD_HIPPI = 0x30c + ARPHRD_HWX25 = 0x110 + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IEEE80211 = 0x321 + ARPHRD_IEEE80211_PRISM = 0x322 + ARPHRD_IEEE80211_RADIOTAP = 0x323 + ARPHRD_IEEE802154 = 0x324 + ARPHRD_IEEE802154_MONITOR = 0x325 + ARPHRD_IEEE802_TR = 0x320 + ARPHRD_INFINIBAND = 0x20 + ARPHRD_IP6GRE = 0x337 + ARPHRD_IPDDP = 0x309 + ARPHRD_IPGRE = 0x30a + ARPHRD_IRDA = 0x30f + ARPHRD_LAPB = 0x204 + ARPHRD_LOCALTLK = 0x305 + ARPHRD_LOOPBACK = 0x304 + ARPHRD_METRICOM = 0x17 + ARPHRD_NETLINK = 0x338 + ARPHRD_NETROM = 0x0 + ARPHRD_NONE = 0xfffe + ARPHRD_PHONET = 0x334 + ARPHRD_PHONET_PIPE = 0x335 + ARPHRD_PIMREG = 0x30b + ARPHRD_PPP = 0x200 + ARPHRD_PRONET = 0x4 + ARPHRD_RAWHDLC = 0x206 + ARPHRD_ROSE = 0x10e + ARPHRD_RSRVD = 0x104 + ARPHRD_SIT = 0x308 + ARPHRD_SKIP = 0x303 + ARPHRD_SLIP = 0x100 + ARPHRD_SLIP6 = 0x102 + ARPHRD_TUNNEL = 0x300 + ARPHRD_TUNNEL6 = 0x301 + ARPHRD_VOID = 0xffff + ARPHRD_X25 = 0x10f + B0 = 0x0 + B1000000 = 0x1008 + B110 = 0x3 + B115200 = 0x1002 + B1152000 = 0x1009 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B1500000 = 0x100a + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B2000000 = 0x100b + B230400 = 0x1003 + B2400 = 0xb + B2500000 = 0x100c + B300 = 0x7 + B3000000 = 0x100d + B3500000 = 0x100e + B38400 = 0xf + B4000000 = 0x100f + B460800 = 0x1004 + B4800 = 0xc + B50 = 0x1 + B500000 = 0x1005 + B57600 = 0x1001 + B576000 = 0x1006 + B600 = 0x8 + B75 = 0x2 + B921600 = 0x1007 + B9600 = 0xd + BOTHER = 0x1000 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LL_OFF = -0x200000 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXINSNS = 0x1000 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MOD = 0x90 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_NET_OFF = -0x100000 + BPF_OR = 0x40 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BPF_XOR = 0xa0 + BRKINT = 0x2 + BS0 = 0x0 + BS1 = 0x2000 + BSDLY = 0x2000 + CBAUD = 0x100f + CBAUDEX = 0x1000 + CFLUSH = 0xf + CIBAUD = 0x100f0000 + CLOCAL = 0x800 + CLOCK_BOOTTIME = 0x7 + CLOCK_BOOTTIME_ALARM = 0x9 + CLOCK_DEFAULT = 0x0 + CLOCK_EXT = 0x1 + CLOCK_INT = 0x2 + CLOCK_MONOTONIC = 0x1 + CLOCK_MONOTONIC_COARSE = 0x6 + CLOCK_MONOTONIC_RAW = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x2 + CLOCK_REALTIME = 0x0 + CLOCK_REALTIME_ALARM = 0x8 + CLOCK_REALTIME_COARSE = 0x5 + CLOCK_TAI = 0xb + CLOCK_THREAD_CPUTIME_ID = 0x3 + CLOCK_TXFROMRX = 0x4 + CLOCK_TXINT = 0x3 + CLONE_CHILD_CLEARTID = 0x200000 + CLONE_CHILD_SETTID = 0x1000000 + CLONE_DETACHED = 0x400000 + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_IO = 0x80000000 + CLONE_NEWCGROUP = 0x2000000 + CLONE_NEWIPC = 0x8000000 + CLONE_NEWNET = 0x40000000 + CLONE_NEWNS = 0x20000 + CLONE_NEWPID = 0x20000000 + CLONE_NEWUSER = 0x10000000 + CLONE_NEWUTS = 0x4000000 + CLONE_PARENT = 0x8000 + CLONE_PARENT_SETTID = 0x100000 + CLONE_PTRACE = 0x2000 + CLONE_SETTLS = 0x80000 + CLONE_SIGHAND = 0x800 + CLONE_SYSVSEM = 0x40000 + CLONE_THREAD = 0x10000 + CLONE_UNTRACED = 0x800000 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CMSPAR = 0x40000000 + CR0 = 0x0 + CR1 = 0x200 + CR2 = 0x400 + CR3 = 0x600 + CRDLY = 0x600 + CREAD = 0x80 + CRTSCTS = 0x80000000 + CS5 = 0x0 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIGNAL = 0xff + CSIZE = 0x30 + CSTART = 0x11 + CSTATUS = 0x0 + CSTOP = 0x13 + CSTOPB = 0x40 + CSUSP = 0x1a + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + ENCODING_DEFAULT = 0x0 + ENCODING_FM_MARK = 0x3 + ENCODING_FM_SPACE = 0x4 + ENCODING_MANCHESTER = 0x5 + ENCODING_NRZ = 0x1 + ENCODING_NRZI = 0x2 + EPOLLERR = 0x8 + EPOLLET = 0x80000000 + EPOLLHUP = 0x10 + EPOLLIN = 0x1 + EPOLLMSG = 0x400 + EPOLLONESHOT = 0x40000000 + EPOLLOUT = 0x4 + EPOLLPRI = 0x2 + EPOLLRDBAND = 0x80 + EPOLLRDHUP = 0x2000 + EPOLLRDNORM = 0x40 + EPOLLWAKEUP = 0x20000000 + EPOLLWRBAND = 0x200 + EPOLLWRNORM = 0x100 + EPOLL_CLOEXEC = 0x80000 + EPOLL_CTL_ADD = 0x1 + EPOLL_CTL_DEL = 0x2 + EPOLL_CTL_MOD = 0x3 + ETH_P_1588 = 0x88f7 + ETH_P_8021AD = 0x88a8 + ETH_P_8021AH = 0x88e7 + ETH_P_8021Q = 0x8100 + ETH_P_80221 = 0x8917 + ETH_P_802_2 = 0x4 + ETH_P_802_3 = 0x1 + ETH_P_802_3_MIN = 0x600 + ETH_P_802_EX1 = 0x88b5 + ETH_P_AARP = 0x80f3 + ETH_P_AF_IUCV = 0xfbfb + ETH_P_ALL = 0x3 + ETH_P_AOE = 0x88a2 + ETH_P_ARCNET = 0x1a + ETH_P_ARP = 0x806 + ETH_P_ATALK = 0x809b + ETH_P_ATMFATE = 0x8884 + ETH_P_ATMMPOA = 0x884c + ETH_P_AX25 = 0x2 + ETH_P_BATMAN = 0x4305 + ETH_P_BPQ = 0x8ff + ETH_P_CAIF = 0xf7 + ETH_P_CAN = 0xc + ETH_P_CANFD = 0xd + ETH_P_CONTROL = 0x16 + ETH_P_CUST = 0x6006 + ETH_P_DDCMP = 0x6 + ETH_P_DEC = 0x6000 + ETH_P_DIAG = 0x6005 + ETH_P_DNA_DL = 0x6001 + ETH_P_DNA_RC = 0x6002 + ETH_P_DNA_RT = 0x6003 + ETH_P_DSA = 0x1b + ETH_P_ECONET = 0x18 + ETH_P_EDSA = 0xdada + ETH_P_FCOE = 0x8906 + ETH_P_FIP = 0x8914 + ETH_P_HDLC = 0x19 + ETH_P_IEEE802154 = 0xf6 + ETH_P_IEEEPUP = 0xa00 + ETH_P_IEEEPUPAT = 0xa01 + ETH_P_IP = 0x800 + ETH_P_IPV6 = 0x86dd + ETH_P_IPX = 0x8137 + ETH_P_IRDA = 0x17 + ETH_P_LAT = 0x6004 + ETH_P_LINK_CTL = 0x886c + ETH_P_LOCALTALK = 0x9 + ETH_P_LOOP = 0x60 + ETH_P_LOOPBACK = 0x9000 + ETH_P_MOBITEX = 0x15 + ETH_P_MPLS_MC = 0x8848 + ETH_P_MPLS_UC = 0x8847 + ETH_P_MVRP = 0x88f5 + ETH_P_PAE = 0x888e + ETH_P_PAUSE = 0x8808 + ETH_P_PHONET = 0xf5 + ETH_P_PPPTALK = 0x10 + ETH_P_PPP_DISC = 0x8863 + ETH_P_PPP_MP = 0x8 + ETH_P_PPP_SES = 0x8864 + ETH_P_PRP = 0x88fb + ETH_P_PUP = 0x200 + ETH_P_PUPAT = 0x201 + ETH_P_QINQ1 = 0x9100 + ETH_P_QINQ2 = 0x9200 + ETH_P_QINQ3 = 0x9300 + ETH_P_RARP = 0x8035 + ETH_P_SCA = 0x6007 + ETH_P_SLOW = 0x8809 + ETH_P_SNAP = 0x5 + ETH_P_TDLS = 0x890d + ETH_P_TEB = 0x6558 + ETH_P_TIPC = 0x88ca + ETH_P_TRAILER = 0x1c + ETH_P_TR_802_2 = 0x11 + ETH_P_TSN = 0x22f0 + ETH_P_WAN_PPP = 0x7 + ETH_P_WCCP = 0x883e + ETH_P_X25 = 0x805 + ETH_P_XDSA = 0xf8 + EXTA = 0xe + EXTB = 0xf + EXTPROC = 0x10000 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FF0 = 0x0 + FF1 = 0x8000 + FFDLY = 0x8000 + FLUSHO = 0x1000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x406 + F_EXLCK = 0x4 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLEASE = 0x401 + F_GETLK = 0x5 + F_GETLK64 = 0x5 + F_GETOWN = 0x9 + F_GETOWN_EX = 0x10 + F_GETPIPE_SZ = 0x408 + F_GETSIG = 0xb + F_LOCK = 0x1 + F_NOTIFY = 0x402 + F_OFD_GETLK = 0x24 + F_OFD_SETLK = 0x25 + F_OFD_SETLKW = 0x26 + F_OK = 0x0 + F_RDLCK = 0x0 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLEASE = 0x400 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETOWN = 0x8 + F_SETOWN_EX = 0xf + F_SETPIPE_SZ = 0x407 + F_SETSIG = 0xa + F_SHLCK = 0x8 + F_TEST = 0x3 + F_TLOCK = 0x2 + F_ULOCK = 0x0 + F_UNLCK = 0x2 + F_WRLCK = 0x1 + HUPCL = 0x400 + IBSHIFT = 0x10 + ICANON = 0x2 + ICMPV6_FILTER = 0x1 + ICRNL = 0x100 + IEXTEN = 0x8000 + IFA_F_DADFAILED = 0x8 + IFA_F_DEPRECATED = 0x20 + IFA_F_HOMEADDRESS = 0x10 + IFA_F_MANAGETEMPADDR = 0x100 + IFA_F_MCAUTOJOIN = 0x400 + IFA_F_NODAD = 0x2 + IFA_F_NOPREFIXROUTE = 0x200 + IFA_F_OPTIMISTIC = 0x4 + IFA_F_PERMANENT = 0x80 + IFA_F_SECONDARY = 0x1 + IFA_F_STABLE_PRIVACY = 0x800 + IFA_F_TEMPORARY = 0x1 + IFA_F_TENTATIVE = 0x40 + IFA_MAX = 0x8 + IFF_ALLMULTI = 0x200 + IFF_ATTACH_QUEUE = 0x200 + IFF_AUTOMEDIA = 0x4000 + IFF_BROADCAST = 0x2 + IFF_DEBUG = 0x4 + IFF_DETACH_QUEUE = 0x400 + IFF_DORMANT = 0x20000 + IFF_DYNAMIC = 0x8000 + IFF_ECHO = 0x40000 + IFF_LOOPBACK = 0x8 + IFF_LOWER_UP = 0x10000 + IFF_MASTER = 0x400 + IFF_MULTICAST = 0x1000 + IFF_MULTI_QUEUE = 0x100 + IFF_NOARP = 0x80 + IFF_NOFILTER = 0x1000 + IFF_NOTRAILERS = 0x20 + IFF_NO_PI = 0x1000 + IFF_ONE_QUEUE = 0x2000 + IFF_PERSIST = 0x800 + IFF_POINTOPOINT = 0x10 + IFF_PORTSEL = 0x2000 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SLAVE = 0x800 + IFF_TAP = 0x2 + IFF_TUN = 0x1 + IFF_TUN_EXCL = 0x8000 + IFF_UP = 0x1 + IFF_VNET_HDR = 0x4000 + IFF_VOLATILE = 0x70c5a + IFNAMSIZ = 0x10 + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_ACCESS = 0x1 + IN_ALL_EVENTS = 0xfff + IN_ATTRIB = 0x4 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLOEXEC = 0x80000 + IN_CLOSE = 0x18 + IN_CLOSE_NOWRITE = 0x10 + IN_CLOSE_WRITE = 0x8 + IN_CREATE = 0x100 + IN_DELETE = 0x200 + IN_DELETE_SELF = 0x400 + IN_DONT_FOLLOW = 0x2000000 + IN_EXCL_UNLINK = 0x4000000 + IN_IGNORED = 0x8000 + IN_ISDIR = 0x40000000 + IN_LOOPBACKNET = 0x7f + IN_MASK_ADD = 0x20000000 + IN_MODIFY = 0x2 + IN_MOVE = 0xc0 + IN_MOVED_FROM = 0x40 + IN_MOVED_TO = 0x80 + IN_MOVE_SELF = 0x800 + IN_NONBLOCK = 0x800 + IN_ONESHOT = 0x80000000 + IN_ONLYDIR = 0x1000000 + IN_OPEN = 0x20 + IN_Q_OVERFLOW = 0x4000 + IN_UNMOUNT = 0x2000 + IPPROTO_AH = 0x33 + IPPROTO_BEETPH = 0x5e + IPPROTO_COMP = 0x6c + IPPROTO_DCCP = 0x21 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPIP = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MH = 0x87 + IPPROTO_MPLS = 0x89 + IPPROTO_MTP = 0x5c + IPPROTO_NONE = 0x3b + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_UDPLITE = 0x88 + IPV6_2292DSTOPTS = 0x4 + IPV6_2292HOPLIMIT = 0x8 + IPV6_2292HOPOPTS = 0x3 + IPV6_2292PKTINFO = 0x2 + IPV6_2292PKTOPTIONS = 0x6 + IPV6_2292RTHDR = 0x5 + IPV6_ADDRFORM = 0x1 + IPV6_ADD_MEMBERSHIP = 0x14 + IPV6_AUTHHDR = 0xa + IPV6_CHECKSUM = 0x7 + IPV6_DONTFRAG = 0x3e + IPV6_DROP_MEMBERSHIP = 0x15 + IPV6_DSTOPTS = 0x3b + IPV6_HOPLIMIT = 0x34 + IPV6_HOPOPTS = 0x36 + IPV6_IPSEC_POLICY = 0x22 + IPV6_JOIN_ANYCAST = 0x1b + IPV6_JOIN_GROUP = 0x14 + IPV6_LEAVE_ANYCAST = 0x1c + IPV6_LEAVE_GROUP = 0x15 + IPV6_MTU = 0x18 + IPV6_MTU_DISCOVER = 0x17 + IPV6_MULTICAST_HOPS = 0x12 + IPV6_MULTICAST_IF = 0x11 + IPV6_MULTICAST_LOOP = 0x13 + IPV6_NEXTHOP = 0x9 + IPV6_PATHMTU = 0x3d + IPV6_PKTINFO = 0x32 + IPV6_PMTUDISC_DO = 0x2 + IPV6_PMTUDISC_DONT = 0x0 + IPV6_PMTUDISC_INTERFACE = 0x4 + IPV6_PMTUDISC_OMIT = 0x5 + IPV6_PMTUDISC_PROBE = 0x3 + IPV6_PMTUDISC_WANT = 0x1 + IPV6_RECVDSTOPTS = 0x3a + IPV6_RECVERR = 0x19 + IPV6_RECVHOPLIMIT = 0x33 + IPV6_RECVHOPOPTS = 0x35 + IPV6_RECVPATHMTU = 0x3c + IPV6_RECVPKTINFO = 0x31 + IPV6_RECVRTHDR = 0x38 + IPV6_RECVTCLASS = 0x42 + IPV6_ROUTER_ALERT = 0x16 + IPV6_RTHDR = 0x39 + IPV6_RTHDRDSTOPTS = 0x37 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_RXDSTOPTS = 0x3b + IPV6_RXHOPOPTS = 0x36 + IPV6_TCLASS = 0x43 + IPV6_UNICAST_HOPS = 0x10 + IPV6_V6ONLY = 0x1a + IPV6_XFRM_POLICY = 0x23 + IP_ADD_MEMBERSHIP = 0x23 + IP_ADD_SOURCE_MEMBERSHIP = 0x27 + IP_BIND_ADDRESS_NO_PORT = 0x18 + IP_BLOCK_SOURCE = 0x26 + IP_CHECKSUM = 0x17 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0x24 + IP_DROP_SOURCE_MEMBERSHIP = 0x28 + IP_FREEBIND = 0xf + IP_HDRINCL = 0x3 + IP_IPSEC_POLICY = 0x10 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINTTL = 0x15 + IP_MSFILTER = 0x29 + IP_MSS = 0x240 + IP_MTU = 0xe + IP_MTU_DISCOVER = 0xa + IP_MULTICAST_ALL = 0x31 + IP_MULTICAST_IF = 0x20 + IP_MULTICAST_LOOP = 0x22 + IP_MULTICAST_TTL = 0x21 + IP_NODEFRAG = 0x16 + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x4 + IP_ORIGDSTADDR = 0x14 + IP_PASSSEC = 0x12 + IP_PKTINFO = 0x8 + IP_PKTOPTIONS = 0x9 + IP_PMTUDISC = 0xa + IP_PMTUDISC_DO = 0x2 + IP_PMTUDISC_DONT = 0x0 + IP_PMTUDISC_INTERFACE = 0x4 + IP_PMTUDISC_OMIT = 0x5 + IP_PMTUDISC_PROBE = 0x3 + IP_PMTUDISC_WANT = 0x1 + IP_RECVERR = 0xb + IP_RECVOPTS = 0x6 + IP_RECVORIGDSTADDR = 0x14 + IP_RECVRETOPTS = 0x7 + IP_RECVTOS = 0xd + IP_RECVTTL = 0xc + IP_RETOPTS = 0x7 + IP_RF = 0x8000 + IP_ROUTER_ALERT = 0x5 + IP_TOS = 0x1 + IP_TRANSPARENT = 0x13 + IP_TTL = 0x2 + IP_UNBLOCK_SOURCE = 0x25 + IP_UNICAST_IF = 0x32 + IP_XFRM_POLICY = 0x11 + ISIG = 0x1 + ISTRIP = 0x20 + IUCLC = 0x200 + IUTF8 = 0x4000 + IXANY = 0x800 + IXOFF = 0x1000 + IXON = 0x400 + LINUX_REBOOT_CMD_CAD_OFF = 0x0 + LINUX_REBOOT_CMD_CAD_ON = 0x89abcdef + LINUX_REBOOT_CMD_HALT = 0xcdef0123 + LINUX_REBOOT_CMD_KEXEC = 0x45584543 + LINUX_REBOOT_CMD_POWER_OFF = 0x4321fedc + LINUX_REBOOT_CMD_RESTART = 0x1234567 + LINUX_REBOOT_CMD_RESTART2 = 0xa1b2c3d4 + LINUX_REBOOT_CMD_SW_SUSPEND = 0xd000fce2 + LINUX_REBOOT_MAGIC1 = 0xfee1dead + LINUX_REBOOT_MAGIC2 = 0x28121969 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DODUMP = 0x11 + MADV_DOFORK = 0xb + MADV_DONTDUMP = 0x10 + MADV_DONTFORK = 0xa + MADV_DONTNEED = 0x4 + MADV_HUGEPAGE = 0xe + MADV_HWPOISON = 0x64 + MADV_MERGEABLE = 0xc + MADV_NOHUGEPAGE = 0xf + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_REMOVE = 0x9 + MADV_SEQUENTIAL = 0x2 + MADV_UNMERGEABLE = 0xd + MADV_WILLNEED = 0x3 + MAP_ANON = 0x20 + MAP_ANONYMOUS = 0x20 + MAP_DENYWRITE = 0x800 + MAP_EXECUTABLE = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_GROWSDOWN = 0x100 + MAP_HUGETLB = 0x40000 + MAP_HUGE_MASK = 0x3f + MAP_HUGE_SHIFT = 0x1a + MAP_LOCKED = 0x2000 + MAP_NONBLOCK = 0x10000 + MAP_NORESERVE = 0x4000 + MAP_POPULATE = 0x8000 + MAP_PRIVATE = 0x2 + MAP_SHARED = 0x1 + MAP_STACK = 0x20000 + MAP_TYPE = 0xf + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MCL_ONFAULT = 0x4 + MNT_DETACH = 0x2 + MNT_EXPIRE = 0x4 + MNT_FORCE = 0x1 + MSG_CMSG_CLOEXEC = 0x40000000 + MSG_CONFIRM = 0x800 + MSG_CTRUNC = 0x8 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x40 + MSG_EOR = 0x80 + MSG_ERRQUEUE = 0x2000 + MSG_FASTOPEN = 0x20000000 + MSG_FIN = 0x200 + MSG_MORE = 0x8000 + MSG_NOSIGNAL = 0x4000 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_PROXY = 0x10 + MSG_RST = 0x1000 + MSG_SYN = 0x400 + MSG_TRUNC = 0x20 + MSG_TRYHARD = 0x4 + MSG_WAITALL = 0x100 + MSG_WAITFORONE = 0x10000 + MS_ACTIVE = 0x40000000 + MS_ASYNC = 0x1 + MS_BIND = 0x1000 + MS_DIRSYNC = 0x80 + MS_INVALIDATE = 0x2 + MS_I_VERSION = 0x800000 + MS_KERNMOUNT = 0x400000 + MS_LAZYTIME = 0x2000000 + MS_MANDLOCK = 0x40 + MS_MGC_MSK = 0xffff0000 + MS_MGC_VAL = 0xc0ed0000 + MS_MOVE = 0x2000 + MS_NOATIME = 0x400 + MS_NODEV = 0x4 + MS_NODIRATIME = 0x800 + MS_NOEXEC = 0x8 + MS_NOSUID = 0x2 + MS_NOUSER = -0x80000000 + MS_POSIXACL = 0x10000 + MS_PRIVATE = 0x40000 + MS_RDONLY = 0x1 + MS_REC = 0x4000 + MS_RELATIME = 0x200000 + MS_REMOUNT = 0x20 + MS_RMT_MASK = 0x2800051 + MS_SHARED = 0x100000 + MS_SILENT = 0x8000 + MS_SLAVE = 0x80000 + MS_STRICTATIME = 0x1000000 + MS_SYNC = 0x4 + MS_SYNCHRONOUS = 0x10 + MS_UNBINDABLE = 0x20000 + NAME_MAX = 0xff + NETLINK_ADD_MEMBERSHIP = 0x1 + NETLINK_AUDIT = 0x9 + NETLINK_BROADCAST_ERROR = 0x4 + NETLINK_CAP_ACK = 0xa + NETLINK_CONNECTOR = 0xb + NETLINK_CRYPTO = 0x15 + NETLINK_DNRTMSG = 0xe + NETLINK_DROP_MEMBERSHIP = 0x2 + NETLINK_ECRYPTFS = 0x13 + NETLINK_FIB_LOOKUP = 0xa + NETLINK_FIREWALL = 0x3 + NETLINK_GENERIC = 0x10 + NETLINK_INET_DIAG = 0x4 + NETLINK_IP6_FW = 0xd + NETLINK_ISCSI = 0x8 + NETLINK_KOBJECT_UEVENT = 0xf + NETLINK_LISTEN_ALL_NSID = 0x8 + NETLINK_LIST_MEMBERSHIPS = 0x9 + NETLINK_NETFILTER = 0xc + NETLINK_NFLOG = 0x5 + NETLINK_NO_ENOBUFS = 0x5 + NETLINK_PKTINFO = 0x3 + NETLINK_RDMA = 0x14 + NETLINK_ROUTE = 0x0 + NETLINK_RX_RING = 0x6 + NETLINK_SCSITRANSPORT = 0x12 + NETLINK_SELINUX = 0x7 + NETLINK_SOCK_DIAG = 0x4 + NETLINK_TX_RING = 0x7 + NETLINK_UNUSED = 0x1 + NETLINK_USERSOCK = 0x2 + NETLINK_XFRM = 0x6 + NL0 = 0x0 + NL1 = 0x100 + NLA_ALIGNTO = 0x4 + NLA_F_NESTED = 0x8000 + NLA_F_NET_BYTEORDER = 0x4000 + NLA_HDRLEN = 0x4 + NLDLY = 0x100 + NLMSG_ALIGNTO = 0x4 + NLMSG_DONE = 0x3 + NLMSG_ERROR = 0x2 + NLMSG_HDRLEN = 0x10 + NLMSG_MIN_TYPE = 0x10 + NLMSG_NOOP = 0x1 + NLMSG_OVERRUN = 0x4 + NLM_F_ACK = 0x4 + NLM_F_APPEND = 0x800 + NLM_F_ATOMIC = 0x400 + NLM_F_CREATE = 0x400 + NLM_F_DUMP = 0x300 + NLM_F_DUMP_FILTERED = 0x20 + NLM_F_DUMP_INTR = 0x10 + NLM_F_ECHO = 0x8 + NLM_F_EXCL = 0x200 + NLM_F_MATCH = 0x200 + NLM_F_MULTI = 0x2 + NLM_F_REPLACE = 0x100 + NLM_F_REQUEST = 0x1 + NLM_F_ROOT = 0x100 + NOFLSH = 0x80 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + OLCUC = 0x2 + ONLCR = 0x4 + ONLRET = 0x20 + ONOCR = 0x10 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x400 + O_ASYNC = 0x2000 + O_CLOEXEC = 0x80000 + O_CREAT = 0x40 + O_DIRECT = 0x4000 + O_DIRECTORY = 0x10000 + O_DSYNC = 0x1000 + O_EXCL = 0x80 + O_FSYNC = 0x101000 + O_LARGEFILE = 0x0 + O_NDELAY = 0x800 + O_NOATIME = 0x40000 + O_NOCTTY = 0x100 + O_NOFOLLOW = 0x20000 + O_NONBLOCK = 0x800 + O_PATH = 0x200000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x101000 + O_SYNC = 0x101000 + O_TMPFILE = 0x410000 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + PACKET_ADD_MEMBERSHIP = 0x1 + PACKET_AUXDATA = 0x8 + PACKET_BROADCAST = 0x1 + PACKET_COPY_THRESH = 0x7 + PACKET_DROP_MEMBERSHIP = 0x2 + PACKET_FANOUT = 0x12 + PACKET_FANOUT_CBPF = 0x6 + PACKET_FANOUT_CPU = 0x2 + PACKET_FANOUT_DATA = 0x16 + PACKET_FANOUT_EBPF = 0x7 + PACKET_FANOUT_FLAG_DEFRAG = 0x8000 + PACKET_FANOUT_FLAG_ROLLOVER = 0x1000 + PACKET_FANOUT_HASH = 0x0 + PACKET_FANOUT_LB = 0x1 + PACKET_FANOUT_QM = 0x5 + PACKET_FANOUT_RND = 0x4 + PACKET_FANOUT_ROLLOVER = 0x3 + PACKET_FASTROUTE = 0x6 + PACKET_HDRLEN = 0xb + PACKET_HOST = 0x0 + PACKET_KERNEL = 0x7 + PACKET_LOOPBACK = 0x5 + PACKET_LOSS = 0xe + PACKET_MR_ALLMULTI = 0x2 + PACKET_MR_MULTICAST = 0x0 + PACKET_MR_PROMISC = 0x1 + PACKET_MR_UNICAST = 0x3 + PACKET_MULTICAST = 0x2 + PACKET_ORIGDEV = 0x9 + PACKET_OTHERHOST = 0x3 + PACKET_OUTGOING = 0x4 + PACKET_QDISC_BYPASS = 0x14 + PACKET_RECV_OUTPUT = 0x3 + PACKET_RESERVE = 0xc + PACKET_ROLLOVER_STATS = 0x15 + PACKET_RX_RING = 0x5 + PACKET_STATISTICS = 0x6 + PACKET_TIMESTAMP = 0x11 + PACKET_TX_HAS_OFF = 0x13 + PACKET_TX_RING = 0xd + PACKET_TX_TIMESTAMP = 0x10 + PACKET_USER = 0x6 + PACKET_VERSION = 0xa + PACKET_VNET_HDR = 0xf + PARENB = 0x100 + PARITY_CRC16_PR0 = 0x2 + PARITY_CRC16_PR0_CCITT = 0x4 + PARITY_CRC16_PR1 = 0x3 + PARITY_CRC16_PR1_CCITT = 0x5 + PARITY_CRC32_PR0_CCITT = 0x6 + PARITY_CRC32_PR1_CCITT = 0x7 + PARITY_DEFAULT = 0x0 + PARITY_NONE = 0x1 + PARMRK = 0x8 + PARODD = 0x200 + PENDIN = 0x4000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_GROWSDOWN = 0x1000000 + PROT_GROWSUP = 0x2000000 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PR_CAPBSET_DROP = 0x18 + PR_CAPBSET_READ = 0x17 + PR_CAP_AMBIENT = 0x2f + PR_CAP_AMBIENT_CLEAR_ALL = 0x4 + PR_CAP_AMBIENT_IS_SET = 0x1 + PR_CAP_AMBIENT_LOWER = 0x3 + PR_CAP_AMBIENT_RAISE = 0x2 + PR_ENDIAN_BIG = 0x0 + PR_ENDIAN_LITTLE = 0x1 + PR_ENDIAN_PPC_LITTLE = 0x2 + PR_FPEMU_NOPRINT = 0x1 + PR_FPEMU_SIGFPE = 0x2 + PR_FP_EXC_ASYNC = 0x2 + PR_FP_EXC_DISABLED = 0x0 + PR_FP_EXC_DIV = 0x10000 + PR_FP_EXC_INV = 0x100000 + PR_FP_EXC_NONRECOV = 0x1 + PR_FP_EXC_OVF = 0x20000 + PR_FP_EXC_PRECISE = 0x3 + PR_FP_EXC_RES = 0x80000 + PR_FP_EXC_SW_ENABLE = 0x80 + PR_FP_EXC_UND = 0x40000 + PR_FP_MODE_FR = 0x1 + PR_FP_MODE_FRE = 0x2 + PR_GET_CHILD_SUBREAPER = 0x25 + PR_GET_DUMPABLE = 0x3 + PR_GET_ENDIAN = 0x13 + PR_GET_FPEMU = 0x9 + PR_GET_FPEXC = 0xb + PR_GET_FP_MODE = 0x2e + PR_GET_KEEPCAPS = 0x7 + PR_GET_NAME = 0x10 + PR_GET_NO_NEW_PRIVS = 0x27 + PR_GET_PDEATHSIG = 0x2 + PR_GET_SECCOMP = 0x15 + PR_GET_SECUREBITS = 0x1b + PR_GET_THP_DISABLE = 0x2a + PR_GET_TID_ADDRESS = 0x28 + PR_GET_TIMERSLACK = 0x1e + PR_GET_TIMING = 0xd + PR_GET_TSC = 0x19 + PR_GET_UNALIGN = 0x5 + PR_MCE_KILL = 0x21 + PR_MCE_KILL_CLEAR = 0x0 + PR_MCE_KILL_DEFAULT = 0x2 + PR_MCE_KILL_EARLY = 0x1 + PR_MCE_KILL_GET = 0x22 + PR_MCE_KILL_LATE = 0x0 + PR_MCE_KILL_SET = 0x1 + PR_MPX_DISABLE_MANAGEMENT = 0x2c + PR_MPX_ENABLE_MANAGEMENT = 0x2b + PR_SET_CHILD_SUBREAPER = 0x24 + PR_SET_DUMPABLE = 0x4 + PR_SET_ENDIAN = 0x14 + PR_SET_FPEMU = 0xa + PR_SET_FPEXC = 0xc + PR_SET_FP_MODE = 0x2d + PR_SET_KEEPCAPS = 0x8 + PR_SET_MM = 0x23 + PR_SET_MM_ARG_END = 0x9 + PR_SET_MM_ARG_START = 0x8 + PR_SET_MM_AUXV = 0xc + PR_SET_MM_BRK = 0x7 + PR_SET_MM_END_CODE = 0x2 + PR_SET_MM_END_DATA = 0x4 + PR_SET_MM_ENV_END = 0xb + PR_SET_MM_ENV_START = 0xa + PR_SET_MM_EXE_FILE = 0xd + PR_SET_MM_MAP = 0xe + PR_SET_MM_MAP_SIZE = 0xf + PR_SET_MM_START_BRK = 0x6 + PR_SET_MM_START_CODE = 0x1 + PR_SET_MM_START_DATA = 0x3 + PR_SET_MM_START_STACK = 0x5 + PR_SET_NAME = 0xf + PR_SET_NO_NEW_PRIVS = 0x26 + PR_SET_PDEATHSIG = 0x1 + PR_SET_PTRACER = 0x59616d61 + PR_SET_PTRACER_ANY = -0x1 + PR_SET_SECCOMP = 0x16 + PR_SET_SECUREBITS = 0x1c + PR_SET_THP_DISABLE = 0x29 + PR_SET_TIMERSLACK = 0x1d + PR_SET_TIMING = 0xe + PR_SET_TSC = 0x1a + PR_SET_UNALIGN = 0x6 + PR_TASK_PERF_EVENTS_DISABLE = 0x1f + PR_TASK_PERF_EVENTS_ENABLE = 0x20 + PR_TIMING_STATISTICAL = 0x0 + PR_TIMING_TIMESTAMP = 0x1 + PR_TSC_ENABLE = 0x1 + PR_TSC_SIGSEGV = 0x2 + PR_UNALIGN_NOPRINT = 0x1 + PR_UNALIGN_SIGBUS = 0x2 + PTRACE_ATTACH = 0x10 + PTRACE_CONT = 0x7 + PTRACE_DETACH = 0x11 + PTRACE_DISABLE_TE = 0x5010 + PTRACE_ENABLE_TE = 0x5009 + PTRACE_EVENT_CLONE = 0x3 + PTRACE_EVENT_EXEC = 0x4 + PTRACE_EVENT_EXIT = 0x6 + PTRACE_EVENT_FORK = 0x1 + PTRACE_EVENT_SECCOMP = 0x7 + PTRACE_EVENT_STOP = 0x80 + PTRACE_EVENT_VFORK = 0x2 + PTRACE_EVENT_VFORK_DONE = 0x5 + PTRACE_GETEVENTMSG = 0x4201 + PTRACE_GETREGS = 0xc + PTRACE_GETREGSET = 0x4204 + PTRACE_GETSIGINFO = 0x4202 + PTRACE_GETSIGMASK = 0x420a + PTRACE_GET_LAST_BREAK = 0x5006 + PTRACE_INTERRUPT = 0x4207 + PTRACE_KILL = 0x8 + PTRACE_LISTEN = 0x4208 + PTRACE_OLDSETOPTIONS = 0x15 + PTRACE_O_EXITKILL = 0x100000 + PTRACE_O_MASK = 0x3000ff + PTRACE_O_SUSPEND_SECCOMP = 0x200000 + PTRACE_O_TRACECLONE = 0x8 + PTRACE_O_TRACEEXEC = 0x10 + PTRACE_O_TRACEEXIT = 0x40 + PTRACE_O_TRACEFORK = 0x2 + PTRACE_O_TRACESECCOMP = 0x80 + PTRACE_O_TRACESYSGOOD = 0x1 + PTRACE_O_TRACEVFORK = 0x4 + PTRACE_O_TRACEVFORKDONE = 0x20 + PTRACE_PEEKDATA = 0x2 + PTRACE_PEEKDATA_AREA = 0x5003 + PTRACE_PEEKSIGINFO = 0x4209 + PTRACE_PEEKSIGINFO_SHARED = 0x1 + PTRACE_PEEKTEXT = 0x1 + PTRACE_PEEKTEXT_AREA = 0x5002 + PTRACE_PEEKUSR = 0x3 + PTRACE_PEEKUSR_AREA = 0x5000 + PTRACE_PEEK_SYSTEM_CALL = 0x5007 + PTRACE_POKEDATA = 0x5 + PTRACE_POKEDATA_AREA = 0x5005 + PTRACE_POKETEXT = 0x4 + PTRACE_POKETEXT_AREA = 0x5004 + PTRACE_POKEUSR = 0x6 + PTRACE_POKEUSR_AREA = 0x5001 + PTRACE_POKE_SYSTEM_CALL = 0x5008 + PTRACE_PROT = 0x15 + PTRACE_SECCOMP_GET_FILTER = 0x420c + PTRACE_SEIZE = 0x4206 + PTRACE_SETOPTIONS = 0x4200 + PTRACE_SETREGS = 0xd + PTRACE_SETREGSET = 0x4205 + PTRACE_SETSIGINFO = 0x4203 + PTRACE_SETSIGMASK = 0x420b + PTRACE_SINGLEBLOCK = 0xc + PTRACE_SINGLESTEP = 0x9 + PTRACE_SYSCALL = 0x18 + PTRACE_TE_ABORT_RAND = 0x5011 + PTRACE_TRACEME = 0x0 + PT_ACR0 = 0x90 + PT_ACR1 = 0x94 + PT_ACR10 = 0xb8 + PT_ACR11 = 0xbc + PT_ACR12 = 0xc0 + PT_ACR13 = 0xc4 + PT_ACR14 = 0xc8 + PT_ACR15 = 0xcc + PT_ACR2 = 0x98 + PT_ACR3 = 0x9c + PT_ACR4 = 0xa0 + PT_ACR5 = 0xa4 + PT_ACR6 = 0xa8 + PT_ACR7 = 0xac + PT_ACR8 = 0xb0 + PT_ACR9 = 0xb4 + PT_CR_10 = 0x168 + PT_CR_11 = 0x170 + PT_CR_9 = 0x160 + PT_ENDREGS = 0x1af + PT_FPC = 0xd8 + PT_FPR0 = 0xe0 + PT_FPR1 = 0xe8 + PT_FPR10 = 0x130 + PT_FPR11 = 0x138 + PT_FPR12 = 0x140 + PT_FPR13 = 0x148 + PT_FPR14 = 0x150 + PT_FPR15 = 0x158 + PT_FPR2 = 0xf0 + PT_FPR3 = 0xf8 + PT_FPR4 = 0x100 + PT_FPR5 = 0x108 + PT_FPR6 = 0x110 + PT_FPR7 = 0x118 + PT_FPR8 = 0x120 + PT_FPR9 = 0x128 + PT_GPR0 = 0x10 + PT_GPR1 = 0x18 + PT_GPR10 = 0x60 + PT_GPR11 = 0x68 + PT_GPR12 = 0x70 + PT_GPR13 = 0x78 + PT_GPR14 = 0x80 + PT_GPR15 = 0x88 + PT_GPR2 = 0x20 + PT_GPR3 = 0x28 + PT_GPR4 = 0x30 + PT_GPR5 = 0x38 + PT_GPR6 = 0x40 + PT_GPR7 = 0x48 + PT_GPR8 = 0x50 + PT_GPR9 = 0x58 + PT_IEEE_IP = 0x1a8 + PT_LASTOFF = 0x1a8 + PT_ORIGGPR2 = 0xd0 + PT_PSWADDR = 0x8 + PT_PSWMASK = 0x0 + RLIMIT_AS = 0x9 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x7 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x1 + RTAX_ADVMSS = 0x8 + RTAX_CC_ALGO = 0x10 + RTAX_CWND = 0x7 + RTAX_FEATURES = 0xc + RTAX_FEATURE_ALLFRAG = 0x8 + RTAX_FEATURE_ECN = 0x1 + RTAX_FEATURE_MASK = 0xf + RTAX_FEATURE_SACK = 0x2 + RTAX_FEATURE_TIMESTAMP = 0x4 + RTAX_HOPLIMIT = 0xa + RTAX_INITCWND = 0xb + RTAX_INITRWND = 0xe + RTAX_LOCK = 0x1 + RTAX_MAX = 0x10 + RTAX_MTU = 0x2 + RTAX_QUICKACK = 0xf + RTAX_REORDERING = 0x9 + RTAX_RTO_MIN = 0xd + RTAX_RTT = 0x4 + RTAX_RTTVAR = 0x5 + RTAX_SSTHRESH = 0x6 + RTAX_UNSPEC = 0x0 + RTAX_WINDOW = 0x3 + RTA_ALIGNTO = 0x4 + RTA_MAX = 0x16 + RTCF_DIRECTSRC = 0x4000000 + RTCF_DOREDIRECT = 0x1000000 + RTCF_LOG = 0x2000000 + RTCF_MASQ = 0x400000 + RTCF_NAT = 0x800000 + RTCF_VALVE = 0x200000 + RTF_ADDRCLASSMASK = 0xf8000000 + RTF_ADDRCONF = 0x40000 + RTF_ALLONLINK = 0x20000 + RTF_BROADCAST = 0x10000000 + RTF_CACHE = 0x1000000 + RTF_DEFAULT = 0x10000 + RTF_DYNAMIC = 0x10 + RTF_FLOW = 0x2000000 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INTERFACE = 0x40000000 + RTF_IRTT = 0x100 + RTF_LINKRT = 0x100000 + RTF_LOCAL = 0x80000000 + RTF_MODIFIED = 0x20 + RTF_MSS = 0x40 + RTF_MTU = 0x40 + RTF_MULTICAST = 0x20000000 + RTF_NAT = 0x8000000 + RTF_NOFORWARD = 0x1000 + RTF_NONEXTHOP = 0x200000 + RTF_NOPMTUDISC = 0x4000 + RTF_POLICY = 0x4000000 + RTF_REINSTATE = 0x8 + RTF_REJECT = 0x200 + RTF_STATIC = 0x400 + RTF_THROW = 0x2000 + RTF_UP = 0x1 + RTF_WINDOW = 0x80 + RTF_XRESOLVE = 0x800 + RTM_BASE = 0x10 + RTM_DELACTION = 0x31 + RTM_DELADDR = 0x15 + RTM_DELADDRLABEL = 0x49 + RTM_DELLINK = 0x11 + RTM_DELMDB = 0x55 + RTM_DELNEIGH = 0x1d + RTM_DELNSID = 0x59 + RTM_DELQDISC = 0x25 + RTM_DELROUTE = 0x19 + RTM_DELRULE = 0x21 + RTM_DELTCLASS = 0x29 + RTM_DELTFILTER = 0x2d + RTM_F_CLONED = 0x200 + RTM_F_EQUALIZE = 0x400 + RTM_F_LOOKUP_TABLE = 0x1000 + RTM_F_NOTIFY = 0x100 + RTM_F_PREFIX = 0x800 + RTM_GETACTION = 0x32 + RTM_GETADDR = 0x16 + RTM_GETADDRLABEL = 0x4a + RTM_GETANYCAST = 0x3e + RTM_GETDCB = 0x4e + RTM_GETLINK = 0x12 + RTM_GETMDB = 0x56 + RTM_GETMULTICAST = 0x3a + RTM_GETNEIGH = 0x1e + RTM_GETNEIGHTBL = 0x42 + RTM_GETNETCONF = 0x52 + RTM_GETNSID = 0x5a + RTM_GETQDISC = 0x26 + RTM_GETROUTE = 0x1a + RTM_GETRULE = 0x22 + RTM_GETTCLASS = 0x2a + RTM_GETTFILTER = 0x2e + RTM_MAX = 0x5b + RTM_NEWACTION = 0x30 + RTM_NEWADDR = 0x14 + RTM_NEWADDRLABEL = 0x48 + RTM_NEWLINK = 0x10 + RTM_NEWMDB = 0x54 + RTM_NEWNDUSEROPT = 0x44 + RTM_NEWNEIGH = 0x1c + RTM_NEWNEIGHTBL = 0x40 + RTM_NEWNETCONF = 0x50 + RTM_NEWNSID = 0x58 + RTM_NEWPREFIX = 0x34 + RTM_NEWQDISC = 0x24 + RTM_NEWROUTE = 0x18 + RTM_NEWRULE = 0x20 + RTM_NEWTCLASS = 0x28 + RTM_NEWTFILTER = 0x2c + RTM_NR_FAMILIES = 0x13 + RTM_NR_MSGTYPES = 0x4c + RTM_SETDCB = 0x4f + RTM_SETLINK = 0x13 + RTM_SETNEIGHTBL = 0x43 + RTNH_ALIGNTO = 0x4 + RTNH_COMPARE_MASK = 0x11 + RTNH_F_DEAD = 0x1 + RTNH_F_LINKDOWN = 0x10 + RTNH_F_OFFLOAD = 0x8 + RTNH_F_ONLINK = 0x4 + RTNH_F_PERVASIVE = 0x2 + RTN_MAX = 0xb + RTPROT_BABEL = 0x2a + RTPROT_BIRD = 0xc + RTPROT_BOOT = 0x3 + RTPROT_DHCP = 0x10 + RTPROT_DNROUTED = 0xd + RTPROT_GATED = 0x8 + RTPROT_KERNEL = 0x2 + RTPROT_MROUTED = 0x11 + RTPROT_MRT = 0xa + RTPROT_NTK = 0xf + RTPROT_RA = 0x9 + RTPROT_REDIRECT = 0x1 + RTPROT_STATIC = 0x4 + RTPROT_UNSPEC = 0x0 + RTPROT_XORP = 0xe + RTPROT_ZEBRA = 0xb + RT_CLASS_DEFAULT = 0xfd + RT_CLASS_LOCAL = 0xff + RT_CLASS_MAIN = 0xfe + RT_CLASS_MAX = 0xff + RT_CLASS_UNSPEC = 0x0 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_CREDENTIALS = 0x2 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x1d + SCM_TIMESTAMPING = 0x25 + SCM_TIMESTAMPNS = 0x23 + SCM_WIFI_STATUS = 0x29 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDDLCI = 0x8980 + SIOCADDMULTI = 0x8931 + SIOCADDRT = 0x890b + SIOCATMARK = 0x8905 + SIOCDARP = 0x8953 + SIOCDELDLCI = 0x8981 + SIOCDELMULTI = 0x8932 + SIOCDELRT = 0x890c + SIOCDEVPRIVATE = 0x89f0 + SIOCDIFADDR = 0x8936 + SIOCDRARP = 0x8960 + SIOCGARP = 0x8954 + SIOCGIFADDR = 0x8915 + SIOCGIFBR = 0x8940 + SIOCGIFBRDADDR = 0x8919 + SIOCGIFCONF = 0x8912 + SIOCGIFCOUNT = 0x8938 + SIOCGIFDSTADDR = 0x8917 + SIOCGIFENCAP = 0x8925 + SIOCGIFFLAGS = 0x8913 + SIOCGIFHWADDR = 0x8927 + SIOCGIFINDEX = 0x8933 + SIOCGIFMAP = 0x8970 + SIOCGIFMEM = 0x891f + SIOCGIFMETRIC = 0x891d + SIOCGIFMTU = 0x8921 + SIOCGIFNAME = 0x8910 + SIOCGIFNETMASK = 0x891b + SIOCGIFPFLAGS = 0x8935 + SIOCGIFSLAVE = 0x8929 + SIOCGIFTXQLEN = 0x8942 + SIOCGPGRP = 0x8904 + SIOCGRARP = 0x8961 + SIOCGSTAMP = 0x8906 + SIOCGSTAMPNS = 0x8907 + SIOCPROTOPRIVATE = 0x89e0 + SIOCRTMSG = 0x890d + SIOCSARP = 0x8955 + SIOCSIFADDR = 0x8916 + SIOCSIFBR = 0x8941 + SIOCSIFBRDADDR = 0x891a + SIOCSIFDSTADDR = 0x8918 + SIOCSIFENCAP = 0x8926 + SIOCSIFFLAGS = 0x8914 + SIOCSIFHWADDR = 0x8924 + SIOCSIFHWBROADCAST = 0x8937 + SIOCSIFLINK = 0x8911 + SIOCSIFMAP = 0x8971 + SIOCSIFMEM = 0x8920 + SIOCSIFMETRIC = 0x891e + SIOCSIFMTU = 0x8922 + SIOCSIFNAME = 0x8923 + SIOCSIFNETMASK = 0x891c + SIOCSIFPFLAGS = 0x8934 + SIOCSIFSLAVE = 0x8930 + SIOCSIFTXQLEN = 0x8943 + SIOCSPGRP = 0x8902 + SIOCSRARP = 0x8962 + SOCK_CLOEXEC = 0x80000 + SOCK_DCCP = 0x6 + SOCK_DGRAM = 0x2 + SOCK_NONBLOCK = 0x800 + SOCK_PACKET = 0xa + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_AAL = 0x109 + SOL_ATM = 0x108 + SOL_DECNET = 0x105 + SOL_ICMPV6 = 0x3a + SOL_IP = 0x0 + SOL_IPV6 = 0x29 + SOL_IRDA = 0x10a + SOL_PACKET = 0x107 + SOL_RAW = 0xff + SOL_SOCKET = 0x1 + SOL_TCP = 0x6 + SOL_X25 = 0x106 + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x1e + SO_ATTACH_BPF = 0x32 + SO_ATTACH_FILTER = 0x1a + SO_BINDTODEVICE = 0x19 + SO_BPF_EXTENSIONS = 0x30 + SO_BROADCAST = 0x6 + SO_BSDCOMPAT = 0xe + SO_BUSY_POLL = 0x2e + SO_DEBUG = 0x1 + SO_DETACH_BPF = 0x1b + SO_DETACH_FILTER = 0x1b + SO_DOMAIN = 0x27 + SO_DONTROUTE = 0x5 + SO_ERROR = 0x4 + SO_GET_FILTER = 0x1a + SO_INCOMING_CPU = 0x31 + SO_KEEPALIVE = 0x9 + SO_LINGER = 0xd + SO_LOCK_FILTER = 0x2c + SO_MARK = 0x24 + SO_MAX_PACING_RATE = 0x2f + SO_NOFCS = 0x2b + SO_NO_CHECK = 0xb + SO_OOBINLINE = 0xa + SO_PASSCRED = 0x10 + SO_PASSSEC = 0x22 + SO_PEEK_OFF = 0x2a + SO_PEERCRED = 0x11 + SO_PEERNAME = 0x1c + SO_PEERSEC = 0x1f + SO_PRIORITY = 0xc + SO_PROTOCOL = 0x26 + SO_RCVBUF = 0x8 + SO_RCVBUFFORCE = 0x21 + SO_RCVLOWAT = 0x12 + SO_RCVTIMEO = 0x14 + SO_REUSEADDR = 0x2 + SO_REUSEPORT = 0xf + SO_RXQ_OVFL = 0x28 + SO_SECURITY_AUTHENTICATION = 0x16 + SO_SECURITY_ENCRYPTION_NETWORK = 0x18 + SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17 + SO_SELECT_ERR_QUEUE = 0x2d + SO_SNDBUF = 0x7 + SO_SNDBUFFORCE = 0x20 + SO_SNDLOWAT = 0x13 + SO_SNDTIMEO = 0x15 + SO_TIMESTAMP = 0x1d + SO_TIMESTAMPING = 0x25 + SO_TIMESTAMPNS = 0x23 + SO_TYPE = 0x3 + SO_WIFI_STATUS = 0x29 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TAB0 = 0x0 + TAB1 = 0x800 + TAB2 = 0x1000 + TAB3 = 0x1800 + TABDLY = 0x1800 + TCFLSH = 0x540b + TCGETA = 0x5405 + TCGETS = 0x5401 + TCGETS2 = 0x802c542a + TCGETX = 0x5432 + TCIFLUSH = 0x0 + TCIOFF = 0x2 + TCIOFLUSH = 0x2 + TCION = 0x3 + TCOFLUSH = 0x1 + TCOOFF = 0x0 + TCOON = 0x1 + TCP_CC_INFO = 0x1a + TCP_CONGESTION = 0xd + TCP_COOKIE_IN_ALWAYS = 0x1 + TCP_COOKIE_MAX = 0x10 + TCP_COOKIE_MIN = 0x8 + TCP_COOKIE_OUT_NEVER = 0x2 + TCP_COOKIE_PAIR_SIZE = 0x20 + TCP_COOKIE_TRANSACTIONS = 0xf + TCP_CORK = 0x3 + TCP_DEFER_ACCEPT = 0x9 + TCP_FASTOPEN = 0x17 + TCP_INFO = 0xb + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x4 + TCP_KEEPINTVL = 0x5 + TCP_LINGER2 = 0x8 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0xe + TCP_MD5SIG_MAXKEYLEN = 0x50 + TCP_MSS = 0x200 + TCP_MSS_DEFAULT = 0x218 + TCP_MSS_DESIRED = 0x4c4 + TCP_NODELAY = 0x1 + TCP_NOTSENT_LOWAT = 0x19 + TCP_QUEUE_SEQ = 0x15 + TCP_QUICKACK = 0xc + TCP_REPAIR = 0x13 + TCP_REPAIR_OPTIONS = 0x16 + TCP_REPAIR_QUEUE = 0x14 + TCP_SAVED_SYN = 0x1c + TCP_SAVE_SYN = 0x1b + TCP_SYNCNT = 0x7 + TCP_S_DATA_IN = 0x4 + TCP_S_DATA_OUT = 0x8 + TCP_THIN_DUPACK = 0x11 + TCP_THIN_LINEAR_TIMEOUTS = 0x10 + TCP_TIMESTAMP = 0x18 + TCP_USER_TIMEOUT = 0x12 + TCP_WINDOW_CLAMP = 0xa + TCSAFLUSH = 0x2 + TCSBRK = 0x5409 + TCSBRKP = 0x5425 + TCSETA = 0x5406 + TCSETAF = 0x5408 + TCSETAW = 0x5407 + TCSETS = 0x5402 + TCSETS2 = 0x402c542b + TCSETSF = 0x5404 + TCSETSF2 = 0x402c542d + TCSETSW = 0x5403 + TCSETSW2 = 0x402c542c + TCSETX = 0x5433 + TCSETXF = 0x5434 + TCSETXW = 0x5435 + TCXONC = 0x540a + TIOCCBRK = 0x5428 + TIOCCONS = 0x541d + TIOCEXCL = 0x540c + TIOCGDEV = 0x80045432 + TIOCGETD = 0x5424 + TIOCGEXCL = 0x80045440 + TIOCGICOUNT = 0x545d + TIOCGLCKTRMIOS = 0x5456 + TIOCGPGRP = 0x540f + TIOCGPKT = 0x80045438 + TIOCGPTLCK = 0x80045439 + TIOCGPTN = 0x80045430 + TIOCGRS485 = 0x542e + TIOCGSERIAL = 0x541e + TIOCGSID = 0x5429 + TIOCGSOFTCAR = 0x5419 + TIOCGWINSZ = 0x5413 + TIOCINQ = 0x541b + TIOCLINUX = 0x541c + TIOCMBIC = 0x5417 + TIOCMBIS = 0x5416 + TIOCMGET = 0x5415 + TIOCMIWAIT = 0x545c + TIOCMSET = 0x5418 + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x5422 + TIOCNXCL = 0x540d + TIOCOUTQ = 0x5411 + TIOCPKT = 0x5420 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCSBRK = 0x5427 + TIOCSCTTY = 0x540e + TIOCSERCONFIG = 0x5453 + TIOCSERGETLSR = 0x5459 + TIOCSERGETMULTI = 0x545a + TIOCSERGSTRUCT = 0x5458 + TIOCSERGWILD = 0x5454 + TIOCSERSETMULTI = 0x545b + TIOCSERSWILD = 0x5455 + TIOCSER_TEMT = 0x1 + TIOCSETD = 0x5423 + TIOCSIG = 0x40045436 + TIOCSLCKTRMIOS = 0x5457 + TIOCSPGRP = 0x5410 + TIOCSPTLCK = 0x40045431 + TIOCSRS485 = 0x542f + TIOCSSERIAL = 0x541f + TIOCSSOFTCAR = 0x541a + TIOCSTI = 0x5412 + TIOCSWINSZ = 0x5414 + TIOCVHANGUP = 0x5437 + TOSTOP = 0x100 + TUNATTACHFILTER = 0x401054d5 + TUNDETACHFILTER = 0x401054d6 + TUNGETFEATURES = 0x800454cf + TUNGETFILTER = 0x801054db + TUNGETIFF = 0x800454d2 + TUNGETSNDBUF = 0x800454d3 + TUNGETVNETBE = 0x800454df + TUNGETVNETHDRSZ = 0x800454d7 + TUNGETVNETLE = 0x800454dd + TUNSETDEBUG = 0x400454c9 + TUNSETGROUP = 0x400454ce + TUNSETIFF = 0x400454ca + TUNSETIFINDEX = 0x400454da + TUNSETLINK = 0x400454cd + TUNSETNOCSUM = 0x400454c8 + TUNSETOFFLOAD = 0x400454d0 + TUNSETOWNER = 0x400454cc + TUNSETPERSIST = 0x400454cb + TUNSETQUEUE = 0x400454d9 + TUNSETSNDBUF = 0x400454d4 + TUNSETTXFILTER = 0x400454d1 + TUNSETVNETBE = 0x400454de + TUNSETVNETHDRSZ = 0x400454d8 + TUNSETVNETLE = 0x400454dc + VDISCARD = 0xd + VEOF = 0x4 + VEOL = 0xb + VEOL2 = 0x10 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x6 + VQUIT = 0x1 + VREPRINT = 0xc + VSTART = 0x8 + VSTOP = 0x9 + VSUSP = 0xa + VSWTC = 0x7 + VT0 = 0x0 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WALL = 0x40000000 + WCLONE = 0x80000000 + WCONTINUED = 0x8 + WEXITED = 0x4 + WNOHANG = 0x1 + WNOTHREAD = 0x20000000 + WNOWAIT = 0x1000000 + WORDSIZE = 0x40 + WSTOPPED = 0x2 + WUNTRACED = 0x2 + XCASE = 0x4 + XTABS = 0x1800 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x62) + EADDRNOTAVAIL = syscall.Errno(0x63) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x61) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x72) + EBADE = syscall.Errno(0x34) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x4d) + EBADMSG = syscall.Errno(0x4a) + EBADR = syscall.Errno(0x35) + EBADRQC = syscall.Errno(0x38) + EBADSLT = syscall.Errno(0x39) + EBFONT = syscall.Errno(0x3b) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x7d) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x2c) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x67) + ECONNREFUSED = syscall.Errno(0x6f) + ECONNRESET = syscall.Errno(0x68) + EDEADLK = syscall.Errno(0x23) + EDEADLOCK = syscall.Errno(0x23) + EDESTADDRREQ = syscall.Errno(0x59) + EDOM = syscall.Errno(0x21) + EDOTDOT = syscall.Errno(0x49) + EDQUOT = syscall.Errno(0x7a) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x70) + EHOSTUNREACH = syscall.Errno(0x71) + EHWPOISON = syscall.Errno(0x85) + EIDRM = syscall.Errno(0x2b) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x73) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x6a) + EISDIR = syscall.Errno(0x15) + EISNAM = syscall.Errno(0x78) + EKEYEXPIRED = syscall.Errno(0x7f) + EKEYREJECTED = syscall.Errno(0x81) + EKEYREVOKED = syscall.Errno(0x80) + EL2HLT = syscall.Errno(0x33) + EL2NSYNC = syscall.Errno(0x2d) + EL3HLT = syscall.Errno(0x2e) + EL3RST = syscall.Errno(0x2f) + ELIBACC = syscall.Errno(0x4f) + ELIBBAD = syscall.Errno(0x50) + ELIBEXEC = syscall.Errno(0x53) + ELIBMAX = syscall.Errno(0x52) + ELIBSCN = syscall.Errno(0x51) + ELNRNG = syscall.Errno(0x30) + ELOOP = syscall.Errno(0x28) + EMEDIUMTYPE = syscall.Errno(0x7c) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x5a) + EMULTIHOP = syscall.Errno(0x48) + ENAMETOOLONG = syscall.Errno(0x24) + ENAVAIL = syscall.Errno(0x77) + ENETDOWN = syscall.Errno(0x64) + ENETRESET = syscall.Errno(0x66) + ENETUNREACH = syscall.Errno(0x65) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x37) + ENOBUFS = syscall.Errno(0x69) + ENOCSI = syscall.Errno(0x32) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOKEY = syscall.Errno(0x7e) + ENOLCK = syscall.Errno(0x25) + ENOLINK = syscall.Errno(0x43) + ENOMEDIUM = syscall.Errno(0x7b) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x2a) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x5c) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x26) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x6b) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x27) + ENOTNAM = syscall.Errno(0x76) + ENOTRECOVERABLE = syscall.Errno(0x83) + ENOTSOCK = syscall.Errno(0x58) + ENOTSUP = syscall.Errno(0x5f) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x4c) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x5f) + EOVERFLOW = syscall.Errno(0x4b) + EOWNERDEAD = syscall.Errno(0x82) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x60) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x5d) + EPROTOTYPE = syscall.Errno(0x5b) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x4e) + EREMOTE = syscall.Errno(0x42) + EREMOTEIO = syscall.Errno(0x79) + ERESTART = syscall.Errno(0x55) + ERFKILL = syscall.Errno(0x84) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x6c) + ESOCKTNOSUPPORT = syscall.Errno(0x5e) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x74) + ESTRPIPE = syscall.Errno(0x56) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x6e) + ETOOMANYREFS = syscall.Errno(0x6d) + ETXTBSY = syscall.Errno(0x1a) + EUCLEAN = syscall.Errno(0x75) + EUNATCH = syscall.Errno(0x31) + EUSERS = syscall.Errno(0x57) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x36) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0x7) + SIGCHLD = syscall.Signal(0x11) + SIGCLD = syscall.Signal(0x11) + SIGCONT = syscall.Signal(0x12) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x1d) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x1d) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x1e) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTKFLT = syscall.Signal(0x10) + SIGSTOP = syscall.Signal(0x13) + SIGSYS = syscall.Signal(0x1f) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x14) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGUNUSED = syscall.Signal(0x1f) + SIGURG = syscall.Signal(0x17) + SIGUSR1 = syscall.Signal(0xa) + SIGUSR2 = syscall.Signal(0xc) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "no such device or address", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device or resource busy", + 17: "file exists", + 18: "invalid cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "numerical result out of range", + 35: "resource deadlock avoided", + 36: "file name too long", + 37: "no locks available", + 38: "function not implemented", + 39: "directory not empty", + 40: "too many levels of symbolic links", + 42: "no message of desired type", + 43: "identifier removed", + 44: "channel number out of range", + 45: "level 2 not synchronized", + 46: "level 3 halted", + 47: "level 3 reset", + 48: "link number out of range", + 49: "protocol driver not attached", + 50: "no CSI structure available", + 51: "level 2 halted", + 52: "invalid exchange", + 53: "invalid request descriptor", + 54: "exchange full", + 55: "no anode", + 56: "invalid request code", + 57: "invalid slot", + 59: "bad font file format", + 60: "device not a stream", + 61: "no data available", + 62: "timer expired", + 63: "out of streams resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 72: "multihop attempted", + 73: "RFS specific error", + 74: "bad message", + 75: "value too large for defined data type", + 76: "name not unique on network", + 77: "file descriptor in bad state", + 78: "remote address changed", + 79: "can not access a needed shared library", + 80: "accessing a corrupted shared library", + 81: ".lib section in a.out corrupted", + 82: "attempting to link in too many shared libraries", + 83: "cannot exec a shared library directly", + 84: "invalid or incomplete multibyte or wide character", + 85: "interrupted system call should be restarted", + 86: "streams pipe error", + 87: "too many users", + 88: "socket operation on non-socket", + 89: "destination address required", + 90: "message too long", + 91: "protocol wrong type for socket", + 92: "protocol not available", + 93: "protocol not supported", + 94: "socket type not supported", + 95: "operation not supported", + 96: "protocol family not supported", + 97: "address family not supported by protocol", + 98: "address already in use", + 99: "cannot assign requested address", + 100: "network is down", + 101: "network is unreachable", + 102: "network dropped connection on reset", + 103: "software caused connection abort", + 104: "connection reset by peer", + 105: "no buffer space available", + 106: "transport endpoint is already connected", + 107: "transport endpoint is not connected", + 108: "cannot send after transport endpoint shutdown", + 109: "too many references: cannot splice", + 110: "connection timed out", + 111: "connection refused", + 112: "host is down", + 113: "no route to host", + 114: "operation already in progress", + 115: "operation now in progress", + 116: "stale file handle", + 117: "structure needs cleaning", + 118: "not a XENIX named type file", + 119: "no XENIX semaphores available", + 120: "is a named type file", + 121: "remote I/O error", + 122: "disk quota exceeded", + 123: "no medium found", + 124: "wrong medium type", + 125: "operation canceled", + 126: "required key not available", + 127: "key has expired", + 128: "key has been revoked", + 129: "key was rejected by service", + 130: "owner died", + 131: "state not recoverable", + 132: "operation not possible due to RF-kill", + 133: "memory page has hardware error", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "bus error", + 8: "floating point exception", + 9: "killed", + 10: "user defined signal 1", + 11: "segmentation fault", + 12: "user defined signal 2", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "stack fault", + 17: "child exited", + 18: "continued", + 19: "stopped (signal)", + 20: "stopped", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "urgent I/O condition", + 24: "CPU time limit exceeded", + 25: "file size limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window changed", + 29: "I/O possible", + 30: "power failure", + 31: "bad system call", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go new file mode 100644 index 000000000..b4338d5f2 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_386.go @@ -0,0 +1,1712 @@ +// mkerrors.sh -m32 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,netbsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m32 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_ARP = 0x1c + AF_BLUETOOTH = 0x1f + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x20 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x18 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x23 + AF_MPLS = 0x21 + AF_NATM = 0x1b + AF_NS = 0x6 + AF_OROUTE = 0x11 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x22 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + ARPHRD_ARCNET = 0x7 + ARPHRD_ETHER = 0x1 + ARPHRD_FRELAY = 0xf + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_STRIP = 0x17 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B460800 = 0x70800 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B921600 = 0xe1000 + B9600 = 0x2580 + BIOCFEEDBACK = 0x8004427d + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0084277 + BIOCGETIF = 0x4090426b + BIOCGFEEDBACK = 0x4004427c + BIOCGHDRCMPLT = 0x40044274 + BIOCGRTIMEOUT = 0x400c427b + BIOCGSEESENT = 0x40044278 + BIOCGSTATS = 0x4080426f + BIOCGSTATSOLD = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044276 + BIOCSETF = 0x80084267 + BIOCSETIF = 0x8090426c + BIOCSFEEDBACK = 0x8004427d + BIOCSHDRCMPLT = 0x80044275 + BIOCSRTIMEOUT = 0x800c427a + BIOCSSEESENT = 0x80044279 + BIOCSTCPF = 0x80084272 + BIOCSUDPF = 0x80084273 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALIGNMENT32 = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DFLTBUFSIZE = 0x100000 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x1000000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CLONE_CSIGNAL = 0xff + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_PID = 0x1000 + CLONE_PTRACE = 0x2000 + CLONE_SIGHAND = 0x800 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + CTL_QUERY = -0x2 + DIOCBSFLUSH = 0x20006478 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HDLC = 0x10 + DLT_HHDLC = 0x79 + DLT_HIPPI = 0xf + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0xe + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RAWAF_MASK = 0x2240000 + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xd + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EMUL_LINUX = 0x1 + EMUL_LINUX32 = 0x5 + EMUL_MAXID = 0x6 + EN_SW_CTL_INF = 0x1000 + EN_SW_CTL_PREC = 0x300 + EN_SW_CTL_ROUND = 0xc00 + EN_SW_DATACHAIN = 0x80 + EN_SW_DENORM = 0x2 + EN_SW_INVOP = 0x1 + EN_SW_OVERFLOW = 0x8 + EN_SW_PRECLOSS = 0x20 + EN_SW_UNDERFLOW = 0x10 + EN_SW_ZERODIV = 0x4 + ETHERCAP_JUMBO_MTU = 0x4 + ETHERCAP_VLAN_HWTAGGING = 0x2 + ETHERCAP_VLAN_MTU = 0x1 + ETHERMIN = 0x2e + ETHERMTU = 0x5dc + ETHERMTU_JUMBO = 0x2328 + ETHERTYPE_8023 = 0x4 + ETHERTYPE_AARP = 0x80f3 + ETHERTYPE_ACCTON = 0x8390 + ETHERTYPE_AEONIC = 0x8036 + ETHERTYPE_ALPHA = 0x814a + ETHERTYPE_AMBER = 0x6008 + ETHERTYPE_AMOEBA = 0x8145 + ETHERTYPE_APOLLO = 0x80f7 + ETHERTYPE_APOLLODOMAIN = 0x8019 + ETHERTYPE_APPLETALK = 0x809b + ETHERTYPE_APPLITEK = 0x80c7 + ETHERTYPE_ARGONAUT = 0x803a + ETHERTYPE_ARP = 0x806 + ETHERTYPE_AT = 0x809b + ETHERTYPE_ATALK = 0x809b + ETHERTYPE_ATOMIC = 0x86df + ETHERTYPE_ATT = 0x8069 + ETHERTYPE_ATTSTANFORD = 0x8008 + ETHERTYPE_AUTOPHON = 0x806a + ETHERTYPE_AXIS = 0x8856 + ETHERTYPE_BCLOOP = 0x9003 + ETHERTYPE_BOFL = 0x8102 + ETHERTYPE_CABLETRON = 0x7034 + ETHERTYPE_CHAOS = 0x804 + ETHERTYPE_COMDESIGN = 0x806c + ETHERTYPE_COMPUGRAPHIC = 0x806d + ETHERTYPE_COUNTERPOINT = 0x8062 + ETHERTYPE_CRONUS = 0x8004 + ETHERTYPE_CRONUSVLN = 0x8003 + ETHERTYPE_DCA = 0x1234 + ETHERTYPE_DDE = 0x807b + ETHERTYPE_DEBNI = 0xaaaa + ETHERTYPE_DECAM = 0x8048 + ETHERTYPE_DECCUST = 0x6006 + ETHERTYPE_DECDIAG = 0x6005 + ETHERTYPE_DECDNS = 0x803c + ETHERTYPE_DECDTS = 0x803e + ETHERTYPE_DECEXPER = 0x6000 + ETHERTYPE_DECLAST = 0x8041 + ETHERTYPE_DECLTM = 0x803f + ETHERTYPE_DECMUMPS = 0x6009 + ETHERTYPE_DECNETBIOS = 0x8040 + ETHERTYPE_DELTACON = 0x86de + ETHERTYPE_DIDDLE = 0x4321 + ETHERTYPE_DLOG1 = 0x660 + ETHERTYPE_DLOG2 = 0x661 + ETHERTYPE_DN = 0x6003 + ETHERTYPE_DOGFIGHT = 0x1989 + ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_ECMA = 0x803 + ETHERTYPE_ENCRYPT = 0x803d + ETHERTYPE_ES = 0x805d + ETHERTYPE_EXCELAN = 0x8010 + ETHERTYPE_EXPERDATA = 0x8049 + ETHERTYPE_FLIP = 0x8146 + ETHERTYPE_FLOWCONTROL = 0x8808 + ETHERTYPE_FRARP = 0x808 + ETHERTYPE_GENDYN = 0x8068 + ETHERTYPE_HAYES = 0x8130 + ETHERTYPE_HIPPI_FP = 0x8180 + ETHERTYPE_HITACHI = 0x8820 + ETHERTYPE_HP = 0x8005 + ETHERTYPE_IEEEPUP = 0xa00 + ETHERTYPE_IEEEPUPAT = 0xa01 + ETHERTYPE_IMLBL = 0x4c42 + ETHERTYPE_IMLBLDIAG = 0x424c + ETHERTYPE_IP = 0x800 + ETHERTYPE_IPAS = 0x876c + ETHERTYPE_IPV6 = 0x86dd + ETHERTYPE_IPX = 0x8137 + ETHERTYPE_IPXNEW = 0x8037 + ETHERTYPE_KALPANA = 0x8582 + ETHERTYPE_LANBRIDGE = 0x8038 + ETHERTYPE_LANPROBE = 0x8888 + ETHERTYPE_LAT = 0x6004 + ETHERTYPE_LBACK = 0x9000 + ETHERTYPE_LITTLE = 0x8060 + ETHERTYPE_LOGICRAFT = 0x8148 + ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MATRA = 0x807a + ETHERTYPE_MAX = 0xffff + ETHERTYPE_MERIT = 0x807c + ETHERTYPE_MICP = 0x873a + ETHERTYPE_MOPDL = 0x6001 + ETHERTYPE_MOPRC = 0x6002 + ETHERTYPE_MOTOROLA = 0x818d + ETHERTYPE_MPLS = 0x8847 + ETHERTYPE_MPLS_MCAST = 0x8848 + ETHERTYPE_MUMPS = 0x813f + ETHERTYPE_NBPCC = 0x3c04 + ETHERTYPE_NBPCLAIM = 0x3c09 + ETHERTYPE_NBPCLREQ = 0x3c05 + ETHERTYPE_NBPCLRSP = 0x3c06 + ETHERTYPE_NBPCREQ = 0x3c02 + ETHERTYPE_NBPCRSP = 0x3c03 + ETHERTYPE_NBPDG = 0x3c07 + ETHERTYPE_NBPDGB = 0x3c08 + ETHERTYPE_NBPDLTE = 0x3c0a + ETHERTYPE_NBPRAR = 0x3c0c + ETHERTYPE_NBPRAS = 0x3c0b + ETHERTYPE_NBPRST = 0x3c0d + ETHERTYPE_NBPSCD = 0x3c01 + ETHERTYPE_NBPVCD = 0x3c00 + ETHERTYPE_NBS = 0x802 + ETHERTYPE_NCD = 0x8149 + ETHERTYPE_NESTAR = 0x8006 + ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NOVELL = 0x8138 + ETHERTYPE_NS = 0x600 + ETHERTYPE_NSAT = 0x601 + ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NTRAILER = 0x10 + ETHERTYPE_OS9 = 0x7007 + ETHERTYPE_OS9NET = 0x7009 + ETHERTYPE_PACER = 0x80c6 + ETHERTYPE_PAE = 0x888e + ETHERTYPE_PCS = 0x4242 + ETHERTYPE_PLANNING = 0x8044 + ETHERTYPE_PPP = 0x880b + ETHERTYPE_PPPOE = 0x8864 + ETHERTYPE_PPPOEDISC = 0x8863 + ETHERTYPE_PRIMENTS = 0x7031 + ETHERTYPE_PUP = 0x200 + ETHERTYPE_PUPAT = 0x200 + ETHERTYPE_RACAL = 0x7030 + ETHERTYPE_RATIONAL = 0x8150 + ETHERTYPE_RAWFR = 0x6559 + ETHERTYPE_RCL = 0x1995 + ETHERTYPE_RDP = 0x8739 + ETHERTYPE_RETIX = 0x80f2 + ETHERTYPE_REVARP = 0x8035 + ETHERTYPE_SCA = 0x6007 + ETHERTYPE_SECTRA = 0x86db + ETHERTYPE_SECUREDATA = 0x876d + ETHERTYPE_SGITW = 0x817e + ETHERTYPE_SG_BOUNCE = 0x8016 + ETHERTYPE_SG_DIAG = 0x8013 + ETHERTYPE_SG_NETGAMES = 0x8014 + ETHERTYPE_SG_RESV = 0x8015 + ETHERTYPE_SIMNET = 0x5208 + ETHERTYPE_SLOWPROTOCOLS = 0x8809 + ETHERTYPE_SNA = 0x80d5 + ETHERTYPE_SNMP = 0x814c + ETHERTYPE_SONIX = 0xfaf5 + ETHERTYPE_SPIDER = 0x809f + ETHERTYPE_SPRITE = 0x500 + ETHERTYPE_STP = 0x8181 + ETHERTYPE_TALARIS = 0x812b + ETHERTYPE_TALARISMC = 0x852b + ETHERTYPE_TCPCOMP = 0x876b + ETHERTYPE_TCPSM = 0x9002 + ETHERTYPE_TEC = 0x814f + ETHERTYPE_TIGAN = 0x802f + ETHERTYPE_TRAIL = 0x1000 + ETHERTYPE_TRANSETHER = 0x6558 + ETHERTYPE_TYMSHARE = 0x802e + ETHERTYPE_UBBST = 0x7005 + ETHERTYPE_UBDEBUG = 0x900 + ETHERTYPE_UBDIAGLOOP = 0x7002 + ETHERTYPE_UBDL = 0x7000 + ETHERTYPE_UBNIU = 0x7001 + ETHERTYPE_UBNMC = 0x7003 + ETHERTYPE_VALID = 0x1600 + ETHERTYPE_VARIAN = 0x80dd + ETHERTYPE_VAXELN = 0x803b + ETHERTYPE_VEECO = 0x8067 + ETHERTYPE_VEXP = 0x805b + ETHERTYPE_VGLAB = 0x8131 + ETHERTYPE_VINES = 0xbad + ETHERTYPE_VINESECHO = 0xbaf + ETHERTYPE_VINESLOOP = 0xbae + ETHERTYPE_VITAL = 0xff00 + ETHERTYPE_VLAN = 0x8100 + ETHERTYPE_VLTLMAN = 0x8080 + ETHERTYPE_VPROD = 0x805c + ETHERTYPE_VURESERVED = 0x8147 + ETHERTYPE_WATERLOO = 0x8130 + ETHERTYPE_WELLFLEET = 0x8103 + ETHERTYPE_X25 = 0x805 + ETHERTYPE_X75 = 0x801 + ETHERTYPE_XNSSM = 0x9001 + ETHERTYPE_XTP = 0x817d + ETHER_ADDR_LEN = 0x6 + ETHER_CRC_LEN = 0x4 + ETHER_CRC_POLY_BE = 0x4c11db6 + ETHER_CRC_POLY_LE = 0xedb88320 + ETHER_HDR_LEN = 0xe + ETHER_MAX_LEN = 0x5ee + ETHER_MAX_LEN_JUMBO = 0x233a + ETHER_MIN_LEN = 0x40 + ETHER_PPPOE_ENCAP_LEN = 0x8 + ETHER_TYPE_LEN = 0x2 + ETHER_VLAN_ENCAP_LEN = 0x4 + EVFILT_AIO = 0x2 + EVFILT_PROC = 0x4 + EVFILT_READ = 0x0 + EVFILT_SIGNAL = 0x5 + EVFILT_SYSCOUNT = 0x7 + EVFILT_TIMER = 0x6 + EVFILT_VNODE = 0x3 + EVFILT_WRITE = 0x1 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x100 + FLUSHO = 0x800000 + F_CLOSEM = 0xa + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0xc + F_FSCTL = -0x80000000 + F_FSDIRMASK = 0x70000000 + F_FSIN = 0x10000000 + F_FSINOUT = 0x30000000 + F_FSOUT = 0x20000000 + F_FSPRIV = 0x8000 + F_FSVOID = 0x40000000 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETNOSIGPIPE = 0xd + F_GETOWN = 0x5 + F_MAXFD = 0xb + F_OK = 0x0 + F_PARAM_MASK = 0xfff + F_PARAM_MAX = 0xfff + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETNOSIGPIPE = 0xe + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFA_ROUTE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x8f52 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf8 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ECONET = 0xce + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LINEGROUP = 0xd2 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PLC = 0xae + IFT_PON155 = 0xcf + IFT_PON622 = 0xd0 + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPATM = 0xc5 + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_Q2931 = 0xc9 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SIPSIG = 0xcc + IFT_SIPTG = 0xcb + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xd7 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TELINK = 0xc8 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VIRTUALTG = 0xca + IFT_VOICEDID = 0xd5 + IFT_VOICEEM = 0x64 + IFT_VOICEEMFGD = 0xd3 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFGDEANA = 0xd4 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERCABLE = 0xc6 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IPPROTO_AH = 0x33 + IPPROTO_CARP = 0x70 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPIP = 0x4 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IPV6_ICMP = 0x3a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MOBILE = 0x37 + IPPROTO_NONE = 0x3b + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_VRRP = 0x70 + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_EF = 0x8000 + IP_ERRORMTU = 0x15 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x16 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINFRAGSIZE = 0x45 + IP_MINTTL = 0x18 + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x17 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x6 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_SPACEAVAIL = 0x5 + MADV_WILLNEED = 0x3 + MAP_ALIGNMENT_16MB = 0x18000000 + MAP_ALIGNMENT_1TB = 0x28000000 + MAP_ALIGNMENT_256TB = 0x30000000 + MAP_ALIGNMENT_4GB = 0x20000000 + MAP_ALIGNMENT_64KB = 0x10000000 + MAP_ALIGNMENT_64PB = 0x38000000 + MAP_ALIGNMENT_MASK = -0x1000000 + MAP_ALIGNMENT_SHIFT = 0x18 + MAP_ANON = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_INHERIT = 0x80 + MAP_INHERIT_COPY = 0x1 + MAP_INHERIT_DEFAULT = 0x1 + MAP_INHERIT_DONATE_COPY = 0x3 + MAP_INHERIT_NONE = 0x2 + MAP_INHERIT_SHARE = 0x0 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_SHARED = 0x1 + MAP_STACK = 0x2000 + MAP_TRYFIXED = 0x400 + MAP_WIRED = 0x800 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_BCAST = 0x100 + MSG_CMSG_CLOEXEC = 0x800 + MSG_CONTROLMBUF = 0x2000000 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOR = 0x8 + MSG_IOVUSRSPACE = 0x4000000 + MSG_LENUSRSPACE = 0x8000000 + MSG_MCAST = 0x200 + MSG_NAMEMBUF = 0x1000000 + MSG_NBIO = 0x1000 + MSG_NOSIGNAL = 0x400 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_USERFLAGS = 0xffffff + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x4 + NAME_MAX = 0x1ff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x5 + NET_RT_MAXID = 0x6 + NET_RT_OIFLIST = 0x4 + NET_RT_OOIFLIST = 0x3 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + OFIOGETBMAP = 0xc004667a + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_ALT_IO = 0x40000 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x400000 + O_CREAT = 0x200 + O_DIRECT = 0x80000 + O_DIRECTORY = 0x200000 + O_DSYNC = 0x10000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_NOSIGPIPE = 0x1000000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x20000 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PRI_IOFLUSH = 0x7c + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x9 + RTAX_NETMASK = 0x2 + RTAX_TAG = 0x8 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTA_TAG = 0x100 + RTF_ANNOUNCE = 0x20000 + RTF_BLACKHOLE = 0x1000 + RTF_CLONED = 0x2000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 + RTF_MASK = 0x80 + RTF_MODIFIED = 0x20 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_REJECT = 0x8 + RTF_SRC = 0x10000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_CHGADDR = 0x15 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x11 + RTM_IFANNOUNCE = 0x10 + RTM_IFINFO = 0x14 + RTM_LLINFO_UPD = 0x13 + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_OIFINFO = 0xf + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_OOIFINFO = 0xe + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_SETGATE = 0x12 + RTM_VERSION = 0x4 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x4 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x8 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80906931 + SIOCADDRT = 0x8030720a + SIOCAIFADDR = 0x8040691a + SIOCALIFADDR = 0x8118691c + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80906932 + SIOCDELRT = 0x8030720b + SIOCDIFADDR = 0x80906919 + SIOCDIFPHYADDR = 0x80906949 + SIOCDLIFADDR = 0x8118691e + SIOCGDRVSPEC = 0xc01c697b + SIOCGETPFSYNC = 0xc09069f8 + SIOCGETSGCNT = 0xc0147534 + SIOCGETVIFCNT = 0xc0147533 + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0906921 + SIOCGIFADDRPREF = 0xc0946920 + SIOCGIFALIAS = 0xc040691b + SIOCGIFBRDADDR = 0xc0906923 + SIOCGIFCAP = 0xc0206976 + SIOCGIFCONF = 0xc0086926 + SIOCGIFDATA = 0xc0946985 + SIOCGIFDLT = 0xc0906977 + SIOCGIFDSTADDR = 0xc0906922 + SIOCGIFFLAGS = 0xc0906911 + SIOCGIFGENERIC = 0xc090693a + SIOCGIFMEDIA = 0xc0286936 + SIOCGIFMETRIC = 0xc0906917 + SIOCGIFMTU = 0xc090697e + SIOCGIFNETMASK = 0xc0906925 + SIOCGIFPDSTADDR = 0xc0906948 + SIOCGIFPSRCADDR = 0xc0906947 + SIOCGLIFADDR = 0xc118691d + SIOCGLIFPHYADDR = 0xc118694b + SIOCGLINKSTR = 0xc01c6987 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGVH = 0xc0906983 + SIOCIFCREATE = 0x8090697a + SIOCIFDESTROY = 0x80906979 + SIOCIFGCLONERS = 0xc00c6978 + SIOCINITIFADDR = 0xc0446984 + SIOCSDRVSPEC = 0x801c697b + SIOCSETPFSYNC = 0x809069f7 + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8090690c + SIOCSIFADDRPREF = 0x8094691f + SIOCSIFBRDADDR = 0x80906913 + SIOCSIFCAP = 0x80206975 + SIOCSIFDSTADDR = 0x8090690e + SIOCSIFFLAGS = 0x80906910 + SIOCSIFGENERIC = 0x80906939 + SIOCSIFMEDIA = 0xc0906935 + SIOCSIFMETRIC = 0x80906918 + SIOCSIFMTU = 0x8090697f + SIOCSIFNETMASK = 0x80906916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSLIFPHYADDR = 0x8118694a + SIOCSLINKSTR = 0x801c6988 + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SIOCSVH = 0xc0906982 + SIOCZIFDATA = 0xc0946986 + SOCK_CLOEXEC = 0x10000000 + SOCK_DGRAM = 0x2 + SOCK_FLAGS_MASK = 0xf0000000 + SOCK_NONBLOCK = 0x20000000 + SOCK_NOSIGPIPE = 0x40000000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_NOHEADER = 0x100a + SO_NOSIGPIPE = 0x800 + SO_OOBINLINE = 0x100 + SO_OVERFLOWED = 0x1009 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x100c + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x100b + SO_TIMESTAMP = 0x2000 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SYSCTL_VERSION = 0x1000000 + SYSCTL_VERS_0 = 0x0 + SYSCTL_VERS_1 = 0x1000000 + SYSCTL_VERS_MASK = 0xff000000 + S_ARCH1 = 0x10000 + S_ARCH2 = 0x20000 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IFWHT = 0xe000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISTXT = 0x200 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + S_LOGIN_SET = 0x1 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CONGCTL = 0x20 + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x3 + TCP_KEEPINIT = 0x7 + TCP_KEEPINTVL = 0x5 + TCP_MAXBURST = 0x4 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x10 + TCP_MINMSS = 0xd8 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x400c7458 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLAG_CDTRCTS = 0x10 + TIOCFLAG_CLOCAL = 0x2 + TIOCFLAG_CRTSCTS = 0x4 + TIOCFLAG_MDMBUF = 0x8 + TIOCFLAG_SOFTCAR = 0x1 + TIOCFLUSH = 0x80047410 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGFLAGS = 0x4004745d + TIOCGLINED = 0x40207442 + TIOCGPGRP = 0x40047477 + TIOCGQSIZE = 0x40047481 + TIOCGRANTPT = 0x20007447 + TIOCGSID = 0x40047463 + TIOCGSIZE = 0x40087468 + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGET = 0x4004746a + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTMGET = 0x40287446 + TIOCPTSNAME = 0x40287448 + TIOCRCVFRAME = 0x80047445 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSFLAGS = 0x8004745c + TIOCSIG = 0x2000745f + TIOCSLINED = 0x80207443 + TIOCSPGRP = 0x80047476 + TIOCSQSIZE = 0x80047480 + TIOCSSIZE = 0x80087467 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x80047465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCUCNTL = 0x80047466 + TIOCXMTFRAME = 0x80047444 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WALL = 0x8 + WALLSIG = 0x8 + WALTSIG = 0x4 + WCLONE = 0x4 + WCOREFLAG = 0x80 + WNOHANG = 0x1 + WNOWAIT = 0x10000 + WNOZOMBIE = 0x20000 + WOPTSCHECKED = 0x40000 + WSTOPPED = 0x7f + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x58) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x57) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x52) + EILSEQ = syscall.Errno(0x55) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x60) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5e) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x5d) + ENOBUFS = syscall.Errno(0x37) + ENODATA = syscall.Errno(0x59) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x5f) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x53) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x5a) + ENOSTR = syscall.Errno(0x5b) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x56) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x54) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x60) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIME = syscall.Errno(0x5c) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x20) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large or too small", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol option not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "connection timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "identifier removed", + 83: "no message of desired type", + 84: "value too large to be stored in data type", + 85: "illegal byte sequence", + 86: "not supported", + 87: "operation Canceled", + 88: "bad or Corrupt message", + 89: "no message available", + 90: "no STREAM resources", + 91: "not a STREAM", + 92: "STREAM ioctl timeout", + 93: "attribute not found", + 94: "multihop attempted", + 95: "link has been severed", + 96: "protocol error", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "stopped (signal)", + 18: "stopped", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "power fail/restart", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go new file mode 100644 index 000000000..4994437b6 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_amd64.go @@ -0,0 +1,1702 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,netbsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_ARP = 0x1c + AF_BLUETOOTH = 0x1f + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x20 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x18 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x23 + AF_MPLS = 0x21 + AF_NATM = 0x1b + AF_NS = 0x6 + AF_OROUTE = 0x11 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x22 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + ARPHRD_ARCNET = 0x7 + ARPHRD_ETHER = 0x1 + ARPHRD_FRELAY = 0xf + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_STRIP = 0x17 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B460800 = 0x70800 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B921600 = 0xe1000 + B9600 = 0x2580 + BIOCFEEDBACK = 0x8004427d + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0104277 + BIOCGETIF = 0x4090426b + BIOCGFEEDBACK = 0x4004427c + BIOCGHDRCMPLT = 0x40044274 + BIOCGRTIMEOUT = 0x4010427b + BIOCGSEESENT = 0x40044278 + BIOCGSTATS = 0x4080426f + BIOCGSTATSOLD = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044276 + BIOCSETF = 0x80104267 + BIOCSETIF = 0x8090426c + BIOCSFEEDBACK = 0x8004427d + BIOCSHDRCMPLT = 0x80044275 + BIOCSRTIMEOUT = 0x8010427a + BIOCSSEESENT = 0x80044279 + BIOCSTCPF = 0x80104272 + BIOCSUDPF = 0x80104273 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x8 + BPF_ALIGNMENT32 = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DFLTBUFSIZE = 0x100000 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x1000000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CLONE_CSIGNAL = 0xff + CLONE_FILES = 0x400 + CLONE_FS = 0x200 + CLONE_PID = 0x1000 + CLONE_PTRACE = 0x2000 + CLONE_SIGHAND = 0x800 + CLONE_VFORK = 0x4000 + CLONE_VM = 0x100 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + CTL_QUERY = -0x2 + DIOCBSFLUSH = 0x20006478 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HDLC = 0x10 + DLT_HHDLC = 0x79 + DLT_HIPPI = 0xf + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0xe + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RAWAF_MASK = 0x2240000 + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xd + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EMUL_LINUX = 0x1 + EMUL_LINUX32 = 0x5 + EMUL_MAXID = 0x6 + ETHERCAP_JUMBO_MTU = 0x4 + ETHERCAP_VLAN_HWTAGGING = 0x2 + ETHERCAP_VLAN_MTU = 0x1 + ETHERMIN = 0x2e + ETHERMTU = 0x5dc + ETHERMTU_JUMBO = 0x2328 + ETHERTYPE_8023 = 0x4 + ETHERTYPE_AARP = 0x80f3 + ETHERTYPE_ACCTON = 0x8390 + ETHERTYPE_AEONIC = 0x8036 + ETHERTYPE_ALPHA = 0x814a + ETHERTYPE_AMBER = 0x6008 + ETHERTYPE_AMOEBA = 0x8145 + ETHERTYPE_APOLLO = 0x80f7 + ETHERTYPE_APOLLODOMAIN = 0x8019 + ETHERTYPE_APPLETALK = 0x809b + ETHERTYPE_APPLITEK = 0x80c7 + ETHERTYPE_ARGONAUT = 0x803a + ETHERTYPE_ARP = 0x806 + ETHERTYPE_AT = 0x809b + ETHERTYPE_ATALK = 0x809b + ETHERTYPE_ATOMIC = 0x86df + ETHERTYPE_ATT = 0x8069 + ETHERTYPE_ATTSTANFORD = 0x8008 + ETHERTYPE_AUTOPHON = 0x806a + ETHERTYPE_AXIS = 0x8856 + ETHERTYPE_BCLOOP = 0x9003 + ETHERTYPE_BOFL = 0x8102 + ETHERTYPE_CABLETRON = 0x7034 + ETHERTYPE_CHAOS = 0x804 + ETHERTYPE_COMDESIGN = 0x806c + ETHERTYPE_COMPUGRAPHIC = 0x806d + ETHERTYPE_COUNTERPOINT = 0x8062 + ETHERTYPE_CRONUS = 0x8004 + ETHERTYPE_CRONUSVLN = 0x8003 + ETHERTYPE_DCA = 0x1234 + ETHERTYPE_DDE = 0x807b + ETHERTYPE_DEBNI = 0xaaaa + ETHERTYPE_DECAM = 0x8048 + ETHERTYPE_DECCUST = 0x6006 + ETHERTYPE_DECDIAG = 0x6005 + ETHERTYPE_DECDNS = 0x803c + ETHERTYPE_DECDTS = 0x803e + ETHERTYPE_DECEXPER = 0x6000 + ETHERTYPE_DECLAST = 0x8041 + ETHERTYPE_DECLTM = 0x803f + ETHERTYPE_DECMUMPS = 0x6009 + ETHERTYPE_DECNETBIOS = 0x8040 + ETHERTYPE_DELTACON = 0x86de + ETHERTYPE_DIDDLE = 0x4321 + ETHERTYPE_DLOG1 = 0x660 + ETHERTYPE_DLOG2 = 0x661 + ETHERTYPE_DN = 0x6003 + ETHERTYPE_DOGFIGHT = 0x1989 + ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_ECMA = 0x803 + ETHERTYPE_ENCRYPT = 0x803d + ETHERTYPE_ES = 0x805d + ETHERTYPE_EXCELAN = 0x8010 + ETHERTYPE_EXPERDATA = 0x8049 + ETHERTYPE_FLIP = 0x8146 + ETHERTYPE_FLOWCONTROL = 0x8808 + ETHERTYPE_FRARP = 0x808 + ETHERTYPE_GENDYN = 0x8068 + ETHERTYPE_HAYES = 0x8130 + ETHERTYPE_HIPPI_FP = 0x8180 + ETHERTYPE_HITACHI = 0x8820 + ETHERTYPE_HP = 0x8005 + ETHERTYPE_IEEEPUP = 0xa00 + ETHERTYPE_IEEEPUPAT = 0xa01 + ETHERTYPE_IMLBL = 0x4c42 + ETHERTYPE_IMLBLDIAG = 0x424c + ETHERTYPE_IP = 0x800 + ETHERTYPE_IPAS = 0x876c + ETHERTYPE_IPV6 = 0x86dd + ETHERTYPE_IPX = 0x8137 + ETHERTYPE_IPXNEW = 0x8037 + ETHERTYPE_KALPANA = 0x8582 + ETHERTYPE_LANBRIDGE = 0x8038 + ETHERTYPE_LANPROBE = 0x8888 + ETHERTYPE_LAT = 0x6004 + ETHERTYPE_LBACK = 0x9000 + ETHERTYPE_LITTLE = 0x8060 + ETHERTYPE_LOGICRAFT = 0x8148 + ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MATRA = 0x807a + ETHERTYPE_MAX = 0xffff + ETHERTYPE_MERIT = 0x807c + ETHERTYPE_MICP = 0x873a + ETHERTYPE_MOPDL = 0x6001 + ETHERTYPE_MOPRC = 0x6002 + ETHERTYPE_MOTOROLA = 0x818d + ETHERTYPE_MPLS = 0x8847 + ETHERTYPE_MPLS_MCAST = 0x8848 + ETHERTYPE_MUMPS = 0x813f + ETHERTYPE_NBPCC = 0x3c04 + ETHERTYPE_NBPCLAIM = 0x3c09 + ETHERTYPE_NBPCLREQ = 0x3c05 + ETHERTYPE_NBPCLRSP = 0x3c06 + ETHERTYPE_NBPCREQ = 0x3c02 + ETHERTYPE_NBPCRSP = 0x3c03 + ETHERTYPE_NBPDG = 0x3c07 + ETHERTYPE_NBPDGB = 0x3c08 + ETHERTYPE_NBPDLTE = 0x3c0a + ETHERTYPE_NBPRAR = 0x3c0c + ETHERTYPE_NBPRAS = 0x3c0b + ETHERTYPE_NBPRST = 0x3c0d + ETHERTYPE_NBPSCD = 0x3c01 + ETHERTYPE_NBPVCD = 0x3c00 + ETHERTYPE_NBS = 0x802 + ETHERTYPE_NCD = 0x8149 + ETHERTYPE_NESTAR = 0x8006 + ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NOVELL = 0x8138 + ETHERTYPE_NS = 0x600 + ETHERTYPE_NSAT = 0x601 + ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NTRAILER = 0x10 + ETHERTYPE_OS9 = 0x7007 + ETHERTYPE_OS9NET = 0x7009 + ETHERTYPE_PACER = 0x80c6 + ETHERTYPE_PAE = 0x888e + ETHERTYPE_PCS = 0x4242 + ETHERTYPE_PLANNING = 0x8044 + ETHERTYPE_PPP = 0x880b + ETHERTYPE_PPPOE = 0x8864 + ETHERTYPE_PPPOEDISC = 0x8863 + ETHERTYPE_PRIMENTS = 0x7031 + ETHERTYPE_PUP = 0x200 + ETHERTYPE_PUPAT = 0x200 + ETHERTYPE_RACAL = 0x7030 + ETHERTYPE_RATIONAL = 0x8150 + ETHERTYPE_RAWFR = 0x6559 + ETHERTYPE_RCL = 0x1995 + ETHERTYPE_RDP = 0x8739 + ETHERTYPE_RETIX = 0x80f2 + ETHERTYPE_REVARP = 0x8035 + ETHERTYPE_SCA = 0x6007 + ETHERTYPE_SECTRA = 0x86db + ETHERTYPE_SECUREDATA = 0x876d + ETHERTYPE_SGITW = 0x817e + ETHERTYPE_SG_BOUNCE = 0x8016 + ETHERTYPE_SG_DIAG = 0x8013 + ETHERTYPE_SG_NETGAMES = 0x8014 + ETHERTYPE_SG_RESV = 0x8015 + ETHERTYPE_SIMNET = 0x5208 + ETHERTYPE_SLOWPROTOCOLS = 0x8809 + ETHERTYPE_SNA = 0x80d5 + ETHERTYPE_SNMP = 0x814c + ETHERTYPE_SONIX = 0xfaf5 + ETHERTYPE_SPIDER = 0x809f + ETHERTYPE_SPRITE = 0x500 + ETHERTYPE_STP = 0x8181 + ETHERTYPE_TALARIS = 0x812b + ETHERTYPE_TALARISMC = 0x852b + ETHERTYPE_TCPCOMP = 0x876b + ETHERTYPE_TCPSM = 0x9002 + ETHERTYPE_TEC = 0x814f + ETHERTYPE_TIGAN = 0x802f + ETHERTYPE_TRAIL = 0x1000 + ETHERTYPE_TRANSETHER = 0x6558 + ETHERTYPE_TYMSHARE = 0x802e + ETHERTYPE_UBBST = 0x7005 + ETHERTYPE_UBDEBUG = 0x900 + ETHERTYPE_UBDIAGLOOP = 0x7002 + ETHERTYPE_UBDL = 0x7000 + ETHERTYPE_UBNIU = 0x7001 + ETHERTYPE_UBNMC = 0x7003 + ETHERTYPE_VALID = 0x1600 + ETHERTYPE_VARIAN = 0x80dd + ETHERTYPE_VAXELN = 0x803b + ETHERTYPE_VEECO = 0x8067 + ETHERTYPE_VEXP = 0x805b + ETHERTYPE_VGLAB = 0x8131 + ETHERTYPE_VINES = 0xbad + ETHERTYPE_VINESECHO = 0xbaf + ETHERTYPE_VINESLOOP = 0xbae + ETHERTYPE_VITAL = 0xff00 + ETHERTYPE_VLAN = 0x8100 + ETHERTYPE_VLTLMAN = 0x8080 + ETHERTYPE_VPROD = 0x805c + ETHERTYPE_VURESERVED = 0x8147 + ETHERTYPE_WATERLOO = 0x8130 + ETHERTYPE_WELLFLEET = 0x8103 + ETHERTYPE_X25 = 0x805 + ETHERTYPE_X75 = 0x801 + ETHERTYPE_XNSSM = 0x9001 + ETHERTYPE_XTP = 0x817d + ETHER_ADDR_LEN = 0x6 + ETHER_CRC_LEN = 0x4 + ETHER_CRC_POLY_BE = 0x4c11db6 + ETHER_CRC_POLY_LE = 0xedb88320 + ETHER_HDR_LEN = 0xe + ETHER_MAX_LEN = 0x5ee + ETHER_MAX_LEN_JUMBO = 0x233a + ETHER_MIN_LEN = 0x40 + ETHER_PPPOE_ENCAP_LEN = 0x8 + ETHER_TYPE_LEN = 0x2 + ETHER_VLAN_ENCAP_LEN = 0x4 + EVFILT_AIO = 0x2 + EVFILT_PROC = 0x4 + EVFILT_READ = 0x0 + EVFILT_SIGNAL = 0x5 + EVFILT_SYSCOUNT = 0x7 + EVFILT_TIMER = 0x6 + EVFILT_VNODE = 0x3 + EVFILT_WRITE = 0x1 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x100 + FLUSHO = 0x800000 + F_CLOSEM = 0xa + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0xc + F_FSCTL = -0x80000000 + F_FSDIRMASK = 0x70000000 + F_FSIN = 0x10000000 + F_FSINOUT = 0x30000000 + F_FSOUT = 0x20000000 + F_FSPRIV = 0x8000 + F_FSVOID = 0x40000000 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETNOSIGPIPE = 0xd + F_GETOWN = 0x5 + F_MAXFD = 0xb + F_OK = 0x0 + F_PARAM_MASK = 0xfff + F_PARAM_MAX = 0xfff + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETNOSIGPIPE = 0xe + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFA_ROUTE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x8f52 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf8 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ECONET = 0xce + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LINEGROUP = 0xd2 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PLC = 0xae + IFT_PON155 = 0xcf + IFT_PON622 = 0xd0 + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPATM = 0xc5 + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_Q2931 = 0xc9 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SIPSIG = 0xcc + IFT_SIPTG = 0xcb + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xd7 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TELINK = 0xc8 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VIRTUALTG = 0xca + IFT_VOICEDID = 0xd5 + IFT_VOICEEM = 0x64 + IFT_VOICEEMFGD = 0xd3 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFGDEANA = 0xd4 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERCABLE = 0xc6 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IPPROTO_AH = 0x33 + IPPROTO_CARP = 0x70 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPIP = 0x4 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IPV6_ICMP = 0x3a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MOBILE = 0x37 + IPPROTO_NONE = 0x3b + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_VRRP = 0x70 + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_EF = 0x8000 + IP_ERRORMTU = 0x15 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x16 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINFRAGSIZE = 0x45 + IP_MINTTL = 0x18 + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x17 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x6 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_SPACEAVAIL = 0x5 + MADV_WILLNEED = 0x3 + MAP_ALIGNMENT_16MB = 0x18000000 + MAP_ALIGNMENT_1TB = 0x28000000 + MAP_ALIGNMENT_256TB = 0x30000000 + MAP_ALIGNMENT_4GB = 0x20000000 + MAP_ALIGNMENT_64KB = 0x10000000 + MAP_ALIGNMENT_64PB = 0x38000000 + MAP_ALIGNMENT_MASK = -0x1000000 + MAP_ALIGNMENT_SHIFT = 0x18 + MAP_ANON = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_INHERIT = 0x80 + MAP_INHERIT_COPY = 0x1 + MAP_INHERIT_DEFAULT = 0x1 + MAP_INHERIT_DONATE_COPY = 0x3 + MAP_INHERIT_NONE = 0x2 + MAP_INHERIT_SHARE = 0x0 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_SHARED = 0x1 + MAP_STACK = 0x2000 + MAP_TRYFIXED = 0x400 + MAP_WIRED = 0x800 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_BCAST = 0x100 + MSG_CMSG_CLOEXEC = 0x800 + MSG_CONTROLMBUF = 0x2000000 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOR = 0x8 + MSG_IOVUSRSPACE = 0x4000000 + MSG_LENUSRSPACE = 0x8000000 + MSG_MCAST = 0x200 + MSG_NAMEMBUF = 0x1000000 + MSG_NBIO = 0x1000 + MSG_NOSIGNAL = 0x400 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_USERFLAGS = 0xffffff + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_SYNC = 0x4 + NAME_MAX = 0x1ff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x5 + NET_RT_MAXID = 0x6 + NET_RT_OIFLIST = 0x4 + NET_RT_OOIFLIST = 0x3 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + OFIOGETBMAP = 0xc004667a + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_ALT_IO = 0x40000 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x400000 + O_CREAT = 0x200 + O_DIRECT = 0x80000 + O_DIRECTORY = 0x200000 + O_DSYNC = 0x10000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_NOSIGPIPE = 0x1000000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x20000 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PRI_IOFLUSH = 0x7c + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x9 + RTAX_NETMASK = 0x2 + RTAX_TAG = 0x8 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTA_TAG = 0x100 + RTF_ANNOUNCE = 0x20000 + RTF_BLACKHOLE = 0x1000 + RTF_CLONED = 0x2000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 + RTF_MASK = 0x80 + RTF_MODIFIED = 0x20 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_REJECT = 0x8 + RTF_SRC = 0x10000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_CHGADDR = 0x15 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x11 + RTM_IFANNOUNCE = 0x10 + RTM_IFINFO = 0x14 + RTM_LLINFO_UPD = 0x13 + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_OIFINFO = 0xf + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_OOIFINFO = 0xe + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_SETGATE = 0x12 + RTM_VERSION = 0x4 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x4 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x8 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80906931 + SIOCADDRT = 0x8038720a + SIOCAIFADDR = 0x8040691a + SIOCALIFADDR = 0x8118691c + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80906932 + SIOCDELRT = 0x8038720b + SIOCDIFADDR = 0x80906919 + SIOCDIFPHYADDR = 0x80906949 + SIOCDLIFADDR = 0x8118691e + SIOCGDRVSPEC = 0xc028697b + SIOCGETPFSYNC = 0xc09069f8 + SIOCGETSGCNT = 0xc0207534 + SIOCGETVIFCNT = 0xc0287533 + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0906921 + SIOCGIFADDRPREF = 0xc0986920 + SIOCGIFALIAS = 0xc040691b + SIOCGIFBRDADDR = 0xc0906923 + SIOCGIFCAP = 0xc0206976 + SIOCGIFCONF = 0xc0106926 + SIOCGIFDATA = 0xc0986985 + SIOCGIFDLT = 0xc0906977 + SIOCGIFDSTADDR = 0xc0906922 + SIOCGIFFLAGS = 0xc0906911 + SIOCGIFGENERIC = 0xc090693a + SIOCGIFMEDIA = 0xc0306936 + SIOCGIFMETRIC = 0xc0906917 + SIOCGIFMTU = 0xc090697e + SIOCGIFNETMASK = 0xc0906925 + SIOCGIFPDSTADDR = 0xc0906948 + SIOCGIFPSRCADDR = 0xc0906947 + SIOCGLIFADDR = 0xc118691d + SIOCGLIFPHYADDR = 0xc118694b + SIOCGLINKSTR = 0xc0286987 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGVH = 0xc0906983 + SIOCIFCREATE = 0x8090697a + SIOCIFDESTROY = 0x80906979 + SIOCIFGCLONERS = 0xc0106978 + SIOCINITIFADDR = 0xc0706984 + SIOCSDRVSPEC = 0x8028697b + SIOCSETPFSYNC = 0x809069f7 + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8090690c + SIOCSIFADDRPREF = 0x8098691f + SIOCSIFBRDADDR = 0x80906913 + SIOCSIFCAP = 0x80206975 + SIOCSIFDSTADDR = 0x8090690e + SIOCSIFFLAGS = 0x80906910 + SIOCSIFGENERIC = 0x80906939 + SIOCSIFMEDIA = 0xc0906935 + SIOCSIFMETRIC = 0x80906918 + SIOCSIFMTU = 0x8090697f + SIOCSIFNETMASK = 0x80906916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSLIFPHYADDR = 0x8118694a + SIOCSLINKSTR = 0x80286988 + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SIOCSVH = 0xc0906982 + SIOCZIFDATA = 0xc0986986 + SOCK_CLOEXEC = 0x10000000 + SOCK_DGRAM = 0x2 + SOCK_FLAGS_MASK = 0xf0000000 + SOCK_NONBLOCK = 0x20000000 + SOCK_NOSIGPIPE = 0x40000000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_NOHEADER = 0x100a + SO_NOSIGPIPE = 0x800 + SO_OOBINLINE = 0x100 + SO_OVERFLOWED = 0x1009 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x100c + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x100b + SO_TIMESTAMP = 0x2000 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SYSCTL_VERSION = 0x1000000 + SYSCTL_VERS_0 = 0x0 + SYSCTL_VERS_1 = 0x1000000 + SYSCTL_VERS_MASK = 0xff000000 + S_ARCH1 = 0x10000 + S_ARCH2 = 0x20000 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IFWHT = 0xe000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISTXT = 0x200 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + S_LOGIN_SET = 0x1 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CONGCTL = 0x20 + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x3 + TCP_KEEPINIT = 0x7 + TCP_KEEPINTVL = 0x5 + TCP_MAXBURST = 0x4 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x10 + TCP_MINMSS = 0xd8 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x40107458 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLAG_CDTRCTS = 0x10 + TIOCFLAG_CLOCAL = 0x2 + TIOCFLAG_CRTSCTS = 0x4 + TIOCFLAG_MDMBUF = 0x8 + TIOCFLAG_SOFTCAR = 0x1 + TIOCFLUSH = 0x80047410 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGFLAGS = 0x4004745d + TIOCGLINED = 0x40207442 + TIOCGPGRP = 0x40047477 + TIOCGQSIZE = 0x40047481 + TIOCGRANTPT = 0x20007447 + TIOCGSID = 0x40047463 + TIOCGSIZE = 0x40087468 + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGET = 0x4004746a + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTMGET = 0x40287446 + TIOCPTSNAME = 0x40287448 + TIOCRCVFRAME = 0x80087445 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSFLAGS = 0x8004745c + TIOCSIG = 0x2000745f + TIOCSLINED = 0x80207443 + TIOCSPGRP = 0x80047476 + TIOCSQSIZE = 0x80047480 + TIOCSSIZE = 0x80087467 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x80047465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCUCNTL = 0x80047466 + TIOCXMTFRAME = 0x80087444 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WALL = 0x8 + WALLSIG = 0x8 + WALTSIG = 0x4 + WCLONE = 0x4 + WCOREFLAG = 0x80 + WNOHANG = 0x1 + WNOWAIT = 0x10000 + WNOZOMBIE = 0x20000 + WOPTSCHECKED = 0x40000 + WSTOPPED = 0x7f + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x58) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x57) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x52) + EILSEQ = syscall.Errno(0x55) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x60) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5e) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x5d) + ENOBUFS = syscall.Errno(0x37) + ENODATA = syscall.Errno(0x59) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x5f) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x53) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x5a) + ENOSTR = syscall.Errno(0x5b) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x56) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x54) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x60) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIME = syscall.Errno(0x5c) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x20) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large or too small", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol option not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "connection timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "identifier removed", + 83: "no message of desired type", + 84: "value too large to be stored in data type", + 85: "illegal byte sequence", + 86: "not supported", + 87: "operation Canceled", + 88: "bad or Corrupt message", + 89: "no message available", + 90: "no STREAM resources", + 91: "not a STREAM", + 92: "STREAM ioctl timeout", + 93: "attribute not found", + 94: "multihop attempted", + 95: "link has been severed", + 96: "protocol error", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "stopped (signal)", + 18: "stopped", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "power fail/restart", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go new file mode 100644 index 000000000..ac85ca645 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_netbsd_arm.go @@ -0,0 +1,1688 @@ +// mkerrors.sh -marm +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm,netbsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -marm _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_ARP = 0x1c + AF_BLUETOOTH = 0x1f + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_HYLINK = 0xf + AF_IEEE80211 = 0x20 + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x18 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x23 + AF_MPLS = 0x21 + AF_NATM = 0x1b + AF_NS = 0x6 + AF_OROUTE = 0x11 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x22 + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + ARPHRD_ARCNET = 0x7 + ARPHRD_ETHER = 0x1 + ARPHRD_FRELAY = 0xf + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + ARPHRD_STRIP = 0x17 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B460800 = 0x70800 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B921600 = 0xe1000 + B9600 = 0x2580 + BIOCFEEDBACK = 0x8004427d + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc0084277 + BIOCGETIF = 0x4090426b + BIOCGFEEDBACK = 0x4004427c + BIOCGHDRCMPLT = 0x40044274 + BIOCGRTIMEOUT = 0x400c427b + BIOCGSEESENT = 0x40044278 + BIOCGSTATS = 0x4080426f + BIOCGSTATSOLD = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDLT = 0x80044276 + BIOCSETF = 0x80084267 + BIOCSETIF = 0x8090426c + BIOCSFEEDBACK = 0x8004427d + BIOCSHDRCMPLT = 0x80044275 + BIOCSRTIMEOUT = 0x800c427a + BIOCSSEESENT = 0x80044279 + BIOCSTCPF = 0x80084272 + BIOCSUDPF = 0x80084273 + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALIGNMENT32 = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DFLTBUFSIZE = 0x100000 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x1000000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + CTL_QUERY = -0x2 + DIOCBSFLUSH = 0x20006478 + DLT_A429 = 0xb8 + DLT_A653_ICM = 0xb9 + DLT_AIRONET_HEADER = 0x78 + DLT_AOS = 0xde + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_AX25_KISS = 0xca + DLT_BACNET_MS_TP = 0xa5 + DLT_BLUETOOTH_HCI_H4 = 0xbb + DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 + DLT_CAN20B = 0xbe + DLT_CAN_SOCKETCAN = 0xe3 + DLT_CHAOS = 0x5 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_C_HDLC_WITH_DIR = 0xcd + DLT_DECT = 0xdd + DLT_DOCSIS = 0x8f + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF = 0xc5 + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FC_2 = 0xe0 + DLT_FC_2_WITH_FRAME_DELIMS = 0xe1 + DLT_FDDI = 0xa + DLT_FLEXRAY = 0xd2 + DLT_FRELAY = 0x6b + DLT_FRELAY_WITH_DIR = 0xce + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_GSMTAP_ABIS = 0xda + DLT_GSMTAP_UM = 0xd9 + DLT_HDLC = 0x10 + DLT_HHDLC = 0x79 + DLT_HIPPI = 0xf + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IEEE802_15_4 = 0xc3 + DLT_IEEE802_15_4_LINUX = 0xbf + DLT_IEEE802_15_4_NONASK_PHY = 0xd7 + DLT_IEEE802_16_MAC_CPS = 0xbc + DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 + DLT_IPMB = 0xc7 + DLT_IPMB_LINUX = 0xd1 + DLT_IPNET = 0xe2 + DLT_IPV4 = 0xe4 + DLT_IPV6 = 0xe5 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_ISM = 0xc2 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_JUNIPER_ST = 0xc8 + DLT_JUNIPER_VP = 0xb7 + DLT_LAPB_WITH_DIR = 0xcf + DLT_LAPD = 0xcb + DLT_LIN = 0xd4 + DLT_LINUX_EVDEV = 0xd8 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MFR = 0xb6 + DLT_MOST = 0xd3 + DLT_MPLS = 0xdb + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPI = 0xc0 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0xe + DLT_PPP_ETHER = 0x33 + DLT_PPP_PPPD = 0xa6 + DLT_PPP_SERIAL = 0x32 + DLT_PPP_WITH_DIR = 0xcc + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAIF1 = 0xc6 + DLT_RAW = 0xc + DLT_RAWAF_MASK = 0x2240000 + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SITA = 0xc4 + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xd + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + DLT_USB = 0xba + DLT_USB_LINUX = 0xbd + DLT_USB_LINUX_MMAPPED = 0xdc + DLT_WIHART = 0xdf + DLT_X2E_SERIAL = 0xd5 + DLT_X2E_XORAYA = 0xd6 + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + DT_WHT = 0xe + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EMUL_LINUX = 0x1 + EMUL_LINUX32 = 0x5 + EMUL_MAXID = 0x6 + ETHERCAP_JUMBO_MTU = 0x4 + ETHERCAP_VLAN_HWTAGGING = 0x2 + ETHERCAP_VLAN_MTU = 0x1 + ETHERMIN = 0x2e + ETHERMTU = 0x5dc + ETHERMTU_JUMBO = 0x2328 + ETHERTYPE_8023 = 0x4 + ETHERTYPE_AARP = 0x80f3 + ETHERTYPE_ACCTON = 0x8390 + ETHERTYPE_AEONIC = 0x8036 + ETHERTYPE_ALPHA = 0x814a + ETHERTYPE_AMBER = 0x6008 + ETHERTYPE_AMOEBA = 0x8145 + ETHERTYPE_APOLLO = 0x80f7 + ETHERTYPE_APOLLODOMAIN = 0x8019 + ETHERTYPE_APPLETALK = 0x809b + ETHERTYPE_APPLITEK = 0x80c7 + ETHERTYPE_ARGONAUT = 0x803a + ETHERTYPE_ARP = 0x806 + ETHERTYPE_AT = 0x809b + ETHERTYPE_ATALK = 0x809b + ETHERTYPE_ATOMIC = 0x86df + ETHERTYPE_ATT = 0x8069 + ETHERTYPE_ATTSTANFORD = 0x8008 + ETHERTYPE_AUTOPHON = 0x806a + ETHERTYPE_AXIS = 0x8856 + ETHERTYPE_BCLOOP = 0x9003 + ETHERTYPE_BOFL = 0x8102 + ETHERTYPE_CABLETRON = 0x7034 + ETHERTYPE_CHAOS = 0x804 + ETHERTYPE_COMDESIGN = 0x806c + ETHERTYPE_COMPUGRAPHIC = 0x806d + ETHERTYPE_COUNTERPOINT = 0x8062 + ETHERTYPE_CRONUS = 0x8004 + ETHERTYPE_CRONUSVLN = 0x8003 + ETHERTYPE_DCA = 0x1234 + ETHERTYPE_DDE = 0x807b + ETHERTYPE_DEBNI = 0xaaaa + ETHERTYPE_DECAM = 0x8048 + ETHERTYPE_DECCUST = 0x6006 + ETHERTYPE_DECDIAG = 0x6005 + ETHERTYPE_DECDNS = 0x803c + ETHERTYPE_DECDTS = 0x803e + ETHERTYPE_DECEXPER = 0x6000 + ETHERTYPE_DECLAST = 0x8041 + ETHERTYPE_DECLTM = 0x803f + ETHERTYPE_DECMUMPS = 0x6009 + ETHERTYPE_DECNETBIOS = 0x8040 + ETHERTYPE_DELTACON = 0x86de + ETHERTYPE_DIDDLE = 0x4321 + ETHERTYPE_DLOG1 = 0x660 + ETHERTYPE_DLOG2 = 0x661 + ETHERTYPE_DN = 0x6003 + ETHERTYPE_DOGFIGHT = 0x1989 + ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_ECMA = 0x803 + ETHERTYPE_ENCRYPT = 0x803d + ETHERTYPE_ES = 0x805d + ETHERTYPE_EXCELAN = 0x8010 + ETHERTYPE_EXPERDATA = 0x8049 + ETHERTYPE_FLIP = 0x8146 + ETHERTYPE_FLOWCONTROL = 0x8808 + ETHERTYPE_FRARP = 0x808 + ETHERTYPE_GENDYN = 0x8068 + ETHERTYPE_HAYES = 0x8130 + ETHERTYPE_HIPPI_FP = 0x8180 + ETHERTYPE_HITACHI = 0x8820 + ETHERTYPE_HP = 0x8005 + ETHERTYPE_IEEEPUP = 0xa00 + ETHERTYPE_IEEEPUPAT = 0xa01 + ETHERTYPE_IMLBL = 0x4c42 + ETHERTYPE_IMLBLDIAG = 0x424c + ETHERTYPE_IP = 0x800 + ETHERTYPE_IPAS = 0x876c + ETHERTYPE_IPV6 = 0x86dd + ETHERTYPE_IPX = 0x8137 + ETHERTYPE_IPXNEW = 0x8037 + ETHERTYPE_KALPANA = 0x8582 + ETHERTYPE_LANBRIDGE = 0x8038 + ETHERTYPE_LANPROBE = 0x8888 + ETHERTYPE_LAT = 0x6004 + ETHERTYPE_LBACK = 0x9000 + ETHERTYPE_LITTLE = 0x8060 + ETHERTYPE_LOGICRAFT = 0x8148 + ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MATRA = 0x807a + ETHERTYPE_MAX = 0xffff + ETHERTYPE_MERIT = 0x807c + ETHERTYPE_MICP = 0x873a + ETHERTYPE_MOPDL = 0x6001 + ETHERTYPE_MOPRC = 0x6002 + ETHERTYPE_MOTOROLA = 0x818d + ETHERTYPE_MPLS = 0x8847 + ETHERTYPE_MPLS_MCAST = 0x8848 + ETHERTYPE_MUMPS = 0x813f + ETHERTYPE_NBPCC = 0x3c04 + ETHERTYPE_NBPCLAIM = 0x3c09 + ETHERTYPE_NBPCLREQ = 0x3c05 + ETHERTYPE_NBPCLRSP = 0x3c06 + ETHERTYPE_NBPCREQ = 0x3c02 + ETHERTYPE_NBPCRSP = 0x3c03 + ETHERTYPE_NBPDG = 0x3c07 + ETHERTYPE_NBPDGB = 0x3c08 + ETHERTYPE_NBPDLTE = 0x3c0a + ETHERTYPE_NBPRAR = 0x3c0c + ETHERTYPE_NBPRAS = 0x3c0b + ETHERTYPE_NBPRST = 0x3c0d + ETHERTYPE_NBPSCD = 0x3c01 + ETHERTYPE_NBPVCD = 0x3c00 + ETHERTYPE_NBS = 0x802 + ETHERTYPE_NCD = 0x8149 + ETHERTYPE_NESTAR = 0x8006 + ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NOVELL = 0x8138 + ETHERTYPE_NS = 0x600 + ETHERTYPE_NSAT = 0x601 + ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NTRAILER = 0x10 + ETHERTYPE_OS9 = 0x7007 + ETHERTYPE_OS9NET = 0x7009 + ETHERTYPE_PACER = 0x80c6 + ETHERTYPE_PAE = 0x888e + ETHERTYPE_PCS = 0x4242 + ETHERTYPE_PLANNING = 0x8044 + ETHERTYPE_PPP = 0x880b + ETHERTYPE_PPPOE = 0x8864 + ETHERTYPE_PPPOEDISC = 0x8863 + ETHERTYPE_PRIMENTS = 0x7031 + ETHERTYPE_PUP = 0x200 + ETHERTYPE_PUPAT = 0x200 + ETHERTYPE_RACAL = 0x7030 + ETHERTYPE_RATIONAL = 0x8150 + ETHERTYPE_RAWFR = 0x6559 + ETHERTYPE_RCL = 0x1995 + ETHERTYPE_RDP = 0x8739 + ETHERTYPE_RETIX = 0x80f2 + ETHERTYPE_REVARP = 0x8035 + ETHERTYPE_SCA = 0x6007 + ETHERTYPE_SECTRA = 0x86db + ETHERTYPE_SECUREDATA = 0x876d + ETHERTYPE_SGITW = 0x817e + ETHERTYPE_SG_BOUNCE = 0x8016 + ETHERTYPE_SG_DIAG = 0x8013 + ETHERTYPE_SG_NETGAMES = 0x8014 + ETHERTYPE_SG_RESV = 0x8015 + ETHERTYPE_SIMNET = 0x5208 + ETHERTYPE_SLOWPROTOCOLS = 0x8809 + ETHERTYPE_SNA = 0x80d5 + ETHERTYPE_SNMP = 0x814c + ETHERTYPE_SONIX = 0xfaf5 + ETHERTYPE_SPIDER = 0x809f + ETHERTYPE_SPRITE = 0x500 + ETHERTYPE_STP = 0x8181 + ETHERTYPE_TALARIS = 0x812b + ETHERTYPE_TALARISMC = 0x852b + ETHERTYPE_TCPCOMP = 0x876b + ETHERTYPE_TCPSM = 0x9002 + ETHERTYPE_TEC = 0x814f + ETHERTYPE_TIGAN = 0x802f + ETHERTYPE_TRAIL = 0x1000 + ETHERTYPE_TRANSETHER = 0x6558 + ETHERTYPE_TYMSHARE = 0x802e + ETHERTYPE_UBBST = 0x7005 + ETHERTYPE_UBDEBUG = 0x900 + ETHERTYPE_UBDIAGLOOP = 0x7002 + ETHERTYPE_UBDL = 0x7000 + ETHERTYPE_UBNIU = 0x7001 + ETHERTYPE_UBNMC = 0x7003 + ETHERTYPE_VALID = 0x1600 + ETHERTYPE_VARIAN = 0x80dd + ETHERTYPE_VAXELN = 0x803b + ETHERTYPE_VEECO = 0x8067 + ETHERTYPE_VEXP = 0x805b + ETHERTYPE_VGLAB = 0x8131 + ETHERTYPE_VINES = 0xbad + ETHERTYPE_VINESECHO = 0xbaf + ETHERTYPE_VINESLOOP = 0xbae + ETHERTYPE_VITAL = 0xff00 + ETHERTYPE_VLAN = 0x8100 + ETHERTYPE_VLTLMAN = 0x8080 + ETHERTYPE_VPROD = 0x805c + ETHERTYPE_VURESERVED = 0x8147 + ETHERTYPE_WATERLOO = 0x8130 + ETHERTYPE_WELLFLEET = 0x8103 + ETHERTYPE_X25 = 0x805 + ETHERTYPE_X75 = 0x801 + ETHERTYPE_XNSSM = 0x9001 + ETHERTYPE_XTP = 0x817d + ETHER_ADDR_LEN = 0x6 + ETHER_CRC_LEN = 0x4 + ETHER_CRC_POLY_BE = 0x4c11db6 + ETHER_CRC_POLY_LE = 0xedb88320 + ETHER_HDR_LEN = 0xe + ETHER_MAX_LEN = 0x5ee + ETHER_MAX_LEN_JUMBO = 0x233a + ETHER_MIN_LEN = 0x40 + ETHER_PPPOE_ENCAP_LEN = 0x8 + ETHER_TYPE_LEN = 0x2 + ETHER_VLAN_ENCAP_LEN = 0x4 + EVFILT_AIO = 0x2 + EVFILT_PROC = 0x4 + EVFILT_READ = 0x0 + EVFILT_SIGNAL = 0x5 + EVFILT_SYSCOUNT = 0x7 + EVFILT_TIMER = 0x6 + EVFILT_VNODE = 0x3 + EVFILT_WRITE = 0x1 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x100 + FLUSHO = 0x800000 + F_CLOSEM = 0xa + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0xc + F_FSCTL = -0x80000000 + F_FSDIRMASK = 0x70000000 + F_FSIN = 0x10000000 + F_FSINOUT = 0x30000000 + F_FSOUT = 0x20000000 + F_FSPRIV = 0x8000 + F_FSVOID = 0x40000000 + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETNOSIGPIPE = 0xd + F_GETOWN = 0x5 + F_MAXFD = 0xb + F_OK = 0x0 + F_PARAM_MASK = 0xfff + F_PARAM_MAX = 0xfff + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETNOSIGPIPE = 0xe + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFA_ROUTE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x8f52 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf8 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ECONET = 0xce + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf2 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LINEGROUP = 0xd2 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf5 + IFT_PFSYNC = 0xf6 + IFT_PLC = 0xae + IFT_PON155 = 0xcf + IFT_PON622 = 0xd0 + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPATM = 0xc5 + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf1 + IFT_Q2931 = 0xc9 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SIPSIG = 0xcc + IFT_SIPTG = 0xcb + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_STF = 0xd7 + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TELINK = 0xc8 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VIRTUALTG = 0xca + IFT_VOICEDID = 0xd5 + IFT_VOICEEM = 0x64 + IFT_VOICEEMFGD = 0xd3 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFGDEANA = 0xd4 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERCABLE = 0xc6 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IPPROTO_AH = 0x33 + IPPROTO_CARP = 0x70 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPIP = 0x4 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_IPV6_ICMP = 0x3a + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x34 + IPPROTO_MOBILE = 0x37 + IPPROTO_NONE = 0x3b + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPPROTO_VRRP = 0x70 + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPSEC_POLICY = 0x1c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_PATHMTU = 0x2c + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DROP_MEMBERSHIP = 0xd + IP_EF = 0x8000 + IP_ERRORMTU = 0x15 + IP_HDRINCL = 0x2 + IP_IPSEC_POLICY = 0x16 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0x14 + IP_MF = 0x2000 + IP_MINFRAGSIZE = 0x45 + IP_MINTTL = 0x18 + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x1 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x14 + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVTTL = 0x17 + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x6 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_SPACEAVAIL = 0x5 + MADV_WILLNEED = 0x3 + MAP_ALIGNMENT_16MB = 0x18000000 + MAP_ALIGNMENT_1TB = 0x28000000 + MAP_ALIGNMENT_256TB = 0x30000000 + MAP_ALIGNMENT_4GB = 0x20000000 + MAP_ALIGNMENT_64KB = 0x10000000 + MAP_ALIGNMENT_64PB = 0x38000000 + MAP_ALIGNMENT_MASK = -0x1000000 + MAP_ALIGNMENT_SHIFT = 0x18 + MAP_ANON = 0x1000 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_HASSEMAPHORE = 0x200 + MAP_INHERIT = 0x80 + MAP_INHERIT_COPY = 0x1 + MAP_INHERIT_DEFAULT = 0x1 + MAP_INHERIT_DONATE_COPY = 0x3 + MAP_INHERIT_NONE = 0x2 + MAP_INHERIT_SHARE = 0x0 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_SHARED = 0x1 + MAP_STACK = 0x2000 + MAP_TRYFIXED = 0x400 + MAP_WIRED = 0x800 + MSG_BCAST = 0x100 + MSG_CMSG_CLOEXEC = 0x800 + MSG_CONTROLMBUF = 0x2000000 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOR = 0x8 + MSG_IOVUSRSPACE = 0x4000000 + MSG_LENUSRSPACE = 0x8000000 + MSG_MCAST = 0x200 + MSG_NAMEMBUF = 0x1000000 + MSG_NBIO = 0x1000 + MSG_NOSIGNAL = 0x400 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_USERFLAGS = 0xffffff + MSG_WAITALL = 0x40 + NAME_MAX = 0x1ff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x5 + NET_RT_MAXID = 0x6 + NET_RT_OIFLIST = 0x4 + NET_RT_OOIFLIST = 0x3 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + OFIOGETBMAP = 0xc004667a + ONLCR = 0x2 + ONLRET = 0x40 + ONOCR = 0x20 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_ALT_IO = 0x40000 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x400000 + O_CREAT = 0x200 + O_DIRECT = 0x80000 + O_DIRECTORY = 0x200000 + O_DSYNC = 0x10000 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_NOSIGPIPE = 0x1000000 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x20000 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PRI_IOFLUSH = 0x7c + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + RLIMIT_AS = 0xa + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x9 + RTAX_NETMASK = 0x2 + RTAX_TAG = 0x8 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTA_TAG = 0x100 + RTF_ANNOUNCE = 0x20000 + RTF_BLACKHOLE = 0x1000 + RTF_CLONED = 0x2000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 + RTF_MASK = 0x80 + RTF_MODIFIED = 0x20 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_REJECT = 0x8 + RTF_SRC = 0x10000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_CHGADDR = 0x15 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_GET = 0x4 + RTM_IEEE80211 = 0x11 + RTM_IFANNOUNCE = 0x10 + RTM_IFINFO = 0x14 + RTM_LLINFO_UPD = 0x13 + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_OIFINFO = 0xf + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_OOIFINFO = 0xe + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_SETGATE = 0x12 + RTM_VERSION = 0x4 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_CREDS = 0x4 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x8 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80906931 + SIOCADDRT = 0x8030720a + SIOCAIFADDR = 0x8040691a + SIOCALIFADDR = 0x8118691c + SIOCATMARK = 0x40047307 + SIOCDELMULTI = 0x80906932 + SIOCDELRT = 0x8030720b + SIOCDIFADDR = 0x80906919 + SIOCDIFPHYADDR = 0x80906949 + SIOCDLIFADDR = 0x8118691e + SIOCGDRVSPEC = 0xc01c697b + SIOCGETPFSYNC = 0xc09069f8 + SIOCGETSGCNT = 0xc0147534 + SIOCGETVIFCNT = 0xc0147533 + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0906921 + SIOCGIFADDRPREF = 0xc0946920 + SIOCGIFALIAS = 0xc040691b + SIOCGIFBRDADDR = 0xc0906923 + SIOCGIFCAP = 0xc0206976 + SIOCGIFCONF = 0xc0086926 + SIOCGIFDATA = 0xc0946985 + SIOCGIFDLT = 0xc0906977 + SIOCGIFDSTADDR = 0xc0906922 + SIOCGIFFLAGS = 0xc0906911 + SIOCGIFGENERIC = 0xc090693a + SIOCGIFMEDIA = 0xc0286936 + SIOCGIFMETRIC = 0xc0906917 + SIOCGIFMTU = 0xc090697e + SIOCGIFNETMASK = 0xc0906925 + SIOCGIFPDSTADDR = 0xc0906948 + SIOCGIFPSRCADDR = 0xc0906947 + SIOCGLIFADDR = 0xc118691d + SIOCGLIFPHYADDR = 0xc118694b + SIOCGLINKSTR = 0xc01c6987 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGVH = 0xc0906983 + SIOCIFCREATE = 0x8090697a + SIOCIFDESTROY = 0x80906979 + SIOCIFGCLONERS = 0xc00c6978 + SIOCINITIFADDR = 0xc0446984 + SIOCSDRVSPEC = 0x801c697b + SIOCSETPFSYNC = 0x809069f7 + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8090690c + SIOCSIFADDRPREF = 0x8094691f + SIOCSIFBRDADDR = 0x80906913 + SIOCSIFCAP = 0x80206975 + SIOCSIFDSTADDR = 0x8090690e + SIOCSIFFLAGS = 0x80906910 + SIOCSIFGENERIC = 0x80906939 + SIOCSIFMEDIA = 0xc0906935 + SIOCSIFMETRIC = 0x80906918 + SIOCSIFMTU = 0x8090697f + SIOCSIFNETMASK = 0x80906916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSLIFPHYADDR = 0x8118694a + SIOCSLINKSTR = 0x801c6988 + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SIOCSVH = 0xc0906982 + SIOCZIFDATA = 0xc0946986 + SOCK_CLOEXEC = 0x10000000 + SOCK_DGRAM = 0x2 + SOCK_FLAGS_MASK = 0xf0000000 + SOCK_NONBLOCK = 0x20000000 + SOCK_NOSIGPIPE = 0x40000000 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ACCEPTFILTER = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_NOHEADER = 0x100a + SO_NOSIGPIPE = 0x800 + SO_OOBINLINE = 0x100 + SO_OVERFLOWED = 0x1009 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x100c + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x100b + SO_TIMESTAMP = 0x2000 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SYSCTL_VERSION = 0x1000000 + SYSCTL_VERS_0 = 0x0 + SYSCTL_VERS_1 = 0x1000000 + SYSCTL_VERS_MASK = 0xff000000 + S_ARCH1 = 0x10000 + S_ARCH2 = 0x20000 + S_BLKSIZE = 0x200 + S_IEXEC = 0x40 + S_IFBLK = 0x6000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFIFO = 0x1000 + S_IFLNK = 0xa000 + S_IFMT = 0xf000 + S_IFREG = 0x8000 + S_IFSOCK = 0xc000 + S_IFWHT = 0xe000 + S_IREAD = 0x100 + S_IRGRP = 0x20 + S_IROTH = 0x4 + S_IRUSR = 0x100 + S_IRWXG = 0x38 + S_IRWXO = 0x7 + S_IRWXU = 0x1c0 + S_ISGID = 0x400 + S_ISTXT = 0x200 + S_ISUID = 0x800 + S_ISVTX = 0x200 + S_IWGRP = 0x10 + S_IWOTH = 0x2 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXGRP = 0x8 + S_IXOTH = 0x1 + S_IXUSR = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_CONGCTL = 0x20 + TCP_KEEPCNT = 0x6 + TCP_KEEPIDLE = 0x3 + TCP_KEEPINIT = 0x7 + TCP_KEEPINTVL = 0x5 + TCP_MAXBURST = 0x4 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x10 + TCP_MINMSS = 0xd8 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDCDTIMESTAMP = 0x400c7458 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLAG_CDTRCTS = 0x10 + TIOCFLAG_CLOCAL = 0x2 + TIOCFLAG_CRTSCTS = 0x4 + TIOCFLAG_MDMBUF = 0x8 + TIOCFLAG_SOFTCAR = 0x1 + TIOCFLUSH = 0x80047410 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGFLAGS = 0x4004745d + TIOCGLINED = 0x40207442 + TIOCGPGRP = 0x40047477 + TIOCGQSIZE = 0x40047481 + TIOCGRANTPT = 0x20007447 + TIOCGSID = 0x40047463 + TIOCGSIZE = 0x40087468 + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGET = 0x4004746a + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCPTMGET = 0x48087446 + TIOCPTSNAME = 0x48087448 + TIOCRCVFRAME = 0x80047445 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSFLAGS = 0x8004745c + TIOCSIG = 0x2000745f + TIOCSLINED = 0x80207443 + TIOCSPGRP = 0x80047476 + TIOCSQSIZE = 0x80047480 + TIOCSSIZE = 0x80087467 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x80047465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSWINSZ = 0x80087467 + TIOCUCNTL = 0x80047466 + TIOCXMTFRAME = 0x80047444 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WALL = 0x8 + WALLSIG = 0x8 + WALTSIG = 0x4 + WCLONE = 0x4 + WCOREFLAG = 0x80 + WNOHANG = 0x1 + WNOWAIT = 0x10000 + WNOZOMBIE = 0x20000 + WOPTSCHECKED = 0x40000 + WSTOPPED = 0x7f + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADMSG = syscall.Errno(0x58) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x57) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x52) + EILSEQ = syscall.Errno(0x55) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x60) + ELOOP = syscall.Errno(0x3e) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + EMULTIHOP = syscall.Errno(0x5e) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x5d) + ENOBUFS = syscall.Errno(0x37) + ENODATA = syscall.Errno(0x59) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOLINK = syscall.Errno(0x5f) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x53) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x5a) + ENOSTR = syscall.Errno(0x5b) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x56) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x54) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTO = syscall.Errno(0x60) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIME = syscall.Errno(0x5c) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGPWR = syscall.Signal(0x20) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large or too small", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol option not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "connection timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "identifier removed", + 83: "no message of desired type", + 84: "value too large to be stored in data type", + 85: "illegal byte sequence", + 86: "not supported", + 87: "operation Canceled", + 88: "bad or Corrupt message", + 89: "no message available", + 90: "no STREAM resources", + 91: "not a STREAM", + 92: "STREAM ioctl timeout", + 93: "attribute not found", + 94: "multihop attempted", + 95: "link has been severed", + 96: "protocol error", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "stopped (signal)", + 18: "stopped", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "power fail/restart", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go new file mode 100644 index 000000000..3322e998d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_386.go @@ -0,0 +1,1584 @@ +// mkerrors.sh -m32 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,openbsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m32 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_BLUETOOTH = 0x20 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_ENCAP = 0x1c + AF_HYLINK = 0xf + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x18 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_KEY = 0x1e + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x24 + AF_MPLS = 0x21 + AF_NATM = 0x1b + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SIP = 0x1d + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + ARPHRD_ETHER = 0x1 + ARPHRD_FRELAY = 0xf + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDIRFILT = 0x4004427c + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc008427b + BIOCGETIF = 0x4020426b + BIOCGFILDROP = 0x40044278 + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044273 + BIOCGRTIMEOUT = 0x400c426e + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x20004276 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDIRFILT = 0x8004427d + BIOCSDLT = 0x8004427a + BIOCSETF = 0x80084267 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x80084277 + BIOCSFILDROP = 0x80044279 + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044272 + BIOCSRTIMEOUT = 0x800c426d + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIRECTION_IN = 0x1 + BPF_DIRECTION_OUT = 0x2 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x200000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0xff + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DIOCOSFPFLUSH = 0x2000444e + DLT_ARCNET = 0x7 + DLT_ATM_RFC1483 = 0xb + DLT_AX25 = 0x3 + DLT_CHAOS = 0x5 + DLT_C_HDLC = 0x68 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0xd + DLT_FDDI = 0xa + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_LOOP = 0xc + DLT_MPLS = 0xdb + DLT_NULL = 0x0 + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_SERIAL = 0x32 + DLT_PRONET = 0x4 + DLT_RAW = 0xe + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EMT_TAGOVF = 0x1 + EMUL_ENABLED = 0x1 + EMUL_NATIVE = 0x2 + ENDRUNDISC = 0x9 + ETHERMIN = 0x2e + ETHERMTU = 0x5dc + ETHERTYPE_8023 = 0x4 + ETHERTYPE_AARP = 0x80f3 + ETHERTYPE_ACCTON = 0x8390 + ETHERTYPE_AEONIC = 0x8036 + ETHERTYPE_ALPHA = 0x814a + ETHERTYPE_AMBER = 0x6008 + ETHERTYPE_AMOEBA = 0x8145 + ETHERTYPE_AOE = 0x88a2 + ETHERTYPE_APOLLO = 0x80f7 + ETHERTYPE_APOLLODOMAIN = 0x8019 + ETHERTYPE_APPLETALK = 0x809b + ETHERTYPE_APPLITEK = 0x80c7 + ETHERTYPE_ARGONAUT = 0x803a + ETHERTYPE_ARP = 0x806 + ETHERTYPE_AT = 0x809b + ETHERTYPE_ATALK = 0x809b + ETHERTYPE_ATOMIC = 0x86df + ETHERTYPE_ATT = 0x8069 + ETHERTYPE_ATTSTANFORD = 0x8008 + ETHERTYPE_AUTOPHON = 0x806a + ETHERTYPE_AXIS = 0x8856 + ETHERTYPE_BCLOOP = 0x9003 + ETHERTYPE_BOFL = 0x8102 + ETHERTYPE_CABLETRON = 0x7034 + ETHERTYPE_CHAOS = 0x804 + ETHERTYPE_COMDESIGN = 0x806c + ETHERTYPE_COMPUGRAPHIC = 0x806d + ETHERTYPE_COUNTERPOINT = 0x8062 + ETHERTYPE_CRONUS = 0x8004 + ETHERTYPE_CRONUSVLN = 0x8003 + ETHERTYPE_DCA = 0x1234 + ETHERTYPE_DDE = 0x807b + ETHERTYPE_DEBNI = 0xaaaa + ETHERTYPE_DECAM = 0x8048 + ETHERTYPE_DECCUST = 0x6006 + ETHERTYPE_DECDIAG = 0x6005 + ETHERTYPE_DECDNS = 0x803c + ETHERTYPE_DECDTS = 0x803e + ETHERTYPE_DECEXPER = 0x6000 + ETHERTYPE_DECLAST = 0x8041 + ETHERTYPE_DECLTM = 0x803f + ETHERTYPE_DECMUMPS = 0x6009 + ETHERTYPE_DECNETBIOS = 0x8040 + ETHERTYPE_DELTACON = 0x86de + ETHERTYPE_DIDDLE = 0x4321 + ETHERTYPE_DLOG1 = 0x660 + ETHERTYPE_DLOG2 = 0x661 + ETHERTYPE_DN = 0x6003 + ETHERTYPE_DOGFIGHT = 0x1989 + ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_ECMA = 0x803 + ETHERTYPE_ENCRYPT = 0x803d + ETHERTYPE_ES = 0x805d + ETHERTYPE_EXCELAN = 0x8010 + ETHERTYPE_EXPERDATA = 0x8049 + ETHERTYPE_FLIP = 0x8146 + ETHERTYPE_FLOWCONTROL = 0x8808 + ETHERTYPE_FRARP = 0x808 + ETHERTYPE_GENDYN = 0x8068 + ETHERTYPE_HAYES = 0x8130 + ETHERTYPE_HIPPI_FP = 0x8180 + ETHERTYPE_HITACHI = 0x8820 + ETHERTYPE_HP = 0x8005 + ETHERTYPE_IEEEPUP = 0xa00 + ETHERTYPE_IEEEPUPAT = 0xa01 + ETHERTYPE_IMLBL = 0x4c42 + ETHERTYPE_IMLBLDIAG = 0x424c + ETHERTYPE_IP = 0x800 + ETHERTYPE_IPAS = 0x876c + ETHERTYPE_IPV6 = 0x86dd + ETHERTYPE_IPX = 0x8137 + ETHERTYPE_IPXNEW = 0x8037 + ETHERTYPE_KALPANA = 0x8582 + ETHERTYPE_LANBRIDGE = 0x8038 + ETHERTYPE_LANPROBE = 0x8888 + ETHERTYPE_LAT = 0x6004 + ETHERTYPE_LBACK = 0x9000 + ETHERTYPE_LITTLE = 0x8060 + ETHERTYPE_LLDP = 0x88cc + ETHERTYPE_LOGICRAFT = 0x8148 + ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MATRA = 0x807a + ETHERTYPE_MAX = 0xffff + ETHERTYPE_MERIT = 0x807c + ETHERTYPE_MICP = 0x873a + ETHERTYPE_MOPDL = 0x6001 + ETHERTYPE_MOPRC = 0x6002 + ETHERTYPE_MOTOROLA = 0x818d + ETHERTYPE_MPLS = 0x8847 + ETHERTYPE_MPLS_MCAST = 0x8848 + ETHERTYPE_MUMPS = 0x813f + ETHERTYPE_NBPCC = 0x3c04 + ETHERTYPE_NBPCLAIM = 0x3c09 + ETHERTYPE_NBPCLREQ = 0x3c05 + ETHERTYPE_NBPCLRSP = 0x3c06 + ETHERTYPE_NBPCREQ = 0x3c02 + ETHERTYPE_NBPCRSP = 0x3c03 + ETHERTYPE_NBPDG = 0x3c07 + ETHERTYPE_NBPDGB = 0x3c08 + ETHERTYPE_NBPDLTE = 0x3c0a + ETHERTYPE_NBPRAR = 0x3c0c + ETHERTYPE_NBPRAS = 0x3c0b + ETHERTYPE_NBPRST = 0x3c0d + ETHERTYPE_NBPSCD = 0x3c01 + ETHERTYPE_NBPVCD = 0x3c00 + ETHERTYPE_NBS = 0x802 + ETHERTYPE_NCD = 0x8149 + ETHERTYPE_NESTAR = 0x8006 + ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NOVELL = 0x8138 + ETHERTYPE_NS = 0x600 + ETHERTYPE_NSAT = 0x601 + ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NTRAILER = 0x10 + ETHERTYPE_OS9 = 0x7007 + ETHERTYPE_OS9NET = 0x7009 + ETHERTYPE_PACER = 0x80c6 + ETHERTYPE_PAE = 0x888e + ETHERTYPE_PCS = 0x4242 + ETHERTYPE_PLANNING = 0x8044 + ETHERTYPE_PPP = 0x880b + ETHERTYPE_PPPOE = 0x8864 + ETHERTYPE_PPPOEDISC = 0x8863 + ETHERTYPE_PRIMENTS = 0x7031 + ETHERTYPE_PUP = 0x200 + ETHERTYPE_PUPAT = 0x200 + ETHERTYPE_QINQ = 0x88a8 + ETHERTYPE_RACAL = 0x7030 + ETHERTYPE_RATIONAL = 0x8150 + ETHERTYPE_RAWFR = 0x6559 + ETHERTYPE_RCL = 0x1995 + ETHERTYPE_RDP = 0x8739 + ETHERTYPE_RETIX = 0x80f2 + ETHERTYPE_REVARP = 0x8035 + ETHERTYPE_SCA = 0x6007 + ETHERTYPE_SECTRA = 0x86db + ETHERTYPE_SECUREDATA = 0x876d + ETHERTYPE_SGITW = 0x817e + ETHERTYPE_SG_BOUNCE = 0x8016 + ETHERTYPE_SG_DIAG = 0x8013 + ETHERTYPE_SG_NETGAMES = 0x8014 + ETHERTYPE_SG_RESV = 0x8015 + ETHERTYPE_SIMNET = 0x5208 + ETHERTYPE_SLOW = 0x8809 + ETHERTYPE_SNA = 0x80d5 + ETHERTYPE_SNMP = 0x814c + ETHERTYPE_SONIX = 0xfaf5 + ETHERTYPE_SPIDER = 0x809f + ETHERTYPE_SPRITE = 0x500 + ETHERTYPE_STP = 0x8181 + ETHERTYPE_TALARIS = 0x812b + ETHERTYPE_TALARISMC = 0x852b + ETHERTYPE_TCPCOMP = 0x876b + ETHERTYPE_TCPSM = 0x9002 + ETHERTYPE_TEC = 0x814f + ETHERTYPE_TIGAN = 0x802f + ETHERTYPE_TRAIL = 0x1000 + ETHERTYPE_TRANSETHER = 0x6558 + ETHERTYPE_TYMSHARE = 0x802e + ETHERTYPE_UBBST = 0x7005 + ETHERTYPE_UBDEBUG = 0x900 + ETHERTYPE_UBDIAGLOOP = 0x7002 + ETHERTYPE_UBDL = 0x7000 + ETHERTYPE_UBNIU = 0x7001 + ETHERTYPE_UBNMC = 0x7003 + ETHERTYPE_VALID = 0x1600 + ETHERTYPE_VARIAN = 0x80dd + ETHERTYPE_VAXELN = 0x803b + ETHERTYPE_VEECO = 0x8067 + ETHERTYPE_VEXP = 0x805b + ETHERTYPE_VGLAB = 0x8131 + ETHERTYPE_VINES = 0xbad + ETHERTYPE_VINESECHO = 0xbaf + ETHERTYPE_VINESLOOP = 0xbae + ETHERTYPE_VITAL = 0xff00 + ETHERTYPE_VLAN = 0x8100 + ETHERTYPE_VLTLMAN = 0x8080 + ETHERTYPE_VPROD = 0x805c + ETHERTYPE_VURESERVED = 0x8147 + ETHERTYPE_WATERLOO = 0x8130 + ETHERTYPE_WELLFLEET = 0x8103 + ETHERTYPE_X25 = 0x805 + ETHERTYPE_X75 = 0x801 + ETHERTYPE_XNSSM = 0x9001 + ETHERTYPE_XTP = 0x817d + ETHER_ADDR_LEN = 0x6 + ETHER_ALIGN = 0x2 + ETHER_CRC_LEN = 0x4 + ETHER_CRC_POLY_BE = 0x4c11db6 + ETHER_CRC_POLY_LE = 0xedb88320 + ETHER_HDR_LEN = 0xe + ETHER_MAX_DIX_LEN = 0x600 + ETHER_MAX_LEN = 0x5ee + ETHER_MIN_LEN = 0x40 + ETHER_TYPE_LEN = 0x2 + ETHER_VLAN_ENCAP_LEN = 0x4 + EVFILT_AIO = -0x3 + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0x7 + EVFILT_TIMER = -0x7 + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0xa + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETOWN = 0x5 + F_OK = 0x0 + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFA_ROUTE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x8e52 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BLUETOOTH = 0xf8 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf7 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DUMMY = 0xf1 + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ECONET = 0xce + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf3 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LINEGROUP = 0xd2 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf5 + IFT_PFLOW = 0xf9 + IFT_PFSYNC = 0xf6 + IFT_PLC = 0xae + IFT_PON155 = 0xcf + IFT_PON622 = 0xd0 + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPATM = 0xc5 + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf2 + IFT_Q2931 = 0xc9 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SIPSIG = 0xcc + IFT_SIPTG = 0xcb + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TELINK = 0xc8 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VIRTUALTG = 0xca + IFT_VOICEDID = 0xd5 + IFT_VOICEEM = 0x64 + IFT_VOICEEMFGD = 0xd3 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFGDEANA = 0xd4 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERCABLE = 0xc6 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IN_RFC3021_HOST = 0x1 + IN_RFC3021_NET = 0xfffffffe + IN_RFC3021_NSHIFT = 0x1f + IPPROTO_AH = 0x33 + IPPROTO_CARP = 0x70 + IPPROTO_DIVERT = 0x102 + IPPROTO_DIVERT_INIT = 0x2 + IPPROTO_DIVERT_RESP = 0x1 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPIP = 0x4 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x103 + IPPROTO_MOBILE = 0x37 + IPPROTO_MPLS = 0x89 + IPPROTO_NONE = 0x3b + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPV6_AUTH_LEVEL = 0x35 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_ESP_NETWORK_LEVEL = 0x37 + IPV6_ESP_TRANS_LEVEL = 0x36 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPCOMP_LEVEL = 0x3c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_OPTIONS = 0x1 + IPV6_PATHMTU = 0x2c + IPV6_PIPEX = 0x3f + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVDSTPORT = 0x40 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTABLE = 0x1021 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_AUTH_LEVEL = 0x14 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DIVERTFL = 0x1022 + IP_DROP_MEMBERSHIP = 0xd + IP_ESP_NETWORK_LEVEL = 0x16 + IP_ESP_TRANS_LEVEL = 0x15 + IP_HDRINCL = 0x2 + IP_IPCOMP_LEVEL = 0x1d + IP_IPSECFLOWINFO = 0x24 + IP_IPSEC_LOCAL_AUTH = 0x1b + IP_IPSEC_LOCAL_CRED = 0x19 + IP_IPSEC_LOCAL_ID = 0x17 + IP_IPSEC_REMOTE_AUTH = 0x1c + IP_IPSEC_REMOTE_CRED = 0x1a + IP_IPSEC_REMOTE_ID = 0x18 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0xfff + IP_MF = 0x2000 + IP_MINTTL = 0x20 + IP_MIN_MEMBERSHIPS = 0xf + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x1 + IP_PIPEX = 0x22 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVDSTPORT = 0x21 + IP_RECVIF = 0x1e + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVRTABLE = 0x23 + IP_RECVTTL = 0x1f + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RTABLE = 0x1021 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LCNT_OVERLOAD_FLUSH = 0x6 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x6 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_SPACEAVAIL = 0x5 + MADV_WILLNEED = 0x3 + MAP_ANON = 0x1000 + MAP_COPY = 0x4 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_FLAGMASK = 0x1ff7 + MAP_HASSEMAPHORE = 0x200 + MAP_INHERIT = 0x80 + MAP_INHERIT_COPY = 0x1 + MAP_INHERIT_DONATE_COPY = 0x3 + MAP_INHERIT_NONE = 0x2 + MAP_INHERIT_SHARE = 0x0 + MAP_NOEXTEND = 0x100 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_SHARED = 0x1 + MAP_TRYFIXED = 0x400 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_BCAST = 0x100 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOR = 0x8 + MSG_MCAST = 0x200 + MSG_NOSIGNAL = 0x400 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x4 + MS_SYNC = 0x2 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_MAXID = 0x6 + NET_RT_STATS = 0x4 + NET_RT_TABLE = 0x5 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EOF = 0x2 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRUNCATE = 0x80 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x80 + ONOCR = 0x40 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x10000 + O_CREAT = 0x200 + O_DIRECTORY = 0x20000 + O_DSYNC = 0x80 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x80 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PF_FLUSH = 0x1 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + PT_MASK = 0x3ff000 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_LABEL = 0xa + RTAX_MAX = 0xb + RTAX_NETMASK = 0x2 + RTAX_SRC = 0x8 + RTAX_SRCMASK = 0x9 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_LABEL = 0x400 + RTA_NETMASK = 0x4 + RTA_SRC = 0x100 + RTA_SRCMASK = 0x200 + RTF_ANNOUNCE = 0x4000 + RTF_BLACKHOLE = 0x1000 + RTF_CLONED = 0x10000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_FMASK = 0x10f808 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 + RTF_MASK = 0x80 + RTF_MODIFIED = 0x20 + RTF_MPATH = 0x40000 + RTF_MPLS = 0x100000 + RTF_PERMANENT_ARP = 0x2000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x2000 + RTF_REJECT = 0x8 + RTF_SOURCE = 0x20000 + RTF_STATIC = 0x800 + RTF_TUNNEL = 0x100000 + RTF_UP = 0x1 + RTF_USETRAILERS = 0x8000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DESYNC = 0x10 + RTM_GET = 0x4 + RTM_IFANNOUNCE = 0xf + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MAXSIZE = 0x800 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RT_TABLEID_MAX = 0xff + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x4 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCAIFGROUP = 0x80246987 + SIOCALIFADDR = 0x8218691c + SIOCATMARK = 0x40047307 + SIOCBRDGADD = 0x8054693c + SIOCBRDGADDS = 0x80546941 + SIOCBRDGARL = 0x806e694d + SIOCBRDGDADDR = 0x81286947 + SIOCBRDGDEL = 0x8054693d + SIOCBRDGDELS = 0x80546942 + SIOCBRDGFLUSH = 0x80546948 + SIOCBRDGFRL = 0x806e694e + SIOCBRDGGCACHE = 0xc0146941 + SIOCBRDGGFD = 0xc0146952 + SIOCBRDGGHT = 0xc0146951 + SIOCBRDGGIFFLGS = 0xc054693e + SIOCBRDGGMA = 0xc0146953 + SIOCBRDGGPARAM = 0xc03c6958 + SIOCBRDGGPRI = 0xc0146950 + SIOCBRDGGRL = 0xc028694f + SIOCBRDGGSIFS = 0xc054693c + SIOCBRDGGTO = 0xc0146946 + SIOCBRDGIFS = 0xc0546942 + SIOCBRDGRTS = 0xc0186943 + SIOCBRDGSADDR = 0xc1286944 + SIOCBRDGSCACHE = 0x80146940 + SIOCBRDGSFD = 0x80146952 + SIOCBRDGSHT = 0x80146951 + SIOCBRDGSIFCOST = 0x80546955 + SIOCBRDGSIFFLGS = 0x8054693f + SIOCBRDGSIFPRIO = 0x80546954 + SIOCBRDGSMA = 0x80146953 + SIOCBRDGSPRI = 0x80146950 + SIOCBRDGSPROTO = 0x8014695a + SIOCBRDGSTO = 0x80146945 + SIOCBRDGSTXHC = 0x80146959 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFGROUP = 0x80246989 + SIOCDIFPHYADDR = 0x80206949 + SIOCDLIFADDR = 0x8218691e + SIOCGETKALIVE = 0xc01869a4 + SIOCGETLABEL = 0x8020699a + SIOCGETPFLOW = 0xc02069fe + SIOCGETPFSYNC = 0xc02069f8 + SIOCGETSGCNT = 0xc0147534 + SIOCGETVIFCNT = 0xc0147533 + SIOCGETVLAN = 0xc0206990 + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFASYNCMAP = 0xc020697c + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCONF = 0xc0086924 + SIOCGIFDATA = 0xc020691b + SIOCGIFDESCR = 0xc0206981 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGATTR = 0xc024698b + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc024698a + SIOCGIFGROUP = 0xc0246988 + SIOCGIFHARDMTU = 0xc02069a5 + SIOCGIFMEDIA = 0xc0286936 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc020697e + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPRIORITY = 0xc020699c + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFRDOMAIN = 0xc02069a0 + SIOCGIFRTLABEL = 0xc0206983 + SIOCGIFTIMESLOT = 0xc0206986 + SIOCGIFXFLAGS = 0xc020699e + SIOCGLIFADDR = 0xc218691d + SIOCGLIFPHYADDR = 0xc218694b + SIOCGLIFPHYRTABLE = 0xc02069a2 + SIOCGLIFPHYTTL = 0xc02069a9 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGSPPPPARAMS = 0xc0206994 + SIOCGVH = 0xc02069f6 + SIOCGVNETID = 0xc02069a7 + SIOCIFCREATE = 0x8020697a + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc00c6978 + SIOCSETKALIVE = 0x801869a3 + SIOCSETLABEL = 0x80206999 + SIOCSETPFLOW = 0x802069fd + SIOCSETPFSYNC = 0x802069f7 + SIOCSETVLAN = 0x8020698f + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFASYNCMAP = 0x8020697d + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFDESCR = 0x80206980 + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGATTR = 0x8024698c + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020691f + SIOCSIFMEDIA = 0xc0206935 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x8020697f + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPRIORITY = 0x8020699b + SIOCSIFRDOMAIN = 0x8020699f + SIOCSIFRTLABEL = 0x80206982 + SIOCSIFTIMESLOT = 0x80206985 + SIOCSIFXFLAGS = 0x8020699d + SIOCSLIFPHYADDR = 0x8218694a + SIOCSLIFPHYRTABLE = 0x802069a1 + SIOCSLIFPHYTTL = 0x802069a8 + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SIOCSSPPPPARAMS = 0x80206993 + SIOCSVH = 0xc02069f5 + SIOCSVNETID = 0x802069a6 + SOCK_DGRAM = 0x2 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_BINDANY = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_NETPROC = 0x1020 + SO_OOBINLINE = 0x100 + SO_PEERCRED = 0x1022 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_RTABLE = 0x1021 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_SPLICE = 0x1023 + SO_TIMESTAMP = 0x800 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_MAXBURST = 0x4 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x3 + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x4 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOPUSH = 0x10 + TCP_NSTATES = 0xb + TCP_SACK_ENABLE = 0x8 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLAG_CLOCAL = 0x2 + TIOCFLAG_CRTSCTS = 0x4 + TIOCFLAG_MDMBUF = 0x8 + TIOCFLAG_PPS = 0x10 + TIOCFLAG_SOFTCAR = 0x1 + TIOCFLUSH = 0x80047410 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGFLAGS = 0x4004745d + TIOCGPGRP = 0x40047477 + TIOCGSID = 0x40047463 + TIOCGTSTAMP = 0x400c745b + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGET = 0x4004746a + TIOCMODG = 0x4004746a + TIOCMODS = 0x8004746d + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSFLAGS = 0x8004745c + TIOCSIG = 0x8004745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x80047465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSTSTAMP = 0x8008745a + TIOCSWINSZ = 0x80087467 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WALTSIG = 0x4 + WCONTINUED = 0x8 + WCOREFLAG = 0x80 + WNOHANG = 0x1 + WSTOPPED = 0x7f + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x58) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x59) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EIPSEC = syscall.Errno(0x52) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x5b) + ELOOP = syscall.Errno(0x3e) + EMEDIUMTYPE = syscall.Errno(0x56) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x53) + ENOBUFS = syscall.Errno(0x37) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOMEDIUM = syscall.Errno(0x55) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x5a) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x5b) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x57) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHR = syscall.Signal(0x20) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "connection timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "IPsec processing failure", + 83: "attribute not found", + 84: "illegal byte sequence", + 85: "no medium found", + 86: "wrong medium type", + 87: "value too large to be stored in data type", + 88: "operation canceled", + 89: "identifier removed", + 90: "no message of desired type", + 91: "not supported", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "stopped (signal)", + 18: "stopped", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "thread AST", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go new file mode 100644 index 000000000..1758ecca9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_openbsd_amd64.go @@ -0,0 +1,1583 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,openbsd + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_APPLETALK = 0x10 + AF_BLUETOOTH = 0x20 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_CNT = 0x15 + AF_COIP = 0x14 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_E164 = 0x1a + AF_ECMA = 0x8 + AF_ENCAP = 0x1c + AF_HYLINK = 0xf + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x18 + AF_IPX = 0x17 + AF_ISDN = 0x1a + AF_ISO = 0x7 + AF_KEY = 0x1e + AF_LAT = 0xe + AF_LINK = 0x12 + AF_LOCAL = 0x1 + AF_MAX = 0x24 + AF_MPLS = 0x21 + AF_NATM = 0x1b + AF_NS = 0x6 + AF_OSI = 0x7 + AF_PUP = 0x4 + AF_ROUTE = 0x11 + AF_SIP = 0x1d + AF_SNA = 0xb + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + ARPHRD_ETHER = 0x1 + ARPHRD_FRELAY = 0xf + ARPHRD_IEEE1394 = 0x18 + ARPHRD_IEEE802 = 0x6 + B0 = 0x0 + B110 = 0x6e + B115200 = 0x1c200 + B1200 = 0x4b0 + B134 = 0x86 + B14400 = 0x3840 + B150 = 0x96 + B1800 = 0x708 + B19200 = 0x4b00 + B200 = 0xc8 + B230400 = 0x38400 + B2400 = 0x960 + B28800 = 0x7080 + B300 = 0x12c + B38400 = 0x9600 + B4800 = 0x12c0 + B50 = 0x32 + B57600 = 0xe100 + B600 = 0x258 + B7200 = 0x1c20 + B75 = 0x4b + B76800 = 0x12c00 + B9600 = 0x2580 + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDIRFILT = 0x4004427c + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = 0xc010427b + BIOCGETIF = 0x4020426b + BIOCGFILDROP = 0x40044278 + BIOCGHDRCMPLT = 0x40044274 + BIOCGRSIG = 0x40044273 + BIOCGRTIMEOUT = 0x4010426e + BIOCGSTATS = 0x4008426f + BIOCIMMEDIATE = 0x80044270 + BIOCLOCK = 0x20004276 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = 0xc0044266 + BIOCSDIRFILT = 0x8004427d + BIOCSDLT = 0x8004427a + BIOCSETF = 0x80104267 + BIOCSETIF = 0x8020426c + BIOCSETWF = 0x80104277 + BIOCSFILDROP = 0x80044279 + BIOCSHDRCMPLT = 0x80044275 + BIOCSRSIG = 0x80044272 + BIOCSRTIMEOUT = 0x8010426d + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DIRECTION_IN = 0x1 + BPF_DIRECTION_OUT = 0x2 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x200000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x8000 + CREAD = 0x800 + CS5 = 0x0 + CS6 = 0x100 + CS7 = 0x200 + CS8 = 0x300 + CSIZE = 0x300 + CSTART = 0x11 + CSTATUS = 0xff + CSTOP = 0x13 + CSTOPB = 0x400 + CSUSP = 0x1a + CTL_MAXNAME = 0xc + CTL_NET = 0x4 + DIOCOSFPFLUSH = 0x2000444e + DLT_ARCNET = 0x7 + DLT_ATM_RFC1483 = 0xb + DLT_AX25 = 0x3 + DLT_CHAOS = 0x5 + DLT_C_HDLC = 0x68 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0xd + DLT_FDDI = 0xa + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_LOOP = 0xc + DLT_MPLS = 0xdb + DLT_NULL = 0x0 + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0x10 + DLT_PPP_ETHER = 0x33 + DLT_PPP_SERIAL = 0x32 + DLT_PRONET = 0x4 + DLT_RAW = 0xe + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xf + DT_BLK = 0x6 + DT_CHR = 0x2 + DT_DIR = 0x4 + DT_FIFO = 0x1 + DT_LNK = 0xa + DT_REG = 0x8 + DT_SOCK = 0xc + DT_UNKNOWN = 0x0 + ECHO = 0x8 + ECHOCTL = 0x40 + ECHOE = 0x2 + ECHOK = 0x4 + ECHOKE = 0x1 + ECHONL = 0x10 + ECHOPRT = 0x20 + EMT_TAGOVF = 0x1 + EMUL_ENABLED = 0x1 + EMUL_NATIVE = 0x2 + ENDRUNDISC = 0x9 + ETHERMIN = 0x2e + ETHERMTU = 0x5dc + ETHERTYPE_8023 = 0x4 + ETHERTYPE_AARP = 0x80f3 + ETHERTYPE_ACCTON = 0x8390 + ETHERTYPE_AEONIC = 0x8036 + ETHERTYPE_ALPHA = 0x814a + ETHERTYPE_AMBER = 0x6008 + ETHERTYPE_AMOEBA = 0x8145 + ETHERTYPE_AOE = 0x88a2 + ETHERTYPE_APOLLO = 0x80f7 + ETHERTYPE_APOLLODOMAIN = 0x8019 + ETHERTYPE_APPLETALK = 0x809b + ETHERTYPE_APPLITEK = 0x80c7 + ETHERTYPE_ARGONAUT = 0x803a + ETHERTYPE_ARP = 0x806 + ETHERTYPE_AT = 0x809b + ETHERTYPE_ATALK = 0x809b + ETHERTYPE_ATOMIC = 0x86df + ETHERTYPE_ATT = 0x8069 + ETHERTYPE_ATTSTANFORD = 0x8008 + ETHERTYPE_AUTOPHON = 0x806a + ETHERTYPE_AXIS = 0x8856 + ETHERTYPE_BCLOOP = 0x9003 + ETHERTYPE_BOFL = 0x8102 + ETHERTYPE_CABLETRON = 0x7034 + ETHERTYPE_CHAOS = 0x804 + ETHERTYPE_COMDESIGN = 0x806c + ETHERTYPE_COMPUGRAPHIC = 0x806d + ETHERTYPE_COUNTERPOINT = 0x8062 + ETHERTYPE_CRONUS = 0x8004 + ETHERTYPE_CRONUSVLN = 0x8003 + ETHERTYPE_DCA = 0x1234 + ETHERTYPE_DDE = 0x807b + ETHERTYPE_DEBNI = 0xaaaa + ETHERTYPE_DECAM = 0x8048 + ETHERTYPE_DECCUST = 0x6006 + ETHERTYPE_DECDIAG = 0x6005 + ETHERTYPE_DECDNS = 0x803c + ETHERTYPE_DECDTS = 0x803e + ETHERTYPE_DECEXPER = 0x6000 + ETHERTYPE_DECLAST = 0x8041 + ETHERTYPE_DECLTM = 0x803f + ETHERTYPE_DECMUMPS = 0x6009 + ETHERTYPE_DECNETBIOS = 0x8040 + ETHERTYPE_DELTACON = 0x86de + ETHERTYPE_DIDDLE = 0x4321 + ETHERTYPE_DLOG1 = 0x660 + ETHERTYPE_DLOG2 = 0x661 + ETHERTYPE_DN = 0x6003 + ETHERTYPE_DOGFIGHT = 0x1989 + ETHERTYPE_DSMD = 0x8039 + ETHERTYPE_ECMA = 0x803 + ETHERTYPE_ENCRYPT = 0x803d + ETHERTYPE_ES = 0x805d + ETHERTYPE_EXCELAN = 0x8010 + ETHERTYPE_EXPERDATA = 0x8049 + ETHERTYPE_FLIP = 0x8146 + ETHERTYPE_FLOWCONTROL = 0x8808 + ETHERTYPE_FRARP = 0x808 + ETHERTYPE_GENDYN = 0x8068 + ETHERTYPE_HAYES = 0x8130 + ETHERTYPE_HIPPI_FP = 0x8180 + ETHERTYPE_HITACHI = 0x8820 + ETHERTYPE_HP = 0x8005 + ETHERTYPE_IEEEPUP = 0xa00 + ETHERTYPE_IEEEPUPAT = 0xa01 + ETHERTYPE_IMLBL = 0x4c42 + ETHERTYPE_IMLBLDIAG = 0x424c + ETHERTYPE_IP = 0x800 + ETHERTYPE_IPAS = 0x876c + ETHERTYPE_IPV6 = 0x86dd + ETHERTYPE_IPX = 0x8137 + ETHERTYPE_IPXNEW = 0x8037 + ETHERTYPE_KALPANA = 0x8582 + ETHERTYPE_LANBRIDGE = 0x8038 + ETHERTYPE_LANPROBE = 0x8888 + ETHERTYPE_LAT = 0x6004 + ETHERTYPE_LBACK = 0x9000 + ETHERTYPE_LITTLE = 0x8060 + ETHERTYPE_LLDP = 0x88cc + ETHERTYPE_LOGICRAFT = 0x8148 + ETHERTYPE_LOOPBACK = 0x9000 + ETHERTYPE_MATRA = 0x807a + ETHERTYPE_MAX = 0xffff + ETHERTYPE_MERIT = 0x807c + ETHERTYPE_MICP = 0x873a + ETHERTYPE_MOPDL = 0x6001 + ETHERTYPE_MOPRC = 0x6002 + ETHERTYPE_MOTOROLA = 0x818d + ETHERTYPE_MPLS = 0x8847 + ETHERTYPE_MPLS_MCAST = 0x8848 + ETHERTYPE_MUMPS = 0x813f + ETHERTYPE_NBPCC = 0x3c04 + ETHERTYPE_NBPCLAIM = 0x3c09 + ETHERTYPE_NBPCLREQ = 0x3c05 + ETHERTYPE_NBPCLRSP = 0x3c06 + ETHERTYPE_NBPCREQ = 0x3c02 + ETHERTYPE_NBPCRSP = 0x3c03 + ETHERTYPE_NBPDG = 0x3c07 + ETHERTYPE_NBPDGB = 0x3c08 + ETHERTYPE_NBPDLTE = 0x3c0a + ETHERTYPE_NBPRAR = 0x3c0c + ETHERTYPE_NBPRAS = 0x3c0b + ETHERTYPE_NBPRST = 0x3c0d + ETHERTYPE_NBPSCD = 0x3c01 + ETHERTYPE_NBPVCD = 0x3c00 + ETHERTYPE_NBS = 0x802 + ETHERTYPE_NCD = 0x8149 + ETHERTYPE_NESTAR = 0x8006 + ETHERTYPE_NETBEUI = 0x8191 + ETHERTYPE_NOVELL = 0x8138 + ETHERTYPE_NS = 0x600 + ETHERTYPE_NSAT = 0x601 + ETHERTYPE_NSCOMPAT = 0x807 + ETHERTYPE_NTRAILER = 0x10 + ETHERTYPE_OS9 = 0x7007 + ETHERTYPE_OS9NET = 0x7009 + ETHERTYPE_PACER = 0x80c6 + ETHERTYPE_PAE = 0x888e + ETHERTYPE_PCS = 0x4242 + ETHERTYPE_PLANNING = 0x8044 + ETHERTYPE_PPP = 0x880b + ETHERTYPE_PPPOE = 0x8864 + ETHERTYPE_PPPOEDISC = 0x8863 + ETHERTYPE_PRIMENTS = 0x7031 + ETHERTYPE_PUP = 0x200 + ETHERTYPE_PUPAT = 0x200 + ETHERTYPE_QINQ = 0x88a8 + ETHERTYPE_RACAL = 0x7030 + ETHERTYPE_RATIONAL = 0x8150 + ETHERTYPE_RAWFR = 0x6559 + ETHERTYPE_RCL = 0x1995 + ETHERTYPE_RDP = 0x8739 + ETHERTYPE_RETIX = 0x80f2 + ETHERTYPE_REVARP = 0x8035 + ETHERTYPE_SCA = 0x6007 + ETHERTYPE_SECTRA = 0x86db + ETHERTYPE_SECUREDATA = 0x876d + ETHERTYPE_SGITW = 0x817e + ETHERTYPE_SG_BOUNCE = 0x8016 + ETHERTYPE_SG_DIAG = 0x8013 + ETHERTYPE_SG_NETGAMES = 0x8014 + ETHERTYPE_SG_RESV = 0x8015 + ETHERTYPE_SIMNET = 0x5208 + ETHERTYPE_SLOW = 0x8809 + ETHERTYPE_SNA = 0x80d5 + ETHERTYPE_SNMP = 0x814c + ETHERTYPE_SONIX = 0xfaf5 + ETHERTYPE_SPIDER = 0x809f + ETHERTYPE_SPRITE = 0x500 + ETHERTYPE_STP = 0x8181 + ETHERTYPE_TALARIS = 0x812b + ETHERTYPE_TALARISMC = 0x852b + ETHERTYPE_TCPCOMP = 0x876b + ETHERTYPE_TCPSM = 0x9002 + ETHERTYPE_TEC = 0x814f + ETHERTYPE_TIGAN = 0x802f + ETHERTYPE_TRAIL = 0x1000 + ETHERTYPE_TRANSETHER = 0x6558 + ETHERTYPE_TYMSHARE = 0x802e + ETHERTYPE_UBBST = 0x7005 + ETHERTYPE_UBDEBUG = 0x900 + ETHERTYPE_UBDIAGLOOP = 0x7002 + ETHERTYPE_UBDL = 0x7000 + ETHERTYPE_UBNIU = 0x7001 + ETHERTYPE_UBNMC = 0x7003 + ETHERTYPE_VALID = 0x1600 + ETHERTYPE_VARIAN = 0x80dd + ETHERTYPE_VAXELN = 0x803b + ETHERTYPE_VEECO = 0x8067 + ETHERTYPE_VEXP = 0x805b + ETHERTYPE_VGLAB = 0x8131 + ETHERTYPE_VINES = 0xbad + ETHERTYPE_VINESECHO = 0xbaf + ETHERTYPE_VINESLOOP = 0xbae + ETHERTYPE_VITAL = 0xff00 + ETHERTYPE_VLAN = 0x8100 + ETHERTYPE_VLTLMAN = 0x8080 + ETHERTYPE_VPROD = 0x805c + ETHERTYPE_VURESERVED = 0x8147 + ETHERTYPE_WATERLOO = 0x8130 + ETHERTYPE_WELLFLEET = 0x8103 + ETHERTYPE_X25 = 0x805 + ETHERTYPE_X75 = 0x801 + ETHERTYPE_XNSSM = 0x9001 + ETHERTYPE_XTP = 0x817d + ETHER_ADDR_LEN = 0x6 + ETHER_ALIGN = 0x2 + ETHER_CRC_LEN = 0x4 + ETHER_CRC_POLY_BE = 0x4c11db6 + ETHER_CRC_POLY_LE = 0xedb88320 + ETHER_HDR_LEN = 0xe + ETHER_MAX_DIX_LEN = 0x600 + ETHER_MAX_LEN = 0x5ee + ETHER_MIN_LEN = 0x40 + ETHER_TYPE_LEN = 0x2 + ETHER_VLAN_ENCAP_LEN = 0x4 + EVFILT_AIO = -0x3 + EVFILT_PROC = -0x5 + EVFILT_READ = -0x1 + EVFILT_SIGNAL = -0x6 + EVFILT_SYSCOUNT = 0x7 + EVFILT_TIMER = -0x7 + EVFILT_VNODE = -0x4 + EVFILT_WRITE = -0x2 + EV_ADD = 0x1 + EV_CLEAR = 0x20 + EV_DELETE = 0x2 + EV_DISABLE = 0x8 + EV_ENABLE = 0x4 + EV_EOF = 0x8000 + EV_ERROR = 0x4000 + EV_FLAG1 = 0x2000 + EV_ONESHOT = 0x10 + EV_SYSFLAGS = 0xf000 + EXTA = 0x4b00 + EXTB = 0x9600 + EXTPROC = 0x800 + FD_CLOEXEC = 0x1 + FD_SETSIZE = 0x400 + FLUSHO = 0x800000 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0xa + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0x7 + F_GETOWN = 0x5 + F_OK = 0x0 + F_RDLCK = 0x1 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x8 + F_SETLKW = 0x9 + F_SETOWN = 0x6 + F_UNLCK = 0x2 + F_WRLCK = 0x3 + HUPCL = 0x4000 + ICANON = 0x100 + ICMP6_FILTER = 0x12 + ICRNL = 0x100 + IEXTEN = 0x400 + IFAN_ARRIVAL = 0x0 + IFAN_DEPARTURE = 0x1 + IFA_ROUTE = 0x1 + IFF_ALLMULTI = 0x200 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x8e52 + IFF_DEBUG = 0x4 + IFF_LINK0 = 0x1000 + IFF_LINK1 = 0x2000 + IFF_LINK2 = 0x4000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x8000 + IFF_NOARP = 0x80 + IFF_NOTRAILERS = 0x20 + IFF_OACTIVE = 0x400 + IFF_POINTOPOINT = 0x10 + IFF_PROMISC = 0x100 + IFF_RUNNING = 0x40 + IFF_SIMPLEX = 0x800 + IFF_UP = 0x1 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_A12MPPSWITCH = 0x82 + IFT_AAL2 = 0xbb + IFT_AAL5 = 0x31 + IFT_ADSL = 0x5e + IFT_AFLANE8023 = 0x3b + IFT_AFLANE8025 = 0x3c + IFT_ARAP = 0x58 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ASYNC = 0x54 + IFT_ATM = 0x25 + IFT_ATMDXI = 0x69 + IFT_ATMFUNI = 0x6a + IFT_ATMIMA = 0x6b + IFT_ATMLOGICAL = 0x50 + IFT_ATMRADIO = 0xbd + IFT_ATMSUBINTERFACE = 0x86 + IFT_ATMVCIENDPT = 0xc2 + IFT_ATMVIRTUAL = 0x95 + IFT_BGPPOLICYACCOUNTING = 0xa2 + IFT_BLUETOOTH = 0xf8 + IFT_BRIDGE = 0xd1 + IFT_BSC = 0x53 + IFT_CARP = 0xf7 + IFT_CCTEMUL = 0x3d + IFT_CEPT = 0x13 + IFT_CES = 0x85 + IFT_CHANNEL = 0x46 + IFT_CNR = 0x55 + IFT_COFFEE = 0x84 + IFT_COMPOSITELINK = 0x9b + IFT_DCN = 0x8d + IFT_DIGITALPOWERLINE = 0x8a + IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba + IFT_DLSW = 0x4a + IFT_DOCSCABLEDOWNSTREAM = 0x80 + IFT_DOCSCABLEMACLAYER = 0x7f + IFT_DOCSCABLEUPSTREAM = 0x81 + IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd + IFT_DS0 = 0x51 + IFT_DS0BUNDLE = 0x52 + IFT_DS1FDL = 0xaa + IFT_DS3 = 0x1e + IFT_DTM = 0x8c + IFT_DUMMY = 0xf1 + IFT_DVBASILN = 0xac + IFT_DVBASIOUT = 0xad + IFT_DVBRCCDOWNSTREAM = 0x93 + IFT_DVBRCCMACLAYER = 0x92 + IFT_DVBRCCUPSTREAM = 0x94 + IFT_ECONET = 0xce + IFT_ENC = 0xf4 + IFT_EON = 0x19 + IFT_EPLRS = 0x57 + IFT_ESCON = 0x49 + IFT_ETHER = 0x6 + IFT_FAITH = 0xf3 + IFT_FAST = 0x7d + IFT_FASTETHER = 0x3e + IFT_FASTETHERFX = 0x45 + IFT_FDDI = 0xf + IFT_FIBRECHANNEL = 0x38 + IFT_FRAMERELAYINTERCONNECT = 0x3a + IFT_FRAMERELAYMPI = 0x5c + IFT_FRDLCIENDPT = 0xc1 + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_FRF16MFRBUNDLE = 0xa3 + IFT_FRFORWARD = 0x9e + IFT_G703AT2MB = 0x43 + IFT_G703AT64K = 0x42 + IFT_GIF = 0xf0 + IFT_GIGABITETHERNET = 0x75 + IFT_GR303IDT = 0xb2 + IFT_GR303RDT = 0xb1 + IFT_H323GATEKEEPER = 0xa4 + IFT_H323PROXY = 0xa5 + IFT_HDH1822 = 0x3 + IFT_HDLC = 0x76 + IFT_HDSL2 = 0xa8 + IFT_HIPERLAN2 = 0xb7 + IFT_HIPPI = 0x2f + IFT_HIPPIINTERFACE = 0x39 + IFT_HOSTPAD = 0x5a + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IBM370PARCHAN = 0x48 + IFT_IDSL = 0x9a + IFT_IEEE1394 = 0x90 + IFT_IEEE80211 = 0x47 + IFT_IEEE80212 = 0x37 + IFT_IEEE8023ADLAG = 0xa1 + IFT_IFGSN = 0x91 + IFT_IMT = 0xbe + IFT_INFINIBAND = 0xc7 + IFT_INTERLEAVE = 0x7c + IFT_IP = 0x7e + IFT_IPFORWARD = 0x8e + IFT_IPOVERATM = 0x72 + IFT_IPOVERCDLC = 0x6d + IFT_IPOVERCLAW = 0x6e + IFT_IPSWITCH = 0x4e + IFT_ISDN = 0x3f + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISDNS = 0x4b + IFT_ISDNU = 0x4c + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88025CRFPINT = 0x62 + IFT_ISO88025DTR = 0x56 + IFT_ISO88025FIBER = 0x73 + IFT_ISO88026 = 0xa + IFT_ISUP = 0xb3 + IFT_L2VLAN = 0x87 + IFT_L3IPVLAN = 0x88 + IFT_L3IPXVLAN = 0x89 + IFT_LAPB = 0x10 + IFT_LAPD = 0x4d + IFT_LAPF = 0x77 + IFT_LINEGROUP = 0xd2 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MEDIAMAILOVERIP = 0x8b + IFT_MFSIGLINK = 0xa7 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_MPC = 0x71 + IFT_MPLS = 0xa6 + IFT_MPLSTUNNEL = 0x96 + IFT_MSDSL = 0x8f + IFT_MVL = 0xbf + IFT_MYRINET = 0x63 + IFT_NFAS = 0xaf + IFT_NSIP = 0x1b + IFT_OPTICALCHANNEL = 0xc3 + IFT_OPTICALTRANSPORT = 0xc4 + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PFLOG = 0xf5 + IFT_PFLOW = 0xf9 + IFT_PFSYNC = 0xf6 + IFT_PLC = 0xae + IFT_PON155 = 0xcf + IFT_PON622 = 0xd0 + IFT_POS = 0xab + IFT_PPP = 0x17 + IFT_PPPMULTILINKBUNDLE = 0x6c + IFT_PROPATM = 0xc5 + IFT_PROPBWAP2MP = 0xb8 + IFT_PROPCNLS = 0x59 + IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 + IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 + IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PROPWIRELESSP2P = 0x9d + IFT_PTPSERIAL = 0x16 + IFT_PVC = 0xf2 + IFT_Q2931 = 0xc9 + IFT_QLLC = 0x44 + IFT_RADIOMAC = 0xbc + IFT_RADSL = 0x5f + IFT_REACHDSL = 0xc0 + IFT_RFC1483 = 0x9f + IFT_RS232 = 0x21 + IFT_RSRB = 0x4f + IFT_SDLC = 0x11 + IFT_SDSL = 0x60 + IFT_SHDSL = 0xa9 + IFT_SIP = 0x1f + IFT_SIPSIG = 0xcc + IFT_SIPTG = 0xcb + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETOVERHEADCHANNEL = 0xb9 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_SRP = 0x97 + IFT_SS7SIGLINK = 0x9c + IFT_STACKTOSTACK = 0x6f + IFT_STARLAN = 0xb + IFT_T1 = 0x12 + IFT_TDLC = 0x74 + IFT_TELINK = 0xc8 + IFT_TERMPAD = 0x5b + IFT_TR008 = 0xb0 + IFT_TRANSPHDLC = 0x7b + IFT_TUNNEL = 0x83 + IFT_ULTRA = 0x1d + IFT_USB = 0xa0 + IFT_V11 = 0x40 + IFT_V35 = 0x2d + IFT_V36 = 0x41 + IFT_V37 = 0x78 + IFT_VDSL = 0x61 + IFT_VIRTUALIPADDRESS = 0x70 + IFT_VIRTUALTG = 0xca + IFT_VOICEDID = 0xd5 + IFT_VOICEEM = 0x64 + IFT_VOICEEMFGD = 0xd3 + IFT_VOICEENCAP = 0x67 + IFT_VOICEFGDEANA = 0xd4 + IFT_VOICEFXO = 0x65 + IFT_VOICEFXS = 0x66 + IFT_VOICEOVERATM = 0x98 + IFT_VOICEOVERCABLE = 0xc6 + IFT_VOICEOVERFRAMERELAY = 0x99 + IFT_VOICEOVERIP = 0x68 + IFT_X213 = 0x5d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25HUNTGROUP = 0x7a + IFT_X25MLP = 0x79 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_LOOPBACKNET = 0x7f + IN_RFC3021_HOST = 0x1 + IN_RFC3021_NET = 0xfffffffe + IN_RFC3021_NSHIFT = 0x1f + IPPROTO_AH = 0x33 + IPPROTO_CARP = 0x70 + IPPROTO_DIVERT = 0x102 + IPPROTO_DIVERT_INIT = 0x2 + IPPROTO_DIVERT_RESP = 0x1 + IPPROTO_DONE = 0x101 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x62 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_ETHERIP = 0x61 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_GRE = 0x2f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPCOMP = 0x6c + IPPROTO_IPIP = 0x4 + IPPROTO_IPV4 = 0x4 + IPPROTO_IPV6 = 0x29 + IPPROTO_MAX = 0x100 + IPPROTO_MAXID = 0x103 + IPPROTO_MOBILE = 0x37 + IPPROTO_MPLS = 0x89 + IPPROTO_NONE = 0x3b + IPPROTO_PFSYNC = 0xf0 + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_TCP = 0x6 + IPPROTO_TP = 0x1d + IPPROTO_UDP = 0x11 + IPV6_AUTH_LEVEL = 0x35 + IPV6_AUTOFLOWLABEL = 0x3b + IPV6_CHECKSUM = 0x1a + IPV6_DEFAULT_MULTICAST_HOPS = 0x1 + IPV6_DEFAULT_MULTICAST_LOOP = 0x1 + IPV6_DEFHLIM = 0x40 + IPV6_DONTFRAG = 0x3e + IPV6_DSTOPTS = 0x32 + IPV6_ESP_NETWORK_LEVEL = 0x37 + IPV6_ESP_TRANS_LEVEL = 0x36 + IPV6_FAITH = 0x1d + IPV6_FLOWINFO_MASK = 0xffffff0f + IPV6_FLOWLABEL_MASK = 0xffff0f00 + IPV6_FRAGTTL = 0x78 + IPV6_HLIMDEC = 0x1 + IPV6_HOPLIMIT = 0x2f + IPV6_HOPOPTS = 0x31 + IPV6_IPCOMP_LEVEL = 0x3c + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + IPV6_MAXHLIM = 0xff + IPV6_MAXPACKET = 0xffff + IPV6_MMTU = 0x500 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_LOOP = 0xb + IPV6_NEXTHOP = 0x30 + IPV6_OPTIONS = 0x1 + IPV6_PATHMTU = 0x2c + IPV6_PIPEX = 0x3f + IPV6_PKTINFO = 0x2e + IPV6_PORTRANGE = 0xe + IPV6_PORTRANGE_DEFAULT = 0x0 + IPV6_PORTRANGE_HIGH = 0x1 + IPV6_PORTRANGE_LOW = 0x2 + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVDSTPORT = 0x40 + IPV6_RECVHOPLIMIT = 0x25 + IPV6_RECVHOPOPTS = 0x27 + IPV6_RECVPATHMTU = 0x2b + IPV6_RECVPKTINFO = 0x24 + IPV6_RECVRTHDR = 0x26 + IPV6_RECVTCLASS = 0x39 + IPV6_RTABLE = 0x1021 + IPV6_RTHDR = 0x33 + IPV6_RTHDRDSTOPTS = 0x23 + IPV6_RTHDR_LOOSE = 0x0 + IPV6_RTHDR_STRICT = 0x1 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SOCKOPT_RESERVED1 = 0x3 + IPV6_TCLASS = 0x3d + IPV6_UNICAST_HOPS = 0x4 + IPV6_USE_MIN_MTU = 0x2a + IPV6_V6ONLY = 0x1b + IPV6_VERSION = 0x60 + IPV6_VERSION_MASK = 0xf0 + IP_ADD_MEMBERSHIP = 0xc + IP_AUTH_LEVEL = 0x14 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DIVERTFL = 0x1022 + IP_DROP_MEMBERSHIP = 0xd + IP_ESP_NETWORK_LEVEL = 0x16 + IP_ESP_TRANS_LEVEL = 0x15 + IP_HDRINCL = 0x2 + IP_IPCOMP_LEVEL = 0x1d + IP_IPSECFLOWINFO = 0x24 + IP_IPSEC_LOCAL_AUTH = 0x1b + IP_IPSEC_LOCAL_CRED = 0x19 + IP_IPSEC_LOCAL_ID = 0x17 + IP_IPSEC_REMOTE_AUTH = 0x1c + IP_IPSEC_REMOTE_CRED = 0x1a + IP_IPSEC_REMOTE_ID = 0x18 + IP_MAXPACKET = 0xffff + IP_MAX_MEMBERSHIPS = 0xfff + IP_MF = 0x2000 + IP_MINTTL = 0x20 + IP_MIN_MEMBERSHIPS = 0xf + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_LOOP = 0xb + IP_MULTICAST_TTL = 0xa + IP_OFFMASK = 0x1fff + IP_OPTIONS = 0x1 + IP_PIPEX = 0x22 + IP_PORTRANGE = 0x13 + IP_PORTRANGE_DEFAULT = 0x0 + IP_PORTRANGE_HIGH = 0x1 + IP_PORTRANGE_LOW = 0x2 + IP_RECVDSTADDR = 0x7 + IP_RECVDSTPORT = 0x21 + IP_RECVIF = 0x1e + IP_RECVOPTS = 0x5 + IP_RECVRETOPTS = 0x6 + IP_RECVRTABLE = 0x23 + IP_RECVTTL = 0x1f + IP_RETOPTS = 0x8 + IP_RF = 0x8000 + IP_RTABLE = 0x1021 + IP_TOS = 0x3 + IP_TTL = 0x4 + ISIG = 0x80 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x400 + IXON = 0x200 + LCNT_OVERLOAD_FLUSH = 0x6 + LOCK_EX = 0x2 + LOCK_NB = 0x4 + LOCK_SH = 0x1 + LOCK_UN = 0x8 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x6 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_SPACEAVAIL = 0x5 + MADV_WILLNEED = 0x3 + MAP_ANON = 0x1000 + MAP_COPY = 0x4 + MAP_FILE = 0x0 + MAP_FIXED = 0x10 + MAP_FLAGMASK = 0x1ff7 + MAP_HASSEMAPHORE = 0x200 + MAP_INHERIT = 0x80 + MAP_INHERIT_COPY = 0x1 + MAP_INHERIT_DONATE_COPY = 0x3 + MAP_INHERIT_NONE = 0x2 + MAP_INHERIT_SHARE = 0x0 + MAP_NOEXTEND = 0x100 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_SHARED = 0x1 + MAP_TRYFIXED = 0x400 + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_BCAST = 0x100 + MSG_CTRUNC = 0x20 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_EOR = 0x8 + MSG_MCAST = 0x200 + MSG_NOSIGNAL = 0x400 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x10 + MSG_WAITALL = 0x40 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x4 + MS_SYNC = 0x2 + NAME_MAX = 0xff + NET_RT_DUMP = 0x1 + NET_RT_FLAGS = 0x2 + NET_RT_IFLIST = 0x3 + NET_RT_MAXID = 0x6 + NET_RT_STATS = 0x4 + NET_RT_TABLE = 0x5 + NOFLSH = 0x80000000 + NOTE_ATTRIB = 0x8 + NOTE_CHILD = 0x4 + NOTE_DELETE = 0x1 + NOTE_EOF = 0x2 + NOTE_EXEC = 0x20000000 + NOTE_EXIT = 0x80000000 + NOTE_EXTEND = 0x4 + NOTE_FORK = 0x40000000 + NOTE_LINK = 0x10 + NOTE_LOWAT = 0x1 + NOTE_PCTRLMASK = 0xf0000000 + NOTE_PDATAMASK = 0xfffff + NOTE_RENAME = 0x20 + NOTE_REVOKE = 0x40 + NOTE_TRACK = 0x1 + NOTE_TRACKERR = 0x2 + NOTE_TRUNCATE = 0x80 + NOTE_WRITE = 0x2 + OCRNL = 0x10 + ONLCR = 0x2 + ONLRET = 0x80 + ONOCR = 0x40 + ONOEOT = 0x8 + OPOST = 0x1 + O_ACCMODE = 0x3 + O_APPEND = 0x8 + O_ASYNC = 0x40 + O_CLOEXEC = 0x10000 + O_CREAT = 0x200 + O_DIRECTORY = 0x20000 + O_DSYNC = 0x80 + O_EXCL = 0x800 + O_EXLOCK = 0x20 + O_FSYNC = 0x80 + O_NDELAY = 0x4 + O_NOCTTY = 0x8000 + O_NOFOLLOW = 0x100 + O_NONBLOCK = 0x4 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x80 + O_SHLOCK = 0x10 + O_SYNC = 0x80 + O_TRUNC = 0x400 + O_WRONLY = 0x1 + PARENB = 0x1000 + PARMRK = 0x8 + PARODD = 0x2000 + PENDIN = 0x20000000 + PF_FLUSH = 0x1 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x8 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = 0x7fffffffffffffff + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_LABEL = 0xa + RTAX_MAX = 0xb + RTAX_NETMASK = 0x2 + RTAX_SRC = 0x8 + RTAX_SRCMASK = 0x9 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_LABEL = 0x400 + RTA_NETMASK = 0x4 + RTA_SRC = 0x100 + RTA_SRCMASK = 0x200 + RTF_ANNOUNCE = 0x4000 + RTF_BLACKHOLE = 0x1000 + RTF_CLONED = 0x10000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_FMASK = 0x10f808 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_LLINFO = 0x400 + RTF_MASK = 0x80 + RTF_MODIFIED = 0x20 + RTF_MPATH = 0x40000 + RTF_MPLS = 0x100000 + RTF_PERMANENT_ARP = 0x2000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_PROTO3 = 0x2000 + RTF_REJECT = 0x8 + RTF_SOURCE = 0x20000 + RTF_STATIC = 0x800 + RTF_TUNNEL = 0x100000 + RTF_UP = 0x1 + RTF_USETRAILERS = 0x8000 + RTF_XRESOLVE = 0x200 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_DESYNC = 0x10 + RTM_GET = 0x4 + RTM_IFANNOUNCE = 0xf + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MAXSIZE = 0x800 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_RTTUNIT = 0xf4240 + RTM_VERSION = 0x5 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RT_TABLEID_MAX = 0xff + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + RUSAGE_THREAD = 0x1 + SCM_RIGHTS = 0x1 + SCM_TIMESTAMP = 0x4 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIOCADDMULTI = 0x80206931 + SIOCAIFADDR = 0x8040691a + SIOCAIFGROUP = 0x80286987 + SIOCALIFADDR = 0x8218691c + SIOCATMARK = 0x40047307 + SIOCBRDGADD = 0x8058693c + SIOCBRDGADDS = 0x80586941 + SIOCBRDGARL = 0x806e694d + SIOCBRDGDADDR = 0x81286947 + SIOCBRDGDEL = 0x8058693d + SIOCBRDGDELS = 0x80586942 + SIOCBRDGFLUSH = 0x80586948 + SIOCBRDGFRL = 0x806e694e + SIOCBRDGGCACHE = 0xc0146941 + SIOCBRDGGFD = 0xc0146952 + SIOCBRDGGHT = 0xc0146951 + SIOCBRDGGIFFLGS = 0xc058693e + SIOCBRDGGMA = 0xc0146953 + SIOCBRDGGPARAM = 0xc0406958 + SIOCBRDGGPRI = 0xc0146950 + SIOCBRDGGRL = 0xc030694f + SIOCBRDGGSIFS = 0xc058693c + SIOCBRDGGTO = 0xc0146946 + SIOCBRDGIFS = 0xc0586942 + SIOCBRDGRTS = 0xc0206943 + SIOCBRDGSADDR = 0xc1286944 + SIOCBRDGSCACHE = 0x80146940 + SIOCBRDGSFD = 0x80146952 + SIOCBRDGSHT = 0x80146951 + SIOCBRDGSIFCOST = 0x80586955 + SIOCBRDGSIFFLGS = 0x8058693f + SIOCBRDGSIFPRIO = 0x80586954 + SIOCBRDGSMA = 0x80146953 + SIOCBRDGSPRI = 0x80146950 + SIOCBRDGSPROTO = 0x8014695a + SIOCBRDGSTO = 0x80146945 + SIOCBRDGSTXHC = 0x80146959 + SIOCDELMULTI = 0x80206932 + SIOCDIFADDR = 0x80206919 + SIOCDIFGROUP = 0x80286989 + SIOCDIFPHYADDR = 0x80206949 + SIOCDLIFADDR = 0x8218691e + SIOCGETKALIVE = 0xc01869a4 + SIOCGETLABEL = 0x8020699a + SIOCGETPFLOW = 0xc02069fe + SIOCGETPFSYNC = 0xc02069f8 + SIOCGETSGCNT = 0xc0207534 + SIOCGETVIFCNT = 0xc0287533 + SIOCGETVLAN = 0xc0206990 + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = 0xc0206921 + SIOCGIFASYNCMAP = 0xc020697c + SIOCGIFBRDADDR = 0xc0206923 + SIOCGIFCONF = 0xc0106924 + SIOCGIFDATA = 0xc020691b + SIOCGIFDESCR = 0xc0206981 + SIOCGIFDSTADDR = 0xc0206922 + SIOCGIFFLAGS = 0xc0206911 + SIOCGIFGATTR = 0xc028698b + SIOCGIFGENERIC = 0xc020693a + SIOCGIFGMEMB = 0xc028698a + SIOCGIFGROUP = 0xc0286988 + SIOCGIFHARDMTU = 0xc02069a5 + SIOCGIFMEDIA = 0xc0306936 + SIOCGIFMETRIC = 0xc0206917 + SIOCGIFMTU = 0xc020697e + SIOCGIFNETMASK = 0xc0206925 + SIOCGIFPDSTADDR = 0xc0206948 + SIOCGIFPRIORITY = 0xc020699c + SIOCGIFPSRCADDR = 0xc0206947 + SIOCGIFRDOMAIN = 0xc02069a0 + SIOCGIFRTLABEL = 0xc0206983 + SIOCGIFTIMESLOT = 0xc0206986 + SIOCGIFXFLAGS = 0xc020699e + SIOCGLIFADDR = 0xc218691d + SIOCGLIFPHYADDR = 0xc218694b + SIOCGLIFPHYRTABLE = 0xc02069a2 + SIOCGLIFPHYTTL = 0xc02069a9 + SIOCGLOWAT = 0x40047303 + SIOCGPGRP = 0x40047309 + SIOCGSPPPPARAMS = 0xc0206994 + SIOCGVH = 0xc02069f6 + SIOCGVNETID = 0xc02069a7 + SIOCIFCREATE = 0x8020697a + SIOCIFDESTROY = 0x80206979 + SIOCIFGCLONERS = 0xc0106978 + SIOCSETKALIVE = 0x801869a3 + SIOCSETLABEL = 0x80206999 + SIOCSETPFLOW = 0x802069fd + SIOCSETPFSYNC = 0x802069f7 + SIOCSETVLAN = 0x8020698f + SIOCSHIWAT = 0x80047300 + SIOCSIFADDR = 0x8020690c + SIOCSIFASYNCMAP = 0x8020697d + SIOCSIFBRDADDR = 0x80206913 + SIOCSIFDESCR = 0x80206980 + SIOCSIFDSTADDR = 0x8020690e + SIOCSIFFLAGS = 0x80206910 + SIOCSIFGATTR = 0x8028698c + SIOCSIFGENERIC = 0x80206939 + SIOCSIFLLADDR = 0x8020691f + SIOCSIFMEDIA = 0xc0206935 + SIOCSIFMETRIC = 0x80206918 + SIOCSIFMTU = 0x8020697f + SIOCSIFNETMASK = 0x80206916 + SIOCSIFPHYADDR = 0x80406946 + SIOCSIFPRIORITY = 0x8020699b + SIOCSIFRDOMAIN = 0x8020699f + SIOCSIFRTLABEL = 0x80206982 + SIOCSIFTIMESLOT = 0x80206985 + SIOCSIFXFLAGS = 0x8020699d + SIOCSLIFPHYADDR = 0x8218694a + SIOCSLIFPHYRTABLE = 0x802069a1 + SIOCSLIFPHYTTL = 0x802069a8 + SIOCSLOWAT = 0x80047302 + SIOCSPGRP = 0x80047308 + SIOCSSPPPPARAMS = 0x80206993 + SIOCSVH = 0xc02069f5 + SIOCSVNETID = 0x802069a6 + SOCK_DGRAM = 0x2 + SOCK_RAW = 0x3 + SOCK_RDM = 0x4 + SOCK_SEQPACKET = 0x5 + SOCK_STREAM = 0x1 + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_BINDANY = 0x1000 + SO_BROADCAST = 0x20 + SO_DEBUG = 0x1 + SO_DONTROUTE = 0x10 + SO_ERROR = 0x1007 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_NETPROC = 0x1020 + SO_OOBINLINE = 0x100 + SO_PEERCRED = 0x1022 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVTIMEO = 0x1006 + SO_REUSEADDR = 0x4 + SO_REUSEPORT = 0x200 + SO_RTABLE = 0x1021 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_SPLICE = 0x1023 + SO_TIMESTAMP = 0x800 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + TCIFLUSH = 0x1 + TCIOFLUSH = 0x3 + TCOFLUSH = 0x2 + TCP_MAXBURST = 0x4 + TCP_MAXSEG = 0x2 + TCP_MAXWIN = 0xffff + TCP_MAX_SACK = 0x3 + TCP_MAX_WINSHIFT = 0xe + TCP_MD5SIG = 0x4 + TCP_MSS = 0x200 + TCP_NODELAY = 0x1 + TCP_NOPUSH = 0x10 + TCP_NSTATES = 0xb + TCP_SACK_ENABLE = 0x8 + TCSAFLUSH = 0x2 + TIOCCBRK = 0x2000747a + TIOCCDTR = 0x20007478 + TIOCCONS = 0x80047462 + TIOCDRAIN = 0x2000745e + TIOCEXCL = 0x2000740d + TIOCEXT = 0x80047460 + TIOCFLAG_CLOCAL = 0x2 + TIOCFLAG_CRTSCTS = 0x4 + TIOCFLAG_MDMBUF = 0x8 + TIOCFLAG_PPS = 0x10 + TIOCFLAG_SOFTCAR = 0x1 + TIOCFLUSH = 0x80047410 + TIOCGETA = 0x402c7413 + TIOCGETD = 0x4004741a + TIOCGFLAGS = 0x4004745d + TIOCGPGRP = 0x40047477 + TIOCGSID = 0x40047463 + TIOCGTSTAMP = 0x4010745b + TIOCGWINSZ = 0x40087468 + TIOCMBIC = 0x8004746b + TIOCMBIS = 0x8004746c + TIOCMGET = 0x4004746a + TIOCMODG = 0x4004746a + TIOCMODS = 0x8004746d + TIOCMSET = 0x8004746d + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x20007471 + TIOCNXCL = 0x2000740e + TIOCOUTQ = 0x40047473 + TIOCPKT = 0x80047470 + TIOCPKT_DATA = 0x0 + TIOCPKT_DOSTOP = 0x20 + TIOCPKT_FLUSHREAD = 0x1 + TIOCPKT_FLUSHWRITE = 0x2 + TIOCPKT_IOCTL = 0x40 + TIOCPKT_NOSTOP = 0x10 + TIOCPKT_START = 0x8 + TIOCPKT_STOP = 0x4 + TIOCREMOTE = 0x80047469 + TIOCSBRK = 0x2000747b + TIOCSCTTY = 0x20007461 + TIOCSDTR = 0x20007479 + TIOCSETA = 0x802c7414 + TIOCSETAF = 0x802c7416 + TIOCSETAW = 0x802c7415 + TIOCSETD = 0x8004741b + TIOCSFLAGS = 0x8004745c + TIOCSIG = 0x8004745f + TIOCSPGRP = 0x80047476 + TIOCSTART = 0x2000746e + TIOCSTAT = 0x80047465 + TIOCSTI = 0x80017472 + TIOCSTOP = 0x2000746f + TIOCSTSTAMP = 0x8008745a + TIOCSWINSZ = 0x80087467 + TIOCUCNTL = 0x80047466 + TOSTOP = 0x400000 + VDISCARD = 0xf + VDSUSP = 0xb + VEOF = 0x0 + VEOL = 0x1 + VEOL2 = 0x2 + VERASE = 0x3 + VINTR = 0x8 + VKILL = 0x5 + VLNEXT = 0xe + VMIN = 0x10 + VQUIT = 0x9 + VREPRINT = 0x6 + VSTART = 0xc + VSTATUS = 0x12 + VSTOP = 0xd + VSUSP = 0xa + VTIME = 0x11 + VWERASE = 0x4 + WALTSIG = 0x4 + WCONTINUED = 0x8 + WCOREFLAG = 0x80 + WNOHANG = 0x1 + WSTOPPED = 0x7f + WUNTRACED = 0x2 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x30) + EADDRNOTAVAIL = syscall.Errno(0x31) + EAFNOSUPPORT = syscall.Errno(0x2f) + EAGAIN = syscall.Errno(0x23) + EALREADY = syscall.Errno(0x25) + EAUTH = syscall.Errno(0x50) + EBADF = syscall.Errno(0x9) + EBADRPC = syscall.Errno(0x48) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x58) + ECHILD = syscall.Errno(0xa) + ECONNABORTED = syscall.Errno(0x35) + ECONNREFUSED = syscall.Errno(0x3d) + ECONNRESET = syscall.Errno(0x36) + EDEADLK = syscall.Errno(0xb) + EDESTADDRREQ = syscall.Errno(0x27) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x45) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EFTYPE = syscall.Errno(0x4f) + EHOSTDOWN = syscall.Errno(0x40) + EHOSTUNREACH = syscall.Errno(0x41) + EIDRM = syscall.Errno(0x59) + EILSEQ = syscall.Errno(0x54) + EINPROGRESS = syscall.Errno(0x24) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EIPSEC = syscall.Errno(0x52) + EISCONN = syscall.Errno(0x38) + EISDIR = syscall.Errno(0x15) + ELAST = syscall.Errno(0x5b) + ELOOP = syscall.Errno(0x3e) + EMEDIUMTYPE = syscall.Errno(0x56) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x28) + ENAMETOOLONG = syscall.Errno(0x3f) + ENEEDAUTH = syscall.Errno(0x51) + ENETDOWN = syscall.Errno(0x32) + ENETRESET = syscall.Errno(0x34) + ENETUNREACH = syscall.Errno(0x33) + ENFILE = syscall.Errno(0x17) + ENOATTR = syscall.Errno(0x53) + ENOBUFS = syscall.Errno(0x37) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x4d) + ENOMEDIUM = syscall.Errno(0x55) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x5a) + ENOPROTOOPT = syscall.Errno(0x2a) + ENOSPC = syscall.Errno(0x1c) + ENOSYS = syscall.Errno(0x4e) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x39) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x42) + ENOTSOCK = syscall.Errno(0x26) + ENOTSUP = syscall.Errno(0x5b) + ENOTTY = syscall.Errno(0x19) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x2d) + EOVERFLOW = syscall.Errno(0x57) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x2e) + EPIPE = syscall.Errno(0x20) + EPROCLIM = syscall.Errno(0x43) + EPROCUNAVAIL = syscall.Errno(0x4c) + EPROGMISMATCH = syscall.Errno(0x4b) + EPROGUNAVAIL = syscall.Errno(0x4a) + EPROTONOSUPPORT = syscall.Errno(0x2b) + EPROTOTYPE = syscall.Errno(0x29) + ERANGE = syscall.Errno(0x22) + EREMOTE = syscall.Errno(0x47) + EROFS = syscall.Errno(0x1e) + ERPCMISMATCH = syscall.Errno(0x49) + ESHUTDOWN = syscall.Errno(0x3a) + ESOCKTNOSUPPORT = syscall.Errno(0x2c) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESTALE = syscall.Errno(0x46) + ETIMEDOUT = syscall.Errno(0x3c) + ETOOMANYREFS = syscall.Errno(0x3b) + ETXTBSY = syscall.Errno(0x1a) + EUSERS = syscall.Errno(0x44) + EWOULDBLOCK = syscall.Errno(0x23) + EXDEV = syscall.Errno(0x12) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCHLD = syscall.Signal(0x14) + SIGCONT = syscall.Signal(0x13) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x1d) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x17) + SIGIOT = syscall.Signal(0x6) + SIGKILL = syscall.Signal(0x9) + SIGPIPE = syscall.Signal(0xd) + SIGPROF = syscall.Signal(0x1b) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x11) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHR = syscall.Signal(0x20) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x12) + SIGTTIN = syscall.Signal(0x15) + SIGTTOU = syscall.Signal(0x16) + SIGURG = syscall.Signal(0x10) + SIGUSR1 = syscall.Signal(0x1e) + SIGUSR2 = syscall.Signal(0x1f) + SIGVTALRM = syscall.Signal(0x1a) + SIGWINCH = syscall.Signal(0x1c) + SIGXCPU = syscall.Signal(0x18) + SIGXFSZ = syscall.Signal(0x19) +) + +// Error table +var errors = [...]string{ + 1: "operation not permitted", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "input/output error", + 6: "device not configured", + 7: "argument list too long", + 8: "exec format error", + 9: "bad file descriptor", + 10: "no child processes", + 11: "resource deadlock avoided", + 12: "cannot allocate memory", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "operation not supported by device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "too many open files in system", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "numerical argument out of domain", + 34: "result too large", + 35: "resource temporarily unavailable", + 36: "operation now in progress", + 37: "operation already in progress", + 38: "socket operation on non-socket", + 39: "destination address required", + 40: "message too long", + 41: "protocol wrong type for socket", + 42: "protocol not available", + 43: "protocol not supported", + 44: "socket type not supported", + 45: "operation not supported", + 46: "protocol family not supported", + 47: "address family not supported by protocol family", + 48: "address already in use", + 49: "can't assign requested address", + 50: "network is down", + 51: "network is unreachable", + 52: "network dropped connection on reset", + 53: "software caused connection abort", + 54: "connection reset by peer", + 55: "no buffer space available", + 56: "socket is already connected", + 57: "socket is not connected", + 58: "can't send after socket shutdown", + 59: "too many references: can't splice", + 60: "connection timed out", + 61: "connection refused", + 62: "too many levels of symbolic links", + 63: "file name too long", + 64: "host is down", + 65: "no route to host", + 66: "directory not empty", + 67: "too many processes", + 68: "too many users", + 69: "disc quota exceeded", + 70: "stale NFS file handle", + 71: "too many levels of remote in path", + 72: "RPC struct is bad", + 73: "RPC version wrong", + 74: "RPC prog. not avail", + 75: "program version wrong", + 76: "bad procedure for program", + 77: "no locks available", + 78: "function not implemented", + 79: "inappropriate file type or format", + 80: "authentication error", + 81: "need authenticator", + 82: "IPsec processing failure", + 83: "attribute not found", + 84: "illegal byte sequence", + 85: "no medium found", + 86: "wrong medium type", + 87: "value too large to be stored in data type", + 88: "operation canceled", + 89: "identifier removed", + 90: "no message of desired type", + 91: "not supported", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/BPT trap", + 6: "abort trap", + 7: "EMT trap", + 8: "floating point exception", + 9: "killed", + 10: "bus error", + 11: "segmentation fault", + 12: "bad system call", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", + 16: "urgent I/O condition", + 17: "stopped (signal)", + 18: "stopped", + 19: "continued", + 20: "child exited", + 21: "stopped (tty input)", + 22: "stopped (tty output)", + 23: "I/O possible", + 24: "cputime limit exceeded", + 25: "filesize limit exceeded", + 26: "virtual timer expired", + 27: "profiling timer expired", + 28: "window size changes", + 29: "information request", + 30: "user defined signal 1", + 31: "user defined signal 2", + 32: "thread AST", +} diff --git a/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go new file mode 100644 index 000000000..a08922b98 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zerrors_solaris_amd64.go @@ -0,0 +1,1436 @@ +// mkerrors.sh -m64 +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,solaris + +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -m64 _const.go + +package unix + +import "syscall" + +const ( + AF_802 = 0x12 + AF_APPLETALK = 0x10 + AF_CCITT = 0xa + AF_CHAOS = 0x5 + AF_DATAKIT = 0x9 + AF_DECnet = 0xc + AF_DLI = 0xd + AF_ECMA = 0x8 + AF_FILE = 0x1 + AF_GOSIP = 0x16 + AF_HYLINK = 0xf + AF_IMPLINK = 0x3 + AF_INET = 0x2 + AF_INET6 = 0x1a + AF_INET_OFFLOAD = 0x1e + AF_IPX = 0x17 + AF_KEY = 0x1b + AF_LAT = 0xe + AF_LINK = 0x19 + AF_LOCAL = 0x1 + AF_MAX = 0x20 + AF_NBS = 0x7 + AF_NCA = 0x1c + AF_NIT = 0x11 + AF_NS = 0x6 + AF_OSI = 0x13 + AF_OSINET = 0x15 + AF_PACKET = 0x20 + AF_POLICY = 0x1d + AF_PUP = 0x4 + AF_ROUTE = 0x18 + AF_SNA = 0xb + AF_TRILL = 0x1f + AF_UNIX = 0x1 + AF_UNSPEC = 0x0 + AF_X25 = 0x14 + ARPHRD_ARCNET = 0x7 + ARPHRD_ATM = 0x10 + ARPHRD_AX25 = 0x3 + ARPHRD_CHAOS = 0x5 + ARPHRD_EETHER = 0x2 + ARPHRD_ETHER = 0x1 + ARPHRD_FC = 0x12 + ARPHRD_FRAME = 0xf + ARPHRD_HDLC = 0x11 + ARPHRD_IB = 0x20 + ARPHRD_IEEE802 = 0x6 + ARPHRD_IPATM = 0x13 + ARPHRD_METRICOM = 0x17 + ARPHRD_TUNNEL = 0x1f + B0 = 0x0 + B110 = 0x3 + B115200 = 0x12 + B1200 = 0x9 + B134 = 0x4 + B150 = 0x5 + B153600 = 0x13 + B1800 = 0xa + B19200 = 0xe + B200 = 0x6 + B230400 = 0x14 + B2400 = 0xb + B300 = 0x7 + B307200 = 0x15 + B38400 = 0xf + B460800 = 0x16 + B4800 = 0xc + B50 = 0x1 + B57600 = 0x10 + B600 = 0x8 + B75 = 0x2 + B76800 = 0x11 + B921600 = 0x17 + B9600 = 0xd + BIOCFLUSH = 0x20004268 + BIOCGBLEN = 0x40044266 + BIOCGDLT = 0x4004426a + BIOCGDLTLIST = -0x3fefbd89 + BIOCGDLTLIST32 = -0x3ff7bd89 + BIOCGETIF = 0x4020426b + BIOCGETLIF = 0x4078426b + BIOCGHDRCMPLT = 0x40044274 + BIOCGRTIMEOUT = 0x4010427b + BIOCGRTIMEOUT32 = 0x4008427b + BIOCGSEESENT = 0x40044278 + BIOCGSTATS = 0x4080426f + BIOCGSTATSOLD = 0x4008426f + BIOCIMMEDIATE = -0x7ffbbd90 + BIOCPROMISC = 0x20004269 + BIOCSBLEN = -0x3ffbbd9a + BIOCSDLT = -0x7ffbbd8a + BIOCSETF = -0x7fefbd99 + BIOCSETF32 = -0x7ff7bd99 + BIOCSETIF = -0x7fdfbd94 + BIOCSETLIF = -0x7f87bd94 + BIOCSHDRCMPLT = -0x7ffbbd8b + BIOCSRTIMEOUT = -0x7fefbd86 + BIOCSRTIMEOUT32 = -0x7ff7bd86 + BIOCSSEESENT = -0x7ffbbd87 + BIOCSTCPF = -0x7fefbd8e + BIOCSUDPF = -0x7fefbd8d + BIOCVERSION = 0x40044271 + BPF_A = 0x10 + BPF_ABS = 0x20 + BPF_ADD = 0x0 + BPF_ALIGNMENT = 0x4 + BPF_ALU = 0x4 + BPF_AND = 0x50 + BPF_B = 0x10 + BPF_DFLTBUFSIZE = 0x100000 + BPF_DIV = 0x30 + BPF_H = 0x8 + BPF_IMM = 0x0 + BPF_IND = 0x40 + BPF_JA = 0x0 + BPF_JEQ = 0x10 + BPF_JGE = 0x30 + BPF_JGT = 0x20 + BPF_JMP = 0x5 + BPF_JSET = 0x40 + BPF_K = 0x0 + BPF_LD = 0x0 + BPF_LDX = 0x1 + BPF_LEN = 0x80 + BPF_LSH = 0x60 + BPF_MAJOR_VERSION = 0x1 + BPF_MAXBUFSIZE = 0x1000000 + BPF_MAXINSNS = 0x200 + BPF_MEM = 0x60 + BPF_MEMWORDS = 0x10 + BPF_MINBUFSIZE = 0x20 + BPF_MINOR_VERSION = 0x1 + BPF_MISC = 0x7 + BPF_MSH = 0xa0 + BPF_MUL = 0x20 + BPF_NEG = 0x80 + BPF_OR = 0x40 + BPF_RELEASE = 0x30bb6 + BPF_RET = 0x6 + BPF_RSH = 0x70 + BPF_ST = 0x2 + BPF_STX = 0x3 + BPF_SUB = 0x10 + BPF_TAX = 0x0 + BPF_TXA = 0x80 + BPF_W = 0x0 + BPF_X = 0x8 + BRKINT = 0x2 + CFLUSH = 0xf + CLOCAL = 0x800 + CLOCK_HIGHRES = 0x4 + CLOCK_LEVEL = 0xa + CLOCK_MONOTONIC = 0x4 + CLOCK_PROCESS_CPUTIME_ID = 0x5 + CLOCK_PROF = 0x2 + CLOCK_REALTIME = 0x3 + CLOCK_THREAD_CPUTIME_ID = 0x2 + CLOCK_VIRTUAL = 0x1 + CREAD = 0x80 + CS5 = 0x0 + CS6 = 0x10 + CS7 = 0x20 + CS8 = 0x30 + CSIZE = 0x30 + CSTART = 0x11 + CSTATUS = 0x14 + CSTOP = 0x13 + CSTOPB = 0x40 + CSUSP = 0x1a + CSWTCH = 0x1a + DLT_AIRONET_HEADER = 0x78 + DLT_APPLE_IP_OVER_IEEE1394 = 0x8a + DLT_ARCNET = 0x7 + DLT_ARCNET_LINUX = 0x81 + DLT_ATM_CLIP = 0x13 + DLT_ATM_RFC1483 = 0xb + DLT_AURORA = 0x7e + DLT_AX25 = 0x3 + DLT_BACNET_MS_TP = 0xa5 + DLT_CHAOS = 0x5 + DLT_CISCO_IOS = 0x76 + DLT_C_HDLC = 0x68 + DLT_DOCSIS = 0x8f + DLT_ECONET = 0x73 + DLT_EN10MB = 0x1 + DLT_EN3MB = 0x2 + DLT_ENC = 0x6d + DLT_ERF_ETH = 0xaf + DLT_ERF_POS = 0xb0 + DLT_FDDI = 0xa + DLT_FRELAY = 0x6b + DLT_GCOM_SERIAL = 0xad + DLT_GCOM_T1E1 = 0xac + DLT_GPF_F = 0xab + DLT_GPF_T = 0xaa + DLT_GPRS_LLC = 0xa9 + DLT_HDLC = 0x10 + DLT_HHDLC = 0x79 + DLT_HIPPI = 0xf + DLT_IBM_SN = 0x92 + DLT_IBM_SP = 0x91 + DLT_IEEE802 = 0x6 + DLT_IEEE802_11 = 0x69 + DLT_IEEE802_11_RADIO = 0x7f + DLT_IEEE802_11_RADIO_AVS = 0xa3 + DLT_IPNET = 0xe2 + DLT_IPOIB = 0xa2 + DLT_IP_OVER_FC = 0x7a + DLT_JUNIPER_ATM1 = 0x89 + DLT_JUNIPER_ATM2 = 0x87 + DLT_JUNIPER_CHDLC = 0xb5 + DLT_JUNIPER_ES = 0x84 + DLT_JUNIPER_ETHER = 0xb2 + DLT_JUNIPER_FRELAY = 0xb4 + DLT_JUNIPER_GGSN = 0x85 + DLT_JUNIPER_MFR = 0x86 + DLT_JUNIPER_MLFR = 0x83 + DLT_JUNIPER_MLPPP = 0x82 + DLT_JUNIPER_MONITOR = 0xa4 + DLT_JUNIPER_PIC_PEER = 0xae + DLT_JUNIPER_PPP = 0xb3 + DLT_JUNIPER_PPPOE = 0xa7 + DLT_JUNIPER_PPPOE_ATM = 0xa8 + DLT_JUNIPER_SERVICES = 0x88 + DLT_LINUX_IRDA = 0x90 + DLT_LINUX_LAPD = 0xb1 + DLT_LINUX_SLL = 0x71 + DLT_LOOP = 0x6c + DLT_LTALK = 0x72 + DLT_MTP2 = 0x8c + DLT_MTP2_WITH_PHDR = 0x8b + DLT_MTP3 = 0x8d + DLT_NULL = 0x0 + DLT_PCI_EXP = 0x7d + DLT_PFLOG = 0x75 + DLT_PFSYNC = 0x12 + DLT_PPP = 0x9 + DLT_PPP_BSDOS = 0xe + DLT_PPP_PPPD = 0xa6 + DLT_PRISM_HEADER = 0x77 + DLT_PRONET = 0x4 + DLT_RAW = 0xc + DLT_RAWAF_MASK = 0x2240000 + DLT_RIO = 0x7c + DLT_SCCP = 0x8e + DLT_SLIP = 0x8 + DLT_SLIP_BSDOS = 0xd + DLT_SUNATM = 0x7b + DLT_SYMANTEC_FIREWALL = 0x63 + DLT_TZSP = 0x80 + ECHO = 0x8 + ECHOCTL = 0x200 + ECHOE = 0x10 + ECHOK = 0x20 + ECHOKE = 0x800 + ECHONL = 0x40 + ECHOPRT = 0x400 + EMPTY_SET = 0x0 + EMT_CPCOVF = 0x1 + EQUALITY_CHECK = 0x0 + EXTA = 0xe + EXTB = 0xf + FD_CLOEXEC = 0x1 + FD_NFDBITS = 0x40 + FD_SETSIZE = 0x10000 + FLUSHALL = 0x1 + FLUSHDATA = 0x0 + FLUSHO = 0x2000 + F_ALLOCSP = 0xa + F_ALLOCSP64 = 0xa + F_BADFD = 0x2e + F_BLKSIZE = 0x13 + F_BLOCKS = 0x12 + F_CHKFL = 0x8 + F_COMPAT = 0x8 + F_DUP2FD = 0x9 + F_DUP2FD_CLOEXEC = 0x24 + F_DUPFD = 0x0 + F_DUPFD_CLOEXEC = 0x25 + F_FREESP = 0xb + F_FREESP64 = 0xb + F_GETFD = 0x1 + F_GETFL = 0x3 + F_GETLK = 0xe + F_GETLK64 = 0xe + F_GETOWN = 0x17 + F_GETXFL = 0x2d + F_HASREMOTELOCKS = 0x1a + F_ISSTREAM = 0xd + F_MANDDNY = 0x10 + F_MDACC = 0x20 + F_NODNY = 0x0 + F_NPRIV = 0x10 + F_PRIV = 0xf + F_QUOTACTL = 0x11 + F_RDACC = 0x1 + F_RDDNY = 0x1 + F_RDLCK = 0x1 + F_REVOKE = 0x19 + F_RMACC = 0x4 + F_RMDNY = 0x4 + F_RWACC = 0x3 + F_RWDNY = 0x3 + F_SETFD = 0x2 + F_SETFL = 0x4 + F_SETLK = 0x6 + F_SETLK64 = 0x6 + F_SETLK64_NBMAND = 0x2a + F_SETLKW = 0x7 + F_SETLKW64 = 0x7 + F_SETLK_NBMAND = 0x2a + F_SETOWN = 0x18 + F_SHARE = 0x28 + F_SHARE_NBMAND = 0x2b + F_UNLCK = 0x3 + F_UNLKSYS = 0x4 + F_UNSHARE = 0x29 + F_WRACC = 0x2 + F_WRDNY = 0x2 + F_WRLCK = 0x2 + HUPCL = 0x400 + ICANON = 0x2 + ICRNL = 0x100 + IEXTEN = 0x8000 + IFF_ADDRCONF = 0x80000 + IFF_ALLMULTI = 0x200 + IFF_ANYCAST = 0x400000 + IFF_BROADCAST = 0x2 + IFF_CANTCHANGE = 0x7f203003b5a + IFF_COS_ENABLED = 0x200000000 + IFF_DEBUG = 0x4 + IFF_DEPRECATED = 0x40000 + IFF_DHCPRUNNING = 0x4000 + IFF_DUPLICATE = 0x4000000000 + IFF_FAILED = 0x10000000 + IFF_FIXEDMTU = 0x1000000000 + IFF_INACTIVE = 0x40000000 + IFF_INTELLIGENT = 0x400 + IFF_IPMP = 0x8000000000 + IFF_IPMP_CANTCHANGE = 0x10000000 + IFF_IPMP_INVALID = 0x1ec200080 + IFF_IPV4 = 0x1000000 + IFF_IPV6 = 0x2000000 + IFF_L3PROTECT = 0x40000000000 + IFF_LOOPBACK = 0x8 + IFF_MULTICAST = 0x800 + IFF_MULTI_BCAST = 0x1000 + IFF_NOACCEPT = 0x4000000 + IFF_NOARP = 0x80 + IFF_NOFAILOVER = 0x8000000 + IFF_NOLINKLOCAL = 0x20000000000 + IFF_NOLOCAL = 0x20000 + IFF_NONUD = 0x200000 + IFF_NORTEXCH = 0x800000 + IFF_NOTRAILERS = 0x20 + IFF_NOXMIT = 0x10000 + IFF_OFFLINE = 0x80000000 + IFF_POINTOPOINT = 0x10 + IFF_PREFERRED = 0x400000000 + IFF_PRIVATE = 0x8000 + IFF_PROMISC = 0x100 + IFF_ROUTER = 0x100000 + IFF_RUNNING = 0x40 + IFF_STANDBY = 0x20000000 + IFF_TEMPORARY = 0x800000000 + IFF_UNNUMBERED = 0x2000 + IFF_UP = 0x1 + IFF_VIRTUAL = 0x2000000000 + IFF_VRRP = 0x10000000000 + IFF_XRESOLV = 0x100000000 + IFNAMSIZ = 0x10 + IFT_1822 = 0x2 + IFT_6TO4 = 0xca + IFT_AAL5 = 0x31 + IFT_ARCNET = 0x23 + IFT_ARCNETPLUS = 0x24 + IFT_ATM = 0x25 + IFT_CEPT = 0x13 + IFT_DS3 = 0x1e + IFT_EON = 0x19 + IFT_ETHER = 0x6 + IFT_FDDI = 0xf + IFT_FRELAY = 0x20 + IFT_FRELAYDCE = 0x2c + IFT_HDH1822 = 0x3 + IFT_HIPPI = 0x2f + IFT_HSSI = 0x2e + IFT_HY = 0xe + IFT_IB = 0xc7 + IFT_IPV4 = 0xc8 + IFT_IPV6 = 0xc9 + IFT_ISDNBASIC = 0x14 + IFT_ISDNPRIMARY = 0x15 + IFT_ISO88022LLC = 0x29 + IFT_ISO88023 = 0x7 + IFT_ISO88024 = 0x8 + IFT_ISO88025 = 0x9 + IFT_ISO88026 = 0xa + IFT_LAPB = 0x10 + IFT_LOCALTALK = 0x2a + IFT_LOOP = 0x18 + IFT_MIOX25 = 0x26 + IFT_MODEM = 0x30 + IFT_NSIP = 0x1b + IFT_OTHER = 0x1 + IFT_P10 = 0xc + IFT_P80 = 0xd + IFT_PARA = 0x22 + IFT_PPP = 0x17 + IFT_PROPMUX = 0x36 + IFT_PROPVIRTUAL = 0x35 + IFT_PTPSERIAL = 0x16 + IFT_RS232 = 0x21 + IFT_SDLC = 0x11 + IFT_SIP = 0x1f + IFT_SLIP = 0x1c + IFT_SMDSDXI = 0x2b + IFT_SMDSICIP = 0x34 + IFT_SONET = 0x27 + IFT_SONETPATH = 0x32 + IFT_SONETVT = 0x33 + IFT_STARLAN = 0xb + IFT_T1 = 0x12 + IFT_ULTRA = 0x1d + IFT_V35 = 0x2d + IFT_X25 = 0x5 + IFT_X25DDN = 0x4 + IFT_X25PLE = 0x28 + IFT_XETHER = 0x1a + IGNBRK = 0x1 + IGNCR = 0x80 + IGNPAR = 0x4 + IMAXBEL = 0x2000 + INLCR = 0x40 + INPCK = 0x10 + IN_AUTOCONF_MASK = 0xffff0000 + IN_AUTOCONF_NET = 0xa9fe0000 + IN_CLASSA_HOST = 0xffffff + IN_CLASSA_MAX = 0x80 + IN_CLASSA_NET = 0xff000000 + IN_CLASSA_NSHIFT = 0x18 + IN_CLASSB_HOST = 0xffff + IN_CLASSB_MAX = 0x10000 + IN_CLASSB_NET = 0xffff0000 + IN_CLASSB_NSHIFT = 0x10 + IN_CLASSC_HOST = 0xff + IN_CLASSC_NET = 0xffffff00 + IN_CLASSC_NSHIFT = 0x8 + IN_CLASSD_HOST = 0xfffffff + IN_CLASSD_NET = 0xf0000000 + IN_CLASSD_NSHIFT = 0x1c + IN_CLASSE_NET = 0xffffffff + IN_LOOPBACKNET = 0x7f + IN_PRIVATE12_MASK = 0xfff00000 + IN_PRIVATE12_NET = 0xac100000 + IN_PRIVATE16_MASK = 0xffff0000 + IN_PRIVATE16_NET = 0xc0a80000 + IN_PRIVATE8_MASK = 0xff000000 + IN_PRIVATE8_NET = 0xa000000 + IPPROTO_AH = 0x33 + IPPROTO_DSTOPTS = 0x3c + IPPROTO_EGP = 0x8 + IPPROTO_ENCAP = 0x4 + IPPROTO_EON = 0x50 + IPPROTO_ESP = 0x32 + IPPROTO_FRAGMENT = 0x2c + IPPROTO_GGP = 0x3 + IPPROTO_HELLO = 0x3f + IPPROTO_HOPOPTS = 0x0 + IPPROTO_ICMP = 0x1 + IPPROTO_ICMPV6 = 0x3a + IPPROTO_IDP = 0x16 + IPPROTO_IGMP = 0x2 + IPPROTO_IP = 0x0 + IPPROTO_IPV6 = 0x29 + IPPROTO_MAX = 0x100 + IPPROTO_ND = 0x4d + IPPROTO_NONE = 0x3b + IPPROTO_OSPF = 0x59 + IPPROTO_PIM = 0x67 + IPPROTO_PUP = 0xc + IPPROTO_RAW = 0xff + IPPROTO_ROUTING = 0x2b + IPPROTO_RSVP = 0x2e + IPPROTO_SCTP = 0x84 + IPPROTO_TCP = 0x6 + IPPROTO_UDP = 0x11 + IPV6_ADD_MEMBERSHIP = 0x9 + IPV6_BOUND_IF = 0x41 + IPV6_CHECKSUM = 0x18 + IPV6_DONTFRAG = 0x21 + IPV6_DROP_MEMBERSHIP = 0xa + IPV6_DSTOPTS = 0xf + IPV6_FLOWINFO_FLOWLABEL = 0xffff0f00 + IPV6_FLOWINFO_TCLASS = 0xf00f + IPV6_HOPLIMIT = 0xc + IPV6_HOPOPTS = 0xe + IPV6_JOIN_GROUP = 0x9 + IPV6_LEAVE_GROUP = 0xa + IPV6_MULTICAST_HOPS = 0x7 + IPV6_MULTICAST_IF = 0x6 + IPV6_MULTICAST_LOOP = 0x8 + IPV6_NEXTHOP = 0xd + IPV6_PAD1_OPT = 0x0 + IPV6_PATHMTU = 0x25 + IPV6_PKTINFO = 0xb + IPV6_PREFER_SRC_CGA = 0x20 + IPV6_PREFER_SRC_CGADEFAULT = 0x10 + IPV6_PREFER_SRC_CGAMASK = 0x30 + IPV6_PREFER_SRC_COA = 0x2 + IPV6_PREFER_SRC_DEFAULT = 0x15 + IPV6_PREFER_SRC_HOME = 0x1 + IPV6_PREFER_SRC_MASK = 0x3f + IPV6_PREFER_SRC_MIPDEFAULT = 0x1 + IPV6_PREFER_SRC_MIPMASK = 0x3 + IPV6_PREFER_SRC_NONCGA = 0x10 + IPV6_PREFER_SRC_PUBLIC = 0x4 + IPV6_PREFER_SRC_TMP = 0x8 + IPV6_PREFER_SRC_TMPDEFAULT = 0x4 + IPV6_PREFER_SRC_TMPMASK = 0xc + IPV6_RECVDSTOPTS = 0x28 + IPV6_RECVHOPLIMIT = 0x13 + IPV6_RECVHOPOPTS = 0x14 + IPV6_RECVPATHMTU = 0x24 + IPV6_RECVPKTINFO = 0x12 + IPV6_RECVRTHDR = 0x16 + IPV6_RECVRTHDRDSTOPTS = 0x17 + IPV6_RECVTCLASS = 0x19 + IPV6_RTHDR = 0x10 + IPV6_RTHDRDSTOPTS = 0x11 + IPV6_RTHDR_TYPE_0 = 0x0 + IPV6_SEC_OPT = 0x22 + IPV6_SRC_PREFERENCES = 0x23 + IPV6_TCLASS = 0x26 + IPV6_UNICAST_HOPS = 0x5 + IPV6_UNSPEC_SRC = 0x42 + IPV6_USE_MIN_MTU = 0x20 + IPV6_V6ONLY = 0x27 + IP_ADD_MEMBERSHIP = 0x13 + IP_ADD_SOURCE_MEMBERSHIP = 0x17 + IP_BLOCK_SOURCE = 0x15 + IP_BOUND_IF = 0x41 + IP_BROADCAST = 0x106 + IP_BROADCAST_TTL = 0x43 + IP_DEFAULT_MULTICAST_LOOP = 0x1 + IP_DEFAULT_MULTICAST_TTL = 0x1 + IP_DF = 0x4000 + IP_DHCPINIT_IF = 0x45 + IP_DONTFRAG = 0x1b + IP_DONTROUTE = 0x105 + IP_DROP_MEMBERSHIP = 0x14 + IP_DROP_SOURCE_MEMBERSHIP = 0x18 + IP_HDRINCL = 0x2 + IP_MAXPACKET = 0xffff + IP_MF = 0x2000 + IP_MSS = 0x240 + IP_MULTICAST_IF = 0x10 + IP_MULTICAST_LOOP = 0x12 + IP_MULTICAST_TTL = 0x11 + IP_NEXTHOP = 0x19 + IP_OPTIONS = 0x1 + IP_PKTINFO = 0x1a + IP_RECVDSTADDR = 0x7 + IP_RECVIF = 0x9 + IP_RECVOPTS = 0x5 + IP_RECVPKTINFO = 0x1a + IP_RECVRETOPTS = 0x6 + IP_RECVSLLA = 0xa + IP_RECVTTL = 0xb + IP_RETOPTS = 0x8 + IP_REUSEADDR = 0x104 + IP_SEC_OPT = 0x22 + IP_TOS = 0x3 + IP_TTL = 0x4 + IP_UNBLOCK_SOURCE = 0x16 + IP_UNSPEC_SRC = 0x42 + ISIG = 0x1 + ISTRIP = 0x20 + IXANY = 0x800 + IXOFF = 0x1000 + IXON = 0x400 + MADV_ACCESS_DEFAULT = 0x6 + MADV_ACCESS_LWP = 0x7 + MADV_ACCESS_MANY = 0x8 + MADV_DONTNEED = 0x4 + MADV_FREE = 0x5 + MADV_NORMAL = 0x0 + MADV_RANDOM = 0x1 + MADV_SEQUENTIAL = 0x2 + MADV_WILLNEED = 0x3 + MAP_32BIT = 0x80 + MAP_ALIGN = 0x200 + MAP_ANON = 0x100 + MAP_ANONYMOUS = 0x100 + MAP_FIXED = 0x10 + MAP_INITDATA = 0x800 + MAP_NORESERVE = 0x40 + MAP_PRIVATE = 0x2 + MAP_RENAME = 0x20 + MAP_SHARED = 0x1 + MAP_TEXT = 0x400 + MAP_TYPE = 0xf + MCL_CURRENT = 0x1 + MCL_FUTURE = 0x2 + MSG_CTRUNC = 0x10 + MSG_DONTROUTE = 0x4 + MSG_DONTWAIT = 0x80 + MSG_DUPCTRL = 0x800 + MSG_EOR = 0x8 + MSG_MAXIOVLEN = 0x10 + MSG_NOTIFICATION = 0x100 + MSG_OOB = 0x1 + MSG_PEEK = 0x2 + MSG_TRUNC = 0x20 + MSG_WAITALL = 0x40 + MSG_XPG4_2 = 0x8000 + MS_ASYNC = 0x1 + MS_INVALIDATE = 0x2 + MS_OLDSYNC = 0x0 + MS_SYNC = 0x4 + M_FLUSH = 0x86 + NOFLSH = 0x80 + OCRNL = 0x8 + OFDEL = 0x80 + OFILL = 0x40 + ONLCR = 0x4 + ONLRET = 0x20 + ONOCR = 0x10 + OPENFAIL = -0x1 + OPOST = 0x1 + O_ACCMODE = 0x600003 + O_APPEND = 0x8 + O_CLOEXEC = 0x800000 + O_CREAT = 0x100 + O_DSYNC = 0x40 + O_EXCL = 0x400 + O_EXEC = 0x400000 + O_LARGEFILE = 0x2000 + O_NDELAY = 0x4 + O_NOCTTY = 0x800 + O_NOFOLLOW = 0x20000 + O_NOLINKS = 0x40000 + O_NONBLOCK = 0x80 + O_RDONLY = 0x0 + O_RDWR = 0x2 + O_RSYNC = 0x8000 + O_SEARCH = 0x200000 + O_SIOCGIFCONF = -0x3ff796ec + O_SIOCGLIFCONF = -0x3fef9688 + O_SYNC = 0x10 + O_TRUNC = 0x200 + O_WRONLY = 0x1 + O_XATTR = 0x4000 + PARENB = 0x100 + PAREXT = 0x100000 + PARMRK = 0x8 + PARODD = 0x200 + PENDIN = 0x4000 + PRIO_PGRP = 0x1 + PRIO_PROCESS = 0x0 + PRIO_USER = 0x2 + PROT_EXEC = 0x4 + PROT_NONE = 0x0 + PROT_READ = 0x1 + PROT_WRITE = 0x2 + RLIMIT_AS = 0x6 + RLIMIT_CORE = 0x4 + RLIMIT_CPU = 0x0 + RLIMIT_DATA = 0x2 + RLIMIT_FSIZE = 0x1 + RLIMIT_NOFILE = 0x5 + RLIMIT_STACK = 0x3 + RLIM_INFINITY = -0x3 + RTAX_AUTHOR = 0x6 + RTAX_BRD = 0x7 + RTAX_DST = 0x0 + RTAX_GATEWAY = 0x1 + RTAX_GENMASK = 0x3 + RTAX_IFA = 0x5 + RTAX_IFP = 0x4 + RTAX_MAX = 0x9 + RTAX_NETMASK = 0x2 + RTAX_SRC = 0x8 + RTA_AUTHOR = 0x40 + RTA_BRD = 0x80 + RTA_DST = 0x1 + RTA_GATEWAY = 0x2 + RTA_GENMASK = 0x8 + RTA_IFA = 0x20 + RTA_IFP = 0x10 + RTA_NETMASK = 0x4 + RTA_NUMBITS = 0x9 + RTA_SRC = 0x100 + RTF_BLACKHOLE = 0x1000 + RTF_CLONING = 0x100 + RTF_DONE = 0x40 + RTF_DYNAMIC = 0x10 + RTF_GATEWAY = 0x2 + RTF_HOST = 0x4 + RTF_INDIRECT = 0x40000 + RTF_KERNEL = 0x80000 + RTF_LLINFO = 0x400 + RTF_MASK = 0x80 + RTF_MODIFIED = 0x20 + RTF_MULTIRT = 0x10000 + RTF_PRIVATE = 0x2000 + RTF_PROTO1 = 0x8000 + RTF_PROTO2 = 0x4000 + RTF_REJECT = 0x8 + RTF_SETSRC = 0x20000 + RTF_STATIC = 0x800 + RTF_UP = 0x1 + RTF_XRESOLVE = 0x200 + RTF_ZONE = 0x100000 + RTM_ADD = 0x1 + RTM_CHANGE = 0x3 + RTM_CHGADDR = 0xf + RTM_DELADDR = 0xd + RTM_DELETE = 0x2 + RTM_FREEADDR = 0x10 + RTM_GET = 0x4 + RTM_IFINFO = 0xe + RTM_LOCK = 0x8 + RTM_LOSING = 0x5 + RTM_MISS = 0x7 + RTM_NEWADDR = 0xc + RTM_OLDADD = 0x9 + RTM_OLDDEL = 0xa + RTM_REDIRECT = 0x6 + RTM_RESOLVE = 0xb + RTM_VERSION = 0x3 + RTV_EXPIRE = 0x4 + RTV_HOPCOUNT = 0x2 + RTV_MTU = 0x1 + RTV_RPIPE = 0x8 + RTV_RTT = 0x40 + RTV_RTTVAR = 0x80 + RTV_SPIPE = 0x10 + RTV_SSTHRESH = 0x20 + RT_AWARE = 0x1 + RUSAGE_CHILDREN = -0x1 + RUSAGE_SELF = 0x0 + SCM_RIGHTS = 0x1010 + SCM_TIMESTAMP = 0x1013 + SCM_UCRED = 0x1012 + SHUT_RD = 0x0 + SHUT_RDWR = 0x2 + SHUT_WR = 0x1 + SIG2STR_MAX = 0x20 + SIOCADDMULTI = -0x7fdf96cf + SIOCADDRT = -0x7fcf8df6 + SIOCATMARK = 0x40047307 + SIOCDARP = -0x7fdb96e0 + SIOCDELMULTI = -0x7fdf96ce + SIOCDELRT = -0x7fcf8df5 + SIOCDXARP = -0x7fff9658 + SIOCGARP = -0x3fdb96e1 + SIOCGDSTINFO = -0x3fff965c + SIOCGENADDR = -0x3fdf96ab + SIOCGENPSTATS = -0x3fdf96c7 + SIOCGETLSGCNT = -0x3fef8deb + SIOCGETNAME = 0x40107334 + SIOCGETPEER = 0x40107335 + SIOCGETPROP = -0x3fff8f44 + SIOCGETSGCNT = -0x3feb8deb + SIOCGETSYNC = -0x3fdf96d3 + SIOCGETVIFCNT = -0x3feb8dec + SIOCGHIWAT = 0x40047301 + SIOCGIFADDR = -0x3fdf96f3 + SIOCGIFBRDADDR = -0x3fdf96e9 + SIOCGIFCONF = -0x3ff796a4 + SIOCGIFDSTADDR = -0x3fdf96f1 + SIOCGIFFLAGS = -0x3fdf96ef + SIOCGIFHWADDR = -0x3fdf9647 + SIOCGIFINDEX = -0x3fdf96a6 + SIOCGIFMEM = -0x3fdf96ed + SIOCGIFMETRIC = -0x3fdf96e5 + SIOCGIFMTU = -0x3fdf96ea + SIOCGIFMUXID = -0x3fdf96a8 + SIOCGIFNETMASK = -0x3fdf96e7 + SIOCGIFNUM = 0x40046957 + SIOCGIP6ADDRPOLICY = -0x3fff965e + SIOCGIPMSFILTER = -0x3ffb964c + SIOCGLIFADDR = -0x3f87968f + SIOCGLIFBINDING = -0x3f879666 + SIOCGLIFBRDADDR = -0x3f879685 + SIOCGLIFCONF = -0x3fef965b + SIOCGLIFDADSTATE = -0x3f879642 + SIOCGLIFDSTADDR = -0x3f87968d + SIOCGLIFFLAGS = -0x3f87968b + SIOCGLIFGROUPINFO = -0x3f4b9663 + SIOCGLIFGROUPNAME = -0x3f879664 + SIOCGLIFHWADDR = -0x3f879640 + SIOCGLIFINDEX = -0x3f87967b + SIOCGLIFLNKINFO = -0x3f879674 + SIOCGLIFMETRIC = -0x3f879681 + SIOCGLIFMTU = -0x3f879686 + SIOCGLIFMUXID = -0x3f87967d + SIOCGLIFNETMASK = -0x3f879683 + SIOCGLIFNUM = -0x3ff3967e + SIOCGLIFSRCOF = -0x3fef964f + SIOCGLIFSUBNET = -0x3f879676 + SIOCGLIFTOKEN = -0x3f879678 + SIOCGLIFUSESRC = -0x3f879651 + SIOCGLIFZONE = -0x3f879656 + SIOCGLOWAT = 0x40047303 + SIOCGMSFILTER = -0x3ffb964e + SIOCGPGRP = 0x40047309 + SIOCGSTAMP = -0x3fef9646 + SIOCGXARP = -0x3fff9659 + SIOCIFDETACH = -0x7fdf96c8 + SIOCILB = -0x3ffb9645 + SIOCLIFADDIF = -0x3f879691 + SIOCLIFDELND = -0x7f879673 + SIOCLIFGETND = -0x3f879672 + SIOCLIFREMOVEIF = -0x7f879692 + SIOCLIFSETND = -0x7f879671 + SIOCLOWER = -0x7fdf96d7 + SIOCSARP = -0x7fdb96e2 + SIOCSCTPGOPT = -0x3fef9653 + SIOCSCTPPEELOFF = -0x3ffb9652 + SIOCSCTPSOPT = -0x7fef9654 + SIOCSENABLESDP = -0x3ffb9649 + SIOCSETPROP = -0x7ffb8f43 + SIOCSETSYNC = -0x7fdf96d4 + SIOCSHIWAT = -0x7ffb8d00 + SIOCSIFADDR = -0x7fdf96f4 + SIOCSIFBRDADDR = -0x7fdf96e8 + SIOCSIFDSTADDR = -0x7fdf96f2 + SIOCSIFFLAGS = -0x7fdf96f0 + SIOCSIFINDEX = -0x7fdf96a5 + SIOCSIFMEM = -0x7fdf96ee + SIOCSIFMETRIC = -0x7fdf96e4 + SIOCSIFMTU = -0x7fdf96eb + SIOCSIFMUXID = -0x7fdf96a7 + SIOCSIFNAME = -0x7fdf96b7 + SIOCSIFNETMASK = -0x7fdf96e6 + SIOCSIP6ADDRPOLICY = -0x7fff965d + SIOCSIPMSFILTER = -0x7ffb964b + SIOCSLGETREQ = -0x3fdf96b9 + SIOCSLIFADDR = -0x7f879690 + SIOCSLIFBRDADDR = -0x7f879684 + SIOCSLIFDSTADDR = -0x7f87968e + SIOCSLIFFLAGS = -0x7f87968c + SIOCSLIFGROUPNAME = -0x7f879665 + SIOCSLIFINDEX = -0x7f87967a + SIOCSLIFLNKINFO = -0x7f879675 + SIOCSLIFMETRIC = -0x7f879680 + SIOCSLIFMTU = -0x7f879687 + SIOCSLIFMUXID = -0x7f87967c + SIOCSLIFNAME = -0x3f87967f + SIOCSLIFNETMASK = -0x7f879682 + SIOCSLIFPREFIX = -0x3f879641 + SIOCSLIFSUBNET = -0x7f879677 + SIOCSLIFTOKEN = -0x7f879679 + SIOCSLIFUSESRC = -0x7f879650 + SIOCSLIFZONE = -0x7f879655 + SIOCSLOWAT = -0x7ffb8cfe + SIOCSLSTAT = -0x7fdf96b8 + SIOCSMSFILTER = -0x7ffb964d + SIOCSPGRP = -0x7ffb8cf8 + SIOCSPROMISC = -0x7ffb96d0 + SIOCSQPTR = -0x3ffb9648 + SIOCSSDSTATS = -0x3fdf96d2 + SIOCSSESTATS = -0x3fdf96d1 + SIOCSXARP = -0x7fff965a + SIOCTMYADDR = -0x3ff79670 + SIOCTMYSITE = -0x3ff7966e + SIOCTONLINK = -0x3ff7966f + SIOCUPPER = -0x7fdf96d8 + SIOCX25RCV = -0x3fdf96c4 + SIOCX25TBL = -0x3fdf96c3 + SIOCX25XMT = -0x3fdf96c5 + SIOCXPROTO = 0x20007337 + SOCK_CLOEXEC = 0x80000 + SOCK_DGRAM = 0x1 + SOCK_NDELAY = 0x200000 + SOCK_NONBLOCK = 0x100000 + SOCK_RAW = 0x4 + SOCK_RDM = 0x5 + SOCK_SEQPACKET = 0x6 + SOCK_STREAM = 0x2 + SOCK_TYPE_MASK = 0xffff + SOL_FILTER = 0xfffc + SOL_PACKET = 0xfffd + SOL_ROUTE = 0xfffe + SOL_SOCKET = 0xffff + SOMAXCONN = 0x80 + SO_ACCEPTCONN = 0x2 + SO_ALL = 0x3f + SO_ALLZONES = 0x1014 + SO_ANON_MLP = 0x100a + SO_ATTACH_FILTER = 0x40000001 + SO_BAND = 0x4000 + SO_BROADCAST = 0x20 + SO_COPYOPT = 0x80000 + SO_DEBUG = 0x1 + SO_DELIM = 0x8000 + SO_DETACH_FILTER = 0x40000002 + SO_DGRAM_ERRIND = 0x200 + SO_DOMAIN = 0x100c + SO_DONTLINGER = -0x81 + SO_DONTROUTE = 0x10 + SO_ERROPT = 0x40000 + SO_ERROR = 0x1007 + SO_EXCLBIND = 0x1015 + SO_HIWAT = 0x10 + SO_ISNTTY = 0x800 + SO_ISTTY = 0x400 + SO_KEEPALIVE = 0x8 + SO_LINGER = 0x80 + SO_LOWAT = 0x20 + SO_MAC_EXEMPT = 0x100b + SO_MAC_IMPLICIT = 0x1016 + SO_MAXBLK = 0x100000 + SO_MAXPSZ = 0x8 + SO_MINPSZ = 0x4 + SO_MREADOFF = 0x80 + SO_MREADON = 0x40 + SO_NDELOFF = 0x200 + SO_NDELON = 0x100 + SO_NODELIM = 0x10000 + SO_OOBINLINE = 0x100 + SO_PROTOTYPE = 0x1009 + SO_RCVBUF = 0x1002 + SO_RCVLOWAT = 0x1004 + SO_RCVPSH = 0x100d + SO_RCVTIMEO = 0x1006 + SO_READOPT = 0x1 + SO_RECVUCRED = 0x400 + SO_REUSEADDR = 0x4 + SO_SECATTR = 0x1011 + SO_SNDBUF = 0x1001 + SO_SNDLOWAT = 0x1003 + SO_SNDTIMEO = 0x1005 + SO_STRHOLD = 0x20000 + SO_TAIL = 0x200000 + SO_TIMESTAMP = 0x1013 + SO_TONSTOP = 0x2000 + SO_TOSTOP = 0x1000 + SO_TYPE = 0x1008 + SO_USELOOPBACK = 0x40 + SO_VRRP = 0x1017 + SO_WROFF = 0x2 + TCFLSH = 0x5407 + TCGETA = 0x5401 + TCGETS = 0x540d + TCIFLUSH = 0x0 + TCIOFLUSH = 0x2 + TCOFLUSH = 0x1 + TCP_ABORT_THRESHOLD = 0x11 + TCP_ANONPRIVBIND = 0x20 + TCP_CONN_ABORT_THRESHOLD = 0x13 + TCP_CONN_NOTIFY_THRESHOLD = 0x12 + TCP_CORK = 0x18 + TCP_EXCLBIND = 0x21 + TCP_INIT_CWND = 0x15 + TCP_KEEPALIVE = 0x8 + TCP_KEEPALIVE_ABORT_THRESHOLD = 0x17 + TCP_KEEPALIVE_THRESHOLD = 0x16 + TCP_KEEPCNT = 0x23 + TCP_KEEPIDLE = 0x22 + TCP_KEEPINTVL = 0x24 + TCP_LINGER2 = 0x1c + TCP_MAXSEG = 0x2 + TCP_MSS = 0x218 + TCP_NODELAY = 0x1 + TCP_NOTIFY_THRESHOLD = 0x10 + TCP_RECVDSTADDR = 0x14 + TCP_RTO_INITIAL = 0x19 + TCP_RTO_MAX = 0x1b + TCP_RTO_MIN = 0x1a + TCSAFLUSH = 0x5410 + TCSBRK = 0x5405 + TCSETA = 0x5402 + TCSETAF = 0x5404 + TCSETAW = 0x5403 + TCSETS = 0x540e + TCSETSF = 0x5410 + TCSETSW = 0x540f + TCXONC = 0x5406 + TIOC = 0x5400 + TIOCCBRK = 0x747a + TIOCCDTR = 0x7478 + TIOCCILOOP = 0x746c + TIOCEXCL = 0x740d + TIOCFLUSH = 0x7410 + TIOCGETC = 0x7412 + TIOCGETD = 0x7400 + TIOCGETP = 0x7408 + TIOCGLTC = 0x7474 + TIOCGPGRP = 0x7414 + TIOCGPPS = 0x547d + TIOCGPPSEV = 0x547f + TIOCGSID = 0x7416 + TIOCGSOFTCAR = 0x5469 + TIOCGWINSZ = 0x5468 + TIOCHPCL = 0x7402 + TIOCKBOF = 0x5409 + TIOCKBON = 0x5408 + TIOCLBIC = 0x747e + TIOCLBIS = 0x747f + TIOCLGET = 0x747c + TIOCLSET = 0x747d + TIOCMBIC = 0x741c + TIOCMBIS = 0x741b + TIOCMGET = 0x741d + TIOCMSET = 0x741a + TIOCM_CAR = 0x40 + TIOCM_CD = 0x40 + TIOCM_CTS = 0x20 + TIOCM_DSR = 0x100 + TIOCM_DTR = 0x2 + TIOCM_LE = 0x1 + TIOCM_RI = 0x80 + TIOCM_RNG = 0x80 + TIOCM_RTS = 0x4 + TIOCM_SR = 0x10 + TIOCM_ST = 0x8 + TIOCNOTTY = 0x7471 + TIOCNXCL = 0x740e + TIOCOUTQ = 0x7473 + TIOCREMOTE = 0x741e + TIOCSBRK = 0x747b + TIOCSCTTY = 0x7484 + TIOCSDTR = 0x7479 + TIOCSETC = 0x7411 + TIOCSETD = 0x7401 + TIOCSETN = 0x740a + TIOCSETP = 0x7409 + TIOCSIGNAL = 0x741f + TIOCSILOOP = 0x746d + TIOCSLTC = 0x7475 + TIOCSPGRP = 0x7415 + TIOCSPPS = 0x547e + TIOCSSOFTCAR = 0x546a + TIOCSTART = 0x746e + TIOCSTI = 0x7417 + TIOCSTOP = 0x746f + TIOCSWINSZ = 0x5467 + TOSTOP = 0x100 + VCEOF = 0x8 + VCEOL = 0x9 + VDISCARD = 0xd + VDSUSP = 0xb + VEOF = 0x4 + VEOL = 0x5 + VEOL2 = 0x6 + VERASE = 0x2 + VINTR = 0x0 + VKILL = 0x3 + VLNEXT = 0xf + VMIN = 0x4 + VQUIT = 0x1 + VREPRINT = 0xc + VSTART = 0x8 + VSTATUS = 0x10 + VSTOP = 0x9 + VSUSP = 0xa + VSWTCH = 0x7 + VT0 = 0x0 + VT1 = 0x4000 + VTDLY = 0x4000 + VTIME = 0x5 + VWERASE = 0xe + WCONTFLG = 0xffff + WCONTINUED = 0x8 + WCOREFLG = 0x80 + WEXITED = 0x1 + WNOHANG = 0x40 + WNOWAIT = 0x80 + WOPTMASK = 0xcf + WRAP = 0x20000 + WSIGMASK = 0x7f + WSTOPFLG = 0x7f + WSTOPPED = 0x4 + WTRAPPED = 0x2 + WUNTRACED = 0x4 +) + +// Errors +const ( + E2BIG = syscall.Errno(0x7) + EACCES = syscall.Errno(0xd) + EADDRINUSE = syscall.Errno(0x7d) + EADDRNOTAVAIL = syscall.Errno(0x7e) + EADV = syscall.Errno(0x44) + EAFNOSUPPORT = syscall.Errno(0x7c) + EAGAIN = syscall.Errno(0xb) + EALREADY = syscall.Errno(0x95) + EBADE = syscall.Errno(0x32) + EBADF = syscall.Errno(0x9) + EBADFD = syscall.Errno(0x51) + EBADMSG = syscall.Errno(0x4d) + EBADR = syscall.Errno(0x33) + EBADRQC = syscall.Errno(0x36) + EBADSLT = syscall.Errno(0x37) + EBFONT = syscall.Errno(0x39) + EBUSY = syscall.Errno(0x10) + ECANCELED = syscall.Errno(0x2f) + ECHILD = syscall.Errno(0xa) + ECHRNG = syscall.Errno(0x25) + ECOMM = syscall.Errno(0x46) + ECONNABORTED = syscall.Errno(0x82) + ECONNREFUSED = syscall.Errno(0x92) + ECONNRESET = syscall.Errno(0x83) + EDEADLK = syscall.Errno(0x2d) + EDEADLOCK = syscall.Errno(0x38) + EDESTADDRREQ = syscall.Errno(0x60) + EDOM = syscall.Errno(0x21) + EDQUOT = syscall.Errno(0x31) + EEXIST = syscall.Errno(0x11) + EFAULT = syscall.Errno(0xe) + EFBIG = syscall.Errno(0x1b) + EHOSTDOWN = syscall.Errno(0x93) + EHOSTUNREACH = syscall.Errno(0x94) + EIDRM = syscall.Errno(0x24) + EILSEQ = syscall.Errno(0x58) + EINPROGRESS = syscall.Errno(0x96) + EINTR = syscall.Errno(0x4) + EINVAL = syscall.Errno(0x16) + EIO = syscall.Errno(0x5) + EISCONN = syscall.Errno(0x85) + EISDIR = syscall.Errno(0x15) + EL2HLT = syscall.Errno(0x2c) + EL2NSYNC = syscall.Errno(0x26) + EL3HLT = syscall.Errno(0x27) + EL3RST = syscall.Errno(0x28) + ELIBACC = syscall.Errno(0x53) + ELIBBAD = syscall.Errno(0x54) + ELIBEXEC = syscall.Errno(0x57) + ELIBMAX = syscall.Errno(0x56) + ELIBSCN = syscall.Errno(0x55) + ELNRNG = syscall.Errno(0x29) + ELOCKUNMAPPED = syscall.Errno(0x48) + ELOOP = syscall.Errno(0x5a) + EMFILE = syscall.Errno(0x18) + EMLINK = syscall.Errno(0x1f) + EMSGSIZE = syscall.Errno(0x61) + EMULTIHOP = syscall.Errno(0x4a) + ENAMETOOLONG = syscall.Errno(0x4e) + ENETDOWN = syscall.Errno(0x7f) + ENETRESET = syscall.Errno(0x81) + ENETUNREACH = syscall.Errno(0x80) + ENFILE = syscall.Errno(0x17) + ENOANO = syscall.Errno(0x35) + ENOBUFS = syscall.Errno(0x84) + ENOCSI = syscall.Errno(0x2b) + ENODATA = syscall.Errno(0x3d) + ENODEV = syscall.Errno(0x13) + ENOENT = syscall.Errno(0x2) + ENOEXEC = syscall.Errno(0x8) + ENOLCK = syscall.Errno(0x2e) + ENOLINK = syscall.Errno(0x43) + ENOMEM = syscall.Errno(0xc) + ENOMSG = syscall.Errno(0x23) + ENONET = syscall.Errno(0x40) + ENOPKG = syscall.Errno(0x41) + ENOPROTOOPT = syscall.Errno(0x63) + ENOSPC = syscall.Errno(0x1c) + ENOSR = syscall.Errno(0x3f) + ENOSTR = syscall.Errno(0x3c) + ENOSYS = syscall.Errno(0x59) + ENOTACTIVE = syscall.Errno(0x49) + ENOTBLK = syscall.Errno(0xf) + ENOTCONN = syscall.Errno(0x86) + ENOTDIR = syscall.Errno(0x14) + ENOTEMPTY = syscall.Errno(0x5d) + ENOTRECOVERABLE = syscall.Errno(0x3b) + ENOTSOCK = syscall.Errno(0x5f) + ENOTSUP = syscall.Errno(0x30) + ENOTTY = syscall.Errno(0x19) + ENOTUNIQ = syscall.Errno(0x50) + ENXIO = syscall.Errno(0x6) + EOPNOTSUPP = syscall.Errno(0x7a) + EOVERFLOW = syscall.Errno(0x4f) + EOWNERDEAD = syscall.Errno(0x3a) + EPERM = syscall.Errno(0x1) + EPFNOSUPPORT = syscall.Errno(0x7b) + EPIPE = syscall.Errno(0x20) + EPROTO = syscall.Errno(0x47) + EPROTONOSUPPORT = syscall.Errno(0x78) + EPROTOTYPE = syscall.Errno(0x62) + ERANGE = syscall.Errno(0x22) + EREMCHG = syscall.Errno(0x52) + EREMOTE = syscall.Errno(0x42) + ERESTART = syscall.Errno(0x5b) + EROFS = syscall.Errno(0x1e) + ESHUTDOWN = syscall.Errno(0x8f) + ESOCKTNOSUPPORT = syscall.Errno(0x79) + ESPIPE = syscall.Errno(0x1d) + ESRCH = syscall.Errno(0x3) + ESRMNT = syscall.Errno(0x45) + ESTALE = syscall.Errno(0x97) + ESTRPIPE = syscall.Errno(0x5c) + ETIME = syscall.Errno(0x3e) + ETIMEDOUT = syscall.Errno(0x91) + ETOOMANYREFS = syscall.Errno(0x90) + ETXTBSY = syscall.Errno(0x1a) + EUNATCH = syscall.Errno(0x2a) + EUSERS = syscall.Errno(0x5e) + EWOULDBLOCK = syscall.Errno(0xb) + EXDEV = syscall.Errno(0x12) + EXFULL = syscall.Errno(0x34) +) + +// Signals +const ( + SIGABRT = syscall.Signal(0x6) + SIGALRM = syscall.Signal(0xe) + SIGBUS = syscall.Signal(0xa) + SIGCANCEL = syscall.Signal(0x24) + SIGCHLD = syscall.Signal(0x12) + SIGCLD = syscall.Signal(0x12) + SIGCONT = syscall.Signal(0x19) + SIGEMT = syscall.Signal(0x7) + SIGFPE = syscall.Signal(0x8) + SIGFREEZE = syscall.Signal(0x22) + SIGHUP = syscall.Signal(0x1) + SIGILL = syscall.Signal(0x4) + SIGINFO = syscall.Signal(0x29) + SIGINT = syscall.Signal(0x2) + SIGIO = syscall.Signal(0x16) + SIGIOT = syscall.Signal(0x6) + SIGJVM1 = syscall.Signal(0x27) + SIGJVM2 = syscall.Signal(0x28) + SIGKILL = syscall.Signal(0x9) + SIGLOST = syscall.Signal(0x25) + SIGLWP = syscall.Signal(0x21) + SIGPIPE = syscall.Signal(0xd) + SIGPOLL = syscall.Signal(0x16) + SIGPROF = syscall.Signal(0x1d) + SIGPWR = syscall.Signal(0x13) + SIGQUIT = syscall.Signal(0x3) + SIGSEGV = syscall.Signal(0xb) + SIGSTOP = syscall.Signal(0x17) + SIGSYS = syscall.Signal(0xc) + SIGTERM = syscall.Signal(0xf) + SIGTHAW = syscall.Signal(0x23) + SIGTRAP = syscall.Signal(0x5) + SIGTSTP = syscall.Signal(0x18) + SIGTTIN = syscall.Signal(0x1a) + SIGTTOU = syscall.Signal(0x1b) + SIGURG = syscall.Signal(0x15) + SIGUSR1 = syscall.Signal(0x10) + SIGUSR2 = syscall.Signal(0x11) + SIGVTALRM = syscall.Signal(0x1c) + SIGWAITING = syscall.Signal(0x20) + SIGWINCH = syscall.Signal(0x14) + SIGXCPU = syscall.Signal(0x1e) + SIGXFSZ = syscall.Signal(0x1f) + SIGXRES = syscall.Signal(0x26) +) + +// Error table +var errors = [...]string{ + 1: "not owner", + 2: "no such file or directory", + 3: "no such process", + 4: "interrupted system call", + 5: "I/O error", + 6: "no such device or address", + 7: "arg list too long", + 8: "exec format error", + 9: "bad file number", + 10: "no child processes", + 11: "resource temporarily unavailable", + 12: "not enough space", + 13: "permission denied", + 14: "bad address", + 15: "block device required", + 16: "device busy", + 17: "file exists", + 18: "cross-device link", + 19: "no such device", + 20: "not a directory", + 21: "is a directory", + 22: "invalid argument", + 23: "file table overflow", + 24: "too many open files", + 25: "inappropriate ioctl for device", + 26: "text file busy", + 27: "file too large", + 28: "no space left on device", + 29: "illegal seek", + 30: "read-only file system", + 31: "too many links", + 32: "broken pipe", + 33: "argument out of domain", + 34: "result too large", + 35: "no message of desired type", + 36: "identifier removed", + 37: "channel number out of range", + 38: "level 2 not synchronized", + 39: "level 3 halted", + 40: "level 3 reset", + 41: "link number out of range", + 42: "protocol driver not attached", + 43: "no CSI structure available", + 44: "level 2 halted", + 45: "deadlock situation detected/avoided", + 46: "no record locks available", + 47: "operation canceled", + 48: "operation not supported", + 49: "disc quota exceeded", + 50: "bad exchange descriptor", + 51: "bad request descriptor", + 52: "message tables full", + 53: "anode table overflow", + 54: "bad request code", + 55: "invalid slot", + 56: "file locking deadlock", + 57: "bad font file format", + 58: "owner of the lock died", + 59: "lock is not recoverable", + 60: "not a stream device", + 61: "no data available", + 62: "timer expired", + 63: "out of stream resources", + 64: "machine is not on the network", + 65: "package not installed", + 66: "object is remote", + 67: "link has been severed", + 68: "advertise error", + 69: "srmount error", + 70: "communication error on send", + 71: "protocol error", + 72: "locked lock was unmapped ", + 73: "facility is not active", + 74: "multihop attempted", + 77: "not a data message", + 78: "file name too long", + 79: "value too large for defined data type", + 80: "name not unique on network", + 81: "file descriptor in bad state", + 82: "remote address changed", + 83: "can not access a needed shared library", + 84: "accessing a corrupted shared library", + 85: ".lib section in a.out corrupted", + 86: "attempting to link in more shared libraries than system limit", + 87: "can not exec a shared library directly", + 88: "illegal byte sequence", + 89: "operation not applicable", + 90: "number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS", + 91: "error 91", + 92: "error 92", + 93: "directory not empty", + 94: "too many users", + 95: "socket operation on non-socket", + 96: "destination address required", + 97: "message too long", + 98: "protocol wrong type for socket", + 99: "option not supported by protocol", + 120: "protocol not supported", + 121: "socket type not supported", + 122: "operation not supported on transport endpoint", + 123: "protocol family not supported", + 124: "address family not supported by protocol family", + 125: "address already in use", + 126: "cannot assign requested address", + 127: "network is down", + 128: "network is unreachable", + 129: "network dropped connection because of reset", + 130: "software caused connection abort", + 131: "connection reset by peer", + 132: "no buffer space available", + 133: "transport endpoint is already connected", + 134: "transport endpoint is not connected", + 143: "cannot send after socket shutdown", + 144: "too many references: cannot splice", + 145: "connection timed out", + 146: "connection refused", + 147: "host is down", + 148: "no route to host", + 149: "operation already in progress", + 150: "operation now in progress", + 151: "stale NFS file handle", +} + +// Signal table +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal Instruction", + 5: "trace/Breakpoint Trap", + 6: "abort", + 7: "emulation Trap", + 8: "arithmetic Exception", + 9: "killed", + 10: "bus Error", + 11: "segmentation Fault", + 12: "bad System Call", + 13: "broken Pipe", + 14: "alarm Clock", + 15: "terminated", + 16: "user Signal 1", + 17: "user Signal 2", + 18: "child Status Changed", + 19: "power-Fail/Restart", + 20: "window Size Change", + 21: "urgent Socket Condition", + 22: "pollable Event", + 23: "stopped (signal)", + 24: "stopped (user)", + 25: "continued", + 26: "stopped (tty input)", + 27: "stopped (tty output)", + 28: "virtual Timer Expired", + 29: "profiling Timer Expired", + 30: "cpu Limit Exceeded", + 31: "file Size Limit Exceeded", + 32: "no runnable lwp", + 33: "inter-lwp signal", + 34: "checkpoint Freeze", + 35: "checkpoint Thaw", + 36: "thread Cancellation", + 37: "resource Lost", + 38: "resource Control Exceeded", + 39: "reserved for JVM 1", + 40: "reserved for JVM 2", + 41: "information Request", +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go new file mode 100644 index 000000000..031034a34 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.go @@ -0,0 +1,1427 @@ +// mksyscall.pl -l32 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,darwin + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + use(_p0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kill(pid int, signum int, posix int) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exchangedata(path1 string, path2 string, options int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path1) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(path2) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0) + newoffset = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setprivexec(flag int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) { + r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + sec = int32(r0) + usec = int32(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go new file mode 100644 index 000000000..ee96f78ba --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go @@ -0,0 +1,1443 @@ +// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,darwin + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + use(_p0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kill(pid int, signum int, posix int) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exchangedata(path1 string, path2 string, options int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path1) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(path2) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + newoffset = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setprivexec(flag int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) { + r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + sec = int64(r0) + usec = int32(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go new file mode 100644 index 000000000..e52cd0d54 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.go @@ -0,0 +1,1427 @@ +// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_arm.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm,darwin + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + use(_p0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kill(pid int, signum int, posix int) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exchangedata(path1 string, path2 string, options int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path1) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(path2) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + newoffset = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setprivexec(flag int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func gettimeofday(tp *Timeval) (sec int32, usec int32, err error) { + r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + sec = int32(r0) + usec = int32(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go new file mode 100644 index 000000000..9863ef99e --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go @@ -0,0 +1,1427 @@ +// mksyscall.pl syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm64,darwin + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + use(_p0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kill(pid int, signum int, posix int) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exchangedata(path1 string, path2 string, options int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path1) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(path2) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + newoffset = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setprivexec(flag int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) { + r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + sec = int64(r0) + usec = int32(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go new file mode 100644 index 000000000..78de48dcf --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go @@ -0,0 +1,1413 @@ +// mksyscall.pl -dragonfly syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,dragonfly + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + use(_p0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EXTPREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EXTPWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0) + newoffset = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go new file mode 100644 index 000000000..fade994dc --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go @@ -0,0 +1,1665 @@ +// mksyscall.pl -l32 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,freebsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + use(_p0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0))) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fadvise(fd int, offset int64, length int64, advice int) (err error) { + _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0) + newoffset = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go new file mode 100644 index 000000000..c28281e83 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go @@ -0,0 +1,1665 @@ +// mksyscall.pl syscall_bsd.go syscall_freebsd.go syscall_freebsd_amd64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,freebsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + use(_p0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0))) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fadvise(fd int, offset int64, length int64, advice int) (err error) { + _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + newoffset = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go new file mode 100644 index 000000000..a18ba5c88 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go @@ -0,0 +1,1665 @@ +// mksyscall.pl -l32 -arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm,freebsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + use(_p0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (r int, w int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + r = int(r0) + w = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0))) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(file) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attrname) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(link) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) + use(unsafe.Pointer(_p0)) + ret = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fadvise(fd int, offset int64, length int64, advice int) (err error) { + _, _, e1 := Syscall9(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdtablesize() (size int) { + r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) + size = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0) + newoffset = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Undelete(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go new file mode 100644 index 000000000..1f7a75669 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go @@ -0,0 +1,1660 @@ +// mksyscall.pl -l32 syscall_linux.go syscall_linux_386.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + use(unsafe.Pointer(_p2)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate(size int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + use(unsafe.Pointer(_p0)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + use(unsafe.Pointer(_p0)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setns(fd int, nstype int) (err error) { + _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + Syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { + r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) + n = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]_C_int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(oldfd int, newfd int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fadvise(fd int, offset int64, length int64, advice int) (err error) { + _, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0) + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit() (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ioperm(from int, num int, on int) (err error) { + _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Iopl(level int) (err error) { + _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) + written = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsgid(gid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsuid(uid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { + _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pause() (err error) { + _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getrlimit(resource int, rlim *rlimit32) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setrlimit(resource int, rlim *rlimit32) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Time(t *Time_t) (tt Time_t, err error) { + r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) + tt = Time_t(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Utime(path string, buf *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { + r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go new file mode 100644 index 000000000..b4e24fc0a --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go @@ -0,0 +1,1854 @@ +// mksyscall.pl syscall_linux.go syscall_linux_amd64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + use(unsafe.Pointer(_p2)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate(size int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + use(unsafe.Pointer(_p0)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + use(unsafe.Pointer(_p0)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setns(fd int, nstype int) (err error) { + _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + Syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(oldfd int, newfd int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fadvise(fd int, offset int64, length int64, advice int) (err error) { + _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, buf *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit() (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ioperm(from int, num int, on int) (err error) { + _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Iopl(level int) (err error) { + _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, n int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pause() (err error) { + _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (off int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + off = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) + written = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsgid(gid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsuid(uid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, buf *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { + _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Utime(path string, buf *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]_C_int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { + r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go new file mode 100644 index 000000000..20bf33ce5 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go @@ -0,0 +1,1761 @@ +// mksyscall.pl -l32 -arm syscall_linux.go syscall_linux_arm.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + use(unsafe.Pointer(_p2)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate(size int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + use(unsafe.Pointer(_p0)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + use(unsafe.Pointer(_p0)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setns(fd int, nstype int) (err error) { + _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + Syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { + r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) + n = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(oldfd int, newfd int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0) + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit() (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, n int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) + written = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsgid(gid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsuid(uid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { + r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pause() (err error) { + _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall6(SYS_FTRUNCATE64, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getrlimit(resource int, rlim *rlimit32) (err error) { + _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setrlimit(resource int, rlim *rlimit32) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { + r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go new file mode 100644 index 000000000..c7286db48 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go @@ -0,0 +1,1734 @@ +// mksyscall.pl syscall_linux.go syscall_linux_arm64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm64,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + use(unsafe.Pointer(_p2)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate(size int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + use(unsafe.Pointer(_p0)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + use(unsafe.Pointer(_p0)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setns(fd int, nstype int) (err error) { + _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + Syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, buf *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, n int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (off int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + off = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) + written = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsgid(gid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsuid(uid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, buf *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { + _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go new file mode 100644 index 000000000..b709ed2f5 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go @@ -0,0 +1,1803 @@ +// mksyscall.pl syscall_linux.go syscall_linux_mips64x.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build mips64,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + use(unsafe.Pointer(_p2)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate(size int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + use(unsafe.Pointer(_p0)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + use(unsafe.Pointer(_p0)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setns(fd int, nstype int) (err error) { + _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + Syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, buf *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, n int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pause() (err error) { + _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (off int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + off = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) + written = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsgid(gid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsuid(uid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, buf *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { + _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Utime(path string, buf *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fstat(fd int, st *stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func lstat(path string, st *stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func stat(path string, st *stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { + r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go new file mode 100644 index 000000000..5cb1c5671 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go @@ -0,0 +1,1803 @@ +// mksyscall.pl syscall_linux.go syscall_linux_mips64x.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build mips64le,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + use(unsafe.Pointer(_p2)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate(size int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + use(unsafe.Pointer(_p0)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + use(unsafe.Pointer(_p0)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setns(fd int, nstype int) (err error) { + _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + Syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, buf *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, n int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pause() (err error) { + _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (off int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + off = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) + written = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsgid(gid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsuid(uid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, buf *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { + _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Utime(path string, buf *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fstat(fd int, st *stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(st)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func lstat(path string, st *stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func stat(path string, st *stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(st)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { + r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go new file mode 100644 index 000000000..873bb18f7 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go @@ -0,0 +1,1865 @@ +// mksyscall.pl syscall_linux.go syscall_linux_ppc64x.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build ppc64,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + use(unsafe.Pointer(_p2)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate(size int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + use(unsafe.Pointer(_p0)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + use(unsafe.Pointer(_p0)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setns(fd int, nstype int) (err error) { + _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + Syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(oldfd int, newfd int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, buf *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit() (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ioperm(from int, num int, on int) (err error) { + _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Iopl(level int) (err error) { + _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, n int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pause() (err error) { + _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (off int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + off = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) + written = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsgid(gid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsuid(uid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, buf *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { + _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Time(t *Time_t) (tt Time_t, err error) { + r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) + tt = Time_t(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Utime(path string, buf *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]_C_int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { + r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go new file mode 100644 index 000000000..bf08835c5 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go @@ -0,0 +1,1865 @@ +// mksyscall.pl syscall_linux.go syscall_linux_ppc64x.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build ppc64le,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + use(unsafe.Pointer(_p2)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate(size int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + use(unsafe.Pointer(_p0)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + use(unsafe.Pointer(_p0)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setns(fd int, nstype int) (err error) { + _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + Syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(oldfd int, newfd int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, buf *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit() (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ioperm(from int, num int, on int) (err error) { + _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Iopl(level int) (err error) { + _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, n int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pause() (err error) { + _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (off int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + off = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) + written = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsgid(gid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsuid(uid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, buf *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { + _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { + r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { + r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) + xaddr = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Time(t *Time_t) (tt Time_t, err error) { + r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) + tt = Time_t(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Utime(path string, buf *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]_C_int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { + r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go new file mode 100644 index 000000000..dbaa53b98 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go @@ -0,0 +1,1645 @@ +// mksyscall.pl syscall_linux.go syscall_linux_s390x.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build s390x,linux + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { + r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getcwd(buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(arg) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(source) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(target) + if err != nil { + return + } + var _p2 *byte + _p2, err = BytePtrFromString(fstype) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + use(unsafe.Pointer(_p2)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Acct(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtimex(buf *Timex) (state int, err error) { + r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) + state = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func ClockGettime(clockid int32, time *Timespec) (err error) { + _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(oldfd int) (fd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup3(oldfd int, newfd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate(size int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCreate1(flag int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { + _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { + _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fdatasync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettid() (tid int) { + r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) + tid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getxattr(path string, attr string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(dest) > 0 { + _p2 = unsafe.Pointer(&dest[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(pathname) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) + use(unsafe.Pointer(_p0)) + watchdesc = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit1(flags int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) + success = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Klogctl(typ int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listxattr(path string, dest []byte) (sz int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(dest) > 0 { + _p1 = unsafe.Pointer(&dest[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) + use(unsafe.Pointer(_p0)) + sz = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func PivotRoot(newroot string, putold string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(newroot) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(putold) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) { + _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { + _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Removexattr(path string, attr string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setdomainname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sethostname(p []byte) (err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setns(fd int, nstype int) (err error) { + _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setxattr(path string, attr string, data []byte, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(attr) + if err != nil { + return + } + var _p2 unsafe.Pointer + if len(data) > 0 { + _p2 = unsafe.Pointer(&data[0]) + } else { + _p2 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() { + Syscall(SYS_SYNC, 0, 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sysinfo(info *Sysinfo_t) (err error) { + _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { + _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(mask int) (oldmask int) { + r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Uname(buf *Utsname) (err error) { + _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unshare(flags int) (err error) { + _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func exitThread(code int) (err error) { + _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, p *byte, np int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Madvise(b []byte, advice int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(oldfd int, newfd int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { + var _p0 unsafe.Pointer + if len(events) > 0 { + _p0 = unsafe.Pointer(&events[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fadvise(fd int, offset int64, length int64, advice int) (err error) { + _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, buf *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (euid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + euid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func InotifyInit() (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pause() (err error) { + _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (off int64, err error) { + r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) + off = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { + r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { + r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) + written = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsgid(gid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setfsuid(uid int) (err error) { + _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(resource int, rlim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { + r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) + n = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, buf *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { + _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(n int, list *_Gid_t) (nn int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + nn = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(n int, list *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Utime(path string, buf *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe2(p *[2]_C_int, flags int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { + r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go new file mode 100644 index 000000000..b16e1d0ee --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go @@ -0,0 +1,1327 @@ +// mksyscall.pl -l32 -netbsd syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,netbsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + use(_p0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (fd1 int, fd2 int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + fd1 = int(r0) + fd2 = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0) + newoffset = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go new file mode 100644 index 000000000..b63667da9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go @@ -0,0 +1,1327 @@ +// mksyscall.pl -netbsd syscall_bsd.go syscall_netbsd.go syscall_netbsd_amd64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,netbsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + use(_p0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (fd1 int, fd2 int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + fd1 = int(r0) + fd2 = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0) + newoffset = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go new file mode 100644 index 000000000..b0d19038d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go @@ -0,0 +1,1327 @@ +// mksyscall.pl -l32 -arm syscall_bsd.go syscall_netbsd.go syscall_netbsd_arm.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build arm,netbsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + use(_p0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe() (fd1 int, fd2 int, err error) { + r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) + fd1 = int(r0) + fd2 = int(r1) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0) + newoffset = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go new file mode 100644 index 000000000..f91a5b856 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -0,0 +1,1387 @@ +// mksyscall.pl -l32 -openbsd syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build 386,openbsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + use(_p0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]_C_int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0) + newoffset = int64(int64(r1)<<32 | int64(r0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go new file mode 100644 index 000000000..2e8d59d72 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -0,0 +1,1387 @@ +// mksyscall.pl -openbsd syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,openbsd + +package unix + +import ( + "syscall" + "unsafe" +) + +var _ syscall.Errno + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { + r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) + wpid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Shutdown(s int, how int) (err error) { + _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { + r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { + var _p0 unsafe.Pointer + if len(mib) > 0 { + _p0 = unsafe.Pointer(&mib[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) + use(_p0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func utimes(path string, timeval *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func futimes(fd int, timeval *[2]Timeval) (err error) { + _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pipe(p *[2]_C_int) (err error) { + _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func getdents(fd int, buf []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(buf) > 0 { + _p0 = unsafe.Pointer(&buf[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chflags(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Close(fd int) (err error) { + _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) + nfd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Dup2(from int, to int) (err error) { + _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Exit(code int) { + Syscall(SYS_EXIT, uintptr(code), 0, 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchdir(fd int) (err error) { + _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchflags(fd int, flags int) (err error) { + _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Flock(fd int, how int) (err error) { + _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fstatfs(fd int, stat *Statfs_t) (err error) { + _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Fsync(fd int) (err error) { + _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getegid() (egid int) { + r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) + egid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Geteuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getgid() (gid int) { + r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) + gid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) + pgid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpgrp() (pgrp int) { + r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) + pgrp = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpid() (pid int) { + r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) + pid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getppid() (ppid int) { + r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) + ppid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getpriority(which int, who int) (prio int, err error) { + r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) + prio = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getsid(pid int) (sid int, err error) { + r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) + sid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Getuid() (uid int) { + r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) + uid = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Issetugid() (tainted bool) { + r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) + tainted = bool(r0 != 0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Kqueue() (fd int, err error) { + r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Listen(s int, backlog int) (err error) { + _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mlockall(flags int) (err error) { + _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mprotect(b []byte, prot int) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlock(b []byte) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Munlockall() (err error) { + _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func read(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 unsafe.Pointer + if len(buf) > 0 { + _p1 = unsafe.Pointer(&buf[0]) + } else { + _p1 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Revoke(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0) + newoffset = int64(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { + _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setegid(egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Seteuid(euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setgid(gid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setlogin(name string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(name) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresgid(rgid int, egid int, sgid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setresuid(ruid int, euid int, suid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setsid() (pid int, err error) { + r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Settimeofday(tp *Timeval) (err error) { + _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Setuid(uid int) (err error) { + _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Statfs(path string, stat *Statfs_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Sync() (err error) { + _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length)) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Umask(newmask int) (oldmask int) { + r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) + oldmask = int(r0) + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Unmount(path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func write(fd int, p []byte) (n int, err error) { + var _p0 unsafe.Pointer + if len(p) > 0 { + _p0 = unsafe.Pointer(&p[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0) + ret = uintptr(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func readlen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func writelen(fd int, buf *byte, nbuf int) (n int, err error) { + r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) + n = int(r0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go new file mode 100644 index 000000000..432642781 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go @@ -0,0 +1,1559 @@ +// mksyscall_solaris.pl syscall_solaris.go syscall_solaris_amd64.go +// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT + +// +build amd64,solaris + +package unix + +import ( + "syscall" + "unsafe" +) + +//go:cgo_import_dynamic libc_getsockname getsockname "libsocket.so" +//go:cgo_import_dynamic libc_getcwd getcwd "libc.so" +//go:cgo_import_dynamic libc_getgroups getgroups "libc.so" +//go:cgo_import_dynamic libc_setgroups setgroups "libc.so" +//go:cgo_import_dynamic libc_utimes utimes "libc.so" +//go:cgo_import_dynamic libc_utimensat utimensat "libc.so" +//go:cgo_import_dynamic libc_fcntl fcntl "libc.so" +//go:cgo_import_dynamic libc_futimesat futimesat "libc.so" +//go:cgo_import_dynamic libc_accept accept "libsocket.so" +//go:cgo_import_dynamic libc_recvmsg recvmsg "libsocket.so" +//go:cgo_import_dynamic libc_sendmsg sendmsg "libsocket.so" +//go:cgo_import_dynamic libc_acct acct "libc.so" +//go:cgo_import_dynamic libc_ioctl ioctl "libc.so" +//go:cgo_import_dynamic libc_access access "libc.so" +//go:cgo_import_dynamic libc_adjtime adjtime "libc.so" +//go:cgo_import_dynamic libc_chdir chdir "libc.so" +//go:cgo_import_dynamic libc_chmod chmod "libc.so" +//go:cgo_import_dynamic libc_chown chown "libc.so" +//go:cgo_import_dynamic libc_chroot chroot "libc.so" +//go:cgo_import_dynamic libc_close close "libc.so" +//go:cgo_import_dynamic libc_creat creat "libc.so" +//go:cgo_import_dynamic libc_dup dup "libc.so" +//go:cgo_import_dynamic libc_dup2 dup2 "libc.so" +//go:cgo_import_dynamic libc_exit exit "libc.so" +//go:cgo_import_dynamic libc_fchdir fchdir "libc.so" +//go:cgo_import_dynamic libc_fchmod fchmod "libc.so" +//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so" +//go:cgo_import_dynamic libc_fchown fchown "libc.so" +//go:cgo_import_dynamic libc_fchownat fchownat "libc.so" +//go:cgo_import_dynamic libc_fdatasync fdatasync "libc.so" +//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so" +//go:cgo_import_dynamic libc_fstat fstat "libc.so" +//go:cgo_import_dynamic libc_getdents getdents "libc.so" +//go:cgo_import_dynamic libc_getgid getgid "libc.so" +//go:cgo_import_dynamic libc_getpid getpid "libc.so" +//go:cgo_import_dynamic libc_getpgid getpgid "libc.so" +//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so" +//go:cgo_import_dynamic libc_geteuid geteuid "libc.so" +//go:cgo_import_dynamic libc_getegid getegid "libc.so" +//go:cgo_import_dynamic libc_getppid getppid "libc.so" +//go:cgo_import_dynamic libc_getpriority getpriority "libc.so" +//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so" +//go:cgo_import_dynamic libc_getrusage getrusage "libc.so" +//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so" +//go:cgo_import_dynamic libc_getuid getuid "libc.so" +//go:cgo_import_dynamic libc_kill kill "libc.so" +//go:cgo_import_dynamic libc_lchown lchown "libc.so" +//go:cgo_import_dynamic libc_link link "libc.so" +//go:cgo_import_dynamic libc_listen listen "libsocket.so" +//go:cgo_import_dynamic libc_lstat lstat "libc.so" +//go:cgo_import_dynamic libc_madvise madvise "libc.so" +//go:cgo_import_dynamic libc_mkdir mkdir "libc.so" +//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so" +//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so" +//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so" +//go:cgo_import_dynamic libc_mknod mknod "libc.so" +//go:cgo_import_dynamic libc_mknodat mknodat "libc.so" +//go:cgo_import_dynamic libc_mlock mlock "libc.so" +//go:cgo_import_dynamic libc_mlockall mlockall "libc.so" +//go:cgo_import_dynamic libc_mprotect mprotect "libc.so" +//go:cgo_import_dynamic libc_munlock munlock "libc.so" +//go:cgo_import_dynamic libc_munlockall munlockall "libc.so" +//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so" +//go:cgo_import_dynamic libc_open open "libc.so" +//go:cgo_import_dynamic libc_openat openat "libc.so" +//go:cgo_import_dynamic libc_pathconf pathconf "libc.so" +//go:cgo_import_dynamic libc_pause pause "libc.so" +//go:cgo_import_dynamic libc_pread pread "libc.so" +//go:cgo_import_dynamic libc_pwrite pwrite "libc.so" +//go:cgo_import_dynamic libc_read read "libc.so" +//go:cgo_import_dynamic libc_readlink readlink "libc.so" +//go:cgo_import_dynamic libc_rename rename "libc.so" +//go:cgo_import_dynamic libc_renameat renameat "libc.so" +//go:cgo_import_dynamic libc_rmdir rmdir "libc.so" +//go:cgo_import_dynamic libc_lseek lseek "libc.so" +//go:cgo_import_dynamic libc_setegid setegid "libc.so" +//go:cgo_import_dynamic libc_seteuid seteuid "libc.so" +//go:cgo_import_dynamic libc_setgid setgid "libc.so" +//go:cgo_import_dynamic libc_sethostname sethostname "libc.so" +//go:cgo_import_dynamic libc_setpgid setpgid "libc.so" +//go:cgo_import_dynamic libc_setpriority setpriority "libc.so" +//go:cgo_import_dynamic libc_setregid setregid "libc.so" +//go:cgo_import_dynamic libc_setreuid setreuid "libc.so" +//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so" +//go:cgo_import_dynamic libc_setsid setsid "libc.so" +//go:cgo_import_dynamic libc_setuid setuid "libc.so" +//go:cgo_import_dynamic libc_shutdown shutdown "libsocket.so" +//go:cgo_import_dynamic libc_stat stat "libc.so" +//go:cgo_import_dynamic libc_symlink symlink "libc.so" +//go:cgo_import_dynamic libc_sync sync "libc.so" +//go:cgo_import_dynamic libc_times times "libc.so" +//go:cgo_import_dynamic libc_truncate truncate "libc.so" +//go:cgo_import_dynamic libc_fsync fsync "libc.so" +//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so" +//go:cgo_import_dynamic libc_umask umask "libc.so" +//go:cgo_import_dynamic libc_uname uname "libc.so" +//go:cgo_import_dynamic libc_umount umount "libc.so" +//go:cgo_import_dynamic libc_unlink unlink "libc.so" +//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so" +//go:cgo_import_dynamic libc_ustat ustat "libc.so" +//go:cgo_import_dynamic libc_utime utime "libc.so" +//go:cgo_import_dynamic libc_bind bind "libsocket.so" +//go:cgo_import_dynamic libc_connect connect "libsocket.so" +//go:cgo_import_dynamic libc_mmap mmap "libc.so" +//go:cgo_import_dynamic libc_munmap munmap "libc.so" +//go:cgo_import_dynamic libc_sendto sendto "libsocket.so" +//go:cgo_import_dynamic libc_socket socket "libsocket.so" +//go:cgo_import_dynamic libc_socketpair socketpair "libsocket.so" +//go:cgo_import_dynamic libc_write write "libc.so" +//go:cgo_import_dynamic libc_getsockopt getsockopt "libsocket.so" +//go:cgo_import_dynamic libc_getpeername getpeername "libsocket.so" +//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so" +//go:cgo_import_dynamic libc_recvfrom recvfrom "libsocket.so" +//go:cgo_import_dynamic libc_sysconf sysconf "libc.so" + +//go:linkname procgetsockname libc_getsockname +//go:linkname procGetcwd libc_getcwd +//go:linkname procgetgroups libc_getgroups +//go:linkname procsetgroups libc_setgroups +//go:linkname procutimes libc_utimes +//go:linkname procutimensat libc_utimensat +//go:linkname procfcntl libc_fcntl +//go:linkname procfutimesat libc_futimesat +//go:linkname procaccept libc_accept +//go:linkname procrecvmsg libc_recvmsg +//go:linkname procsendmsg libc_sendmsg +//go:linkname procacct libc_acct +//go:linkname procioctl libc_ioctl +//go:linkname procAccess libc_access +//go:linkname procAdjtime libc_adjtime +//go:linkname procChdir libc_chdir +//go:linkname procChmod libc_chmod +//go:linkname procChown libc_chown +//go:linkname procChroot libc_chroot +//go:linkname procClose libc_close +//go:linkname procCreat libc_creat +//go:linkname procDup libc_dup +//go:linkname procDup2 libc_dup2 +//go:linkname procExit libc_exit +//go:linkname procFchdir libc_fchdir +//go:linkname procFchmod libc_fchmod +//go:linkname procFchmodat libc_fchmodat +//go:linkname procFchown libc_fchown +//go:linkname procFchownat libc_fchownat +//go:linkname procFdatasync libc_fdatasync +//go:linkname procFpathconf libc_fpathconf +//go:linkname procFstat libc_fstat +//go:linkname procGetdents libc_getdents +//go:linkname procGetgid libc_getgid +//go:linkname procGetpid libc_getpid +//go:linkname procGetpgid libc_getpgid +//go:linkname procGetpgrp libc_getpgrp +//go:linkname procGeteuid libc_geteuid +//go:linkname procGetegid libc_getegid +//go:linkname procGetppid libc_getppid +//go:linkname procGetpriority libc_getpriority +//go:linkname procGetrlimit libc_getrlimit +//go:linkname procGetrusage libc_getrusage +//go:linkname procGettimeofday libc_gettimeofday +//go:linkname procGetuid libc_getuid +//go:linkname procKill libc_kill +//go:linkname procLchown libc_lchown +//go:linkname procLink libc_link +//go:linkname proclisten libc_listen +//go:linkname procLstat libc_lstat +//go:linkname procMadvise libc_madvise +//go:linkname procMkdir libc_mkdir +//go:linkname procMkdirat libc_mkdirat +//go:linkname procMkfifo libc_mkfifo +//go:linkname procMkfifoat libc_mkfifoat +//go:linkname procMknod libc_mknod +//go:linkname procMknodat libc_mknodat +//go:linkname procMlock libc_mlock +//go:linkname procMlockall libc_mlockall +//go:linkname procMprotect libc_mprotect +//go:linkname procMunlock libc_munlock +//go:linkname procMunlockall libc_munlockall +//go:linkname procNanosleep libc_nanosleep +//go:linkname procOpen libc_open +//go:linkname procOpenat libc_openat +//go:linkname procPathconf libc_pathconf +//go:linkname procPause libc_pause +//go:linkname procPread libc_pread +//go:linkname procPwrite libc_pwrite +//go:linkname procread libc_read +//go:linkname procReadlink libc_readlink +//go:linkname procRename libc_rename +//go:linkname procRenameat libc_renameat +//go:linkname procRmdir libc_rmdir +//go:linkname proclseek libc_lseek +//go:linkname procSetegid libc_setegid +//go:linkname procSeteuid libc_seteuid +//go:linkname procSetgid libc_setgid +//go:linkname procSethostname libc_sethostname +//go:linkname procSetpgid libc_setpgid +//go:linkname procSetpriority libc_setpriority +//go:linkname procSetregid libc_setregid +//go:linkname procSetreuid libc_setreuid +//go:linkname procSetrlimit libc_setrlimit +//go:linkname procSetsid libc_setsid +//go:linkname procSetuid libc_setuid +//go:linkname procshutdown libc_shutdown +//go:linkname procStat libc_stat +//go:linkname procSymlink libc_symlink +//go:linkname procSync libc_sync +//go:linkname procTimes libc_times +//go:linkname procTruncate libc_truncate +//go:linkname procFsync libc_fsync +//go:linkname procFtruncate libc_ftruncate +//go:linkname procUmask libc_umask +//go:linkname procUname libc_uname +//go:linkname procumount libc_umount +//go:linkname procUnlink libc_unlink +//go:linkname procUnlinkat libc_unlinkat +//go:linkname procUstat libc_ustat +//go:linkname procUtime libc_utime +//go:linkname procbind libc_bind +//go:linkname procconnect libc_connect +//go:linkname procmmap libc_mmap +//go:linkname procmunmap libc_munmap +//go:linkname procsendto libc_sendto +//go:linkname procsocket libc_socket +//go:linkname procsocketpair libc_socketpair +//go:linkname procwrite libc_write +//go:linkname procgetsockopt libc_getsockopt +//go:linkname procgetpeername libc_getpeername +//go:linkname procsetsockopt libc_setsockopt +//go:linkname procrecvfrom libc_recvfrom +//go:linkname procsysconf libc_sysconf + +var ( + procgetsockname, + procGetcwd, + procgetgroups, + procsetgroups, + procutimes, + procutimensat, + procfcntl, + procfutimesat, + procaccept, + procrecvmsg, + procsendmsg, + procacct, + procioctl, + procAccess, + procAdjtime, + procChdir, + procChmod, + procChown, + procChroot, + procClose, + procCreat, + procDup, + procDup2, + procExit, + procFchdir, + procFchmod, + procFchmodat, + procFchown, + procFchownat, + procFdatasync, + procFpathconf, + procFstat, + procGetdents, + procGetgid, + procGetpid, + procGetpgid, + procGetpgrp, + procGeteuid, + procGetegid, + procGetppid, + procGetpriority, + procGetrlimit, + procGetrusage, + procGettimeofday, + procGetuid, + procKill, + procLchown, + procLink, + proclisten, + procLstat, + procMadvise, + procMkdir, + procMkdirat, + procMkfifo, + procMkfifoat, + procMknod, + procMknodat, + procMlock, + procMlockall, + procMprotect, + procMunlock, + procMunlockall, + procNanosleep, + procOpen, + procOpenat, + procPathconf, + procPause, + procPread, + procPwrite, + procread, + procReadlink, + procRename, + procRenameat, + procRmdir, + proclseek, + procSetegid, + procSeteuid, + procSetgid, + procSethostname, + procSetpgid, + procSetpriority, + procSetregid, + procSetreuid, + procSetrlimit, + procSetsid, + procSetuid, + procshutdown, + procStat, + procSymlink, + procSync, + procTimes, + procTruncate, + procFsync, + procFtruncate, + procUmask, + procUname, + procumount, + procUnlink, + procUnlinkat, + procUstat, + procUtime, + procbind, + procconnect, + procmmap, + procmunmap, + procsendto, + procsocket, + procsocketpair, + procwrite, + procgetsockopt, + procgetpeername, + procsetsockopt, + procrecvfrom, + procsysconf syscallFunc +) + +func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockname)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Getcwd(buf []byte) (n int, err error) { + var _p0 *byte + if len(buf) > 0 { + _p0 = &buf[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetcwd)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0, 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func getgroups(ngid int, gid *_Gid_t) (n int, err error) { + r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func setgroups(ngid int, gid *_Gid_t) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procsetgroups)), 2, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func utimes(path string, times *[2]Timeval) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimes)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func utimensat(fd int, path string, times *[2]Timespec, flag int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procutimensat)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func fcntl(fd int, cmd int, arg int) (val int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(arg), 0, 0, 0) + val = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func futimesat(fildes int, path *byte, times *[2]Timeval) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfutimesat)), 3, uintptr(fildes), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procaccept)), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procrecvmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsendmsg)), 3, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func acct(path *byte) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procacct)), 1, uintptr(unsafe.Pointer(path)), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func ioctl(fd int, req int, arg uintptr) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procioctl)), 3, uintptr(fd), uintptr(req), uintptr(arg), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Access(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAccess)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procAdjtime)), 2, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Chdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Chmod(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChmod)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Chown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Chroot(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procChroot)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Close(fd int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procClose)), 1, uintptr(fd), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Creat(path string, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procCreat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Dup(fd int) (nfd int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup)), 1, uintptr(fd), 0, 0, 0, 0, 0) + nfd = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Dup2(oldfd int, newfd int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procDup2)), 2, uintptr(oldfd), uintptr(newfd), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Exit(code int) { + sysvicall6(uintptr(unsafe.Pointer(&procExit)), 1, uintptr(code), 0, 0, 0, 0, 0) + return +} + +func Fchdir(fd int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchdir)), 1, uintptr(fd), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Fchmod(fd int, mode uint32) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmod)), 2, uintptr(fd), uintptr(mode), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchmodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Fchown(fd int, uid int, gid int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchown)), 3, uintptr(fd), uintptr(uid), uintptr(gid), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFchownat)), 5, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Fdatasync(fd int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFdatasync)), 1, uintptr(fd), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Fpathconf(fd int, name int) (val int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFpathconf)), 2, uintptr(fd), uintptr(name), 0, 0, 0, 0) + val = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Fstat(fd int, stat *Stat_t) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFstat)), 2, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Getdents(fd int, buf []byte, basep *uintptr) (n int, err error) { + var _p0 *byte + if len(buf) > 0 { + _p0 = &buf[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetdents)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Getgid() (gid int) { + r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetgid)), 0, 0, 0, 0, 0, 0, 0) + gid = int(r0) + return +} + +func Getpid() (pid int) { + r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpid)), 0, 0, 0, 0, 0, 0, 0) + pid = int(r0) + return +} + +func Getpgid(pid int) (pgid int, err error) { + r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgid)), 1, uintptr(pid), 0, 0, 0, 0, 0) + pgid = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Getpgrp() (pgid int, err error) { + r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetpgrp)), 0, 0, 0, 0, 0, 0, 0) + pgid = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Geteuid() (euid int) { + r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGeteuid)), 0, 0, 0, 0, 0, 0, 0) + euid = int(r0) + return +} + +func Getegid() (egid int) { + r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetegid)), 0, 0, 0, 0, 0, 0, 0) + egid = int(r0) + return +} + +func Getppid() (ppid int) { + r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procGetppid)), 0, 0, 0, 0, 0, 0, 0) + ppid = int(r0) + return +} + +func Getpriority(which int, who int) (n int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procGetpriority)), 2, uintptr(which), uintptr(who), 0, 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Getrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Getrusage(who int, rusage *Rusage) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGetrusage)), 2, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Gettimeofday(tv *Timeval) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procGettimeofday)), 1, uintptr(unsafe.Pointer(tv)), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Getuid() (uid int) { + r0, _, _ := rawSysvicall6(uintptr(unsafe.Pointer(&procGetuid)), 0, 0, 0, 0, 0, 0, 0) + uid = int(r0) + return +} + +func Kill(pid int, signum syscall.Signal) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procKill)), 2, uintptr(pid), uintptr(signum), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Lchown(path string, uid int, gid int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLchown)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Link(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = e1 + } + return +} + +func Listen(s int, backlog int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proclisten)), 2, uintptr(s), uintptr(backlog), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Lstat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procLstat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Madvise(b []byte, advice int) (err error) { + var _p0 *byte + if len(b) > 0 { + _p0 = &b[0] + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMadvise)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(advice), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Mkdir(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdir)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Mkdirat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkdirat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Mkfifo(path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifo)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Mkfifoat(dirfd int, path string, mode uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMkfifoat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Mknod(path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknod)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMknodat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Mlock(b []byte) (err error) { + var _p0 *byte + if len(b) > 0 { + _p0 = &b[0] + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Mlockall(flags int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMlockall)), 1, uintptr(flags), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Mprotect(b []byte, prot int) (err error) { + var _p0 *byte + if len(b) > 0 { + _p0 = &b[0] + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMprotect)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(prot), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Munlock(b []byte) (err error) { + var _p0 *byte + if len(b) > 0 { + _p0 = &b[0] + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlock)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Munlockall() (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procMunlockall)), 0, 0, 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Nanosleep(time *Timespec, leftover *Timespec) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procNanosleep)), 2, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Open(path string, mode int, perm uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpen)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procOpenat)), 4, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) + use(unsafe.Pointer(_p0)) + fd = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Pathconf(path string, name int) (val int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPathconf)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + val = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Pause() (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPause)), 0, 0, 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Pread(fd int, p []byte, offset int64) (n int, err error) { + var _p0 *byte + if len(p) > 0 { + _p0 = &p[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Pwrite(fd int, p []byte, offset int64) (n int, err error) { + var _p0 *byte + if len(p) > 0 { + _p0 = &p[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func read(fd int, p []byte) (n int, err error) { + var _p0 *byte + if len(p) > 0 { + _p0 = &p[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Readlink(path string, buf []byte) (n int, err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + if len(buf) > 0 { + _p1 = &buf[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procReadlink)), 3, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(len(buf)), 0, 0, 0) + use(unsafe.Pointer(_p0)) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Rename(from string, to string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRename)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = e1 + } + return +} + +func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(oldpath) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(newpath) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRenameat)), 4, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = e1 + } + return +} + +func Rmdir(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procRmdir)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&proclseek)), 3, uintptr(fd), uintptr(offset), uintptr(whence), 0, 0, 0) + newoffset = int64(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Setegid(egid int) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetegid)), 1, uintptr(egid), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Seteuid(euid int) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSeteuid)), 1, uintptr(euid), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Setgid(gid int) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetgid)), 1, uintptr(gid), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Sethostname(p []byte) (err error) { + var _p0 *byte + if len(p) > 0 { + _p0 = &p[0] + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSethostname)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Setpgid(pid int, pgid int) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetpgid)), 2, uintptr(pid), uintptr(pgid), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Setpriority(which int, who int, prio int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSetpriority)), 3, uintptr(which), uintptr(who), uintptr(prio), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Setregid(rgid int, egid int) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetregid)), 2, uintptr(rgid), uintptr(egid), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Setreuid(ruid int, euid int) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetreuid)), 2, uintptr(ruid), uintptr(euid), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Setrlimit(which int, lim *Rlimit) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetrlimit)), 2, uintptr(which), uintptr(unsafe.Pointer(lim)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Setsid() (pid int, err error) { + r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetsid)), 0, 0, 0, 0, 0, 0, 0) + pid = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Setuid(uid int) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procSetuid)), 1, uintptr(uid), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Shutdown(s int, how int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procshutdown)), 2, uintptr(s), uintptr(how), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Stat(path string, stat *Stat_t) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procStat)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Symlink(path string, link string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(link) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSymlink)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + use(unsafe.Pointer(_p1)) + if e1 != 0 { + err = e1 + } + return +} + +func Sync() (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procSync)), 0, 0, 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Times(tms *Tms) (ticks uintptr, err error) { + r0, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procTimes)), 1, uintptr(unsafe.Pointer(tms)), 0, 0, 0, 0, 0) + ticks = uintptr(r0) + if e1 != 0 { + err = e1 + } + return +} + +func Truncate(path string, length int64) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procTruncate)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Fsync(fd int) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFsync)), 1, uintptr(fd), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Ftruncate(fd int, length int64) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procFtruncate)), 2, uintptr(fd), uintptr(length), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Umask(mask int) (oldmask int) { + r0, _, _ := sysvicall6(uintptr(unsafe.Pointer(&procUmask)), 1, uintptr(mask), 0, 0, 0, 0, 0) + oldmask = int(r0) + return +} + +func Uname(buf *Utsname) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procUname)), 1, uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Unmount(target string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(target) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procumount)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Unlink(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlink)), 1, uintptr(unsafe.Pointer(_p0)), 0, 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Unlinkat(dirfd int, path string, flags int) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUnlinkat)), 3, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func Ustat(dev int, ubuf *Ustat_t) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUstat)), 2, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func Utime(path string, buf *Utimbuf) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procUtime)), 2, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0, 0, 0, 0) + use(unsafe.Pointer(_p0)) + if e1 != 0 { + err = e1 + } + return +} + +func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procbind)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procconnect)), 3, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmmap)), 6, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) + ret = uintptr(r0) + if e1 != 0 { + err = e1 + } + return +} + +func munmap(addr uintptr, length uintptr) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procmunmap)), 2, uintptr(addr), uintptr(length), 0, 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { + var _p0 *byte + if len(buf) > 0 { + _p0 = &buf[0] + } + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsendto)), 6, uintptr(s), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) + if e1 != 0 { + err = e1 + } + return +} + +func socket(domain int, typ int, proto int) (fd int, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsocket)), 3, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0) + fd = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procsocketpair)), 4, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func write(fd int, p []byte) (n int, err error) { + var _p0 *byte + if len(p) > 0 { + _p0 = &p[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0, 0, 0) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) + if e1 != 0 { + err = e1 + } + return +} + +func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { + _, _, e1 := rawSysvicall6(uintptr(unsafe.Pointer(&procgetpeername)), 3, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0) + if e1 != 0 { + err = e1 + } + return +} + +func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { + _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsetsockopt)), 5, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) + if e1 != 0 { + err = e1 + } + return +} + +func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { + var _p0 *byte + if len(p) > 0 { + _p0 = &p[0] + } + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procrecvfrom)), 6, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) + n = int(r0) + if e1 != 0 { + err = e1 + } + return +} + +func sysconf(name int) (n int64, err error) { + r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procsysconf)), 1, uintptr(name), 0, 0, 0, 0, 0) + n = int64(r0) + if e1 != 0 { + err = e1 + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsysctl_openbsd.go b/vendor/golang.org/x/sys/unix/zsysctl_openbsd.go new file mode 100644 index 000000000..83bb935b9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysctl_openbsd.go @@ -0,0 +1,270 @@ +// mksysctl_openbsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +package unix + +type mibentry struct { + ctlname string + ctloid []_C_int +} + +var sysctlMib = []mibentry{ + {"ddb.console", []_C_int{9, 6}}, + {"ddb.log", []_C_int{9, 7}}, + {"ddb.max_line", []_C_int{9, 3}}, + {"ddb.max_width", []_C_int{9, 2}}, + {"ddb.panic", []_C_int{9, 5}}, + {"ddb.radix", []_C_int{9, 1}}, + {"ddb.tab_stop_width", []_C_int{9, 4}}, + {"ddb.trigger", []_C_int{9, 8}}, + {"fs.posix.setuid", []_C_int{3, 1, 1}}, + {"hw.allowpowerdown", []_C_int{6, 22}}, + {"hw.byteorder", []_C_int{6, 4}}, + {"hw.cpuspeed", []_C_int{6, 12}}, + {"hw.diskcount", []_C_int{6, 10}}, + {"hw.disknames", []_C_int{6, 8}}, + {"hw.diskstats", []_C_int{6, 9}}, + {"hw.machine", []_C_int{6, 1}}, + {"hw.model", []_C_int{6, 2}}, + {"hw.ncpu", []_C_int{6, 3}}, + {"hw.ncpufound", []_C_int{6, 21}}, + {"hw.pagesize", []_C_int{6, 7}}, + {"hw.physmem", []_C_int{6, 19}}, + {"hw.product", []_C_int{6, 15}}, + {"hw.serialno", []_C_int{6, 17}}, + {"hw.setperf", []_C_int{6, 13}}, + {"hw.usermem", []_C_int{6, 20}}, + {"hw.uuid", []_C_int{6, 18}}, + {"hw.vendor", []_C_int{6, 14}}, + {"hw.version", []_C_int{6, 16}}, + {"kern.arandom", []_C_int{1, 37}}, + {"kern.argmax", []_C_int{1, 8}}, + {"kern.boottime", []_C_int{1, 21}}, + {"kern.bufcachepercent", []_C_int{1, 72}}, + {"kern.ccpu", []_C_int{1, 45}}, + {"kern.clockrate", []_C_int{1, 12}}, + {"kern.consdev", []_C_int{1, 75}}, + {"kern.cp_time", []_C_int{1, 40}}, + {"kern.cp_time2", []_C_int{1, 71}}, + {"kern.cryptodevallowsoft", []_C_int{1, 53}}, + {"kern.domainname", []_C_int{1, 22}}, + {"kern.file", []_C_int{1, 73}}, + {"kern.forkstat", []_C_int{1, 42}}, + {"kern.fscale", []_C_int{1, 46}}, + {"kern.fsync", []_C_int{1, 33}}, + {"kern.hostid", []_C_int{1, 11}}, + {"kern.hostname", []_C_int{1, 10}}, + {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}}, + {"kern.job_control", []_C_int{1, 19}}, + {"kern.malloc.buckets", []_C_int{1, 39, 1}}, + {"kern.malloc.kmemnames", []_C_int{1, 39, 3}}, + {"kern.maxclusters", []_C_int{1, 67}}, + {"kern.maxfiles", []_C_int{1, 7}}, + {"kern.maxlocksperuid", []_C_int{1, 70}}, + {"kern.maxpartitions", []_C_int{1, 23}}, + {"kern.maxproc", []_C_int{1, 6}}, + {"kern.maxthread", []_C_int{1, 25}}, + {"kern.maxvnodes", []_C_int{1, 5}}, + {"kern.mbstat", []_C_int{1, 59}}, + {"kern.msgbuf", []_C_int{1, 48}}, + {"kern.msgbufsize", []_C_int{1, 38}}, + {"kern.nchstats", []_C_int{1, 41}}, + {"kern.netlivelocks", []_C_int{1, 76}}, + {"kern.nfiles", []_C_int{1, 56}}, + {"kern.ngroups", []_C_int{1, 18}}, + {"kern.nosuidcoredump", []_C_int{1, 32}}, + {"kern.nprocs", []_C_int{1, 47}}, + {"kern.nselcoll", []_C_int{1, 43}}, + {"kern.nthreads", []_C_int{1, 26}}, + {"kern.numvnodes", []_C_int{1, 58}}, + {"kern.osrelease", []_C_int{1, 2}}, + {"kern.osrevision", []_C_int{1, 3}}, + {"kern.ostype", []_C_int{1, 1}}, + {"kern.osversion", []_C_int{1, 27}}, + {"kern.pool_debug", []_C_int{1, 77}}, + {"kern.posix1version", []_C_int{1, 17}}, + {"kern.proc", []_C_int{1, 66}}, + {"kern.random", []_C_int{1, 31}}, + {"kern.rawpartition", []_C_int{1, 24}}, + {"kern.saved_ids", []_C_int{1, 20}}, + {"kern.securelevel", []_C_int{1, 9}}, + {"kern.seminfo", []_C_int{1, 61}}, + {"kern.shminfo", []_C_int{1, 62}}, + {"kern.somaxconn", []_C_int{1, 28}}, + {"kern.sominconn", []_C_int{1, 29}}, + {"kern.splassert", []_C_int{1, 54}}, + {"kern.stackgap_random", []_C_int{1, 50}}, + {"kern.sysvipc_info", []_C_int{1, 51}}, + {"kern.sysvmsg", []_C_int{1, 34}}, + {"kern.sysvsem", []_C_int{1, 35}}, + {"kern.sysvshm", []_C_int{1, 36}}, + {"kern.timecounter.choice", []_C_int{1, 69, 4}}, + {"kern.timecounter.hardware", []_C_int{1, 69, 3}}, + {"kern.timecounter.tick", []_C_int{1, 69, 1}}, + {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}}, + {"kern.tty.maxptys", []_C_int{1, 44, 6}}, + {"kern.tty.nptys", []_C_int{1, 44, 7}}, + {"kern.tty.tk_cancc", []_C_int{1, 44, 4}}, + {"kern.tty.tk_nin", []_C_int{1, 44, 1}}, + {"kern.tty.tk_nout", []_C_int{1, 44, 2}}, + {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}}, + {"kern.tty.ttyinfo", []_C_int{1, 44, 5}}, + {"kern.ttycount", []_C_int{1, 57}}, + {"kern.userasymcrypto", []_C_int{1, 60}}, + {"kern.usercrypto", []_C_int{1, 52}}, + {"kern.usermount", []_C_int{1, 30}}, + {"kern.version", []_C_int{1, 4}}, + {"kern.vnode", []_C_int{1, 13}}, + {"kern.watchdog.auto", []_C_int{1, 64, 2}}, + {"kern.watchdog.period", []_C_int{1, 64, 1}}, + {"net.bpf.bufsize", []_C_int{4, 31, 1}}, + {"net.bpf.maxbufsize", []_C_int{4, 31, 2}}, + {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}}, + {"net.inet.ah.stats", []_C_int{4, 2, 51, 2}}, + {"net.inet.carp.allow", []_C_int{4, 2, 112, 1}}, + {"net.inet.carp.log", []_C_int{4, 2, 112, 3}}, + {"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}}, + {"net.inet.carp.stats", []_C_int{4, 2, 112, 4}}, + {"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}}, + {"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}}, + {"net.inet.divert.stats", []_C_int{4, 2, 258, 3}}, + {"net.inet.esp.enable", []_C_int{4, 2, 50, 1}}, + {"net.inet.esp.stats", []_C_int{4, 2, 50, 4}}, + {"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}}, + {"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}}, + {"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}}, + {"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}}, + {"net.inet.gre.allow", []_C_int{4, 2, 47, 1}}, + {"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}}, + {"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}}, + {"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}}, + {"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}}, + {"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}}, + {"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}}, + {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}}, + {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}}, + {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}}, + {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}}, + {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}}, + {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}}, + {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}}, + {"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}}, + {"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}}, + {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}}, + {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}}, + {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}}, + {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}}, + {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}}, + {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}}, + {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}}, + {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}}, + {"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}}, + {"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}}, + {"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}}, + {"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}}, + {"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}}, + {"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}}, + {"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}}, + {"net.inet.ip.stats", []_C_int{4, 2, 0, 33}}, + {"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}}, + {"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}}, + {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}}, + {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}}, + {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}}, + {"net.inet.mobileip.allow", []_C_int{4, 2, 55, 1}}, + {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}}, + {"net.inet.pim.stats", []_C_int{4, 2, 103, 1}}, + {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}}, + {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}}, + {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}}, + {"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}}, + {"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}}, + {"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}}, + {"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}}, + {"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}}, + {"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}}, + {"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}}, + {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}}, + {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}}, + {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}}, + {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}}, + {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}}, + {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}}, + {"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}}, + {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}}, + {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}}, + {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}}, + {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}}, + {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}}, + {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}}, + {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}}, + {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}}, + {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}}, + {"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}}, + {"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}}, + {"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}}, + {"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}}, + {"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}}, + {"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}}, + {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}}, + {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}}, + {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}}, + {"net.inet6.icmp6.nd6_prune", []_C_int{4, 24, 30, 6}}, + {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}}, + {"net.inet6.icmp6.nd6_useloopback", []_C_int{4, 24, 30, 11}}, + {"net.inet6.icmp6.nodeinfo", []_C_int{4, 24, 30, 13}}, + {"net.inet6.icmp6.rediraccept", []_C_int{4, 24, 30, 2}}, + {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}}, + {"net.inet6.ip6.accept_rtadv", []_C_int{4, 24, 17, 12}}, + {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}}, + {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}}, + {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}}, + {"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}}, + {"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}}, + {"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}}, + {"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}}, + {"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}}, + {"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}}, + {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}}, + {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}}, + {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}}, + {"net.inet6.ip6.maxifdefrouters", []_C_int{4, 24, 17, 47}}, + {"net.inet6.ip6.maxifprefixes", []_C_int{4, 24, 17, 46}}, + {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}}, + {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}}, + {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}}, + {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}}, + {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}}, + {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}}, + {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}}, + {"net.inet6.ip6.rr_prune", []_C_int{4, 24, 17, 22}}, + {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}}, + {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}}, + {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}}, + {"net.inet6.ip6.v6only", []_C_int{4, 24, 17, 24}}, + {"net.key.sadb_dump", []_C_int{4, 30, 1}}, + {"net.key.spd_dump", []_C_int{4, 30, 2}}, + {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}}, + {"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}}, + {"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}}, + {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}}, + {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}}, + {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}}, + {"net.mpls.maxloop_inkernel", []_C_int{4, 33, 4}}, + {"net.mpls.ttl", []_C_int{4, 33, 2}}, + {"net.pflow.stats", []_C_int{4, 34, 1}}, + {"net.pipex.enable", []_C_int{4, 35, 1}}, + {"vm.anonmin", []_C_int{2, 7}}, + {"vm.loadavg", []_C_int{2, 2}}, + {"vm.maxslp", []_C_int{2, 10}}, + {"vm.nkmempages", []_C_int{2, 6}}, + {"vm.psstrings", []_C_int{2, 3}}, + {"vm.swapencrypt.enable", []_C_int{2, 5, 0}}, + {"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}}, + {"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}}, + {"vm.uspace", []_C_int{2, 11}}, + {"vm.uvmexp", []_C_int{2, 4}}, + {"vm.vmmeter", []_C_int{2, 1}}, + {"vm.vnodemin", []_C_int{2, 9}}, + {"vm.vtextmin", []_C_int{2, 8}}, +} diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go new file mode 100644 index 000000000..2786773ba --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_386.go @@ -0,0 +1,398 @@ +// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/syscall.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build 386,darwin + +package unix + +const ( + SYS_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_WAIT4 = 7 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_CHDIR = 12 + SYS_FCHDIR = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_CHOWN = 16 + SYS_GETFSSTAT = 18 + SYS_GETPID = 20 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_GETEUID = 25 + SYS_PTRACE = 26 + SYS_RECVMSG = 27 + SYS_SENDMSG = 28 + SYS_RECVFROM = 29 + SYS_ACCEPT = 30 + SYS_GETPEERNAME = 31 + SYS_GETSOCKNAME = 32 + SYS_ACCESS = 33 + SYS_CHFLAGS = 34 + SYS_FCHFLAGS = 35 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_GETPPID = 39 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_GETEGID = 43 + SYS_SIGACTION = 46 + SYS_GETGID = 47 + SYS_SIGPROCMASK = 48 + SYS_GETLOGIN = 49 + SYS_SETLOGIN = 50 + SYS_ACCT = 51 + SYS_SIGPENDING = 52 + SYS_SIGALTSTACK = 53 + SYS_IOCTL = 54 + SYS_REBOOT = 55 + SYS_REVOKE = 56 + SYS_SYMLINK = 57 + SYS_READLINK = 58 + SYS_EXECVE = 59 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_MSYNC = 65 + SYS_VFORK = 66 + SYS_MUNMAP = 73 + SYS_MPROTECT = 74 + SYS_MADVISE = 75 + SYS_MINCORE = 78 + SYS_GETGROUPS = 79 + SYS_SETGROUPS = 80 + SYS_GETPGRP = 81 + SYS_SETPGID = 82 + SYS_SETITIMER = 83 + SYS_SWAPON = 85 + SYS_GETITIMER = 86 + SYS_GETDTABLESIZE = 89 + SYS_DUP2 = 90 + SYS_FCNTL = 92 + SYS_SELECT = 93 + SYS_FSYNC = 95 + SYS_SETPRIORITY = 96 + SYS_SOCKET = 97 + SYS_CONNECT = 98 + SYS_GETPRIORITY = 100 + SYS_BIND = 104 + SYS_SETSOCKOPT = 105 + SYS_LISTEN = 106 + SYS_SIGSUSPEND = 111 + SYS_GETTIMEOFDAY = 116 + SYS_GETRUSAGE = 117 + SYS_GETSOCKOPT = 118 + SYS_READV = 120 + SYS_WRITEV = 121 + SYS_SETTIMEOFDAY = 122 + SYS_FCHOWN = 123 + SYS_FCHMOD = 124 + SYS_SETREUID = 126 + SYS_SETREGID = 127 + SYS_RENAME = 128 + SYS_FLOCK = 131 + SYS_MKFIFO = 132 + SYS_SENDTO = 133 + SYS_SHUTDOWN = 134 + SYS_SOCKETPAIR = 135 + SYS_MKDIR = 136 + SYS_RMDIR = 137 + SYS_UTIMES = 138 + SYS_FUTIMES = 139 + SYS_ADJTIME = 140 + SYS_GETHOSTUUID = 142 + SYS_SETSID = 147 + SYS_GETPGID = 151 + SYS_SETPRIVEXEC = 152 + SYS_PREAD = 153 + SYS_PWRITE = 154 + SYS_NFSSVC = 155 + SYS_STATFS = 157 + SYS_FSTATFS = 158 + SYS_UNMOUNT = 159 + SYS_GETFH = 161 + SYS_QUOTACTL = 165 + SYS_MOUNT = 167 + SYS_CSOPS = 169 + SYS_CSOPS_AUDITTOKEN = 170 + SYS_WAITID = 173 + SYS_KDEBUG_TRACE64 = 179 + SYS_KDEBUG_TRACE = 180 + SYS_SETGID = 181 + SYS_SETEGID = 182 + SYS_SETEUID = 183 + SYS_SIGRETURN = 184 + SYS_CHUD = 185 + SYS_FDATASYNC = 187 + SYS_STAT = 188 + SYS_FSTAT = 189 + SYS_LSTAT = 190 + SYS_PATHCONF = 191 + SYS_FPATHCONF = 192 + SYS_GETRLIMIT = 194 + SYS_SETRLIMIT = 195 + SYS_GETDIRENTRIES = 196 + SYS_MMAP = 197 + SYS_LSEEK = 199 + SYS_TRUNCATE = 200 + SYS_FTRUNCATE = 201 + SYS_SYSCTL = 202 + SYS_MLOCK = 203 + SYS_MUNLOCK = 204 + SYS_UNDELETE = 205 + SYS_OPEN_DPROTECTED_NP = 216 + SYS_GETATTRLIST = 220 + SYS_SETATTRLIST = 221 + SYS_GETDIRENTRIESATTR = 222 + SYS_EXCHANGEDATA = 223 + SYS_SEARCHFS = 225 + SYS_DELETE = 226 + SYS_COPYFILE = 227 + SYS_FGETATTRLIST = 228 + SYS_FSETATTRLIST = 229 + SYS_POLL = 230 + SYS_WATCHEVENT = 231 + SYS_WAITEVENT = 232 + SYS_MODWATCH = 233 + SYS_GETXATTR = 234 + SYS_FGETXATTR = 235 + SYS_SETXATTR = 236 + SYS_FSETXATTR = 237 + SYS_REMOVEXATTR = 238 + SYS_FREMOVEXATTR = 239 + SYS_LISTXATTR = 240 + SYS_FLISTXATTR = 241 + SYS_FSCTL = 242 + SYS_INITGROUPS = 243 + SYS_POSIX_SPAWN = 244 + SYS_FFSCTL = 245 + SYS_NFSCLNT = 247 + SYS_FHOPEN = 248 + SYS_MINHERIT = 250 + SYS_SEMSYS = 251 + SYS_MSGSYS = 252 + SYS_SHMSYS = 253 + SYS_SEMCTL = 254 + SYS_SEMGET = 255 + SYS_SEMOP = 256 + SYS_MSGCTL = 258 + SYS_MSGGET = 259 + SYS_MSGSND = 260 + SYS_MSGRCV = 261 + SYS_SHMAT = 262 + SYS_SHMCTL = 263 + SYS_SHMDT = 264 + SYS_SHMGET = 265 + SYS_SHM_OPEN = 266 + SYS_SHM_UNLINK = 267 + SYS_SEM_OPEN = 268 + SYS_SEM_CLOSE = 269 + SYS_SEM_UNLINK = 270 + SYS_SEM_WAIT = 271 + SYS_SEM_TRYWAIT = 272 + SYS_SEM_POST = 273 + SYS_SYSCTLBYNAME = 274 + SYS_OPEN_EXTENDED = 277 + SYS_UMASK_EXTENDED = 278 + SYS_STAT_EXTENDED = 279 + SYS_LSTAT_EXTENDED = 280 + SYS_FSTAT_EXTENDED = 281 + SYS_CHMOD_EXTENDED = 282 + SYS_FCHMOD_EXTENDED = 283 + SYS_ACCESS_EXTENDED = 284 + SYS_SETTID = 285 + SYS_GETTID = 286 + SYS_SETSGROUPS = 287 + SYS_GETSGROUPS = 288 + SYS_SETWGROUPS = 289 + SYS_GETWGROUPS = 290 + SYS_MKFIFO_EXTENDED = 291 + SYS_MKDIR_EXTENDED = 292 + SYS_IDENTITYSVC = 293 + SYS_SHARED_REGION_CHECK_NP = 294 + SYS_VM_PRESSURE_MONITOR = 296 + SYS_PSYNCH_RW_LONGRDLOCK = 297 + SYS_PSYNCH_RW_YIELDWRLOCK = 298 + SYS_PSYNCH_RW_DOWNGRADE = 299 + SYS_PSYNCH_RW_UPGRADE = 300 + SYS_PSYNCH_MUTEXWAIT = 301 + SYS_PSYNCH_MUTEXDROP = 302 + SYS_PSYNCH_CVBROAD = 303 + SYS_PSYNCH_CVSIGNAL = 304 + SYS_PSYNCH_CVWAIT = 305 + SYS_PSYNCH_RW_RDLOCK = 306 + SYS_PSYNCH_RW_WRLOCK = 307 + SYS_PSYNCH_RW_UNLOCK = 308 + SYS_PSYNCH_RW_UNLOCK2 = 309 + SYS_GETSID = 310 + SYS_SETTID_WITH_PID = 311 + SYS_PSYNCH_CVCLRPREPOST = 312 + SYS_AIO_FSYNC = 313 + SYS_AIO_RETURN = 314 + SYS_AIO_SUSPEND = 315 + SYS_AIO_CANCEL = 316 + SYS_AIO_ERROR = 317 + SYS_AIO_READ = 318 + SYS_AIO_WRITE = 319 + SYS_LIO_LISTIO = 320 + SYS_IOPOLICYSYS = 322 + SYS_PROCESS_POLICY = 323 + SYS_MLOCKALL = 324 + SYS_MUNLOCKALL = 325 + SYS_ISSETUGID = 327 + SYS___PTHREAD_KILL = 328 + SYS___PTHREAD_SIGMASK = 329 + SYS___SIGWAIT = 330 + SYS___DISABLE_THREADSIGNAL = 331 + SYS___PTHREAD_MARKCANCEL = 332 + SYS___PTHREAD_CANCELED = 333 + SYS___SEMWAIT_SIGNAL = 334 + SYS_PROC_INFO = 336 + SYS_SENDFILE = 337 + SYS_STAT64 = 338 + SYS_FSTAT64 = 339 + SYS_LSTAT64 = 340 + SYS_STAT64_EXTENDED = 341 + SYS_LSTAT64_EXTENDED = 342 + SYS_FSTAT64_EXTENDED = 343 + SYS_GETDIRENTRIES64 = 344 + SYS_STATFS64 = 345 + SYS_FSTATFS64 = 346 + SYS_GETFSSTAT64 = 347 + SYS___PTHREAD_CHDIR = 348 + SYS___PTHREAD_FCHDIR = 349 + SYS_AUDIT = 350 + SYS_AUDITON = 351 + SYS_GETAUID = 353 + SYS_SETAUID = 354 + SYS_GETAUDIT_ADDR = 357 + SYS_SETAUDIT_ADDR = 358 + SYS_AUDITCTL = 359 + SYS_BSDTHREAD_CREATE = 360 + SYS_BSDTHREAD_TERMINATE = 361 + SYS_KQUEUE = 362 + SYS_KEVENT = 363 + SYS_LCHOWN = 364 + SYS_STACK_SNAPSHOT = 365 + SYS_BSDTHREAD_REGISTER = 366 + SYS_WORKQ_OPEN = 367 + SYS_WORKQ_KERNRETURN = 368 + SYS_KEVENT64 = 369 + SYS___OLD_SEMWAIT_SIGNAL = 370 + SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371 + SYS_THREAD_SELFID = 372 + SYS_LEDGER = 373 + SYS___MAC_EXECVE = 380 + SYS___MAC_SYSCALL = 381 + SYS___MAC_GET_FILE = 382 + SYS___MAC_SET_FILE = 383 + SYS___MAC_GET_LINK = 384 + SYS___MAC_SET_LINK = 385 + SYS___MAC_GET_PROC = 386 + SYS___MAC_SET_PROC = 387 + SYS___MAC_GET_FD = 388 + SYS___MAC_SET_FD = 389 + SYS___MAC_GET_PID = 390 + SYS___MAC_GET_LCID = 391 + SYS___MAC_GET_LCTX = 392 + SYS___MAC_SET_LCTX = 393 + SYS_SETLCID = 394 + SYS_GETLCID = 395 + SYS_READ_NOCANCEL = 396 + SYS_WRITE_NOCANCEL = 397 + SYS_OPEN_NOCANCEL = 398 + SYS_CLOSE_NOCANCEL = 399 + SYS_WAIT4_NOCANCEL = 400 + SYS_RECVMSG_NOCANCEL = 401 + SYS_SENDMSG_NOCANCEL = 402 + SYS_RECVFROM_NOCANCEL = 403 + SYS_ACCEPT_NOCANCEL = 404 + SYS_MSYNC_NOCANCEL = 405 + SYS_FCNTL_NOCANCEL = 406 + SYS_SELECT_NOCANCEL = 407 + SYS_FSYNC_NOCANCEL = 408 + SYS_CONNECT_NOCANCEL = 409 + SYS_SIGSUSPEND_NOCANCEL = 410 + SYS_READV_NOCANCEL = 411 + SYS_WRITEV_NOCANCEL = 412 + SYS_SENDTO_NOCANCEL = 413 + SYS_PREAD_NOCANCEL = 414 + SYS_PWRITE_NOCANCEL = 415 + SYS_WAITID_NOCANCEL = 416 + SYS_POLL_NOCANCEL = 417 + SYS_MSGSND_NOCANCEL = 418 + SYS_MSGRCV_NOCANCEL = 419 + SYS_SEM_WAIT_NOCANCEL = 420 + SYS_AIO_SUSPEND_NOCANCEL = 421 + SYS___SIGWAIT_NOCANCEL = 422 + SYS___SEMWAIT_SIGNAL_NOCANCEL = 423 + SYS___MAC_MOUNT = 424 + SYS___MAC_GET_MOUNT = 425 + SYS___MAC_GETFSSTAT = 426 + SYS_FSGETPATH = 427 + SYS_AUDIT_SESSION_SELF = 428 + SYS_AUDIT_SESSION_JOIN = 429 + SYS_FILEPORT_MAKEPORT = 430 + SYS_FILEPORT_MAKEFD = 431 + SYS_AUDIT_SESSION_PORT = 432 + SYS_PID_SUSPEND = 433 + SYS_PID_RESUME = 434 + SYS_PID_HIBERNATE = 435 + SYS_PID_SHUTDOWN_SOCKETS = 436 + SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438 + SYS_KAS_INFO = 439 + SYS_MEMORYSTATUS_CONTROL = 440 + SYS_GUARDED_OPEN_NP = 441 + SYS_GUARDED_CLOSE_NP = 442 + SYS_GUARDED_KQUEUE_NP = 443 + SYS_CHANGE_FDGUARD_NP = 444 + SYS_PROC_RLIMIT_CONTROL = 446 + SYS_CONNECTX = 447 + SYS_DISCONNECTX = 448 + SYS_PEELOFF = 449 + SYS_SOCKET_DELEGATE = 450 + SYS_TELEMETRY = 451 + SYS_PROC_UUID_POLICY = 452 + SYS_MEMORYSTATUS_GET_LEVEL = 453 + SYS_SYSTEM_OVERRIDE = 454 + SYS_VFS_PURGE = 455 + SYS_SFI_CTL = 456 + SYS_SFI_PIDCTL = 457 + SYS_COALITION = 458 + SYS_COALITION_INFO = 459 + SYS_NECP_MATCH_POLICY = 460 + SYS_GETATTRLISTBULK = 461 + SYS_OPENAT = 463 + SYS_OPENAT_NOCANCEL = 464 + SYS_RENAMEAT = 465 + SYS_FACCESSAT = 466 + SYS_FCHMODAT = 467 + SYS_FCHOWNAT = 468 + SYS_FSTATAT = 469 + SYS_FSTATAT64 = 470 + SYS_LINKAT = 471 + SYS_UNLINKAT = 472 + SYS_READLINKAT = 473 + SYS_SYMLINKAT = 474 + SYS_MKDIRAT = 475 + SYS_GETATTRLISTAT = 476 + SYS_PROC_TRACE_LOG = 477 + SYS_BSDTHREAD_CTL = 478 + SYS_OPENBYID_NP = 479 + SYS_RECVMSG_X = 480 + SYS_SENDMSG_X = 481 + SYS_THREAD_SELFUSAGE = 482 + SYS_CSRCTL = 483 + SYS_GUARDED_OPEN_DPROTECTED_NP = 484 + SYS_GUARDED_WRITE_NP = 485 + SYS_GUARDED_PWRITE_NP = 486 + SYS_GUARDED_WRITEV_NP = 487 + SYS_RENAME_EXT = 488 + SYS_MREMAP_ENCRYPTED = 489 + SYS_MAXSYSCALL = 490 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go new file mode 100644 index 000000000..09de240c8 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_amd64.go @@ -0,0 +1,398 @@ +// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/sys/syscall.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build amd64,darwin + +package unix + +const ( + SYS_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_WAIT4 = 7 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_CHDIR = 12 + SYS_FCHDIR = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_CHOWN = 16 + SYS_GETFSSTAT = 18 + SYS_GETPID = 20 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_GETEUID = 25 + SYS_PTRACE = 26 + SYS_RECVMSG = 27 + SYS_SENDMSG = 28 + SYS_RECVFROM = 29 + SYS_ACCEPT = 30 + SYS_GETPEERNAME = 31 + SYS_GETSOCKNAME = 32 + SYS_ACCESS = 33 + SYS_CHFLAGS = 34 + SYS_FCHFLAGS = 35 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_GETPPID = 39 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_GETEGID = 43 + SYS_SIGACTION = 46 + SYS_GETGID = 47 + SYS_SIGPROCMASK = 48 + SYS_GETLOGIN = 49 + SYS_SETLOGIN = 50 + SYS_ACCT = 51 + SYS_SIGPENDING = 52 + SYS_SIGALTSTACK = 53 + SYS_IOCTL = 54 + SYS_REBOOT = 55 + SYS_REVOKE = 56 + SYS_SYMLINK = 57 + SYS_READLINK = 58 + SYS_EXECVE = 59 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_MSYNC = 65 + SYS_VFORK = 66 + SYS_MUNMAP = 73 + SYS_MPROTECT = 74 + SYS_MADVISE = 75 + SYS_MINCORE = 78 + SYS_GETGROUPS = 79 + SYS_SETGROUPS = 80 + SYS_GETPGRP = 81 + SYS_SETPGID = 82 + SYS_SETITIMER = 83 + SYS_SWAPON = 85 + SYS_GETITIMER = 86 + SYS_GETDTABLESIZE = 89 + SYS_DUP2 = 90 + SYS_FCNTL = 92 + SYS_SELECT = 93 + SYS_FSYNC = 95 + SYS_SETPRIORITY = 96 + SYS_SOCKET = 97 + SYS_CONNECT = 98 + SYS_GETPRIORITY = 100 + SYS_BIND = 104 + SYS_SETSOCKOPT = 105 + SYS_LISTEN = 106 + SYS_SIGSUSPEND = 111 + SYS_GETTIMEOFDAY = 116 + SYS_GETRUSAGE = 117 + SYS_GETSOCKOPT = 118 + SYS_READV = 120 + SYS_WRITEV = 121 + SYS_SETTIMEOFDAY = 122 + SYS_FCHOWN = 123 + SYS_FCHMOD = 124 + SYS_SETREUID = 126 + SYS_SETREGID = 127 + SYS_RENAME = 128 + SYS_FLOCK = 131 + SYS_MKFIFO = 132 + SYS_SENDTO = 133 + SYS_SHUTDOWN = 134 + SYS_SOCKETPAIR = 135 + SYS_MKDIR = 136 + SYS_RMDIR = 137 + SYS_UTIMES = 138 + SYS_FUTIMES = 139 + SYS_ADJTIME = 140 + SYS_GETHOSTUUID = 142 + SYS_SETSID = 147 + SYS_GETPGID = 151 + SYS_SETPRIVEXEC = 152 + SYS_PREAD = 153 + SYS_PWRITE = 154 + SYS_NFSSVC = 155 + SYS_STATFS = 157 + SYS_FSTATFS = 158 + SYS_UNMOUNT = 159 + SYS_GETFH = 161 + SYS_QUOTACTL = 165 + SYS_MOUNT = 167 + SYS_CSOPS = 169 + SYS_CSOPS_AUDITTOKEN = 170 + SYS_WAITID = 173 + SYS_KDEBUG_TRACE64 = 179 + SYS_KDEBUG_TRACE = 180 + SYS_SETGID = 181 + SYS_SETEGID = 182 + SYS_SETEUID = 183 + SYS_SIGRETURN = 184 + SYS_CHUD = 185 + SYS_FDATASYNC = 187 + SYS_STAT = 188 + SYS_FSTAT = 189 + SYS_LSTAT = 190 + SYS_PATHCONF = 191 + SYS_FPATHCONF = 192 + SYS_GETRLIMIT = 194 + SYS_SETRLIMIT = 195 + SYS_GETDIRENTRIES = 196 + SYS_MMAP = 197 + SYS_LSEEK = 199 + SYS_TRUNCATE = 200 + SYS_FTRUNCATE = 201 + SYS_SYSCTL = 202 + SYS_MLOCK = 203 + SYS_MUNLOCK = 204 + SYS_UNDELETE = 205 + SYS_OPEN_DPROTECTED_NP = 216 + SYS_GETATTRLIST = 220 + SYS_SETATTRLIST = 221 + SYS_GETDIRENTRIESATTR = 222 + SYS_EXCHANGEDATA = 223 + SYS_SEARCHFS = 225 + SYS_DELETE = 226 + SYS_COPYFILE = 227 + SYS_FGETATTRLIST = 228 + SYS_FSETATTRLIST = 229 + SYS_POLL = 230 + SYS_WATCHEVENT = 231 + SYS_WAITEVENT = 232 + SYS_MODWATCH = 233 + SYS_GETXATTR = 234 + SYS_FGETXATTR = 235 + SYS_SETXATTR = 236 + SYS_FSETXATTR = 237 + SYS_REMOVEXATTR = 238 + SYS_FREMOVEXATTR = 239 + SYS_LISTXATTR = 240 + SYS_FLISTXATTR = 241 + SYS_FSCTL = 242 + SYS_INITGROUPS = 243 + SYS_POSIX_SPAWN = 244 + SYS_FFSCTL = 245 + SYS_NFSCLNT = 247 + SYS_FHOPEN = 248 + SYS_MINHERIT = 250 + SYS_SEMSYS = 251 + SYS_MSGSYS = 252 + SYS_SHMSYS = 253 + SYS_SEMCTL = 254 + SYS_SEMGET = 255 + SYS_SEMOP = 256 + SYS_MSGCTL = 258 + SYS_MSGGET = 259 + SYS_MSGSND = 260 + SYS_MSGRCV = 261 + SYS_SHMAT = 262 + SYS_SHMCTL = 263 + SYS_SHMDT = 264 + SYS_SHMGET = 265 + SYS_SHM_OPEN = 266 + SYS_SHM_UNLINK = 267 + SYS_SEM_OPEN = 268 + SYS_SEM_CLOSE = 269 + SYS_SEM_UNLINK = 270 + SYS_SEM_WAIT = 271 + SYS_SEM_TRYWAIT = 272 + SYS_SEM_POST = 273 + SYS_SYSCTLBYNAME = 274 + SYS_OPEN_EXTENDED = 277 + SYS_UMASK_EXTENDED = 278 + SYS_STAT_EXTENDED = 279 + SYS_LSTAT_EXTENDED = 280 + SYS_FSTAT_EXTENDED = 281 + SYS_CHMOD_EXTENDED = 282 + SYS_FCHMOD_EXTENDED = 283 + SYS_ACCESS_EXTENDED = 284 + SYS_SETTID = 285 + SYS_GETTID = 286 + SYS_SETSGROUPS = 287 + SYS_GETSGROUPS = 288 + SYS_SETWGROUPS = 289 + SYS_GETWGROUPS = 290 + SYS_MKFIFO_EXTENDED = 291 + SYS_MKDIR_EXTENDED = 292 + SYS_IDENTITYSVC = 293 + SYS_SHARED_REGION_CHECK_NP = 294 + SYS_VM_PRESSURE_MONITOR = 296 + SYS_PSYNCH_RW_LONGRDLOCK = 297 + SYS_PSYNCH_RW_YIELDWRLOCK = 298 + SYS_PSYNCH_RW_DOWNGRADE = 299 + SYS_PSYNCH_RW_UPGRADE = 300 + SYS_PSYNCH_MUTEXWAIT = 301 + SYS_PSYNCH_MUTEXDROP = 302 + SYS_PSYNCH_CVBROAD = 303 + SYS_PSYNCH_CVSIGNAL = 304 + SYS_PSYNCH_CVWAIT = 305 + SYS_PSYNCH_RW_RDLOCK = 306 + SYS_PSYNCH_RW_WRLOCK = 307 + SYS_PSYNCH_RW_UNLOCK = 308 + SYS_PSYNCH_RW_UNLOCK2 = 309 + SYS_GETSID = 310 + SYS_SETTID_WITH_PID = 311 + SYS_PSYNCH_CVCLRPREPOST = 312 + SYS_AIO_FSYNC = 313 + SYS_AIO_RETURN = 314 + SYS_AIO_SUSPEND = 315 + SYS_AIO_CANCEL = 316 + SYS_AIO_ERROR = 317 + SYS_AIO_READ = 318 + SYS_AIO_WRITE = 319 + SYS_LIO_LISTIO = 320 + SYS_IOPOLICYSYS = 322 + SYS_PROCESS_POLICY = 323 + SYS_MLOCKALL = 324 + SYS_MUNLOCKALL = 325 + SYS_ISSETUGID = 327 + SYS___PTHREAD_KILL = 328 + SYS___PTHREAD_SIGMASK = 329 + SYS___SIGWAIT = 330 + SYS___DISABLE_THREADSIGNAL = 331 + SYS___PTHREAD_MARKCANCEL = 332 + SYS___PTHREAD_CANCELED = 333 + SYS___SEMWAIT_SIGNAL = 334 + SYS_PROC_INFO = 336 + SYS_SENDFILE = 337 + SYS_STAT64 = 338 + SYS_FSTAT64 = 339 + SYS_LSTAT64 = 340 + SYS_STAT64_EXTENDED = 341 + SYS_LSTAT64_EXTENDED = 342 + SYS_FSTAT64_EXTENDED = 343 + SYS_GETDIRENTRIES64 = 344 + SYS_STATFS64 = 345 + SYS_FSTATFS64 = 346 + SYS_GETFSSTAT64 = 347 + SYS___PTHREAD_CHDIR = 348 + SYS___PTHREAD_FCHDIR = 349 + SYS_AUDIT = 350 + SYS_AUDITON = 351 + SYS_GETAUID = 353 + SYS_SETAUID = 354 + SYS_GETAUDIT_ADDR = 357 + SYS_SETAUDIT_ADDR = 358 + SYS_AUDITCTL = 359 + SYS_BSDTHREAD_CREATE = 360 + SYS_BSDTHREAD_TERMINATE = 361 + SYS_KQUEUE = 362 + SYS_KEVENT = 363 + SYS_LCHOWN = 364 + SYS_STACK_SNAPSHOT = 365 + SYS_BSDTHREAD_REGISTER = 366 + SYS_WORKQ_OPEN = 367 + SYS_WORKQ_KERNRETURN = 368 + SYS_KEVENT64 = 369 + SYS___OLD_SEMWAIT_SIGNAL = 370 + SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371 + SYS_THREAD_SELFID = 372 + SYS_LEDGER = 373 + SYS___MAC_EXECVE = 380 + SYS___MAC_SYSCALL = 381 + SYS___MAC_GET_FILE = 382 + SYS___MAC_SET_FILE = 383 + SYS___MAC_GET_LINK = 384 + SYS___MAC_SET_LINK = 385 + SYS___MAC_GET_PROC = 386 + SYS___MAC_SET_PROC = 387 + SYS___MAC_GET_FD = 388 + SYS___MAC_SET_FD = 389 + SYS___MAC_GET_PID = 390 + SYS___MAC_GET_LCID = 391 + SYS___MAC_GET_LCTX = 392 + SYS___MAC_SET_LCTX = 393 + SYS_SETLCID = 394 + SYS_GETLCID = 395 + SYS_READ_NOCANCEL = 396 + SYS_WRITE_NOCANCEL = 397 + SYS_OPEN_NOCANCEL = 398 + SYS_CLOSE_NOCANCEL = 399 + SYS_WAIT4_NOCANCEL = 400 + SYS_RECVMSG_NOCANCEL = 401 + SYS_SENDMSG_NOCANCEL = 402 + SYS_RECVFROM_NOCANCEL = 403 + SYS_ACCEPT_NOCANCEL = 404 + SYS_MSYNC_NOCANCEL = 405 + SYS_FCNTL_NOCANCEL = 406 + SYS_SELECT_NOCANCEL = 407 + SYS_FSYNC_NOCANCEL = 408 + SYS_CONNECT_NOCANCEL = 409 + SYS_SIGSUSPEND_NOCANCEL = 410 + SYS_READV_NOCANCEL = 411 + SYS_WRITEV_NOCANCEL = 412 + SYS_SENDTO_NOCANCEL = 413 + SYS_PREAD_NOCANCEL = 414 + SYS_PWRITE_NOCANCEL = 415 + SYS_WAITID_NOCANCEL = 416 + SYS_POLL_NOCANCEL = 417 + SYS_MSGSND_NOCANCEL = 418 + SYS_MSGRCV_NOCANCEL = 419 + SYS_SEM_WAIT_NOCANCEL = 420 + SYS_AIO_SUSPEND_NOCANCEL = 421 + SYS___SIGWAIT_NOCANCEL = 422 + SYS___SEMWAIT_SIGNAL_NOCANCEL = 423 + SYS___MAC_MOUNT = 424 + SYS___MAC_GET_MOUNT = 425 + SYS___MAC_GETFSSTAT = 426 + SYS_FSGETPATH = 427 + SYS_AUDIT_SESSION_SELF = 428 + SYS_AUDIT_SESSION_JOIN = 429 + SYS_FILEPORT_MAKEPORT = 430 + SYS_FILEPORT_MAKEFD = 431 + SYS_AUDIT_SESSION_PORT = 432 + SYS_PID_SUSPEND = 433 + SYS_PID_RESUME = 434 + SYS_PID_HIBERNATE = 435 + SYS_PID_SHUTDOWN_SOCKETS = 436 + SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438 + SYS_KAS_INFO = 439 + SYS_MEMORYSTATUS_CONTROL = 440 + SYS_GUARDED_OPEN_NP = 441 + SYS_GUARDED_CLOSE_NP = 442 + SYS_GUARDED_KQUEUE_NP = 443 + SYS_CHANGE_FDGUARD_NP = 444 + SYS_PROC_RLIMIT_CONTROL = 446 + SYS_CONNECTX = 447 + SYS_DISCONNECTX = 448 + SYS_PEELOFF = 449 + SYS_SOCKET_DELEGATE = 450 + SYS_TELEMETRY = 451 + SYS_PROC_UUID_POLICY = 452 + SYS_MEMORYSTATUS_GET_LEVEL = 453 + SYS_SYSTEM_OVERRIDE = 454 + SYS_VFS_PURGE = 455 + SYS_SFI_CTL = 456 + SYS_SFI_PIDCTL = 457 + SYS_COALITION = 458 + SYS_COALITION_INFO = 459 + SYS_NECP_MATCH_POLICY = 460 + SYS_GETATTRLISTBULK = 461 + SYS_OPENAT = 463 + SYS_OPENAT_NOCANCEL = 464 + SYS_RENAMEAT = 465 + SYS_FACCESSAT = 466 + SYS_FCHMODAT = 467 + SYS_FCHOWNAT = 468 + SYS_FSTATAT = 469 + SYS_FSTATAT64 = 470 + SYS_LINKAT = 471 + SYS_UNLINKAT = 472 + SYS_READLINKAT = 473 + SYS_SYMLINKAT = 474 + SYS_MKDIRAT = 475 + SYS_GETATTRLISTAT = 476 + SYS_PROC_TRACE_LOG = 477 + SYS_BSDTHREAD_CTL = 478 + SYS_OPENBYID_NP = 479 + SYS_RECVMSG_X = 480 + SYS_SENDMSG_X = 481 + SYS_THREAD_SELFUSAGE = 482 + SYS_CSRCTL = 483 + SYS_GUARDED_OPEN_DPROTECTED_NP = 484 + SYS_GUARDED_WRITE_NP = 485 + SYS_GUARDED_PWRITE_NP = 486 + SYS_GUARDED_WRITEV_NP = 487 + SYS_RENAME_EXT = 488 + SYS_MREMAP_ENCRYPTED = 489 + SYS_MAXSYSCALL = 490 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go new file mode 100644 index 000000000..b8c9aea85 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm.go @@ -0,0 +1,358 @@ +// mksysnum_darwin.pl /usr/include/sys/syscall.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build arm,darwin + +package unix + +const ( + SYS_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_WAIT4 = 7 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_CHDIR = 12 + SYS_FCHDIR = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_CHOWN = 16 + SYS_GETFSSTAT = 18 + SYS_GETPID = 20 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_GETEUID = 25 + SYS_PTRACE = 26 + SYS_RECVMSG = 27 + SYS_SENDMSG = 28 + SYS_RECVFROM = 29 + SYS_ACCEPT = 30 + SYS_GETPEERNAME = 31 + SYS_GETSOCKNAME = 32 + SYS_ACCESS = 33 + SYS_CHFLAGS = 34 + SYS_FCHFLAGS = 35 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_GETPPID = 39 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_GETEGID = 43 + SYS_SIGACTION = 46 + SYS_GETGID = 47 + SYS_SIGPROCMASK = 48 + SYS_GETLOGIN = 49 + SYS_SETLOGIN = 50 + SYS_ACCT = 51 + SYS_SIGPENDING = 52 + SYS_SIGALTSTACK = 53 + SYS_IOCTL = 54 + SYS_REBOOT = 55 + SYS_REVOKE = 56 + SYS_SYMLINK = 57 + SYS_READLINK = 58 + SYS_EXECVE = 59 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_MSYNC = 65 + SYS_VFORK = 66 + SYS_MUNMAP = 73 + SYS_MPROTECT = 74 + SYS_MADVISE = 75 + SYS_MINCORE = 78 + SYS_GETGROUPS = 79 + SYS_SETGROUPS = 80 + SYS_GETPGRP = 81 + SYS_SETPGID = 82 + SYS_SETITIMER = 83 + SYS_SWAPON = 85 + SYS_GETITIMER = 86 + SYS_GETDTABLESIZE = 89 + SYS_DUP2 = 90 + SYS_FCNTL = 92 + SYS_SELECT = 93 + SYS_FSYNC = 95 + SYS_SETPRIORITY = 96 + SYS_SOCKET = 97 + SYS_CONNECT = 98 + SYS_GETPRIORITY = 100 + SYS_BIND = 104 + SYS_SETSOCKOPT = 105 + SYS_LISTEN = 106 + SYS_SIGSUSPEND = 111 + SYS_GETTIMEOFDAY = 116 + SYS_GETRUSAGE = 117 + SYS_GETSOCKOPT = 118 + SYS_READV = 120 + SYS_WRITEV = 121 + SYS_SETTIMEOFDAY = 122 + SYS_FCHOWN = 123 + SYS_FCHMOD = 124 + SYS_SETREUID = 126 + SYS_SETREGID = 127 + SYS_RENAME = 128 + SYS_FLOCK = 131 + SYS_MKFIFO = 132 + SYS_SENDTO = 133 + SYS_SHUTDOWN = 134 + SYS_SOCKETPAIR = 135 + SYS_MKDIR = 136 + SYS_RMDIR = 137 + SYS_UTIMES = 138 + SYS_FUTIMES = 139 + SYS_ADJTIME = 140 + SYS_GETHOSTUUID = 142 + SYS_SETSID = 147 + SYS_GETPGID = 151 + SYS_SETPRIVEXEC = 152 + SYS_PREAD = 153 + SYS_PWRITE = 154 + SYS_NFSSVC = 155 + SYS_STATFS = 157 + SYS_FSTATFS = 158 + SYS_UNMOUNT = 159 + SYS_GETFH = 161 + SYS_QUOTACTL = 165 + SYS_MOUNT = 167 + SYS_CSOPS = 169 + SYS_CSOPS_AUDITTOKEN = 170 + SYS_WAITID = 173 + SYS_KDEBUG_TRACE = 180 + SYS_SETGID = 181 + SYS_SETEGID = 182 + SYS_SETEUID = 183 + SYS_SIGRETURN = 184 + SYS_CHUD = 185 + SYS_FDATASYNC = 187 + SYS_STAT = 188 + SYS_FSTAT = 189 + SYS_LSTAT = 190 + SYS_PATHCONF = 191 + SYS_FPATHCONF = 192 + SYS_GETRLIMIT = 194 + SYS_SETRLIMIT = 195 + SYS_GETDIRENTRIES = 196 + SYS_MMAP = 197 + SYS_LSEEK = 199 + SYS_TRUNCATE = 200 + SYS_FTRUNCATE = 201 + SYS___SYSCTL = 202 + SYS_MLOCK = 203 + SYS_MUNLOCK = 204 + SYS_UNDELETE = 205 + SYS_ATSOCKET = 206 + SYS_ATGETMSG = 207 + SYS_ATPUTMSG = 208 + SYS_ATPSNDREQ = 209 + SYS_ATPSNDRSP = 210 + SYS_ATPGETREQ = 211 + SYS_ATPGETRSP = 212 + SYS_OPEN_DPROTECTED_NP = 216 + SYS_GETATTRLIST = 220 + SYS_SETATTRLIST = 221 + SYS_GETDIRENTRIESATTR = 222 + SYS_EXCHANGEDATA = 223 + SYS_SEARCHFS = 225 + SYS_DELETE = 226 + SYS_COPYFILE = 227 + SYS_FGETATTRLIST = 228 + SYS_FSETATTRLIST = 229 + SYS_POLL = 230 + SYS_WATCHEVENT = 231 + SYS_WAITEVENT = 232 + SYS_MODWATCH = 233 + SYS_GETXATTR = 234 + SYS_FGETXATTR = 235 + SYS_SETXATTR = 236 + SYS_FSETXATTR = 237 + SYS_REMOVEXATTR = 238 + SYS_FREMOVEXATTR = 239 + SYS_LISTXATTR = 240 + SYS_FLISTXATTR = 241 + SYS_FSCTL = 242 + SYS_INITGROUPS = 243 + SYS_POSIX_SPAWN = 244 + SYS_FFSCTL = 245 + SYS_NFSCLNT = 247 + SYS_FHOPEN = 248 + SYS_MINHERIT = 250 + SYS_SEMSYS = 251 + SYS_MSGSYS = 252 + SYS_SHMSYS = 253 + SYS_SEMCTL = 254 + SYS_SEMGET = 255 + SYS_SEMOP = 256 + SYS_MSGCTL = 258 + SYS_MSGGET = 259 + SYS_MSGSND = 260 + SYS_MSGRCV = 261 + SYS_SHMAT = 262 + SYS_SHMCTL = 263 + SYS_SHMDT = 264 + SYS_SHMGET = 265 + SYS_SHM_OPEN = 266 + SYS_SHM_UNLINK = 267 + SYS_SEM_OPEN = 268 + SYS_SEM_CLOSE = 269 + SYS_SEM_UNLINK = 270 + SYS_SEM_WAIT = 271 + SYS_SEM_TRYWAIT = 272 + SYS_SEM_POST = 273 + SYS_SEM_GETVALUE = 274 + SYS_SEM_INIT = 275 + SYS_SEM_DESTROY = 276 + SYS_OPEN_EXTENDED = 277 + SYS_UMASK_EXTENDED = 278 + SYS_STAT_EXTENDED = 279 + SYS_LSTAT_EXTENDED = 280 + SYS_FSTAT_EXTENDED = 281 + SYS_CHMOD_EXTENDED = 282 + SYS_FCHMOD_EXTENDED = 283 + SYS_ACCESS_EXTENDED = 284 + SYS_SETTID = 285 + SYS_GETTID = 286 + SYS_SETSGROUPS = 287 + SYS_GETSGROUPS = 288 + SYS_SETWGROUPS = 289 + SYS_GETWGROUPS = 290 + SYS_MKFIFO_EXTENDED = 291 + SYS_MKDIR_EXTENDED = 292 + SYS_IDENTITYSVC = 293 + SYS_SHARED_REGION_CHECK_NP = 294 + SYS_VM_PRESSURE_MONITOR = 296 + SYS_PSYNCH_RW_LONGRDLOCK = 297 + SYS_PSYNCH_RW_YIELDWRLOCK = 298 + SYS_PSYNCH_RW_DOWNGRADE = 299 + SYS_PSYNCH_RW_UPGRADE = 300 + SYS_PSYNCH_MUTEXWAIT = 301 + SYS_PSYNCH_MUTEXDROP = 302 + SYS_PSYNCH_CVBROAD = 303 + SYS_PSYNCH_CVSIGNAL = 304 + SYS_PSYNCH_CVWAIT = 305 + SYS_PSYNCH_RW_RDLOCK = 306 + SYS_PSYNCH_RW_WRLOCK = 307 + SYS_PSYNCH_RW_UNLOCK = 308 + SYS_PSYNCH_RW_UNLOCK2 = 309 + SYS_GETSID = 310 + SYS_SETTID_WITH_PID = 311 + SYS_PSYNCH_CVCLRPREPOST = 312 + SYS_AIO_FSYNC = 313 + SYS_AIO_RETURN = 314 + SYS_AIO_SUSPEND = 315 + SYS_AIO_CANCEL = 316 + SYS_AIO_ERROR = 317 + SYS_AIO_READ = 318 + SYS_AIO_WRITE = 319 + SYS_LIO_LISTIO = 320 + SYS_IOPOLICYSYS = 322 + SYS_PROCESS_POLICY = 323 + SYS_MLOCKALL = 324 + SYS_MUNLOCKALL = 325 + SYS_ISSETUGID = 327 + SYS___PTHREAD_KILL = 328 + SYS___PTHREAD_SIGMASK = 329 + SYS___SIGWAIT = 330 + SYS___DISABLE_THREADSIGNAL = 331 + SYS___PTHREAD_MARKCANCEL = 332 + SYS___PTHREAD_CANCELED = 333 + SYS___SEMWAIT_SIGNAL = 334 + SYS_PROC_INFO = 336 + SYS_SENDFILE = 337 + SYS_STAT64 = 338 + SYS_FSTAT64 = 339 + SYS_LSTAT64 = 340 + SYS_STAT64_EXTENDED = 341 + SYS_LSTAT64_EXTENDED = 342 + SYS_FSTAT64_EXTENDED = 343 + SYS_GETDIRENTRIES64 = 344 + SYS_STATFS64 = 345 + SYS_FSTATFS64 = 346 + SYS_GETFSSTAT64 = 347 + SYS___PTHREAD_CHDIR = 348 + SYS___PTHREAD_FCHDIR = 349 + SYS_AUDIT = 350 + SYS_AUDITON = 351 + SYS_GETAUID = 353 + SYS_SETAUID = 354 + SYS_GETAUDIT_ADDR = 357 + SYS_SETAUDIT_ADDR = 358 + SYS_AUDITCTL = 359 + SYS_BSDTHREAD_CREATE = 360 + SYS_BSDTHREAD_TERMINATE = 361 + SYS_KQUEUE = 362 + SYS_KEVENT = 363 + SYS_LCHOWN = 364 + SYS_STACK_SNAPSHOT = 365 + SYS_BSDTHREAD_REGISTER = 366 + SYS_WORKQ_OPEN = 367 + SYS_WORKQ_KERNRETURN = 368 + SYS_KEVENT64 = 369 + SYS___OLD_SEMWAIT_SIGNAL = 370 + SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371 + SYS_THREAD_SELFID = 372 + SYS_LEDGER = 373 + SYS___MAC_EXECVE = 380 + SYS___MAC_SYSCALL = 381 + SYS___MAC_GET_FILE = 382 + SYS___MAC_SET_FILE = 383 + SYS___MAC_GET_LINK = 384 + SYS___MAC_SET_LINK = 385 + SYS___MAC_GET_PROC = 386 + SYS___MAC_SET_PROC = 387 + SYS___MAC_GET_FD = 388 + SYS___MAC_SET_FD = 389 + SYS___MAC_GET_PID = 390 + SYS___MAC_GET_LCID = 391 + SYS___MAC_GET_LCTX = 392 + SYS___MAC_SET_LCTX = 393 + SYS_SETLCID = 394 + SYS_GETLCID = 395 + SYS_READ_NOCANCEL = 396 + SYS_WRITE_NOCANCEL = 397 + SYS_OPEN_NOCANCEL = 398 + SYS_CLOSE_NOCANCEL = 399 + SYS_WAIT4_NOCANCEL = 400 + SYS_RECVMSG_NOCANCEL = 401 + SYS_SENDMSG_NOCANCEL = 402 + SYS_RECVFROM_NOCANCEL = 403 + SYS_ACCEPT_NOCANCEL = 404 + SYS_MSYNC_NOCANCEL = 405 + SYS_FCNTL_NOCANCEL = 406 + SYS_SELECT_NOCANCEL = 407 + SYS_FSYNC_NOCANCEL = 408 + SYS_CONNECT_NOCANCEL = 409 + SYS_SIGSUSPEND_NOCANCEL = 410 + SYS_READV_NOCANCEL = 411 + SYS_WRITEV_NOCANCEL = 412 + SYS_SENDTO_NOCANCEL = 413 + SYS_PREAD_NOCANCEL = 414 + SYS_PWRITE_NOCANCEL = 415 + SYS_WAITID_NOCANCEL = 416 + SYS_POLL_NOCANCEL = 417 + SYS_MSGSND_NOCANCEL = 418 + SYS_MSGRCV_NOCANCEL = 419 + SYS_SEM_WAIT_NOCANCEL = 420 + SYS_AIO_SUSPEND_NOCANCEL = 421 + SYS___SIGWAIT_NOCANCEL = 422 + SYS___SEMWAIT_SIGNAL_NOCANCEL = 423 + SYS___MAC_MOUNT = 424 + SYS___MAC_GET_MOUNT = 425 + SYS___MAC_GETFSSTAT = 426 + SYS_FSGETPATH = 427 + SYS_AUDIT_SESSION_SELF = 428 + SYS_AUDIT_SESSION_JOIN = 429 + SYS_FILEPORT_MAKEPORT = 430 + SYS_FILEPORT_MAKEFD = 431 + SYS_AUDIT_SESSION_PORT = 432 + SYS_PID_SUSPEND = 433 + SYS_PID_RESUME = 434 + SYS_PID_HIBERNATE = 435 + SYS_PID_SHUTDOWN_SOCKETS = 436 + SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438 + SYS_KAS_INFO = 439 + SYS_MAXSYSCALL = 440 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go new file mode 100644 index 000000000..26677ebbf --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_darwin_arm64.go @@ -0,0 +1,398 @@ +// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk/usr/include/sys/syscall.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build arm64,darwin + +package unix + +const ( + SYS_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_WAIT4 = 7 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_CHDIR = 12 + SYS_FCHDIR = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_CHOWN = 16 + SYS_GETFSSTAT = 18 + SYS_GETPID = 20 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_GETEUID = 25 + SYS_PTRACE = 26 + SYS_RECVMSG = 27 + SYS_SENDMSG = 28 + SYS_RECVFROM = 29 + SYS_ACCEPT = 30 + SYS_GETPEERNAME = 31 + SYS_GETSOCKNAME = 32 + SYS_ACCESS = 33 + SYS_CHFLAGS = 34 + SYS_FCHFLAGS = 35 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_GETPPID = 39 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_GETEGID = 43 + SYS_SIGACTION = 46 + SYS_GETGID = 47 + SYS_SIGPROCMASK = 48 + SYS_GETLOGIN = 49 + SYS_SETLOGIN = 50 + SYS_ACCT = 51 + SYS_SIGPENDING = 52 + SYS_SIGALTSTACK = 53 + SYS_IOCTL = 54 + SYS_REBOOT = 55 + SYS_REVOKE = 56 + SYS_SYMLINK = 57 + SYS_READLINK = 58 + SYS_EXECVE = 59 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_MSYNC = 65 + SYS_VFORK = 66 + SYS_MUNMAP = 73 + SYS_MPROTECT = 74 + SYS_MADVISE = 75 + SYS_MINCORE = 78 + SYS_GETGROUPS = 79 + SYS_SETGROUPS = 80 + SYS_GETPGRP = 81 + SYS_SETPGID = 82 + SYS_SETITIMER = 83 + SYS_SWAPON = 85 + SYS_GETITIMER = 86 + SYS_GETDTABLESIZE = 89 + SYS_DUP2 = 90 + SYS_FCNTL = 92 + SYS_SELECT = 93 + SYS_FSYNC = 95 + SYS_SETPRIORITY = 96 + SYS_SOCKET = 97 + SYS_CONNECT = 98 + SYS_GETPRIORITY = 100 + SYS_BIND = 104 + SYS_SETSOCKOPT = 105 + SYS_LISTEN = 106 + SYS_SIGSUSPEND = 111 + SYS_GETTIMEOFDAY = 116 + SYS_GETRUSAGE = 117 + SYS_GETSOCKOPT = 118 + SYS_READV = 120 + SYS_WRITEV = 121 + SYS_SETTIMEOFDAY = 122 + SYS_FCHOWN = 123 + SYS_FCHMOD = 124 + SYS_SETREUID = 126 + SYS_SETREGID = 127 + SYS_RENAME = 128 + SYS_FLOCK = 131 + SYS_MKFIFO = 132 + SYS_SENDTO = 133 + SYS_SHUTDOWN = 134 + SYS_SOCKETPAIR = 135 + SYS_MKDIR = 136 + SYS_RMDIR = 137 + SYS_UTIMES = 138 + SYS_FUTIMES = 139 + SYS_ADJTIME = 140 + SYS_GETHOSTUUID = 142 + SYS_SETSID = 147 + SYS_GETPGID = 151 + SYS_SETPRIVEXEC = 152 + SYS_PREAD = 153 + SYS_PWRITE = 154 + SYS_NFSSVC = 155 + SYS_STATFS = 157 + SYS_FSTATFS = 158 + SYS_UNMOUNT = 159 + SYS_GETFH = 161 + SYS_QUOTACTL = 165 + SYS_MOUNT = 167 + SYS_CSOPS = 169 + SYS_CSOPS_AUDITTOKEN = 170 + SYS_WAITID = 173 + SYS_KDEBUG_TRACE64 = 179 + SYS_KDEBUG_TRACE = 180 + SYS_SETGID = 181 + SYS_SETEGID = 182 + SYS_SETEUID = 183 + SYS_SIGRETURN = 184 + SYS_CHUD = 185 + SYS_FDATASYNC = 187 + SYS_STAT = 188 + SYS_FSTAT = 189 + SYS_LSTAT = 190 + SYS_PATHCONF = 191 + SYS_FPATHCONF = 192 + SYS_GETRLIMIT = 194 + SYS_SETRLIMIT = 195 + SYS_GETDIRENTRIES = 196 + SYS_MMAP = 197 + SYS_LSEEK = 199 + SYS_TRUNCATE = 200 + SYS_FTRUNCATE = 201 + SYS_SYSCTL = 202 + SYS_MLOCK = 203 + SYS_MUNLOCK = 204 + SYS_UNDELETE = 205 + SYS_OPEN_DPROTECTED_NP = 216 + SYS_GETATTRLIST = 220 + SYS_SETATTRLIST = 221 + SYS_GETDIRENTRIESATTR = 222 + SYS_EXCHANGEDATA = 223 + SYS_SEARCHFS = 225 + SYS_DELETE = 226 + SYS_COPYFILE = 227 + SYS_FGETATTRLIST = 228 + SYS_FSETATTRLIST = 229 + SYS_POLL = 230 + SYS_WATCHEVENT = 231 + SYS_WAITEVENT = 232 + SYS_MODWATCH = 233 + SYS_GETXATTR = 234 + SYS_FGETXATTR = 235 + SYS_SETXATTR = 236 + SYS_FSETXATTR = 237 + SYS_REMOVEXATTR = 238 + SYS_FREMOVEXATTR = 239 + SYS_LISTXATTR = 240 + SYS_FLISTXATTR = 241 + SYS_FSCTL = 242 + SYS_INITGROUPS = 243 + SYS_POSIX_SPAWN = 244 + SYS_FFSCTL = 245 + SYS_NFSCLNT = 247 + SYS_FHOPEN = 248 + SYS_MINHERIT = 250 + SYS_SEMSYS = 251 + SYS_MSGSYS = 252 + SYS_SHMSYS = 253 + SYS_SEMCTL = 254 + SYS_SEMGET = 255 + SYS_SEMOP = 256 + SYS_MSGCTL = 258 + SYS_MSGGET = 259 + SYS_MSGSND = 260 + SYS_MSGRCV = 261 + SYS_SHMAT = 262 + SYS_SHMCTL = 263 + SYS_SHMDT = 264 + SYS_SHMGET = 265 + SYS_SHM_OPEN = 266 + SYS_SHM_UNLINK = 267 + SYS_SEM_OPEN = 268 + SYS_SEM_CLOSE = 269 + SYS_SEM_UNLINK = 270 + SYS_SEM_WAIT = 271 + SYS_SEM_TRYWAIT = 272 + SYS_SEM_POST = 273 + SYS_SYSCTLBYNAME = 274 + SYS_OPEN_EXTENDED = 277 + SYS_UMASK_EXTENDED = 278 + SYS_STAT_EXTENDED = 279 + SYS_LSTAT_EXTENDED = 280 + SYS_FSTAT_EXTENDED = 281 + SYS_CHMOD_EXTENDED = 282 + SYS_FCHMOD_EXTENDED = 283 + SYS_ACCESS_EXTENDED = 284 + SYS_SETTID = 285 + SYS_GETTID = 286 + SYS_SETSGROUPS = 287 + SYS_GETSGROUPS = 288 + SYS_SETWGROUPS = 289 + SYS_GETWGROUPS = 290 + SYS_MKFIFO_EXTENDED = 291 + SYS_MKDIR_EXTENDED = 292 + SYS_IDENTITYSVC = 293 + SYS_SHARED_REGION_CHECK_NP = 294 + SYS_VM_PRESSURE_MONITOR = 296 + SYS_PSYNCH_RW_LONGRDLOCK = 297 + SYS_PSYNCH_RW_YIELDWRLOCK = 298 + SYS_PSYNCH_RW_DOWNGRADE = 299 + SYS_PSYNCH_RW_UPGRADE = 300 + SYS_PSYNCH_MUTEXWAIT = 301 + SYS_PSYNCH_MUTEXDROP = 302 + SYS_PSYNCH_CVBROAD = 303 + SYS_PSYNCH_CVSIGNAL = 304 + SYS_PSYNCH_CVWAIT = 305 + SYS_PSYNCH_RW_RDLOCK = 306 + SYS_PSYNCH_RW_WRLOCK = 307 + SYS_PSYNCH_RW_UNLOCK = 308 + SYS_PSYNCH_RW_UNLOCK2 = 309 + SYS_GETSID = 310 + SYS_SETTID_WITH_PID = 311 + SYS_PSYNCH_CVCLRPREPOST = 312 + SYS_AIO_FSYNC = 313 + SYS_AIO_RETURN = 314 + SYS_AIO_SUSPEND = 315 + SYS_AIO_CANCEL = 316 + SYS_AIO_ERROR = 317 + SYS_AIO_READ = 318 + SYS_AIO_WRITE = 319 + SYS_LIO_LISTIO = 320 + SYS_IOPOLICYSYS = 322 + SYS_PROCESS_POLICY = 323 + SYS_MLOCKALL = 324 + SYS_MUNLOCKALL = 325 + SYS_ISSETUGID = 327 + SYS___PTHREAD_KILL = 328 + SYS___PTHREAD_SIGMASK = 329 + SYS___SIGWAIT = 330 + SYS___DISABLE_THREADSIGNAL = 331 + SYS___PTHREAD_MARKCANCEL = 332 + SYS___PTHREAD_CANCELED = 333 + SYS___SEMWAIT_SIGNAL = 334 + SYS_PROC_INFO = 336 + SYS_SENDFILE = 337 + SYS_STAT64 = 338 + SYS_FSTAT64 = 339 + SYS_LSTAT64 = 340 + SYS_STAT64_EXTENDED = 341 + SYS_LSTAT64_EXTENDED = 342 + SYS_FSTAT64_EXTENDED = 343 + SYS_GETDIRENTRIES64 = 344 + SYS_STATFS64 = 345 + SYS_FSTATFS64 = 346 + SYS_GETFSSTAT64 = 347 + SYS___PTHREAD_CHDIR = 348 + SYS___PTHREAD_FCHDIR = 349 + SYS_AUDIT = 350 + SYS_AUDITON = 351 + SYS_GETAUID = 353 + SYS_SETAUID = 354 + SYS_GETAUDIT_ADDR = 357 + SYS_SETAUDIT_ADDR = 358 + SYS_AUDITCTL = 359 + SYS_BSDTHREAD_CREATE = 360 + SYS_BSDTHREAD_TERMINATE = 361 + SYS_KQUEUE = 362 + SYS_KEVENT = 363 + SYS_LCHOWN = 364 + SYS_STACK_SNAPSHOT = 365 + SYS_BSDTHREAD_REGISTER = 366 + SYS_WORKQ_OPEN = 367 + SYS_WORKQ_KERNRETURN = 368 + SYS_KEVENT64 = 369 + SYS___OLD_SEMWAIT_SIGNAL = 370 + SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371 + SYS_THREAD_SELFID = 372 + SYS_LEDGER = 373 + SYS___MAC_EXECVE = 380 + SYS___MAC_SYSCALL = 381 + SYS___MAC_GET_FILE = 382 + SYS___MAC_SET_FILE = 383 + SYS___MAC_GET_LINK = 384 + SYS___MAC_SET_LINK = 385 + SYS___MAC_GET_PROC = 386 + SYS___MAC_SET_PROC = 387 + SYS___MAC_GET_FD = 388 + SYS___MAC_SET_FD = 389 + SYS___MAC_GET_PID = 390 + SYS___MAC_GET_LCID = 391 + SYS___MAC_GET_LCTX = 392 + SYS___MAC_SET_LCTX = 393 + SYS_SETLCID = 394 + SYS_GETLCID = 395 + SYS_READ_NOCANCEL = 396 + SYS_WRITE_NOCANCEL = 397 + SYS_OPEN_NOCANCEL = 398 + SYS_CLOSE_NOCANCEL = 399 + SYS_WAIT4_NOCANCEL = 400 + SYS_RECVMSG_NOCANCEL = 401 + SYS_SENDMSG_NOCANCEL = 402 + SYS_RECVFROM_NOCANCEL = 403 + SYS_ACCEPT_NOCANCEL = 404 + SYS_MSYNC_NOCANCEL = 405 + SYS_FCNTL_NOCANCEL = 406 + SYS_SELECT_NOCANCEL = 407 + SYS_FSYNC_NOCANCEL = 408 + SYS_CONNECT_NOCANCEL = 409 + SYS_SIGSUSPEND_NOCANCEL = 410 + SYS_READV_NOCANCEL = 411 + SYS_WRITEV_NOCANCEL = 412 + SYS_SENDTO_NOCANCEL = 413 + SYS_PREAD_NOCANCEL = 414 + SYS_PWRITE_NOCANCEL = 415 + SYS_WAITID_NOCANCEL = 416 + SYS_POLL_NOCANCEL = 417 + SYS_MSGSND_NOCANCEL = 418 + SYS_MSGRCV_NOCANCEL = 419 + SYS_SEM_WAIT_NOCANCEL = 420 + SYS_AIO_SUSPEND_NOCANCEL = 421 + SYS___SIGWAIT_NOCANCEL = 422 + SYS___SEMWAIT_SIGNAL_NOCANCEL = 423 + SYS___MAC_MOUNT = 424 + SYS___MAC_GET_MOUNT = 425 + SYS___MAC_GETFSSTAT = 426 + SYS_FSGETPATH = 427 + SYS_AUDIT_SESSION_SELF = 428 + SYS_AUDIT_SESSION_JOIN = 429 + SYS_FILEPORT_MAKEPORT = 430 + SYS_FILEPORT_MAKEFD = 431 + SYS_AUDIT_SESSION_PORT = 432 + SYS_PID_SUSPEND = 433 + SYS_PID_RESUME = 434 + SYS_PID_HIBERNATE = 435 + SYS_PID_SHUTDOWN_SOCKETS = 436 + SYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438 + SYS_KAS_INFO = 439 + SYS_MEMORYSTATUS_CONTROL = 440 + SYS_GUARDED_OPEN_NP = 441 + SYS_GUARDED_CLOSE_NP = 442 + SYS_GUARDED_KQUEUE_NP = 443 + SYS_CHANGE_FDGUARD_NP = 444 + SYS_PROC_RLIMIT_CONTROL = 446 + SYS_CONNECTX = 447 + SYS_DISCONNECTX = 448 + SYS_PEELOFF = 449 + SYS_SOCKET_DELEGATE = 450 + SYS_TELEMETRY = 451 + SYS_PROC_UUID_POLICY = 452 + SYS_MEMORYSTATUS_GET_LEVEL = 453 + SYS_SYSTEM_OVERRIDE = 454 + SYS_VFS_PURGE = 455 + SYS_SFI_CTL = 456 + SYS_SFI_PIDCTL = 457 + SYS_COALITION = 458 + SYS_COALITION_INFO = 459 + SYS_NECP_MATCH_POLICY = 460 + SYS_GETATTRLISTBULK = 461 + SYS_OPENAT = 463 + SYS_OPENAT_NOCANCEL = 464 + SYS_RENAMEAT = 465 + SYS_FACCESSAT = 466 + SYS_FCHMODAT = 467 + SYS_FCHOWNAT = 468 + SYS_FSTATAT = 469 + SYS_FSTATAT64 = 470 + SYS_LINKAT = 471 + SYS_UNLINKAT = 472 + SYS_READLINKAT = 473 + SYS_SYMLINKAT = 474 + SYS_MKDIRAT = 475 + SYS_GETATTRLISTAT = 476 + SYS_PROC_TRACE_LOG = 477 + SYS_BSDTHREAD_CTL = 478 + SYS_OPENBYID_NP = 479 + SYS_RECVMSG_X = 480 + SYS_SENDMSG_X = 481 + SYS_THREAD_SELFUSAGE = 482 + SYS_CSRCTL = 483 + SYS_GUARDED_OPEN_DPROTECTED_NP = 484 + SYS_GUARDED_WRITE_NP = 485 + SYS_GUARDED_PWRITE_NP = 486 + SYS_GUARDED_WRITEV_NP = 487 + SYS_RENAME_EXT = 488 + SYS_MREMAP_ENCRYPTED = 489 + SYS_MAXSYSCALL = 490 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go new file mode 100644 index 000000000..d6038fa9b --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_dragonfly_amd64.go @@ -0,0 +1,304 @@ +// mksysnum_dragonfly.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build amd64,dragonfly + +package unix + +const ( + // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int + SYS_EXIT = 1 // { void exit(int rval); } + SYS_FORK = 2 // { int fork(void); } + SYS_READ = 3 // { ssize_t read(int fd, void *buf, size_t nbyte); } + SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, size_t nbyte); } + SYS_OPEN = 5 // { int open(char *path, int flags, int mode); } + SYS_CLOSE = 6 // { int close(int fd); } + SYS_WAIT4 = 7 // { int wait4(int pid, int *status, int options, \ + SYS_LINK = 9 // { int link(char *path, char *link); } + SYS_UNLINK = 10 // { int unlink(char *path); } + SYS_CHDIR = 12 // { int chdir(char *path); } + SYS_FCHDIR = 13 // { int fchdir(int fd); } + SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); } + SYS_CHMOD = 15 // { int chmod(char *path, int mode); } + SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } + SYS_OBREAK = 17 // { int obreak(char *nsize); } break obreak_args int + SYS_GETFSSTAT = 18 // { int getfsstat(struct statfs *buf, long bufsize, \ + SYS_GETPID = 20 // { pid_t getpid(void); } + SYS_MOUNT = 21 // { int mount(char *type, char *path, int flags, \ + SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); } + SYS_SETUID = 23 // { int setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t getuid(void); } + SYS_GETEUID = 25 // { uid_t geteuid(void); } + SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, caddr_t addr, \ + SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, int flags); } + SYS_SENDMSG = 28 // { int sendmsg(int s, caddr_t msg, int flags); } + SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, size_t len, \ + SYS_ACCEPT = 30 // { int accept(int s, caddr_t name, int *anamelen); } + SYS_GETPEERNAME = 31 // { int getpeername(int fdes, caddr_t asa, int *alen); } + SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, caddr_t asa, int *alen); } + SYS_ACCESS = 33 // { int access(char *path, int flags); } + SYS_CHFLAGS = 34 // { int chflags(char *path, int flags); } + SYS_FCHFLAGS = 35 // { int fchflags(int fd, int flags); } + SYS_SYNC = 36 // { int sync(void); } + SYS_KILL = 37 // { int kill(int pid, int signum); } + SYS_GETPPID = 39 // { pid_t getppid(void); } + SYS_DUP = 41 // { int dup(u_int fd); } + SYS_PIPE = 42 // { int pipe(void); } + SYS_GETEGID = 43 // { gid_t getegid(void); } + SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, int facs, \ + SYS_GETGID = 47 // { gid_t getgid(void); } + SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int namelen); } + SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); } + SYS_ACCT = 51 // { int acct(char *path); } + SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, stack_t *oss); } + SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, caddr_t data); } + SYS_REBOOT = 55 // { int reboot(int opt); } + SYS_REVOKE = 56 // { int revoke(char *path); } + SYS_SYMLINK = 57 // { int symlink(char *path, char *link); } + SYS_READLINK = 58 // { int readlink(char *path, char *buf, int count); } + SYS_EXECVE = 59 // { int execve(char *fname, char **argv, char **envv); } + SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args int + SYS_CHROOT = 61 // { int chroot(char *path); } + SYS_MSYNC = 65 // { int msync(void *addr, size_t len, int flags); } + SYS_VFORK = 66 // { pid_t vfork(void); } + SYS_SBRK = 69 // { int sbrk(int incr); } + SYS_SSTK = 70 // { int sstk(int incr); } + SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int mprotect(void *addr, size_t len, int prot); } + SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, int behav); } + SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, gid_t *gidset); } + SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, gid_t *gidset); } + SYS_GETPGRP = 81 // { int getpgrp(void); } + SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); } + SYS_SETITIMER = 83 // { int setitimer(u_int which, struct itimerval *itv, \ + SYS_SWAPON = 85 // { int swapon(char *name); } + SYS_GETITIMER = 86 // { int getitimer(u_int which, struct itimerval *itv); } + SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); } + SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); } + SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); } + SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \ + SYS_FSYNC = 95 // { int fsync(int fd); } + SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, int prio); } + SYS_SOCKET = 97 // { int socket(int domain, int type, int protocol); } + SYS_CONNECT = 98 // { int connect(int s, caddr_t name, int namelen); } + SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); } + SYS_BIND = 104 // { int bind(int s, caddr_t name, int namelen); } + SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int listen(int s, int backlog); } + SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \ + SYS_GETRUSAGE = 117 // { int getrusage(int who, struct rusage *rusage); } + SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, u_int iovcnt); } + SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \ + SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \ + SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); } + SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); } + SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); } + SYS_SETREGID = 127 // { int setregid(int rgid, int egid); } + SYS_RENAME = 128 // { int rename(char *from, char *to); } + SYS_FLOCK = 131 // { int flock(int fd, int how); } + SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); } + SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \ + SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, int protocol, \ + SYS_MKDIR = 136 // { int mkdir(char *path, int mode); } + SYS_RMDIR = 137 // { int rmdir(char *path); } + SYS_UTIMES = 138 // { int utimes(char *path, struct timeval *tptr); } + SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \ + SYS_SETSID = 147 // { int setsid(void); } + SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \ + SYS_STATFS = 157 // { int statfs(char *path, struct statfs *buf); } + SYS_FSTATFS = 158 // { int fstatfs(int fd, struct statfs *buf); } + SYS_GETFH = 161 // { int getfh(char *fname, struct fhandle *fhp); } + SYS_GETDOMAINNAME = 162 // { int getdomainname(char *domainname, int len); } + SYS_SETDOMAINNAME = 163 // { int setdomainname(char *domainname, int len); } + SYS_UNAME = 164 // { int uname(struct utsname *name); } + SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } + SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \ + SYS_EXTPREAD = 173 // { ssize_t extpread(int fd, void *buf, \ + SYS_EXTPWRITE = 174 // { ssize_t extpwrite(int fd, const void *buf, \ + SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int setgid(gid_t gid); } + SYS_SETEGID = 182 // { int setegid(gid_t egid); } + SYS_SETEUID = 183 // { int seteuid(uid_t euid); } + SYS_PATHCONF = 191 // { int pathconf(char *path, int name); } + SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \ + SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \ + SYS_MMAP = 197 // { caddr_t mmap(caddr_t addr, size_t len, int prot, \ + // SYS_NOSYS = 198; // { int nosys(void); } __syscall __syscall_args int + SYS_LSEEK = 199 // { off_t lseek(int fd, int pad, off_t offset, \ + SYS_TRUNCATE = 200 // { int truncate(char *path, int pad, off_t length); } + SYS_FTRUNCATE = 201 // { int ftruncate(int fd, int pad, off_t length); } + SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, void *old, \ + SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int undelete(char *path); } + SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); } + SYS_GETPGID = 207 // { int getpgid(pid_t pid); } + SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \ + SYS___SEMCTL = 220 // { int __semctl(int semid, int semnum, int cmd, \ + SYS_SEMGET = 221 // { int semget(key_t key, int nsems, int semflg); } + SYS_SEMOP = 222 // { int semop(int semid, struct sembuf *sops, \ + SYS_MSGCTL = 224 // { int msgctl(int msqid, int cmd, \ + SYS_MSGGET = 225 // { int msgget(key_t key, int msgflg); } + SYS_MSGSND = 226 // { int msgsnd(int msqid, void *msgp, size_t msgsz, \ + SYS_MSGRCV = 227 // { int msgrcv(int msqid, void *msgp, size_t msgsz, \ + SYS_SHMAT = 228 // { caddr_t shmat(int shmid, const void *shmaddr, \ + SYS_SHMCTL = 229 // { int shmctl(int shmid, int cmd, \ + SYS_SHMDT = 230 // { int shmdt(const void *shmaddr); } + SYS_SHMGET = 231 // { int shmget(key_t key, size_t size, int shmflg); } + SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 233 // { int clock_settime(clockid_t clock_id, \ + SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \ + SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \ + SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, int inherit); } + SYS_RFORK = 251 // { int rfork(int flags); } + SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, u_int nfds, \ + SYS_ISSETUGID = 253 // { int issetugid(void); } + SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } + SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } + SYS_LUTIMES = 276 // { int lutimes(char *path, struct timeval *tptr); } + SYS_EXTPREADV = 289 // { ssize_t extpreadv(int fd, struct iovec *iovp, \ + SYS_EXTPWRITEV = 290 // { ssize_t extpwritev(int fd, struct iovec *iovp,\ + SYS_FHSTATFS = 297 // { int fhstatfs(const struct fhandle *u_fhp, struct statfs *buf); } + SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, int flags); } + SYS_MODNEXT = 300 // { int modnext(int modid); } + SYS_MODSTAT = 301 // { int modstat(int modid, struct module_stat* stat); } + SYS_MODFNEXT = 302 // { int modfnext(int modid); } + SYS_MODFIND = 303 // { int modfind(const char *name); } + SYS_KLDLOAD = 304 // { int kldload(const char *file); } + SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); } + SYS_KLDFIND = 306 // { int kldfind(const char *file); } + SYS_KLDNEXT = 307 // { int kldnext(int fileid); } + SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct kld_file_stat* stat); } + SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); } + SYS_GETSID = 310 // { int getsid(pid_t pid); } + SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, uid_t suid); } + SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, gid_t sgid); } + SYS_AIO_RETURN = 314 // { int aio_return(struct aiocb *aiocbp); } + SYS_AIO_SUSPEND = 315 // { int aio_suspend(struct aiocb * const * aiocbp, int nent, const struct timespec *timeout); } + SYS_AIO_CANCEL = 316 // { int aio_cancel(int fd, struct aiocb *aiocbp); } + SYS_AIO_ERROR = 317 // { int aio_error(struct aiocb *aiocbp); } + SYS_AIO_READ = 318 // { int aio_read(struct aiocb *aiocbp); } + SYS_AIO_WRITE = 319 // { int aio_write(struct aiocb *aiocbp); } + SYS_LIO_LISTIO = 320 // { int lio_listio(int mode, struct aiocb * const *acb_list, int nent, struct sigevent *sig); } + SYS_YIELD = 321 // { int yield(void); } + SYS_MLOCKALL = 324 // { int mlockall(int how); } + SYS_MUNLOCKALL = 325 // { int munlockall(void); } + SYS___GETCWD = 326 // { int __getcwd(u_char *buf, u_int buflen); } + SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, const struct sched_param *param); } + SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct sched_param *param); } + SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int policy, const struct sched_param *param); } + SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); } + SYS_SCHED_YIELD = 331 // { int sched_yield (void); } + SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); } + SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); } + SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, struct timespec *interval); } + SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); } + SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, void *data); } + SYS_JAIL = 338 // { int jail(struct jail *jail); } + SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, const sigset_t *set, \ + SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); } + SYS_SIGACTION = 342 // { int sigaction(int sig, const struct sigaction *act, \ + SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); } + SYS_SIGRETURN = 344 // { int sigreturn(ucontext_t *sigcntxp); } + SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set,\ + SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set,\ + SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \ + SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \ + SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, acl_type_t type, \ + SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, acl_type_t type, \ + SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \ + SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, acl_type_t type); } + SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \ + SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, acl_type_t type, \ + SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \ + SYS_EXTATTR_SET_FILE = 356 // { int extattr_set_file(const char *path, \ + SYS_EXTATTR_GET_FILE = 357 // { int extattr_get_file(const char *path, \ + SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \ + SYS_AIO_WAITCOMPLETE = 359 // { int aio_waitcomplete(struct aiocb **aiocbp, struct timespec *timeout); } + SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); } + SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); } + SYS_KQUEUE = 362 // { int kqueue(void); } + SYS_KEVENT = 363 // { int kevent(int fd, \ + SYS_SCTP_PEELOFF = 364 // { int sctp_peeloff(int sd, caddr_t name ); } + SYS_LCHFLAGS = 391 // { int lchflags(char *path, int flags); } + SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, int count); } + SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, size_t nbytes, \ + SYS_VARSYM_SET = 450 // { int varsym_set(int level, const char *name, const char *data); } + SYS_VARSYM_GET = 451 // { int varsym_get(int mask, const char *wild, char *buf, int bufsize); } + SYS_VARSYM_LIST = 452 // { int varsym_list(int level, char *buf, int maxsize, int *marker); } + SYS_EXEC_SYS_REGISTER = 465 // { int exec_sys_register(void *entry); } + SYS_EXEC_SYS_UNREGISTER = 466 // { int exec_sys_unregister(int id); } + SYS_SYS_CHECKPOINT = 467 // { int sys_checkpoint(int type, int fd, pid_t pid, int retval); } + SYS_MOUNTCTL = 468 // { int mountctl(const char *path, int op, int fd, const void *ctl, int ctllen, void *buf, int buflen); } + SYS_UMTX_SLEEP = 469 // { int umtx_sleep(volatile const int *ptr, int value, int timeout); } + SYS_UMTX_WAKEUP = 470 // { int umtx_wakeup(volatile const int *ptr, int count); } + SYS_JAIL_ATTACH = 471 // { int jail_attach(int jid); } + SYS_SET_TLS_AREA = 472 // { int set_tls_area(int which, struct tls_info *info, size_t infosize); } + SYS_GET_TLS_AREA = 473 // { int get_tls_area(int which, struct tls_info *info, size_t infosize); } + SYS_CLOSEFROM = 474 // { int closefrom(int fd); } + SYS_STAT = 475 // { int stat(const char *path, struct stat *ub); } + SYS_FSTAT = 476 // { int fstat(int fd, struct stat *sb); } + SYS_LSTAT = 477 // { int lstat(const char *path, struct stat *ub); } + SYS_FHSTAT = 478 // { int fhstat(const struct fhandle *u_fhp, struct stat *sb); } + SYS_GETDIRENTRIES = 479 // { int getdirentries(int fd, char *buf, u_int count, \ + SYS_GETDENTS = 480 // { int getdents(int fd, char *buf, size_t count); } + SYS_USCHED_SET = 481 // { int usched_set(pid_t pid, int cmd, void *data, \ + SYS_EXTACCEPT = 482 // { int extaccept(int s, int flags, caddr_t name, int *anamelen); } + SYS_EXTCONNECT = 483 // { int extconnect(int s, int flags, caddr_t name, int namelen); } + SYS_MCONTROL = 485 // { int mcontrol(void *addr, size_t len, int behav, off_t value); } + SYS_VMSPACE_CREATE = 486 // { int vmspace_create(void *id, int type, void *data); } + SYS_VMSPACE_DESTROY = 487 // { int vmspace_destroy(void *id); } + SYS_VMSPACE_CTL = 488 // { int vmspace_ctl(void *id, int cmd, \ + SYS_VMSPACE_MMAP = 489 // { int vmspace_mmap(void *id, void *addr, size_t len, \ + SYS_VMSPACE_MUNMAP = 490 // { int vmspace_munmap(void *id, void *addr, \ + SYS_VMSPACE_MCONTROL = 491 // { int vmspace_mcontrol(void *id, void *addr, \ + SYS_VMSPACE_PREAD = 492 // { ssize_t vmspace_pread(void *id, void *buf, \ + SYS_VMSPACE_PWRITE = 493 // { ssize_t vmspace_pwrite(void *id, const void *buf, \ + SYS_EXTEXIT = 494 // { void extexit(int how, int status, void *addr); } + SYS_LWP_CREATE = 495 // { int lwp_create(struct lwp_params *params); } + SYS_LWP_GETTID = 496 // { lwpid_t lwp_gettid(void); } + SYS_LWP_KILL = 497 // { int lwp_kill(pid_t pid, lwpid_t tid, int signum); } + SYS_LWP_RTPRIO = 498 // { int lwp_rtprio(int function, pid_t pid, lwpid_t tid, struct rtprio *rtp); } + SYS_PSELECT = 499 // { int pselect(int nd, fd_set *in, fd_set *ou, \ + SYS_STATVFS = 500 // { int statvfs(const char *path, struct statvfs *buf); } + SYS_FSTATVFS = 501 // { int fstatvfs(int fd, struct statvfs *buf); } + SYS_FHSTATVFS = 502 // { int fhstatvfs(const struct fhandle *u_fhp, struct statvfs *buf); } + SYS_GETVFSSTAT = 503 // { int getvfsstat(struct statfs *buf, \ + SYS_OPENAT = 504 // { int openat(int fd, char *path, int flags, int mode); } + SYS_FSTATAT = 505 // { int fstatat(int fd, char *path, \ + SYS_FCHMODAT = 506 // { int fchmodat(int fd, char *path, int mode, \ + SYS_FCHOWNAT = 507 // { int fchownat(int fd, char *path, int uid, int gid, \ + SYS_UNLINKAT = 508 // { int unlinkat(int fd, char *path, int flags); } + SYS_FACCESSAT = 509 // { int faccessat(int fd, char *path, int amode, \ + SYS_MQ_OPEN = 510 // { mqd_t mq_open(const char * name, int oflag, \ + SYS_MQ_CLOSE = 511 // { int mq_close(mqd_t mqdes); } + SYS_MQ_UNLINK = 512 // { int mq_unlink(const char *name); } + SYS_MQ_GETATTR = 513 // { int mq_getattr(mqd_t mqdes, \ + SYS_MQ_SETATTR = 514 // { int mq_setattr(mqd_t mqdes, \ + SYS_MQ_NOTIFY = 515 // { int mq_notify(mqd_t mqdes, \ + SYS_MQ_SEND = 516 // { int mq_send(mqd_t mqdes, const char *msg_ptr, \ + SYS_MQ_RECEIVE = 517 // { ssize_t mq_receive(mqd_t mqdes, char *msg_ptr, \ + SYS_MQ_TIMEDSEND = 518 // { int mq_timedsend(mqd_t mqdes, \ + SYS_MQ_TIMEDRECEIVE = 519 // { ssize_t mq_timedreceive(mqd_t mqdes, \ + SYS_IOPRIO_SET = 520 // { int ioprio_set(int which, int who, int prio); } + SYS_IOPRIO_GET = 521 // { int ioprio_get(int which, int who); } + SYS_CHROOT_KERNEL = 522 // { int chroot_kernel(char *path); } + SYS_RENAMEAT = 523 // { int renameat(int oldfd, char *old, int newfd, \ + SYS_MKDIRAT = 524 // { int mkdirat(int fd, char *path, mode_t mode); } + SYS_MKFIFOAT = 525 // { int mkfifoat(int fd, char *path, mode_t mode); } + SYS_MKNODAT = 526 // { int mknodat(int fd, char *path, mode_t mode, \ + SYS_READLINKAT = 527 // { int readlinkat(int fd, char *path, char *buf, \ + SYS_SYMLINKAT = 528 // { int symlinkat(char *path1, int fd, char *path2); } + SYS_SWAPOFF = 529 // { int swapoff(char *name); } + SYS_VQUOTACTL = 530 // { int vquotactl(const char *path, \ + SYS_LINKAT = 531 // { int linkat(int fd1, char *path1, int fd2, \ + SYS_EACCESS = 532 // { int eaccess(char *path, int flags); } + SYS_LPATHCONF = 533 // { int lpathconf(char *path, int name); } + SYS_VMM_GUEST_CTL = 534 // { int vmm_guest_ctl(int op, struct vmm_guest_options *options); } + SYS_VMM_GUEST_SYNC_ADDR = 535 // { int vmm_guest_sync_addr(long *dstaddr, long *srcaddr); } +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go new file mode 100644 index 000000000..262a84536 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_386.go @@ -0,0 +1,351 @@ +// mksysnum_freebsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build 386,freebsd + +package unix + +const ( + // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int + SYS_EXIT = 1 // { void sys_exit(int rval); } exit \ + SYS_FORK = 2 // { int fork(void); } + SYS_READ = 3 // { ssize_t read(int fd, void *buf, \ + SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \ + SYS_OPEN = 5 // { int open(char *path, int flags, int mode); } + SYS_CLOSE = 6 // { int close(int fd); } + SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \ + SYS_LINK = 9 // { int link(char *path, char *link); } + SYS_UNLINK = 10 // { int unlink(char *path); } + SYS_CHDIR = 12 // { int chdir(char *path); } + SYS_FCHDIR = 13 // { int fchdir(int fd); } + SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); } + SYS_CHMOD = 15 // { int chmod(char *path, int mode); } + SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } + SYS_OBREAK = 17 // { int obreak(char *nsize); } break \ + SYS_GETPID = 20 // { pid_t getpid(void); } + SYS_MOUNT = 21 // { int mount(char *type, char *path, \ + SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); } + SYS_SETUID = 23 // { int setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t getuid(void); } + SYS_GETEUID = 25 // { uid_t geteuid(void); } + SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \ + SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \ + SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \ + SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \ + SYS_ACCEPT = 30 // { int accept(int s, \ + SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \ + SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \ + SYS_ACCESS = 33 // { int access(char *path, int amode); } + SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); } + SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); } + SYS_SYNC = 36 // { int sync(void); } + SYS_KILL = 37 // { int kill(int pid, int signum); } + SYS_GETPPID = 39 // { pid_t getppid(void); } + SYS_DUP = 41 // { int dup(u_int fd); } + SYS_PIPE = 42 // { int pipe(void); } + SYS_GETEGID = 43 // { gid_t getegid(void); } + SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \ + SYS_GETGID = 47 // { gid_t getgid(void); } + SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \ + SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); } + SYS_ACCT = 51 // { int acct(char *path); } + SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \ + SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \ + SYS_REBOOT = 55 // { int reboot(int opt); } + SYS_REVOKE = 56 // { int revoke(char *path); } + SYS_SYMLINK = 57 // { int symlink(char *path, char *link); } + SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \ + SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \ + SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \ + SYS_CHROOT = 61 // { int chroot(char *path); } + SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \ + SYS_VFORK = 66 // { int vfork(void); } + SYS_SBRK = 69 // { int sbrk(int incr); } + SYS_SSTK = 70 // { int sstk(int incr); } + SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \ + SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \ + SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \ + SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \ + SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \ + SYS_GETPGRP = 81 // { int getpgrp(void); } + SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); } + SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \ + SYS_SWAPON = 85 // { int swapon(char *name); } + SYS_GETITIMER = 86 // { int getitimer(u_int which, \ + SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); } + SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); } + SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); } + SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \ + SYS_FSYNC = 95 // { int fsync(int fd); } + SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \ + SYS_SOCKET = 97 // { int socket(int domain, int type, \ + SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \ + SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); } + SYS_BIND = 104 // { int bind(int s, caddr_t name, \ + SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int listen(int s, int backlog); } + SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \ + SYS_GETRUSAGE = 117 // { int getrusage(int who, \ + SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \ + SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \ + SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \ + SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); } + SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); } + SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); } + SYS_SETREGID = 127 // { int setregid(int rgid, int egid); } + SYS_RENAME = 128 // { int rename(char *from, char *to); } + SYS_FLOCK = 131 // { int flock(int fd, int how); } + SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); } + SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \ + SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \ + SYS_MKDIR = 136 // { int mkdir(char *path, int mode); } + SYS_RMDIR = 137 // { int rmdir(char *path); } + SYS_UTIMES = 138 // { int utimes(char *path, \ + SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \ + SYS_SETSID = 147 // { int setsid(void); } + SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \ + SYS_LGETFH = 160 // { int lgetfh(char *fname, \ + SYS_GETFH = 161 // { int getfh(char *fname, \ + SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } + SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \ + SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \ + SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \ + SYS_SETFIB = 175 // { int setfib(int fibnum); } + SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int setgid(gid_t gid); } + SYS_SETEGID = 182 // { int setegid(gid_t egid); } + SYS_SETEUID = 183 // { int seteuid(uid_t euid); } + SYS_STAT = 188 // { int stat(char *path, struct stat *ub); } + SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); } + SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); } + SYS_PATHCONF = 191 // { int pathconf(char *path, int name); } + SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \ + SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \ + SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \ + SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \ + SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \ + SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \ + SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \ + SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \ + SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int undelete(char *path); } + SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); } + SYS_GETPGID = 207 // { int getpgid(pid_t pid); } + SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \ + SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 233 // { int clock_settime( \ + SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \ + SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \ + SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); } + SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \ + SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \ + SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); } + SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \ + SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); } + SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \ + SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \ + SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\ + SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); } + SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \ + SYS_RFORK = 251 // { int rfork(int flags); } + SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \ + SYS_ISSETUGID = 253 // { int issetugid(void); } + SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } + SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \ + SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } + SYS_LUTIMES = 276 // { int lutimes(char *path, \ + SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); } + SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); } + SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); } + SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \ + SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \ + SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \ + SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \ + SYS_MODNEXT = 300 // { int modnext(int modid); } + SYS_MODSTAT = 301 // { int modstat(int modid, \ + SYS_MODFNEXT = 302 // { int modfnext(int modid); } + SYS_MODFIND = 303 // { int modfind(const char *name); } + SYS_KLDLOAD = 304 // { int kldload(const char *file); } + SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); } + SYS_KLDFIND = 306 // { int kldfind(const char *file); } + SYS_KLDNEXT = 307 // { int kldnext(int fileid); } + SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \ + SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); } + SYS_GETSID = 310 // { int getsid(pid_t pid); } + SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \ + SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \ + SYS_YIELD = 321 // { int yield(void); } + SYS_MLOCKALL = 324 // { int mlockall(int how); } + SYS_MUNLOCKALL = 325 // { int munlockall(void); } + SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); } + SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \ + SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \ + SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \ + SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); } + SYS_SCHED_YIELD = 331 // { int sched_yield (void); } + SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); } + SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); } + SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \ + SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); } + SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \ + SYS_JAIL = 338 // { int jail(struct jail *jail); } + SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \ + SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); } + SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); } + SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \ + SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \ + SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \ + SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \ + SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \ + SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \ + SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \ + SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \ + SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \ + SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \ + SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \ + SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \ + SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \ + SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \ + SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \ + SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \ + SYS_KQUEUE = 362 // { int kqueue(void); } + SYS_KEVENT = 363 // { int kevent(int fd, \ + SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \ + SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \ + SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \ + SYS___SETUGID = 374 // { int __setugid(int flag); } + SYS_EACCESS = 376 // { int eaccess(char *path, int amode); } + SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \ + SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); } + SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); } + SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \ + SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \ + SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \ + SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \ + SYS_KENV = 390 // { int kenv(int what, const char *name, \ + SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \ + SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \ + SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \ + SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \ + SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \ + SYS_STATFS = 396 // { int statfs(char *path, \ + SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \ + SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \ + SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \ + SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \ + SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \ + SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \ + SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \ + SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \ + SYS_SIGACTION = 416 // { int sigaction(int sig, \ + SYS_SIGRETURN = 417 // { int sigreturn( \ + SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); } + SYS_SETCONTEXT = 422 // { int setcontext( \ + SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \ + SYS_SWAPOFF = 424 // { int swapoff(const char *name); } + SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \ + SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \ + SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \ + SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \ + SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \ + SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \ + SYS_THR_EXIT = 431 // { void thr_exit(long *state); } + SYS_THR_SELF = 432 // { int thr_self(long *id); } + SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); } + SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); } + SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); } + SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); } + SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \ + SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \ + SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \ + SYS_THR_SUSPEND = 442 // { int thr_suspend( \ + SYS_THR_WAKE = 443 // { int thr_wake(long id); } + SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); } + SYS_AUDIT = 445 // { int audit(const void *record, \ + SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \ + SYS_GETAUID = 447 // { int getauid(uid_t *auid); } + SYS_SETAUID = 448 // { int setauid(uid_t *auid); } + SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); } + SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); } + SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \ + SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \ + SYS_AUDITCTL = 453 // { int auditctl(char *path); } + SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \ + SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \ + SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); } + SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); } + SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); } + SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \ + SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); } + SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ + SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \ + SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ + SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \ + SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \ + SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \ + SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \ + SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); } + SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); } + SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); } + SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \ + SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); } + SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); } + SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \ + SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \ + SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \ + SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \ + SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \ + SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \ + SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \ + SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \ + SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \ + SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \ + SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \ + SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); } + SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); } + SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \ + SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \ + SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \ + SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \ + SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \ + SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); } + SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); } + SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \ + SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \ + SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); } + SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); } + SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); } + SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); } + SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \ + SYS_CAP_ENTER = 516 // { int cap_enter(void); } + SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); } + SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); } + SYS_PDKILL = 519 // { int pdkill(int fd, int signum); } + SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); } + SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \ + SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \ + SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); } + SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \ + SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \ + SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \ + SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \ + SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \ + SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \ + SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \ + SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \ + SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \ + SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \ + SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \ + SYS_ACCEPT4 = 541 // { int accept4(int s, \ + SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); } + SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \ + SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \ +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go new file mode 100644 index 000000000..57a60ea12 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_amd64.go @@ -0,0 +1,351 @@ +// mksysnum_freebsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build amd64,freebsd + +package unix + +const ( + // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int + SYS_EXIT = 1 // { void sys_exit(int rval); } exit \ + SYS_FORK = 2 // { int fork(void); } + SYS_READ = 3 // { ssize_t read(int fd, void *buf, \ + SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \ + SYS_OPEN = 5 // { int open(char *path, int flags, int mode); } + SYS_CLOSE = 6 // { int close(int fd); } + SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \ + SYS_LINK = 9 // { int link(char *path, char *link); } + SYS_UNLINK = 10 // { int unlink(char *path); } + SYS_CHDIR = 12 // { int chdir(char *path); } + SYS_FCHDIR = 13 // { int fchdir(int fd); } + SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); } + SYS_CHMOD = 15 // { int chmod(char *path, int mode); } + SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } + SYS_OBREAK = 17 // { int obreak(char *nsize); } break \ + SYS_GETPID = 20 // { pid_t getpid(void); } + SYS_MOUNT = 21 // { int mount(char *type, char *path, \ + SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); } + SYS_SETUID = 23 // { int setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t getuid(void); } + SYS_GETEUID = 25 // { uid_t geteuid(void); } + SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \ + SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \ + SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \ + SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \ + SYS_ACCEPT = 30 // { int accept(int s, \ + SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \ + SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \ + SYS_ACCESS = 33 // { int access(char *path, int amode); } + SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); } + SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); } + SYS_SYNC = 36 // { int sync(void); } + SYS_KILL = 37 // { int kill(int pid, int signum); } + SYS_GETPPID = 39 // { pid_t getppid(void); } + SYS_DUP = 41 // { int dup(u_int fd); } + SYS_PIPE = 42 // { int pipe(void); } + SYS_GETEGID = 43 // { gid_t getegid(void); } + SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \ + SYS_GETGID = 47 // { gid_t getgid(void); } + SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \ + SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); } + SYS_ACCT = 51 // { int acct(char *path); } + SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \ + SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \ + SYS_REBOOT = 55 // { int reboot(int opt); } + SYS_REVOKE = 56 // { int revoke(char *path); } + SYS_SYMLINK = 57 // { int symlink(char *path, char *link); } + SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \ + SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \ + SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \ + SYS_CHROOT = 61 // { int chroot(char *path); } + SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \ + SYS_VFORK = 66 // { int vfork(void); } + SYS_SBRK = 69 // { int sbrk(int incr); } + SYS_SSTK = 70 // { int sstk(int incr); } + SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \ + SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \ + SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \ + SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \ + SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \ + SYS_GETPGRP = 81 // { int getpgrp(void); } + SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); } + SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \ + SYS_SWAPON = 85 // { int swapon(char *name); } + SYS_GETITIMER = 86 // { int getitimer(u_int which, \ + SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); } + SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); } + SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); } + SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \ + SYS_FSYNC = 95 // { int fsync(int fd); } + SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \ + SYS_SOCKET = 97 // { int socket(int domain, int type, \ + SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \ + SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); } + SYS_BIND = 104 // { int bind(int s, caddr_t name, \ + SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int listen(int s, int backlog); } + SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \ + SYS_GETRUSAGE = 117 // { int getrusage(int who, \ + SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \ + SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \ + SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \ + SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); } + SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); } + SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); } + SYS_SETREGID = 127 // { int setregid(int rgid, int egid); } + SYS_RENAME = 128 // { int rename(char *from, char *to); } + SYS_FLOCK = 131 // { int flock(int fd, int how); } + SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); } + SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \ + SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \ + SYS_MKDIR = 136 // { int mkdir(char *path, int mode); } + SYS_RMDIR = 137 // { int rmdir(char *path); } + SYS_UTIMES = 138 // { int utimes(char *path, \ + SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \ + SYS_SETSID = 147 // { int setsid(void); } + SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \ + SYS_LGETFH = 160 // { int lgetfh(char *fname, \ + SYS_GETFH = 161 // { int getfh(char *fname, \ + SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } + SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \ + SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \ + SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \ + SYS_SETFIB = 175 // { int setfib(int fibnum); } + SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int setgid(gid_t gid); } + SYS_SETEGID = 182 // { int setegid(gid_t egid); } + SYS_SETEUID = 183 // { int seteuid(uid_t euid); } + SYS_STAT = 188 // { int stat(char *path, struct stat *ub); } + SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); } + SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); } + SYS_PATHCONF = 191 // { int pathconf(char *path, int name); } + SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \ + SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \ + SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \ + SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \ + SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \ + SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \ + SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \ + SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \ + SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int undelete(char *path); } + SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); } + SYS_GETPGID = 207 // { int getpgid(pid_t pid); } + SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \ + SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 233 // { int clock_settime( \ + SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \ + SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \ + SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); } + SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \ + SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \ + SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); } + SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \ + SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); } + SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \ + SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \ + SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\ + SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); } + SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \ + SYS_RFORK = 251 // { int rfork(int flags); } + SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \ + SYS_ISSETUGID = 253 // { int issetugid(void); } + SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } + SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \ + SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } + SYS_LUTIMES = 276 // { int lutimes(char *path, \ + SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); } + SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); } + SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); } + SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \ + SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \ + SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \ + SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \ + SYS_MODNEXT = 300 // { int modnext(int modid); } + SYS_MODSTAT = 301 // { int modstat(int modid, \ + SYS_MODFNEXT = 302 // { int modfnext(int modid); } + SYS_MODFIND = 303 // { int modfind(const char *name); } + SYS_KLDLOAD = 304 // { int kldload(const char *file); } + SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); } + SYS_KLDFIND = 306 // { int kldfind(const char *file); } + SYS_KLDNEXT = 307 // { int kldnext(int fileid); } + SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \ + SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); } + SYS_GETSID = 310 // { int getsid(pid_t pid); } + SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \ + SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \ + SYS_YIELD = 321 // { int yield(void); } + SYS_MLOCKALL = 324 // { int mlockall(int how); } + SYS_MUNLOCKALL = 325 // { int munlockall(void); } + SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); } + SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \ + SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \ + SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \ + SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); } + SYS_SCHED_YIELD = 331 // { int sched_yield (void); } + SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); } + SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); } + SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \ + SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); } + SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \ + SYS_JAIL = 338 // { int jail(struct jail *jail); } + SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \ + SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); } + SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); } + SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \ + SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \ + SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \ + SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \ + SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \ + SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \ + SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \ + SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \ + SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \ + SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \ + SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \ + SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \ + SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \ + SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \ + SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \ + SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \ + SYS_KQUEUE = 362 // { int kqueue(void); } + SYS_KEVENT = 363 // { int kevent(int fd, \ + SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \ + SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \ + SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \ + SYS___SETUGID = 374 // { int __setugid(int flag); } + SYS_EACCESS = 376 // { int eaccess(char *path, int amode); } + SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \ + SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); } + SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); } + SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \ + SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \ + SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \ + SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \ + SYS_KENV = 390 // { int kenv(int what, const char *name, \ + SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \ + SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \ + SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \ + SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \ + SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \ + SYS_STATFS = 396 // { int statfs(char *path, \ + SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \ + SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \ + SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \ + SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \ + SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \ + SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \ + SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \ + SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \ + SYS_SIGACTION = 416 // { int sigaction(int sig, \ + SYS_SIGRETURN = 417 // { int sigreturn( \ + SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); } + SYS_SETCONTEXT = 422 // { int setcontext( \ + SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \ + SYS_SWAPOFF = 424 // { int swapoff(const char *name); } + SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \ + SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \ + SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \ + SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \ + SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \ + SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \ + SYS_THR_EXIT = 431 // { void thr_exit(long *state); } + SYS_THR_SELF = 432 // { int thr_self(long *id); } + SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); } + SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); } + SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); } + SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); } + SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \ + SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \ + SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \ + SYS_THR_SUSPEND = 442 // { int thr_suspend( \ + SYS_THR_WAKE = 443 // { int thr_wake(long id); } + SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); } + SYS_AUDIT = 445 // { int audit(const void *record, \ + SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \ + SYS_GETAUID = 447 // { int getauid(uid_t *auid); } + SYS_SETAUID = 448 // { int setauid(uid_t *auid); } + SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); } + SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); } + SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \ + SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \ + SYS_AUDITCTL = 453 // { int auditctl(char *path); } + SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \ + SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \ + SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); } + SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); } + SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); } + SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \ + SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); } + SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ + SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \ + SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ + SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \ + SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \ + SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \ + SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \ + SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); } + SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); } + SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); } + SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \ + SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); } + SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); } + SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \ + SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \ + SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \ + SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \ + SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \ + SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \ + SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \ + SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \ + SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \ + SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \ + SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \ + SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); } + SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); } + SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \ + SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \ + SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \ + SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \ + SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \ + SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); } + SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); } + SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \ + SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \ + SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); } + SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); } + SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); } + SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); } + SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \ + SYS_CAP_ENTER = 516 // { int cap_enter(void); } + SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); } + SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); } + SYS_PDKILL = 519 // { int pdkill(int fd, int signum); } + SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); } + SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \ + SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \ + SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); } + SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \ + SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \ + SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \ + SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \ + SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \ + SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \ + SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \ + SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \ + SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \ + SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \ + SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \ + SYS_ACCEPT4 = 541 // { int accept4(int s, \ + SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); } + SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \ + SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \ +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go new file mode 100644 index 000000000..206b9f612 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_freebsd_arm.go @@ -0,0 +1,351 @@ +// mksysnum_freebsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build arm,freebsd + +package unix + +const ( + // SYS_NOSYS = 0; // { int nosys(void); } syscall nosys_args int + SYS_EXIT = 1 // { void sys_exit(int rval); } exit \ + SYS_FORK = 2 // { int fork(void); } + SYS_READ = 3 // { ssize_t read(int fd, void *buf, \ + SYS_WRITE = 4 // { ssize_t write(int fd, const void *buf, \ + SYS_OPEN = 5 // { int open(char *path, int flags, int mode); } + SYS_CLOSE = 6 // { int close(int fd); } + SYS_WAIT4 = 7 // { int wait4(int pid, int *status, \ + SYS_LINK = 9 // { int link(char *path, char *link); } + SYS_UNLINK = 10 // { int unlink(char *path); } + SYS_CHDIR = 12 // { int chdir(char *path); } + SYS_FCHDIR = 13 // { int fchdir(int fd); } + SYS_MKNOD = 14 // { int mknod(char *path, int mode, int dev); } + SYS_CHMOD = 15 // { int chmod(char *path, int mode); } + SYS_CHOWN = 16 // { int chown(char *path, int uid, int gid); } + SYS_OBREAK = 17 // { int obreak(char *nsize); } break \ + SYS_GETPID = 20 // { pid_t getpid(void); } + SYS_MOUNT = 21 // { int mount(char *type, char *path, \ + SYS_UNMOUNT = 22 // { int unmount(char *path, int flags); } + SYS_SETUID = 23 // { int setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t getuid(void); } + SYS_GETEUID = 25 // { uid_t geteuid(void); } + SYS_PTRACE = 26 // { int ptrace(int req, pid_t pid, \ + SYS_RECVMSG = 27 // { int recvmsg(int s, struct msghdr *msg, \ + SYS_SENDMSG = 28 // { int sendmsg(int s, struct msghdr *msg, \ + SYS_RECVFROM = 29 // { int recvfrom(int s, caddr_t buf, \ + SYS_ACCEPT = 30 // { int accept(int s, \ + SYS_GETPEERNAME = 31 // { int getpeername(int fdes, \ + SYS_GETSOCKNAME = 32 // { int getsockname(int fdes, \ + SYS_ACCESS = 33 // { int access(char *path, int amode); } + SYS_CHFLAGS = 34 // { int chflags(const char *path, u_long flags); } + SYS_FCHFLAGS = 35 // { int fchflags(int fd, u_long flags); } + SYS_SYNC = 36 // { int sync(void); } + SYS_KILL = 37 // { int kill(int pid, int signum); } + SYS_GETPPID = 39 // { pid_t getppid(void); } + SYS_DUP = 41 // { int dup(u_int fd); } + SYS_PIPE = 42 // { int pipe(void); } + SYS_GETEGID = 43 // { gid_t getegid(void); } + SYS_PROFIL = 44 // { int profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int ktrace(const char *fname, int ops, \ + SYS_GETGID = 47 // { gid_t getgid(void); } + SYS_GETLOGIN = 49 // { int getlogin(char *namebuf, u_int \ + SYS_SETLOGIN = 50 // { int setlogin(char *namebuf); } + SYS_ACCT = 51 // { int acct(char *path); } + SYS_SIGALTSTACK = 53 // { int sigaltstack(stack_t *ss, \ + SYS_IOCTL = 54 // { int ioctl(int fd, u_long com, \ + SYS_REBOOT = 55 // { int reboot(int opt); } + SYS_REVOKE = 56 // { int revoke(char *path); } + SYS_SYMLINK = 57 // { int symlink(char *path, char *link); } + SYS_READLINK = 58 // { ssize_t readlink(char *path, char *buf, \ + SYS_EXECVE = 59 // { int execve(char *fname, char **argv, \ + SYS_UMASK = 60 // { int umask(int newmask); } umask umask_args \ + SYS_CHROOT = 61 // { int chroot(char *path); } + SYS_MSYNC = 65 // { int msync(void *addr, size_t len, \ + SYS_VFORK = 66 // { int vfork(void); } + SYS_SBRK = 69 // { int sbrk(int incr); } + SYS_SSTK = 70 // { int sstk(int incr); } + SYS_OVADVISE = 72 // { int ovadvise(int anom); } vadvise \ + SYS_MUNMAP = 73 // { int munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int mprotect(const void *addr, size_t len, \ + SYS_MADVISE = 75 // { int madvise(void *addr, size_t len, \ + SYS_MINCORE = 78 // { int mincore(const void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int getgroups(u_int gidsetsize, \ + SYS_SETGROUPS = 80 // { int setgroups(u_int gidsetsize, \ + SYS_GETPGRP = 81 // { int getpgrp(void); } + SYS_SETPGID = 82 // { int setpgid(int pid, int pgid); } + SYS_SETITIMER = 83 // { int setitimer(u_int which, struct \ + SYS_SWAPON = 85 // { int swapon(char *name); } + SYS_GETITIMER = 86 // { int getitimer(u_int which, \ + SYS_GETDTABLESIZE = 89 // { int getdtablesize(void); } + SYS_DUP2 = 90 // { int dup2(u_int from, u_int to); } + SYS_FCNTL = 92 // { int fcntl(int fd, int cmd, long arg); } + SYS_SELECT = 93 // { int select(int nd, fd_set *in, fd_set *ou, \ + SYS_FSYNC = 95 // { int fsync(int fd); } + SYS_SETPRIORITY = 96 // { int setpriority(int which, int who, \ + SYS_SOCKET = 97 // { int socket(int domain, int type, \ + SYS_CONNECT = 98 // { int connect(int s, caddr_t name, \ + SYS_GETPRIORITY = 100 // { int getpriority(int which, int who); } + SYS_BIND = 104 // { int bind(int s, caddr_t name, \ + SYS_SETSOCKOPT = 105 // { int setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int listen(int s, int backlog); } + SYS_GETTIMEOFDAY = 116 // { int gettimeofday(struct timeval *tp, \ + SYS_GETRUSAGE = 117 // { int getrusage(int who, \ + SYS_GETSOCKOPT = 118 // { int getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { int readv(int fd, struct iovec *iovp, \ + SYS_WRITEV = 121 // { int writev(int fd, struct iovec *iovp, \ + SYS_SETTIMEOFDAY = 122 // { int settimeofday(struct timeval *tv, \ + SYS_FCHOWN = 123 // { int fchown(int fd, int uid, int gid); } + SYS_FCHMOD = 124 // { int fchmod(int fd, int mode); } + SYS_SETREUID = 126 // { int setreuid(int ruid, int euid); } + SYS_SETREGID = 127 // { int setregid(int rgid, int egid); } + SYS_RENAME = 128 // { int rename(char *from, char *to); } + SYS_FLOCK = 131 // { int flock(int fd, int how); } + SYS_MKFIFO = 132 // { int mkfifo(char *path, int mode); } + SYS_SENDTO = 133 // { int sendto(int s, caddr_t buf, size_t len, \ + SYS_SHUTDOWN = 134 // { int shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int socketpair(int domain, int type, \ + SYS_MKDIR = 136 // { int mkdir(char *path, int mode); } + SYS_RMDIR = 137 // { int rmdir(char *path); } + SYS_UTIMES = 138 // { int utimes(char *path, \ + SYS_ADJTIME = 140 // { int adjtime(struct timeval *delta, \ + SYS_SETSID = 147 // { int setsid(void); } + SYS_QUOTACTL = 148 // { int quotactl(char *path, int cmd, int uid, \ + SYS_LGETFH = 160 // { int lgetfh(char *fname, \ + SYS_GETFH = 161 // { int getfh(char *fname, \ + SYS_SYSARCH = 165 // { int sysarch(int op, char *parms); } + SYS_RTPRIO = 166 // { int rtprio(int function, pid_t pid, \ + SYS_FREEBSD6_PREAD = 173 // { ssize_t freebsd6_pread(int fd, void *buf, \ + SYS_FREEBSD6_PWRITE = 174 // { ssize_t freebsd6_pwrite(int fd, \ + SYS_SETFIB = 175 // { int setfib(int fibnum); } + SYS_NTP_ADJTIME = 176 // { int ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int setgid(gid_t gid); } + SYS_SETEGID = 182 // { int setegid(gid_t egid); } + SYS_SETEUID = 183 // { int seteuid(uid_t euid); } + SYS_STAT = 188 // { int stat(char *path, struct stat *ub); } + SYS_FSTAT = 189 // { int fstat(int fd, struct stat *sb); } + SYS_LSTAT = 190 // { int lstat(char *path, struct stat *ub); } + SYS_PATHCONF = 191 // { int pathconf(char *path, int name); } + SYS_FPATHCONF = 192 // { int fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int getrlimit(u_int which, \ + SYS_SETRLIMIT = 195 // { int setrlimit(u_int which, \ + SYS_GETDIRENTRIES = 196 // { int getdirentries(int fd, char *buf, \ + SYS_FREEBSD6_MMAP = 197 // { caddr_t freebsd6_mmap(caddr_t addr, \ + SYS_FREEBSD6_LSEEK = 199 // { off_t freebsd6_lseek(int fd, int pad, \ + SYS_FREEBSD6_TRUNCATE = 200 // { int freebsd6_truncate(char *path, int pad, \ + SYS_FREEBSD6_FTRUNCATE = 201 // { int freebsd6_ftruncate(int fd, int pad, \ + SYS___SYSCTL = 202 // { int __sysctl(int *name, u_int namelen, \ + SYS_MLOCK = 203 // { int mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int undelete(char *path); } + SYS_FUTIMES = 206 // { int futimes(int fd, struct timeval *tptr); } + SYS_GETPGID = 207 // { int getpgid(pid_t pid); } + SYS_POLL = 209 // { int poll(struct pollfd *fds, u_int nfds, \ + SYS_CLOCK_GETTIME = 232 // { int clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 233 // { int clock_settime( \ + SYS_CLOCK_GETRES = 234 // { int clock_getres(clockid_t clock_id, \ + SYS_KTIMER_CREATE = 235 // { int ktimer_create(clockid_t clock_id, \ + SYS_KTIMER_DELETE = 236 // { int ktimer_delete(int timerid); } + SYS_KTIMER_SETTIME = 237 // { int ktimer_settime(int timerid, int flags, \ + SYS_KTIMER_GETTIME = 238 // { int ktimer_gettime(int timerid, struct \ + SYS_KTIMER_GETOVERRUN = 239 // { int ktimer_getoverrun(int timerid); } + SYS_NANOSLEEP = 240 // { int nanosleep(const struct timespec *rqtp, \ + SYS_FFCLOCK_GETCOUNTER = 241 // { int ffclock_getcounter(ffcounter *ffcount); } + SYS_FFCLOCK_SETESTIMATE = 242 // { int ffclock_setestimate( \ + SYS_FFCLOCK_GETESTIMATE = 243 // { int ffclock_getestimate( \ + SYS_CLOCK_GETCPUCLOCKID2 = 247 // { int clock_getcpuclockid2(id_t id,\ + SYS_NTP_GETTIME = 248 // { int ntp_gettime(struct ntptimeval *ntvp); } + SYS_MINHERIT = 250 // { int minherit(void *addr, size_t len, \ + SYS_RFORK = 251 // { int rfork(int flags); } + SYS_OPENBSD_POLL = 252 // { int openbsd_poll(struct pollfd *fds, \ + SYS_ISSETUGID = 253 // { int issetugid(void); } + SYS_LCHOWN = 254 // { int lchown(char *path, int uid, int gid); } + SYS_GETDENTS = 272 // { int getdents(int fd, char *buf, \ + SYS_LCHMOD = 274 // { int lchmod(char *path, mode_t mode); } + SYS_LUTIMES = 276 // { int lutimes(char *path, \ + SYS_NSTAT = 278 // { int nstat(char *path, struct nstat *ub); } + SYS_NFSTAT = 279 // { int nfstat(int fd, struct nstat *sb); } + SYS_NLSTAT = 280 // { int nlstat(char *path, struct nstat *ub); } + SYS_PREADV = 289 // { ssize_t preadv(int fd, struct iovec *iovp, \ + SYS_PWRITEV = 290 // { ssize_t pwritev(int fd, struct iovec *iovp, \ + SYS_FHOPEN = 298 // { int fhopen(const struct fhandle *u_fhp, \ + SYS_FHSTAT = 299 // { int fhstat(const struct fhandle *u_fhp, \ + SYS_MODNEXT = 300 // { int modnext(int modid); } + SYS_MODSTAT = 301 // { int modstat(int modid, \ + SYS_MODFNEXT = 302 // { int modfnext(int modid); } + SYS_MODFIND = 303 // { int modfind(const char *name); } + SYS_KLDLOAD = 304 // { int kldload(const char *file); } + SYS_KLDUNLOAD = 305 // { int kldunload(int fileid); } + SYS_KLDFIND = 306 // { int kldfind(const char *file); } + SYS_KLDNEXT = 307 // { int kldnext(int fileid); } + SYS_KLDSTAT = 308 // { int kldstat(int fileid, struct \ + SYS_KLDFIRSTMOD = 309 // { int kldfirstmod(int fileid); } + SYS_GETSID = 310 // { int getsid(pid_t pid); } + SYS_SETRESUID = 311 // { int setresuid(uid_t ruid, uid_t euid, \ + SYS_SETRESGID = 312 // { int setresgid(gid_t rgid, gid_t egid, \ + SYS_YIELD = 321 // { int yield(void); } + SYS_MLOCKALL = 324 // { int mlockall(int how); } + SYS_MUNLOCKALL = 325 // { int munlockall(void); } + SYS___GETCWD = 326 // { int __getcwd(char *buf, u_int buflen); } + SYS_SCHED_SETPARAM = 327 // { int sched_setparam (pid_t pid, \ + SYS_SCHED_GETPARAM = 328 // { int sched_getparam (pid_t pid, struct \ + SYS_SCHED_SETSCHEDULER = 329 // { int sched_setscheduler (pid_t pid, int \ + SYS_SCHED_GETSCHEDULER = 330 // { int sched_getscheduler (pid_t pid); } + SYS_SCHED_YIELD = 331 // { int sched_yield (void); } + SYS_SCHED_GET_PRIORITY_MAX = 332 // { int sched_get_priority_max (int policy); } + SYS_SCHED_GET_PRIORITY_MIN = 333 // { int sched_get_priority_min (int policy); } + SYS_SCHED_RR_GET_INTERVAL = 334 // { int sched_rr_get_interval (pid_t pid, \ + SYS_UTRACE = 335 // { int utrace(const void *addr, size_t len); } + SYS_KLDSYM = 337 // { int kldsym(int fileid, int cmd, \ + SYS_JAIL = 338 // { int jail(struct jail *jail); } + SYS_SIGPROCMASK = 340 // { int sigprocmask(int how, \ + SYS_SIGSUSPEND = 341 // { int sigsuspend(const sigset_t *sigmask); } + SYS_SIGPENDING = 343 // { int sigpending(sigset_t *set); } + SYS_SIGTIMEDWAIT = 345 // { int sigtimedwait(const sigset_t *set, \ + SYS_SIGWAITINFO = 346 // { int sigwaitinfo(const sigset_t *set, \ + SYS___ACL_GET_FILE = 347 // { int __acl_get_file(const char *path, \ + SYS___ACL_SET_FILE = 348 // { int __acl_set_file(const char *path, \ + SYS___ACL_GET_FD = 349 // { int __acl_get_fd(int filedes, \ + SYS___ACL_SET_FD = 350 // { int __acl_set_fd(int filedes, \ + SYS___ACL_DELETE_FILE = 351 // { int __acl_delete_file(const char *path, \ + SYS___ACL_DELETE_FD = 352 // { int __acl_delete_fd(int filedes, \ + SYS___ACL_ACLCHECK_FILE = 353 // { int __acl_aclcheck_file(const char *path, \ + SYS___ACL_ACLCHECK_FD = 354 // { int __acl_aclcheck_fd(int filedes, \ + SYS_EXTATTRCTL = 355 // { int extattrctl(const char *path, int cmd, \ + SYS_EXTATTR_SET_FILE = 356 // { ssize_t extattr_set_file( \ + SYS_EXTATTR_GET_FILE = 357 // { ssize_t extattr_get_file( \ + SYS_EXTATTR_DELETE_FILE = 358 // { int extattr_delete_file(const char *path, \ + SYS_GETRESUID = 360 // { int getresuid(uid_t *ruid, uid_t *euid, \ + SYS_GETRESGID = 361 // { int getresgid(gid_t *rgid, gid_t *egid, \ + SYS_KQUEUE = 362 // { int kqueue(void); } + SYS_KEVENT = 363 // { int kevent(int fd, \ + SYS_EXTATTR_SET_FD = 371 // { ssize_t extattr_set_fd(int fd, \ + SYS_EXTATTR_GET_FD = 372 // { ssize_t extattr_get_fd(int fd, \ + SYS_EXTATTR_DELETE_FD = 373 // { int extattr_delete_fd(int fd, \ + SYS___SETUGID = 374 // { int __setugid(int flag); } + SYS_EACCESS = 376 // { int eaccess(char *path, int amode); } + SYS_NMOUNT = 378 // { int nmount(struct iovec *iovp, \ + SYS___MAC_GET_PROC = 384 // { int __mac_get_proc(struct mac *mac_p); } + SYS___MAC_SET_PROC = 385 // { int __mac_set_proc(struct mac *mac_p); } + SYS___MAC_GET_FD = 386 // { int __mac_get_fd(int fd, \ + SYS___MAC_GET_FILE = 387 // { int __mac_get_file(const char *path_p, \ + SYS___MAC_SET_FD = 388 // { int __mac_set_fd(int fd, \ + SYS___MAC_SET_FILE = 389 // { int __mac_set_file(const char *path_p, \ + SYS_KENV = 390 // { int kenv(int what, const char *name, \ + SYS_LCHFLAGS = 391 // { int lchflags(const char *path, \ + SYS_UUIDGEN = 392 // { int uuidgen(struct uuid *store, \ + SYS_SENDFILE = 393 // { int sendfile(int fd, int s, off_t offset, \ + SYS_MAC_SYSCALL = 394 // { int mac_syscall(const char *policy, \ + SYS_GETFSSTAT = 395 // { int getfsstat(struct statfs *buf, \ + SYS_STATFS = 396 // { int statfs(char *path, \ + SYS_FSTATFS = 397 // { int fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 398 // { int fhstatfs(const struct fhandle *u_fhp, \ + SYS___MAC_GET_PID = 409 // { int __mac_get_pid(pid_t pid, \ + SYS___MAC_GET_LINK = 410 // { int __mac_get_link(const char *path_p, \ + SYS___MAC_SET_LINK = 411 // { int __mac_set_link(const char *path_p, \ + SYS_EXTATTR_SET_LINK = 412 // { ssize_t extattr_set_link( \ + SYS_EXTATTR_GET_LINK = 413 // { ssize_t extattr_get_link( \ + SYS_EXTATTR_DELETE_LINK = 414 // { int extattr_delete_link( \ + SYS___MAC_EXECVE = 415 // { int __mac_execve(char *fname, char **argv, \ + SYS_SIGACTION = 416 // { int sigaction(int sig, \ + SYS_SIGRETURN = 417 // { int sigreturn( \ + SYS_GETCONTEXT = 421 // { int getcontext(struct __ucontext *ucp); } + SYS_SETCONTEXT = 422 // { int setcontext( \ + SYS_SWAPCONTEXT = 423 // { int swapcontext(struct __ucontext *oucp, \ + SYS_SWAPOFF = 424 // { int swapoff(const char *name); } + SYS___ACL_GET_LINK = 425 // { int __acl_get_link(const char *path, \ + SYS___ACL_SET_LINK = 426 // { int __acl_set_link(const char *path, \ + SYS___ACL_DELETE_LINK = 427 // { int __acl_delete_link(const char *path, \ + SYS___ACL_ACLCHECK_LINK = 428 // { int __acl_aclcheck_link(const char *path, \ + SYS_SIGWAIT = 429 // { int sigwait(const sigset_t *set, \ + SYS_THR_CREATE = 430 // { int thr_create(ucontext_t *ctx, long *id, \ + SYS_THR_EXIT = 431 // { void thr_exit(long *state); } + SYS_THR_SELF = 432 // { int thr_self(long *id); } + SYS_THR_KILL = 433 // { int thr_kill(long id, int sig); } + SYS__UMTX_LOCK = 434 // { int _umtx_lock(struct umtx *umtx); } + SYS__UMTX_UNLOCK = 435 // { int _umtx_unlock(struct umtx *umtx); } + SYS_JAIL_ATTACH = 436 // { int jail_attach(int jid); } + SYS_EXTATTR_LIST_FD = 437 // { ssize_t extattr_list_fd(int fd, \ + SYS_EXTATTR_LIST_FILE = 438 // { ssize_t extattr_list_file( \ + SYS_EXTATTR_LIST_LINK = 439 // { ssize_t extattr_list_link( \ + SYS_THR_SUSPEND = 442 // { int thr_suspend( \ + SYS_THR_WAKE = 443 // { int thr_wake(long id); } + SYS_KLDUNLOADF = 444 // { int kldunloadf(int fileid, int flags); } + SYS_AUDIT = 445 // { int audit(const void *record, \ + SYS_AUDITON = 446 // { int auditon(int cmd, void *data, \ + SYS_GETAUID = 447 // { int getauid(uid_t *auid); } + SYS_SETAUID = 448 // { int setauid(uid_t *auid); } + SYS_GETAUDIT = 449 // { int getaudit(struct auditinfo *auditinfo); } + SYS_SETAUDIT = 450 // { int setaudit(struct auditinfo *auditinfo); } + SYS_GETAUDIT_ADDR = 451 // { int getaudit_addr( \ + SYS_SETAUDIT_ADDR = 452 // { int setaudit_addr( \ + SYS_AUDITCTL = 453 // { int auditctl(char *path); } + SYS__UMTX_OP = 454 // { int _umtx_op(void *obj, int op, \ + SYS_THR_NEW = 455 // { int thr_new(struct thr_param *param, \ + SYS_SIGQUEUE = 456 // { int sigqueue(pid_t pid, int signum, void *value); } + SYS_ABORT2 = 463 // { int abort2(const char *why, int nargs, void **args); } + SYS_THR_SET_NAME = 464 // { int thr_set_name(long id, const char *name); } + SYS_RTPRIO_THREAD = 466 // { int rtprio_thread(int function, \ + SYS_SCTP_PEELOFF = 471 // { int sctp_peeloff(int sd, uint32_t name); } + SYS_SCTP_GENERIC_SENDMSG = 472 // { int sctp_generic_sendmsg(int sd, caddr_t msg, int mlen, \ + SYS_SCTP_GENERIC_SENDMSG_IOV = 473 // { int sctp_generic_sendmsg_iov(int sd, struct iovec *iov, int iovlen, \ + SYS_SCTP_GENERIC_RECVMSG = 474 // { int sctp_generic_recvmsg(int sd, struct iovec *iov, int iovlen, \ + SYS_PREAD = 475 // { ssize_t pread(int fd, void *buf, \ + SYS_PWRITE = 476 // { ssize_t pwrite(int fd, const void *buf, \ + SYS_MMAP = 477 // { caddr_t mmap(caddr_t addr, size_t len, \ + SYS_LSEEK = 478 // { off_t lseek(int fd, off_t offset, \ + SYS_TRUNCATE = 479 // { int truncate(char *path, off_t length); } + SYS_FTRUNCATE = 480 // { int ftruncate(int fd, off_t length); } + SYS_THR_KILL2 = 481 // { int thr_kill2(pid_t pid, long id, int sig); } + SYS_SHM_OPEN = 482 // { int shm_open(const char *path, int flags, \ + SYS_SHM_UNLINK = 483 // { int shm_unlink(const char *path); } + SYS_CPUSET = 484 // { int cpuset(cpusetid_t *setid); } + SYS_CPUSET_SETID = 485 // { int cpuset_setid(cpuwhich_t which, id_t id, \ + SYS_CPUSET_GETID = 486 // { int cpuset_getid(cpulevel_t level, \ + SYS_CPUSET_GETAFFINITY = 487 // { int cpuset_getaffinity(cpulevel_t level, \ + SYS_CPUSET_SETAFFINITY = 488 // { int cpuset_setaffinity(cpulevel_t level, \ + SYS_FACCESSAT = 489 // { int faccessat(int fd, char *path, int amode, \ + SYS_FCHMODAT = 490 // { int fchmodat(int fd, char *path, mode_t mode, \ + SYS_FCHOWNAT = 491 // { int fchownat(int fd, char *path, uid_t uid, \ + SYS_FEXECVE = 492 // { int fexecve(int fd, char **argv, \ + SYS_FSTATAT = 493 // { int fstatat(int fd, char *path, \ + SYS_FUTIMESAT = 494 // { int futimesat(int fd, char *path, \ + SYS_LINKAT = 495 // { int linkat(int fd1, char *path1, int fd2, \ + SYS_MKDIRAT = 496 // { int mkdirat(int fd, char *path, mode_t mode); } + SYS_MKFIFOAT = 497 // { int mkfifoat(int fd, char *path, mode_t mode); } + SYS_MKNODAT = 498 // { int mknodat(int fd, char *path, mode_t mode, \ + SYS_OPENAT = 499 // { int openat(int fd, char *path, int flag, \ + SYS_READLINKAT = 500 // { int readlinkat(int fd, char *path, char *buf, \ + SYS_RENAMEAT = 501 // { int renameat(int oldfd, char *old, int newfd, \ + SYS_SYMLINKAT = 502 // { int symlinkat(char *path1, int fd, \ + SYS_UNLINKAT = 503 // { int unlinkat(int fd, char *path, int flag); } + SYS_POSIX_OPENPT = 504 // { int posix_openpt(int flags); } + SYS_JAIL_GET = 506 // { int jail_get(struct iovec *iovp, \ + SYS_JAIL_SET = 507 // { int jail_set(struct iovec *iovp, \ + SYS_JAIL_REMOVE = 508 // { int jail_remove(int jid); } + SYS_CLOSEFROM = 509 // { int closefrom(int lowfd); } + SYS_LPATHCONF = 513 // { int lpathconf(char *path, int name); } + SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); } + SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \ + SYS_CAP_ENTER = 516 // { int cap_enter(void); } + SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); } + SYS_PDFORK = 518 // { int pdfork(int *fdp, int flags); } + SYS_PDKILL = 519 // { int pdkill(int fd, int signum); } + SYS_PDGETPID = 520 // { int pdgetpid(int fd, pid_t *pidp); } + SYS_PSELECT = 522 // { int pselect(int nd, fd_set *in, \ + SYS_GETLOGINCLASS = 523 // { int getloginclass(char *namebuf, \ + SYS_SETLOGINCLASS = 524 // { int setloginclass(const char *namebuf); } + SYS_RCTL_GET_RACCT = 525 // { int rctl_get_racct(const void *inbufp, \ + SYS_RCTL_GET_RULES = 526 // { int rctl_get_rules(const void *inbufp, \ + SYS_RCTL_GET_LIMITS = 527 // { int rctl_get_limits(const void *inbufp, \ + SYS_RCTL_ADD_RULE = 528 // { int rctl_add_rule(const void *inbufp, \ + SYS_RCTL_REMOVE_RULE = 529 // { int rctl_remove_rule(const void *inbufp, \ + SYS_POSIX_FALLOCATE = 530 // { int posix_fallocate(int fd, \ + SYS_POSIX_FADVISE = 531 // { int posix_fadvise(int fd, off_t offset, \ + SYS_WAIT6 = 532 // { int wait6(idtype_t idtype, id_t id, \ + SYS_BINDAT = 538 // { int bindat(int fd, int s, caddr_t name, \ + SYS_CONNECTAT = 539 // { int connectat(int fd, int s, caddr_t name, \ + SYS_CHFLAGSAT = 540 // { int chflagsat(int fd, const char *path, \ + SYS_ACCEPT4 = 541 // { int accept4(int s, \ + SYS_PIPE2 = 542 // { int pipe2(int *fildes, int flags); } + SYS_PROCCTL = 544 // { int procctl(idtype_t idtype, id_t id, \ + SYS_PPOLL = 545 // { int ppoll(struct pollfd *fds, u_int nfds, \ +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go new file mode 100644 index 000000000..ba952c675 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -0,0 +1,355 @@ +// mksysnum_linux.pl /usr/include/asm/unistd_32.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build 386,linux + +package unix + +const ( + SYS_RESTART_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_WAITPID = 7 + SYS_CREAT = 8 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_EXECVE = 11 + SYS_CHDIR = 12 + SYS_TIME = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_LCHOWN = 16 + SYS_BREAK = 17 + SYS_OLDSTAT = 18 + SYS_LSEEK = 19 + SYS_GETPID = 20 + SYS_MOUNT = 21 + SYS_UMOUNT = 22 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_STIME = 25 + SYS_PTRACE = 26 + SYS_ALARM = 27 + SYS_OLDFSTAT = 28 + SYS_PAUSE = 29 + SYS_UTIME = 30 + SYS_STTY = 31 + SYS_GTTY = 32 + SYS_ACCESS = 33 + SYS_NICE = 34 + SYS_FTIME = 35 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_RENAME = 38 + SYS_MKDIR = 39 + SYS_RMDIR = 40 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_TIMES = 43 + SYS_PROF = 44 + SYS_BRK = 45 + SYS_SETGID = 46 + SYS_GETGID = 47 + SYS_SIGNAL = 48 + SYS_GETEUID = 49 + SYS_GETEGID = 50 + SYS_ACCT = 51 + SYS_UMOUNT2 = 52 + SYS_LOCK = 53 + SYS_IOCTL = 54 + SYS_FCNTL = 55 + SYS_MPX = 56 + SYS_SETPGID = 57 + SYS_ULIMIT = 58 + SYS_OLDOLDUNAME = 59 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_USTAT = 62 + SYS_DUP2 = 63 + SYS_GETPPID = 64 + SYS_GETPGRP = 65 + SYS_SETSID = 66 + SYS_SIGACTION = 67 + SYS_SGETMASK = 68 + SYS_SSETMASK = 69 + SYS_SETREUID = 70 + SYS_SETREGID = 71 + SYS_SIGSUSPEND = 72 + SYS_SIGPENDING = 73 + SYS_SETHOSTNAME = 74 + SYS_SETRLIMIT = 75 + SYS_GETRLIMIT = 76 + SYS_GETRUSAGE = 77 + SYS_GETTIMEOFDAY = 78 + SYS_SETTIMEOFDAY = 79 + SYS_GETGROUPS = 80 + SYS_SETGROUPS = 81 + SYS_SELECT = 82 + SYS_SYMLINK = 83 + SYS_OLDLSTAT = 84 + SYS_READLINK = 85 + SYS_USELIB = 86 + SYS_SWAPON = 87 + SYS_REBOOT = 88 + SYS_READDIR = 89 + SYS_MMAP = 90 + SYS_MUNMAP = 91 + SYS_TRUNCATE = 92 + SYS_FTRUNCATE = 93 + SYS_FCHMOD = 94 + SYS_FCHOWN = 95 + SYS_GETPRIORITY = 96 + SYS_SETPRIORITY = 97 + SYS_PROFIL = 98 + SYS_STATFS = 99 + SYS_FSTATFS = 100 + SYS_IOPERM = 101 + SYS_SOCKETCALL = 102 + SYS_SYSLOG = 103 + SYS_SETITIMER = 104 + SYS_GETITIMER = 105 + SYS_STAT = 106 + SYS_LSTAT = 107 + SYS_FSTAT = 108 + SYS_OLDUNAME = 109 + SYS_IOPL = 110 + SYS_VHANGUP = 111 + SYS_IDLE = 112 + SYS_VM86OLD = 113 + SYS_WAIT4 = 114 + SYS_SWAPOFF = 115 + SYS_SYSINFO = 116 + SYS_IPC = 117 + SYS_FSYNC = 118 + SYS_SIGRETURN = 119 + SYS_CLONE = 120 + SYS_SETDOMAINNAME = 121 + SYS_UNAME = 122 + SYS_MODIFY_LDT = 123 + SYS_ADJTIMEX = 124 + SYS_MPROTECT = 125 + SYS_SIGPROCMASK = 126 + SYS_CREATE_MODULE = 127 + SYS_INIT_MODULE = 128 + SYS_DELETE_MODULE = 129 + SYS_GET_KERNEL_SYMS = 130 + SYS_QUOTACTL = 131 + SYS_GETPGID = 132 + SYS_FCHDIR = 133 + SYS_BDFLUSH = 134 + SYS_SYSFS = 135 + SYS_PERSONALITY = 136 + SYS_AFS_SYSCALL = 137 + SYS_SETFSUID = 138 + SYS_SETFSGID = 139 + SYS__LLSEEK = 140 + SYS_GETDENTS = 141 + SYS__NEWSELECT = 142 + SYS_FLOCK = 143 + SYS_MSYNC = 144 + SYS_READV = 145 + SYS_WRITEV = 146 + SYS_GETSID = 147 + SYS_FDATASYNC = 148 + SYS__SYSCTL = 149 + SYS_MLOCK = 150 + SYS_MUNLOCK = 151 + SYS_MLOCKALL = 152 + SYS_MUNLOCKALL = 153 + SYS_SCHED_SETPARAM = 154 + SYS_SCHED_GETPARAM = 155 + SYS_SCHED_SETSCHEDULER = 156 + SYS_SCHED_GETSCHEDULER = 157 + SYS_SCHED_YIELD = 158 + SYS_SCHED_GET_PRIORITY_MAX = 159 + SYS_SCHED_GET_PRIORITY_MIN = 160 + SYS_SCHED_RR_GET_INTERVAL = 161 + SYS_NANOSLEEP = 162 + SYS_MREMAP = 163 + SYS_SETRESUID = 164 + SYS_GETRESUID = 165 + SYS_VM86 = 166 + SYS_QUERY_MODULE = 167 + SYS_POLL = 168 + SYS_NFSSERVCTL = 169 + SYS_SETRESGID = 170 + SYS_GETRESGID = 171 + SYS_PRCTL = 172 + SYS_RT_SIGRETURN = 173 + SYS_RT_SIGACTION = 174 + SYS_RT_SIGPROCMASK = 175 + SYS_RT_SIGPENDING = 176 + SYS_RT_SIGTIMEDWAIT = 177 + SYS_RT_SIGQUEUEINFO = 178 + SYS_RT_SIGSUSPEND = 179 + SYS_PREAD64 = 180 + SYS_PWRITE64 = 181 + SYS_CHOWN = 182 + SYS_GETCWD = 183 + SYS_CAPGET = 184 + SYS_CAPSET = 185 + SYS_SIGALTSTACK = 186 + SYS_SENDFILE = 187 + SYS_GETPMSG = 188 + SYS_PUTPMSG = 189 + SYS_VFORK = 190 + SYS_UGETRLIMIT = 191 + SYS_MMAP2 = 192 + SYS_TRUNCATE64 = 193 + SYS_FTRUNCATE64 = 194 + SYS_STAT64 = 195 + SYS_LSTAT64 = 196 + SYS_FSTAT64 = 197 + SYS_LCHOWN32 = 198 + SYS_GETUID32 = 199 + SYS_GETGID32 = 200 + SYS_GETEUID32 = 201 + SYS_GETEGID32 = 202 + SYS_SETREUID32 = 203 + SYS_SETREGID32 = 204 + SYS_GETGROUPS32 = 205 + SYS_SETGROUPS32 = 206 + SYS_FCHOWN32 = 207 + SYS_SETRESUID32 = 208 + SYS_GETRESUID32 = 209 + SYS_SETRESGID32 = 210 + SYS_GETRESGID32 = 211 + SYS_CHOWN32 = 212 + SYS_SETUID32 = 213 + SYS_SETGID32 = 214 + SYS_SETFSUID32 = 215 + SYS_SETFSGID32 = 216 + SYS_PIVOT_ROOT = 217 + SYS_MINCORE = 218 + SYS_MADVISE = 219 + SYS_MADVISE1 = 219 + SYS_GETDENTS64 = 220 + SYS_FCNTL64 = 221 + SYS_GETTID = 224 + SYS_READAHEAD = 225 + SYS_SETXATTR = 226 + SYS_LSETXATTR = 227 + SYS_FSETXATTR = 228 + SYS_GETXATTR = 229 + SYS_LGETXATTR = 230 + SYS_FGETXATTR = 231 + SYS_LISTXATTR = 232 + SYS_LLISTXATTR = 233 + SYS_FLISTXATTR = 234 + SYS_REMOVEXATTR = 235 + SYS_LREMOVEXATTR = 236 + SYS_FREMOVEXATTR = 237 + SYS_TKILL = 238 + SYS_SENDFILE64 = 239 + SYS_FUTEX = 240 + SYS_SCHED_SETAFFINITY = 241 + SYS_SCHED_GETAFFINITY = 242 + SYS_SET_THREAD_AREA = 243 + SYS_GET_THREAD_AREA = 244 + SYS_IO_SETUP = 245 + SYS_IO_DESTROY = 246 + SYS_IO_GETEVENTS = 247 + SYS_IO_SUBMIT = 248 + SYS_IO_CANCEL = 249 + SYS_FADVISE64 = 250 + SYS_EXIT_GROUP = 252 + SYS_LOOKUP_DCOOKIE = 253 + SYS_EPOLL_CREATE = 254 + SYS_EPOLL_CTL = 255 + SYS_EPOLL_WAIT = 256 + SYS_REMAP_FILE_PAGES = 257 + SYS_SET_TID_ADDRESS = 258 + SYS_TIMER_CREATE = 259 + SYS_TIMER_SETTIME = 260 + SYS_TIMER_GETTIME = 261 + SYS_TIMER_GETOVERRUN = 262 + SYS_TIMER_DELETE = 263 + SYS_CLOCK_SETTIME = 264 + SYS_CLOCK_GETTIME = 265 + SYS_CLOCK_GETRES = 266 + SYS_CLOCK_NANOSLEEP = 267 + SYS_STATFS64 = 268 + SYS_FSTATFS64 = 269 + SYS_TGKILL = 270 + SYS_UTIMES = 271 + SYS_FADVISE64_64 = 272 + SYS_VSERVER = 273 + SYS_MBIND = 274 + SYS_GET_MEMPOLICY = 275 + SYS_SET_MEMPOLICY = 276 + SYS_MQ_OPEN = 277 + SYS_MQ_UNLINK = 278 + SYS_MQ_TIMEDSEND = 279 + SYS_MQ_TIMEDRECEIVE = 280 + SYS_MQ_NOTIFY = 281 + SYS_MQ_GETSETATTR = 282 + SYS_KEXEC_LOAD = 283 + SYS_WAITID = 284 + SYS_ADD_KEY = 286 + SYS_REQUEST_KEY = 287 + SYS_KEYCTL = 288 + SYS_IOPRIO_SET = 289 + SYS_IOPRIO_GET = 290 + SYS_INOTIFY_INIT = 291 + SYS_INOTIFY_ADD_WATCH = 292 + SYS_INOTIFY_RM_WATCH = 293 + SYS_MIGRATE_PAGES = 294 + SYS_OPENAT = 295 + SYS_MKDIRAT = 296 + SYS_MKNODAT = 297 + SYS_FCHOWNAT = 298 + SYS_FUTIMESAT = 299 + SYS_FSTATAT64 = 300 + SYS_UNLINKAT = 301 + SYS_RENAMEAT = 302 + SYS_LINKAT = 303 + SYS_SYMLINKAT = 304 + SYS_READLINKAT = 305 + SYS_FCHMODAT = 306 + SYS_FACCESSAT = 307 + SYS_PSELECT6 = 308 + SYS_PPOLL = 309 + SYS_UNSHARE = 310 + SYS_SET_ROBUST_LIST = 311 + SYS_GET_ROBUST_LIST = 312 + SYS_SPLICE = 313 + SYS_SYNC_FILE_RANGE = 314 + SYS_TEE = 315 + SYS_VMSPLICE = 316 + SYS_MOVE_PAGES = 317 + SYS_GETCPU = 318 + SYS_EPOLL_PWAIT = 319 + SYS_UTIMENSAT = 320 + SYS_SIGNALFD = 321 + SYS_TIMERFD_CREATE = 322 + SYS_EVENTFD = 323 + SYS_FALLOCATE = 324 + SYS_TIMERFD_SETTIME = 325 + SYS_TIMERFD_GETTIME = 326 + SYS_SIGNALFD4 = 327 + SYS_EVENTFD2 = 328 + SYS_EPOLL_CREATE1 = 329 + SYS_DUP3 = 330 + SYS_PIPE2 = 331 + SYS_INOTIFY_INIT1 = 332 + SYS_PREADV = 333 + SYS_PWRITEV = 334 + SYS_RT_TGSIGQUEUEINFO = 335 + SYS_PERF_EVENT_OPEN = 336 + SYS_RECVMMSG = 337 + SYS_FANOTIFY_INIT = 338 + SYS_FANOTIFY_MARK = 339 + SYS_PRLIMIT64 = 340 + SYS_NAME_TO_HANDLE_AT = 341 + SYS_OPEN_BY_HANDLE_AT = 342 + SYS_CLOCK_ADJTIME = 343 + SYS_SYNCFS = 344 + SYS_SENDMMSG = 345 + SYS_SETNS = 346 + SYS_PROCESS_VM_READV = 347 + SYS_PROCESS_VM_WRITEV = 348 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go new file mode 100644 index 000000000..ddac31f58 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -0,0 +1,321 @@ +// mksysnum_linux.pl /usr/include/asm/unistd_64.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build amd64,linux + +package unix + +const ( + SYS_READ = 0 + SYS_WRITE = 1 + SYS_OPEN = 2 + SYS_CLOSE = 3 + SYS_STAT = 4 + SYS_FSTAT = 5 + SYS_LSTAT = 6 + SYS_POLL = 7 + SYS_LSEEK = 8 + SYS_MMAP = 9 + SYS_MPROTECT = 10 + SYS_MUNMAP = 11 + SYS_BRK = 12 + SYS_RT_SIGACTION = 13 + SYS_RT_SIGPROCMASK = 14 + SYS_RT_SIGRETURN = 15 + SYS_IOCTL = 16 + SYS_PREAD64 = 17 + SYS_PWRITE64 = 18 + SYS_READV = 19 + SYS_WRITEV = 20 + SYS_ACCESS = 21 + SYS_PIPE = 22 + SYS_SELECT = 23 + SYS_SCHED_YIELD = 24 + SYS_MREMAP = 25 + SYS_MSYNC = 26 + SYS_MINCORE = 27 + SYS_MADVISE = 28 + SYS_SHMGET = 29 + SYS_SHMAT = 30 + SYS_SHMCTL = 31 + SYS_DUP = 32 + SYS_DUP2 = 33 + SYS_PAUSE = 34 + SYS_NANOSLEEP = 35 + SYS_GETITIMER = 36 + SYS_ALARM = 37 + SYS_SETITIMER = 38 + SYS_GETPID = 39 + SYS_SENDFILE = 40 + SYS_SOCKET = 41 + SYS_CONNECT = 42 + SYS_ACCEPT = 43 + SYS_SENDTO = 44 + SYS_RECVFROM = 45 + SYS_SENDMSG = 46 + SYS_RECVMSG = 47 + SYS_SHUTDOWN = 48 + SYS_BIND = 49 + SYS_LISTEN = 50 + SYS_GETSOCKNAME = 51 + SYS_GETPEERNAME = 52 + SYS_SOCKETPAIR = 53 + SYS_SETSOCKOPT = 54 + SYS_GETSOCKOPT = 55 + SYS_CLONE = 56 + SYS_FORK = 57 + SYS_VFORK = 58 + SYS_EXECVE = 59 + SYS_EXIT = 60 + SYS_WAIT4 = 61 + SYS_KILL = 62 + SYS_UNAME = 63 + SYS_SEMGET = 64 + SYS_SEMOP = 65 + SYS_SEMCTL = 66 + SYS_SHMDT = 67 + SYS_MSGGET = 68 + SYS_MSGSND = 69 + SYS_MSGRCV = 70 + SYS_MSGCTL = 71 + SYS_FCNTL = 72 + SYS_FLOCK = 73 + SYS_FSYNC = 74 + SYS_FDATASYNC = 75 + SYS_TRUNCATE = 76 + SYS_FTRUNCATE = 77 + SYS_GETDENTS = 78 + SYS_GETCWD = 79 + SYS_CHDIR = 80 + SYS_FCHDIR = 81 + SYS_RENAME = 82 + SYS_MKDIR = 83 + SYS_RMDIR = 84 + SYS_CREAT = 85 + SYS_LINK = 86 + SYS_UNLINK = 87 + SYS_SYMLINK = 88 + SYS_READLINK = 89 + SYS_CHMOD = 90 + SYS_FCHMOD = 91 + SYS_CHOWN = 92 + SYS_FCHOWN = 93 + SYS_LCHOWN = 94 + SYS_UMASK = 95 + SYS_GETTIMEOFDAY = 96 + SYS_GETRLIMIT = 97 + SYS_GETRUSAGE = 98 + SYS_SYSINFO = 99 + SYS_TIMES = 100 + SYS_PTRACE = 101 + SYS_GETUID = 102 + SYS_SYSLOG = 103 + SYS_GETGID = 104 + SYS_SETUID = 105 + SYS_SETGID = 106 + SYS_GETEUID = 107 + SYS_GETEGID = 108 + SYS_SETPGID = 109 + SYS_GETPPID = 110 + SYS_GETPGRP = 111 + SYS_SETSID = 112 + SYS_SETREUID = 113 + SYS_SETREGID = 114 + SYS_GETGROUPS = 115 + SYS_SETGROUPS = 116 + SYS_SETRESUID = 117 + SYS_GETRESUID = 118 + SYS_SETRESGID = 119 + SYS_GETRESGID = 120 + SYS_GETPGID = 121 + SYS_SETFSUID = 122 + SYS_SETFSGID = 123 + SYS_GETSID = 124 + SYS_CAPGET = 125 + SYS_CAPSET = 126 + SYS_RT_SIGPENDING = 127 + SYS_RT_SIGTIMEDWAIT = 128 + SYS_RT_SIGQUEUEINFO = 129 + SYS_RT_SIGSUSPEND = 130 + SYS_SIGALTSTACK = 131 + SYS_UTIME = 132 + SYS_MKNOD = 133 + SYS_USELIB = 134 + SYS_PERSONALITY = 135 + SYS_USTAT = 136 + SYS_STATFS = 137 + SYS_FSTATFS = 138 + SYS_SYSFS = 139 + SYS_GETPRIORITY = 140 + SYS_SETPRIORITY = 141 + SYS_SCHED_SETPARAM = 142 + SYS_SCHED_GETPARAM = 143 + SYS_SCHED_SETSCHEDULER = 144 + SYS_SCHED_GETSCHEDULER = 145 + SYS_SCHED_GET_PRIORITY_MAX = 146 + SYS_SCHED_GET_PRIORITY_MIN = 147 + SYS_SCHED_RR_GET_INTERVAL = 148 + SYS_MLOCK = 149 + SYS_MUNLOCK = 150 + SYS_MLOCKALL = 151 + SYS_MUNLOCKALL = 152 + SYS_VHANGUP = 153 + SYS_MODIFY_LDT = 154 + SYS_PIVOT_ROOT = 155 + SYS__SYSCTL = 156 + SYS_PRCTL = 157 + SYS_ARCH_PRCTL = 158 + SYS_ADJTIMEX = 159 + SYS_SETRLIMIT = 160 + SYS_CHROOT = 161 + SYS_SYNC = 162 + SYS_ACCT = 163 + SYS_SETTIMEOFDAY = 164 + SYS_MOUNT = 165 + SYS_UMOUNT2 = 166 + SYS_SWAPON = 167 + SYS_SWAPOFF = 168 + SYS_REBOOT = 169 + SYS_SETHOSTNAME = 170 + SYS_SETDOMAINNAME = 171 + SYS_IOPL = 172 + SYS_IOPERM = 173 + SYS_CREATE_MODULE = 174 + SYS_INIT_MODULE = 175 + SYS_DELETE_MODULE = 176 + SYS_GET_KERNEL_SYMS = 177 + SYS_QUERY_MODULE = 178 + SYS_QUOTACTL = 179 + SYS_NFSSERVCTL = 180 + SYS_GETPMSG = 181 + SYS_PUTPMSG = 182 + SYS_AFS_SYSCALL = 183 + SYS_TUXCALL = 184 + SYS_SECURITY = 185 + SYS_GETTID = 186 + SYS_READAHEAD = 187 + SYS_SETXATTR = 188 + SYS_LSETXATTR = 189 + SYS_FSETXATTR = 190 + SYS_GETXATTR = 191 + SYS_LGETXATTR = 192 + SYS_FGETXATTR = 193 + SYS_LISTXATTR = 194 + SYS_LLISTXATTR = 195 + SYS_FLISTXATTR = 196 + SYS_REMOVEXATTR = 197 + SYS_LREMOVEXATTR = 198 + SYS_FREMOVEXATTR = 199 + SYS_TKILL = 200 + SYS_TIME = 201 + SYS_FUTEX = 202 + SYS_SCHED_SETAFFINITY = 203 + SYS_SCHED_GETAFFINITY = 204 + SYS_SET_THREAD_AREA = 205 + SYS_IO_SETUP = 206 + SYS_IO_DESTROY = 207 + SYS_IO_GETEVENTS = 208 + SYS_IO_SUBMIT = 209 + SYS_IO_CANCEL = 210 + SYS_GET_THREAD_AREA = 211 + SYS_LOOKUP_DCOOKIE = 212 + SYS_EPOLL_CREATE = 213 + SYS_EPOLL_CTL_OLD = 214 + SYS_EPOLL_WAIT_OLD = 215 + SYS_REMAP_FILE_PAGES = 216 + SYS_GETDENTS64 = 217 + SYS_SET_TID_ADDRESS = 218 + SYS_RESTART_SYSCALL = 219 + SYS_SEMTIMEDOP = 220 + SYS_FADVISE64 = 221 + SYS_TIMER_CREATE = 222 + SYS_TIMER_SETTIME = 223 + SYS_TIMER_GETTIME = 224 + SYS_TIMER_GETOVERRUN = 225 + SYS_TIMER_DELETE = 226 + SYS_CLOCK_SETTIME = 227 + SYS_CLOCK_GETTIME = 228 + SYS_CLOCK_GETRES = 229 + SYS_CLOCK_NANOSLEEP = 230 + SYS_EXIT_GROUP = 231 + SYS_EPOLL_WAIT = 232 + SYS_EPOLL_CTL = 233 + SYS_TGKILL = 234 + SYS_UTIMES = 235 + SYS_VSERVER = 236 + SYS_MBIND = 237 + SYS_SET_MEMPOLICY = 238 + SYS_GET_MEMPOLICY = 239 + SYS_MQ_OPEN = 240 + SYS_MQ_UNLINK = 241 + SYS_MQ_TIMEDSEND = 242 + SYS_MQ_TIMEDRECEIVE = 243 + SYS_MQ_NOTIFY = 244 + SYS_MQ_GETSETATTR = 245 + SYS_KEXEC_LOAD = 246 + SYS_WAITID = 247 + SYS_ADD_KEY = 248 + SYS_REQUEST_KEY = 249 + SYS_KEYCTL = 250 + SYS_IOPRIO_SET = 251 + SYS_IOPRIO_GET = 252 + SYS_INOTIFY_INIT = 253 + SYS_INOTIFY_ADD_WATCH = 254 + SYS_INOTIFY_RM_WATCH = 255 + SYS_MIGRATE_PAGES = 256 + SYS_OPENAT = 257 + SYS_MKDIRAT = 258 + SYS_MKNODAT = 259 + SYS_FCHOWNAT = 260 + SYS_FUTIMESAT = 261 + SYS_NEWFSTATAT = 262 + SYS_UNLINKAT = 263 + SYS_RENAMEAT = 264 + SYS_LINKAT = 265 + SYS_SYMLINKAT = 266 + SYS_READLINKAT = 267 + SYS_FCHMODAT = 268 + SYS_FACCESSAT = 269 + SYS_PSELECT6 = 270 + SYS_PPOLL = 271 + SYS_UNSHARE = 272 + SYS_SET_ROBUST_LIST = 273 + SYS_GET_ROBUST_LIST = 274 + SYS_SPLICE = 275 + SYS_TEE = 276 + SYS_SYNC_FILE_RANGE = 277 + SYS_VMSPLICE = 278 + SYS_MOVE_PAGES = 279 + SYS_UTIMENSAT = 280 + SYS_EPOLL_PWAIT = 281 + SYS_SIGNALFD = 282 + SYS_TIMERFD_CREATE = 283 + SYS_EVENTFD = 284 + SYS_FALLOCATE = 285 + SYS_TIMERFD_SETTIME = 286 + SYS_TIMERFD_GETTIME = 287 + SYS_ACCEPT4 = 288 + SYS_SIGNALFD4 = 289 + SYS_EVENTFD2 = 290 + SYS_EPOLL_CREATE1 = 291 + SYS_DUP3 = 292 + SYS_PIPE2 = 293 + SYS_INOTIFY_INIT1 = 294 + SYS_PREADV = 295 + SYS_PWRITEV = 296 + SYS_RT_TGSIGQUEUEINFO = 297 + SYS_PERF_EVENT_OPEN = 298 + SYS_RECVMMSG = 299 + SYS_FANOTIFY_INIT = 300 + SYS_FANOTIFY_MARK = 301 + SYS_PRLIMIT64 = 302 + SYS_NAME_TO_HANDLE_AT = 303 + SYS_OPEN_BY_HANDLE_AT = 304 + SYS_CLOCK_ADJTIME = 305 + SYS_SYNCFS = 306 + SYS_SENDMMSG = 307 + SYS_SETNS = 308 + SYS_GETCPU = 309 + SYS_PROCESS_VM_READV = 310 + SYS_PROCESS_VM_WRITEV = 311 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go new file mode 100644 index 000000000..45ced17fc --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -0,0 +1,356 @@ +// mksysnum_linux.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build arm,linux + +package unix + +const ( + SYS_OABI_SYSCALL_BASE = 0 + SYS_SYSCALL_BASE = 0 + SYS_RESTART_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_CREAT = 8 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_EXECVE = 11 + SYS_CHDIR = 12 + SYS_TIME = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_LCHOWN = 16 + SYS_LSEEK = 19 + SYS_GETPID = 20 + SYS_MOUNT = 21 + SYS_UMOUNT = 22 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_STIME = 25 + SYS_PTRACE = 26 + SYS_ALARM = 27 + SYS_PAUSE = 29 + SYS_UTIME = 30 + SYS_ACCESS = 33 + SYS_NICE = 34 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_RENAME = 38 + SYS_MKDIR = 39 + SYS_RMDIR = 40 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_TIMES = 43 + SYS_BRK = 45 + SYS_SETGID = 46 + SYS_GETGID = 47 + SYS_GETEUID = 49 + SYS_GETEGID = 50 + SYS_ACCT = 51 + SYS_UMOUNT2 = 52 + SYS_IOCTL = 54 + SYS_FCNTL = 55 + SYS_SETPGID = 57 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_USTAT = 62 + SYS_DUP2 = 63 + SYS_GETPPID = 64 + SYS_GETPGRP = 65 + SYS_SETSID = 66 + SYS_SIGACTION = 67 + SYS_SETREUID = 70 + SYS_SETREGID = 71 + SYS_SIGSUSPEND = 72 + SYS_SIGPENDING = 73 + SYS_SETHOSTNAME = 74 + SYS_SETRLIMIT = 75 + SYS_GETRLIMIT = 76 + SYS_GETRUSAGE = 77 + SYS_GETTIMEOFDAY = 78 + SYS_SETTIMEOFDAY = 79 + SYS_GETGROUPS = 80 + SYS_SETGROUPS = 81 + SYS_SELECT = 82 + SYS_SYMLINK = 83 + SYS_READLINK = 85 + SYS_USELIB = 86 + SYS_SWAPON = 87 + SYS_REBOOT = 88 + SYS_READDIR = 89 + SYS_MMAP = 90 + SYS_MUNMAP = 91 + SYS_TRUNCATE = 92 + SYS_FTRUNCATE = 93 + SYS_FCHMOD = 94 + SYS_FCHOWN = 95 + SYS_GETPRIORITY = 96 + SYS_SETPRIORITY = 97 + SYS_STATFS = 99 + SYS_FSTATFS = 100 + SYS_SOCKETCALL = 102 + SYS_SYSLOG = 103 + SYS_SETITIMER = 104 + SYS_GETITIMER = 105 + SYS_STAT = 106 + SYS_LSTAT = 107 + SYS_FSTAT = 108 + SYS_VHANGUP = 111 + SYS_SYSCALL = 113 + SYS_WAIT4 = 114 + SYS_SWAPOFF = 115 + SYS_SYSINFO = 116 + SYS_IPC = 117 + SYS_FSYNC = 118 + SYS_SIGRETURN = 119 + SYS_CLONE = 120 + SYS_SETDOMAINNAME = 121 + SYS_UNAME = 122 + SYS_ADJTIMEX = 124 + SYS_MPROTECT = 125 + SYS_SIGPROCMASK = 126 + SYS_INIT_MODULE = 128 + SYS_DELETE_MODULE = 129 + SYS_QUOTACTL = 131 + SYS_GETPGID = 132 + SYS_FCHDIR = 133 + SYS_BDFLUSH = 134 + SYS_SYSFS = 135 + SYS_PERSONALITY = 136 + SYS_SETFSUID = 138 + SYS_SETFSGID = 139 + SYS__LLSEEK = 140 + SYS_GETDENTS = 141 + SYS__NEWSELECT = 142 + SYS_FLOCK = 143 + SYS_MSYNC = 144 + SYS_READV = 145 + SYS_WRITEV = 146 + SYS_GETSID = 147 + SYS_FDATASYNC = 148 + SYS__SYSCTL = 149 + SYS_MLOCK = 150 + SYS_MUNLOCK = 151 + SYS_MLOCKALL = 152 + SYS_MUNLOCKALL = 153 + SYS_SCHED_SETPARAM = 154 + SYS_SCHED_GETPARAM = 155 + SYS_SCHED_SETSCHEDULER = 156 + SYS_SCHED_GETSCHEDULER = 157 + SYS_SCHED_YIELD = 158 + SYS_SCHED_GET_PRIORITY_MAX = 159 + SYS_SCHED_GET_PRIORITY_MIN = 160 + SYS_SCHED_RR_GET_INTERVAL = 161 + SYS_NANOSLEEP = 162 + SYS_MREMAP = 163 + SYS_SETRESUID = 164 + SYS_GETRESUID = 165 + SYS_POLL = 168 + SYS_NFSSERVCTL = 169 + SYS_SETRESGID = 170 + SYS_GETRESGID = 171 + SYS_PRCTL = 172 + SYS_RT_SIGRETURN = 173 + SYS_RT_SIGACTION = 174 + SYS_RT_SIGPROCMASK = 175 + SYS_RT_SIGPENDING = 176 + SYS_RT_SIGTIMEDWAIT = 177 + SYS_RT_SIGQUEUEINFO = 178 + SYS_RT_SIGSUSPEND = 179 + SYS_PREAD64 = 180 + SYS_PWRITE64 = 181 + SYS_CHOWN = 182 + SYS_GETCWD = 183 + SYS_CAPGET = 184 + SYS_CAPSET = 185 + SYS_SIGALTSTACK = 186 + SYS_SENDFILE = 187 + SYS_VFORK = 190 + SYS_UGETRLIMIT = 191 + SYS_MMAP2 = 192 + SYS_TRUNCATE64 = 193 + SYS_FTRUNCATE64 = 194 + SYS_STAT64 = 195 + SYS_LSTAT64 = 196 + SYS_FSTAT64 = 197 + SYS_LCHOWN32 = 198 + SYS_GETUID32 = 199 + SYS_GETGID32 = 200 + SYS_GETEUID32 = 201 + SYS_GETEGID32 = 202 + SYS_SETREUID32 = 203 + SYS_SETREGID32 = 204 + SYS_GETGROUPS32 = 205 + SYS_SETGROUPS32 = 206 + SYS_FCHOWN32 = 207 + SYS_SETRESUID32 = 208 + SYS_GETRESUID32 = 209 + SYS_SETRESGID32 = 210 + SYS_GETRESGID32 = 211 + SYS_CHOWN32 = 212 + SYS_SETUID32 = 213 + SYS_SETGID32 = 214 + SYS_SETFSUID32 = 215 + SYS_SETFSGID32 = 216 + SYS_GETDENTS64 = 217 + SYS_PIVOT_ROOT = 218 + SYS_MINCORE = 219 + SYS_MADVISE = 220 + SYS_FCNTL64 = 221 + SYS_GETTID = 224 + SYS_READAHEAD = 225 + SYS_SETXATTR = 226 + SYS_LSETXATTR = 227 + SYS_FSETXATTR = 228 + SYS_GETXATTR = 229 + SYS_LGETXATTR = 230 + SYS_FGETXATTR = 231 + SYS_LISTXATTR = 232 + SYS_LLISTXATTR = 233 + SYS_FLISTXATTR = 234 + SYS_REMOVEXATTR = 235 + SYS_LREMOVEXATTR = 236 + SYS_FREMOVEXATTR = 237 + SYS_TKILL = 238 + SYS_SENDFILE64 = 239 + SYS_FUTEX = 240 + SYS_SCHED_SETAFFINITY = 241 + SYS_SCHED_GETAFFINITY = 242 + SYS_IO_SETUP = 243 + SYS_IO_DESTROY = 244 + SYS_IO_GETEVENTS = 245 + SYS_IO_SUBMIT = 246 + SYS_IO_CANCEL = 247 + SYS_EXIT_GROUP = 248 + SYS_LOOKUP_DCOOKIE = 249 + SYS_EPOLL_CREATE = 250 + SYS_EPOLL_CTL = 251 + SYS_EPOLL_WAIT = 252 + SYS_REMAP_FILE_PAGES = 253 + SYS_SET_TID_ADDRESS = 256 + SYS_TIMER_CREATE = 257 + SYS_TIMER_SETTIME = 258 + SYS_TIMER_GETTIME = 259 + SYS_TIMER_GETOVERRUN = 260 + SYS_TIMER_DELETE = 261 + SYS_CLOCK_SETTIME = 262 + SYS_CLOCK_GETTIME = 263 + SYS_CLOCK_GETRES = 264 + SYS_CLOCK_NANOSLEEP = 265 + SYS_STATFS64 = 266 + SYS_FSTATFS64 = 267 + SYS_TGKILL = 268 + SYS_UTIMES = 269 + SYS_ARM_FADVISE64_64 = 270 + SYS_PCICONFIG_IOBASE = 271 + SYS_PCICONFIG_READ = 272 + SYS_PCICONFIG_WRITE = 273 + SYS_MQ_OPEN = 274 + SYS_MQ_UNLINK = 275 + SYS_MQ_TIMEDSEND = 276 + SYS_MQ_TIMEDRECEIVE = 277 + SYS_MQ_NOTIFY = 278 + SYS_MQ_GETSETATTR = 279 + SYS_WAITID = 280 + SYS_SOCKET = 281 + SYS_BIND = 282 + SYS_CONNECT = 283 + SYS_LISTEN = 284 + SYS_ACCEPT = 285 + SYS_GETSOCKNAME = 286 + SYS_GETPEERNAME = 287 + SYS_SOCKETPAIR = 288 + SYS_SEND = 289 + SYS_SENDTO = 290 + SYS_RECV = 291 + SYS_RECVFROM = 292 + SYS_SHUTDOWN = 293 + SYS_SETSOCKOPT = 294 + SYS_GETSOCKOPT = 295 + SYS_SENDMSG = 296 + SYS_RECVMSG = 297 + SYS_SEMOP = 298 + SYS_SEMGET = 299 + SYS_SEMCTL = 300 + SYS_MSGSND = 301 + SYS_MSGRCV = 302 + SYS_MSGGET = 303 + SYS_MSGCTL = 304 + SYS_SHMAT = 305 + SYS_SHMDT = 306 + SYS_SHMGET = 307 + SYS_SHMCTL = 308 + SYS_ADD_KEY = 309 + SYS_REQUEST_KEY = 310 + SYS_KEYCTL = 311 + SYS_SEMTIMEDOP = 312 + SYS_VSERVER = 313 + SYS_IOPRIO_SET = 314 + SYS_IOPRIO_GET = 315 + SYS_INOTIFY_INIT = 316 + SYS_INOTIFY_ADD_WATCH = 317 + SYS_INOTIFY_RM_WATCH = 318 + SYS_MBIND = 319 + SYS_GET_MEMPOLICY = 320 + SYS_SET_MEMPOLICY = 321 + SYS_OPENAT = 322 + SYS_MKDIRAT = 323 + SYS_MKNODAT = 324 + SYS_FCHOWNAT = 325 + SYS_FUTIMESAT = 326 + SYS_FSTATAT64 = 327 + SYS_UNLINKAT = 328 + SYS_RENAMEAT = 329 + SYS_LINKAT = 330 + SYS_SYMLINKAT = 331 + SYS_READLINKAT = 332 + SYS_FCHMODAT = 333 + SYS_FACCESSAT = 334 + SYS_PSELECT6 = 335 + SYS_PPOLL = 336 + SYS_UNSHARE = 337 + SYS_SET_ROBUST_LIST = 338 + SYS_GET_ROBUST_LIST = 339 + SYS_SPLICE = 340 + SYS_ARM_SYNC_FILE_RANGE = 341 + SYS_TEE = 342 + SYS_VMSPLICE = 343 + SYS_MOVE_PAGES = 344 + SYS_GETCPU = 345 + SYS_EPOLL_PWAIT = 346 + SYS_KEXEC_LOAD = 347 + SYS_UTIMENSAT = 348 + SYS_SIGNALFD = 349 + SYS_TIMERFD_CREATE = 350 + SYS_EVENTFD = 351 + SYS_FALLOCATE = 352 + SYS_TIMERFD_SETTIME = 353 + SYS_TIMERFD_GETTIME = 354 + SYS_SIGNALFD4 = 355 + SYS_EVENTFD2 = 356 + SYS_EPOLL_CREATE1 = 357 + SYS_DUP3 = 358 + SYS_PIPE2 = 359 + SYS_INOTIFY_INIT1 = 360 + SYS_PREADV = 361 + SYS_PWRITEV = 362 + SYS_RT_TGSIGQUEUEINFO = 363 + SYS_PERF_EVENT_OPEN = 364 + SYS_RECVMMSG = 365 + SYS_ACCEPT4 = 366 + SYS_FANOTIFY_INIT = 367 + SYS_FANOTIFY_MARK = 368 + SYS_PRLIMIT64 = 369 + SYS_NAME_TO_HANDLE_AT = 370 + SYS_OPEN_BY_HANDLE_AT = 371 + SYS_CLOCK_ADJTIME = 372 + SYS_SYNCFS = 373 + SYS_SENDMMSG = 374 + SYS_SETNS = 375 + SYS_PROCESS_VM_READV = 376 + SYS_PROCESS_VM_WRITEV = 377 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go new file mode 100644 index 000000000..2e9514f28 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -0,0 +1,272 @@ +// mksysnum_linux.pl /usr/include/asm-generic/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build arm64,linux + +package unix + +const ( + SYS_IO_SETUP = 0 + SYS_IO_DESTROY = 1 + SYS_IO_SUBMIT = 2 + SYS_IO_CANCEL = 3 + SYS_IO_GETEVENTS = 4 + SYS_SETXATTR = 5 + SYS_LSETXATTR = 6 + SYS_FSETXATTR = 7 + SYS_GETXATTR = 8 + SYS_LGETXATTR = 9 + SYS_FGETXATTR = 10 + SYS_LISTXATTR = 11 + SYS_LLISTXATTR = 12 + SYS_FLISTXATTR = 13 + SYS_REMOVEXATTR = 14 + SYS_LREMOVEXATTR = 15 + SYS_FREMOVEXATTR = 16 + SYS_GETCWD = 17 + SYS_LOOKUP_DCOOKIE = 18 + SYS_EVENTFD2 = 19 + SYS_EPOLL_CREATE1 = 20 + SYS_EPOLL_CTL = 21 + SYS_EPOLL_PWAIT = 22 + SYS_DUP = 23 + SYS_DUP3 = 24 + SYS_FCNTL = 25 + SYS_INOTIFY_INIT1 = 26 + SYS_INOTIFY_ADD_WATCH = 27 + SYS_INOTIFY_RM_WATCH = 28 + SYS_IOCTL = 29 + SYS_IOPRIO_SET = 30 + SYS_IOPRIO_GET = 31 + SYS_FLOCK = 32 + SYS_MKNODAT = 33 + SYS_MKDIRAT = 34 + SYS_UNLINKAT = 35 + SYS_SYMLINKAT = 36 + SYS_LINKAT = 37 + SYS_RENAMEAT = 38 + SYS_UMOUNT2 = 39 + SYS_MOUNT = 40 + SYS_PIVOT_ROOT = 41 + SYS_NFSSERVCTL = 42 + SYS_STATFS = 43 + SYS_FSTATFS = 44 + SYS_TRUNCATE = 45 + SYS_FTRUNCATE = 46 + SYS_FALLOCATE = 47 + SYS_FACCESSAT = 48 + SYS_CHDIR = 49 + SYS_FCHDIR = 50 + SYS_CHROOT = 51 + SYS_FCHMOD = 52 + SYS_FCHMODAT = 53 + SYS_FCHOWNAT = 54 + SYS_FCHOWN = 55 + SYS_OPENAT = 56 + SYS_CLOSE = 57 + SYS_VHANGUP = 58 + SYS_PIPE2 = 59 + SYS_QUOTACTL = 60 + SYS_GETDENTS64 = 61 + SYS_LSEEK = 62 + SYS_READ = 63 + SYS_WRITE = 64 + SYS_READV = 65 + SYS_WRITEV = 66 + SYS_PREAD64 = 67 + SYS_PWRITE64 = 68 + SYS_PREADV = 69 + SYS_PWRITEV = 70 + SYS_SENDFILE = 71 + SYS_PSELECT6 = 72 + SYS_PPOLL = 73 + SYS_SIGNALFD4 = 74 + SYS_VMSPLICE = 75 + SYS_SPLICE = 76 + SYS_TEE = 77 + SYS_READLINKAT = 78 + SYS_FSTATAT = 79 + SYS_FSTAT = 80 + SYS_SYNC = 81 + SYS_FSYNC = 82 + SYS_FDATASYNC = 83 + SYS_SYNC_FILE_RANGE = 84 + SYS_TIMERFD_CREATE = 85 + SYS_TIMERFD_SETTIME = 86 + SYS_TIMERFD_GETTIME = 87 + SYS_UTIMENSAT = 88 + SYS_ACCT = 89 + SYS_CAPGET = 90 + SYS_CAPSET = 91 + SYS_PERSONALITY = 92 + SYS_EXIT = 93 + SYS_EXIT_GROUP = 94 + SYS_WAITID = 95 + SYS_SET_TID_ADDRESS = 96 + SYS_UNSHARE = 97 + SYS_FUTEX = 98 + SYS_SET_ROBUST_LIST = 99 + SYS_GET_ROBUST_LIST = 100 + SYS_NANOSLEEP = 101 + SYS_GETITIMER = 102 + SYS_SETITIMER = 103 + SYS_KEXEC_LOAD = 104 + SYS_INIT_MODULE = 105 + SYS_DELETE_MODULE = 106 + SYS_TIMER_CREATE = 107 + SYS_TIMER_GETTIME = 108 + SYS_TIMER_GETOVERRUN = 109 + SYS_TIMER_SETTIME = 110 + SYS_TIMER_DELETE = 111 + SYS_CLOCK_SETTIME = 112 + SYS_CLOCK_GETTIME = 113 + SYS_CLOCK_GETRES = 114 + SYS_CLOCK_NANOSLEEP = 115 + SYS_SYSLOG = 116 + SYS_PTRACE = 117 + SYS_SCHED_SETPARAM = 118 + SYS_SCHED_SETSCHEDULER = 119 + SYS_SCHED_GETSCHEDULER = 120 + SYS_SCHED_GETPARAM = 121 + SYS_SCHED_SETAFFINITY = 122 + SYS_SCHED_GETAFFINITY = 123 + SYS_SCHED_YIELD = 124 + SYS_SCHED_GET_PRIORITY_MAX = 125 + SYS_SCHED_GET_PRIORITY_MIN = 126 + SYS_SCHED_RR_GET_INTERVAL = 127 + SYS_RESTART_SYSCALL = 128 + SYS_KILL = 129 + SYS_TKILL = 130 + SYS_TGKILL = 131 + SYS_SIGALTSTACK = 132 + SYS_RT_SIGSUSPEND = 133 + SYS_RT_SIGACTION = 134 + SYS_RT_SIGPROCMASK = 135 + SYS_RT_SIGPENDING = 136 + SYS_RT_SIGTIMEDWAIT = 137 + SYS_RT_SIGQUEUEINFO = 138 + SYS_RT_SIGRETURN = 139 + SYS_SETPRIORITY = 140 + SYS_GETPRIORITY = 141 + SYS_REBOOT = 142 + SYS_SETREGID = 143 + SYS_SETGID = 144 + SYS_SETREUID = 145 + SYS_SETUID = 146 + SYS_SETRESUID = 147 + SYS_GETRESUID = 148 + SYS_SETRESGID = 149 + SYS_GETRESGID = 150 + SYS_SETFSUID = 151 + SYS_SETFSGID = 152 + SYS_TIMES = 153 + SYS_SETPGID = 154 + SYS_GETPGID = 155 + SYS_GETSID = 156 + SYS_SETSID = 157 + SYS_GETGROUPS = 158 + SYS_SETGROUPS = 159 + SYS_UNAME = 160 + SYS_SETHOSTNAME = 161 + SYS_SETDOMAINNAME = 162 + SYS_GETRLIMIT = 163 + SYS_SETRLIMIT = 164 + SYS_GETRUSAGE = 165 + SYS_UMASK = 166 + SYS_PRCTL = 167 + SYS_GETCPU = 168 + SYS_GETTIMEOFDAY = 169 + SYS_SETTIMEOFDAY = 170 + SYS_ADJTIMEX = 171 + SYS_GETPID = 172 + SYS_GETPPID = 173 + SYS_GETUID = 174 + SYS_GETEUID = 175 + SYS_GETGID = 176 + SYS_GETEGID = 177 + SYS_GETTID = 178 + SYS_SYSINFO = 179 + SYS_MQ_OPEN = 180 + SYS_MQ_UNLINK = 181 + SYS_MQ_TIMEDSEND = 182 + SYS_MQ_TIMEDRECEIVE = 183 + SYS_MQ_NOTIFY = 184 + SYS_MQ_GETSETATTR = 185 + SYS_MSGGET = 186 + SYS_MSGCTL = 187 + SYS_MSGRCV = 188 + SYS_MSGSND = 189 + SYS_SEMGET = 190 + SYS_SEMCTL = 191 + SYS_SEMTIMEDOP = 192 + SYS_SEMOP = 193 + SYS_SHMGET = 194 + SYS_SHMCTL = 195 + SYS_SHMAT = 196 + SYS_SHMDT = 197 + SYS_SOCKET = 198 + SYS_SOCKETPAIR = 199 + SYS_BIND = 200 + SYS_LISTEN = 201 + SYS_ACCEPT = 202 + SYS_CONNECT = 203 + SYS_GETSOCKNAME = 204 + SYS_GETPEERNAME = 205 + SYS_SENDTO = 206 + SYS_RECVFROM = 207 + SYS_SETSOCKOPT = 208 + SYS_GETSOCKOPT = 209 + SYS_SHUTDOWN = 210 + SYS_SENDMSG = 211 + SYS_RECVMSG = 212 + SYS_READAHEAD = 213 + SYS_BRK = 214 + SYS_MUNMAP = 215 + SYS_MREMAP = 216 + SYS_ADD_KEY = 217 + SYS_REQUEST_KEY = 218 + SYS_KEYCTL = 219 + SYS_CLONE = 220 + SYS_EXECVE = 221 + SYS_MMAP = 222 + SYS_FADVISE64 = 223 + SYS_SWAPON = 224 + SYS_SWAPOFF = 225 + SYS_MPROTECT = 226 + SYS_MSYNC = 227 + SYS_MLOCK = 228 + SYS_MUNLOCK = 229 + SYS_MLOCKALL = 230 + SYS_MUNLOCKALL = 231 + SYS_MINCORE = 232 + SYS_MADVISE = 233 + SYS_REMAP_FILE_PAGES = 234 + SYS_MBIND = 235 + SYS_GET_MEMPOLICY = 236 + SYS_SET_MEMPOLICY = 237 + SYS_MIGRATE_PAGES = 238 + SYS_MOVE_PAGES = 239 + SYS_RT_TGSIGQUEUEINFO = 240 + SYS_PERF_EVENT_OPEN = 241 + SYS_ACCEPT4 = 242 + SYS_RECVMMSG = 243 + SYS_ARCH_SPECIFIC_SYSCALL = 244 + SYS_WAIT4 = 260 + SYS_PRLIMIT64 = 261 + SYS_FANOTIFY_INIT = 262 + SYS_FANOTIFY_MARK = 263 + SYS_NAME_TO_HANDLE_AT = 264 + SYS_OPEN_BY_HANDLE_AT = 265 + SYS_CLOCK_ADJTIME = 266 + SYS_SYNCFS = 267 + SYS_SETNS = 268 + SYS_SENDMMSG = 269 + SYS_PROCESS_VM_READV = 270 + SYS_PROCESS_VM_WRITEV = 271 + SYS_KCMP = 272 + SYS_FINIT_MODULE = 273 + SYS_SCHED_SETATTR = 274 + SYS_SCHED_GETATTR = 275 + SYS_RENAMEAT2 = 276 + SYS_SECCOMP = 277 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go new file mode 100644 index 000000000..5ffe1c719 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -0,0 +1,327 @@ +// mksysnum_linux.pl /usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build mips64,linux + +package unix + +const ( + SYS_READ = 5000 + SYS_WRITE = 5001 + SYS_OPEN = 5002 + SYS_CLOSE = 5003 + SYS_STAT = 5004 + SYS_FSTAT = 5005 + SYS_LSTAT = 5006 + SYS_POLL = 5007 + SYS_LSEEK = 5008 + SYS_MMAP = 5009 + SYS_MPROTECT = 5010 + SYS_MUNMAP = 5011 + SYS_BRK = 5012 + SYS_RT_SIGACTION = 5013 + SYS_RT_SIGPROCMASK = 5014 + SYS_IOCTL = 5015 + SYS_PREAD64 = 5016 + SYS_PWRITE64 = 5017 + SYS_READV = 5018 + SYS_WRITEV = 5019 + SYS_ACCESS = 5020 + SYS_PIPE = 5021 + SYS__NEWSELECT = 5022 + SYS_SCHED_YIELD = 5023 + SYS_MREMAP = 5024 + SYS_MSYNC = 5025 + SYS_MINCORE = 5026 + SYS_MADVISE = 5027 + SYS_SHMGET = 5028 + SYS_SHMAT = 5029 + SYS_SHMCTL = 5030 + SYS_DUP = 5031 + SYS_DUP2 = 5032 + SYS_PAUSE = 5033 + SYS_NANOSLEEP = 5034 + SYS_GETITIMER = 5035 + SYS_SETITIMER = 5036 + SYS_ALARM = 5037 + SYS_GETPID = 5038 + SYS_SENDFILE = 5039 + SYS_SOCKET = 5040 + SYS_CONNECT = 5041 + SYS_ACCEPT = 5042 + SYS_SENDTO = 5043 + SYS_RECVFROM = 5044 + SYS_SENDMSG = 5045 + SYS_RECVMSG = 5046 + SYS_SHUTDOWN = 5047 + SYS_BIND = 5048 + SYS_LISTEN = 5049 + SYS_GETSOCKNAME = 5050 + SYS_GETPEERNAME = 5051 + SYS_SOCKETPAIR = 5052 + SYS_SETSOCKOPT = 5053 + SYS_GETSOCKOPT = 5054 + SYS_CLONE = 5055 + SYS_FORK = 5056 + SYS_EXECVE = 5057 + SYS_EXIT = 5058 + SYS_WAIT4 = 5059 + SYS_KILL = 5060 + SYS_UNAME = 5061 + SYS_SEMGET = 5062 + SYS_SEMOP = 5063 + SYS_SEMCTL = 5064 + SYS_SHMDT = 5065 + SYS_MSGGET = 5066 + SYS_MSGSND = 5067 + SYS_MSGRCV = 5068 + SYS_MSGCTL = 5069 + SYS_FCNTL = 5070 + SYS_FLOCK = 5071 + SYS_FSYNC = 5072 + SYS_FDATASYNC = 5073 + SYS_TRUNCATE = 5074 + SYS_FTRUNCATE = 5075 + SYS_GETDENTS = 5076 + SYS_GETCWD = 5077 + SYS_CHDIR = 5078 + SYS_FCHDIR = 5079 + SYS_RENAME = 5080 + SYS_MKDIR = 5081 + SYS_RMDIR = 5082 + SYS_CREAT = 5083 + SYS_LINK = 5084 + SYS_UNLINK = 5085 + SYS_SYMLINK = 5086 + SYS_READLINK = 5087 + SYS_CHMOD = 5088 + SYS_FCHMOD = 5089 + SYS_CHOWN = 5090 + SYS_FCHOWN = 5091 + SYS_LCHOWN = 5092 + SYS_UMASK = 5093 + SYS_GETTIMEOFDAY = 5094 + SYS_GETRLIMIT = 5095 + SYS_GETRUSAGE = 5096 + SYS_SYSINFO = 5097 + SYS_TIMES = 5098 + SYS_PTRACE = 5099 + SYS_GETUID = 5100 + SYS_SYSLOG = 5101 + SYS_GETGID = 5102 + SYS_SETUID = 5103 + SYS_SETGID = 5104 + SYS_GETEUID = 5105 + SYS_GETEGID = 5106 + SYS_SETPGID = 5107 + SYS_GETPPID = 5108 + SYS_GETPGRP = 5109 + SYS_SETSID = 5110 + SYS_SETREUID = 5111 + SYS_SETREGID = 5112 + SYS_GETGROUPS = 5113 + SYS_SETGROUPS = 5114 + SYS_SETRESUID = 5115 + SYS_GETRESUID = 5116 + SYS_SETRESGID = 5117 + SYS_GETRESGID = 5118 + SYS_GETPGID = 5119 + SYS_SETFSUID = 5120 + SYS_SETFSGID = 5121 + SYS_GETSID = 5122 + SYS_CAPGET = 5123 + SYS_CAPSET = 5124 + SYS_RT_SIGPENDING = 5125 + SYS_RT_SIGTIMEDWAIT = 5126 + SYS_RT_SIGQUEUEINFO = 5127 + SYS_RT_SIGSUSPEND = 5128 + SYS_SIGALTSTACK = 5129 + SYS_UTIME = 5130 + SYS_MKNOD = 5131 + SYS_PERSONALITY = 5132 + SYS_USTAT = 5133 + SYS_STATFS = 5134 + SYS_FSTATFS = 5135 + SYS_SYSFS = 5136 + SYS_GETPRIORITY = 5137 + SYS_SETPRIORITY = 5138 + SYS_SCHED_SETPARAM = 5139 + SYS_SCHED_GETPARAM = 5140 + SYS_SCHED_SETSCHEDULER = 5141 + SYS_SCHED_GETSCHEDULER = 5142 + SYS_SCHED_GET_PRIORITY_MAX = 5143 + SYS_SCHED_GET_PRIORITY_MIN = 5144 + SYS_SCHED_RR_GET_INTERVAL = 5145 + SYS_MLOCK = 5146 + SYS_MUNLOCK = 5147 + SYS_MLOCKALL = 5148 + SYS_MUNLOCKALL = 5149 + SYS_VHANGUP = 5150 + SYS_PIVOT_ROOT = 5151 + SYS__SYSCTL = 5152 + SYS_PRCTL = 5153 + SYS_ADJTIMEX = 5154 + SYS_SETRLIMIT = 5155 + SYS_CHROOT = 5156 + SYS_SYNC = 5157 + SYS_ACCT = 5158 + SYS_SETTIMEOFDAY = 5159 + SYS_MOUNT = 5160 + SYS_UMOUNT2 = 5161 + SYS_SWAPON = 5162 + SYS_SWAPOFF = 5163 + SYS_REBOOT = 5164 + SYS_SETHOSTNAME = 5165 + SYS_SETDOMAINNAME = 5166 + SYS_CREATE_MODULE = 5167 + SYS_INIT_MODULE = 5168 + SYS_DELETE_MODULE = 5169 + SYS_GET_KERNEL_SYMS = 5170 + SYS_QUERY_MODULE = 5171 + SYS_QUOTACTL = 5172 + SYS_NFSSERVCTL = 5173 + SYS_GETPMSG = 5174 + SYS_PUTPMSG = 5175 + SYS_AFS_SYSCALL = 5176 + SYS_RESERVED177 = 5177 + SYS_GETTID = 5178 + SYS_READAHEAD = 5179 + SYS_SETXATTR = 5180 + SYS_LSETXATTR = 5181 + SYS_FSETXATTR = 5182 + SYS_GETXATTR = 5183 + SYS_LGETXATTR = 5184 + SYS_FGETXATTR = 5185 + SYS_LISTXATTR = 5186 + SYS_LLISTXATTR = 5187 + SYS_FLISTXATTR = 5188 + SYS_REMOVEXATTR = 5189 + SYS_LREMOVEXATTR = 5190 + SYS_FREMOVEXATTR = 5191 + SYS_TKILL = 5192 + SYS_RESERVED193 = 5193 + SYS_FUTEX = 5194 + SYS_SCHED_SETAFFINITY = 5195 + SYS_SCHED_GETAFFINITY = 5196 + SYS_CACHEFLUSH = 5197 + SYS_CACHECTL = 5198 + SYS_SYSMIPS = 5199 + SYS_IO_SETUP = 5200 + SYS_IO_DESTROY = 5201 + SYS_IO_GETEVENTS = 5202 + SYS_IO_SUBMIT = 5203 + SYS_IO_CANCEL = 5204 + SYS_EXIT_GROUP = 5205 + SYS_LOOKUP_DCOOKIE = 5206 + SYS_EPOLL_CREATE = 5207 + SYS_EPOLL_CTL = 5208 + SYS_EPOLL_WAIT = 5209 + SYS_REMAP_FILE_PAGES = 5210 + SYS_RT_SIGRETURN = 5211 + SYS_SET_TID_ADDRESS = 5212 + SYS_RESTART_SYSCALL = 5213 + SYS_SEMTIMEDOP = 5214 + SYS_FADVISE64 = 5215 + SYS_TIMER_CREATE = 5216 + SYS_TIMER_SETTIME = 5217 + SYS_TIMER_GETTIME = 5218 + SYS_TIMER_GETOVERRUN = 5219 + SYS_TIMER_DELETE = 5220 + SYS_CLOCK_SETTIME = 5221 + SYS_CLOCK_GETTIME = 5222 + SYS_CLOCK_GETRES = 5223 + SYS_CLOCK_NANOSLEEP = 5224 + SYS_TGKILL = 5225 + SYS_UTIMES = 5226 + SYS_MBIND = 5227 + SYS_GET_MEMPOLICY = 5228 + SYS_SET_MEMPOLICY = 5229 + SYS_MQ_OPEN = 5230 + SYS_MQ_UNLINK = 5231 + SYS_MQ_TIMEDSEND = 5232 + SYS_MQ_TIMEDRECEIVE = 5233 + SYS_MQ_NOTIFY = 5234 + SYS_MQ_GETSETATTR = 5235 + SYS_VSERVER = 5236 + SYS_WAITID = 5237 + SYS_ADD_KEY = 5239 + SYS_REQUEST_KEY = 5240 + SYS_KEYCTL = 5241 + SYS_SET_THREAD_AREA = 5242 + SYS_INOTIFY_INIT = 5243 + SYS_INOTIFY_ADD_WATCH = 5244 + SYS_INOTIFY_RM_WATCH = 5245 + SYS_MIGRATE_PAGES = 5246 + SYS_OPENAT = 5247 + SYS_MKDIRAT = 5248 + SYS_MKNODAT = 5249 + SYS_FCHOWNAT = 5250 + SYS_FUTIMESAT = 5251 + SYS_NEWFSTATAT = 5252 + SYS_UNLINKAT = 5253 + SYS_RENAMEAT = 5254 + SYS_LINKAT = 5255 + SYS_SYMLINKAT = 5256 + SYS_READLINKAT = 5257 + SYS_FCHMODAT = 5258 + SYS_FACCESSAT = 5259 + SYS_PSELECT6 = 5260 + SYS_PPOLL = 5261 + SYS_UNSHARE = 5262 + SYS_SPLICE = 5263 + SYS_SYNC_FILE_RANGE = 5264 + SYS_TEE = 5265 + SYS_VMSPLICE = 5266 + SYS_MOVE_PAGES = 5267 + SYS_SET_ROBUST_LIST = 5268 + SYS_GET_ROBUST_LIST = 5269 + SYS_KEXEC_LOAD = 5270 + SYS_GETCPU = 5271 + SYS_EPOLL_PWAIT = 5272 + SYS_IOPRIO_SET = 5273 + SYS_IOPRIO_GET = 5274 + SYS_UTIMENSAT = 5275 + SYS_SIGNALFD = 5276 + SYS_TIMERFD = 5277 + SYS_EVENTFD = 5278 + SYS_FALLOCATE = 5279 + SYS_TIMERFD_CREATE = 5280 + SYS_TIMERFD_GETTIME = 5281 + SYS_TIMERFD_SETTIME = 5282 + SYS_SIGNALFD4 = 5283 + SYS_EVENTFD2 = 5284 + SYS_EPOLL_CREATE1 = 5285 + SYS_DUP3 = 5286 + SYS_PIPE2 = 5287 + SYS_INOTIFY_INIT1 = 5288 + SYS_PREADV = 5289 + SYS_PWRITEV = 5290 + SYS_RT_TGSIGQUEUEINFO = 5291 + SYS_PERF_EVENT_OPEN = 5292 + SYS_ACCEPT4 = 5293 + SYS_RECVMMSG = 5294 + SYS_FANOTIFY_INIT = 5295 + SYS_FANOTIFY_MARK = 5296 + SYS_PRLIMIT64 = 5297 + SYS_NAME_TO_HANDLE_AT = 5298 + SYS_OPEN_BY_HANDLE_AT = 5299 + SYS_CLOCK_ADJTIME = 5300 + SYS_SYNCFS = 5301 + SYS_SENDMMSG = 5302 + SYS_SETNS = 5303 + SYS_PROCESS_VM_READV = 5304 + SYS_PROCESS_VM_WRITEV = 5305 + SYS_KCMP = 5306 + SYS_FINIT_MODULE = 5307 + SYS_GETDENTS64 = 5308 + SYS_SCHED_SETATTR = 5309 + SYS_SCHED_GETATTR = 5310 + SYS_RENAMEAT2 = 5311 + SYS_SECCOMP = 5312 + SYS_GETRANDOM = 5313 + SYS_MEMFD_CREATE = 5314 + SYS_BPF = 5315 + SYS_EXECVEAT = 5316 + SYS_USERFAULTFD = 5317 + SYS_MEMBARRIER = 5318 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go new file mode 100644 index 000000000..d192b940c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -0,0 +1,327 @@ +// mksysnum_linux.pl /usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build mips64le,linux + +package unix + +const ( + SYS_READ = 5000 + SYS_WRITE = 5001 + SYS_OPEN = 5002 + SYS_CLOSE = 5003 + SYS_STAT = 5004 + SYS_FSTAT = 5005 + SYS_LSTAT = 5006 + SYS_POLL = 5007 + SYS_LSEEK = 5008 + SYS_MMAP = 5009 + SYS_MPROTECT = 5010 + SYS_MUNMAP = 5011 + SYS_BRK = 5012 + SYS_RT_SIGACTION = 5013 + SYS_RT_SIGPROCMASK = 5014 + SYS_IOCTL = 5015 + SYS_PREAD64 = 5016 + SYS_PWRITE64 = 5017 + SYS_READV = 5018 + SYS_WRITEV = 5019 + SYS_ACCESS = 5020 + SYS_PIPE = 5021 + SYS__NEWSELECT = 5022 + SYS_SCHED_YIELD = 5023 + SYS_MREMAP = 5024 + SYS_MSYNC = 5025 + SYS_MINCORE = 5026 + SYS_MADVISE = 5027 + SYS_SHMGET = 5028 + SYS_SHMAT = 5029 + SYS_SHMCTL = 5030 + SYS_DUP = 5031 + SYS_DUP2 = 5032 + SYS_PAUSE = 5033 + SYS_NANOSLEEP = 5034 + SYS_GETITIMER = 5035 + SYS_SETITIMER = 5036 + SYS_ALARM = 5037 + SYS_GETPID = 5038 + SYS_SENDFILE = 5039 + SYS_SOCKET = 5040 + SYS_CONNECT = 5041 + SYS_ACCEPT = 5042 + SYS_SENDTO = 5043 + SYS_RECVFROM = 5044 + SYS_SENDMSG = 5045 + SYS_RECVMSG = 5046 + SYS_SHUTDOWN = 5047 + SYS_BIND = 5048 + SYS_LISTEN = 5049 + SYS_GETSOCKNAME = 5050 + SYS_GETPEERNAME = 5051 + SYS_SOCKETPAIR = 5052 + SYS_SETSOCKOPT = 5053 + SYS_GETSOCKOPT = 5054 + SYS_CLONE = 5055 + SYS_FORK = 5056 + SYS_EXECVE = 5057 + SYS_EXIT = 5058 + SYS_WAIT4 = 5059 + SYS_KILL = 5060 + SYS_UNAME = 5061 + SYS_SEMGET = 5062 + SYS_SEMOP = 5063 + SYS_SEMCTL = 5064 + SYS_SHMDT = 5065 + SYS_MSGGET = 5066 + SYS_MSGSND = 5067 + SYS_MSGRCV = 5068 + SYS_MSGCTL = 5069 + SYS_FCNTL = 5070 + SYS_FLOCK = 5071 + SYS_FSYNC = 5072 + SYS_FDATASYNC = 5073 + SYS_TRUNCATE = 5074 + SYS_FTRUNCATE = 5075 + SYS_GETDENTS = 5076 + SYS_GETCWD = 5077 + SYS_CHDIR = 5078 + SYS_FCHDIR = 5079 + SYS_RENAME = 5080 + SYS_MKDIR = 5081 + SYS_RMDIR = 5082 + SYS_CREAT = 5083 + SYS_LINK = 5084 + SYS_UNLINK = 5085 + SYS_SYMLINK = 5086 + SYS_READLINK = 5087 + SYS_CHMOD = 5088 + SYS_FCHMOD = 5089 + SYS_CHOWN = 5090 + SYS_FCHOWN = 5091 + SYS_LCHOWN = 5092 + SYS_UMASK = 5093 + SYS_GETTIMEOFDAY = 5094 + SYS_GETRLIMIT = 5095 + SYS_GETRUSAGE = 5096 + SYS_SYSINFO = 5097 + SYS_TIMES = 5098 + SYS_PTRACE = 5099 + SYS_GETUID = 5100 + SYS_SYSLOG = 5101 + SYS_GETGID = 5102 + SYS_SETUID = 5103 + SYS_SETGID = 5104 + SYS_GETEUID = 5105 + SYS_GETEGID = 5106 + SYS_SETPGID = 5107 + SYS_GETPPID = 5108 + SYS_GETPGRP = 5109 + SYS_SETSID = 5110 + SYS_SETREUID = 5111 + SYS_SETREGID = 5112 + SYS_GETGROUPS = 5113 + SYS_SETGROUPS = 5114 + SYS_SETRESUID = 5115 + SYS_GETRESUID = 5116 + SYS_SETRESGID = 5117 + SYS_GETRESGID = 5118 + SYS_GETPGID = 5119 + SYS_SETFSUID = 5120 + SYS_SETFSGID = 5121 + SYS_GETSID = 5122 + SYS_CAPGET = 5123 + SYS_CAPSET = 5124 + SYS_RT_SIGPENDING = 5125 + SYS_RT_SIGTIMEDWAIT = 5126 + SYS_RT_SIGQUEUEINFO = 5127 + SYS_RT_SIGSUSPEND = 5128 + SYS_SIGALTSTACK = 5129 + SYS_UTIME = 5130 + SYS_MKNOD = 5131 + SYS_PERSONALITY = 5132 + SYS_USTAT = 5133 + SYS_STATFS = 5134 + SYS_FSTATFS = 5135 + SYS_SYSFS = 5136 + SYS_GETPRIORITY = 5137 + SYS_SETPRIORITY = 5138 + SYS_SCHED_SETPARAM = 5139 + SYS_SCHED_GETPARAM = 5140 + SYS_SCHED_SETSCHEDULER = 5141 + SYS_SCHED_GETSCHEDULER = 5142 + SYS_SCHED_GET_PRIORITY_MAX = 5143 + SYS_SCHED_GET_PRIORITY_MIN = 5144 + SYS_SCHED_RR_GET_INTERVAL = 5145 + SYS_MLOCK = 5146 + SYS_MUNLOCK = 5147 + SYS_MLOCKALL = 5148 + SYS_MUNLOCKALL = 5149 + SYS_VHANGUP = 5150 + SYS_PIVOT_ROOT = 5151 + SYS__SYSCTL = 5152 + SYS_PRCTL = 5153 + SYS_ADJTIMEX = 5154 + SYS_SETRLIMIT = 5155 + SYS_CHROOT = 5156 + SYS_SYNC = 5157 + SYS_ACCT = 5158 + SYS_SETTIMEOFDAY = 5159 + SYS_MOUNT = 5160 + SYS_UMOUNT2 = 5161 + SYS_SWAPON = 5162 + SYS_SWAPOFF = 5163 + SYS_REBOOT = 5164 + SYS_SETHOSTNAME = 5165 + SYS_SETDOMAINNAME = 5166 + SYS_CREATE_MODULE = 5167 + SYS_INIT_MODULE = 5168 + SYS_DELETE_MODULE = 5169 + SYS_GET_KERNEL_SYMS = 5170 + SYS_QUERY_MODULE = 5171 + SYS_QUOTACTL = 5172 + SYS_NFSSERVCTL = 5173 + SYS_GETPMSG = 5174 + SYS_PUTPMSG = 5175 + SYS_AFS_SYSCALL = 5176 + SYS_RESERVED177 = 5177 + SYS_GETTID = 5178 + SYS_READAHEAD = 5179 + SYS_SETXATTR = 5180 + SYS_LSETXATTR = 5181 + SYS_FSETXATTR = 5182 + SYS_GETXATTR = 5183 + SYS_LGETXATTR = 5184 + SYS_FGETXATTR = 5185 + SYS_LISTXATTR = 5186 + SYS_LLISTXATTR = 5187 + SYS_FLISTXATTR = 5188 + SYS_REMOVEXATTR = 5189 + SYS_LREMOVEXATTR = 5190 + SYS_FREMOVEXATTR = 5191 + SYS_TKILL = 5192 + SYS_RESERVED193 = 5193 + SYS_FUTEX = 5194 + SYS_SCHED_SETAFFINITY = 5195 + SYS_SCHED_GETAFFINITY = 5196 + SYS_CACHEFLUSH = 5197 + SYS_CACHECTL = 5198 + SYS_SYSMIPS = 5199 + SYS_IO_SETUP = 5200 + SYS_IO_DESTROY = 5201 + SYS_IO_GETEVENTS = 5202 + SYS_IO_SUBMIT = 5203 + SYS_IO_CANCEL = 5204 + SYS_EXIT_GROUP = 5205 + SYS_LOOKUP_DCOOKIE = 5206 + SYS_EPOLL_CREATE = 5207 + SYS_EPOLL_CTL = 5208 + SYS_EPOLL_WAIT = 5209 + SYS_REMAP_FILE_PAGES = 5210 + SYS_RT_SIGRETURN = 5211 + SYS_SET_TID_ADDRESS = 5212 + SYS_RESTART_SYSCALL = 5213 + SYS_SEMTIMEDOP = 5214 + SYS_FADVISE64 = 5215 + SYS_TIMER_CREATE = 5216 + SYS_TIMER_SETTIME = 5217 + SYS_TIMER_GETTIME = 5218 + SYS_TIMER_GETOVERRUN = 5219 + SYS_TIMER_DELETE = 5220 + SYS_CLOCK_SETTIME = 5221 + SYS_CLOCK_GETTIME = 5222 + SYS_CLOCK_GETRES = 5223 + SYS_CLOCK_NANOSLEEP = 5224 + SYS_TGKILL = 5225 + SYS_UTIMES = 5226 + SYS_MBIND = 5227 + SYS_GET_MEMPOLICY = 5228 + SYS_SET_MEMPOLICY = 5229 + SYS_MQ_OPEN = 5230 + SYS_MQ_UNLINK = 5231 + SYS_MQ_TIMEDSEND = 5232 + SYS_MQ_TIMEDRECEIVE = 5233 + SYS_MQ_NOTIFY = 5234 + SYS_MQ_GETSETATTR = 5235 + SYS_VSERVER = 5236 + SYS_WAITID = 5237 + SYS_ADD_KEY = 5239 + SYS_REQUEST_KEY = 5240 + SYS_KEYCTL = 5241 + SYS_SET_THREAD_AREA = 5242 + SYS_INOTIFY_INIT = 5243 + SYS_INOTIFY_ADD_WATCH = 5244 + SYS_INOTIFY_RM_WATCH = 5245 + SYS_MIGRATE_PAGES = 5246 + SYS_OPENAT = 5247 + SYS_MKDIRAT = 5248 + SYS_MKNODAT = 5249 + SYS_FCHOWNAT = 5250 + SYS_FUTIMESAT = 5251 + SYS_NEWFSTATAT = 5252 + SYS_UNLINKAT = 5253 + SYS_RENAMEAT = 5254 + SYS_LINKAT = 5255 + SYS_SYMLINKAT = 5256 + SYS_READLINKAT = 5257 + SYS_FCHMODAT = 5258 + SYS_FACCESSAT = 5259 + SYS_PSELECT6 = 5260 + SYS_PPOLL = 5261 + SYS_UNSHARE = 5262 + SYS_SPLICE = 5263 + SYS_SYNC_FILE_RANGE = 5264 + SYS_TEE = 5265 + SYS_VMSPLICE = 5266 + SYS_MOVE_PAGES = 5267 + SYS_SET_ROBUST_LIST = 5268 + SYS_GET_ROBUST_LIST = 5269 + SYS_KEXEC_LOAD = 5270 + SYS_GETCPU = 5271 + SYS_EPOLL_PWAIT = 5272 + SYS_IOPRIO_SET = 5273 + SYS_IOPRIO_GET = 5274 + SYS_UTIMENSAT = 5275 + SYS_SIGNALFD = 5276 + SYS_TIMERFD = 5277 + SYS_EVENTFD = 5278 + SYS_FALLOCATE = 5279 + SYS_TIMERFD_CREATE = 5280 + SYS_TIMERFD_GETTIME = 5281 + SYS_TIMERFD_SETTIME = 5282 + SYS_SIGNALFD4 = 5283 + SYS_EVENTFD2 = 5284 + SYS_EPOLL_CREATE1 = 5285 + SYS_DUP3 = 5286 + SYS_PIPE2 = 5287 + SYS_INOTIFY_INIT1 = 5288 + SYS_PREADV = 5289 + SYS_PWRITEV = 5290 + SYS_RT_TGSIGQUEUEINFO = 5291 + SYS_PERF_EVENT_OPEN = 5292 + SYS_ACCEPT4 = 5293 + SYS_RECVMMSG = 5294 + SYS_FANOTIFY_INIT = 5295 + SYS_FANOTIFY_MARK = 5296 + SYS_PRLIMIT64 = 5297 + SYS_NAME_TO_HANDLE_AT = 5298 + SYS_OPEN_BY_HANDLE_AT = 5299 + SYS_CLOCK_ADJTIME = 5300 + SYS_SYNCFS = 5301 + SYS_SENDMMSG = 5302 + SYS_SETNS = 5303 + SYS_PROCESS_VM_READV = 5304 + SYS_PROCESS_VM_WRITEV = 5305 + SYS_KCMP = 5306 + SYS_FINIT_MODULE = 5307 + SYS_GETDENTS64 = 5308 + SYS_SCHED_SETATTR = 5309 + SYS_SCHED_GETATTR = 5310 + SYS_RENAMEAT2 = 5311 + SYS_SECCOMP = 5312 + SYS_GETRANDOM = 5313 + SYS_MEMFD_CREATE = 5314 + SYS_BPF = 5315 + SYS_EXECVEAT = 5316 + SYS_USERFAULTFD = 5317 + SYS_MEMBARRIER = 5318 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go new file mode 100644 index 000000000..e1b08f00d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -0,0 +1,360 @@ +// mksysnum_linux.pl /usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build ppc64,linux + +package unix + +const ( + SYS_RESTART_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_WAITPID = 7 + SYS_CREAT = 8 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_EXECVE = 11 + SYS_CHDIR = 12 + SYS_TIME = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_LCHOWN = 16 + SYS_BREAK = 17 + SYS_OLDSTAT = 18 + SYS_LSEEK = 19 + SYS_GETPID = 20 + SYS_MOUNT = 21 + SYS_UMOUNT = 22 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_STIME = 25 + SYS_PTRACE = 26 + SYS_ALARM = 27 + SYS_OLDFSTAT = 28 + SYS_PAUSE = 29 + SYS_UTIME = 30 + SYS_STTY = 31 + SYS_GTTY = 32 + SYS_ACCESS = 33 + SYS_NICE = 34 + SYS_FTIME = 35 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_RENAME = 38 + SYS_MKDIR = 39 + SYS_RMDIR = 40 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_TIMES = 43 + SYS_PROF = 44 + SYS_BRK = 45 + SYS_SETGID = 46 + SYS_GETGID = 47 + SYS_SIGNAL = 48 + SYS_GETEUID = 49 + SYS_GETEGID = 50 + SYS_ACCT = 51 + SYS_UMOUNT2 = 52 + SYS_LOCK = 53 + SYS_IOCTL = 54 + SYS_FCNTL = 55 + SYS_MPX = 56 + SYS_SETPGID = 57 + SYS_ULIMIT = 58 + SYS_OLDOLDUNAME = 59 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_USTAT = 62 + SYS_DUP2 = 63 + SYS_GETPPID = 64 + SYS_GETPGRP = 65 + SYS_SETSID = 66 + SYS_SIGACTION = 67 + SYS_SGETMASK = 68 + SYS_SSETMASK = 69 + SYS_SETREUID = 70 + SYS_SETREGID = 71 + SYS_SIGSUSPEND = 72 + SYS_SIGPENDING = 73 + SYS_SETHOSTNAME = 74 + SYS_SETRLIMIT = 75 + SYS_GETRLIMIT = 76 + SYS_GETRUSAGE = 77 + SYS_GETTIMEOFDAY = 78 + SYS_SETTIMEOFDAY = 79 + SYS_GETGROUPS = 80 + SYS_SETGROUPS = 81 + SYS_SELECT = 82 + SYS_SYMLINK = 83 + SYS_OLDLSTAT = 84 + SYS_READLINK = 85 + SYS_USELIB = 86 + SYS_SWAPON = 87 + SYS_REBOOT = 88 + SYS_READDIR = 89 + SYS_MMAP = 90 + SYS_MUNMAP = 91 + SYS_TRUNCATE = 92 + SYS_FTRUNCATE = 93 + SYS_FCHMOD = 94 + SYS_FCHOWN = 95 + SYS_GETPRIORITY = 96 + SYS_SETPRIORITY = 97 + SYS_PROFIL = 98 + SYS_STATFS = 99 + SYS_FSTATFS = 100 + SYS_IOPERM = 101 + SYS_SOCKETCALL = 102 + SYS_SYSLOG = 103 + SYS_SETITIMER = 104 + SYS_GETITIMER = 105 + SYS_STAT = 106 + SYS_LSTAT = 107 + SYS_FSTAT = 108 + SYS_OLDUNAME = 109 + SYS_IOPL = 110 + SYS_VHANGUP = 111 + SYS_IDLE = 112 + SYS_VM86 = 113 + SYS_WAIT4 = 114 + SYS_SWAPOFF = 115 + SYS_SYSINFO = 116 + SYS_IPC = 117 + SYS_FSYNC = 118 + SYS_SIGRETURN = 119 + SYS_CLONE = 120 + SYS_SETDOMAINNAME = 121 + SYS_UNAME = 122 + SYS_MODIFY_LDT = 123 + SYS_ADJTIMEX = 124 + SYS_MPROTECT = 125 + SYS_SIGPROCMASK = 126 + SYS_CREATE_MODULE = 127 + SYS_INIT_MODULE = 128 + SYS_DELETE_MODULE = 129 + SYS_GET_KERNEL_SYMS = 130 + SYS_QUOTACTL = 131 + SYS_GETPGID = 132 + SYS_FCHDIR = 133 + SYS_BDFLUSH = 134 + SYS_SYSFS = 135 + SYS_PERSONALITY = 136 + SYS_AFS_SYSCALL = 137 + SYS_SETFSUID = 138 + SYS_SETFSGID = 139 + SYS__LLSEEK = 140 + SYS_GETDENTS = 141 + SYS__NEWSELECT = 142 + SYS_FLOCK = 143 + SYS_MSYNC = 144 + SYS_READV = 145 + SYS_WRITEV = 146 + SYS_GETSID = 147 + SYS_FDATASYNC = 148 + SYS__SYSCTL = 149 + SYS_MLOCK = 150 + SYS_MUNLOCK = 151 + SYS_MLOCKALL = 152 + SYS_MUNLOCKALL = 153 + SYS_SCHED_SETPARAM = 154 + SYS_SCHED_GETPARAM = 155 + SYS_SCHED_SETSCHEDULER = 156 + SYS_SCHED_GETSCHEDULER = 157 + SYS_SCHED_YIELD = 158 + SYS_SCHED_GET_PRIORITY_MAX = 159 + SYS_SCHED_GET_PRIORITY_MIN = 160 + SYS_SCHED_RR_GET_INTERVAL = 161 + SYS_NANOSLEEP = 162 + SYS_MREMAP = 163 + SYS_SETRESUID = 164 + SYS_GETRESUID = 165 + SYS_QUERY_MODULE = 166 + SYS_POLL = 167 + SYS_NFSSERVCTL = 168 + SYS_SETRESGID = 169 + SYS_GETRESGID = 170 + SYS_PRCTL = 171 + SYS_RT_SIGRETURN = 172 + SYS_RT_SIGACTION = 173 + SYS_RT_SIGPROCMASK = 174 + SYS_RT_SIGPENDING = 175 + SYS_RT_SIGTIMEDWAIT = 176 + SYS_RT_SIGQUEUEINFO = 177 + SYS_RT_SIGSUSPEND = 178 + SYS_PREAD64 = 179 + SYS_PWRITE64 = 180 + SYS_CHOWN = 181 + SYS_GETCWD = 182 + SYS_CAPGET = 183 + SYS_CAPSET = 184 + SYS_SIGALTSTACK = 185 + SYS_SENDFILE = 186 + SYS_GETPMSG = 187 + SYS_PUTPMSG = 188 + SYS_VFORK = 189 + SYS_UGETRLIMIT = 190 + SYS_READAHEAD = 191 + SYS_PCICONFIG_READ = 198 + SYS_PCICONFIG_WRITE = 199 + SYS_PCICONFIG_IOBASE = 200 + SYS_MULTIPLEXER = 201 + SYS_GETDENTS64 = 202 + SYS_PIVOT_ROOT = 203 + SYS_MADVISE = 205 + SYS_MINCORE = 206 + SYS_GETTID = 207 + SYS_TKILL = 208 + SYS_SETXATTR = 209 + SYS_LSETXATTR = 210 + SYS_FSETXATTR = 211 + SYS_GETXATTR = 212 + SYS_LGETXATTR = 213 + SYS_FGETXATTR = 214 + SYS_LISTXATTR = 215 + SYS_LLISTXATTR = 216 + SYS_FLISTXATTR = 217 + SYS_REMOVEXATTR = 218 + SYS_LREMOVEXATTR = 219 + SYS_FREMOVEXATTR = 220 + SYS_FUTEX = 221 + SYS_SCHED_SETAFFINITY = 222 + SYS_SCHED_GETAFFINITY = 223 + SYS_TUXCALL = 225 + SYS_IO_SETUP = 227 + SYS_IO_DESTROY = 228 + SYS_IO_GETEVENTS = 229 + SYS_IO_SUBMIT = 230 + SYS_IO_CANCEL = 231 + SYS_SET_TID_ADDRESS = 232 + SYS_FADVISE64 = 233 + SYS_EXIT_GROUP = 234 + SYS_LOOKUP_DCOOKIE = 235 + SYS_EPOLL_CREATE = 236 + SYS_EPOLL_CTL = 237 + SYS_EPOLL_WAIT = 238 + SYS_REMAP_FILE_PAGES = 239 + SYS_TIMER_CREATE = 240 + SYS_TIMER_SETTIME = 241 + SYS_TIMER_GETTIME = 242 + SYS_TIMER_GETOVERRUN = 243 + SYS_TIMER_DELETE = 244 + SYS_CLOCK_SETTIME = 245 + SYS_CLOCK_GETTIME = 246 + SYS_CLOCK_GETRES = 247 + SYS_CLOCK_NANOSLEEP = 248 + SYS_SWAPCONTEXT = 249 + SYS_TGKILL = 250 + SYS_UTIMES = 251 + SYS_STATFS64 = 252 + SYS_FSTATFS64 = 253 + SYS_RTAS = 255 + SYS_SYS_DEBUG_SETCONTEXT = 256 + SYS_MIGRATE_PAGES = 258 + SYS_MBIND = 259 + SYS_GET_MEMPOLICY = 260 + SYS_SET_MEMPOLICY = 261 + SYS_MQ_OPEN = 262 + SYS_MQ_UNLINK = 263 + SYS_MQ_TIMEDSEND = 264 + SYS_MQ_TIMEDRECEIVE = 265 + SYS_MQ_NOTIFY = 266 + SYS_MQ_GETSETATTR = 267 + SYS_KEXEC_LOAD = 268 + SYS_ADD_KEY = 269 + SYS_REQUEST_KEY = 270 + SYS_KEYCTL = 271 + SYS_WAITID = 272 + SYS_IOPRIO_SET = 273 + SYS_IOPRIO_GET = 274 + SYS_INOTIFY_INIT = 275 + SYS_INOTIFY_ADD_WATCH = 276 + SYS_INOTIFY_RM_WATCH = 277 + SYS_SPU_RUN = 278 + SYS_SPU_CREATE = 279 + SYS_PSELECT6 = 280 + SYS_PPOLL = 281 + SYS_UNSHARE = 282 + SYS_SPLICE = 283 + SYS_TEE = 284 + SYS_VMSPLICE = 285 + SYS_OPENAT = 286 + SYS_MKDIRAT = 287 + SYS_MKNODAT = 288 + SYS_FCHOWNAT = 289 + SYS_FUTIMESAT = 290 + SYS_NEWFSTATAT = 291 + SYS_UNLINKAT = 292 + SYS_RENAMEAT = 293 + SYS_LINKAT = 294 + SYS_SYMLINKAT = 295 + SYS_READLINKAT = 296 + SYS_FCHMODAT = 297 + SYS_FACCESSAT = 298 + SYS_GET_ROBUST_LIST = 299 + SYS_SET_ROBUST_LIST = 300 + SYS_MOVE_PAGES = 301 + SYS_GETCPU = 302 + SYS_EPOLL_PWAIT = 303 + SYS_UTIMENSAT = 304 + SYS_SIGNALFD = 305 + SYS_TIMERFD_CREATE = 306 + SYS_EVENTFD = 307 + SYS_SYNC_FILE_RANGE2 = 308 + SYS_FALLOCATE = 309 + SYS_SUBPAGE_PROT = 310 + SYS_TIMERFD_SETTIME = 311 + SYS_TIMERFD_GETTIME = 312 + SYS_SIGNALFD4 = 313 + SYS_EVENTFD2 = 314 + SYS_EPOLL_CREATE1 = 315 + SYS_DUP3 = 316 + SYS_PIPE2 = 317 + SYS_INOTIFY_INIT1 = 318 + SYS_PERF_EVENT_OPEN = 319 + SYS_PREADV = 320 + SYS_PWRITEV = 321 + SYS_RT_TGSIGQUEUEINFO = 322 + SYS_FANOTIFY_INIT = 323 + SYS_FANOTIFY_MARK = 324 + SYS_PRLIMIT64 = 325 + SYS_SOCKET = 326 + SYS_BIND = 327 + SYS_CONNECT = 328 + SYS_LISTEN = 329 + SYS_ACCEPT = 330 + SYS_GETSOCKNAME = 331 + SYS_GETPEERNAME = 332 + SYS_SOCKETPAIR = 333 + SYS_SEND = 334 + SYS_SENDTO = 335 + SYS_RECV = 336 + SYS_RECVFROM = 337 + SYS_SHUTDOWN = 338 + SYS_SETSOCKOPT = 339 + SYS_GETSOCKOPT = 340 + SYS_SENDMSG = 341 + SYS_RECVMSG = 342 + SYS_RECVMMSG = 343 + SYS_ACCEPT4 = 344 + SYS_NAME_TO_HANDLE_AT = 345 + SYS_OPEN_BY_HANDLE_AT = 346 + SYS_CLOCK_ADJTIME = 347 + SYS_SYNCFS = 348 + SYS_SENDMMSG = 349 + SYS_SETNS = 350 + SYS_PROCESS_VM_READV = 351 + SYS_PROCESS_VM_WRITEV = 352 + SYS_FINIT_MODULE = 353 + SYS_KCMP = 354 + SYS_SCHED_SETATTR = 355 + SYS_SCHED_GETATTR = 356 + SYS_RENAMEAT2 = 357 + SYS_SECCOMP = 358 + SYS_GETRANDOM = 359 + SYS_MEMFD_CREATE = 360 + SYS_BPF = 361 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go new file mode 100644 index 000000000..45e63f51a --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -0,0 +1,353 @@ +// mksysnum_linux.pl /usr/include/powerpc64le-linux-gnu/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build ppc64le,linux + +package unix + +const ( + SYS_RESTART_SYSCALL = 0 + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_WAITPID = 7 + SYS_CREAT = 8 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_EXECVE = 11 + SYS_CHDIR = 12 + SYS_TIME = 13 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_LCHOWN = 16 + SYS_BREAK = 17 + SYS_OLDSTAT = 18 + SYS_LSEEK = 19 + SYS_GETPID = 20 + SYS_MOUNT = 21 + SYS_UMOUNT = 22 + SYS_SETUID = 23 + SYS_GETUID = 24 + SYS_STIME = 25 + SYS_PTRACE = 26 + SYS_ALARM = 27 + SYS_OLDFSTAT = 28 + SYS_PAUSE = 29 + SYS_UTIME = 30 + SYS_STTY = 31 + SYS_GTTY = 32 + SYS_ACCESS = 33 + SYS_NICE = 34 + SYS_FTIME = 35 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_RENAME = 38 + SYS_MKDIR = 39 + SYS_RMDIR = 40 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_TIMES = 43 + SYS_PROF = 44 + SYS_BRK = 45 + SYS_SETGID = 46 + SYS_GETGID = 47 + SYS_SIGNAL = 48 + SYS_GETEUID = 49 + SYS_GETEGID = 50 + SYS_ACCT = 51 + SYS_UMOUNT2 = 52 + SYS_LOCK = 53 + SYS_IOCTL = 54 + SYS_FCNTL = 55 + SYS_MPX = 56 + SYS_SETPGID = 57 + SYS_ULIMIT = 58 + SYS_OLDOLDUNAME = 59 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_USTAT = 62 + SYS_DUP2 = 63 + SYS_GETPPID = 64 + SYS_GETPGRP = 65 + SYS_SETSID = 66 + SYS_SIGACTION = 67 + SYS_SGETMASK = 68 + SYS_SSETMASK = 69 + SYS_SETREUID = 70 + SYS_SETREGID = 71 + SYS_SIGSUSPEND = 72 + SYS_SIGPENDING = 73 + SYS_SETHOSTNAME = 74 + SYS_SETRLIMIT = 75 + SYS_GETRLIMIT = 76 + SYS_GETRUSAGE = 77 + SYS_GETTIMEOFDAY = 78 + SYS_SETTIMEOFDAY = 79 + SYS_GETGROUPS = 80 + SYS_SETGROUPS = 81 + SYS_SELECT = 82 + SYS_SYMLINK = 83 + SYS_OLDLSTAT = 84 + SYS_READLINK = 85 + SYS_USELIB = 86 + SYS_SWAPON = 87 + SYS_REBOOT = 88 + SYS_READDIR = 89 + SYS_MMAP = 90 + SYS_MUNMAP = 91 + SYS_TRUNCATE = 92 + SYS_FTRUNCATE = 93 + SYS_FCHMOD = 94 + SYS_FCHOWN = 95 + SYS_GETPRIORITY = 96 + SYS_SETPRIORITY = 97 + SYS_PROFIL = 98 + SYS_STATFS = 99 + SYS_FSTATFS = 100 + SYS_IOPERM = 101 + SYS_SOCKETCALL = 102 + SYS_SYSLOG = 103 + SYS_SETITIMER = 104 + SYS_GETITIMER = 105 + SYS_STAT = 106 + SYS_LSTAT = 107 + SYS_FSTAT = 108 + SYS_OLDUNAME = 109 + SYS_IOPL = 110 + SYS_VHANGUP = 111 + SYS_IDLE = 112 + SYS_VM86 = 113 + SYS_WAIT4 = 114 + SYS_SWAPOFF = 115 + SYS_SYSINFO = 116 + SYS_IPC = 117 + SYS_FSYNC = 118 + SYS_SIGRETURN = 119 + SYS_CLONE = 120 + SYS_SETDOMAINNAME = 121 + SYS_UNAME = 122 + SYS_MODIFY_LDT = 123 + SYS_ADJTIMEX = 124 + SYS_MPROTECT = 125 + SYS_SIGPROCMASK = 126 + SYS_CREATE_MODULE = 127 + SYS_INIT_MODULE = 128 + SYS_DELETE_MODULE = 129 + SYS_GET_KERNEL_SYMS = 130 + SYS_QUOTACTL = 131 + SYS_GETPGID = 132 + SYS_FCHDIR = 133 + SYS_BDFLUSH = 134 + SYS_SYSFS = 135 + SYS_PERSONALITY = 136 + SYS_AFS_SYSCALL = 137 + SYS_SETFSUID = 138 + SYS_SETFSGID = 139 + SYS__LLSEEK = 140 + SYS_GETDENTS = 141 + SYS__NEWSELECT = 142 + SYS_FLOCK = 143 + SYS_MSYNC = 144 + SYS_READV = 145 + SYS_WRITEV = 146 + SYS_GETSID = 147 + SYS_FDATASYNC = 148 + SYS__SYSCTL = 149 + SYS_MLOCK = 150 + SYS_MUNLOCK = 151 + SYS_MLOCKALL = 152 + SYS_MUNLOCKALL = 153 + SYS_SCHED_SETPARAM = 154 + SYS_SCHED_GETPARAM = 155 + SYS_SCHED_SETSCHEDULER = 156 + SYS_SCHED_GETSCHEDULER = 157 + SYS_SCHED_YIELD = 158 + SYS_SCHED_GET_PRIORITY_MAX = 159 + SYS_SCHED_GET_PRIORITY_MIN = 160 + SYS_SCHED_RR_GET_INTERVAL = 161 + SYS_NANOSLEEP = 162 + SYS_MREMAP = 163 + SYS_SETRESUID = 164 + SYS_GETRESUID = 165 + SYS_QUERY_MODULE = 166 + SYS_POLL = 167 + SYS_NFSSERVCTL = 168 + SYS_SETRESGID = 169 + SYS_GETRESGID = 170 + SYS_PRCTL = 171 + SYS_RT_SIGRETURN = 172 + SYS_RT_SIGACTION = 173 + SYS_RT_SIGPROCMASK = 174 + SYS_RT_SIGPENDING = 175 + SYS_RT_SIGTIMEDWAIT = 176 + SYS_RT_SIGQUEUEINFO = 177 + SYS_RT_SIGSUSPEND = 178 + SYS_PREAD64 = 179 + SYS_PWRITE64 = 180 + SYS_CHOWN = 181 + SYS_GETCWD = 182 + SYS_CAPGET = 183 + SYS_CAPSET = 184 + SYS_SIGALTSTACK = 185 + SYS_SENDFILE = 186 + SYS_GETPMSG = 187 + SYS_PUTPMSG = 188 + SYS_VFORK = 189 + SYS_UGETRLIMIT = 190 + SYS_READAHEAD = 191 + SYS_PCICONFIG_READ = 198 + SYS_PCICONFIG_WRITE = 199 + SYS_PCICONFIG_IOBASE = 200 + SYS_MULTIPLEXER = 201 + SYS_GETDENTS64 = 202 + SYS_PIVOT_ROOT = 203 + SYS_MADVISE = 205 + SYS_MINCORE = 206 + SYS_GETTID = 207 + SYS_TKILL = 208 + SYS_SETXATTR = 209 + SYS_LSETXATTR = 210 + SYS_FSETXATTR = 211 + SYS_GETXATTR = 212 + SYS_LGETXATTR = 213 + SYS_FGETXATTR = 214 + SYS_LISTXATTR = 215 + SYS_LLISTXATTR = 216 + SYS_FLISTXATTR = 217 + SYS_REMOVEXATTR = 218 + SYS_LREMOVEXATTR = 219 + SYS_FREMOVEXATTR = 220 + SYS_FUTEX = 221 + SYS_SCHED_SETAFFINITY = 222 + SYS_SCHED_GETAFFINITY = 223 + SYS_TUXCALL = 225 + SYS_IO_SETUP = 227 + SYS_IO_DESTROY = 228 + SYS_IO_GETEVENTS = 229 + SYS_IO_SUBMIT = 230 + SYS_IO_CANCEL = 231 + SYS_SET_TID_ADDRESS = 232 + SYS_FADVISE64 = 233 + SYS_EXIT_GROUP = 234 + SYS_LOOKUP_DCOOKIE = 235 + SYS_EPOLL_CREATE = 236 + SYS_EPOLL_CTL = 237 + SYS_EPOLL_WAIT = 238 + SYS_REMAP_FILE_PAGES = 239 + SYS_TIMER_CREATE = 240 + SYS_TIMER_SETTIME = 241 + SYS_TIMER_GETTIME = 242 + SYS_TIMER_GETOVERRUN = 243 + SYS_TIMER_DELETE = 244 + SYS_CLOCK_SETTIME = 245 + SYS_CLOCK_GETTIME = 246 + SYS_CLOCK_GETRES = 247 + SYS_CLOCK_NANOSLEEP = 248 + SYS_SWAPCONTEXT = 249 + SYS_TGKILL = 250 + SYS_UTIMES = 251 + SYS_STATFS64 = 252 + SYS_FSTATFS64 = 253 + SYS_RTAS = 255 + SYS_SYS_DEBUG_SETCONTEXT = 256 + SYS_MIGRATE_PAGES = 258 + SYS_MBIND = 259 + SYS_GET_MEMPOLICY = 260 + SYS_SET_MEMPOLICY = 261 + SYS_MQ_OPEN = 262 + SYS_MQ_UNLINK = 263 + SYS_MQ_TIMEDSEND = 264 + SYS_MQ_TIMEDRECEIVE = 265 + SYS_MQ_NOTIFY = 266 + SYS_MQ_GETSETATTR = 267 + SYS_KEXEC_LOAD = 268 + SYS_ADD_KEY = 269 + SYS_REQUEST_KEY = 270 + SYS_KEYCTL = 271 + SYS_WAITID = 272 + SYS_IOPRIO_SET = 273 + SYS_IOPRIO_GET = 274 + SYS_INOTIFY_INIT = 275 + SYS_INOTIFY_ADD_WATCH = 276 + SYS_INOTIFY_RM_WATCH = 277 + SYS_SPU_RUN = 278 + SYS_SPU_CREATE = 279 + SYS_PSELECT6 = 280 + SYS_PPOLL = 281 + SYS_UNSHARE = 282 + SYS_SPLICE = 283 + SYS_TEE = 284 + SYS_VMSPLICE = 285 + SYS_OPENAT = 286 + SYS_MKDIRAT = 287 + SYS_MKNODAT = 288 + SYS_FCHOWNAT = 289 + SYS_FUTIMESAT = 290 + SYS_NEWFSTATAT = 291 + SYS_UNLINKAT = 292 + SYS_RENAMEAT = 293 + SYS_LINKAT = 294 + SYS_SYMLINKAT = 295 + SYS_READLINKAT = 296 + SYS_FCHMODAT = 297 + SYS_FACCESSAT = 298 + SYS_GET_ROBUST_LIST = 299 + SYS_SET_ROBUST_LIST = 300 + SYS_MOVE_PAGES = 301 + SYS_GETCPU = 302 + SYS_EPOLL_PWAIT = 303 + SYS_UTIMENSAT = 304 + SYS_SIGNALFD = 305 + SYS_TIMERFD_CREATE = 306 + SYS_EVENTFD = 307 + SYS_SYNC_FILE_RANGE2 = 308 + SYS_FALLOCATE = 309 + SYS_SUBPAGE_PROT = 310 + SYS_TIMERFD_SETTIME = 311 + SYS_TIMERFD_GETTIME = 312 + SYS_SIGNALFD4 = 313 + SYS_EVENTFD2 = 314 + SYS_EPOLL_CREATE1 = 315 + SYS_DUP3 = 316 + SYS_PIPE2 = 317 + SYS_INOTIFY_INIT1 = 318 + SYS_PERF_EVENT_OPEN = 319 + SYS_PREADV = 320 + SYS_PWRITEV = 321 + SYS_RT_TGSIGQUEUEINFO = 322 + SYS_FANOTIFY_INIT = 323 + SYS_FANOTIFY_MARK = 324 + SYS_PRLIMIT64 = 325 + SYS_SOCKET = 326 + SYS_BIND = 327 + SYS_CONNECT = 328 + SYS_LISTEN = 329 + SYS_ACCEPT = 330 + SYS_GETSOCKNAME = 331 + SYS_GETPEERNAME = 332 + SYS_SOCKETPAIR = 333 + SYS_SEND = 334 + SYS_SENDTO = 335 + SYS_RECV = 336 + SYS_RECVFROM = 337 + SYS_SHUTDOWN = 338 + SYS_SETSOCKOPT = 339 + SYS_GETSOCKOPT = 340 + SYS_SENDMSG = 341 + SYS_RECVMSG = 342 + SYS_RECVMMSG = 343 + SYS_ACCEPT4 = 344 + SYS_NAME_TO_HANDLE_AT = 345 + SYS_OPEN_BY_HANDLE_AT = 346 + SYS_CLOCK_ADJTIME = 347 + SYS_SYNCFS = 348 + SYS_SENDMMSG = 349 + SYS_SETNS = 350 + SYS_PROCESS_VM_READV = 351 + SYS_PROCESS_VM_WRITEV = 352 + SYS_FINIT_MODULE = 353 + SYS_KCMP = 354 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go new file mode 100644 index 000000000..42d4f5cda --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -0,0 +1,328 @@ +// mksysnum_linux.pl /usr/include/asm/unistd.h +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build s390x,linux + +package unix + +const ( + SYS_EXIT = 1 + SYS_FORK = 2 + SYS_READ = 3 + SYS_WRITE = 4 + SYS_OPEN = 5 + SYS_CLOSE = 6 + SYS_RESTART_SYSCALL = 7 + SYS_CREAT = 8 + SYS_LINK = 9 + SYS_UNLINK = 10 + SYS_EXECVE = 11 + SYS_CHDIR = 12 + SYS_MKNOD = 14 + SYS_CHMOD = 15 + SYS_LSEEK = 19 + SYS_GETPID = 20 + SYS_MOUNT = 21 + SYS_UMOUNT = 22 + SYS_PTRACE = 26 + SYS_ALARM = 27 + SYS_PAUSE = 29 + SYS_UTIME = 30 + SYS_ACCESS = 33 + SYS_NICE = 34 + SYS_SYNC = 36 + SYS_KILL = 37 + SYS_RENAME = 38 + SYS_MKDIR = 39 + SYS_RMDIR = 40 + SYS_DUP = 41 + SYS_PIPE = 42 + SYS_TIMES = 43 + SYS_BRK = 45 + SYS_SIGNAL = 48 + SYS_ACCT = 51 + SYS_UMOUNT2 = 52 + SYS_IOCTL = 54 + SYS_FCNTL = 55 + SYS_SETPGID = 57 + SYS_UMASK = 60 + SYS_CHROOT = 61 + SYS_USTAT = 62 + SYS_DUP2 = 63 + SYS_GETPPID = 64 + SYS_GETPGRP = 65 + SYS_SETSID = 66 + SYS_SIGACTION = 67 + SYS_SIGSUSPEND = 72 + SYS_SIGPENDING = 73 + SYS_SETHOSTNAME = 74 + SYS_SETRLIMIT = 75 + SYS_GETRUSAGE = 77 + SYS_GETTIMEOFDAY = 78 + SYS_SETTIMEOFDAY = 79 + SYS_SYMLINK = 83 + SYS_READLINK = 85 + SYS_USELIB = 86 + SYS_SWAPON = 87 + SYS_REBOOT = 88 + SYS_READDIR = 89 + SYS_MMAP = 90 + SYS_MUNMAP = 91 + SYS_TRUNCATE = 92 + SYS_FTRUNCATE = 93 + SYS_FCHMOD = 94 + SYS_GETPRIORITY = 96 + SYS_SETPRIORITY = 97 + SYS_STATFS = 99 + SYS_FSTATFS = 100 + SYS_SOCKETCALL = 102 + SYS_SYSLOG = 103 + SYS_SETITIMER = 104 + SYS_GETITIMER = 105 + SYS_STAT = 106 + SYS_LSTAT = 107 + SYS_FSTAT = 108 + SYS_LOOKUP_DCOOKIE = 110 + SYS_VHANGUP = 111 + SYS_IDLE = 112 + SYS_WAIT4 = 114 + SYS_SWAPOFF = 115 + SYS_SYSINFO = 116 + SYS_IPC = 117 + SYS_FSYNC = 118 + SYS_SIGRETURN = 119 + SYS_CLONE = 120 + SYS_SETDOMAINNAME = 121 + SYS_UNAME = 122 + SYS_ADJTIMEX = 124 + SYS_MPROTECT = 125 + SYS_SIGPROCMASK = 126 + SYS_CREATE_MODULE = 127 + SYS_INIT_MODULE = 128 + SYS_DELETE_MODULE = 129 + SYS_GET_KERNEL_SYMS = 130 + SYS_QUOTACTL = 131 + SYS_GETPGID = 132 + SYS_FCHDIR = 133 + SYS_BDFLUSH = 134 + SYS_SYSFS = 135 + SYS_PERSONALITY = 136 + SYS_AFS_SYSCALL = 137 + SYS_GETDENTS = 141 + SYS_FLOCK = 143 + SYS_MSYNC = 144 + SYS_READV = 145 + SYS_WRITEV = 146 + SYS_GETSID = 147 + SYS_FDATASYNC = 148 + SYS__SYSCTL = 149 + SYS_MLOCK = 150 + SYS_MUNLOCK = 151 + SYS_MLOCKALL = 152 + SYS_MUNLOCKALL = 153 + SYS_SCHED_SETPARAM = 154 + SYS_SCHED_GETPARAM = 155 + SYS_SCHED_SETSCHEDULER = 156 + SYS_SCHED_GETSCHEDULER = 157 + SYS_SCHED_YIELD = 158 + SYS_SCHED_GET_PRIORITY_MAX = 159 + SYS_SCHED_GET_PRIORITY_MIN = 160 + SYS_SCHED_RR_GET_INTERVAL = 161 + SYS_NANOSLEEP = 162 + SYS_MREMAP = 163 + SYS_QUERY_MODULE = 167 + SYS_POLL = 168 + SYS_NFSSERVCTL = 169 + SYS_PRCTL = 172 + SYS_RT_SIGRETURN = 173 + SYS_RT_SIGACTION = 174 + SYS_RT_SIGPROCMASK = 175 + SYS_RT_SIGPENDING = 176 + SYS_RT_SIGTIMEDWAIT = 177 + SYS_RT_SIGQUEUEINFO = 178 + SYS_RT_SIGSUSPEND = 179 + SYS_PREAD64 = 180 + SYS_PWRITE64 = 181 + SYS_GETCWD = 183 + SYS_CAPGET = 184 + SYS_CAPSET = 185 + SYS_SIGALTSTACK = 186 + SYS_SENDFILE = 187 + SYS_GETPMSG = 188 + SYS_PUTPMSG = 189 + SYS_VFORK = 190 + SYS_PIVOT_ROOT = 217 + SYS_MINCORE = 218 + SYS_MADVISE = 219 + SYS_GETDENTS64 = 220 + SYS_READAHEAD = 222 + SYS_SETXATTR = 224 + SYS_LSETXATTR = 225 + SYS_FSETXATTR = 226 + SYS_GETXATTR = 227 + SYS_LGETXATTR = 228 + SYS_FGETXATTR = 229 + SYS_LISTXATTR = 230 + SYS_LLISTXATTR = 231 + SYS_FLISTXATTR = 232 + SYS_REMOVEXATTR = 233 + SYS_LREMOVEXATTR = 234 + SYS_FREMOVEXATTR = 235 + SYS_GETTID = 236 + SYS_TKILL = 237 + SYS_FUTEX = 238 + SYS_SCHED_SETAFFINITY = 239 + SYS_SCHED_GETAFFINITY = 240 + SYS_TGKILL = 241 + SYS_IO_SETUP = 243 + SYS_IO_DESTROY = 244 + SYS_IO_GETEVENTS = 245 + SYS_IO_SUBMIT = 246 + SYS_IO_CANCEL = 247 + SYS_EXIT_GROUP = 248 + SYS_EPOLL_CREATE = 249 + SYS_EPOLL_CTL = 250 + SYS_EPOLL_WAIT = 251 + SYS_SET_TID_ADDRESS = 252 + SYS_FADVISE64 = 253 + SYS_TIMER_CREATE = 254 + SYS_TIMER_SETTIME = 255 + SYS_TIMER_GETTIME = 256 + SYS_TIMER_GETOVERRUN = 257 + SYS_TIMER_DELETE = 258 + SYS_CLOCK_SETTIME = 259 + SYS_CLOCK_GETTIME = 260 + SYS_CLOCK_GETRES = 261 + SYS_CLOCK_NANOSLEEP = 262 + SYS_STATFS64 = 265 + SYS_FSTATFS64 = 266 + SYS_REMAP_FILE_PAGES = 267 + SYS_MBIND = 268 + SYS_GET_MEMPOLICY = 269 + SYS_SET_MEMPOLICY = 270 + SYS_MQ_OPEN = 271 + SYS_MQ_UNLINK = 272 + SYS_MQ_TIMEDSEND = 273 + SYS_MQ_TIMEDRECEIVE = 274 + SYS_MQ_NOTIFY = 275 + SYS_MQ_GETSETATTR = 276 + SYS_KEXEC_LOAD = 277 + SYS_ADD_KEY = 278 + SYS_REQUEST_KEY = 279 + SYS_KEYCTL = 280 + SYS_WAITID = 281 + SYS_IOPRIO_SET = 282 + SYS_IOPRIO_GET = 283 + SYS_INOTIFY_INIT = 284 + SYS_INOTIFY_ADD_WATCH = 285 + SYS_INOTIFY_RM_WATCH = 286 + SYS_MIGRATE_PAGES = 287 + SYS_OPENAT = 288 + SYS_MKDIRAT = 289 + SYS_MKNODAT = 290 + SYS_FCHOWNAT = 291 + SYS_FUTIMESAT = 292 + SYS_UNLINKAT = 294 + SYS_RENAMEAT = 295 + SYS_LINKAT = 296 + SYS_SYMLINKAT = 297 + SYS_READLINKAT = 298 + SYS_FCHMODAT = 299 + SYS_FACCESSAT = 300 + SYS_PSELECT6 = 301 + SYS_PPOLL = 302 + SYS_UNSHARE = 303 + SYS_SET_ROBUST_LIST = 304 + SYS_GET_ROBUST_LIST = 305 + SYS_SPLICE = 306 + SYS_SYNC_FILE_RANGE = 307 + SYS_TEE = 308 + SYS_VMSPLICE = 309 + SYS_MOVE_PAGES = 310 + SYS_GETCPU = 311 + SYS_EPOLL_PWAIT = 312 + SYS_UTIMES = 313 + SYS_FALLOCATE = 314 + SYS_UTIMENSAT = 315 + SYS_SIGNALFD = 316 + SYS_TIMERFD = 317 + SYS_EVENTFD = 318 + SYS_TIMERFD_CREATE = 319 + SYS_TIMERFD_SETTIME = 320 + SYS_TIMERFD_GETTIME = 321 + SYS_SIGNALFD4 = 322 + SYS_EVENTFD2 = 323 + SYS_INOTIFY_INIT1 = 324 + SYS_PIPE2 = 325 + SYS_DUP3 = 326 + SYS_EPOLL_CREATE1 = 327 + SYS_PREADV = 328 + SYS_PWRITEV = 329 + SYS_RT_TGSIGQUEUEINFO = 330 + SYS_PERF_EVENT_OPEN = 331 + SYS_FANOTIFY_INIT = 332 + SYS_FANOTIFY_MARK = 333 + SYS_PRLIMIT64 = 334 + SYS_NAME_TO_HANDLE_AT = 335 + SYS_OPEN_BY_HANDLE_AT = 336 + SYS_CLOCK_ADJTIME = 337 + SYS_SYNCFS = 338 + SYS_SETNS = 339 + SYS_PROCESS_VM_READV = 340 + SYS_PROCESS_VM_WRITEV = 341 + SYS_S390_RUNTIME_INSTR = 342 + SYS_KCMP = 343 + SYS_FINIT_MODULE = 344 + SYS_SCHED_SETATTR = 345 + SYS_SCHED_GETATTR = 346 + SYS_RENAMEAT2 = 347 + SYS_SECCOMP = 348 + SYS_GETRANDOM = 349 + SYS_MEMFD_CREATE = 350 + SYS_BPF = 351 + SYS_S390_PCI_MMIO_WRITE = 352 + SYS_S390_PCI_MMIO_READ = 353 + SYS_EXECVEAT = 354 + SYS_USERFAULTFD = 355 + SYS_MEMBARRIER = 356 + SYS_RECVMMSG = 357 + SYS_SENDMMSG = 358 + SYS_SOCKET = 359 + SYS_SOCKETPAIR = 360 + SYS_BIND = 361 + SYS_CONNECT = 362 + SYS_LISTEN = 363 + SYS_ACCEPT4 = 364 + SYS_GETSOCKOPT = 365 + SYS_SETSOCKOPT = 366 + SYS_GETSOCKNAME = 367 + SYS_GETPEERNAME = 368 + SYS_SENDTO = 369 + SYS_SENDMSG = 370 + SYS_RECVFROM = 371 + SYS_RECVMSG = 372 + SYS_SHUTDOWN = 373 + SYS_MLOCK2 = 374 + SYS_SELECT = 142 + SYS_GETRLIMIT = 191 + SYS_LCHOWN = 198 + SYS_GETUID = 199 + SYS_GETGID = 200 + SYS_GETEUID = 201 + SYS_GETEGID = 202 + SYS_SETREUID = 203 + SYS_SETREGID = 204 + SYS_GETGROUPS = 205 + SYS_SETGROUPS = 206 + SYS_FCHOWN = 207 + SYS_SETRESUID = 208 + SYS_GETRESUID = 209 + SYS_SETRESGID = 210 + SYS_GETRESGID = 211 + SYS_CHOWN = 212 + SYS_SETUID = 213 + SYS_SETGID = 214 + SYS_SETFSUID = 215 + SYS_SETFSGID = 216 + SYS_NEWFSTATAT = 293 +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go new file mode 100644 index 000000000..f60d8f988 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_386.go @@ -0,0 +1,273 @@ +// mksysnum_netbsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build 386,netbsd + +package unix + +const ( + SYS_EXIT = 1 // { void|sys||exit(int rval); } + SYS_FORK = 2 // { int|sys||fork(void); } + SYS_READ = 3 // { ssize_t|sys||read(int fd, void *buf, size_t nbyte); } + SYS_WRITE = 4 // { ssize_t|sys||write(int fd, const void *buf, size_t nbyte); } + SYS_OPEN = 5 // { int|sys||open(const char *path, int flags, ... mode_t mode); } + SYS_CLOSE = 6 // { int|sys||close(int fd); } + SYS_LINK = 9 // { int|sys||link(const char *path, const char *link); } + SYS_UNLINK = 10 // { int|sys||unlink(const char *path); } + SYS_CHDIR = 12 // { int|sys||chdir(const char *path); } + SYS_FCHDIR = 13 // { int|sys||fchdir(int fd); } + SYS_CHMOD = 15 // { int|sys||chmod(const char *path, mode_t mode); } + SYS_CHOWN = 16 // { int|sys||chown(const char *path, uid_t uid, gid_t gid); } + SYS_BREAK = 17 // { int|sys||obreak(char *nsize); } + SYS_GETPID = 20 // { pid_t|sys||getpid_with_ppid(void); } + SYS_UNMOUNT = 22 // { int|sys||unmount(const char *path, int flags); } + SYS_SETUID = 23 // { int|sys||setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t|sys||getuid_with_euid(void); } + SYS_GETEUID = 25 // { uid_t|sys||geteuid(void); } + SYS_PTRACE = 26 // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); } + SYS_RECVMSG = 27 // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); } + SYS_SENDMSG = 28 // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); } + SYS_RECVFROM = 29 // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); } + SYS_ACCEPT = 30 // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); } + SYS_GETPEERNAME = 31 // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); } + SYS_GETSOCKNAME = 32 // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); } + SYS_ACCESS = 33 // { int|sys||access(const char *path, int flags); } + SYS_CHFLAGS = 34 // { int|sys||chflags(const char *path, u_long flags); } + SYS_FCHFLAGS = 35 // { int|sys||fchflags(int fd, u_long flags); } + SYS_SYNC = 36 // { void|sys||sync(void); } + SYS_KILL = 37 // { int|sys||kill(pid_t pid, int signum); } + SYS_GETPPID = 39 // { pid_t|sys||getppid(void); } + SYS_DUP = 41 // { int|sys||dup(int fd); } + SYS_PIPE = 42 // { int|sys||pipe(void); } + SYS_GETEGID = 43 // { gid_t|sys||getegid(void); } + SYS_PROFIL = 44 // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); } + SYS_KTRACE = 45 // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); } + SYS_GETGID = 47 // { gid_t|sys||getgid_with_egid(void); } + SYS___GETLOGIN = 49 // { int|sys||__getlogin(char *namebuf, size_t namelen); } + SYS___SETLOGIN = 50 // { int|sys||__setlogin(const char *namebuf); } + SYS_ACCT = 51 // { int|sys||acct(const char *path); } + SYS_IOCTL = 54 // { int|sys||ioctl(int fd, u_long com, ... void *data); } + SYS_REVOKE = 56 // { int|sys||revoke(const char *path); } + SYS_SYMLINK = 57 // { int|sys||symlink(const char *path, const char *link); } + SYS_READLINK = 58 // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); } + SYS_EXECVE = 59 // { int|sys||execve(const char *path, char * const *argp, char * const *envp); } + SYS_UMASK = 60 // { mode_t|sys||umask(mode_t newmask); } + SYS_CHROOT = 61 // { int|sys||chroot(const char *path); } + SYS_VFORK = 66 // { int|sys||vfork(void); } + SYS_SBRK = 69 // { int|sys||sbrk(intptr_t incr); } + SYS_SSTK = 70 // { int|sys||sstk(int incr); } + SYS_VADVISE = 72 // { int|sys||ovadvise(int anom); } + SYS_MUNMAP = 73 // { int|sys||munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int|sys||mprotect(void *addr, size_t len, int prot); } + SYS_MADVISE = 75 // { int|sys||madvise(void *addr, size_t len, int behav); } + SYS_MINCORE = 78 // { int|sys||mincore(void *addr, size_t len, char *vec); } + SYS_GETGROUPS = 79 // { int|sys||getgroups(int gidsetsize, gid_t *gidset); } + SYS_SETGROUPS = 80 // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); } + SYS_GETPGRP = 81 // { int|sys||getpgrp(void); } + SYS_SETPGID = 82 // { int|sys||setpgid(pid_t pid, pid_t pgid); } + SYS_DUP2 = 90 // { int|sys||dup2(int from, int to); } + SYS_FCNTL = 92 // { int|sys||fcntl(int fd, int cmd, ... void *arg); } + SYS_FSYNC = 95 // { int|sys||fsync(int fd); } + SYS_SETPRIORITY = 96 // { int|sys||setpriority(int which, id_t who, int prio); } + SYS_CONNECT = 98 // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); } + SYS_GETPRIORITY = 100 // { int|sys||getpriority(int which, id_t who); } + SYS_BIND = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); } + SYS_SETSOCKOPT = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); } + SYS_LISTEN = 106 // { int|sys||listen(int s, int backlog); } + SYS_GETSOCKOPT = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); } + SYS_READV = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); } + SYS_WRITEV = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); } + SYS_FCHOWN = 123 // { int|sys||fchown(int fd, uid_t uid, gid_t gid); } + SYS_FCHMOD = 124 // { int|sys||fchmod(int fd, mode_t mode); } + SYS_SETREUID = 126 // { int|sys||setreuid(uid_t ruid, uid_t euid); } + SYS_SETREGID = 127 // { int|sys||setregid(gid_t rgid, gid_t egid); } + SYS_RENAME = 128 // { int|sys||rename(const char *from, const char *to); } + SYS_FLOCK = 131 // { int|sys||flock(int fd, int how); } + SYS_MKFIFO = 132 // { int|sys||mkfifo(const char *path, mode_t mode); } + SYS_SENDTO = 133 // { ssize_t|sys||sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); } + SYS_SHUTDOWN = 134 // { int|sys||shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); } + SYS_MKDIR = 136 // { int|sys||mkdir(const char *path, mode_t mode); } + SYS_RMDIR = 137 // { int|sys||rmdir(const char *path); } + SYS_SETSID = 147 // { int|sys||setsid(void); } + SYS_SYSARCH = 165 // { int|sys||sysarch(int op, void *parms); } + SYS_PREAD = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); } + SYS_PWRITE = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); } + SYS_NTP_ADJTIME = 176 // { int|sys||ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int|sys||setgid(gid_t gid); } + SYS_SETEGID = 182 // { int|sys||setegid(gid_t egid); } + SYS_SETEUID = 183 // { int|sys||seteuid(uid_t euid); } + SYS_PATHCONF = 191 // { long|sys||pathconf(const char *path, int name); } + SYS_FPATHCONF = 192 // { long|sys||fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); } + SYS_SETRLIMIT = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); } + SYS_MMAP = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); } + SYS_LSEEK = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); } + SYS_TRUNCATE = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); } + SYS_FTRUNCATE = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); } + SYS___SYSCTL = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); } + SYS_MLOCK = 203 // { int|sys||mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int|sys||munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int|sys||undelete(const char *path); } + SYS_GETPGID = 207 // { pid_t|sys||getpgid(pid_t pid); } + SYS_REBOOT = 208 // { int|sys||reboot(int opt, char *bootstr); } + SYS_POLL = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); } + SYS_SEMGET = 221 // { int|sys||semget(key_t key, int nsems, int semflg); } + SYS_SEMOP = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); } + SYS_SEMCONFIG = 223 // { int|sys||semconfig(int flag); } + SYS_MSGGET = 225 // { int|sys||msgget(key_t key, int msgflg); } + SYS_MSGSND = 226 // { int|sys||msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); } + SYS_MSGRCV = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); } + SYS_SHMAT = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); } + SYS_SHMDT = 230 // { int|sys||shmdt(const void *shmaddr); } + SYS_SHMGET = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); } + SYS_TIMER_CREATE = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); } + SYS_TIMER_DELETE = 236 // { int|sys||timer_delete(timer_t timerid); } + SYS_TIMER_GETOVERRUN = 239 // { int|sys||timer_getoverrun(timer_t timerid); } + SYS_FDATASYNC = 241 // { int|sys||fdatasync(int fd); } + SYS_MLOCKALL = 242 // { int|sys||mlockall(int flags); } + SYS_MUNLOCKALL = 243 // { int|sys||munlockall(void); } + SYS_SIGQUEUEINFO = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); } + SYS_MODCTL = 246 // { int|sys||modctl(int cmd, void *arg); } + SYS___POSIX_RENAME = 270 // { int|sys||__posix_rename(const char *from, const char *to); } + SYS_SWAPCTL = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); } + SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); } + SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); } + SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); } + SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); } + SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); } + SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); } + SYS_GETSID = 286 // { pid_t|sys||getsid(pid_t pid); } + SYS___CLONE = 287 // { pid_t|sys||__clone(int flags, void *stack); } + SYS_FKTRACE = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); } + SYS_PREADV = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); } + SYS_PWRITEV = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); } + SYS___GETCWD = 296 // { int|sys||__getcwd(char *bufp, size_t length); } + SYS_FCHROOT = 297 // { int|sys||fchroot(int fd); } + SYS_LCHFLAGS = 304 // { int|sys||lchflags(const char *path, u_long flags); } + SYS_ISSETUGID = 305 // { int|sys||issetugid(void); } + SYS_UTRACE = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); } + SYS_GETCONTEXT = 307 // { int|sys||getcontext(struct __ucontext *ucp); } + SYS_SETCONTEXT = 308 // { int|sys||setcontext(const struct __ucontext *ucp); } + SYS__LWP_CREATE = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); } + SYS__LWP_EXIT = 310 // { int|sys||_lwp_exit(void); } + SYS__LWP_SELF = 311 // { lwpid_t|sys||_lwp_self(void); } + SYS__LWP_WAIT = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); } + SYS__LWP_SUSPEND = 313 // { int|sys||_lwp_suspend(lwpid_t target); } + SYS__LWP_CONTINUE = 314 // { int|sys||_lwp_continue(lwpid_t target); } + SYS__LWP_WAKEUP = 315 // { int|sys||_lwp_wakeup(lwpid_t target); } + SYS__LWP_GETPRIVATE = 316 // { void *|sys||_lwp_getprivate(void); } + SYS__LWP_SETPRIVATE = 317 // { void|sys||_lwp_setprivate(void *ptr); } + SYS__LWP_KILL = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); } + SYS__LWP_DETACH = 319 // { int|sys||_lwp_detach(lwpid_t target); } + SYS__LWP_UNPARK = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); } + SYS__LWP_UNPARK_ALL = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); } + SYS__LWP_SETNAME = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); } + SYS__LWP_GETNAME = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); } + SYS__LWP_CTL = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); } + SYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); } + SYS_PMC_GET_INFO = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); } + SYS_PMC_CONTROL = 342 // { int|sys||pmc_control(int ctr, int op, void *args); } + SYS_RASCTL = 343 // { int|sys||rasctl(void *addr, size_t len, int op); } + SYS_KQUEUE = 344 // { int|sys||kqueue(void); } + SYS__SCHED_SETPARAM = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); } + SYS__SCHED_GETPARAM = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); } + SYS__SCHED_SETAFFINITY = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); } + SYS__SCHED_GETAFFINITY = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); } + SYS_SCHED_YIELD = 350 // { int|sys||sched_yield(void); } + SYS_FSYNC_RANGE = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); } + SYS_UUIDGEN = 355 // { int|sys||uuidgen(struct uuid *store, int count); } + SYS_GETVFSSTAT = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); } + SYS_STATVFS1 = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); } + SYS_FSTATVFS1 = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); } + SYS_EXTATTRCTL = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_FILE = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_FILE = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_FILE = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_FD = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_FD = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_FD = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_LINK = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_LINK = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_LINK = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); } + SYS_EXTATTR_LIST_FD = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); } + SYS_EXTATTR_LIST_FILE = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); } + SYS_EXTATTR_LIST_LINK = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); } + SYS_SETXATTR = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); } + SYS_LSETXATTR = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); } + SYS_FSETXATTR = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); } + SYS_GETXATTR = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); } + SYS_LGETXATTR = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); } + SYS_FGETXATTR = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); } + SYS_LISTXATTR = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); } + SYS_LLISTXATTR = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); } + SYS_FLISTXATTR = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); } + SYS_REMOVEXATTR = 384 // { int|sys||removexattr(const char *path, const char *name); } + SYS_LREMOVEXATTR = 385 // { int|sys||lremovexattr(const char *path, const char *name); } + SYS_FREMOVEXATTR = 386 // { int|sys||fremovexattr(int fd, const char *name); } + SYS_GETDENTS = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); } + SYS_SOCKET = 394 // { int|sys|30|socket(int domain, int type, int protocol); } + SYS_GETFH = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); } + SYS_MOUNT = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); } + SYS_MREMAP = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); } + SYS_PSET_CREATE = 412 // { int|sys||pset_create(psetid_t *psid); } + SYS_PSET_DESTROY = 413 // { int|sys||pset_destroy(psetid_t psid); } + SYS_PSET_ASSIGN = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); } + SYS__PSET_BIND = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); } + SYS_POSIX_FADVISE = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); } + SYS_SELECT = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } + SYS_GETTIMEOFDAY = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); } + SYS_SETTIMEOFDAY = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); } + SYS_UTIMES = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); } + SYS_ADJTIME = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); } + SYS_FUTIMES = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); } + SYS_LUTIMES = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); } + SYS_SETITIMER = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); } + SYS_GETITIMER = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); } + SYS_CLOCK_GETTIME = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); } + SYS_CLOCK_SETTIME = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); } + SYS_CLOCK_GETRES = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); } + SYS_NANOSLEEP = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } + SYS___SIGTIMEDWAIT = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); } + SYS__LWP_PARK = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); } + SYS_KEVENT = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); } + SYS_PSELECT = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); } + SYS_POLLTS = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); } + SYS_STAT = 439 // { int|sys|50|stat(const char *path, struct stat *ub); } + SYS_FSTAT = 440 // { int|sys|50|fstat(int fd, struct stat *sb); } + SYS_LSTAT = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); } + SYS___SEMCTL = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); } + SYS_SHMCTL = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); } + SYS_MSGCTL = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); } + SYS_GETRUSAGE = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); } + SYS_TIMER_SETTIME = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); } + SYS_TIMER_GETTIME = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); } + SYS_NTP_GETTIME = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); } + SYS_WAIT4 = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); } + SYS_MKNOD = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); } + SYS_FHSTAT = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); } + SYS_PIPE2 = 453 // { int|sys||pipe2(int *fildes, int flags); } + SYS_DUP3 = 454 // { int|sys||dup3(int from, int to, int flags); } + SYS_KQUEUE1 = 455 // { int|sys||kqueue1(int flags); } + SYS_PACCEPT = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); } + SYS_LINKAT = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); } + SYS_RENAMEAT = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); } + SYS_MKFIFOAT = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); } + SYS_MKNODAT = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); } + SYS_MKDIRAT = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); } + SYS_FACCESSAT = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); } + SYS_FCHMODAT = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); } + SYS_FCHOWNAT = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); } + SYS_FEXECVE = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); } + SYS_FSTATAT = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); } + SYS_UTIMENSAT = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); } + SYS_OPENAT = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); } + SYS_READLINKAT = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); } + SYS_SYMLINKAT = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); } + SYS_UNLINKAT = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); } + SYS_FUTIMENS = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); } + SYS___QUOTACTL = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); } + SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); } + SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); } + SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); } +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go new file mode 100644 index 000000000..48a91d464 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_amd64.go @@ -0,0 +1,273 @@ +// mksysnum_netbsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build amd64,netbsd + +package unix + +const ( + SYS_EXIT = 1 // { void|sys||exit(int rval); } + SYS_FORK = 2 // { int|sys||fork(void); } + SYS_READ = 3 // { ssize_t|sys||read(int fd, void *buf, size_t nbyte); } + SYS_WRITE = 4 // { ssize_t|sys||write(int fd, const void *buf, size_t nbyte); } + SYS_OPEN = 5 // { int|sys||open(const char *path, int flags, ... mode_t mode); } + SYS_CLOSE = 6 // { int|sys||close(int fd); } + SYS_LINK = 9 // { int|sys||link(const char *path, const char *link); } + SYS_UNLINK = 10 // { int|sys||unlink(const char *path); } + SYS_CHDIR = 12 // { int|sys||chdir(const char *path); } + SYS_FCHDIR = 13 // { int|sys||fchdir(int fd); } + SYS_CHMOD = 15 // { int|sys||chmod(const char *path, mode_t mode); } + SYS_CHOWN = 16 // { int|sys||chown(const char *path, uid_t uid, gid_t gid); } + SYS_BREAK = 17 // { int|sys||obreak(char *nsize); } + SYS_GETPID = 20 // { pid_t|sys||getpid_with_ppid(void); } + SYS_UNMOUNT = 22 // { int|sys||unmount(const char *path, int flags); } + SYS_SETUID = 23 // { int|sys||setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t|sys||getuid_with_euid(void); } + SYS_GETEUID = 25 // { uid_t|sys||geteuid(void); } + SYS_PTRACE = 26 // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); } + SYS_RECVMSG = 27 // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); } + SYS_SENDMSG = 28 // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); } + SYS_RECVFROM = 29 // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); } + SYS_ACCEPT = 30 // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); } + SYS_GETPEERNAME = 31 // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); } + SYS_GETSOCKNAME = 32 // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); } + SYS_ACCESS = 33 // { int|sys||access(const char *path, int flags); } + SYS_CHFLAGS = 34 // { int|sys||chflags(const char *path, u_long flags); } + SYS_FCHFLAGS = 35 // { int|sys||fchflags(int fd, u_long flags); } + SYS_SYNC = 36 // { void|sys||sync(void); } + SYS_KILL = 37 // { int|sys||kill(pid_t pid, int signum); } + SYS_GETPPID = 39 // { pid_t|sys||getppid(void); } + SYS_DUP = 41 // { int|sys||dup(int fd); } + SYS_PIPE = 42 // { int|sys||pipe(void); } + SYS_GETEGID = 43 // { gid_t|sys||getegid(void); } + SYS_PROFIL = 44 // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); } + SYS_KTRACE = 45 // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); } + SYS_GETGID = 47 // { gid_t|sys||getgid_with_egid(void); } + SYS___GETLOGIN = 49 // { int|sys||__getlogin(char *namebuf, size_t namelen); } + SYS___SETLOGIN = 50 // { int|sys||__setlogin(const char *namebuf); } + SYS_ACCT = 51 // { int|sys||acct(const char *path); } + SYS_IOCTL = 54 // { int|sys||ioctl(int fd, u_long com, ... void *data); } + SYS_REVOKE = 56 // { int|sys||revoke(const char *path); } + SYS_SYMLINK = 57 // { int|sys||symlink(const char *path, const char *link); } + SYS_READLINK = 58 // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); } + SYS_EXECVE = 59 // { int|sys||execve(const char *path, char * const *argp, char * const *envp); } + SYS_UMASK = 60 // { mode_t|sys||umask(mode_t newmask); } + SYS_CHROOT = 61 // { int|sys||chroot(const char *path); } + SYS_VFORK = 66 // { int|sys||vfork(void); } + SYS_SBRK = 69 // { int|sys||sbrk(intptr_t incr); } + SYS_SSTK = 70 // { int|sys||sstk(int incr); } + SYS_VADVISE = 72 // { int|sys||ovadvise(int anom); } + SYS_MUNMAP = 73 // { int|sys||munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int|sys||mprotect(void *addr, size_t len, int prot); } + SYS_MADVISE = 75 // { int|sys||madvise(void *addr, size_t len, int behav); } + SYS_MINCORE = 78 // { int|sys||mincore(void *addr, size_t len, char *vec); } + SYS_GETGROUPS = 79 // { int|sys||getgroups(int gidsetsize, gid_t *gidset); } + SYS_SETGROUPS = 80 // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); } + SYS_GETPGRP = 81 // { int|sys||getpgrp(void); } + SYS_SETPGID = 82 // { int|sys||setpgid(pid_t pid, pid_t pgid); } + SYS_DUP2 = 90 // { int|sys||dup2(int from, int to); } + SYS_FCNTL = 92 // { int|sys||fcntl(int fd, int cmd, ... void *arg); } + SYS_FSYNC = 95 // { int|sys||fsync(int fd); } + SYS_SETPRIORITY = 96 // { int|sys||setpriority(int which, id_t who, int prio); } + SYS_CONNECT = 98 // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); } + SYS_GETPRIORITY = 100 // { int|sys||getpriority(int which, id_t who); } + SYS_BIND = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); } + SYS_SETSOCKOPT = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); } + SYS_LISTEN = 106 // { int|sys||listen(int s, int backlog); } + SYS_GETSOCKOPT = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); } + SYS_READV = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); } + SYS_WRITEV = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); } + SYS_FCHOWN = 123 // { int|sys||fchown(int fd, uid_t uid, gid_t gid); } + SYS_FCHMOD = 124 // { int|sys||fchmod(int fd, mode_t mode); } + SYS_SETREUID = 126 // { int|sys||setreuid(uid_t ruid, uid_t euid); } + SYS_SETREGID = 127 // { int|sys||setregid(gid_t rgid, gid_t egid); } + SYS_RENAME = 128 // { int|sys||rename(const char *from, const char *to); } + SYS_FLOCK = 131 // { int|sys||flock(int fd, int how); } + SYS_MKFIFO = 132 // { int|sys||mkfifo(const char *path, mode_t mode); } + SYS_SENDTO = 133 // { ssize_t|sys||sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); } + SYS_SHUTDOWN = 134 // { int|sys||shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); } + SYS_MKDIR = 136 // { int|sys||mkdir(const char *path, mode_t mode); } + SYS_RMDIR = 137 // { int|sys||rmdir(const char *path); } + SYS_SETSID = 147 // { int|sys||setsid(void); } + SYS_SYSARCH = 165 // { int|sys||sysarch(int op, void *parms); } + SYS_PREAD = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); } + SYS_PWRITE = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); } + SYS_NTP_ADJTIME = 176 // { int|sys||ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int|sys||setgid(gid_t gid); } + SYS_SETEGID = 182 // { int|sys||setegid(gid_t egid); } + SYS_SETEUID = 183 // { int|sys||seteuid(uid_t euid); } + SYS_PATHCONF = 191 // { long|sys||pathconf(const char *path, int name); } + SYS_FPATHCONF = 192 // { long|sys||fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); } + SYS_SETRLIMIT = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); } + SYS_MMAP = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); } + SYS_LSEEK = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); } + SYS_TRUNCATE = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); } + SYS_FTRUNCATE = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); } + SYS___SYSCTL = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); } + SYS_MLOCK = 203 // { int|sys||mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int|sys||munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int|sys||undelete(const char *path); } + SYS_GETPGID = 207 // { pid_t|sys||getpgid(pid_t pid); } + SYS_REBOOT = 208 // { int|sys||reboot(int opt, char *bootstr); } + SYS_POLL = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); } + SYS_SEMGET = 221 // { int|sys||semget(key_t key, int nsems, int semflg); } + SYS_SEMOP = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); } + SYS_SEMCONFIG = 223 // { int|sys||semconfig(int flag); } + SYS_MSGGET = 225 // { int|sys||msgget(key_t key, int msgflg); } + SYS_MSGSND = 226 // { int|sys||msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); } + SYS_MSGRCV = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); } + SYS_SHMAT = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); } + SYS_SHMDT = 230 // { int|sys||shmdt(const void *shmaddr); } + SYS_SHMGET = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); } + SYS_TIMER_CREATE = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); } + SYS_TIMER_DELETE = 236 // { int|sys||timer_delete(timer_t timerid); } + SYS_TIMER_GETOVERRUN = 239 // { int|sys||timer_getoverrun(timer_t timerid); } + SYS_FDATASYNC = 241 // { int|sys||fdatasync(int fd); } + SYS_MLOCKALL = 242 // { int|sys||mlockall(int flags); } + SYS_MUNLOCKALL = 243 // { int|sys||munlockall(void); } + SYS_SIGQUEUEINFO = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); } + SYS_MODCTL = 246 // { int|sys||modctl(int cmd, void *arg); } + SYS___POSIX_RENAME = 270 // { int|sys||__posix_rename(const char *from, const char *to); } + SYS_SWAPCTL = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); } + SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); } + SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); } + SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); } + SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); } + SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); } + SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); } + SYS_GETSID = 286 // { pid_t|sys||getsid(pid_t pid); } + SYS___CLONE = 287 // { pid_t|sys||__clone(int flags, void *stack); } + SYS_FKTRACE = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); } + SYS_PREADV = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); } + SYS_PWRITEV = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); } + SYS___GETCWD = 296 // { int|sys||__getcwd(char *bufp, size_t length); } + SYS_FCHROOT = 297 // { int|sys||fchroot(int fd); } + SYS_LCHFLAGS = 304 // { int|sys||lchflags(const char *path, u_long flags); } + SYS_ISSETUGID = 305 // { int|sys||issetugid(void); } + SYS_UTRACE = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); } + SYS_GETCONTEXT = 307 // { int|sys||getcontext(struct __ucontext *ucp); } + SYS_SETCONTEXT = 308 // { int|sys||setcontext(const struct __ucontext *ucp); } + SYS__LWP_CREATE = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); } + SYS__LWP_EXIT = 310 // { int|sys||_lwp_exit(void); } + SYS__LWP_SELF = 311 // { lwpid_t|sys||_lwp_self(void); } + SYS__LWP_WAIT = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); } + SYS__LWP_SUSPEND = 313 // { int|sys||_lwp_suspend(lwpid_t target); } + SYS__LWP_CONTINUE = 314 // { int|sys||_lwp_continue(lwpid_t target); } + SYS__LWP_WAKEUP = 315 // { int|sys||_lwp_wakeup(lwpid_t target); } + SYS__LWP_GETPRIVATE = 316 // { void *|sys||_lwp_getprivate(void); } + SYS__LWP_SETPRIVATE = 317 // { void|sys||_lwp_setprivate(void *ptr); } + SYS__LWP_KILL = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); } + SYS__LWP_DETACH = 319 // { int|sys||_lwp_detach(lwpid_t target); } + SYS__LWP_UNPARK = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); } + SYS__LWP_UNPARK_ALL = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); } + SYS__LWP_SETNAME = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); } + SYS__LWP_GETNAME = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); } + SYS__LWP_CTL = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); } + SYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); } + SYS_PMC_GET_INFO = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); } + SYS_PMC_CONTROL = 342 // { int|sys||pmc_control(int ctr, int op, void *args); } + SYS_RASCTL = 343 // { int|sys||rasctl(void *addr, size_t len, int op); } + SYS_KQUEUE = 344 // { int|sys||kqueue(void); } + SYS__SCHED_SETPARAM = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); } + SYS__SCHED_GETPARAM = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); } + SYS__SCHED_SETAFFINITY = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); } + SYS__SCHED_GETAFFINITY = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); } + SYS_SCHED_YIELD = 350 // { int|sys||sched_yield(void); } + SYS_FSYNC_RANGE = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); } + SYS_UUIDGEN = 355 // { int|sys||uuidgen(struct uuid *store, int count); } + SYS_GETVFSSTAT = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); } + SYS_STATVFS1 = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); } + SYS_FSTATVFS1 = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); } + SYS_EXTATTRCTL = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_FILE = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_FILE = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_FILE = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_FD = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_FD = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_FD = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_LINK = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_LINK = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_LINK = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); } + SYS_EXTATTR_LIST_FD = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); } + SYS_EXTATTR_LIST_FILE = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); } + SYS_EXTATTR_LIST_LINK = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); } + SYS_SETXATTR = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); } + SYS_LSETXATTR = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); } + SYS_FSETXATTR = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); } + SYS_GETXATTR = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); } + SYS_LGETXATTR = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); } + SYS_FGETXATTR = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); } + SYS_LISTXATTR = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); } + SYS_LLISTXATTR = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); } + SYS_FLISTXATTR = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); } + SYS_REMOVEXATTR = 384 // { int|sys||removexattr(const char *path, const char *name); } + SYS_LREMOVEXATTR = 385 // { int|sys||lremovexattr(const char *path, const char *name); } + SYS_FREMOVEXATTR = 386 // { int|sys||fremovexattr(int fd, const char *name); } + SYS_GETDENTS = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); } + SYS_SOCKET = 394 // { int|sys|30|socket(int domain, int type, int protocol); } + SYS_GETFH = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); } + SYS_MOUNT = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); } + SYS_MREMAP = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); } + SYS_PSET_CREATE = 412 // { int|sys||pset_create(psetid_t *psid); } + SYS_PSET_DESTROY = 413 // { int|sys||pset_destroy(psetid_t psid); } + SYS_PSET_ASSIGN = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); } + SYS__PSET_BIND = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); } + SYS_POSIX_FADVISE = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); } + SYS_SELECT = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } + SYS_GETTIMEOFDAY = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); } + SYS_SETTIMEOFDAY = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); } + SYS_UTIMES = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); } + SYS_ADJTIME = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); } + SYS_FUTIMES = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); } + SYS_LUTIMES = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); } + SYS_SETITIMER = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); } + SYS_GETITIMER = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); } + SYS_CLOCK_GETTIME = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); } + SYS_CLOCK_SETTIME = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); } + SYS_CLOCK_GETRES = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); } + SYS_NANOSLEEP = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } + SYS___SIGTIMEDWAIT = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); } + SYS__LWP_PARK = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); } + SYS_KEVENT = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); } + SYS_PSELECT = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); } + SYS_POLLTS = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); } + SYS_STAT = 439 // { int|sys|50|stat(const char *path, struct stat *ub); } + SYS_FSTAT = 440 // { int|sys|50|fstat(int fd, struct stat *sb); } + SYS_LSTAT = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); } + SYS___SEMCTL = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); } + SYS_SHMCTL = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); } + SYS_MSGCTL = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); } + SYS_GETRUSAGE = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); } + SYS_TIMER_SETTIME = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); } + SYS_TIMER_GETTIME = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); } + SYS_NTP_GETTIME = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); } + SYS_WAIT4 = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); } + SYS_MKNOD = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); } + SYS_FHSTAT = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); } + SYS_PIPE2 = 453 // { int|sys||pipe2(int *fildes, int flags); } + SYS_DUP3 = 454 // { int|sys||dup3(int from, int to, int flags); } + SYS_KQUEUE1 = 455 // { int|sys||kqueue1(int flags); } + SYS_PACCEPT = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); } + SYS_LINKAT = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); } + SYS_RENAMEAT = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); } + SYS_MKFIFOAT = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); } + SYS_MKNODAT = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); } + SYS_MKDIRAT = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); } + SYS_FACCESSAT = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); } + SYS_FCHMODAT = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); } + SYS_FCHOWNAT = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); } + SYS_FEXECVE = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); } + SYS_FSTATAT = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); } + SYS_UTIMENSAT = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); } + SYS_OPENAT = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); } + SYS_READLINKAT = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); } + SYS_SYMLINKAT = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); } + SYS_UNLINKAT = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); } + SYS_FUTIMENS = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); } + SYS___QUOTACTL = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); } + SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); } + SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); } + SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); } +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go new file mode 100644 index 000000000..612ba662c --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_netbsd_arm.go @@ -0,0 +1,273 @@ +// mksysnum_netbsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build arm,netbsd + +package unix + +const ( + SYS_EXIT = 1 // { void|sys||exit(int rval); } + SYS_FORK = 2 // { int|sys||fork(void); } + SYS_READ = 3 // { ssize_t|sys||read(int fd, void *buf, size_t nbyte); } + SYS_WRITE = 4 // { ssize_t|sys||write(int fd, const void *buf, size_t nbyte); } + SYS_OPEN = 5 // { int|sys||open(const char *path, int flags, ... mode_t mode); } + SYS_CLOSE = 6 // { int|sys||close(int fd); } + SYS_LINK = 9 // { int|sys||link(const char *path, const char *link); } + SYS_UNLINK = 10 // { int|sys||unlink(const char *path); } + SYS_CHDIR = 12 // { int|sys||chdir(const char *path); } + SYS_FCHDIR = 13 // { int|sys||fchdir(int fd); } + SYS_CHMOD = 15 // { int|sys||chmod(const char *path, mode_t mode); } + SYS_CHOWN = 16 // { int|sys||chown(const char *path, uid_t uid, gid_t gid); } + SYS_BREAK = 17 // { int|sys||obreak(char *nsize); } + SYS_GETPID = 20 // { pid_t|sys||getpid_with_ppid(void); } + SYS_UNMOUNT = 22 // { int|sys||unmount(const char *path, int flags); } + SYS_SETUID = 23 // { int|sys||setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t|sys||getuid_with_euid(void); } + SYS_GETEUID = 25 // { uid_t|sys||geteuid(void); } + SYS_PTRACE = 26 // { int|sys||ptrace(int req, pid_t pid, void *addr, int data); } + SYS_RECVMSG = 27 // { ssize_t|sys||recvmsg(int s, struct msghdr *msg, int flags); } + SYS_SENDMSG = 28 // { ssize_t|sys||sendmsg(int s, const struct msghdr *msg, int flags); } + SYS_RECVFROM = 29 // { ssize_t|sys||recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); } + SYS_ACCEPT = 30 // { int|sys||accept(int s, struct sockaddr *name, socklen_t *anamelen); } + SYS_GETPEERNAME = 31 // { int|sys||getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); } + SYS_GETSOCKNAME = 32 // { int|sys||getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); } + SYS_ACCESS = 33 // { int|sys||access(const char *path, int flags); } + SYS_CHFLAGS = 34 // { int|sys||chflags(const char *path, u_long flags); } + SYS_FCHFLAGS = 35 // { int|sys||fchflags(int fd, u_long flags); } + SYS_SYNC = 36 // { void|sys||sync(void); } + SYS_KILL = 37 // { int|sys||kill(pid_t pid, int signum); } + SYS_GETPPID = 39 // { pid_t|sys||getppid(void); } + SYS_DUP = 41 // { int|sys||dup(int fd); } + SYS_PIPE = 42 // { int|sys||pipe(void); } + SYS_GETEGID = 43 // { gid_t|sys||getegid(void); } + SYS_PROFIL = 44 // { int|sys||profil(char *samples, size_t size, u_long offset, u_int scale); } + SYS_KTRACE = 45 // { int|sys||ktrace(const char *fname, int ops, int facs, pid_t pid); } + SYS_GETGID = 47 // { gid_t|sys||getgid_with_egid(void); } + SYS___GETLOGIN = 49 // { int|sys||__getlogin(char *namebuf, size_t namelen); } + SYS___SETLOGIN = 50 // { int|sys||__setlogin(const char *namebuf); } + SYS_ACCT = 51 // { int|sys||acct(const char *path); } + SYS_IOCTL = 54 // { int|sys||ioctl(int fd, u_long com, ... void *data); } + SYS_REVOKE = 56 // { int|sys||revoke(const char *path); } + SYS_SYMLINK = 57 // { int|sys||symlink(const char *path, const char *link); } + SYS_READLINK = 58 // { ssize_t|sys||readlink(const char *path, char *buf, size_t count); } + SYS_EXECVE = 59 // { int|sys||execve(const char *path, char * const *argp, char * const *envp); } + SYS_UMASK = 60 // { mode_t|sys||umask(mode_t newmask); } + SYS_CHROOT = 61 // { int|sys||chroot(const char *path); } + SYS_VFORK = 66 // { int|sys||vfork(void); } + SYS_SBRK = 69 // { int|sys||sbrk(intptr_t incr); } + SYS_SSTK = 70 // { int|sys||sstk(int incr); } + SYS_VADVISE = 72 // { int|sys||ovadvise(int anom); } + SYS_MUNMAP = 73 // { int|sys||munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int|sys||mprotect(void *addr, size_t len, int prot); } + SYS_MADVISE = 75 // { int|sys||madvise(void *addr, size_t len, int behav); } + SYS_MINCORE = 78 // { int|sys||mincore(void *addr, size_t len, char *vec); } + SYS_GETGROUPS = 79 // { int|sys||getgroups(int gidsetsize, gid_t *gidset); } + SYS_SETGROUPS = 80 // { int|sys||setgroups(int gidsetsize, const gid_t *gidset); } + SYS_GETPGRP = 81 // { int|sys||getpgrp(void); } + SYS_SETPGID = 82 // { int|sys||setpgid(pid_t pid, pid_t pgid); } + SYS_DUP2 = 90 // { int|sys||dup2(int from, int to); } + SYS_FCNTL = 92 // { int|sys||fcntl(int fd, int cmd, ... void *arg); } + SYS_FSYNC = 95 // { int|sys||fsync(int fd); } + SYS_SETPRIORITY = 96 // { int|sys||setpriority(int which, id_t who, int prio); } + SYS_CONNECT = 98 // { int|sys||connect(int s, const struct sockaddr *name, socklen_t namelen); } + SYS_GETPRIORITY = 100 // { int|sys||getpriority(int which, id_t who); } + SYS_BIND = 104 // { int|sys||bind(int s, const struct sockaddr *name, socklen_t namelen); } + SYS_SETSOCKOPT = 105 // { int|sys||setsockopt(int s, int level, int name, const void *val, socklen_t valsize); } + SYS_LISTEN = 106 // { int|sys||listen(int s, int backlog); } + SYS_GETSOCKOPT = 118 // { int|sys||getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); } + SYS_READV = 120 // { ssize_t|sys||readv(int fd, const struct iovec *iovp, int iovcnt); } + SYS_WRITEV = 121 // { ssize_t|sys||writev(int fd, const struct iovec *iovp, int iovcnt); } + SYS_FCHOWN = 123 // { int|sys||fchown(int fd, uid_t uid, gid_t gid); } + SYS_FCHMOD = 124 // { int|sys||fchmod(int fd, mode_t mode); } + SYS_SETREUID = 126 // { int|sys||setreuid(uid_t ruid, uid_t euid); } + SYS_SETREGID = 127 // { int|sys||setregid(gid_t rgid, gid_t egid); } + SYS_RENAME = 128 // { int|sys||rename(const char *from, const char *to); } + SYS_FLOCK = 131 // { int|sys||flock(int fd, int how); } + SYS_MKFIFO = 132 // { int|sys||mkfifo(const char *path, mode_t mode); } + SYS_SENDTO = 133 // { ssize_t|sys||sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); } + SYS_SHUTDOWN = 134 // { int|sys||shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int|sys||socketpair(int domain, int type, int protocol, int *rsv); } + SYS_MKDIR = 136 // { int|sys||mkdir(const char *path, mode_t mode); } + SYS_RMDIR = 137 // { int|sys||rmdir(const char *path); } + SYS_SETSID = 147 // { int|sys||setsid(void); } + SYS_SYSARCH = 165 // { int|sys||sysarch(int op, void *parms); } + SYS_PREAD = 173 // { ssize_t|sys||pread(int fd, void *buf, size_t nbyte, int PAD, off_t offset); } + SYS_PWRITE = 174 // { ssize_t|sys||pwrite(int fd, const void *buf, size_t nbyte, int PAD, off_t offset); } + SYS_NTP_ADJTIME = 176 // { int|sys||ntp_adjtime(struct timex *tp); } + SYS_SETGID = 181 // { int|sys||setgid(gid_t gid); } + SYS_SETEGID = 182 // { int|sys||setegid(gid_t egid); } + SYS_SETEUID = 183 // { int|sys||seteuid(uid_t euid); } + SYS_PATHCONF = 191 // { long|sys||pathconf(const char *path, int name); } + SYS_FPATHCONF = 192 // { long|sys||fpathconf(int fd, int name); } + SYS_GETRLIMIT = 194 // { int|sys||getrlimit(int which, struct rlimit *rlp); } + SYS_SETRLIMIT = 195 // { int|sys||setrlimit(int which, const struct rlimit *rlp); } + SYS_MMAP = 197 // { void *|sys||mmap(void *addr, size_t len, int prot, int flags, int fd, long PAD, off_t pos); } + SYS_LSEEK = 199 // { off_t|sys||lseek(int fd, int PAD, off_t offset, int whence); } + SYS_TRUNCATE = 200 // { int|sys||truncate(const char *path, int PAD, off_t length); } + SYS_FTRUNCATE = 201 // { int|sys||ftruncate(int fd, int PAD, off_t length); } + SYS___SYSCTL = 202 // { int|sys||__sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, const void *new, size_t newlen); } + SYS_MLOCK = 203 // { int|sys||mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int|sys||munlock(const void *addr, size_t len); } + SYS_UNDELETE = 205 // { int|sys||undelete(const char *path); } + SYS_GETPGID = 207 // { pid_t|sys||getpgid(pid_t pid); } + SYS_REBOOT = 208 // { int|sys||reboot(int opt, char *bootstr); } + SYS_POLL = 209 // { int|sys||poll(struct pollfd *fds, u_int nfds, int timeout); } + SYS_SEMGET = 221 // { int|sys||semget(key_t key, int nsems, int semflg); } + SYS_SEMOP = 222 // { int|sys||semop(int semid, struct sembuf *sops, size_t nsops); } + SYS_SEMCONFIG = 223 // { int|sys||semconfig(int flag); } + SYS_MSGGET = 225 // { int|sys||msgget(key_t key, int msgflg); } + SYS_MSGSND = 226 // { int|sys||msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); } + SYS_MSGRCV = 227 // { ssize_t|sys||msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); } + SYS_SHMAT = 228 // { void *|sys||shmat(int shmid, const void *shmaddr, int shmflg); } + SYS_SHMDT = 230 // { int|sys||shmdt(const void *shmaddr); } + SYS_SHMGET = 231 // { int|sys||shmget(key_t key, size_t size, int shmflg); } + SYS_TIMER_CREATE = 235 // { int|sys||timer_create(clockid_t clock_id, struct sigevent *evp, timer_t *timerid); } + SYS_TIMER_DELETE = 236 // { int|sys||timer_delete(timer_t timerid); } + SYS_TIMER_GETOVERRUN = 239 // { int|sys||timer_getoverrun(timer_t timerid); } + SYS_FDATASYNC = 241 // { int|sys||fdatasync(int fd); } + SYS_MLOCKALL = 242 // { int|sys||mlockall(int flags); } + SYS_MUNLOCKALL = 243 // { int|sys||munlockall(void); } + SYS_SIGQUEUEINFO = 245 // { int|sys||sigqueueinfo(pid_t pid, const siginfo_t *info); } + SYS_MODCTL = 246 // { int|sys||modctl(int cmd, void *arg); } + SYS___POSIX_RENAME = 270 // { int|sys||__posix_rename(const char *from, const char *to); } + SYS_SWAPCTL = 271 // { int|sys||swapctl(int cmd, void *arg, int misc); } + SYS_MINHERIT = 273 // { int|sys||minherit(void *addr, size_t len, int inherit); } + SYS_LCHMOD = 274 // { int|sys||lchmod(const char *path, mode_t mode); } + SYS_LCHOWN = 275 // { int|sys||lchown(const char *path, uid_t uid, gid_t gid); } + SYS___POSIX_CHOWN = 283 // { int|sys||__posix_chown(const char *path, uid_t uid, gid_t gid); } + SYS___POSIX_FCHOWN = 284 // { int|sys||__posix_fchown(int fd, uid_t uid, gid_t gid); } + SYS___POSIX_LCHOWN = 285 // { int|sys||__posix_lchown(const char *path, uid_t uid, gid_t gid); } + SYS_GETSID = 286 // { pid_t|sys||getsid(pid_t pid); } + SYS___CLONE = 287 // { pid_t|sys||__clone(int flags, void *stack); } + SYS_FKTRACE = 288 // { int|sys||fktrace(int fd, int ops, int facs, pid_t pid); } + SYS_PREADV = 289 // { ssize_t|sys||preadv(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); } + SYS_PWRITEV = 290 // { ssize_t|sys||pwritev(int fd, const struct iovec *iovp, int iovcnt, int PAD, off_t offset); } + SYS___GETCWD = 296 // { int|sys||__getcwd(char *bufp, size_t length); } + SYS_FCHROOT = 297 // { int|sys||fchroot(int fd); } + SYS_LCHFLAGS = 304 // { int|sys||lchflags(const char *path, u_long flags); } + SYS_ISSETUGID = 305 // { int|sys||issetugid(void); } + SYS_UTRACE = 306 // { int|sys||utrace(const char *label, void *addr, size_t len); } + SYS_GETCONTEXT = 307 // { int|sys||getcontext(struct __ucontext *ucp); } + SYS_SETCONTEXT = 308 // { int|sys||setcontext(const struct __ucontext *ucp); } + SYS__LWP_CREATE = 309 // { int|sys||_lwp_create(const struct __ucontext *ucp, u_long flags, lwpid_t *new_lwp); } + SYS__LWP_EXIT = 310 // { int|sys||_lwp_exit(void); } + SYS__LWP_SELF = 311 // { lwpid_t|sys||_lwp_self(void); } + SYS__LWP_WAIT = 312 // { int|sys||_lwp_wait(lwpid_t wait_for, lwpid_t *departed); } + SYS__LWP_SUSPEND = 313 // { int|sys||_lwp_suspend(lwpid_t target); } + SYS__LWP_CONTINUE = 314 // { int|sys||_lwp_continue(lwpid_t target); } + SYS__LWP_WAKEUP = 315 // { int|sys||_lwp_wakeup(lwpid_t target); } + SYS__LWP_GETPRIVATE = 316 // { void *|sys||_lwp_getprivate(void); } + SYS__LWP_SETPRIVATE = 317 // { void|sys||_lwp_setprivate(void *ptr); } + SYS__LWP_KILL = 318 // { int|sys||_lwp_kill(lwpid_t target, int signo); } + SYS__LWP_DETACH = 319 // { int|sys||_lwp_detach(lwpid_t target); } + SYS__LWP_UNPARK = 321 // { int|sys||_lwp_unpark(lwpid_t target, const void *hint); } + SYS__LWP_UNPARK_ALL = 322 // { ssize_t|sys||_lwp_unpark_all(const lwpid_t *targets, size_t ntargets, const void *hint); } + SYS__LWP_SETNAME = 323 // { int|sys||_lwp_setname(lwpid_t target, const char *name); } + SYS__LWP_GETNAME = 324 // { int|sys||_lwp_getname(lwpid_t target, char *name, size_t len); } + SYS__LWP_CTL = 325 // { int|sys||_lwp_ctl(int features, struct lwpctl **address); } + SYS___SIGACTION_SIGTRAMP = 340 // { int|sys||__sigaction_sigtramp(int signum, const struct sigaction *nsa, struct sigaction *osa, const void *tramp, int vers); } + SYS_PMC_GET_INFO = 341 // { int|sys||pmc_get_info(int ctr, int op, void *args); } + SYS_PMC_CONTROL = 342 // { int|sys||pmc_control(int ctr, int op, void *args); } + SYS_RASCTL = 343 // { int|sys||rasctl(void *addr, size_t len, int op); } + SYS_KQUEUE = 344 // { int|sys||kqueue(void); } + SYS__SCHED_SETPARAM = 346 // { int|sys||_sched_setparam(pid_t pid, lwpid_t lid, int policy, const struct sched_param *params); } + SYS__SCHED_GETPARAM = 347 // { int|sys||_sched_getparam(pid_t pid, lwpid_t lid, int *policy, struct sched_param *params); } + SYS__SCHED_SETAFFINITY = 348 // { int|sys||_sched_setaffinity(pid_t pid, lwpid_t lid, size_t size, const cpuset_t *cpuset); } + SYS__SCHED_GETAFFINITY = 349 // { int|sys||_sched_getaffinity(pid_t pid, lwpid_t lid, size_t size, cpuset_t *cpuset); } + SYS_SCHED_YIELD = 350 // { int|sys||sched_yield(void); } + SYS_FSYNC_RANGE = 354 // { int|sys||fsync_range(int fd, int flags, off_t start, off_t length); } + SYS_UUIDGEN = 355 // { int|sys||uuidgen(struct uuid *store, int count); } + SYS_GETVFSSTAT = 356 // { int|sys||getvfsstat(struct statvfs *buf, size_t bufsize, int flags); } + SYS_STATVFS1 = 357 // { int|sys||statvfs1(const char *path, struct statvfs *buf, int flags); } + SYS_FSTATVFS1 = 358 // { int|sys||fstatvfs1(int fd, struct statvfs *buf, int flags); } + SYS_EXTATTRCTL = 360 // { int|sys||extattrctl(const char *path, int cmd, const char *filename, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_FILE = 361 // { int|sys||extattr_set_file(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_FILE = 362 // { ssize_t|sys||extattr_get_file(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_FILE = 363 // { int|sys||extattr_delete_file(const char *path, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_FD = 364 // { int|sys||extattr_set_fd(int fd, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_FD = 365 // { ssize_t|sys||extattr_get_fd(int fd, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_FD = 366 // { int|sys||extattr_delete_fd(int fd, int attrnamespace, const char *attrname); } + SYS_EXTATTR_SET_LINK = 367 // { int|sys||extattr_set_link(const char *path, int attrnamespace, const char *attrname, const void *data, size_t nbytes); } + SYS_EXTATTR_GET_LINK = 368 // { ssize_t|sys||extattr_get_link(const char *path, int attrnamespace, const char *attrname, void *data, size_t nbytes); } + SYS_EXTATTR_DELETE_LINK = 369 // { int|sys||extattr_delete_link(const char *path, int attrnamespace, const char *attrname); } + SYS_EXTATTR_LIST_FD = 370 // { ssize_t|sys||extattr_list_fd(int fd, int attrnamespace, void *data, size_t nbytes); } + SYS_EXTATTR_LIST_FILE = 371 // { ssize_t|sys||extattr_list_file(const char *path, int attrnamespace, void *data, size_t nbytes); } + SYS_EXTATTR_LIST_LINK = 372 // { ssize_t|sys||extattr_list_link(const char *path, int attrnamespace, void *data, size_t nbytes); } + SYS_SETXATTR = 375 // { int|sys||setxattr(const char *path, const char *name, const void *value, size_t size, int flags); } + SYS_LSETXATTR = 376 // { int|sys||lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags); } + SYS_FSETXATTR = 377 // { int|sys||fsetxattr(int fd, const char *name, const void *value, size_t size, int flags); } + SYS_GETXATTR = 378 // { int|sys||getxattr(const char *path, const char *name, void *value, size_t size); } + SYS_LGETXATTR = 379 // { int|sys||lgetxattr(const char *path, const char *name, void *value, size_t size); } + SYS_FGETXATTR = 380 // { int|sys||fgetxattr(int fd, const char *name, void *value, size_t size); } + SYS_LISTXATTR = 381 // { int|sys||listxattr(const char *path, char *list, size_t size); } + SYS_LLISTXATTR = 382 // { int|sys||llistxattr(const char *path, char *list, size_t size); } + SYS_FLISTXATTR = 383 // { int|sys||flistxattr(int fd, char *list, size_t size); } + SYS_REMOVEXATTR = 384 // { int|sys||removexattr(const char *path, const char *name); } + SYS_LREMOVEXATTR = 385 // { int|sys||lremovexattr(const char *path, const char *name); } + SYS_FREMOVEXATTR = 386 // { int|sys||fremovexattr(int fd, const char *name); } + SYS_GETDENTS = 390 // { int|sys|30|getdents(int fd, char *buf, size_t count); } + SYS_SOCKET = 394 // { int|sys|30|socket(int domain, int type, int protocol); } + SYS_GETFH = 395 // { int|sys|30|getfh(const char *fname, void *fhp, size_t *fh_size); } + SYS_MOUNT = 410 // { int|sys|50|mount(const char *type, const char *path, int flags, void *data, size_t data_len); } + SYS_MREMAP = 411 // { void *|sys||mremap(void *old_address, size_t old_size, void *new_address, size_t new_size, int flags); } + SYS_PSET_CREATE = 412 // { int|sys||pset_create(psetid_t *psid); } + SYS_PSET_DESTROY = 413 // { int|sys||pset_destroy(psetid_t psid); } + SYS_PSET_ASSIGN = 414 // { int|sys||pset_assign(psetid_t psid, cpuid_t cpuid, psetid_t *opsid); } + SYS__PSET_BIND = 415 // { int|sys||_pset_bind(idtype_t idtype, id_t first_id, id_t second_id, psetid_t psid, psetid_t *opsid); } + SYS_POSIX_FADVISE = 416 // { int|sys|50|posix_fadvise(int fd, int PAD, off_t offset, off_t len, int advice); } + SYS_SELECT = 417 // { int|sys|50|select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); } + SYS_GETTIMEOFDAY = 418 // { int|sys|50|gettimeofday(struct timeval *tp, void *tzp); } + SYS_SETTIMEOFDAY = 419 // { int|sys|50|settimeofday(const struct timeval *tv, const void *tzp); } + SYS_UTIMES = 420 // { int|sys|50|utimes(const char *path, const struct timeval *tptr); } + SYS_ADJTIME = 421 // { int|sys|50|adjtime(const struct timeval *delta, struct timeval *olddelta); } + SYS_FUTIMES = 423 // { int|sys|50|futimes(int fd, const struct timeval *tptr); } + SYS_LUTIMES = 424 // { int|sys|50|lutimes(const char *path, const struct timeval *tptr); } + SYS_SETITIMER = 425 // { int|sys|50|setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); } + SYS_GETITIMER = 426 // { int|sys|50|getitimer(int which, struct itimerval *itv); } + SYS_CLOCK_GETTIME = 427 // { int|sys|50|clock_gettime(clockid_t clock_id, struct timespec *tp); } + SYS_CLOCK_SETTIME = 428 // { int|sys|50|clock_settime(clockid_t clock_id, const struct timespec *tp); } + SYS_CLOCK_GETRES = 429 // { int|sys|50|clock_getres(clockid_t clock_id, struct timespec *tp); } + SYS_NANOSLEEP = 430 // { int|sys|50|nanosleep(const struct timespec *rqtp, struct timespec *rmtp); } + SYS___SIGTIMEDWAIT = 431 // { int|sys|50|__sigtimedwait(const sigset_t *set, siginfo_t *info, struct timespec *timeout); } + SYS__LWP_PARK = 434 // { int|sys|50|_lwp_park(const struct timespec *ts, lwpid_t unpark, const void *hint, const void *unparkhint); } + SYS_KEVENT = 435 // { int|sys|50|kevent(int fd, const struct kevent *changelist, size_t nchanges, struct kevent *eventlist, size_t nevents, const struct timespec *timeout); } + SYS_PSELECT = 436 // { int|sys|50|pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); } + SYS_POLLTS = 437 // { int|sys|50|pollts(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); } + SYS_STAT = 439 // { int|sys|50|stat(const char *path, struct stat *ub); } + SYS_FSTAT = 440 // { int|sys|50|fstat(int fd, struct stat *sb); } + SYS_LSTAT = 441 // { int|sys|50|lstat(const char *path, struct stat *ub); } + SYS___SEMCTL = 442 // { int|sys|50|__semctl(int semid, int semnum, int cmd, ... union __semun *arg); } + SYS_SHMCTL = 443 // { int|sys|50|shmctl(int shmid, int cmd, struct shmid_ds *buf); } + SYS_MSGCTL = 444 // { int|sys|50|msgctl(int msqid, int cmd, struct msqid_ds *buf); } + SYS_GETRUSAGE = 445 // { int|sys|50|getrusage(int who, struct rusage *rusage); } + SYS_TIMER_SETTIME = 446 // { int|sys|50|timer_settime(timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue); } + SYS_TIMER_GETTIME = 447 // { int|sys|50|timer_gettime(timer_t timerid, struct itimerspec *value); } + SYS_NTP_GETTIME = 448 // { int|sys|50|ntp_gettime(struct ntptimeval *ntvp); } + SYS_WAIT4 = 449 // { int|sys|50|wait4(pid_t pid, int *status, int options, struct rusage *rusage); } + SYS_MKNOD = 450 // { int|sys|50|mknod(const char *path, mode_t mode, dev_t dev); } + SYS_FHSTAT = 451 // { int|sys|50|fhstat(const void *fhp, size_t fh_size, struct stat *sb); } + SYS_PIPE2 = 453 // { int|sys||pipe2(int *fildes, int flags); } + SYS_DUP3 = 454 // { int|sys||dup3(int from, int to, int flags); } + SYS_KQUEUE1 = 455 // { int|sys||kqueue1(int flags); } + SYS_PACCEPT = 456 // { int|sys||paccept(int s, struct sockaddr *name, socklen_t *anamelen, const sigset_t *mask, int flags); } + SYS_LINKAT = 457 // { int|sys||linkat(int fd1, const char *name1, int fd2, const char *name2, int flags); } + SYS_RENAMEAT = 458 // { int|sys||renameat(int fromfd, const char *from, int tofd, const char *to); } + SYS_MKFIFOAT = 459 // { int|sys||mkfifoat(int fd, const char *path, mode_t mode); } + SYS_MKNODAT = 460 // { int|sys||mknodat(int fd, const char *path, mode_t mode, uint32_t dev); } + SYS_MKDIRAT = 461 // { int|sys||mkdirat(int fd, const char *path, mode_t mode); } + SYS_FACCESSAT = 462 // { int|sys||faccessat(int fd, const char *path, int amode, int flag); } + SYS_FCHMODAT = 463 // { int|sys||fchmodat(int fd, const char *path, mode_t mode, int flag); } + SYS_FCHOWNAT = 464 // { int|sys||fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag); } + SYS_FEXECVE = 465 // { int|sys||fexecve(int fd, char * const *argp, char * const *envp); } + SYS_FSTATAT = 466 // { int|sys||fstatat(int fd, const char *path, struct stat *buf, int flag); } + SYS_UTIMENSAT = 467 // { int|sys||utimensat(int fd, const char *path, const struct timespec *tptr, int flag); } + SYS_OPENAT = 468 // { int|sys||openat(int fd, const char *path, int oflags, ... mode_t mode); } + SYS_READLINKAT = 469 // { int|sys||readlinkat(int fd, const char *path, char *buf, size_t bufsize); } + SYS_SYMLINKAT = 470 // { int|sys||symlinkat(const char *path1, int fd, const char *path2); } + SYS_UNLINKAT = 471 // { int|sys||unlinkat(int fd, const char *path, int flag); } + SYS_FUTIMENS = 472 // { int|sys||futimens(int fd, const struct timespec *tptr); } + SYS___QUOTACTL = 473 // { int|sys||__quotactl(const char *path, struct quotactl_args *args); } + SYS_POSIX_SPAWN = 474 // { int|sys||posix_spawn(pid_t *pid, const char *path, const struct posix_spawn_file_actions *file_actions, const struct posix_spawnattr *attrp, char *const *argv, char *const *envp); } + SYS_RECVMMSG = 475 // { int|sys||recvmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags, struct timespec *timeout); } + SYS_SENDMMSG = 476 // { int|sys||sendmmsg(int s, struct mmsghdr *mmsg, unsigned int vlen, unsigned int flags); } +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go new file mode 100644 index 000000000..3e8ce2a1d --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go @@ -0,0 +1,207 @@ +// mksysnum_openbsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build 386,openbsd + +package unix + +const ( + SYS_EXIT = 1 // { void sys_exit(int rval); } + SYS_FORK = 2 // { int sys_fork(void); } + SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); } + SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \ + SYS_OPEN = 5 // { int sys_open(const char *path, \ + SYS_CLOSE = 6 // { int sys_close(int fd); } + SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \ + SYS_LINK = 9 // { int sys_link(const char *path, const char *link); } + SYS_UNLINK = 10 // { int sys_unlink(const char *path); } + SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \ + SYS_CHDIR = 12 // { int sys_chdir(const char *path); } + SYS_FCHDIR = 13 // { int sys_fchdir(int fd); } + SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \ + SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); } + SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \ + SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break + SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } + SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \ + SYS_GETPID = 20 // { pid_t sys_getpid(void); } + SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \ + SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); } + SYS_SETUID = 23 // { int sys_setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t sys_getuid(void); } + SYS_GETEUID = 25 // { uid_t sys_geteuid(void); } + SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \ + SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ + SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, \ + SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \ + SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, \ + SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, \ + SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, \ + SYS_ACCESS = 33 // { int sys_access(const char *path, int flags); } + SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); } + SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); } + SYS_SYNC = 36 // { void sys_sync(void); } + SYS_KILL = 37 // { int sys_kill(int pid, int signum); } + SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); } + SYS_GETPPID = 39 // { pid_t sys_getppid(void); } + SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); } + SYS_DUP = 41 // { int sys_dup(int fd); } + SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \ + SYS_GETEGID = 43 // { gid_t sys_getegid(void); } + SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \ + SYS_SIGACTION = 46 // { int sys_sigaction(int signum, \ + SYS_GETGID = 47 // { gid_t sys_getgid(void); } + SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); } + SYS_GETLOGIN = 49 // { int sys_getlogin(char *namebuf, u_int namelen); } + SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); } + SYS_ACCT = 51 // { int sys_acct(const char *path); } + SYS_SIGPENDING = 52 // { int sys_sigpending(void); } + SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); } + SYS_IOCTL = 54 // { int sys_ioctl(int fd, \ + SYS_REBOOT = 55 // { int sys_reboot(int opt); } + SYS_REVOKE = 56 // { int sys_revoke(const char *path); } + SYS_SYMLINK = 57 // { int sys_symlink(const char *path, \ + SYS_READLINK = 58 // { int sys_readlink(const char *path, char *buf, \ + SYS_EXECVE = 59 // { int sys_execve(const char *path, \ + SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); } + SYS_CHROOT = 61 // { int sys_chroot(const char *path); } + SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \ + SYS_STATFS = 63 // { int sys_statfs(const char *path, \ + SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \ + SYS_VFORK = 66 // { int sys_vfork(void); } + SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \ + SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \ + SYS_SETITIMER = 69 // { int sys_setitimer(int which, \ + SYS_GETITIMER = 70 // { int sys_getitimer(int which, \ + SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \ + SYS_KEVENT = 72 // { int sys_kevent(int fd, \ + SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \ + SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \ + SYS_UTIMES = 76 // { int sys_utimes(const char *path, \ + SYS_FUTIMES = 77 // { int sys_futimes(int fd, \ + SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \ + SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \ + SYS_GETPGRP = 81 // { int sys_getpgrp(void); } + SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, int pgid); } + SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \ + SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \ + SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \ + SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \ + SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } + SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \ + SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } + SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \ + SYS_FSYNC = 95 // { int sys_fsync(int fd); } + SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); } + SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); } + SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \ + SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); } + SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); } + SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } + SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \ + SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); } + SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \ + SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \ + SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } + SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { ssize_t sys_readv(int fd, \ + SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \ + SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); } + SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); } + SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); } + SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); } + SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); } + SYS_FLOCK = 131 // { int sys_flock(int fd, int how); } + SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); } + SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, \ + SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \ + SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); } + SYS_RMDIR = 137 // { int sys_rmdir(const char *path); } + SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \ + SYS_SETSID = 147 // { int sys_setsid(void); } + SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \ + SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); } + SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); } + SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); } + SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, \ + SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, \ + SYS_SETGID = 181 // { int sys_setgid(gid_t gid); } + SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); } + SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); } + SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); } + SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); } + SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); } + SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, \ + SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, \ + SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, \ + SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \ + SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \ + SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); } + SYS___SYSCTL = 202 // { int sys___sysctl(const int *name, u_int namelen, \ + SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); } + SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } + SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \ + SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); } + SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); } + SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \ + SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \ + SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \ + SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); } + SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \ + SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \ + SYS_ISSETUGID = 253 // { int sys_issetugid(void); } + SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); } + SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); } + SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); } + SYS_PIPE = 263 // { int sys_pipe(int *fdp); } + SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); } + SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \ + SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \ + SYS_KQUEUE = 269 // { int sys_kqueue(void); } + SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); } + SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); } + SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \ + SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, \ + SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, \ + SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, \ + SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, \ + SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); } + SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \ + SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); } + SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \ + SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \ + SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \ + SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \ + SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \ + SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); } + SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); } + SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \ + SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } + SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \ + SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } + SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \ + SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); } + SYS_GETRTABLE = 311 // { int sys_getrtable(void); } + SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \ + SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \ + SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \ + SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \ + SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \ + SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \ + SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, \ + SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, \ + SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, \ + SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \ + SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \ + SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \ + SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } + SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go new file mode 100644 index 000000000..bd28146dd --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go @@ -0,0 +1,207 @@ +// mksysnum_openbsd.pl +// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT + +// +build amd64,openbsd + +package unix + +const ( + SYS_EXIT = 1 // { void sys_exit(int rval); } + SYS_FORK = 2 // { int sys_fork(void); } + SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); } + SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, \ + SYS_OPEN = 5 // { int sys_open(const char *path, \ + SYS_CLOSE = 6 // { int sys_close(int fd); } + SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, \ + SYS_LINK = 9 // { int sys_link(const char *path, const char *link); } + SYS_UNLINK = 10 // { int sys_unlink(const char *path); } + SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, \ + SYS_CHDIR = 12 // { int sys_chdir(const char *path); } + SYS_FCHDIR = 13 // { int sys_fchdir(int fd); } + SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, \ + SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); } + SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, \ + SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break + SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); } + SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, \ + SYS_GETPID = 20 // { pid_t sys_getpid(void); } + SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, \ + SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); } + SYS_SETUID = 23 // { int sys_setuid(uid_t uid); } + SYS_GETUID = 24 // { uid_t sys_getuid(void); } + SYS_GETEUID = 25 // { uid_t sys_geteuid(void); } + SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, \ + SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, \ + SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, \ + SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, \ + SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, \ + SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, \ + SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, \ + SYS_ACCESS = 33 // { int sys_access(const char *path, int flags); } + SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); } + SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); } + SYS_SYNC = 36 // { void sys_sync(void); } + SYS_KILL = 37 // { int sys_kill(int pid, int signum); } + SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); } + SYS_GETPPID = 39 // { pid_t sys_getppid(void); } + SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); } + SYS_DUP = 41 // { int sys_dup(int fd); } + SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, \ + SYS_GETEGID = 43 // { gid_t sys_getegid(void); } + SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, \ + SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, \ + SYS_SIGACTION = 46 // { int sys_sigaction(int signum, \ + SYS_GETGID = 47 // { gid_t sys_getgid(void); } + SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); } + SYS_GETLOGIN = 49 // { int sys_getlogin(char *namebuf, u_int namelen); } + SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); } + SYS_ACCT = 51 // { int sys_acct(const char *path); } + SYS_SIGPENDING = 52 // { int sys_sigpending(void); } + SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); } + SYS_IOCTL = 54 // { int sys_ioctl(int fd, \ + SYS_REBOOT = 55 // { int sys_reboot(int opt); } + SYS_REVOKE = 56 // { int sys_revoke(const char *path); } + SYS_SYMLINK = 57 // { int sys_symlink(const char *path, \ + SYS_READLINK = 58 // { int sys_readlink(const char *path, char *buf, \ + SYS_EXECVE = 59 // { int sys_execve(const char *path, \ + SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); } + SYS_CHROOT = 61 // { int sys_chroot(const char *path); } + SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, \ + SYS_STATFS = 63 // { int sys_statfs(const char *path, \ + SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); } + SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, \ + SYS_VFORK = 66 // { int sys_vfork(void); } + SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, \ + SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, \ + SYS_SETITIMER = 69 // { int sys_setitimer(int which, \ + SYS_GETITIMER = 70 // { int sys_getitimer(int which, \ + SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, \ + SYS_KEVENT = 72 // { int sys_kevent(int fd, \ + SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); } + SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, \ + SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, \ + SYS_UTIMES = 76 // { int sys_utimes(const char *path, \ + SYS_FUTIMES = 77 // { int sys_futimes(int fd, \ + SYS_MINCORE = 78 // { int sys_mincore(void *addr, size_t len, \ + SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, \ + SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, \ + SYS_GETPGRP = 81 // { int sys_getpgrp(void); } + SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, int pgid); } + SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, \ + SYS_FUTIMENS = 85 // { int sys_futimens(int fd, \ + SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, \ + SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, \ + SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, \ + SYS_DUP2 = 90 // { int sys_dup2(int from, int to); } + SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, \ + SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); } + SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, \ + SYS_FSYNC = 95 // { int sys_fsync(int fd); } + SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); } + SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); } + SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, \ + SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); } + SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); } + SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); } + SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, \ + SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, \ + SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); } + SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, \ + SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, \ + SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); } + SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, \ + SYS_READV = 120 // { ssize_t sys_readv(int fd, \ + SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, \ + SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); } + SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); } + SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); } + SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); } + SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); } + SYS_FLOCK = 131 // { int sys_flock(int fd, int how); } + SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); } + SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, \ + SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); } + SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, \ + SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); } + SYS_RMDIR = 137 // { int sys_rmdir(const char *path); } + SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, \ + SYS_SETSID = 147 // { int sys_setsid(void); } + SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, \ + SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); } + SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); } + SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); } + SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, \ + SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, \ + SYS_SETGID = 181 // { int sys_setgid(gid_t gid); } + SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); } + SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); } + SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); } + SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); } + SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); } + SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, \ + SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, \ + SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, \ + SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, \ + SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, \ + SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); } + SYS___SYSCTL = 202 // { int sys___sysctl(const int *name, u_int namelen, \ + SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); } + SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); } + SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); } + SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, \ + SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); } + SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); } + SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, \ + SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, \ + SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, \ + SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); } + SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, \ + SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, \ + SYS_ISSETUGID = 253 // { int sys_issetugid(void); } + SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); } + SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); } + SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); } + SYS_PIPE = 263 // { int sys_pipe(int *fdp); } + SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); } + SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, \ + SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, \ + SYS_KQUEUE = 269 // { int sys_kqueue(void); } + SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); } + SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); } + SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, \ + SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, \ + SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, \ + SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, \ + SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, \ + SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); } + SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, \ + SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); } + SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, \ + SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, \ + SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, \ + SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, \ + SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, \ + SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); } + SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); } + SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, \ + SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); } + SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, \ + SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); } + SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, \ + SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); } + SYS_GETRTABLE = 311 // { int sys_getrtable(void); } + SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, \ + SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, \ + SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, \ + SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, \ + SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, \ + SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, \ + SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, \ + SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, \ + SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, \ + SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, \ + SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, \ + SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, \ + SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); } + SYS___GET_TCB = 330 // { void *sys___get_tcb(void); } +) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go new file mode 100644 index 000000000..c70865985 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/zsysnum_solaris_amd64.go @@ -0,0 +1,13 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build amd64,solaris + +package unix + +// TODO(aram): remove these before Go 1.3. +const ( + SYS_EXECVE = 59 + SYS_FCNTL = 62 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go new file mode 100644 index 000000000..2de1d44e2 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_386.go @@ -0,0 +1,447 @@ +// +build 386,darwin +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_darwin.go + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int32 + Nsec int32 +} + +type Timeval struct { + Sec int32 + Usec int32 +} + +type Timeval32 struct{} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev int32 + Mode uint16 + Nlink uint16 + Ino uint64 + Uid uint32 + Gid uint32 + Rdev int32 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Birthtimespec Timespec + Size int64 + Blocks int64 + Blksize int32 + Flags uint32 + Gen uint32 + Lspare int32 + Qspare [2]int64 +} + +type Statfs_t struct { + Bsize uint32 + Iosize int32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Owner uint32 + Type uint32 + Flags uint32 + Fssubtype uint32 + Fstypename [16]int8 + Mntonname [1024]int8 + Mntfromname [1024]int8 + Reserved [8]uint32 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Fstore_t struct { + Flags uint32 + Posmode int32 + Offset int64 + Length int64 + Bytesalloc int64 +} + +type Radvisory_t struct { + Offset int64 + Count int32 +} + +type Fbootstraptransfer_t struct { + Offset int64 + Length uint32 + Buffer *byte +} + +type Log2phys_t struct { + Flags uint32 + Contigbytes int64 + Devoffset int64 +} + +type Fsid struct { + Val [2]int32 +} + +type Dirent struct { + Ino uint64 + Seekoff uint64 + Reclen uint16 + Namlen uint16 + Type uint8 + Name [1024]int8 + Pad_cgo_0 [3]byte +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet4Pktinfo struct { + Ifindex uint32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x14 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter int16 + Flags uint16 + Fflags uint32 + Data int32 + Udata *byte +} + +type FdSet struct { + Bits [32]int32 +} + +const ( + SizeofIfMsghdr = 0x70 + SizeofIfData = 0x60 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfmaMsghdr2 = 0x14 + SizeofRtMsghdr = 0x5c + SizeofRtMetrics = 0x38 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Typelen uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Unused1 uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Recvtiming uint32 + Xmittiming uint32 + Lastchange Timeval + Unused2 uint32 + Hwassist uint32 + Reserved1 uint32 + Reserved2 uint32 +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfmaMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Refcount int32 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint32 + Mtu uint32 + Hopcount uint32 + Expire int32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pksent uint32 + Filler [4]uint32 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go new file mode 100644 index 000000000..044657878 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go @@ -0,0 +1,462 @@ +// +build amd64,darwin +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_darwin.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int32 + Pad_cgo_0 [4]byte +} + +type Timeval32 struct { + Sec int32 + Usec int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev int32 + Mode uint16 + Nlink uint16 + Ino uint64 + Uid uint32 + Gid uint32 + Rdev int32 + Pad_cgo_0 [4]byte + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Birthtimespec Timespec + Size int64 + Blocks int64 + Blksize int32 + Flags uint32 + Gen uint32 + Lspare int32 + Qspare [2]int64 +} + +type Statfs_t struct { + Bsize uint32 + Iosize int32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Owner uint32 + Type uint32 + Flags uint32 + Fssubtype uint32 + Fstypename [16]int8 + Mntonname [1024]int8 + Mntfromname [1024]int8 + Reserved [8]uint32 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Fstore_t struct { + Flags uint32 + Posmode int32 + Offset int64 + Length int64 + Bytesalloc int64 +} + +type Radvisory_t struct { + Offset int64 + Count int32 + Pad_cgo_0 [4]byte +} + +type Fbootstraptransfer_t struct { + Offset int64 + Length uint64 + Buffer *byte +} + +type Log2phys_t struct { + Flags uint32 + Pad_cgo_0 [8]byte + Pad_cgo_1 [8]byte +} + +type Fsid struct { + Val [2]int32 +} + +type Dirent struct { + Ino uint64 + Seekoff uint64 + Reclen uint16 + Namlen uint16 + Type uint8 + Name [1024]int8 + Pad_cgo_0 [3]byte +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet4Pktinfo struct { + Ifindex uint32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x14 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x30 + SizeofCmsghdr = 0xc + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint64 + Filter int16 + Flags uint16 + Fflags uint32 + Data int64 + Udata *byte +} + +type FdSet struct { + Bits [32]int32 +} + +const ( + SizeofIfMsghdr = 0x70 + SizeofIfData = 0x60 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfmaMsghdr2 = 0x14 + SizeofRtMsghdr = 0x5c + SizeofRtMetrics = 0x38 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Typelen uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Unused1 uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Recvtiming uint32 + Xmittiming uint32 + Lastchange Timeval32 + Unused2 uint32 + Hwassist uint32 + Reserved1 uint32 + Reserved2 uint32 +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfmaMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Refcount int32 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint32 + Mtu uint32 + Hopcount uint32 + Expire int32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pksent uint32 + Filler [4]uint32 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x10 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Pad_cgo_0 [4]byte + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval32 + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type Termios struct { + Iflag uint64 + Oflag uint64 + Cflag uint64 + Lflag uint64 + Cc [20]uint8 + Pad_cgo_0 [4]byte + Ispeed uint64 + Ospeed uint64 +} + +const ( + AT_FDCWD = -0x2 + AT_SYMLINK_NOFOLLOW = 0x20 +) diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go new file mode 100644 index 000000000..66df363ce --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm.go @@ -0,0 +1,449 @@ +// NOTE: cgo can't generate struct Stat_t and struct Statfs_t yet +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_darwin.go + +// +build arm,darwin + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int32 + Nsec int32 +} + +type Timeval struct { + Sec int32 + Usec int32 +} + +type Timeval32 [0]byte + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev int32 + Mode uint16 + Nlink uint16 + Ino uint64 + Uid uint32 + Gid uint32 + Rdev int32 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Birthtimespec Timespec + Size int64 + Blocks int64 + Blksize int32 + Flags uint32 + Gen uint32 + Lspare int32 + Qspare [2]int64 +} + +type Statfs_t struct { + Bsize uint32 + Iosize int32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Owner uint32 + Type uint32 + Flags uint32 + Fssubtype uint32 + Fstypename [16]int8 + Mntonname [1024]int8 + Mntfromname [1024]int8 + Reserved [8]uint32 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Fstore_t struct { + Flags uint32 + Posmode int32 + Offset int64 + Length int64 + Bytesalloc int64 +} + +type Radvisory_t struct { + Offset int64 + Count int32 +} + +type Fbootstraptransfer_t struct { + Offset int64 + Length uint32 + Buffer *byte +} + +type Log2phys_t struct { + Flags uint32 + Contigbytes int64 + Devoffset int64 +} + +type Fsid struct { + Val [2]int32 +} + +type Dirent struct { + Ino uint64 + Seekoff uint64 + Reclen uint16 + Namlen uint16 + Type uint8 + Name [1024]int8 + Pad_cgo_0 [3]byte +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet4Pktinfo struct { + Ifindex uint32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x14 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter int16 + Flags uint16 + Fflags uint32 + Data int32 + Udata *byte +} + +type FdSet struct { + Bits [32]int32 +} + +const ( + SizeofIfMsghdr = 0x70 + SizeofIfData = 0x60 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfmaMsghdr2 = 0x14 + SizeofRtMsghdr = 0x5c + SizeofRtMetrics = 0x38 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Typelen uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Unused1 uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Recvtiming uint32 + Xmittiming uint32 + Lastchange Timeval + Unused2 uint32 + Hwassist uint32 + Reserved1 uint32 + Reserved2 uint32 +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfmaMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Refcount int32 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint32 + Mtu uint32 + Hopcount uint32 + Expire int32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pksent uint32 + Filler [4]uint32 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go new file mode 100644 index 000000000..85d56eabd --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go @@ -0,0 +1,457 @@ +// +build arm64,darwin +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_darwin.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int32 + Pad_cgo_0 [4]byte +} + +type Timeval32 struct { + Sec int32 + Usec int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev int32 + Mode uint16 + Nlink uint16 + Ino uint64 + Uid uint32 + Gid uint32 + Rdev int32 + Pad_cgo_0 [4]byte + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Birthtimespec Timespec + Size int64 + Blocks int64 + Blksize int32 + Flags uint32 + Gen uint32 + Lspare int32 + Qspare [2]int64 +} + +type Statfs_t struct { + Bsize uint32 + Iosize int32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Owner uint32 + Type uint32 + Flags uint32 + Fssubtype uint32 + Fstypename [16]int8 + Mntonname [1024]int8 + Mntfromname [1024]int8 + Reserved [8]uint32 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Fstore_t struct { + Flags uint32 + Posmode int32 + Offset int64 + Length int64 + Bytesalloc int64 +} + +type Radvisory_t struct { + Offset int64 + Count int32 + Pad_cgo_0 [4]byte +} + +type Fbootstraptransfer_t struct { + Offset int64 + Length uint64 + Buffer *byte +} + +type Log2phys_t struct { + Flags uint32 + Pad_cgo_0 [8]byte + Pad_cgo_1 [8]byte +} + +type Fsid struct { + Val [2]int32 +} + +type Dirent struct { + Ino uint64 + Seekoff uint64 + Reclen uint16 + Namlen uint16 + Type uint8 + Name [1024]int8 + Pad_cgo_0 [3]byte +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet4Pktinfo struct { + Ifindex uint32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x14 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x30 + SizeofCmsghdr = 0xc + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint64 + Filter int16 + Flags uint16 + Fflags uint32 + Data int64 + Udata *byte +} + +type FdSet struct { + Bits [32]int32 +} + +const ( + SizeofIfMsghdr = 0x70 + SizeofIfData = 0x60 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfmaMsghdr2 = 0x14 + SizeofRtMsghdr = 0x5c + SizeofRtMetrics = 0x38 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Typelen uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Unused1 uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Recvtiming uint32 + Xmittiming uint32 + Lastchange Timeval32 + Unused2 uint32 + Hwassist uint32 + Reserved1 uint32 + Reserved2 uint32 +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfmaMsghdr2 struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Refcount int32 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint32 + Mtu uint32 + Hopcount uint32 + Expire int32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pksent uint32 + Filler [4]uint32 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x10 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Pad_cgo_0 [4]byte + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval32 + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type Termios struct { + Iflag uint64 + Oflag uint64 + Cflag uint64 + Lflag uint64 + Cc [20]uint8 + Pad_cgo_0 [4]byte + Ispeed uint64 + Ospeed uint64 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go new file mode 100644 index 000000000..8a6f4e1ce --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go @@ -0,0 +1,443 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_dragonfly.go + +// +build amd64,dragonfly + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur int64 + Max int64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Ino uint64 + Nlink uint32 + Dev uint32 + Mode uint16 + Padding1 uint16 + Uid uint32 + Gid uint32 + Rdev uint32 + Atim Timespec + Mtim Timespec + Ctim Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Lspare int32 + Qspare1 int64 + Qspare2 int64 +} + +type Statfs_t struct { + Spare2 int64 + Bsize int64 + Iosize int64 + Blocks int64 + Bfree int64 + Bavail int64 + Files int64 + Ffree int64 + Fsid Fsid + Owner uint32 + Type int32 + Flags int32 + Pad_cgo_0 [4]byte + Syncwrites int64 + Asyncwrites int64 + Fstypename [16]int8 + Mntonname [80]int8 + Syncreads int64 + Asyncreads int64 + Spares1 int16 + Mntfromname [80]int8 + Spares2 int16 + Pad_cgo_1 [4]byte + Spare [2]int64 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Dirent struct { + Fileno uint64 + Namlen uint16 + Type uint8 + Unused1 uint8 + Unused2 uint32 + Name [256]int8 +} + +type Fsid struct { + Val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 + Rcf uint16 + Route [16]uint16 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x36 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x30 + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint64 + Filter int16 + Flags uint16 + Fflags uint32 + Data int64 + Udata *byte +} + +type FdSet struct { + Bits [16]uint64 +} + +const ( + SizeofIfMsghdr = 0xb0 + SizeofIfData = 0xa0 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfAnnounceMsghdr = 0x18 + SizeofRtMsghdr = 0x98 + SizeofRtMetrics = 0x70 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Recvquota uint8 + Xmitquota uint8 + Pad_cgo_0 [2]byte + Mtu uint64 + Metric uint64 + Link_state uint64 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Hwassist uint64 + Unused uint64 + Lastchange Timeval +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Name [16]int8 + What uint16 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits uint64 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint64 + Mtu uint64 + Pksent uint64 + Expire uint64 + Sendpipe uint64 + Ssthresh uint64 + Rtt uint64 + Rttvar uint64 + Recvpipe uint64 + Hopcount uint64 + Mssopt uint16 + Pad uint16 + Pad_cgo_0 [4]byte + Msl uint64 + Iwmaxsegs uint64 + Iwcapsegs uint64 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x10 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x20 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Pad_cgo_0 [4]byte + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [6]byte +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go new file mode 100644 index 000000000..8cf30947b --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go @@ -0,0 +1,502 @@ +// +build 386,freebsd +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_freebsd.go + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int32 + Nsec int32 +} + +type Timeval struct { + Sec int32 + Usec int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur int64 + Max int64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Dev uint32 + Ino uint32 + Mode uint16 + Nlink uint16 + Uid uint32 + Gid uint32 + Rdev uint32 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Lspare int32 + Birthtimespec Timespec + Pad_cgo_0 [8]byte +} + +type Statfs_t struct { + Version uint32 + Type uint32 + Flags uint64 + Bsize uint64 + Iosize uint64 + Blocks uint64 + Bfree uint64 + Bavail int64 + Files uint64 + Ffree int64 + Syncwrites uint64 + Asyncwrites uint64 + Syncreads uint64 + Asyncreads uint64 + Spare [10]uint64 + Namemax uint32 + Owner uint32 + Fsid Fsid + Charspare [80]int8 + Fstypename [16]int8 + Mntfromname [88]int8 + Mntonname [88]int8 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 + Sysid int32 +} + +type Dirent struct { + Fileno uint32 + Reclen uint16 + Type uint8 + Namlen uint8 + Name [256]int8 +} + +type Fsid struct { + Val [2]int32 +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 +) + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [46]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x36 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter int16 + Flags uint16 + Fflags uint32 + Data int32 + Udata *byte +} + +type FdSet struct { + X__fds_bits [32]uint32 +} + +const ( + sizeofIfMsghdr = 0x64 + SizeofIfMsghdr = 0x60 + sizeofIfData = 0x54 + SizeofIfData = 0x50 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfAnnounceMsghdr = 0x18 + SizeofRtMsghdr = 0x5c + SizeofRtMetrics = 0x38 +) + +type ifMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data ifData +} + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type ifData struct { + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Vhid uint8 + Baudrate_pf uint8 + Datalen uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Hwassist uint64 + Epoch int32 + Lastchange Timeval +} + +type IfData struct { + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Spare_char1 uint8 + Spare_char2 uint8 + Datalen uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Hwassist uint32 + Epoch int32 + Lastchange Timeval +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Name [16]int8 + What uint16 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Fmask int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint32 + Mtu uint32 + Hopcount uint32 + Expire uint32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pksent uint32 + Weight uint32 + Filler [3]uint32 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfZbuf = 0xc + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 + SizeofBpfZbufHeader = 0x20 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfZbuf struct { + Bufa *byte + Bufb *byte + Buflen uint32 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type BpfZbufHeader struct { + Kernel_gen uint32 + Kernel_len uint32 + User_gen uint32 + X_bzh_pad [5]uint32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go new file mode 100644 index 000000000..e5feb207b --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go @@ -0,0 +1,505 @@ +// +build amd64,freebsd +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_freebsd.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur int64 + Max int64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Dev uint32 + Ino uint32 + Mode uint16 + Nlink uint16 + Uid uint32 + Gid uint32 + Rdev uint32 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Lspare int32 + Birthtimespec Timespec +} + +type Statfs_t struct { + Version uint32 + Type uint32 + Flags uint64 + Bsize uint64 + Iosize uint64 + Blocks uint64 + Bfree uint64 + Bavail int64 + Files uint64 + Ffree int64 + Syncwrites uint64 + Asyncwrites uint64 + Syncreads uint64 + Asyncreads uint64 + Spare [10]uint64 + Namemax uint32 + Owner uint32 + Fsid Fsid + Charspare [80]int8 + Fstypename [16]int8 + Mntfromname [88]int8 + Mntonname [88]int8 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 + Sysid int32 + Pad_cgo_0 [4]byte +} + +type Dirent struct { + Fileno uint32 + Reclen uint16 + Type uint8 + Namlen uint8 + Name [256]int8 +} + +type Fsid struct { + Val [2]int32 +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 +) + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [46]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x36 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x30 + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint64 + Filter int16 + Flags uint16 + Fflags uint32 + Data int64 + Udata *byte +} + +type FdSet struct { + X__fds_bits [16]uint64 +} + +const ( + sizeofIfMsghdr = 0xa8 + SizeofIfMsghdr = 0xa8 + sizeofIfData = 0x98 + SizeofIfData = 0x98 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfAnnounceMsghdr = 0x18 + SizeofRtMsghdr = 0x98 + SizeofRtMetrics = 0x70 +) + +type ifMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data ifData +} + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type ifData struct { + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Vhid uint8 + Baudrate_pf uint8 + Datalen uint8 + Mtu uint64 + Metric uint64 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Hwassist uint64 + Epoch int64 + Lastchange Timeval +} + +type IfData struct { + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Spare_char1 uint8 + Spare_char2 uint8 + Datalen uint8 + Mtu uint64 + Metric uint64 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Hwassist uint64 + Epoch int64 + Lastchange Timeval +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Name [16]int8 + What uint16 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Fmask int32 + Inits uint64 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint64 + Mtu uint64 + Hopcount uint64 + Expire uint64 + Recvpipe uint64 + Sendpipe uint64 + Ssthresh uint64 + Rtt uint64 + Rttvar uint64 + Pksent uint64 + Weight uint64 + Filler [3]uint64 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfZbuf = 0x18 + SizeofBpfProgram = 0x10 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x20 + SizeofBpfZbufHeader = 0x20 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfZbuf struct { + Bufa *byte + Bufb *byte + Buflen uint64 +} + +type BpfProgram struct { + Len uint32 + Pad_cgo_0 [4]byte + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [6]byte +} + +type BpfZbufHeader struct { + Kernel_gen uint32 + Kernel_len uint32 + User_gen uint32 + X_bzh_pad [5]uint32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go new file mode 100644 index 000000000..5472b5428 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go @@ -0,0 +1,497 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -fsigned-char types_freebsd.go + +// +build arm,freebsd + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int32 + Pad_cgo_0 [4]byte +} + +type Timeval struct { + Sec int64 + Usec int32 + Pad_cgo_0 [4]byte +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur int64 + Max int64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Dev uint32 + Ino uint32 + Mode uint16 + Nlink uint16 + Uid uint32 + Gid uint32 + Rdev uint32 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Lspare int32 + Birthtimespec Timespec +} + +type Statfs_t struct { + Version uint32 + Type uint32 + Flags uint64 + Bsize uint64 + Iosize uint64 + Blocks uint64 + Bfree uint64 + Bavail int64 + Files uint64 + Ffree int64 + Syncwrites uint64 + Asyncwrites uint64 + Syncreads uint64 + Asyncreads uint64 + Spare [10]uint64 + Namemax uint32 + Owner uint32 + Fsid Fsid + Charspare [80]int8 + Fstypename [16]int8 + Mntfromname [88]int8 + Mntonname [88]int8 +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 + Sysid int32 + Pad_cgo_0 [4]byte +} + +type Dirent struct { + Fileno uint32 + Reclen uint16 + Type uint8 + Namlen uint8 + Name [256]int8 +} + +type Fsid struct { + Val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [46]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x36 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter int16 + Flags uint16 + Fflags uint32 + Data int32 + Udata *byte +} + +type FdSet struct { + X__fds_bits [32]uint32 +} + +const ( + sizeofIfMsghdr = 0x70 + SizeofIfMsghdr = 0x70 + sizeofIfData = 0x60 + SizeofIfData = 0x60 + SizeofIfaMsghdr = 0x14 + SizeofIfmaMsghdr = 0x10 + SizeofIfAnnounceMsghdr = 0x18 + SizeofRtMsghdr = 0x5c + SizeofRtMetrics = 0x38 +) + +type ifMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data ifData +} + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type ifData struct { + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Vhid uint8 + Baudrate_pf uint8 + Datalen uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Hwassist uint64 + Epoch int64 + Lastchange Timeval +} + +type IfData struct { + Type uint8 + Physical uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Spare_char1 uint8 + Spare_char2 uint8 + Datalen uint8 + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Hwassist uint32 + Pad_cgo_0 [4]byte + Epoch int64 + Lastchange Timeval +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type IfmaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Name [16]int8 + What uint16 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Fmask int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint32 + Mtu uint32 + Hopcount uint32 + Expire uint32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pksent uint32 + Weight uint32 + Filler [3]uint32 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfZbuf = 0xc + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x20 + SizeofBpfZbufHeader = 0x20 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfZbuf struct { + Bufa *byte + Bufb *byte + Buflen uint32 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp Timeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [6]byte +} + +type BpfZbufHeader struct { + Kernel_gen uint32 + Kernel_len uint32 + User_gen uint32 + X_bzh_pad [5]uint32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go new file mode 100644 index 000000000..f3ddf5345 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go @@ -0,0 +1,627 @@ +// +build 386,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int32 + Nsec int32 +} + +type Timeval struct { + Sec int32 + Usec int32 +} + +type Timex struct { + Modes uint32 + Offset int32 + Freq int32 + Maxerror int32 + Esterror int32 + Status int32 + Constant int32 + Precision int32 + Tolerance int32 + Time Timeval + Tick int32 + Ppsfreq int32 + Jitter int32 + Shift int32 + Stabil int32 + Jitcnt int32 + Calcnt int32 + Errcnt int32 + Stbcnt int32 + Tai int32 + Pad_cgo_0 [44]byte +} + +type Time_t int32 + +type Tms struct { + Utime int32 + Stime int32 + Cutime int32 + Cstime int32 +} + +type Utimbuf struct { + Actime int32 + Modtime int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + X__pad1 uint16 + Pad_cgo_0 [2]byte + X__st_ino uint32 + Mode uint32 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev uint64 + X__pad2 uint16 + Pad_cgo_1 [2]byte + Size int64 + Blksize int32 + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + Ino uint64 +} + +type Statfs_t struct { + Type int32 + Bsize int32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Namelen int32 + Frsize int32 + Flags int32 + Spare [4]int32 +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]int8 + Pad_cgo_0 [1]byte +} + +type Fsid struct { + X__val [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + Start int64 + Len int64 + Pid int32 +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 +) + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddrHCI struct { + Family uint16 + Dev uint16 + Channel uint16 +} + +type RawSockaddr struct { + Family uint16 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen uint32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 + X__cmsg_data [0]uint8 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Pad_cgo_0 [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofSockaddrHCI = 0x6 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x1d + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + X__ifi_pad uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x8 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + Pad_cgo_0 [2]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 + Name [0]int8 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + Ebx int32 + Ecx int32 + Edx int32 + Esi int32 + Edi int32 + Ebp int32 + Eax int32 + Xds int32 + Xes int32 + Xfs int32 + Xgs int32 + Orig_eax int32 + Eip int32 + Xcs int32 + Eflags int32 + Esp int32 + Xss int32 +} + +type FdSet struct { + Bits [32]int32 +} + +type Sysinfo_t struct { + Uptime int32 + Loads [3]uint32 + Totalram uint32 + Freeram uint32 + Sharedram uint32 + Bufferram uint32 + Totalswap uint32 + Freeswap uint32 + Procs uint16 + Pad uint16 + Totalhigh uint32 + Freehigh uint32 + Unit uint32 + X_f [8]int8 +} + +type Utsname struct { + Sysname [65]int8 + Nodename [65]int8 + Release [65]int8 + Version [65]int8 + Machine [65]int8 + Domainname [65]int8 +} + +type Ustat_t struct { + Tfree int32 + Tinode uint32 + Fname [6]int8 + Fpack [6]int8 +} + +type EpollEvent struct { + Events uint32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x200 + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x100 +) + +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [19]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go new file mode 100644 index 000000000..a923bef35 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go @@ -0,0 +1,645 @@ +// +build amd64,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Timex struct { + Modes uint32 + Pad_cgo_0 [4]byte + Offset int64 + Freq int64 + Maxerror int64 + Esterror int64 + Status int32 + Pad_cgo_1 [4]byte + Constant int64 + Precision int64 + Tolerance int64 + Time Timeval + Tick int64 + Ppsfreq int64 + Jitter int64 + Shift int32 + Pad_cgo_2 [4]byte + Stabil int64 + Jitcnt int64 + Calcnt int64 + Errcnt int64 + Stbcnt int64 + Tai int32 + Pad_cgo_3 [44]byte +} + +type Time_t int64 + +type Tms struct { + Utime int64 + Stime int64 + Cutime int64 + Cstime int64 +} + +type Utimbuf struct { + Actime int64 + Modtime int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Ino uint64 + Nlink uint64 + Mode uint32 + Uid uint32 + Gid uint32 + X__pad0 int32 + Rdev uint64 + Size int64 + Blksize int64 + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + X__unused [3]int64 +} + +type Statfs_t struct { + Type int64 + Bsize int64 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Namelen int64 + Frsize int64 + Flags int64 + Spare [4]int64 +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]int8 + Pad_cgo_0 [5]byte +} + +type Fsid struct { + X__val [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + Pad_cgo_0 [4]byte + Start int64 + Len int64 + Pid int32 + Pad_cgo_1 [4]byte +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 +) + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddrHCI struct { + Family uint16 + Dev uint16 + Channel uint16 +} + +type RawSockaddr struct { + Family uint16 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type Cmsghdr struct { + Len uint64 + Level int32 + Type int32 + X__cmsg_data [0]uint8 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Pad_cgo_0 [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofSockaddrHCI = 0x6 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x1d + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + X__ifi_pad uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x10 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 + Name [0]int8 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + R15 uint64 + R14 uint64 + R13 uint64 + R12 uint64 + Rbp uint64 + Rbx uint64 + R11 uint64 + R10 uint64 + R9 uint64 + R8 uint64 + Rax uint64 + Rcx uint64 + Rdx uint64 + Rsi uint64 + Rdi uint64 + Orig_rax uint64 + Rip uint64 + Cs uint64 + Eflags uint64 + Rsp uint64 + Ss uint64 + Fs_base uint64 + Gs_base uint64 + Ds uint64 + Es uint64 + Fs uint64 + Gs uint64 +} + +type FdSet struct { + Bits [16]int64 +} + +type Sysinfo_t struct { + Uptime int64 + Loads [3]uint64 + Totalram uint64 + Freeram uint64 + Sharedram uint64 + Bufferram uint64 + Totalswap uint64 + Freeswap uint64 + Procs uint16 + Pad uint16 + Pad_cgo_0 [4]byte + Totalhigh uint64 + Freehigh uint64 + Unit uint32 + X_f [0]int8 + Pad_cgo_1 [4]byte +} + +type Utsname struct { + Sysname [65]int8 + Nodename [65]int8 + Release [65]int8 + Version [65]int8 + Machine [65]int8 + Domainname [65]int8 +} + +type Ustat_t struct { + Tfree int32 + Pad_cgo_0 [4]byte + Tinode uint64 + Fname [6]int8 + Fpack [6]int8 + Pad_cgo_1 [4]byte +} + +type EpollEvent struct { + Events uint32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x200 + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x100 +) + +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [19]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go new file mode 100644 index 000000000..817ac9c29 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go @@ -0,0 +1,607 @@ +// +build arm,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int32 + Nsec int32 +} + +type Timeval struct { + Sec int32 + Usec int32 +} + +type Timex struct { + Modes uint32 + Offset int32 + Freq int32 + Maxerror int32 + Esterror int32 + Status int32 + Constant int32 + Precision int32 + Tolerance int32 + Time Timeval + Tick int32 + Ppsfreq int32 + Jitter int32 + Shift int32 + Stabil int32 + Jitcnt int32 + Calcnt int32 + Errcnt int32 + Stbcnt int32 + Tai int32 + Pad_cgo_0 [44]byte +} + +type Time_t int32 + +type Tms struct { + Utime int32 + Stime int32 + Cutime int32 + Cstime int32 +} + +type Utimbuf struct { + Actime int32 + Modtime int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + X__pad1 uint16 + Pad_cgo_0 [2]byte + X__st_ino uint32 + Mode uint32 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev uint64 + X__pad2 uint16 + Pad_cgo_1 [6]byte + Size int64 + Blksize int32 + Pad_cgo_2 [4]byte + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + Ino uint64 +} + +type Statfs_t struct { + Type int32 + Bsize int32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Namelen int32 + Frsize int32 + Flags int32 + Spare [4]int32 + Pad_cgo_0 [4]byte +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]uint8 + Pad_cgo_0 [5]byte +} + +type Fsid struct { + X__val [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + Pad_cgo_0 [4]byte + Start int64 + Len int64 + Pid int32 + Pad_cgo_1 [4]byte +} + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddrHCI struct { + Family uint16 + Dev uint16 + Channel uint16 +} + +type RawSockaddr struct { + Family uint16 + Data [14]uint8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]uint8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen uint32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 + X__cmsg_data [0]uint8 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Pad_cgo_0 [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofSockaddrHCI = 0x6 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x1d + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + X__ifi_pad uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x8 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + Pad_cgo_0 [2]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 + Name [0]uint8 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + Uregs [18]uint32 +} + +type FdSet struct { + Bits [32]int32 +} + +type Sysinfo_t struct { + Uptime int32 + Loads [3]uint32 + Totalram uint32 + Freeram uint32 + Sharedram uint32 + Bufferram uint32 + Totalswap uint32 + Freeswap uint32 + Procs uint16 + Pad uint16 + Totalhigh uint32 + Freehigh uint32 + Unit uint32 + X_f [8]uint8 +} + +type Utsname struct { + Sysname [65]uint8 + Nodename [65]uint8 + Release [65]uint8 + Version [65]uint8 + Machine [65]uint8 + Domainname [65]uint8 +} + +type Ustat_t struct { + Tfree int32 + Tinode uint32 + Fname [6]uint8 + Fpack [6]uint8 +} + +type EpollEvent struct { + Events uint32 + PadFd int32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x200 + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x100 +) + +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [19]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go new file mode 100644 index 000000000..e786addf7 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go @@ -0,0 +1,624 @@ +// +build arm64,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -fsigned-char types_linux.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Timex struct { + Modes uint32 + Pad_cgo_0 [4]byte + Offset int64 + Freq int64 + Maxerror int64 + Esterror int64 + Status int32 + Pad_cgo_1 [4]byte + Constant int64 + Precision int64 + Tolerance int64 + Time Timeval + Tick int64 + Ppsfreq int64 + Jitter int64 + Shift int32 + Pad_cgo_2 [4]byte + Stabil int64 + Jitcnt int64 + Calcnt int64 + Errcnt int64 + Stbcnt int64 + Tai int32 + Pad_cgo_3 [44]byte +} + +type Time_t int64 + +type Tms struct { + Utime int64 + Stime int64 + Cutime int64 + Cstime int64 +} + +type Utimbuf struct { + Actime int64 + Modtime int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Ino uint64 + Mode uint32 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev uint64 + X__pad1 uint64 + Size int64 + Blksize int32 + X__pad2 int32 + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + X__glibc_reserved [2]int32 +} + +type Statfs_t struct { + Type int64 + Bsize int64 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Namelen int64 + Frsize int64 + Flags int64 + Spare [4]int64 +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]int8 + Pad_cgo_0 [5]byte +} + +type Fsid struct { + X__val [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + Pad_cgo_0 [4]byte + Start int64 + Len int64 + Pid int32 + Pad_cgo_1 [4]byte +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 +) + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddrHCI struct { + Family uint16 + Dev uint16 + Channel uint16 +} + +type RawSockaddr struct { + Family uint16 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type Cmsghdr struct { + Len uint64 + Level int32 + Type int32 + X__cmsg_data [0]uint8 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Pad_cgo_0 [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofSockaddrHCI = 0x6 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x22 + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + X__ifi_pad uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x10 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 + Name [0]int8 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + Regs [31]uint64 + Sp uint64 + Pc uint64 + Pstate uint64 +} + +type FdSet struct { + Bits [16]int64 +} + +type Sysinfo_t struct { + Uptime int64 + Loads [3]uint64 + Totalram uint64 + Freeram uint64 + Sharedram uint64 + Bufferram uint64 + Totalswap uint64 + Freeswap uint64 + Procs uint16 + Pad uint16 + Pad_cgo_0 [4]byte + Totalhigh uint64 + Freehigh uint64 + Unit uint32 + X_f [0]int8 + Pad_cgo_1 [4]byte +} + +type Utsname struct { + Sysname [65]int8 + Nodename [65]int8 + Release [65]int8 + Version [65]int8 + Machine [65]int8 + Domainname [65]int8 +} + +type Ustat_t struct { + Tfree int32 + Pad_cgo_0 [4]byte + Tinode uint64 + Fname [6]int8 + Fpack [6]int8 + Pad_cgo_1 [4]byte +} + +type EpollEvent struct { + Events uint32 + PadFd int32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x200 + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x100 +) + +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [19]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go new file mode 100644 index 000000000..b29894deb --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go @@ -0,0 +1,627 @@ +// +build mips64,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Timex struct { + Modes uint32 + Pad_cgo_0 [4]byte + Offset int64 + Freq int64 + Maxerror int64 + Esterror int64 + Status int32 + Pad_cgo_1 [4]byte + Constant int64 + Precision int64 + Tolerance int64 + Time Timeval + Tick int64 + Ppsfreq int64 + Jitter int64 + Shift int32 + Pad_cgo_2 [4]byte + Stabil int64 + Jitcnt int64 + Calcnt int64 + Errcnt int64 + Stbcnt int64 + Tai int32 + Pad_cgo_3 [44]byte +} + +type Time_t int64 + +type Tms struct { + Utime int64 + Stime int64 + Cutime int64 + Cstime int64 +} + +type Utimbuf struct { + Actime int64 + Modtime int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint32 + Pad1 [3]int32 + Ino uint64 + Mode uint32 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev uint32 + Pad2 [3]uint32 + Size int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + Blksize uint32 + Pad4 uint32 + Blocks int64 +} + +type Statfs_t struct { + Type int64 + Bsize int64 + Frsize int64 + Blocks uint64 + Bfree uint64 + Files uint64 + Ffree uint64 + Bavail uint64 + Fsid Fsid + Namelen int64 + Flags int64 + Spare [5]int64 +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]int8 + Pad_cgo_0 [5]byte +} + +type Fsid struct { + X__val [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + Pad_cgo_0 [4]byte + Start int64 + Len int64 + Pid int32 + Pad_cgo_1 [4]byte +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 +) + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddrHCI struct { + Family uint16 + Dev uint16 + Channel uint16 +} + +type RawSockaddr struct { + Family uint16 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type Cmsghdr struct { + Len uint64 + Level int32 + Type int32 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Pad_cgo_0 [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofSockaddrHCI = 0x6 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x27 + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + X__ifi_pad uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x10 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + Regs [102]uint64 + U_tsize uint64 + U_dsize uint64 + U_ssize uint64 + Start_code uint64 + Start_data uint64 + Start_stack uint64 + Signal int64 + U_ar0 uint64 + Magic uint64 + U_comm [32]int8 +} + +type FdSet struct { + Bits [16]int64 +} + +type Sysinfo_t struct { + Uptime int64 + Loads [3]uint64 + Totalram uint64 + Freeram uint64 + Sharedram uint64 + Bufferram uint64 + Totalswap uint64 + Freeswap uint64 + Procs uint16 + Pad uint16 + Pad_cgo_0 [4]byte + Totalhigh uint64 + Freehigh uint64 + Unit uint32 + X_f [0]int8 + Pad_cgo_1 [4]byte +} + +type Utsname struct { + Sysname [65]int8 + Nodename [65]int8 + Release [65]int8 + Version [65]int8 + Machine [65]int8 + Domainname [65]int8 +} + +type Ustat_t struct { + Tfree int32 + Pad_cgo_0 [4]byte + Tinode uint64 + Fname [6]int8 + Fpack [6]int8 + Pad_cgo_1 [4]byte +} + +type EpollEvent struct { + Events uint32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x200 + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x100 +) + +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [32]uint8 + Pad_cgo_0 [3]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go new file mode 100644 index 000000000..d9af71b69 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go @@ -0,0 +1,627 @@ +// +build mips64le,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Timex struct { + Modes uint32 + Pad_cgo_0 [4]byte + Offset int64 + Freq int64 + Maxerror int64 + Esterror int64 + Status int32 + Pad_cgo_1 [4]byte + Constant int64 + Precision int64 + Tolerance int64 + Time Timeval + Tick int64 + Ppsfreq int64 + Jitter int64 + Shift int32 + Pad_cgo_2 [4]byte + Stabil int64 + Jitcnt int64 + Calcnt int64 + Errcnt int64 + Stbcnt int64 + Tai int32 + Pad_cgo_3 [44]byte +} + +type Time_t int64 + +type Tms struct { + Utime int64 + Stime int64 + Cutime int64 + Cstime int64 +} + +type Utimbuf struct { + Actime int64 + Modtime int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint32 + Pad1 [3]int32 + Ino uint64 + Mode uint32 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev uint32 + Pad2 [3]uint32 + Size int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + Blksize uint32 + Pad4 uint32 + Blocks int64 +} + +type Statfs_t struct { + Type int64 + Bsize int64 + Frsize int64 + Blocks uint64 + Bfree uint64 + Files uint64 + Ffree uint64 + Bavail uint64 + Fsid Fsid + Namelen int64 + Flags int64 + Spare [5]int64 +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]int8 + Pad_cgo_0 [5]byte +} + +type Fsid struct { + X__val [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + Pad_cgo_0 [4]byte + Start int64 + Len int64 + Pid int32 + Pad_cgo_1 [4]byte +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 +) + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddrHCI struct { + Family uint16 + Dev uint16 + Channel uint16 +} + +type RawSockaddr struct { + Family uint16 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type Cmsghdr struct { + Len uint64 + Level int32 + Type int32 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Pad_cgo_0 [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofSockaddrHCI = 0x6 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x27 + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + X__ifi_pad uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x10 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + Regs [102]uint64 + U_tsize uint64 + U_dsize uint64 + U_ssize uint64 + Start_code uint64 + Start_data uint64 + Start_stack uint64 + Signal int64 + U_ar0 uint64 + Magic uint64 + U_comm [32]int8 +} + +type FdSet struct { + Bits [16]int64 +} + +type Sysinfo_t struct { + Uptime int64 + Loads [3]uint64 + Totalram uint64 + Freeram uint64 + Sharedram uint64 + Bufferram uint64 + Totalswap uint64 + Freeswap uint64 + Procs uint16 + Pad uint16 + Pad_cgo_0 [4]byte + Totalhigh uint64 + Freehigh uint64 + Unit uint32 + X_f [0]int8 + Pad_cgo_1 [4]byte +} + +type Utsname struct { + Sysname [65]int8 + Nodename [65]int8 + Release [65]int8 + Version [65]int8 + Machine [65]int8 + Domainname [65]int8 +} + +type Ustat_t struct { + Tfree int32 + Pad_cgo_0 [4]byte + Tinode uint64 + Fname [6]int8 + Fpack [6]int8 + Pad_cgo_1 [4]byte +} + +type EpollEvent struct { + Events uint32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x200 + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x100 +) + +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [32]uint8 + Pad_cgo_0 [3]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go new file mode 100644 index 000000000..4218170a9 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go @@ -0,0 +1,634 @@ +// +build ppc64,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Timex struct { + Modes uint32 + Pad_cgo_0 [4]byte + Offset int64 + Freq int64 + Maxerror int64 + Esterror int64 + Status int32 + Pad_cgo_1 [4]byte + Constant int64 + Precision int64 + Tolerance int64 + Time Timeval + Tick int64 + Ppsfreq int64 + Jitter int64 + Shift int32 + Pad_cgo_2 [4]byte + Stabil int64 + Jitcnt int64 + Calcnt int64 + Errcnt int64 + Stbcnt int64 + Tai int32 + Pad_cgo_3 [44]byte +} + +type Time_t int64 + +type Tms struct { + Utime int64 + Stime int64 + Cutime int64 + Cstime int64 +} + +type Utimbuf struct { + Actime int64 + Modtime int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Ino uint64 + Nlink uint64 + Mode uint32 + Uid uint32 + Gid uint32 + X__pad2 int32 + Rdev uint64 + Size int64 + Blksize int64 + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + X__glibc_reserved4 uint64 + X__glibc_reserved5 uint64 + X__glibc_reserved6 uint64 +} + +type Statfs_t struct { + Type int64 + Bsize int64 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Namelen int64 + Frsize int64 + Flags int64 + Spare [4]int64 +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]uint8 + Pad_cgo_0 [5]byte +} + +type Fsid struct { + X__val [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + Pad_cgo_0 [4]byte + Start int64 + Len int64 + Pid int32 + Pad_cgo_1 [4]byte +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 +) + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddrHCI struct { + Family uint16 + Dev uint16 + Channel uint16 +} + +type RawSockaddr struct { + Family uint16 + Data [14]uint8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]uint8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type Cmsghdr struct { + Len uint64 + Level int32 + Type int32 + X__cmsg_data [0]uint8 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Pad_cgo_0 [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofSockaddrHCI = 0x6 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x23 + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + X__ifi_pad uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x10 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 + Name [0]uint8 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + Gpr [32]uint64 + Nip uint64 + Msr uint64 + Orig_gpr3 uint64 + Ctr uint64 + Link uint64 + Xer uint64 + Ccr uint64 + Softe uint64 + Trap uint64 + Dar uint64 + Dsisr uint64 + Result uint64 +} + +type FdSet struct { + Bits [16]int64 +} + +type Sysinfo_t struct { + Uptime int64 + Loads [3]uint64 + Totalram uint64 + Freeram uint64 + Sharedram uint64 + Bufferram uint64 + Totalswap uint64 + Freeswap uint64 + Procs uint16 + Pad uint16 + Pad_cgo_0 [4]byte + Totalhigh uint64 + Freehigh uint64 + Unit uint32 + X_f [0]uint8 + Pad_cgo_1 [4]byte +} + +type Utsname struct { + Sysname [65]uint8 + Nodename [65]uint8 + Release [65]uint8 + Version [65]uint8 + Machine [65]uint8 + Domainname [65]uint8 +} + +type Ustat_t struct { + Tfree int32 + Pad_cgo_0 [4]byte + Tinode uint64 + Fname [6]uint8 + Fpack [6]uint8 + Pad_cgo_1 [4]byte +} + +type EpollEvent struct { + Events uint32 + X_padFd int32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x200 + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x100 +) + +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [19]uint8 + Line uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go new file mode 100644 index 000000000..7db4c78c6 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go @@ -0,0 +1,634 @@ +// +build ppc64le,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_linux.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Timex struct { + Modes uint32 + Pad_cgo_0 [4]byte + Offset int64 + Freq int64 + Maxerror int64 + Esterror int64 + Status int32 + Pad_cgo_1 [4]byte + Constant int64 + Precision int64 + Tolerance int64 + Time Timeval + Tick int64 + Ppsfreq int64 + Jitter int64 + Shift int32 + Pad_cgo_2 [4]byte + Stabil int64 + Jitcnt int64 + Calcnt int64 + Errcnt int64 + Stbcnt int64 + Tai int32 + Pad_cgo_3 [44]byte +} + +type Time_t int64 + +type Tms struct { + Utime int64 + Stime int64 + Cutime int64 + Cstime int64 +} + +type Utimbuf struct { + Actime int64 + Modtime int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Ino uint64 + Nlink uint64 + Mode uint32 + Uid uint32 + Gid uint32 + X__pad2 int32 + Rdev uint64 + Size int64 + Blksize int64 + Blocks int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + X__glibc_reserved4 uint64 + X__glibc_reserved5 uint64 + X__glibc_reserved6 uint64 +} + +type Statfs_t struct { + Type int64 + Bsize int64 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Namelen int64 + Frsize int64 + Flags int64 + Spare [4]int64 +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]uint8 + Pad_cgo_0 [5]byte +} + +type Fsid struct { + X__val [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + Pad_cgo_0 [4]byte + Start int64 + Len int64 + Pid int32 + Pad_cgo_1 [4]byte +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x4 + FADV_NOREUSE = 0x5 +) + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddrHCI struct { + Family uint16 + Dev uint16 + Channel uint16 +} + +type RawSockaddr struct { + Family uint16 + Data [14]uint8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]uint8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + Pad_cgo_1 [4]byte +} + +type Cmsghdr struct { + Len uint64 + Level int32 + Type int32 + X__cmsg_data [0]uint8 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + Pad_cgo_0 [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofSockaddrHCI = 0x6 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x22 + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + X__ifi_pad uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x10 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + Pad_cgo_0 [6]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 + Name [0]uint8 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + Gpr [32]uint64 + Nip uint64 + Msr uint64 + Orig_gpr3 uint64 + Ctr uint64 + Link uint64 + Xer uint64 + Ccr uint64 + Softe uint64 + Trap uint64 + Dar uint64 + Dsisr uint64 + Result uint64 +} + +type FdSet struct { + Bits [16]int64 +} + +type Sysinfo_t struct { + Uptime int64 + Loads [3]uint64 + Totalram uint64 + Freeram uint64 + Sharedram uint64 + Bufferram uint64 + Totalswap uint64 + Freeswap uint64 + Procs uint16 + Pad uint16 + Pad_cgo_0 [4]byte + Totalhigh uint64 + Freehigh uint64 + Unit uint32 + X_f [0]uint8 + Pad_cgo_1 [4]byte +} + +type Utsname struct { + Sysname [65]uint8 + Nodename [65]uint8 + Release [65]uint8 + Version [65]uint8 + Machine [65]uint8 + Domainname [65]uint8 +} + +type Ustat_t struct { + Tfree int32 + Pad_cgo_0 [4]byte + Tinode uint64 + Fname [6]uint8 + Fpack [6]uint8 + Pad_cgo_1 [4]byte +} + +type EpollEvent struct { + Events uint32 + X_padFd int32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x200 + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x100 +) + +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [19]uint8 + Line uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go new file mode 100644 index 000000000..76ee57cbf --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go @@ -0,0 +1,649 @@ +// +build s390x,linux +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs -- -fsigned-char types_linux.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 + PathMax = 0x1000 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Timex struct { + Modes uint32 + _ [4]byte + Offset int64 + Freq int64 + Maxerror int64 + Esterror int64 + Status int32 + _ [4]byte + Constant int64 + Precision int64 + Tolerance int64 + Time Timeval + Tick int64 + Ppsfreq int64 + Jitter int64 + Shift int32 + _ [4]byte + Stabil int64 + Jitcnt int64 + Calcnt int64 + Errcnt int64 + Stbcnt int64 + Tai int32 + _ [44]byte +} + +type Time_t int64 + +type Tms struct { + Utime int64 + Stime int64 + Cutime int64 + Cstime int64 +} + +type Utimbuf struct { + Actime int64 + Modtime int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Ino uint64 + Nlink uint64 + Mode uint32 + Uid uint32 + Gid uint32 + _ int32 + Rdev uint64 + Size int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + Blksize int64 + Blocks int64 + _ [3]int64 +} + +type Statfs_t struct { + Type uint32 + Bsize uint32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Files uint64 + Ffree uint64 + Fsid Fsid + Namelen uint32 + Frsize uint32 + Flags uint32 + Spare [4]uint32 + _ [4]byte +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Type uint8 + Name [256]int8 + _ [5]byte +} + +type Fsid struct { + _ [2]int32 +} + +type Flock_t struct { + Type int16 + Whence int16 + _ [4]byte + Start int64 + Len int64 + Pid int32 + _ [4]byte +} + +const ( + FADV_NORMAL = 0x0 + FADV_RANDOM = 0x1 + FADV_SEQUENTIAL = 0x2 + FADV_WILLNEED = 0x3 + FADV_DONTNEED = 0x6 + FADV_NOREUSE = 0x7 +) + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrLinklayer struct { + Family uint16 + Protocol uint16 + Ifindex int32 + Hatype uint16 + Pkttype uint8 + Halen uint8 + Addr [8]uint8 +} + +type RawSockaddrNetlink struct { + Family uint16 + Pad uint16 + Pid uint32 + Groups uint32 +} + +type RawSockaddrHCI struct { + Family uint16 + Dev uint16 + Channel uint16 +} + +type RawSockaddr struct { + Family uint16 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPMreqn struct { + Multiaddr [4]byte /* in_addr */ + Address [4]byte /* in_addr */ + Ifindex int32 +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + _ [4]byte + Iov *Iovec + Iovlen uint64 + Control *byte + Controllen uint64 + Flags int32 + _ [4]byte +} + +type Cmsghdr struct { + Len uint64 + Level int32 + Type int32 +} + +type Inet4Pktinfo struct { + Ifindex int32 + Spec_dst [4]byte /* in_addr */ + Addr [4]byte /* in_addr */ +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Data [8]uint32 +} + +type Ucred struct { + Pid int32 + Uid uint32 + Gid uint32 +} + +type TCPInfo struct { + State uint8 + Ca_state uint8 + Retransmits uint8 + Probes uint8 + Backoff uint8 + Options uint8 + _ [2]byte + Rto uint32 + Ato uint32 + Snd_mss uint32 + Rcv_mss uint32 + Unacked uint32 + Sacked uint32 + Lost uint32 + Retrans uint32 + Fackets uint32 + Last_data_sent uint32 + Last_ack_sent uint32 + Last_data_recv uint32 + Last_ack_recv uint32 + Pmtu uint32 + Rcv_ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Snd_ssthresh uint32 + Snd_cwnd uint32 + Advmss uint32 + Reordering uint32 + Rcv_rtt uint32 + Rcv_space uint32 + Total_retrans uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x70 + SizeofSockaddrUnix = 0x6e + SizeofSockaddrLinklayer = 0x14 + SizeofSockaddrNetlink = 0xc + SizeofSockaddrHCI = 0x6 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPMreqn = 0xc + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x38 + SizeofCmsghdr = 0x10 + SizeofInet4Pktinfo = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 + SizeofUcred = 0xc + SizeofTCPInfo = 0x68 +) + +const ( + IFA_UNSPEC = 0x0 + IFA_ADDRESS = 0x1 + IFA_LOCAL = 0x2 + IFA_LABEL = 0x3 + IFA_BROADCAST = 0x4 + IFA_ANYCAST = 0x5 + IFA_CACHEINFO = 0x6 + IFA_MULTICAST = 0x7 + IFLA_UNSPEC = 0x0 + IFLA_ADDRESS = 0x1 + IFLA_BROADCAST = 0x2 + IFLA_IFNAME = 0x3 + IFLA_MTU = 0x4 + IFLA_LINK = 0x5 + IFLA_QDISC = 0x6 + IFLA_STATS = 0x7 + IFLA_COST = 0x8 + IFLA_PRIORITY = 0x9 + IFLA_MASTER = 0xa + IFLA_WIRELESS = 0xb + IFLA_PROTINFO = 0xc + IFLA_TXQLEN = 0xd + IFLA_MAP = 0xe + IFLA_WEIGHT = 0xf + IFLA_OPERSTATE = 0x10 + IFLA_LINKMODE = 0x11 + IFLA_LINKINFO = 0x12 + IFLA_NET_NS_PID = 0x13 + IFLA_IFALIAS = 0x14 + IFLA_MAX = 0x27 + RT_SCOPE_UNIVERSE = 0x0 + RT_SCOPE_SITE = 0xc8 + RT_SCOPE_LINK = 0xfd + RT_SCOPE_HOST = 0xfe + RT_SCOPE_NOWHERE = 0xff + RT_TABLE_UNSPEC = 0x0 + RT_TABLE_COMPAT = 0xfc + RT_TABLE_DEFAULT = 0xfd + RT_TABLE_MAIN = 0xfe + RT_TABLE_LOCAL = 0xff + RT_TABLE_MAX = 0xffffffff + RTA_UNSPEC = 0x0 + RTA_DST = 0x1 + RTA_SRC = 0x2 + RTA_IIF = 0x3 + RTA_OIF = 0x4 + RTA_GATEWAY = 0x5 + RTA_PRIORITY = 0x6 + RTA_PREFSRC = 0x7 + RTA_METRICS = 0x8 + RTA_MULTIPATH = 0x9 + RTA_FLOW = 0xb + RTA_CACHEINFO = 0xc + RTA_TABLE = 0xf + RTN_UNSPEC = 0x0 + RTN_UNICAST = 0x1 + RTN_LOCAL = 0x2 + RTN_BROADCAST = 0x3 + RTN_ANYCAST = 0x4 + RTN_MULTICAST = 0x5 + RTN_BLACKHOLE = 0x6 + RTN_UNREACHABLE = 0x7 + RTN_PROHIBIT = 0x8 + RTN_THROW = 0x9 + RTN_NAT = 0xa + RTN_XRESOLVE = 0xb + RTNLGRP_NONE = 0x0 + RTNLGRP_LINK = 0x1 + RTNLGRP_NOTIFY = 0x2 + RTNLGRP_NEIGH = 0x3 + RTNLGRP_TC = 0x4 + RTNLGRP_IPV4_IFADDR = 0x5 + RTNLGRP_IPV4_MROUTE = 0x6 + RTNLGRP_IPV4_ROUTE = 0x7 + RTNLGRP_IPV4_RULE = 0x8 + RTNLGRP_IPV6_IFADDR = 0x9 + RTNLGRP_IPV6_MROUTE = 0xa + RTNLGRP_IPV6_ROUTE = 0xb + RTNLGRP_IPV6_IFINFO = 0xc + RTNLGRP_IPV6_PREFIX = 0x12 + RTNLGRP_IPV6_RULE = 0x13 + RTNLGRP_ND_USEROPT = 0x14 + SizeofNlMsghdr = 0x10 + SizeofNlMsgerr = 0x14 + SizeofRtGenmsg = 0x1 + SizeofNlAttr = 0x4 + SizeofRtAttr = 0x4 + SizeofIfInfomsg = 0x10 + SizeofIfAddrmsg = 0x8 + SizeofRtMsg = 0xc + SizeofRtNexthop = 0x8 +) + +type NlMsghdr struct { + Len uint32 + Type uint16 + Flags uint16 + Seq uint32 + Pid uint32 +} + +type NlMsgerr struct { + Error int32 + Msg NlMsghdr +} + +type RtGenmsg struct { + Family uint8 +} + +type NlAttr struct { + Len uint16 + Type uint16 +} + +type RtAttr struct { + Len uint16 + Type uint16 +} + +type IfInfomsg struct { + Family uint8 + _ uint8 + Type uint16 + Index int32 + Flags uint32 + Change uint32 +} + +type IfAddrmsg struct { + Family uint8 + Prefixlen uint8 + Flags uint8 + Scope uint8 + Index uint32 +} + +type RtMsg struct { + Family uint8 + Dst_len uint8 + Src_len uint8 + Tos uint8 + Table uint8 + Protocol uint8 + Scope uint8 + Type uint8 + Flags uint32 +} + +type RtNexthop struct { + Len uint16 + Flags uint8 + Hops uint8 + Ifindex int32 +} + +const ( + SizeofSockFilter = 0x8 + SizeofSockFprog = 0x10 +) + +type SockFilter struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type SockFprog struct { + Len uint16 + _ [6]byte + Filter *SockFilter +} + +type InotifyEvent struct { + Wd int32 + Mask uint32 + Cookie uint32 + Len uint32 +} + +const SizeofInotifyEvent = 0x10 + +type PtraceRegs struct { + Psw PtracePsw + Gprs [16]uint64 + Acrs [16]uint32 + Orig_gpr2 uint64 + Fp_regs PtraceFpregs + Per_info PtracePer + Ieee_instruction_pointer uint64 +} + +type PtracePsw struct { + Mask uint64 + Addr uint64 +} + +type PtraceFpregs struct { + Fpc uint32 + _ [4]byte + Fprs [16]float64 +} + +type PtracePer struct { + _ [0]uint64 + _ [24]byte + _ [8]byte + Starting_addr uint64 + Ending_addr uint64 + Perc_atmid uint16 + _ [6]byte + Address uint64 + Access_id uint8 + _ [7]byte +} + +type FdSet struct { + Bits [16]int64 +} + +type Sysinfo_t struct { + Uptime int64 + Loads [3]uint64 + Totalram uint64 + Freeram uint64 + Sharedram uint64 + Bufferram uint64 + Totalswap uint64 + Freeswap uint64 + Procs uint16 + Pad uint16 + _ [4]byte + Totalhigh uint64 + Freehigh uint64 + Unit uint32 + _ [0]int8 + _ [4]byte +} + +type Utsname struct { + Sysname [65]int8 + Nodename [65]int8 + Release [65]int8 + Version [65]int8 + Machine [65]int8 + Domainname [65]int8 +} + +type Ustat_t struct { + Tfree int32 + _ [4]byte + Tinode uint64 + Fname [6]int8 + Fpack [6]int8 + _ [4]byte +} + +type EpollEvent struct { + Events uint32 + _ int32 + Fd int32 + Pad int32 +} + +const ( + AT_FDCWD = -0x64 + AT_REMOVEDIR = 0x200 + AT_SYMLINK_FOLLOW = 0x400 + AT_SYMLINK_NOFOLLOW = 0x100 +) + +type PollFd struct { + Fd int32 + Events int16 + Revents int16 +} + +const ( + POLLIN = 0x1 + POLLPRI = 0x2 + POLLOUT = 0x4 + POLLRDHUP = 0x2000 + POLLERR = 0x8 + POLLHUP = 0x10 + POLLNVAL = 0x20 +) + +type Sigset_t struct { + X__val [16]uint64 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Line uint8 + Cc [19]uint8 + Ispeed uint32 + Ospeed uint32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go new file mode 100644 index 000000000..caf755fb8 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go @@ -0,0 +1,396 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_netbsd.go + +// +build 386,netbsd + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int32 +} + +type Timeval struct { + Sec int64 + Usec int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Mode uint32 + Ino uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev uint64 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Birthtimespec Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Spare [2]uint32 +} + +type Statfs_t [0]byte + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Dirent struct { + Fileno uint64 + Reclen uint16 + Namlen uint16 + Type uint8 + Name [512]int8 + Pad_cgo_0 [3]byte +} + +type Fsid struct { + X__fsid_val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x14 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter uint32 + Flags uint32 + Fflags uint32 + Data int64 + Udata int32 +} + +type FdSet struct { + Bits [8]uint32 +} + +const ( + SizeofIfMsghdr = 0x98 + SizeofIfData = 0x84 + SizeofIfaMsghdr = 0x18 + SizeofIfAnnounceMsghdr = 0x18 + SizeofRtMsghdr = 0x78 + SizeofRtMetrics = 0x50 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData + Pad_cgo_1 [4]byte +} + +type IfData struct { + Type uint8 + Addrlen uint8 + Hdrlen uint8 + Pad_cgo_0 [1]byte + Link_state int32 + Mtu uint64 + Metric uint64 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Lastchange Timespec +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Metric int32 + Index uint16 + Pad_cgo_0 [6]byte +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Name [16]int8 + What uint16 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits int32 + Pad_cgo_1 [4]byte + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint64 + Mtu uint64 + Hopcount uint64 + Recvpipe uint64 + Sendpipe uint64 + Ssthresh uint64 + Rtt uint64 + Rttvar uint64 + Expire int64 + Pksent int64 +} + +type Mclpool [0]byte + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x80 + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint64 + Drop uint64 + Capt uint64 + Padding [13]uint64 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type BpfTimeval struct { + Sec int32 + Usec int32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} + +type Sysctlnode struct { + Flags uint32 + Num int32 + Name [32]int8 + Ver uint32 + X__rsvd uint32 + Un [16]byte + X_sysctl_size [8]byte + X_sysctl_func [8]byte + X_sysctl_parent [8]byte + X_sysctl_desc [8]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go new file mode 100644 index 000000000..91b4a5305 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go @@ -0,0 +1,403 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_netbsd.go + +// +build amd64,netbsd + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int32 + Pad_cgo_0 [4]byte +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Mode uint32 + Pad_cgo_0 [4]byte + Ino uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Pad_cgo_1 [4]byte + Rdev uint64 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Birthtimespec Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Spare [2]uint32 + Pad_cgo_2 [4]byte +} + +type Statfs_t [0]byte + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Dirent struct { + Fileno uint64 + Reclen uint16 + Namlen uint16 + Type uint8 + Name [512]int8 + Pad_cgo_0 [3]byte +} + +type Fsid struct { + X__fsid_val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x14 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x30 + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint64 + Filter uint32 + Flags uint32 + Fflags uint32 + Pad_cgo_0 [4]byte + Data int64 + Udata int64 +} + +type FdSet struct { + Bits [8]uint32 +} + +const ( + SizeofIfMsghdr = 0x98 + SizeofIfData = 0x88 + SizeofIfaMsghdr = 0x18 + SizeofIfAnnounceMsghdr = 0x18 + SizeofRtMsghdr = 0x78 + SizeofRtMetrics = 0x50 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Addrlen uint8 + Hdrlen uint8 + Pad_cgo_0 [1]byte + Link_state int32 + Mtu uint64 + Metric uint64 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Lastchange Timespec +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Metric int32 + Index uint16 + Pad_cgo_0 [6]byte +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Name [16]int8 + What uint16 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits int32 + Pad_cgo_1 [4]byte + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint64 + Mtu uint64 + Hopcount uint64 + Recvpipe uint64 + Sendpipe uint64 + Ssthresh uint64 + Rtt uint64 + Rttvar uint64 + Expire int64 + Pksent int64 +} + +type Mclpool [0]byte + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x80 + SizeofBpfProgram = 0x10 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x20 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint64 + Drop uint64 + Capt uint64 + Padding [13]uint64 +} + +type BpfProgram struct { + Len uint32 + Pad_cgo_0 [4]byte + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [6]byte +} + +type BpfTimeval struct { + Sec int64 + Usec int64 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} + +type Sysctlnode struct { + Flags uint32 + Num int32 + Name [32]int8 + Ver uint32 + X__rsvd uint32 + Un [16]byte + X_sysctl_size [8]byte + X_sysctl_func [8]byte + X_sysctl_parent [8]byte + X_sysctl_desc [8]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go new file mode 100644 index 000000000..c0758f9d3 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go @@ -0,0 +1,401 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_netbsd.go + +// +build arm,netbsd + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int32 + Pad_cgo_0 [4]byte +} + +type Timeval struct { + Sec int64 + Usec int32 + Pad_cgo_0 [4]byte +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +type Stat_t struct { + Dev uint64 + Mode uint32 + Pad_cgo_0 [4]byte + Ino uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Pad_cgo_1 [4]byte + Rdev uint64 + Atimespec Timespec + Mtimespec Timespec + Ctimespec Timespec + Birthtimespec Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Spare [2]uint32 + Pad_cgo_2 [4]byte +} + +type Statfs_t [0]byte + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Dirent struct { + Fileno uint64 + Reclen uint16 + Namlen uint16 + Type uint8 + Name [512]int8 + Pad_cgo_0 [3]byte +} + +type Fsid struct { + X__fsid_val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [12]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen int32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x14 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter uint32 + Flags uint32 + Fflags uint32 + Data int64 + Udata int32 + Pad_cgo_0 [4]byte +} + +type FdSet struct { + Bits [8]uint32 +} + +const ( + SizeofIfMsghdr = 0x98 + SizeofIfData = 0x88 + SizeofIfaMsghdr = 0x18 + SizeofIfAnnounceMsghdr = 0x18 + SizeofRtMsghdr = 0x78 + SizeofRtMetrics = 0x50 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Addrlen uint8 + Hdrlen uint8 + Pad_cgo_0 [1]byte + Link_state int32 + Mtu uint64 + Metric uint64 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Lastchange Timespec +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Metric int32 + Index uint16 + Pad_cgo_0 [6]byte +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Name [16]int8 + What uint16 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits int32 + Pad_cgo_1 [4]byte + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint64 + Mtu uint64 + Hopcount uint64 + Recvpipe uint64 + Sendpipe uint64 + Ssthresh uint64 + Rtt uint64 + Rttvar uint64 + Expire int64 + Pksent int64 +} + +type Mclpool [0]byte + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x80 + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint64 + Drop uint64 + Capt uint64 + Padding [13]uint64 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type BpfTimeval struct { + Sec int32 + Usec int32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} + +type Sysctlnode struct { + Flags uint32 + Num int32 + Name [32]int8 + Ver uint32 + X__rsvd uint32 + Un [16]byte + X_sysctl_size [8]byte + X_sysctl_func [8]byte + X_sysctl_parent [8]byte + X_sysctl_desc [8]byte +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go new file mode 100644 index 000000000..860a46979 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go @@ -0,0 +1,441 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_openbsd.go + +// +build 386,openbsd + +package unix + +const ( + sizeofPtr = 0x4 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x4 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int32 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int32 +} + +type Timeval struct { + Sec int64 + Usec int32 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int32 + Ixrss int32 + Idrss int32 + Isrss int32 + Minflt int32 + Majflt int32 + Nswap int32 + Inblock int32 + Oublock int32 + Msgsnd int32 + Msgrcv int32 + Nsignals int32 + Nvcsw int32 + Nivcsw int32 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Mode uint32 + Dev int32 + Ino uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev int32 + Atim Timespec + Mtim Timespec + Ctim Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + X__st_birthtim Timespec +} + +type Statfs_t struct { + F_flags uint32 + F_bsize uint32 + F_iosize uint32 + F_blocks uint64 + F_bfree uint64 + F_bavail int64 + F_files uint64 + F_ffree uint64 + F_favail int64 + F_syncwrites uint64 + F_syncreads uint64 + F_asyncwrites uint64 + F_asyncreads uint64 + F_fsid Fsid + F_namemax uint32 + F_owner uint32 + F_ctime uint64 + F_fstypename [16]int8 + F_mntonname [90]int8 + F_mntfromname [90]int8 + F_mntfromspec [90]int8 + Pad_cgo_0 [2]byte + Mount_info [160]byte +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Dirent struct { + Fileno uint64 + Off int64 + Reclen uint16 + Type uint8 + Namlen uint8 + X__d_padding [4]uint8 + Name [256]int8 +} + +type Fsid struct { + Val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [24]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint32 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Iov *Iovec + Iovlen uint32 + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x20 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x1c + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint32 + Filter int16 + Flags uint16 + Fflags uint32 + Data int64 + Udata *byte +} + +type FdSet struct { + Bits [32]uint32 +} + +const ( + SizeofIfMsghdr = 0xec + SizeofIfData = 0xd4 + SizeofIfaMsghdr = 0x18 + SizeofIfAnnounceMsghdr = 0x1a + SizeofRtMsghdr = 0x60 + SizeofRtMetrics = 0x38 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Pad1 uint8 + Pad2 uint8 + Addrs int32 + Flags int32 + Xflags int32 + Data IfData +} + +type IfData struct { + Type uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Mtu uint32 + Metric uint32 + Pad uint32 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Capabilities uint32 + Lastchange Timeval + Mclpool [7]Mclpool +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Pad1 uint8 + Pad2 uint8 + Addrs int32 + Flags int32 + Metric int32 +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + What uint16 + Name [16]int8 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Priority uint8 + Mpls uint8 + Addrs int32 + Flags int32 + Fmask int32 + Pid int32 + Seq int32 + Errno int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Pksent uint64 + Expire int64 + Locks uint32 + Mtu uint32 + Refcnt uint32 + Hopcount uint32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pad uint32 +} + +type Mclpool struct { + Grown int32 + Alive uint16 + Hwm uint16 + Cwm uint16 + Lwm uint16 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x8 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type BpfTimeval struct { + Sec uint32 + Usec uint32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go new file mode 100644 index 000000000..23c52727f --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go @@ -0,0 +1,448 @@ +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_openbsd.go + +// +build amd64,openbsd + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Mode uint32 + Dev int32 + Ino uint64 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev int32 + Atim Timespec + Mtim Timespec + Ctim Timespec + Size int64 + Blocks int64 + Blksize uint32 + Flags uint32 + Gen uint32 + Pad_cgo_0 [4]byte + X__st_birthtim Timespec +} + +type Statfs_t struct { + F_flags uint32 + F_bsize uint32 + F_iosize uint32 + Pad_cgo_0 [4]byte + F_blocks uint64 + F_bfree uint64 + F_bavail int64 + F_files uint64 + F_ffree uint64 + F_favail int64 + F_syncwrites uint64 + F_syncreads uint64 + F_asyncwrites uint64 + F_asyncreads uint64 + F_fsid Fsid + F_namemax uint32 + F_owner uint32 + F_ctime uint64 + F_fstypename [16]int8 + F_mntonname [90]int8 + F_mntfromname [90]int8 + F_mntfromspec [90]int8 + Pad_cgo_1 [2]byte + Mount_info [160]byte +} + +type Flock_t struct { + Start int64 + Len int64 + Pid int32 + Type int16 + Whence int16 +} + +type Dirent struct { + Fileno uint64 + Off int64 + Reclen uint16 + Type uint8 + Namlen uint8 + X__d_padding [4]uint8 + Name [256]int8 +} + +type Fsid struct { + Val [2]int32 +} + +type RawSockaddrInet4 struct { + Len uint8 + Family uint8 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Len uint8 + Family uint8 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddrUnix struct { + Len uint8 + Family uint8 + Path [104]int8 +} + +type RawSockaddrDatalink struct { + Len uint8 + Family uint8 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [24]int8 +} + +type RawSockaddr struct { + Len uint8 + Family uint8 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [92]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *byte + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen uint32 + Pad_cgo_1 [4]byte + Control *byte + Controllen uint32 + Flags int32 +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + Filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x1c + SizeofSockaddrAny = 0x6c + SizeofSockaddrUnix = 0x6a + SizeofSockaddrDatalink = 0x20 + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x30 + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x20 + SizeofICMPv6Filter = 0x20 +) + +const ( + PTRACE_TRACEME = 0x0 + PTRACE_CONT = 0x7 + PTRACE_KILL = 0x8 +) + +type Kevent_t struct { + Ident uint64 + Filter int16 + Flags uint16 + Fflags uint32 + Data int64 + Udata *byte +} + +type FdSet struct { + Bits [32]uint32 +} + +const ( + SizeofIfMsghdr = 0xf8 + SizeofIfData = 0xe0 + SizeofIfaMsghdr = 0x18 + SizeofIfAnnounceMsghdr = 0x1a + SizeofRtMsghdr = 0x60 + SizeofRtMetrics = 0x38 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Pad1 uint8 + Pad2 uint8 + Addrs int32 + Flags int32 + Xflags int32 + Data IfData +} + +type IfData struct { + Type uint8 + Addrlen uint8 + Hdrlen uint8 + Link_state uint8 + Mtu uint32 + Metric uint32 + Pad uint32 + Baudrate uint64 + Ipackets uint64 + Ierrors uint64 + Opackets uint64 + Oerrors uint64 + Collisions uint64 + Ibytes uint64 + Obytes uint64 + Imcasts uint64 + Omcasts uint64 + Iqdrops uint64 + Noproto uint64 + Capabilities uint32 + Pad_cgo_0 [4]byte + Lastchange Timeval + Mclpool [7]Mclpool + Pad_cgo_1 [4]byte +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Pad1 uint8 + Pad2 uint8 + Addrs int32 + Flags int32 + Metric int32 +} + +type IfAnnounceMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + What uint16 + Name [16]int8 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Hdrlen uint16 + Index uint16 + Tableid uint16 + Priority uint8 + Mpls uint8 + Addrs int32 + Flags int32 + Fmask int32 + Pid int32 + Seq int32 + Errno int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Pksent uint64 + Expire int64 + Locks uint32 + Mtu uint32 + Refcnt uint32 + Hopcount uint32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pad uint32 +} + +type Mclpool struct { + Grown int32 + Alive uint16 + Hwm uint16 + Cwm uint16 + Lwm uint16 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x8 + SizeofBpfProgram = 0x10 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint32 + Drop uint32 +} + +type BpfProgram struct { + Len uint32 + Pad_cgo_0 [4]byte + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfHdr struct { + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +type BpfTimeval struct { + Sec uint32 + Usec uint32 +} + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [20]uint8 + Ispeed int32 + Ospeed int32 +} diff --git a/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go new file mode 100644 index 000000000..b3b928a51 --- /dev/null +++ b/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go @@ -0,0 +1,422 @@ +// +build amd64,solaris +// Created by cgo -godefs - DO NOT EDIT +// cgo -godefs types_solaris.go + +package unix + +const ( + sizeofPtr = 0x8 + sizeofShort = 0x2 + sizeofInt = 0x4 + sizeofLong = 0x8 + sizeofLongLong = 0x8 + PathMax = 0x400 +) + +type ( + _C_short int16 + _C_int int32 + _C_long int64 + _C_long_long int64 +) + +type Timespec struct { + Sec int64 + Nsec int64 +} + +type Timeval struct { + Sec int64 + Usec int64 +} + +type Timeval32 struct { + Sec int32 + Usec int32 +} + +type Tms struct { + Utime int64 + Stime int64 + Cutime int64 + Cstime int64 +} + +type Utimbuf struct { + Actime int64 + Modtime int64 +} + +type Rusage struct { + Utime Timeval + Stime Timeval + Maxrss int64 + Ixrss int64 + Idrss int64 + Isrss int64 + Minflt int64 + Majflt int64 + Nswap int64 + Inblock int64 + Oublock int64 + Msgsnd int64 + Msgrcv int64 + Nsignals int64 + Nvcsw int64 + Nivcsw int64 +} + +type Rlimit struct { + Cur uint64 + Max uint64 +} + +type _Gid_t uint32 + +const ( + S_IFMT = 0xf000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +type Stat_t struct { + Dev uint64 + Ino uint64 + Mode uint32 + Nlink uint32 + Uid uint32 + Gid uint32 + Rdev uint64 + Size int64 + Atim Timespec + Mtim Timespec + Ctim Timespec + Blksize int32 + Pad_cgo_0 [4]byte + Blocks int64 + Fstype [16]int8 +} + +type Flock_t struct { + Type int16 + Whence int16 + Pad_cgo_0 [4]byte + Start int64 + Len int64 + Sysid int32 + Pid int32 + Pad [4]int64 +} + +type Dirent struct { + Ino uint64 + Off int64 + Reclen uint16 + Name [1]int8 + Pad_cgo_0 [5]byte +} + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]int8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 + X__sin6_src_id uint32 +} + +type RawSockaddrUnix struct { + Family uint16 + Path [108]int8 +} + +type RawSockaddrDatalink struct { + Family uint16 + Index uint16 + Type uint8 + Nlen uint8 + Alen uint8 + Slen uint8 + Data [244]int8 +} + +type RawSockaddr struct { + Family uint16 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [236]int8 +} + +type _Socklen uint32 + +type Linger struct { + Onoff int32 + Linger int32 +} + +type Iovec struct { + Base *int8 + Len uint64 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +type Msghdr struct { + Name *byte + Namelen uint32 + Pad_cgo_0 [4]byte + Iov *Iovec + Iovlen int32 + Pad_cgo_1 [4]byte + Accrights *int8 + Accrightslen int32 + Pad_cgo_2 [4]byte +} + +type Cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +type Inet6Pktinfo struct { + Addr [16]byte /* in6_addr */ + Ifindex uint32 +} + +type IPv6MTUInfo struct { + Addr RawSockaddrInet6 + Mtu uint32 +} + +type ICMPv6Filter struct { + X__icmp6_filt [8]uint32 +} + +const ( + SizeofSockaddrInet4 = 0x10 + SizeofSockaddrInet6 = 0x20 + SizeofSockaddrAny = 0xfc + SizeofSockaddrUnix = 0x6e + SizeofSockaddrDatalink = 0xfc + SizeofLinger = 0x8 + SizeofIPMreq = 0x8 + SizeofIPv6Mreq = 0x14 + SizeofMsghdr = 0x30 + SizeofCmsghdr = 0xc + SizeofInet6Pktinfo = 0x14 + SizeofIPv6MTUInfo = 0x24 + SizeofICMPv6Filter = 0x20 +) + +type FdSet struct { + Bits [1024]int64 +} + +type Utsname struct { + Sysname [257]int8 + Nodename [257]int8 + Release [257]int8 + Version [257]int8 + Machine [257]int8 +} + +type Ustat_t struct { + Tfree int64 + Tinode uint64 + Fname [6]int8 + Fpack [6]int8 + Pad_cgo_0 [4]byte +} + +const ( + AT_FDCWD = 0xffd19553 + AT_SYMLINK_NOFOLLOW = 0x1000 + AT_SYMLINK_FOLLOW = 0x2000 + AT_REMOVEDIR = 0x1 + AT_EACCESS = 0x4 +) + +const ( + SizeofIfMsghdr = 0x54 + SizeofIfData = 0x44 + SizeofIfaMsghdr = 0x14 + SizeofRtMsghdr = 0x4c + SizeofRtMetrics = 0x28 +) + +type IfMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Data IfData +} + +type IfData struct { + Type uint8 + Addrlen uint8 + Hdrlen uint8 + Pad_cgo_0 [1]byte + Mtu uint32 + Metric uint32 + Baudrate uint32 + Ipackets uint32 + Ierrors uint32 + Opackets uint32 + Oerrors uint32 + Collisions uint32 + Ibytes uint32 + Obytes uint32 + Imcasts uint32 + Omcasts uint32 + Iqdrops uint32 + Noproto uint32 + Lastchange Timeval32 +} + +type IfaMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Addrs int32 + Flags int32 + Index uint16 + Pad_cgo_0 [2]byte + Metric int32 +} + +type RtMsghdr struct { + Msglen uint16 + Version uint8 + Type uint8 + Index uint16 + Pad_cgo_0 [2]byte + Flags int32 + Addrs int32 + Pid int32 + Seq int32 + Errno int32 + Use int32 + Inits uint32 + Rmx RtMetrics +} + +type RtMetrics struct { + Locks uint32 + Mtu uint32 + Hopcount uint32 + Expire uint32 + Recvpipe uint32 + Sendpipe uint32 + Ssthresh uint32 + Rtt uint32 + Rttvar uint32 + Pksent uint32 +} + +const ( + SizeofBpfVersion = 0x4 + SizeofBpfStat = 0x80 + SizeofBpfProgram = 0x10 + SizeofBpfInsn = 0x8 + SizeofBpfHdr = 0x14 +) + +type BpfVersion struct { + Major uint16 + Minor uint16 +} + +type BpfStat struct { + Recv uint64 + Drop uint64 + Capt uint64 + Padding [13]uint64 +} + +type BpfProgram struct { + Len uint32 + Pad_cgo_0 [4]byte + Insns *BpfInsn +} + +type BpfInsn struct { + Code uint16 + Jt uint8 + Jf uint8 + K uint32 +} + +type BpfTimeval struct { + Sec int32 + Usec int32 +} + +type BpfHdr struct { + Tstamp BpfTimeval + Caplen uint32 + Datalen uint32 + Hdrlen uint16 + Pad_cgo_0 [2]byte +} + +const _SC_PAGESIZE = 0xb + +type Termios struct { + Iflag uint32 + Oflag uint32 + Cflag uint32 + Lflag uint32 + Cc [19]uint8 + Pad_cgo_0 [1]byte +} + +type Termio struct { + Iflag uint16 + Oflag uint16 + Cflag uint16 + Lflag uint16 + Line int8 + Cc [8]uint8 + Pad_cgo_0 [1]byte +} + +type Winsize struct { + Row uint16 + Col uint16 + Xpixel uint16 + Ypixel uint16 +} diff --git a/vendor/golang.org/x/sys/windows/asm_windows_386.s b/vendor/golang.org/x/sys/windows/asm_windows_386.s new file mode 100644 index 000000000..1c20dd2f8 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/asm_windows_386.s @@ -0,0 +1,13 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +// System calls for 386, Windows are implemented in runtime/syscall_windows.goc +// + +TEXT ·getprocaddress(SB), 7, $0-8 + JMP syscall·getprocaddress(SB) + +TEXT ·loadlibrary(SB), 7, $0-4 + JMP syscall·loadlibrary(SB) diff --git a/vendor/golang.org/x/sys/windows/asm_windows_amd64.s b/vendor/golang.org/x/sys/windows/asm_windows_amd64.s new file mode 100644 index 000000000..4d025ab55 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/asm_windows_amd64.s @@ -0,0 +1,13 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +// System calls for amd64, Windows are implemented in runtime/syscall_windows.goc +// + +TEXT ·getprocaddress(SB), 7, $0-32 + JMP syscall·getprocaddress(SB) + +TEXT ·loadlibrary(SB), 7, $0-8 + JMP syscall·loadlibrary(SB) diff --git a/vendor/golang.org/x/sys/windows/dll_windows.go b/vendor/golang.org/x/sys/windows/dll_windows.go new file mode 100644 index 000000000..0f6204674 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/dll_windows.go @@ -0,0 +1,378 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package windows + +import ( + "sync" + "sync/atomic" + "syscall" + "unsafe" +) + +// DLLError describes reasons for DLL load failures. +type DLLError struct { + Err error + ObjName string + Msg string +} + +func (e *DLLError) Error() string { return e.Msg } + +// Implemented in runtime/syscall_windows.goc; we provide jumps to them in our assembly file. +func loadlibrary(filename *uint16) (handle uintptr, err syscall.Errno) +func getprocaddress(handle uintptr, procname *uint8) (proc uintptr, err syscall.Errno) + +// A DLL implements access to a single DLL. +type DLL struct { + Name string + Handle Handle +} + +// LoadDLL loads DLL file into memory. +// +// Warning: using LoadDLL without an absolute path name is subject to +// DLL preloading attacks. To safely load a system DLL, use LazyDLL +// with System set to true, or use LoadLibraryEx directly. +func LoadDLL(name string) (dll *DLL, err error) { + namep, err := UTF16PtrFromString(name) + if err != nil { + return nil, err + } + h, e := loadlibrary(namep) + if e != 0 { + return nil, &DLLError{ + Err: e, + ObjName: name, + Msg: "Failed to load " + name + ": " + e.Error(), + } + } + d := &DLL{ + Name: name, + Handle: Handle(h), + } + return d, nil +} + +// MustLoadDLL is like LoadDLL but panics if load operation failes. +func MustLoadDLL(name string) *DLL { + d, e := LoadDLL(name) + if e != nil { + panic(e) + } + return d +} + +// FindProc searches DLL d for procedure named name and returns *Proc +// if found. It returns an error if search fails. +func (d *DLL) FindProc(name string) (proc *Proc, err error) { + namep, err := BytePtrFromString(name) + if err != nil { + return nil, err + } + a, e := getprocaddress(uintptr(d.Handle), namep) + if e != 0 { + return nil, &DLLError{ + Err: e, + ObjName: name, + Msg: "Failed to find " + name + " procedure in " + d.Name + ": " + e.Error(), + } + } + p := &Proc{ + Dll: d, + Name: name, + addr: a, + } + return p, nil +} + +// MustFindProc is like FindProc but panics if search fails. +func (d *DLL) MustFindProc(name string) *Proc { + p, e := d.FindProc(name) + if e != nil { + panic(e) + } + return p +} + +// Release unloads DLL d from memory. +func (d *DLL) Release() (err error) { + return FreeLibrary(d.Handle) +} + +// A Proc implements access to a procedure inside a DLL. +type Proc struct { + Dll *DLL + Name string + addr uintptr +} + +// Addr returns the address of the procedure represented by p. +// The return value can be passed to Syscall to run the procedure. +func (p *Proc) Addr() uintptr { + return p.addr +} + +//go:uintptrescapes + +// Call executes procedure p with arguments a. It will panic, if more then 15 arguments +// are supplied. +// +// The returned error is always non-nil, constructed from the result of GetLastError. +// Callers must inspect the primary return value to decide whether an error occurred +// (according to the semantics of the specific function being called) before consulting +// the error. The error will be guaranteed to contain windows.Errno. +func (p *Proc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) { + switch len(a) { + case 0: + return syscall.Syscall(p.Addr(), uintptr(len(a)), 0, 0, 0) + case 1: + return syscall.Syscall(p.Addr(), uintptr(len(a)), a[0], 0, 0) + case 2: + return syscall.Syscall(p.Addr(), uintptr(len(a)), a[0], a[1], 0) + case 3: + return syscall.Syscall(p.Addr(), uintptr(len(a)), a[0], a[1], a[2]) + case 4: + return syscall.Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], 0, 0) + case 5: + return syscall.Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], 0) + case 6: + return syscall.Syscall6(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5]) + case 7: + return syscall.Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], 0, 0) + case 8: + return syscall.Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], 0) + case 9: + return syscall.Syscall9(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]) + case 10: + return syscall.Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], 0, 0) + case 11: + return syscall.Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], 0) + case 12: + return syscall.Syscall12(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11]) + case 13: + return syscall.Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], 0, 0) + case 14: + return syscall.Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], 0) + case 15: + return syscall.Syscall15(p.Addr(), uintptr(len(a)), a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14]) + default: + panic("Call " + p.Name + " with too many arguments " + itoa(len(a)) + ".") + } + return +} + +// A LazyDLL implements access to a single DLL. +// It will delay the load of the DLL until the first +// call to its Handle method or to one of its +// LazyProc's Addr method. +type LazyDLL struct { + Name string + + // System determines whether the DLL must be loaded from the + // Windows System directory, bypassing the normal DLL search + // path. + System bool + + mu sync.Mutex + dll *DLL // non nil once DLL is loaded +} + +// Load loads DLL file d.Name into memory. It returns an error if fails. +// Load will not try to load DLL, if it is already loaded into memory. +func (d *LazyDLL) Load() error { + // Non-racy version of: + // if d.dll != nil { + if atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&d.dll))) != nil { + return nil + } + d.mu.Lock() + defer d.mu.Unlock() + if d.dll != nil { + return nil + } + + // kernel32.dll is special, since it's where LoadLibraryEx comes from. + // The kernel already special-cases its name, so it's always + // loaded from system32. + var dll *DLL + var err error + if d.Name == "kernel32.dll" { + dll, err = LoadDLL(d.Name) + } else { + dll, err = loadLibraryEx(d.Name, d.System) + } + if err != nil { + return err + } + + // Non-racy version of: + // d.dll = dll + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&d.dll)), unsafe.Pointer(dll)) + return nil +} + +// mustLoad is like Load but panics if search fails. +func (d *LazyDLL) mustLoad() { + e := d.Load() + if e != nil { + panic(e) + } +} + +// Handle returns d's module handle. +func (d *LazyDLL) Handle() uintptr { + d.mustLoad() + return uintptr(d.dll.Handle) +} + +// NewProc returns a LazyProc for accessing the named procedure in the DLL d. +func (d *LazyDLL) NewProc(name string) *LazyProc { + return &LazyProc{l: d, Name: name} +} + +// NewLazyDLL creates new LazyDLL associated with DLL file. +func NewLazyDLL(name string) *LazyDLL { + return &LazyDLL{Name: name} +} + +// NewLazySystemDLL is like NewLazyDLL, but will only +// search Windows System directory for the DLL if name is +// a base name (like "advapi32.dll"). +func NewLazySystemDLL(name string) *LazyDLL { + return &LazyDLL{Name: name, System: true} +} + +// A LazyProc implements access to a procedure inside a LazyDLL. +// It delays the lookup until the Addr method is called. +type LazyProc struct { + Name string + + mu sync.Mutex + l *LazyDLL + proc *Proc +} + +// Find searches DLL for procedure named p.Name. It returns +// an error if search fails. Find will not search procedure, +// if it is already found and loaded into memory. +func (p *LazyProc) Find() error { + // Non-racy version of: + // if p.proc == nil { + if atomic.LoadPointer((*unsafe.Pointer)(unsafe.Pointer(&p.proc))) == nil { + p.mu.Lock() + defer p.mu.Unlock() + if p.proc == nil { + e := p.l.Load() + if e != nil { + return e + } + proc, e := p.l.dll.FindProc(p.Name) + if e != nil { + return e + } + // Non-racy version of: + // p.proc = proc + atomic.StorePointer((*unsafe.Pointer)(unsafe.Pointer(&p.proc)), unsafe.Pointer(proc)) + } + } + return nil +} + +// mustFind is like Find but panics if search fails. +func (p *LazyProc) mustFind() { + e := p.Find() + if e != nil { + panic(e) + } +} + +// Addr returns the address of the procedure represented by p. +// The return value can be passed to Syscall to run the procedure. +func (p *LazyProc) Addr() uintptr { + p.mustFind() + return p.proc.Addr() +} + +//go:uintptrescapes + +// Call executes procedure p with arguments a. It will panic, if more then 15 arguments +// are supplied. +// +// The returned error is always non-nil, constructed from the result of GetLastError. +// Callers must inspect the primary return value to decide whether an error occurred +// (according to the semantics of the specific function being called) before consulting +// the error. The error will be guaranteed to contain windows.Errno. +func (p *LazyProc) Call(a ...uintptr) (r1, r2 uintptr, lastErr error) { + p.mustFind() + return p.proc.Call(a...) +} + +var canDoSearchSystem32Once struct { + sync.Once + v bool +} + +func initCanDoSearchSystem32() { + // https://msdn.microsoft.com/en-us/library/ms684179(v=vs.85).aspx says: + // "Windows 7, Windows Server 2008 R2, Windows Vista, and Windows + // Server 2008: The LOAD_LIBRARY_SEARCH_* flags are available on + // systems that have KB2533623 installed. To determine whether the + // flags are available, use GetProcAddress to get the address of the + // AddDllDirectory, RemoveDllDirectory, or SetDefaultDllDirectories + // function. If GetProcAddress succeeds, the LOAD_LIBRARY_SEARCH_* + // flags can be used with LoadLibraryEx." + canDoSearchSystem32Once.v = (modkernel32.NewProc("AddDllDirectory").Find() == nil) +} + +func canDoSearchSystem32() bool { + canDoSearchSystem32Once.Do(initCanDoSearchSystem32) + return canDoSearchSystem32Once.v +} + +func isBaseName(name string) bool { + for _, c := range name { + if c == ':' || c == '/' || c == '\\' { + return false + } + } + return true +} + +// loadLibraryEx wraps the Windows LoadLibraryEx function. +// +// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms684179(v=vs.85).aspx +// +// If name is not an absolute path, LoadLibraryEx searches for the DLL +// in a variety of automatic locations unless constrained by flags. +// See: https://msdn.microsoft.com/en-us/library/ff919712%28VS.85%29.aspx +func loadLibraryEx(name string, system bool) (*DLL, error) { + loadDLL := name + var flags uintptr + if system { + if canDoSearchSystem32() { + const LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800 + flags = LOAD_LIBRARY_SEARCH_SYSTEM32 + } else if isBaseName(name) { + // WindowsXP or unpatched Windows machine + // trying to load "foo.dll" out of the system + // folder, but LoadLibraryEx doesn't support + // that yet on their system, so emulate it. + windir, _ := Getenv("WINDIR") // old var; apparently works on XP + if windir == "" { + return nil, errString("%WINDIR% not defined") + } + loadDLL = windir + "\\System32\\" + name + } + } + h, err := LoadLibraryEx(loadDLL, 0, flags) + if err != nil { + return nil, err + } + return &DLL{Name: name, Handle: h}, nil +} + +type errString string + +func (s errString) Error() string { return string(s) } diff --git a/vendor/golang.org/x/sys/windows/env_unset.go b/vendor/golang.org/x/sys/windows/env_unset.go new file mode 100644 index 000000000..4ed03aeef --- /dev/null +++ b/vendor/golang.org/x/sys/windows/env_unset.go @@ -0,0 +1,15 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows +// +build go1.4 + +package windows + +import "syscall" + +func Unsetenv(key string) error { + // This was added in Go 1.4. + return syscall.Unsetenv(key) +} diff --git a/vendor/golang.org/x/sys/windows/env_windows.go b/vendor/golang.org/x/sys/windows/env_windows.go new file mode 100644 index 000000000..a9d8ef4b7 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/env_windows.go @@ -0,0 +1,25 @@ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Windows environment variables. + +package windows + +import "syscall" + +func Getenv(key string) (value string, found bool) { + return syscall.Getenv(key) +} + +func Setenv(key, value string) error { + return syscall.Setenv(key, value) +} + +func Clearenv() { + syscall.Clearenv() +} + +func Environ() []string { + return syscall.Environ() +} diff --git a/vendor/golang.org/x/sys/windows/eventlog.go b/vendor/golang.org/x/sys/windows/eventlog.go new file mode 100644 index 000000000..40af946e1 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/eventlog.go @@ -0,0 +1,20 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package windows + +const ( + EVENTLOG_SUCCESS = 0 + EVENTLOG_ERROR_TYPE = 1 + EVENTLOG_WARNING_TYPE = 2 + EVENTLOG_INFORMATION_TYPE = 4 + EVENTLOG_AUDIT_SUCCESS = 8 + EVENTLOG_AUDIT_FAILURE = 16 +) + +//sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW +//sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource +//sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW diff --git a/vendor/golang.org/x/sys/windows/exec_windows.go b/vendor/golang.org/x/sys/windows/exec_windows.go new file mode 100644 index 000000000..3606c3a8b --- /dev/null +++ b/vendor/golang.org/x/sys/windows/exec_windows.go @@ -0,0 +1,97 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Fork, exec, wait, etc. + +package windows + +// EscapeArg rewrites command line argument s as prescribed +// in http://msdn.microsoft.com/en-us/library/ms880421. +// This function returns "" (2 double quotes) if s is empty. +// Alternatively, these transformations are done: +// - every back slash (\) is doubled, but only if immediately +// followed by double quote ("); +// - every double quote (") is escaped by back slash (\); +// - finally, s is wrapped with double quotes (arg -> "arg"), +// but only if there is space or tab inside s. +func EscapeArg(s string) string { + if len(s) == 0 { + return "\"\"" + } + n := len(s) + hasSpace := false + for i := 0; i < len(s); i++ { + switch s[i] { + case '"', '\\': + n++ + case ' ', '\t': + hasSpace = true + } + } + if hasSpace { + n += 2 + } + if n == len(s) { + return s + } + + qs := make([]byte, n) + j := 0 + if hasSpace { + qs[j] = '"' + j++ + } + slashes := 0 + for i := 0; i < len(s); i++ { + switch s[i] { + default: + slashes = 0 + qs[j] = s[i] + case '\\': + slashes++ + qs[j] = s[i] + case '"': + for ; slashes > 0; slashes-- { + qs[j] = '\\' + j++ + } + qs[j] = '\\' + j++ + qs[j] = s[i] + } + j++ + } + if hasSpace { + for ; slashes > 0; slashes-- { + qs[j] = '\\' + j++ + } + qs[j] = '"' + j++ + } + return string(qs[:j]) +} + +func CloseOnExec(fd Handle) { + SetHandleInformation(Handle(fd), HANDLE_FLAG_INHERIT, 0) +} + +// FullPath retrieves the full path of the specified file. +func FullPath(name string) (path string, err error) { + p, err := UTF16PtrFromString(name) + if err != nil { + return "", err + } + n := uint32(100) + for { + buf := make([]uint16, n) + n, err = GetFullPathName(p, uint32(len(buf)), &buf[0], nil) + if err != nil { + return "", err + } + if n <= uint32(len(buf)) { + return UTF16ToString(buf[:n]), nil + } + } +} diff --git a/vendor/golang.org/x/sys/windows/mksyscall.go b/vendor/golang.org/x/sys/windows/mksyscall.go new file mode 100644 index 000000000..e1c88c9c7 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/mksyscall.go @@ -0,0 +1,7 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package windows + +//go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go diff --git a/vendor/golang.org/x/sys/windows/race.go b/vendor/golang.org/x/sys/windows/race.go new file mode 100644 index 000000000..343e18ab6 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/race.go @@ -0,0 +1,30 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows,race + +package windows + +import ( + "runtime" + "unsafe" +) + +const raceenabled = true + +func raceAcquire(addr unsafe.Pointer) { + runtime.RaceAcquire(addr) +} + +func raceReleaseMerge(addr unsafe.Pointer) { + runtime.RaceReleaseMerge(addr) +} + +func raceReadRange(addr unsafe.Pointer, len int) { + runtime.RaceReadRange(addr, len) +} + +func raceWriteRange(addr unsafe.Pointer, len int) { + runtime.RaceWriteRange(addr, len) +} diff --git a/vendor/golang.org/x/sys/windows/race0.go b/vendor/golang.org/x/sys/windows/race0.go new file mode 100644 index 000000000..17af843b9 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/race0.go @@ -0,0 +1,25 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows,!race + +package windows + +import ( + "unsafe" +) + +const raceenabled = false + +func raceAcquire(addr unsafe.Pointer) { +} + +func raceReleaseMerge(addr unsafe.Pointer) { +} + +func raceReadRange(addr unsafe.Pointer, len int) { +} + +func raceWriteRange(addr unsafe.Pointer, len int) { +} diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go new file mode 100644 index 000000000..ca09bdd70 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/security_windows.go @@ -0,0 +1,435 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package windows + +import ( + "syscall" + "unsafe" +) + +const ( + STANDARD_RIGHTS_REQUIRED = 0xf0000 + STANDARD_RIGHTS_READ = 0x20000 + STANDARD_RIGHTS_WRITE = 0x20000 + STANDARD_RIGHTS_EXECUTE = 0x20000 + STANDARD_RIGHTS_ALL = 0x1F0000 +) + +const ( + NameUnknown = 0 + NameFullyQualifiedDN = 1 + NameSamCompatible = 2 + NameDisplay = 3 + NameUniqueId = 6 + NameCanonical = 7 + NameUserPrincipal = 8 + NameCanonicalEx = 9 + NameServicePrincipal = 10 + NameDnsDomain = 12 +) + +// This function returns 1 byte BOOLEAN rather than the 4 byte BOOL. +// http://blogs.msdn.com/b/drnick/archive/2007/12/19/windows-and-upn-format-credentials.aspx +//sys TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) [failretval&0xff==0] = secur32.TranslateNameW +//sys GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) [failretval&0xff==0] = secur32.GetUserNameExW + +// TranslateAccountName converts a directory service +// object name from one format to another. +func TranslateAccountName(username string, from, to uint32, initSize int) (string, error) { + u, e := UTF16PtrFromString(username) + if e != nil { + return "", e + } + n := uint32(50) + for { + b := make([]uint16, n) + e = TranslateName(u, from, to, &b[0], &n) + if e == nil { + return UTF16ToString(b[:n]), nil + } + if e != ERROR_INSUFFICIENT_BUFFER { + return "", e + } + if n <= uint32(len(b)) { + return "", e + } + } +} + +const ( + // do not reorder + NetSetupUnknownStatus = iota + NetSetupUnjoined + NetSetupWorkgroupName + NetSetupDomainName +) + +type UserInfo10 struct { + Name *uint16 + Comment *uint16 + UsrComment *uint16 + FullName *uint16 +} + +//sys NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) = netapi32.NetUserGetInfo +//sys NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) = netapi32.NetGetJoinInformation +//sys NetApiBufferFree(buf *byte) (neterr error) = netapi32.NetApiBufferFree + +const ( + // do not reorder + SidTypeUser = 1 + iota + SidTypeGroup + SidTypeDomain + SidTypeAlias + SidTypeWellKnownGroup + SidTypeDeletedAccount + SidTypeInvalid + SidTypeUnknown + SidTypeComputer + SidTypeLabel +) + +type SidIdentifierAuthority struct { + Value [6]byte +} + +var ( + SECURITY_NULL_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 0}} + SECURITY_WORLD_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 1}} + SECURITY_LOCAL_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 2}} + SECURITY_CREATOR_SID_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 3}} + SECURITY_NON_UNIQUE_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 4}} + SECURITY_NT_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 5}} + SECURITY_MANDATORY_LABEL_AUTHORITY = SidIdentifierAuthority{[6]byte{0, 0, 0, 0, 0, 16}} +) + +const ( + SECURITY_NULL_RID = 0 + SECURITY_WORLD_RID = 0 + SECURITY_LOCAL_RID = 0 + SECURITY_CREATOR_OWNER_RID = 0 + SECURITY_CREATOR_GROUP_RID = 1 + SECURITY_DIALUP_RID = 1 + SECURITY_NETWORK_RID = 2 + SECURITY_BATCH_RID = 3 + SECURITY_INTERACTIVE_RID = 4 + SECURITY_LOGON_IDS_RID = 5 + SECURITY_SERVICE_RID = 6 + SECURITY_LOCAL_SYSTEM_RID = 18 + SECURITY_BUILTIN_DOMAIN_RID = 32 + SECURITY_PRINCIPAL_SELF_RID = 10 + SECURITY_CREATOR_OWNER_SERVER_RID = 0x2 + SECURITY_CREATOR_GROUP_SERVER_RID = 0x3 + SECURITY_LOGON_IDS_RID_COUNT = 0x3 + SECURITY_ANONYMOUS_LOGON_RID = 0x7 + SECURITY_PROXY_RID = 0x8 + SECURITY_ENTERPRISE_CONTROLLERS_RID = 0x9 + SECURITY_SERVER_LOGON_RID = SECURITY_ENTERPRISE_CONTROLLERS_RID + SECURITY_AUTHENTICATED_USER_RID = 0xb + SECURITY_RESTRICTED_CODE_RID = 0xc + SECURITY_NT_NON_UNIQUE_RID = 0x15 +) + +//sys LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) = advapi32.LookupAccountSidW +//sys LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) = advapi32.LookupAccountNameW +//sys ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) = advapi32.ConvertSidToStringSidW +//sys ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) = advapi32.ConvertStringSidToSidW +//sys GetLengthSid(sid *SID) (len uint32) = advapi32.GetLengthSid +//sys CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) = advapi32.CopySid +//sys AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) = advapi32.AllocateAndInitializeSid +//sys FreeSid(sid *SID) (err error) [failretval!=0] = advapi32.FreeSid +//sys EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) = advapi32.EqualSid + +// The security identifier (SID) structure is a variable-length +// structure used to uniquely identify users or groups. +type SID struct{} + +// StringToSid converts a string-format security identifier +// sid into a valid, functional sid. +func StringToSid(s string) (*SID, error) { + var sid *SID + p, e := UTF16PtrFromString(s) + if e != nil { + return nil, e + } + e = ConvertStringSidToSid(p, &sid) + if e != nil { + return nil, e + } + defer LocalFree((Handle)(unsafe.Pointer(sid))) + return sid.Copy() +} + +// LookupSID retrieves a security identifier sid for the account +// and the name of the domain on which the account was found. +// System specify target computer to search. +func LookupSID(system, account string) (sid *SID, domain string, accType uint32, err error) { + if len(account) == 0 { + return nil, "", 0, syscall.EINVAL + } + acc, e := UTF16PtrFromString(account) + if e != nil { + return nil, "", 0, e + } + var sys *uint16 + if len(system) > 0 { + sys, e = UTF16PtrFromString(system) + if e != nil { + return nil, "", 0, e + } + } + n := uint32(50) + dn := uint32(50) + for { + b := make([]byte, n) + db := make([]uint16, dn) + sid = (*SID)(unsafe.Pointer(&b[0])) + e = LookupAccountName(sys, acc, sid, &n, &db[0], &dn, &accType) + if e == nil { + return sid, UTF16ToString(db), accType, nil + } + if e != ERROR_INSUFFICIENT_BUFFER { + return nil, "", 0, e + } + if n <= uint32(len(b)) { + return nil, "", 0, e + } + } +} + +// String converts sid to a string format +// suitable for display, storage, or transmission. +func (sid *SID) String() (string, error) { + var s *uint16 + e := ConvertSidToStringSid(sid, &s) + if e != nil { + return "", e + } + defer LocalFree((Handle)(unsafe.Pointer(s))) + return UTF16ToString((*[256]uint16)(unsafe.Pointer(s))[:]), nil +} + +// Len returns the length, in bytes, of a valid security identifier sid. +func (sid *SID) Len() int { + return int(GetLengthSid(sid)) +} + +// Copy creates a duplicate of security identifier sid. +func (sid *SID) Copy() (*SID, error) { + b := make([]byte, sid.Len()) + sid2 := (*SID)(unsafe.Pointer(&b[0])) + e := CopySid(uint32(len(b)), sid2, sid) + if e != nil { + return nil, e + } + return sid2, nil +} + +// LookupAccount retrieves the name of the account for this sid +// and the name of the first domain on which this sid is found. +// System specify target computer to search for. +func (sid *SID) LookupAccount(system string) (account, domain string, accType uint32, err error) { + var sys *uint16 + if len(system) > 0 { + sys, err = UTF16PtrFromString(system) + if err != nil { + return "", "", 0, err + } + } + n := uint32(50) + dn := uint32(50) + for { + b := make([]uint16, n) + db := make([]uint16, dn) + e := LookupAccountSid(sys, sid, &b[0], &n, &db[0], &dn, &accType) + if e == nil { + return UTF16ToString(b), UTF16ToString(db), accType, nil + } + if e != ERROR_INSUFFICIENT_BUFFER { + return "", "", 0, e + } + if n <= uint32(len(b)) { + return "", "", 0, e + } + } +} + +const ( + // do not reorder + TOKEN_ASSIGN_PRIMARY = 1 << iota + TOKEN_DUPLICATE + TOKEN_IMPERSONATE + TOKEN_QUERY + TOKEN_QUERY_SOURCE + TOKEN_ADJUST_PRIVILEGES + TOKEN_ADJUST_GROUPS + TOKEN_ADJUST_DEFAULT + + TOKEN_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | + TOKEN_ASSIGN_PRIMARY | + TOKEN_DUPLICATE | + TOKEN_IMPERSONATE | + TOKEN_QUERY | + TOKEN_QUERY_SOURCE | + TOKEN_ADJUST_PRIVILEGES | + TOKEN_ADJUST_GROUPS | + TOKEN_ADJUST_DEFAULT + TOKEN_READ = STANDARD_RIGHTS_READ | TOKEN_QUERY + TOKEN_WRITE = STANDARD_RIGHTS_WRITE | + TOKEN_ADJUST_PRIVILEGES | + TOKEN_ADJUST_GROUPS | + TOKEN_ADJUST_DEFAULT + TOKEN_EXECUTE = STANDARD_RIGHTS_EXECUTE +) + +const ( + // do not reorder + TokenUser = 1 + iota + TokenGroups + TokenPrivileges + TokenOwner + TokenPrimaryGroup + TokenDefaultDacl + TokenSource + TokenType + TokenImpersonationLevel + TokenStatistics + TokenRestrictedSids + TokenSessionId + TokenGroupsAndPrivileges + TokenSessionReference + TokenSandBoxInert + TokenAuditPolicy + TokenOrigin + TokenElevationType + TokenLinkedToken + TokenElevation + TokenHasRestrictions + TokenAccessInformation + TokenVirtualizationAllowed + TokenVirtualizationEnabled + TokenIntegrityLevel + TokenUIAccess + TokenMandatoryPolicy + TokenLogonSid + MaxTokenInfoClass +) + +type SIDAndAttributes struct { + Sid *SID + Attributes uint32 +} + +type Tokenuser struct { + User SIDAndAttributes +} + +type Tokenprimarygroup struct { + PrimaryGroup *SID +} + +type Tokengroups struct { + GroupCount uint32 + Groups [1]SIDAndAttributes +} + +//sys OpenProcessToken(h Handle, access uint32, token *Token) (err error) = advapi32.OpenProcessToken +//sys GetTokenInformation(t Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) = advapi32.GetTokenInformation +//sys GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) = userenv.GetUserProfileDirectoryW + +// An access token contains the security information for a logon session. +// The system creates an access token when a user logs on, and every +// process executed on behalf of the user has a copy of the token. +// The token identifies the user, the user's groups, and the user's +// privileges. The system uses the token to control access to securable +// objects and to control the ability of the user to perform various +// system-related operations on the local computer. +type Token Handle + +// OpenCurrentProcessToken opens the access token +// associated with current process. +func OpenCurrentProcessToken() (Token, error) { + p, e := GetCurrentProcess() + if e != nil { + return 0, e + } + var t Token + e = OpenProcessToken(p, TOKEN_QUERY, &t) + if e != nil { + return 0, e + } + return t, nil +} + +// Close releases access to access token. +func (t Token) Close() error { + return CloseHandle(Handle(t)) +} + +// getInfo retrieves a specified type of information about an access token. +func (t Token) getInfo(class uint32, initSize int) (unsafe.Pointer, error) { + n := uint32(initSize) + for { + b := make([]byte, n) + e := GetTokenInformation(t, class, &b[0], uint32(len(b)), &n) + if e == nil { + return unsafe.Pointer(&b[0]), nil + } + if e != ERROR_INSUFFICIENT_BUFFER { + return nil, e + } + if n <= uint32(len(b)) { + return nil, e + } + } +} + +// GetTokenUser retrieves access token t user account information. +func (t Token) GetTokenUser() (*Tokenuser, error) { + i, e := t.getInfo(TokenUser, 50) + if e != nil { + return nil, e + } + return (*Tokenuser)(i), nil +} + +// GetTokenGroups retrieves group accounts associated with access token t. +func (t Token) GetTokenGroups() (*Tokengroups, error) { + i, e := t.getInfo(TokenGroups, 50) + if e != nil { + return nil, e + } + return (*Tokengroups)(i), nil +} + +// GetTokenPrimaryGroup retrieves access token t primary group information. +// A pointer to a SID structure representing a group that will become +// the primary group of any objects created by a process using this access token. +func (t Token) GetTokenPrimaryGroup() (*Tokenprimarygroup, error) { + i, e := t.getInfo(TokenPrimaryGroup, 50) + if e != nil { + return nil, e + } + return (*Tokenprimarygroup)(i), nil +} + +// GetUserProfileDirectory retrieves path to the +// root directory of the access token t user's profile. +func (t Token) GetUserProfileDirectory() (string, error) { + n := uint32(100) + for { + b := make([]uint16, n) + e := GetUserProfileDirectory(t, &b[0], &n) + if e == nil { + return UTF16ToString(b), nil + } + if e != ERROR_INSUFFICIENT_BUFFER { + return "", e + } + if n <= uint32(len(b)) { + return "", e + } + } +} diff --git a/vendor/golang.org/x/sys/windows/service.go b/vendor/golang.org/x/sys/windows/service.go new file mode 100644 index 000000000..1c11d392f --- /dev/null +++ b/vendor/golang.org/x/sys/windows/service.go @@ -0,0 +1,143 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package windows + +const ( + SC_MANAGER_CONNECT = 1 + SC_MANAGER_CREATE_SERVICE = 2 + SC_MANAGER_ENUMERATE_SERVICE = 4 + SC_MANAGER_LOCK = 8 + SC_MANAGER_QUERY_LOCK_STATUS = 16 + SC_MANAGER_MODIFY_BOOT_CONFIG = 32 + SC_MANAGER_ALL_ACCESS = 0xf003f +) + +//sys OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenSCManagerW + +const ( + SERVICE_KERNEL_DRIVER = 1 + SERVICE_FILE_SYSTEM_DRIVER = 2 + SERVICE_ADAPTER = 4 + SERVICE_RECOGNIZER_DRIVER = 8 + SERVICE_WIN32_OWN_PROCESS = 16 + SERVICE_WIN32_SHARE_PROCESS = 32 + SERVICE_WIN32 = SERVICE_WIN32_OWN_PROCESS | SERVICE_WIN32_SHARE_PROCESS + SERVICE_INTERACTIVE_PROCESS = 256 + SERVICE_DRIVER = SERVICE_KERNEL_DRIVER | SERVICE_FILE_SYSTEM_DRIVER | SERVICE_RECOGNIZER_DRIVER + SERVICE_TYPE_ALL = SERVICE_WIN32 | SERVICE_ADAPTER | SERVICE_DRIVER | SERVICE_INTERACTIVE_PROCESS + + SERVICE_BOOT_START = 0 + SERVICE_SYSTEM_START = 1 + SERVICE_AUTO_START = 2 + SERVICE_DEMAND_START = 3 + SERVICE_DISABLED = 4 + + SERVICE_ERROR_IGNORE = 0 + SERVICE_ERROR_NORMAL = 1 + SERVICE_ERROR_SEVERE = 2 + SERVICE_ERROR_CRITICAL = 3 + + SC_STATUS_PROCESS_INFO = 0 + + SERVICE_STOPPED = 1 + SERVICE_START_PENDING = 2 + SERVICE_STOP_PENDING = 3 + SERVICE_RUNNING = 4 + SERVICE_CONTINUE_PENDING = 5 + SERVICE_PAUSE_PENDING = 6 + SERVICE_PAUSED = 7 + SERVICE_NO_CHANGE = 0xffffffff + + SERVICE_ACCEPT_STOP = 1 + SERVICE_ACCEPT_PAUSE_CONTINUE = 2 + SERVICE_ACCEPT_SHUTDOWN = 4 + SERVICE_ACCEPT_PARAMCHANGE = 8 + SERVICE_ACCEPT_NETBINDCHANGE = 16 + SERVICE_ACCEPT_HARDWAREPROFILECHANGE = 32 + SERVICE_ACCEPT_POWEREVENT = 64 + SERVICE_ACCEPT_SESSIONCHANGE = 128 + + SERVICE_CONTROL_STOP = 1 + SERVICE_CONTROL_PAUSE = 2 + SERVICE_CONTROL_CONTINUE = 3 + SERVICE_CONTROL_INTERROGATE = 4 + SERVICE_CONTROL_SHUTDOWN = 5 + SERVICE_CONTROL_PARAMCHANGE = 6 + SERVICE_CONTROL_NETBINDADD = 7 + SERVICE_CONTROL_NETBINDREMOVE = 8 + SERVICE_CONTROL_NETBINDENABLE = 9 + SERVICE_CONTROL_NETBINDDISABLE = 10 + SERVICE_CONTROL_DEVICEEVENT = 11 + SERVICE_CONTROL_HARDWAREPROFILECHANGE = 12 + SERVICE_CONTROL_POWEREVENT = 13 + SERVICE_CONTROL_SESSIONCHANGE = 14 + + SERVICE_ACTIVE = 1 + SERVICE_INACTIVE = 2 + SERVICE_STATE_ALL = 3 + + SERVICE_QUERY_CONFIG = 1 + SERVICE_CHANGE_CONFIG = 2 + SERVICE_QUERY_STATUS = 4 + SERVICE_ENUMERATE_DEPENDENTS = 8 + SERVICE_START = 16 + SERVICE_STOP = 32 + SERVICE_PAUSE_CONTINUE = 64 + SERVICE_INTERROGATE = 128 + SERVICE_USER_DEFINED_CONTROL = 256 + SERVICE_ALL_ACCESS = STANDARD_RIGHTS_REQUIRED | SERVICE_QUERY_CONFIG | SERVICE_CHANGE_CONFIG | SERVICE_QUERY_STATUS | SERVICE_ENUMERATE_DEPENDENTS | SERVICE_START | SERVICE_STOP | SERVICE_PAUSE_CONTINUE | SERVICE_INTERROGATE | SERVICE_USER_DEFINED_CONTROL + SERVICE_RUNS_IN_SYSTEM_PROCESS = 1 + SERVICE_CONFIG_DESCRIPTION = 1 + SERVICE_CONFIG_FAILURE_ACTIONS = 2 + + NO_ERROR = 0 +) + +type SERVICE_STATUS struct { + ServiceType uint32 + CurrentState uint32 + ControlsAccepted uint32 + Win32ExitCode uint32 + ServiceSpecificExitCode uint32 + CheckPoint uint32 + WaitHint uint32 +} + +type SERVICE_TABLE_ENTRY struct { + ServiceName *uint16 + ServiceProc uintptr +} + +type QUERY_SERVICE_CONFIG struct { + ServiceType uint32 + StartType uint32 + ErrorControl uint32 + BinaryPathName *uint16 + LoadOrderGroup *uint16 + TagId uint32 + Dependencies *uint16 + ServiceStartName *uint16 + DisplayName *uint16 +} + +type SERVICE_DESCRIPTION struct { + Description *uint16 +} + +//sys CloseServiceHandle(handle Handle) (err error) = advapi32.CloseServiceHandle +//sys CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) [failretval==0] = advapi32.CreateServiceW +//sys OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) [failretval==0] = advapi32.OpenServiceW +//sys DeleteService(service Handle) (err error) = advapi32.DeleteService +//sys StartService(service Handle, numArgs uint32, argVectors **uint16) (err error) = advapi32.StartServiceW +//sys QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) = advapi32.QueryServiceStatus +//sys ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) = advapi32.ControlService +//sys StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) = advapi32.StartServiceCtrlDispatcherW +//sys SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) = advapi32.SetServiceStatus +//sys ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) = advapi32.ChangeServiceConfigW +//sys QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceConfigW +//sys ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) = advapi32.ChangeServiceConfig2W +//sys QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) = advapi32.QueryServiceConfig2W diff --git a/vendor/golang.org/x/sys/windows/str.go b/vendor/golang.org/x/sys/windows/str.go new file mode 100644 index 000000000..917cc2aae --- /dev/null +++ b/vendor/golang.org/x/sys/windows/str.go @@ -0,0 +1,22 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package windows + +func itoa(val int) string { // do it here rather than with fmt to avoid dependency + if val < 0 { + return "-" + itoa(-val) + } + var buf [32]byte // big enough for int64 + i := len(buf) - 1 + for val >= 10 { + buf[i] = byte(val%10 + '0') + i-- + val /= 10 + } + buf[i] = byte(val + '0') + return string(buf[i:]) +} diff --git a/vendor/golang.org/x/sys/windows/svc/event.go b/vendor/golang.org/x/sys/windows/svc/event.go new file mode 100644 index 000000000..0508e2288 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/event.go @@ -0,0 +1,48 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package svc + +import ( + "errors" + + "golang.org/x/sys/windows" +) + +// event represents auto-reset, initially non-signaled Windows event. +// It is used to communicate between go and asm parts of this package. +type event struct { + h windows.Handle +} + +func newEvent() (*event, error) { + h, err := windows.CreateEvent(nil, 0, 0, nil) + if err != nil { + return nil, err + } + return &event{h: h}, nil +} + +func (e *event) Close() error { + return windows.CloseHandle(e.h) +} + +func (e *event) Set() error { + return windows.SetEvent(e.h) +} + +func (e *event) Wait() error { + s, err := windows.WaitForSingleObject(e.h, windows.INFINITE) + switch s { + case windows.WAIT_OBJECT_0: + break + case windows.WAIT_FAILED: + return err + default: + return errors.New("unexpected result from WaitForSingleObject") + } + return nil +} diff --git a/vendor/golang.org/x/sys/windows/svc/go12.c b/vendor/golang.org/x/sys/windows/svc/go12.c new file mode 100644 index 000000000..6f1be1fa3 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/go12.c @@ -0,0 +1,24 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows +// +build !go1.3 + +// copied from pkg/runtime +typedef unsigned int uint32; +typedef unsigned long long int uint64; +#ifdef _64BIT +typedef uint64 uintptr; +#else +typedef uint32 uintptr; +#endif + +// from sys_386.s or sys_amd64.s +void ·servicemain(void); + +void +·getServiceMain(uintptr *r) +{ + *r = (uintptr)·servicemain; +} diff --git a/vendor/golang.org/x/sys/windows/svc/go12.go b/vendor/golang.org/x/sys/windows/svc/go12.go new file mode 100644 index 000000000..6f0a924ea --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/go12.go @@ -0,0 +1,11 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows +// +build !go1.3 + +package svc + +// from go12.c +func getServiceMain(r *uintptr) diff --git a/vendor/golang.org/x/sys/windows/svc/go13.go b/vendor/golang.org/x/sys/windows/svc/go13.go new file mode 100644 index 000000000..432a9e796 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/go13.go @@ -0,0 +1,31 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows +// +build go1.3 + +package svc + +import "unsafe" + +const ptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const + +// Should be a built-in for unsafe.Pointer? +func add(p unsafe.Pointer, x uintptr) unsafe.Pointer { + return unsafe.Pointer(uintptr(p) + x) +} + +// funcPC returns the entry PC of the function f. +// It assumes that f is a func value. Otherwise the behavior is undefined. +func funcPC(f interface{}) uintptr { + return **(**uintptr)(add(unsafe.Pointer(&f), ptrSize)) +} + +// from sys_386.s and sys_amd64.s +func servicectlhandler(ctl uint32) uintptr +func servicemain(argc uint32, argv **uint16) + +func getServiceMain(r *uintptr) { + *r = funcPC(servicemain) +} diff --git a/vendor/golang.org/x/sys/windows/svc/security.go b/vendor/golang.org/x/sys/windows/svc/security.go new file mode 100644 index 000000000..6fbc9236e --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/security.go @@ -0,0 +1,62 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +package svc + +import ( + "unsafe" + + "golang.org/x/sys/windows" +) + +func allocSid(subAuth0 uint32) (*windows.SID, error) { + var sid *windows.SID + err := windows.AllocateAndInitializeSid(&windows.SECURITY_NT_AUTHORITY, + 1, subAuth0, 0, 0, 0, 0, 0, 0, 0, &sid) + if err != nil { + return nil, err + } + return sid, nil +} + +// IsAnInteractiveSession determines if calling process is running interactively. +// It queries the process token for membership in the Interactive group. +// http://stackoverflow.com/questions/2668851/how-do-i-detect-that-my-application-is-running-as-service-or-in-an-interactive-s +func IsAnInteractiveSession() (bool, error) { + interSid, err := allocSid(windows.SECURITY_INTERACTIVE_RID) + if err != nil { + return false, err + } + defer windows.FreeSid(interSid) + + serviceSid, err := allocSid(windows.SECURITY_SERVICE_RID) + if err != nil { + return false, err + } + defer windows.FreeSid(serviceSid) + + t, err := windows.OpenCurrentProcessToken() + if err != nil { + return false, err + } + defer t.Close() + + gs, err := t.GetTokenGroups() + if err != nil { + return false, err + } + p := unsafe.Pointer(&gs.Groups[0]) + groups := (*[2 << 20]windows.SIDAndAttributes)(p)[:gs.GroupCount] + for _, g := range groups { + if windows.EqualSid(g.Sid, interSid) { + return true, nil + } + if windows.EqualSid(g.Sid, serviceSid) { + return false, nil + } + } + return false, nil +} diff --git a/vendor/golang.org/x/sys/windows/svc/service.go b/vendor/golang.org/x/sys/windows/svc/service.go new file mode 100644 index 000000000..9864f7a72 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/service.go @@ -0,0 +1,316 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +// Package svc provides everything required to build Windows service. +// +package svc + +import ( + "errors" + "runtime" + "syscall" + "unsafe" + + "golang.org/x/sys/windows" +) + +// State describes service execution state (Stopped, Running and so on). +type State uint32 + +const ( + Stopped = State(windows.SERVICE_STOPPED) + StartPending = State(windows.SERVICE_START_PENDING) + StopPending = State(windows.SERVICE_STOP_PENDING) + Running = State(windows.SERVICE_RUNNING) + ContinuePending = State(windows.SERVICE_CONTINUE_PENDING) + PausePending = State(windows.SERVICE_PAUSE_PENDING) + Paused = State(windows.SERVICE_PAUSED) +) + +// Cmd represents service state change request. It is sent to a service +// by the service manager, and should be actioned upon by the service. +type Cmd uint32 + +const ( + Stop = Cmd(windows.SERVICE_CONTROL_STOP) + Pause = Cmd(windows.SERVICE_CONTROL_PAUSE) + Continue = Cmd(windows.SERVICE_CONTROL_CONTINUE) + Interrogate = Cmd(windows.SERVICE_CONTROL_INTERROGATE) + Shutdown = Cmd(windows.SERVICE_CONTROL_SHUTDOWN) +) + +// Accepted is used to describe commands accepted by the service. +// Note that Interrogate is always accepted. +type Accepted uint32 + +const ( + AcceptStop = Accepted(windows.SERVICE_ACCEPT_STOP) + AcceptShutdown = Accepted(windows.SERVICE_ACCEPT_SHUTDOWN) + AcceptPauseAndContinue = Accepted(windows.SERVICE_ACCEPT_PAUSE_CONTINUE) +) + +// Status combines State and Accepted commands to fully describe running service. +type Status struct { + State State + Accepts Accepted + CheckPoint uint32 // used to report progress during a lengthy operation + WaitHint uint32 // estimated time required for a pending operation, in milliseconds +} + +// ChangeRequest is sent to the service Handler to request service status change. +type ChangeRequest struct { + Cmd Cmd + CurrentStatus Status +} + +// Handler is the interface that must be implemented to build Windows service. +type Handler interface { + + // Execute will be called by the package code at the start of + // the service, and the service will exit once Execute completes. + // Inside Execute you must read service change requests from r and + // act accordingly. You must keep service control manager up to date + // about state of your service by writing into s as required. + // args contains service name followed by argument strings passed + // to the service. + // You can provide service exit code in exitCode return parameter, + // with 0 being "no error". You can also indicate if exit code, + // if any, is service specific or not by using svcSpecificEC + // parameter. + Execute(args []string, r <-chan ChangeRequest, s chan<- Status) (svcSpecificEC bool, exitCode uint32) +} + +var ( + // These are used by asm code. + goWaitsH uintptr + cWaitsH uintptr + ssHandle uintptr + sName *uint16 + sArgc uintptr + sArgv **uint16 + ctlHandlerProc uintptr + cSetEvent uintptr + cWaitForSingleObject uintptr + cRegisterServiceCtrlHandlerW uintptr +) + +func init() { + k := syscall.MustLoadDLL("kernel32.dll") + cSetEvent = k.MustFindProc("SetEvent").Addr() + cWaitForSingleObject = k.MustFindProc("WaitForSingleObject").Addr() + a := syscall.MustLoadDLL("advapi32.dll") + cRegisterServiceCtrlHandlerW = a.MustFindProc("RegisterServiceCtrlHandlerW").Addr() +} + +type ctlEvent struct { + cmd Cmd + errno uint32 +} + +// service provides access to windows service api. +type service struct { + name string + h windows.Handle + cWaits *event + goWaits *event + c chan ctlEvent + handler Handler +} + +func newService(name string, handler Handler) (*service, error) { + var s service + var err error + s.name = name + s.c = make(chan ctlEvent) + s.handler = handler + s.cWaits, err = newEvent() + if err != nil { + return nil, err + } + s.goWaits, err = newEvent() + if err != nil { + s.cWaits.Close() + return nil, err + } + return &s, nil +} + +func (s *service) close() error { + s.cWaits.Close() + s.goWaits.Close() + return nil +} + +type exitCode struct { + isSvcSpecific bool + errno uint32 +} + +func (s *service) updateStatus(status *Status, ec *exitCode) error { + if s.h == 0 { + return errors.New("updateStatus with no service status handle") + } + var t windows.SERVICE_STATUS + t.ServiceType = windows.SERVICE_WIN32_OWN_PROCESS + t.CurrentState = uint32(status.State) + if status.Accepts&AcceptStop != 0 { + t.ControlsAccepted |= windows.SERVICE_ACCEPT_STOP + } + if status.Accepts&AcceptShutdown != 0 { + t.ControlsAccepted |= windows.SERVICE_ACCEPT_SHUTDOWN + } + if status.Accepts&AcceptPauseAndContinue != 0 { + t.ControlsAccepted |= windows.SERVICE_ACCEPT_PAUSE_CONTINUE + } + if ec.errno == 0 { + t.Win32ExitCode = windows.NO_ERROR + t.ServiceSpecificExitCode = windows.NO_ERROR + } else if ec.isSvcSpecific { + t.Win32ExitCode = uint32(windows.ERROR_SERVICE_SPECIFIC_ERROR) + t.ServiceSpecificExitCode = ec.errno + } else { + t.Win32ExitCode = ec.errno + t.ServiceSpecificExitCode = windows.NO_ERROR + } + t.CheckPoint = status.CheckPoint + t.WaitHint = status.WaitHint + return windows.SetServiceStatus(s.h, &t) +} + +const ( + sysErrSetServiceStatusFailed = uint32(syscall.APPLICATION_ERROR) + iota + sysErrNewThreadInCallback +) + +func (s *service) run() { + s.goWaits.Wait() + s.h = windows.Handle(ssHandle) + argv := (*[100]*int16)(unsafe.Pointer(sArgv))[:sArgc] + args := make([]string, len(argv)) + for i, a := range argv { + args[i] = syscall.UTF16ToString((*[1 << 20]uint16)(unsafe.Pointer(a))[:]) + } + + cmdsToHandler := make(chan ChangeRequest) + changesFromHandler := make(chan Status) + exitFromHandler := make(chan exitCode) + + go func() { + ss, errno := s.handler.Execute(args, cmdsToHandler, changesFromHandler) + exitFromHandler <- exitCode{ss, errno} + }() + + status := Status{State: Stopped} + ec := exitCode{isSvcSpecific: true, errno: 0} + var outch chan ChangeRequest + inch := s.c + var cmd Cmd +loop: + for { + select { + case r := <-inch: + if r.errno != 0 { + ec.errno = r.errno + break loop + } + inch = nil + outch = cmdsToHandler + cmd = r.cmd + case outch <- ChangeRequest{cmd, status}: + inch = s.c + outch = nil + case c := <-changesFromHandler: + err := s.updateStatus(&c, &ec) + if err != nil { + // best suitable error number + ec.errno = sysErrSetServiceStatusFailed + if err2, ok := err.(syscall.Errno); ok { + ec.errno = uint32(err2) + } + break loop + } + status = c + case ec = <-exitFromHandler: + break loop + } + } + + s.updateStatus(&Status{State: Stopped}, &ec) + s.cWaits.Set() +} + +func newCallback(fn interface{}) (cb uintptr, err error) { + defer func() { + r := recover() + if r == nil { + return + } + cb = 0 + switch v := r.(type) { + case string: + err = errors.New(v) + case error: + err = v + default: + err = errors.New("unexpected panic in syscall.NewCallback") + } + }() + return syscall.NewCallback(fn), nil +} + +// BUG(brainman): There is no mechanism to run multiple services +// inside one single executable. Perhaps, it can be overcome by +// using RegisterServiceCtrlHandlerEx Windows api. + +// Run executes service name by calling appropriate handler function. +func Run(name string, handler Handler) error { + runtime.LockOSThread() + + tid := windows.GetCurrentThreadId() + + s, err := newService(name, handler) + if err != nil { + return err + } + + ctlHandler := func(ctl uint32) uintptr { + e := ctlEvent{cmd: Cmd(ctl)} + // We assume that this callback function is running on + // the same thread as Run. Nowhere in MS documentation + // I could find statement to guarantee that. So putting + // check here to verify, otherwise things will go bad + // quickly, if ignored. + i := windows.GetCurrentThreadId() + if i != tid { + e.errno = sysErrNewThreadInCallback + } + s.c <- e + return 0 + } + + var svcmain uintptr + getServiceMain(&svcmain) + t := []windows.SERVICE_TABLE_ENTRY{ + {syscall.StringToUTF16Ptr(s.name), svcmain}, + {nil, 0}, + } + + goWaitsH = uintptr(s.goWaits.h) + cWaitsH = uintptr(s.cWaits.h) + sName = t[0].ServiceName + ctlHandlerProc, err = newCallback(ctlHandler) + if err != nil { + return err + } + + go s.run() + + err = windows.StartServiceCtrlDispatcher(&t[0]) + if err != nil { + return err + } + return nil +} diff --git a/vendor/golang.org/x/sys/windows/svc/sys_386.s b/vendor/golang.org/x/sys/windows/svc/sys_386.s new file mode 100644 index 000000000..5e11bfadb --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/sys_386.s @@ -0,0 +1,67 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +// func servicemain(argc uint32, argv **uint16) +TEXT ·servicemain(SB),7,$0 + MOVL argc+0(FP), AX + MOVL AX, ·sArgc(SB) + MOVL argv+4(FP), AX + MOVL AX, ·sArgv(SB) + + PUSHL BP + PUSHL BX + PUSHL SI + PUSHL DI + + SUBL $12, SP + + MOVL ·sName(SB), AX + MOVL AX, (SP) + MOVL $·servicectlhandler(SB), AX + MOVL AX, 4(SP) + MOVL ·cRegisterServiceCtrlHandlerW(SB), AX + MOVL SP, BP + CALL AX + MOVL BP, SP + CMPL AX, $0 + JE exit + MOVL AX, ·ssHandle(SB) + + MOVL ·goWaitsH(SB), AX + MOVL AX, (SP) + MOVL ·cSetEvent(SB), AX + MOVL SP, BP + CALL AX + MOVL BP, SP + + MOVL ·cWaitsH(SB), AX + MOVL AX, (SP) + MOVL $-1, AX + MOVL AX, 4(SP) + MOVL ·cWaitForSingleObject(SB), AX + MOVL SP, BP + CALL AX + MOVL BP, SP + +exit: + ADDL $12, SP + + POPL DI + POPL SI + POPL BX + POPL BP + + MOVL 0(SP), CX + ADDL $12, SP + JMP CX + +// I do not know why, but this seems to be the only way to call +// ctlHandlerProc on Windows 7. + +// func servicectlhandler(ctl uint32) uintptr +TEXT ·servicectlhandler(SB),7,$0 + MOVL ·ctlHandlerProc(SB), CX + JMP CX diff --git a/vendor/golang.org/x/sys/windows/svc/sys_amd64.s b/vendor/golang.org/x/sys/windows/svc/sys_amd64.s new file mode 100644 index 000000000..87dbec839 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/svc/sys_amd64.s @@ -0,0 +1,41 @@ +// Copyright 2012 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +// func servicemain(argc uint32, argv **uint16) +TEXT ·servicemain(SB),7,$0 + MOVL CX, ·sArgc(SB) + MOVL DX, ·sArgv(SB) + + SUBQ $32, SP // stack for the first 4 syscall params + + MOVQ ·sName(SB), CX + MOVQ $·servicectlhandler(SB), DX + MOVQ ·cRegisterServiceCtrlHandlerW(SB), AX + CALL AX + CMPQ AX, $0 + JE exit + MOVQ AX, ·ssHandle(SB) + + MOVQ ·goWaitsH(SB), CX + MOVQ ·cSetEvent(SB), AX + CALL AX + + MOVQ ·cWaitsH(SB), CX + MOVQ $4294967295, DX + MOVQ ·cWaitForSingleObject(SB), AX + CALL AX + +exit: + ADDQ $32, SP + RET + +// I do not know why, but this seems to be the only way to call +// ctlHandlerProc on Windows 7. + +// func servicectlhandler(ctl uint32) uintptr +TEXT ·servicectlhandler(SB),7,$0 + MOVQ ·ctlHandlerProc(SB), AX + JMP AX diff --git a/vendor/golang.org/x/sys/windows/syscall.go b/vendor/golang.org/x/sys/windows/syscall.go new file mode 100644 index 000000000..4e2fbe86e --- /dev/null +++ b/vendor/golang.org/x/sys/windows/syscall.go @@ -0,0 +1,71 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build windows + +// Package windows contains an interface to the low-level operating system +// primitives. OS details vary depending on the underlying system, and +// by default, godoc will display the OS-specific documentation for the current +// system. If you want godoc to display syscall documentation for another +// system, set $GOOS and $GOARCH to the desired system. For example, if +// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS +// to freebsd and $GOARCH to arm. +// The primary use of this package is inside other packages that provide a more +// portable interface to the system, such as "os", "time" and "net". Use +// those packages rather than this one if you can. +// For details of the functions and data types in this package consult +// the manuals for the appropriate operating system. +// These calls return err == nil to indicate success; otherwise +// err represents an operating system error describing the failure and +// holds a value of type syscall.Errno. +package windows // import "golang.org/x/sys/windows" + +import ( + "syscall" +) + +// ByteSliceFromString returns a NUL-terminated slice of bytes +// containing the text of s. If s contains a NUL byte at any +// location, it returns (nil, syscall.EINVAL). +func ByteSliceFromString(s string) ([]byte, error) { + for i := 0; i < len(s); i++ { + if s[i] == 0 { + return nil, syscall.EINVAL + } + } + a := make([]byte, len(s)+1) + copy(a, s) + return a, nil +} + +// BytePtrFromString returns a pointer to a NUL-terminated array of +// bytes containing the text of s. If s contains a NUL byte at any +// location, it returns (nil, syscall.EINVAL). +func BytePtrFromString(s string) (*byte, error) { + a, err := ByteSliceFromString(s) + if err != nil { + return nil, err + } + return &a[0], nil +} + +// Single-word zero for use when we need a valid pointer to 0 bytes. +// See mksyscall.pl. +var _zero uintptr + +func (ts *Timespec) Unix() (sec int64, nsec int64) { + return int64(ts.Sec), int64(ts.Nsec) +} + +func (tv *Timeval) Unix() (sec int64, nsec int64) { + return int64(tv.Sec), int64(tv.Usec) * 1000 +} + +func (ts *Timespec) Nano() int64 { + return int64(ts.Sec)*1e9 + int64(ts.Nsec) +} + +func (tv *Timeval) Nano() int64 { + return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000 +} diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go new file mode 100644 index 000000000..592d73e03 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -0,0 +1,989 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Windows system calls. + +package windows + +import ( + errorspkg "errors" + "sync" + "syscall" + "unicode/utf16" + "unsafe" +) + +type Handle uintptr + +const InvalidHandle = ^Handle(0) + +// StringToUTF16 is deprecated. Use UTF16FromString instead. +// If s contains a NUL byte this function panics instead of +// returning an error. +func StringToUTF16(s string) []uint16 { + a, err := UTF16FromString(s) + if err != nil { + panic("windows: string with NUL passed to StringToUTF16") + } + return a +} + +// UTF16FromString returns the UTF-16 encoding of the UTF-8 string +// s, with a terminating NUL added. If s contains a NUL byte at any +// location, it returns (nil, syscall.EINVAL). +func UTF16FromString(s string) ([]uint16, error) { + for i := 0; i < len(s); i++ { + if s[i] == 0 { + return nil, syscall.EINVAL + } + } + return utf16.Encode([]rune(s + "\x00")), nil +} + +// UTF16ToString returns the UTF-8 encoding of the UTF-16 sequence s, +// with a terminating NUL removed. +func UTF16ToString(s []uint16) string { + for i, v := range s { + if v == 0 { + s = s[0:i] + break + } + } + return string(utf16.Decode(s)) +} + +// StringToUTF16Ptr is deprecated. Use UTF16PtrFromString instead. +// If s contains a NUL byte this function panics instead of +// returning an error. +func StringToUTF16Ptr(s string) *uint16 { return &StringToUTF16(s)[0] } + +// UTF16PtrFromString returns pointer to the UTF-16 encoding of +// the UTF-8 string s, with a terminating NUL added. If s +// contains a NUL byte at any location, it returns (nil, syscall.EINVAL). +func UTF16PtrFromString(s string) (*uint16, error) { + a, err := UTF16FromString(s) + if err != nil { + return nil, err + } + return &a[0], nil +} + +func Getpagesize() int { return 4096 } + +// Converts a Go function to a function pointer conforming +// to the stdcall or cdecl calling convention. This is useful when +// interoperating with Windows code requiring callbacks. +// Implemented in runtime/syscall_windows.goc +func NewCallback(fn interface{}) uintptr +func NewCallbackCDecl(fn interface{}) uintptr + +// windows api calls + +//sys GetLastError() (lasterr error) +//sys LoadLibrary(libname string) (handle Handle, err error) = LoadLibraryW +//sys LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, err error) = LoadLibraryExW +//sys FreeLibrary(handle Handle) (err error) +//sys GetProcAddress(module Handle, procname string) (proc uintptr, err error) +//sys GetVersion() (ver uint32, err error) +//sys FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) = FormatMessageW +//sys ExitProcess(exitcode uint32) +//sys CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) [failretval==InvalidHandle] = CreateFileW +//sys ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) +//sys WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) +//sys SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) [failretval==0xffffffff] +//sys CloseHandle(handle Handle) (err error) +//sys GetStdHandle(stdhandle int) (handle Handle, err error) [failretval==InvalidHandle] +//sys findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) [failretval==InvalidHandle] = FindFirstFileW +//sys findNextFile1(handle Handle, data *win32finddata1) (err error) = FindNextFileW +//sys FindClose(handle Handle) (err error) +//sys GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error) +//sys GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) = GetCurrentDirectoryW +//sys SetCurrentDirectory(path *uint16) (err error) = SetCurrentDirectoryW +//sys CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) = CreateDirectoryW +//sys RemoveDirectory(path *uint16) (err error) = RemoveDirectoryW +//sys DeleteFile(path *uint16) (err error) = DeleteFileW +//sys MoveFile(from *uint16, to *uint16) (err error) = MoveFileW +//sys MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) = MoveFileExW +//sys GetComputerName(buf *uint16, n *uint32) (err error) = GetComputerNameW +//sys GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) = GetComputerNameExW +//sys SetEndOfFile(handle Handle) (err error) +//sys GetSystemTimeAsFileTime(time *Filetime) +//sys GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) [failretval==0xffffffff] +//sys CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error) +//sys GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error) +//sys PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error) +//sys CancelIo(s Handle) (err error) +//sys CancelIoEx(s Handle, o *Overlapped) (err error) +//sys CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) = CreateProcessW +//sys OpenProcess(da uint32, inheritHandle bool, pid uint32) (handle Handle, err error) +//sys TerminateProcess(handle Handle, exitcode uint32) (err error) +//sys GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) +//sys GetStartupInfo(startupInfo *StartupInfo) (err error) = GetStartupInfoW +//sys GetCurrentProcess() (pseudoHandle Handle, err error) +//sys GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) +//sys DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error) +//sys WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) [failretval==0xffffffff] +//sys GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) = GetTempPathW +//sys CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error) +//sys GetFileType(filehandle Handle) (n uint32, err error) +//sys CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) = advapi32.CryptAcquireContextW +//sys CryptReleaseContext(provhandle Handle, flags uint32) (err error) = advapi32.CryptReleaseContext +//sys CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) = advapi32.CryptGenRandom +//sys GetEnvironmentStrings() (envs *uint16, err error) [failretval==nil] = kernel32.GetEnvironmentStringsW +//sys FreeEnvironmentStrings(envs *uint16) (err error) = kernel32.FreeEnvironmentStringsW +//sys GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) = kernel32.GetEnvironmentVariableW +//sys SetEnvironmentVariable(name *uint16, value *uint16) (err error) = kernel32.SetEnvironmentVariableW +//sys SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) +//sys GetFileAttributes(name *uint16) (attrs uint32, err error) [failretval==INVALID_FILE_ATTRIBUTES] = kernel32.GetFileAttributesW +//sys SetFileAttributes(name *uint16, attrs uint32) (err error) = kernel32.SetFileAttributesW +//sys GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) = kernel32.GetFileAttributesExW +//sys GetCommandLine() (cmd *uint16) = kernel32.GetCommandLineW +//sys CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) [failretval==nil] = shell32.CommandLineToArgvW +//sys LocalFree(hmem Handle) (handle Handle, err error) [failretval!=0] +//sys SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) +//sys FlushFileBuffers(handle Handle) (err error) +//sys GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) = kernel32.GetFullPathNameW +//sys GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) = kernel32.GetLongPathNameW +//sys GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) = kernel32.GetShortPathNameW +//sys CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) = kernel32.CreateFileMappingW +//sys MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) +//sys UnmapViewOfFile(addr uintptr) (err error) +//sys FlushViewOfFile(addr uintptr, length uintptr) (err error) +//sys VirtualLock(addr uintptr, length uintptr) (err error) +//sys VirtualUnlock(addr uintptr, length uintptr) (err error) +//sys TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) = mswsock.TransmitFile +//sys ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) = kernel32.ReadDirectoryChangesW +//sys CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) = crypt32.CertOpenSystemStoreW +//sys CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) [failretval==InvalidHandle] = crypt32.CertOpenStore +//sys CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) [failretval==nil] = crypt32.CertEnumCertificatesInStore +//sys CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) = crypt32.CertAddCertificateContextToStore +//sys CertCloseStore(store Handle, flags uint32) (err error) = crypt32.CertCloseStore +//sys CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) = crypt32.CertGetCertificateChain +//sys CertFreeCertificateChain(ctx *CertChainContext) = crypt32.CertFreeCertificateChain +//sys CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) [failretval==nil] = crypt32.CertCreateCertificateContext +//sys CertFreeCertificateContext(ctx *CertContext) (err error) = crypt32.CertFreeCertificateContext +//sys CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) = crypt32.CertVerifyCertificateChainPolicy +//sys RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) = advapi32.RegOpenKeyExW +//sys RegCloseKey(key Handle) (regerrno error) = advapi32.RegCloseKey +//sys RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegQueryInfoKeyW +//sys RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) = advapi32.RegEnumKeyExW +//sys RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) = advapi32.RegQueryValueExW +//sys getCurrentProcessId() (pid uint32) = kernel32.GetCurrentProcessId +//sys GetConsoleMode(console Handle, mode *uint32) (err error) = kernel32.GetConsoleMode +//sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW +//sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW +//sys CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) [failretval==InvalidHandle] = kernel32.CreateToolhelp32Snapshot +//sys Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32FirstW +//sys Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) = kernel32.Process32NextW +//sys DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBufferSize uint32, outBuffer *byte, outBufferSize uint32, bytesReturned *uint32, overlapped *Overlapped) (err error) +// This function returns 1 byte BOOLEAN rather than the 4 byte BOOL. +//sys CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) [failretval&0xff==0] = CreateSymbolicLinkW +//sys CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) [failretval&0xff==0] = CreateHardLinkW +//sys GetCurrentThreadId() (id uint32) +//sys CreateEvent(eventAttrs *syscall.SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) = kernel32.CreateEventW +//sys SetEvent(event Handle) (err error) = kernel32.SetEvent + +// syscall interface implementation for other packages + +func Exit(code int) { ExitProcess(uint32(code)) } + +func makeInheritSa() *SecurityAttributes { + var sa SecurityAttributes + sa.Length = uint32(unsafe.Sizeof(sa)) + sa.InheritHandle = 1 + return &sa +} + +func Open(path string, mode int, perm uint32) (fd Handle, err error) { + if len(path) == 0 { + return InvalidHandle, ERROR_FILE_NOT_FOUND + } + pathp, err := UTF16PtrFromString(path) + if err != nil { + return InvalidHandle, err + } + var access uint32 + switch mode & (O_RDONLY | O_WRONLY | O_RDWR) { + case O_RDONLY: + access = GENERIC_READ + case O_WRONLY: + access = GENERIC_WRITE + case O_RDWR: + access = GENERIC_READ | GENERIC_WRITE + } + if mode&O_CREAT != 0 { + access |= GENERIC_WRITE + } + if mode&O_APPEND != 0 { + access &^= GENERIC_WRITE + access |= FILE_APPEND_DATA + } + sharemode := uint32(FILE_SHARE_READ | FILE_SHARE_WRITE) + var sa *SecurityAttributes + if mode&O_CLOEXEC == 0 { + sa = makeInheritSa() + } + var createmode uint32 + switch { + case mode&(O_CREAT|O_EXCL) == (O_CREAT | O_EXCL): + createmode = CREATE_NEW + case mode&(O_CREAT|O_TRUNC) == (O_CREAT | O_TRUNC): + createmode = CREATE_ALWAYS + case mode&O_CREAT == O_CREAT: + createmode = OPEN_ALWAYS + case mode&O_TRUNC == O_TRUNC: + createmode = TRUNCATE_EXISTING + default: + createmode = OPEN_EXISTING + } + h, e := CreateFile(pathp, access, sharemode, sa, createmode, FILE_ATTRIBUTE_NORMAL, 0) + return h, e +} + +func Read(fd Handle, p []byte) (n int, err error) { + var done uint32 + e := ReadFile(fd, p, &done, nil) + if e != nil { + if e == ERROR_BROKEN_PIPE { + // NOTE(brainman): work around ERROR_BROKEN_PIPE is returned on reading EOF from stdin + return 0, nil + } + return 0, e + } + if raceenabled { + if done > 0 { + raceWriteRange(unsafe.Pointer(&p[0]), int(done)) + } + raceAcquire(unsafe.Pointer(&ioSync)) + } + return int(done), nil +} + +func Write(fd Handle, p []byte) (n int, err error) { + if raceenabled { + raceReleaseMerge(unsafe.Pointer(&ioSync)) + } + var done uint32 + e := WriteFile(fd, p, &done, nil) + if e != nil { + return 0, e + } + if raceenabled && done > 0 { + raceReadRange(unsafe.Pointer(&p[0]), int(done)) + } + return int(done), nil +} + +var ioSync int64 + +func Seek(fd Handle, offset int64, whence int) (newoffset int64, err error) { + var w uint32 + switch whence { + case 0: + w = FILE_BEGIN + case 1: + w = FILE_CURRENT + case 2: + w = FILE_END + } + hi := int32(offset >> 32) + lo := int32(offset) + // use GetFileType to check pipe, pipe can't do seek + ft, _ := GetFileType(fd) + if ft == FILE_TYPE_PIPE { + return 0, syscall.EPIPE + } + rlo, e := SetFilePointer(fd, lo, &hi, w) + if e != nil { + return 0, e + } + return int64(hi)<<32 + int64(rlo), nil +} + +func Close(fd Handle) (err error) { + return CloseHandle(fd) +} + +var ( + Stdin = getStdHandle(STD_INPUT_HANDLE) + Stdout = getStdHandle(STD_OUTPUT_HANDLE) + Stderr = getStdHandle(STD_ERROR_HANDLE) +) + +func getStdHandle(h int) (fd Handle) { + r, _ := GetStdHandle(h) + CloseOnExec(r) + return r +} + +const ImplementsGetwd = true + +func Getwd() (wd string, err error) { + b := make([]uint16, 300) + n, e := GetCurrentDirectory(uint32(len(b)), &b[0]) + if e != nil { + return "", e + } + return string(utf16.Decode(b[0:n])), nil +} + +func Chdir(path string) (err error) { + pathp, err := UTF16PtrFromString(path) + if err != nil { + return err + } + return SetCurrentDirectory(pathp) +} + +func Mkdir(path string, mode uint32) (err error) { + pathp, err := UTF16PtrFromString(path) + if err != nil { + return err + } + return CreateDirectory(pathp, nil) +} + +func Rmdir(path string) (err error) { + pathp, err := UTF16PtrFromString(path) + if err != nil { + return err + } + return RemoveDirectory(pathp) +} + +func Unlink(path string) (err error) { + pathp, err := UTF16PtrFromString(path) + if err != nil { + return err + } + return DeleteFile(pathp) +} + +func Rename(oldpath, newpath string) (err error) { + from, err := UTF16PtrFromString(oldpath) + if err != nil { + return err + } + to, err := UTF16PtrFromString(newpath) + if err != nil { + return err + } + return MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING) +} + +func ComputerName() (name string, err error) { + var n uint32 = MAX_COMPUTERNAME_LENGTH + 1 + b := make([]uint16, n) + e := GetComputerName(&b[0], &n) + if e != nil { + return "", e + } + return string(utf16.Decode(b[0:n])), nil +} + +func Ftruncate(fd Handle, length int64) (err error) { + curoffset, e := Seek(fd, 0, 1) + if e != nil { + return e + } + defer Seek(fd, curoffset, 0) + _, e = Seek(fd, length, 0) + if e != nil { + return e + } + e = SetEndOfFile(fd) + if e != nil { + return e + } + return nil +} + +func Gettimeofday(tv *Timeval) (err error) { + var ft Filetime + GetSystemTimeAsFileTime(&ft) + *tv = NsecToTimeval(ft.Nanoseconds()) + return nil +} + +func Pipe(p []Handle) (err error) { + if len(p) != 2 { + return syscall.EINVAL + } + var r, w Handle + e := CreatePipe(&r, &w, makeInheritSa(), 0) + if e != nil { + return e + } + p[0] = r + p[1] = w + return nil +} + +func Utimes(path string, tv []Timeval) (err error) { + if len(tv) != 2 { + return syscall.EINVAL + } + pathp, e := UTF16PtrFromString(path) + if e != nil { + return e + } + h, e := CreateFile(pathp, + FILE_WRITE_ATTRIBUTES, FILE_SHARE_WRITE, nil, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0) + if e != nil { + return e + } + defer Close(h) + a := NsecToFiletime(tv[0].Nanoseconds()) + w := NsecToFiletime(tv[1].Nanoseconds()) + return SetFileTime(h, nil, &a, &w) +} + +func UtimesNano(path string, ts []Timespec) (err error) { + if len(ts) != 2 { + return syscall.EINVAL + } + pathp, e := UTF16PtrFromString(path) + if e != nil { + return e + } + h, e := CreateFile(pathp, + FILE_WRITE_ATTRIBUTES, FILE_SHARE_WRITE, nil, + OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0) + if e != nil { + return e + } + defer Close(h) + a := NsecToFiletime(TimespecToNsec(ts[0])) + w := NsecToFiletime(TimespecToNsec(ts[1])) + return SetFileTime(h, nil, &a, &w) +} + +func Fsync(fd Handle) (err error) { + return FlushFileBuffers(fd) +} + +func Chmod(path string, mode uint32) (err error) { + if mode == 0 { + return syscall.EINVAL + } + p, e := UTF16PtrFromString(path) + if e != nil { + return e + } + attrs, e := GetFileAttributes(p) + if e != nil { + return e + } + if mode&S_IWRITE != 0 { + attrs &^= FILE_ATTRIBUTE_READONLY + } else { + attrs |= FILE_ATTRIBUTE_READONLY + } + return SetFileAttributes(p, attrs) +} + +func LoadCancelIoEx() error { + return procCancelIoEx.Find() +} + +func LoadSetFileCompletionNotificationModes() error { + return procSetFileCompletionNotificationModes.Find() +} + +// net api calls + +const socket_error = uintptr(^uint32(0)) + +//sys WSAStartup(verreq uint32, data *WSAData) (sockerr error) = ws2_32.WSAStartup +//sys WSACleanup() (err error) [failretval==socket_error] = ws2_32.WSACleanup +//sys WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) [failretval==socket_error] = ws2_32.WSAIoctl +//sys socket(af int32, typ int32, protocol int32) (handle Handle, err error) [failretval==InvalidHandle] = ws2_32.socket +//sys Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) [failretval==socket_error] = ws2_32.setsockopt +//sys Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) [failretval==socket_error] = ws2_32.getsockopt +//sys bind(s Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socket_error] = ws2_32.bind +//sys connect(s Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socket_error] = ws2_32.connect +//sys getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) [failretval==socket_error] = ws2_32.getsockname +//sys getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) [failretval==socket_error] = ws2_32.getpeername +//sys listen(s Handle, backlog int32) (err error) [failretval==socket_error] = ws2_32.listen +//sys shutdown(s Handle, how int32) (err error) [failretval==socket_error] = ws2_32.shutdown +//sys Closesocket(s Handle) (err error) [failretval==socket_error] = ws2_32.closesocket +//sys AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) = mswsock.AcceptEx +//sys GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) = mswsock.GetAcceptExSockaddrs +//sys WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecv +//sys WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASend +//sys WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSARecvFrom +//sys WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) [failretval==socket_error] = ws2_32.WSASendTo +//sys GetHostByName(name string) (h *Hostent, err error) [failretval==nil] = ws2_32.gethostbyname +//sys GetServByName(name string, proto string) (s *Servent, err error) [failretval==nil] = ws2_32.getservbyname +//sys Ntohs(netshort uint16) (u uint16) = ws2_32.ntohs +//sys GetProtoByName(name string) (p *Protoent, err error) [failretval==nil] = ws2_32.getprotobyname +//sys DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) = dnsapi.DnsQuery_W +//sys DnsRecordListFree(rl *DNSRecord, freetype uint32) = dnsapi.DnsRecordListFree +//sys DnsNameCompare(name1 *uint16, name2 *uint16) (same bool) = dnsapi.DnsNameCompare_W +//sys GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) = ws2_32.GetAddrInfoW +//sys FreeAddrInfoW(addrinfo *AddrinfoW) = ws2_32.FreeAddrInfoW +//sys GetIfEntry(pIfRow *MibIfRow) (errcode error) = iphlpapi.GetIfEntry +//sys GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) = iphlpapi.GetAdaptersInfo +//sys SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) = kernel32.SetFileCompletionNotificationModes +//sys WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) [failretval==-1] = ws2_32.WSAEnumProtocolsW +//sys GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) = iphlpapi.GetAdaptersAddresses +//sys GetACP() (acp uint32) = kernel32.GetACP +//sys MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) = kernel32.MultiByteToWideChar + +// For testing: clients can set this flag to force +// creation of IPv6 sockets to return EAFNOSUPPORT. +var SocketDisableIPv6 bool + +type RawSockaddrInet4 struct { + Family uint16 + Port uint16 + Addr [4]byte /* in_addr */ + Zero [8]uint8 +} + +type RawSockaddrInet6 struct { + Family uint16 + Port uint16 + Flowinfo uint32 + Addr [16]byte /* in6_addr */ + Scope_id uint32 +} + +type RawSockaddr struct { + Family uint16 + Data [14]int8 +} + +type RawSockaddrAny struct { + Addr RawSockaddr + Pad [96]int8 +} + +type Sockaddr interface { + sockaddr() (ptr unsafe.Pointer, len int32, err error) // lowercase; only we can define Sockaddrs +} + +type SockaddrInet4 struct { + Port int + Addr [4]byte + raw RawSockaddrInet4 +} + +func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, int32, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, syscall.EINVAL + } + sa.raw.Family = AF_INET + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil +} + +type SockaddrInet6 struct { + Port int + ZoneId uint32 + Addr [16]byte + raw RawSockaddrInet6 +} + +func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, int32, error) { + if sa.Port < 0 || sa.Port > 0xFFFF { + return nil, 0, syscall.EINVAL + } + sa.raw.Family = AF_INET6 + p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port)) + p[0] = byte(sa.Port >> 8) + p[1] = byte(sa.Port) + sa.raw.Scope_id = sa.ZoneId + for i := 0; i < len(sa.Addr); i++ { + sa.raw.Addr[i] = sa.Addr[i] + } + return unsafe.Pointer(&sa.raw), int32(unsafe.Sizeof(sa.raw)), nil +} + +type SockaddrUnix struct { + Name string +} + +func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, int32, error) { + // TODO(brainman): implement SockaddrUnix.sockaddr() + return nil, 0, syscall.EWINDOWS +} + +func (rsa *RawSockaddrAny) Sockaddr() (Sockaddr, error) { + switch rsa.Addr.Family { + case AF_UNIX: + return nil, syscall.EWINDOWS + + case AF_INET: + pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet4) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + + case AF_INET6: + pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa)) + sa := new(SockaddrInet6) + p := (*[2]byte)(unsafe.Pointer(&pp.Port)) + sa.Port = int(p[0])<<8 + int(p[1]) + sa.ZoneId = pp.Scope_id + for i := 0; i < len(sa.Addr); i++ { + sa.Addr[i] = pp.Addr[i] + } + return sa, nil + } + return nil, syscall.EAFNOSUPPORT +} + +func Socket(domain, typ, proto int) (fd Handle, err error) { + if domain == AF_INET6 && SocketDisableIPv6 { + return InvalidHandle, syscall.EAFNOSUPPORT + } + return socket(int32(domain), int32(typ), int32(proto)) +} + +func SetsockoptInt(fd Handle, level, opt int, value int) (err error) { + v := int32(value) + return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&v)), int32(unsafe.Sizeof(v))) +} + +func Bind(fd Handle, sa Sockaddr) (err error) { + ptr, n, err := sa.sockaddr() + if err != nil { + return err + } + return bind(fd, ptr, n) +} + +func Connect(fd Handle, sa Sockaddr) (err error) { + ptr, n, err := sa.sockaddr() + if err != nil { + return err + } + return connect(fd, ptr, n) +} + +func Getsockname(fd Handle) (sa Sockaddr, err error) { + var rsa RawSockaddrAny + l := int32(unsafe.Sizeof(rsa)) + if err = getsockname(fd, &rsa, &l); err != nil { + return + } + return rsa.Sockaddr() +} + +func Getpeername(fd Handle) (sa Sockaddr, err error) { + var rsa RawSockaddrAny + l := int32(unsafe.Sizeof(rsa)) + if err = getpeername(fd, &rsa, &l); err != nil { + return + } + return rsa.Sockaddr() +} + +func Listen(s Handle, n int) (err error) { + return listen(s, int32(n)) +} + +func Shutdown(fd Handle, how int) (err error) { + return shutdown(fd, int32(how)) +} + +func WSASendto(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to Sockaddr, overlapped *Overlapped, croutine *byte) (err error) { + rsa, l, err := to.sockaddr() + if err != nil { + return err + } + return WSASendTo(s, bufs, bufcnt, sent, flags, (*RawSockaddrAny)(unsafe.Pointer(rsa)), l, overlapped, croutine) +} + +func LoadGetAddrInfo() error { + return procGetAddrInfoW.Find() +} + +var connectExFunc struct { + once sync.Once + addr uintptr + err error +} + +func LoadConnectEx() error { + connectExFunc.once.Do(func() { + var s Handle + s, connectExFunc.err = Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) + if connectExFunc.err != nil { + return + } + defer CloseHandle(s) + var n uint32 + connectExFunc.err = WSAIoctl(s, + SIO_GET_EXTENSION_FUNCTION_POINTER, + (*byte)(unsafe.Pointer(&WSAID_CONNECTEX)), + uint32(unsafe.Sizeof(WSAID_CONNECTEX)), + (*byte)(unsafe.Pointer(&connectExFunc.addr)), + uint32(unsafe.Sizeof(connectExFunc.addr)), + &n, nil, 0) + }) + return connectExFunc.err +} + +func connectEx(s Handle, name unsafe.Pointer, namelen int32, sendBuf *byte, sendDataLen uint32, bytesSent *uint32, overlapped *Overlapped) (err error) { + r1, _, e1 := syscall.Syscall9(connectExFunc.addr, 7, uintptr(s), uintptr(name), uintptr(namelen), uintptr(unsafe.Pointer(sendBuf)), uintptr(sendDataLen), uintptr(unsafe.Pointer(bytesSent)), uintptr(unsafe.Pointer(overlapped)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ConnectEx(fd Handle, sa Sockaddr, sendBuf *byte, sendDataLen uint32, bytesSent *uint32, overlapped *Overlapped) error { + err := LoadConnectEx() + if err != nil { + return errorspkg.New("failed to find ConnectEx: " + err.Error()) + } + ptr, n, err := sa.sockaddr() + if err != nil { + return err + } + return connectEx(fd, ptr, n, sendBuf, sendDataLen, bytesSent, overlapped) +} + +// Invented structures to support what package os expects. +type Rusage struct { + CreationTime Filetime + ExitTime Filetime + KernelTime Filetime + UserTime Filetime +} + +type WaitStatus struct { + ExitCode uint32 +} + +func (w WaitStatus) Exited() bool { return true } + +func (w WaitStatus) ExitStatus() int { return int(w.ExitCode) } + +func (w WaitStatus) Signal() Signal { return -1 } + +func (w WaitStatus) CoreDump() bool { return false } + +func (w WaitStatus) Stopped() bool { return false } + +func (w WaitStatus) Continued() bool { return false } + +func (w WaitStatus) StopSignal() Signal { return -1 } + +func (w WaitStatus) Signaled() bool { return false } + +func (w WaitStatus) TrapCause() int { return -1 } + +// Timespec is an invented structure on Windows, but here for +// consistency with the corresponding package for other operating systems. +type Timespec struct { + Sec int64 + Nsec int64 +} + +func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) } + +func NsecToTimespec(nsec int64) (ts Timespec) { + ts.Sec = nsec / 1e9 + ts.Nsec = nsec % 1e9 + return +} + +// TODO(brainman): fix all needed for net + +func Accept(fd Handle) (nfd Handle, sa Sockaddr, err error) { return 0, nil, syscall.EWINDOWS } +func Recvfrom(fd Handle, p []byte, flags int) (n int, from Sockaddr, err error) { + return 0, nil, syscall.EWINDOWS +} +func Sendto(fd Handle, p []byte, flags int, to Sockaddr) (err error) { return syscall.EWINDOWS } +func SetsockoptTimeval(fd Handle, level, opt int, tv *Timeval) (err error) { return syscall.EWINDOWS } + +// The Linger struct is wrong but we only noticed after Go 1. +// sysLinger is the real system call structure. + +// BUG(brainman): The definition of Linger is not appropriate for direct use +// with Setsockopt and Getsockopt. +// Use SetsockoptLinger instead. + +type Linger struct { + Onoff int32 + Linger int32 +} + +type sysLinger struct { + Onoff uint16 + Linger uint16 +} + +type IPMreq struct { + Multiaddr [4]byte /* in_addr */ + Interface [4]byte /* in_addr */ +} + +type IPv6Mreq struct { + Multiaddr [16]byte /* in6_addr */ + Interface uint32 +} + +func GetsockoptInt(fd Handle, level, opt int) (int, error) { return -1, syscall.EWINDOWS } + +func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) { + sys := sysLinger{Onoff: uint16(l.Onoff), Linger: uint16(l.Linger)} + return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&sys)), int32(unsafe.Sizeof(sys))) +} + +func SetsockoptInet4Addr(fd Handle, level, opt int, value [4]byte) (err error) { + return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&value[0])), 4) +} +func SetsockoptIPMreq(fd Handle, level, opt int, mreq *IPMreq) (err error) { + return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(mreq)), int32(unsafe.Sizeof(*mreq))) +} +func SetsockoptIPv6Mreq(fd Handle, level, opt int, mreq *IPv6Mreq) (err error) { + return syscall.EWINDOWS +} + +func Getpid() (pid int) { return int(getCurrentProcessId()) } + +func FindFirstFile(name *uint16, data *Win32finddata) (handle Handle, err error) { + // NOTE(rsc): The Win32finddata struct is wrong for the system call: + // the two paths are each one uint16 short. Use the correct struct, + // a win32finddata1, and then copy the results out. + // There is no loss of expressivity here, because the final + // uint16, if it is used, is supposed to be a NUL, and Go doesn't need that. + // For Go 1.1, we might avoid the allocation of win32finddata1 here + // by adding a final Bug [2]uint16 field to the struct and then + // adjusting the fields in the result directly. + var data1 win32finddata1 + handle, err = findFirstFile1(name, &data1) + if err == nil { + copyFindData(data, &data1) + } + return +} + +func FindNextFile(handle Handle, data *Win32finddata) (err error) { + var data1 win32finddata1 + err = findNextFile1(handle, &data1) + if err == nil { + copyFindData(data, &data1) + } + return +} + +func getProcessEntry(pid int) (*ProcessEntry32, error) { + snapshot, err := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0) + if err != nil { + return nil, err + } + defer CloseHandle(snapshot) + var procEntry ProcessEntry32 + procEntry.Size = uint32(unsafe.Sizeof(procEntry)) + if err = Process32First(snapshot, &procEntry); err != nil { + return nil, err + } + for { + if procEntry.ProcessID == uint32(pid) { + return &procEntry, nil + } + err = Process32Next(snapshot, &procEntry) + if err != nil { + return nil, err + } + } +} + +func Getppid() (ppid int) { + pe, err := getProcessEntry(Getpid()) + if err != nil { + return -1 + } + return int(pe.ParentProcessID) +} + +// TODO(brainman): fix all needed for os +func Fchdir(fd Handle) (err error) { return syscall.EWINDOWS } +func Link(oldpath, newpath string) (err error) { return syscall.EWINDOWS } +func Symlink(path, link string) (err error) { return syscall.EWINDOWS } + +func Fchmod(fd Handle, mode uint32) (err error) { return syscall.EWINDOWS } +func Chown(path string, uid int, gid int) (err error) { return syscall.EWINDOWS } +func Lchown(path string, uid int, gid int) (err error) { return syscall.EWINDOWS } +func Fchown(fd Handle, uid int, gid int) (err error) { return syscall.EWINDOWS } + +func Getuid() (uid int) { return -1 } +func Geteuid() (euid int) { return -1 } +func Getgid() (gid int) { return -1 } +func Getegid() (egid int) { return -1 } +func Getgroups() (gids []int, err error) { return nil, syscall.EWINDOWS } + +type Signal int + +func (s Signal) Signal() {} + +func (s Signal) String() string { + if 0 <= s && int(s) < len(signals) { + str := signals[s] + if str != "" { + return str + } + } + return "signal " + itoa(int(s)) +} + +func LoadCreateSymbolicLink() error { + return procCreateSymbolicLinkW.Find() +} + +// Readlink returns the destination of the named symbolic link. +func Readlink(path string, buf []byte) (n int, err error) { + fd, err := CreateFile(StringToUTF16Ptr(path), GENERIC_READ, 0, nil, OPEN_EXISTING, + FILE_FLAG_OPEN_REPARSE_POINT|FILE_FLAG_BACKUP_SEMANTICS, 0) + if err != nil { + return -1, err + } + defer CloseHandle(fd) + + rdbbuf := make([]byte, MAXIMUM_REPARSE_DATA_BUFFER_SIZE) + var bytesReturned uint32 + err = DeviceIoControl(fd, FSCTL_GET_REPARSE_POINT, nil, 0, &rdbbuf[0], uint32(len(rdbbuf)), &bytesReturned, nil) + if err != nil { + return -1, err + } + + rdb := (*reparseDataBuffer)(unsafe.Pointer(&rdbbuf[0])) + var s string + switch rdb.ReparseTag { + case IO_REPARSE_TAG_SYMLINK: + data := (*symbolicLinkReparseBuffer)(unsafe.Pointer(&rdb.reparseBuffer)) + p := (*[0xffff]uint16)(unsafe.Pointer(&data.PathBuffer[0])) + s = UTF16ToString(p[data.PrintNameOffset/2 : (data.PrintNameLength-data.PrintNameOffset)/2]) + case IO_REPARSE_TAG_MOUNT_POINT: + data := (*mountPointReparseBuffer)(unsafe.Pointer(&rdb.reparseBuffer)) + p := (*[0xffff]uint16)(unsafe.Pointer(&data.PathBuffer[0])) + s = UTF16ToString(p[data.PrintNameOffset/2 : (data.PrintNameLength-data.PrintNameOffset)/2]) + default: + // the path is not a symlink or junction but another type of reparse + // point + return -1, syscall.ENOENT + } + n = copy(buf, []byte(s)) + + return n, nil +} diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go new file mode 100644 index 000000000..3ff8f5253 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -0,0 +1,2245 @@ +// MACHINE GENERATED BY 'go generate' COMMAND; DO NOT EDIT + +package windows + +import ( + "syscall" + "unsafe" +) + +var _ unsafe.Pointer + +var ( + modadvapi32 = NewLazySystemDLL("advapi32.dll") + modkernel32 = NewLazySystemDLL("kernel32.dll") + modshell32 = NewLazySystemDLL("shell32.dll") + modmswsock = NewLazySystemDLL("mswsock.dll") + modcrypt32 = NewLazySystemDLL("crypt32.dll") + modws2_32 = NewLazySystemDLL("ws2_32.dll") + moddnsapi = NewLazySystemDLL("dnsapi.dll") + modiphlpapi = NewLazySystemDLL("iphlpapi.dll") + modsecur32 = NewLazySystemDLL("secur32.dll") + modnetapi32 = NewLazySystemDLL("netapi32.dll") + moduserenv = NewLazySystemDLL("userenv.dll") + + procRegisterEventSourceW = modadvapi32.NewProc("RegisterEventSourceW") + procDeregisterEventSource = modadvapi32.NewProc("DeregisterEventSource") + procReportEventW = modadvapi32.NewProc("ReportEventW") + procOpenSCManagerW = modadvapi32.NewProc("OpenSCManagerW") + procCloseServiceHandle = modadvapi32.NewProc("CloseServiceHandle") + procCreateServiceW = modadvapi32.NewProc("CreateServiceW") + procOpenServiceW = modadvapi32.NewProc("OpenServiceW") + procDeleteService = modadvapi32.NewProc("DeleteService") + procStartServiceW = modadvapi32.NewProc("StartServiceW") + procQueryServiceStatus = modadvapi32.NewProc("QueryServiceStatus") + procControlService = modadvapi32.NewProc("ControlService") + procStartServiceCtrlDispatcherW = modadvapi32.NewProc("StartServiceCtrlDispatcherW") + procSetServiceStatus = modadvapi32.NewProc("SetServiceStatus") + procChangeServiceConfigW = modadvapi32.NewProc("ChangeServiceConfigW") + procQueryServiceConfigW = modadvapi32.NewProc("QueryServiceConfigW") + procChangeServiceConfig2W = modadvapi32.NewProc("ChangeServiceConfig2W") + procQueryServiceConfig2W = modadvapi32.NewProc("QueryServiceConfig2W") + procGetLastError = modkernel32.NewProc("GetLastError") + procLoadLibraryW = modkernel32.NewProc("LoadLibraryW") + procLoadLibraryExW = modkernel32.NewProc("LoadLibraryExW") + procFreeLibrary = modkernel32.NewProc("FreeLibrary") + procGetProcAddress = modkernel32.NewProc("GetProcAddress") + procGetVersion = modkernel32.NewProc("GetVersion") + procFormatMessageW = modkernel32.NewProc("FormatMessageW") + procExitProcess = modkernel32.NewProc("ExitProcess") + procCreateFileW = modkernel32.NewProc("CreateFileW") + procReadFile = modkernel32.NewProc("ReadFile") + procWriteFile = modkernel32.NewProc("WriteFile") + procSetFilePointer = modkernel32.NewProc("SetFilePointer") + procCloseHandle = modkernel32.NewProc("CloseHandle") + procGetStdHandle = modkernel32.NewProc("GetStdHandle") + procFindFirstFileW = modkernel32.NewProc("FindFirstFileW") + procFindNextFileW = modkernel32.NewProc("FindNextFileW") + procFindClose = modkernel32.NewProc("FindClose") + procGetFileInformationByHandle = modkernel32.NewProc("GetFileInformationByHandle") + procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW") + procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW") + procCreateDirectoryW = modkernel32.NewProc("CreateDirectoryW") + procRemoveDirectoryW = modkernel32.NewProc("RemoveDirectoryW") + procDeleteFileW = modkernel32.NewProc("DeleteFileW") + procMoveFileW = modkernel32.NewProc("MoveFileW") + procMoveFileExW = modkernel32.NewProc("MoveFileExW") + procGetComputerNameW = modkernel32.NewProc("GetComputerNameW") + procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW") + procSetEndOfFile = modkernel32.NewProc("SetEndOfFile") + procGetSystemTimeAsFileTime = modkernel32.NewProc("GetSystemTimeAsFileTime") + procGetTimeZoneInformation = modkernel32.NewProc("GetTimeZoneInformation") + procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort") + procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus") + procPostQueuedCompletionStatus = modkernel32.NewProc("PostQueuedCompletionStatus") + procCancelIo = modkernel32.NewProc("CancelIo") + procCancelIoEx = modkernel32.NewProc("CancelIoEx") + procCreateProcessW = modkernel32.NewProc("CreateProcessW") + procOpenProcess = modkernel32.NewProc("OpenProcess") + procTerminateProcess = modkernel32.NewProc("TerminateProcess") + procGetExitCodeProcess = modkernel32.NewProc("GetExitCodeProcess") + procGetStartupInfoW = modkernel32.NewProc("GetStartupInfoW") + procGetCurrentProcess = modkernel32.NewProc("GetCurrentProcess") + procGetProcessTimes = modkernel32.NewProc("GetProcessTimes") + procDuplicateHandle = modkernel32.NewProc("DuplicateHandle") + procWaitForSingleObject = modkernel32.NewProc("WaitForSingleObject") + procGetTempPathW = modkernel32.NewProc("GetTempPathW") + procCreatePipe = modkernel32.NewProc("CreatePipe") + procGetFileType = modkernel32.NewProc("GetFileType") + procCryptAcquireContextW = modadvapi32.NewProc("CryptAcquireContextW") + procCryptReleaseContext = modadvapi32.NewProc("CryptReleaseContext") + procCryptGenRandom = modadvapi32.NewProc("CryptGenRandom") + procGetEnvironmentStringsW = modkernel32.NewProc("GetEnvironmentStringsW") + procFreeEnvironmentStringsW = modkernel32.NewProc("FreeEnvironmentStringsW") + procGetEnvironmentVariableW = modkernel32.NewProc("GetEnvironmentVariableW") + procSetEnvironmentVariableW = modkernel32.NewProc("SetEnvironmentVariableW") + procSetFileTime = modkernel32.NewProc("SetFileTime") + procGetFileAttributesW = modkernel32.NewProc("GetFileAttributesW") + procSetFileAttributesW = modkernel32.NewProc("SetFileAttributesW") + procGetFileAttributesExW = modkernel32.NewProc("GetFileAttributesExW") + procGetCommandLineW = modkernel32.NewProc("GetCommandLineW") + procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW") + procLocalFree = modkernel32.NewProc("LocalFree") + procSetHandleInformation = modkernel32.NewProc("SetHandleInformation") + procFlushFileBuffers = modkernel32.NewProc("FlushFileBuffers") + procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW") + procGetLongPathNameW = modkernel32.NewProc("GetLongPathNameW") + procGetShortPathNameW = modkernel32.NewProc("GetShortPathNameW") + procCreateFileMappingW = modkernel32.NewProc("CreateFileMappingW") + procMapViewOfFile = modkernel32.NewProc("MapViewOfFile") + procUnmapViewOfFile = modkernel32.NewProc("UnmapViewOfFile") + procFlushViewOfFile = modkernel32.NewProc("FlushViewOfFile") + procVirtualLock = modkernel32.NewProc("VirtualLock") + procVirtualUnlock = modkernel32.NewProc("VirtualUnlock") + procTransmitFile = modmswsock.NewProc("TransmitFile") + procReadDirectoryChangesW = modkernel32.NewProc("ReadDirectoryChangesW") + procCertOpenSystemStoreW = modcrypt32.NewProc("CertOpenSystemStoreW") + procCertOpenStore = modcrypt32.NewProc("CertOpenStore") + procCertEnumCertificatesInStore = modcrypt32.NewProc("CertEnumCertificatesInStore") + procCertAddCertificateContextToStore = modcrypt32.NewProc("CertAddCertificateContextToStore") + procCertCloseStore = modcrypt32.NewProc("CertCloseStore") + procCertGetCertificateChain = modcrypt32.NewProc("CertGetCertificateChain") + procCertFreeCertificateChain = modcrypt32.NewProc("CertFreeCertificateChain") + procCertCreateCertificateContext = modcrypt32.NewProc("CertCreateCertificateContext") + procCertFreeCertificateContext = modcrypt32.NewProc("CertFreeCertificateContext") + procCertVerifyCertificateChainPolicy = modcrypt32.NewProc("CertVerifyCertificateChainPolicy") + procRegOpenKeyExW = modadvapi32.NewProc("RegOpenKeyExW") + procRegCloseKey = modadvapi32.NewProc("RegCloseKey") + procRegQueryInfoKeyW = modadvapi32.NewProc("RegQueryInfoKeyW") + procRegEnumKeyExW = modadvapi32.NewProc("RegEnumKeyExW") + procRegQueryValueExW = modadvapi32.NewProc("RegQueryValueExW") + procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId") + procGetConsoleMode = modkernel32.NewProc("GetConsoleMode") + procWriteConsoleW = modkernel32.NewProc("WriteConsoleW") + procReadConsoleW = modkernel32.NewProc("ReadConsoleW") + procCreateToolhelp32Snapshot = modkernel32.NewProc("CreateToolhelp32Snapshot") + procProcess32FirstW = modkernel32.NewProc("Process32FirstW") + procProcess32NextW = modkernel32.NewProc("Process32NextW") + procDeviceIoControl = modkernel32.NewProc("DeviceIoControl") + procCreateSymbolicLinkW = modkernel32.NewProc("CreateSymbolicLinkW") + procCreateHardLinkW = modkernel32.NewProc("CreateHardLinkW") + procGetCurrentThreadId = modkernel32.NewProc("GetCurrentThreadId") + procCreateEventW = modkernel32.NewProc("CreateEventW") + procSetEvent = modkernel32.NewProc("SetEvent") + procWSAStartup = modws2_32.NewProc("WSAStartup") + procWSACleanup = modws2_32.NewProc("WSACleanup") + procWSAIoctl = modws2_32.NewProc("WSAIoctl") + procsocket = modws2_32.NewProc("socket") + procsetsockopt = modws2_32.NewProc("setsockopt") + procgetsockopt = modws2_32.NewProc("getsockopt") + procbind = modws2_32.NewProc("bind") + procconnect = modws2_32.NewProc("connect") + procgetsockname = modws2_32.NewProc("getsockname") + procgetpeername = modws2_32.NewProc("getpeername") + proclisten = modws2_32.NewProc("listen") + procshutdown = modws2_32.NewProc("shutdown") + procclosesocket = modws2_32.NewProc("closesocket") + procAcceptEx = modmswsock.NewProc("AcceptEx") + procGetAcceptExSockaddrs = modmswsock.NewProc("GetAcceptExSockaddrs") + procWSARecv = modws2_32.NewProc("WSARecv") + procWSASend = modws2_32.NewProc("WSASend") + procWSARecvFrom = modws2_32.NewProc("WSARecvFrom") + procWSASendTo = modws2_32.NewProc("WSASendTo") + procgethostbyname = modws2_32.NewProc("gethostbyname") + procgetservbyname = modws2_32.NewProc("getservbyname") + procntohs = modws2_32.NewProc("ntohs") + procgetprotobyname = modws2_32.NewProc("getprotobyname") + procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W") + procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree") + procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W") + procGetAddrInfoW = modws2_32.NewProc("GetAddrInfoW") + procFreeAddrInfoW = modws2_32.NewProc("FreeAddrInfoW") + procGetIfEntry = modiphlpapi.NewProc("GetIfEntry") + procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo") + procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes") + procWSAEnumProtocolsW = modws2_32.NewProc("WSAEnumProtocolsW") + procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses") + procGetACP = modkernel32.NewProc("GetACP") + procMultiByteToWideChar = modkernel32.NewProc("MultiByteToWideChar") + procTranslateNameW = modsecur32.NewProc("TranslateNameW") + procGetUserNameExW = modsecur32.NewProc("GetUserNameExW") + procNetUserGetInfo = modnetapi32.NewProc("NetUserGetInfo") + procNetGetJoinInformation = modnetapi32.NewProc("NetGetJoinInformation") + procNetApiBufferFree = modnetapi32.NewProc("NetApiBufferFree") + procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW") + procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW") + procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW") + procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW") + procGetLengthSid = modadvapi32.NewProc("GetLengthSid") + procCopySid = modadvapi32.NewProc("CopySid") + procAllocateAndInitializeSid = modadvapi32.NewProc("AllocateAndInitializeSid") + procFreeSid = modadvapi32.NewProc("FreeSid") + procEqualSid = modadvapi32.NewProc("EqualSid") + procOpenProcessToken = modadvapi32.NewProc("OpenProcessToken") + procGetTokenInformation = modadvapi32.NewProc("GetTokenInformation") + procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW") +) + +func RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procRegisterEventSourceW.Addr(), 2, uintptr(unsafe.Pointer(uncServerName)), uintptr(unsafe.Pointer(sourceName)), 0) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func DeregisterEventSource(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procDeregisterEventSource.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) { + r1, _, e1 := syscall.Syscall9(procReportEventW.Addr(), 9, uintptr(log), uintptr(etype), uintptr(category), uintptr(eventId), uintptr(usrSId), uintptr(numStrings), uintptr(dataSize), uintptr(unsafe.Pointer(strings)), uintptr(unsafe.Pointer(rawData))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func OpenSCManager(machineName *uint16, databaseName *uint16, access uint32) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procOpenSCManagerW.Addr(), 3, uintptr(unsafe.Pointer(machineName)), uintptr(unsafe.Pointer(databaseName)), uintptr(access)) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CloseServiceHandle(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procCloseServiceHandle.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateService(mgr Handle, serviceName *uint16, displayName *uint16, access uint32, srvType uint32, startType uint32, errCtl uint32, pathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall15(procCreateServiceW.Addr(), 13, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(unsafe.Pointer(displayName)), uintptr(access), uintptr(srvType), uintptr(startType), uintptr(errCtl), uintptr(unsafe.Pointer(pathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), 0, 0) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func OpenService(mgr Handle, serviceName *uint16, access uint32) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procOpenServiceW.Addr(), 3, uintptr(mgr), uintptr(unsafe.Pointer(serviceName)), uintptr(access)) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func DeleteService(service Handle) (err error) { + r1, _, e1 := syscall.Syscall(procDeleteService.Addr(), 1, uintptr(service), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func StartService(service Handle, numArgs uint32, argVectors **uint16) (err error) { + r1, _, e1 := syscall.Syscall(procStartServiceW.Addr(), 3, uintptr(service), uintptr(numArgs), uintptr(unsafe.Pointer(argVectors))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func QueryServiceStatus(service Handle, status *SERVICE_STATUS) (err error) { + r1, _, e1 := syscall.Syscall(procQueryServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(status)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ControlService(service Handle, control uint32, status *SERVICE_STATUS) (err error) { + r1, _, e1 := syscall.Syscall(procControlService.Addr(), 3, uintptr(service), uintptr(control), uintptr(unsafe.Pointer(status))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func StartServiceCtrlDispatcher(serviceTable *SERVICE_TABLE_ENTRY) (err error) { + r1, _, e1 := syscall.Syscall(procStartServiceCtrlDispatcherW.Addr(), 1, uintptr(unsafe.Pointer(serviceTable)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetServiceStatus(service Handle, serviceStatus *SERVICE_STATUS) (err error) { + r1, _, e1 := syscall.Syscall(procSetServiceStatus.Addr(), 2, uintptr(service), uintptr(unsafe.Pointer(serviceStatus)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ChangeServiceConfig(service Handle, serviceType uint32, startType uint32, errorControl uint32, binaryPathName *uint16, loadOrderGroup *uint16, tagId *uint32, dependencies *uint16, serviceStartName *uint16, password *uint16, displayName *uint16) (err error) { + r1, _, e1 := syscall.Syscall12(procChangeServiceConfigW.Addr(), 11, uintptr(service), uintptr(serviceType), uintptr(startType), uintptr(errorControl), uintptr(unsafe.Pointer(binaryPathName)), uintptr(unsafe.Pointer(loadOrderGroup)), uintptr(unsafe.Pointer(tagId)), uintptr(unsafe.Pointer(dependencies)), uintptr(unsafe.Pointer(serviceStartName)), uintptr(unsafe.Pointer(password)), uintptr(unsafe.Pointer(displayName)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func QueryServiceConfig(service Handle, serviceConfig *QUERY_SERVICE_CONFIG, bufSize uint32, bytesNeeded *uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procQueryServiceConfigW.Addr(), 4, uintptr(service), uintptr(unsafe.Pointer(serviceConfig)), uintptr(bufSize), uintptr(unsafe.Pointer(bytesNeeded)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ChangeServiceConfig2(service Handle, infoLevel uint32, info *byte) (err error) { + r1, _, e1 := syscall.Syscall(procChangeServiceConfig2W.Addr(), 3, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(info))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func QueryServiceConfig2(service Handle, infoLevel uint32, buff *byte, buffSize uint32, bytesNeeded *uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procQueryServiceConfig2W.Addr(), 5, uintptr(service), uintptr(infoLevel), uintptr(unsafe.Pointer(buff)), uintptr(buffSize), uintptr(unsafe.Pointer(bytesNeeded)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetLastError() (lasterr error) { + r0, _, _ := syscall.Syscall(procGetLastError.Addr(), 0, 0, 0, 0) + if r0 != 0 { + lasterr = syscall.Errno(r0) + } + return +} + +func LoadLibrary(libname string) (handle Handle, err error) { + var _p0 *uint16 + _p0, err = syscall.UTF16PtrFromString(libname) + if err != nil { + return + } + return _LoadLibrary(_p0) +} + +func _LoadLibrary(libname *uint16) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procLoadLibraryW.Addr(), 1, uintptr(unsafe.Pointer(libname)), 0, 0) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func LoadLibraryEx(libname string, zero Handle, flags uintptr) (handle Handle, err error) { + var _p0 *uint16 + _p0, err = syscall.UTF16PtrFromString(libname) + if err != nil { + return + } + return _LoadLibraryEx(_p0, zero, flags) +} + +func _LoadLibraryEx(libname *uint16, zero Handle, flags uintptr) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procLoadLibraryExW.Addr(), 3, uintptr(unsafe.Pointer(libname)), uintptr(zero), uintptr(flags)) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FreeLibrary(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procFreeLibrary.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetProcAddress(module Handle, procname string) (proc uintptr, err error) { + var _p0 *byte + _p0, err = syscall.BytePtrFromString(procname) + if err != nil { + return + } + return _GetProcAddress(module, _p0) +} + +func _GetProcAddress(module Handle, procname *byte) (proc uintptr, err error) { + r0, _, e1 := syscall.Syscall(procGetProcAddress.Addr(), 2, uintptr(module), uintptr(unsafe.Pointer(procname)), 0) + proc = uintptr(r0) + if proc == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetVersion() (ver uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetVersion.Addr(), 0, 0, 0, 0) + ver = uint32(r0) + if ver == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FormatMessage(flags uint32, msgsrc uintptr, msgid uint32, langid uint32, buf []uint16, args *byte) (n uint32, err error) { + var _p0 *uint16 + if len(buf) > 0 { + _p0 = &buf[0] + } + r0, _, e1 := syscall.Syscall9(procFormatMessageW.Addr(), 7, uintptr(flags), uintptr(msgsrc), uintptr(msgid), uintptr(langid), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(args)), 0, 0) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ExitProcess(exitcode uint32) { + syscall.Syscall(procExitProcess.Addr(), 1, uintptr(exitcode), 0, 0) + return +} + +func CreateFile(name *uint16, access uint32, mode uint32, sa *SecurityAttributes, createmode uint32, attrs uint32, templatefile int32) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0) + handle = Handle(r0) + if handle == InvalidHandle { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) { + var _p0 *byte + if len(buf) > 0 { + _p0 = &buf[0] + } + r1, _, e1 := syscall.Syscall6(procReadFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) { + var _p0 *byte + if len(buf) > 0 { + _p0 = &buf[0] + } + r1, _, e1 := syscall.Syscall6(procWriteFile.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(done)), uintptr(unsafe.Pointer(overlapped)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) { + r0, _, e1 := syscall.Syscall6(procSetFilePointer.Addr(), 4, uintptr(handle), uintptr(lowoffset), uintptr(unsafe.Pointer(highoffsetptr)), uintptr(whence), 0, 0) + newlowoffset = uint32(r0) + if newlowoffset == 0xffffffff { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CloseHandle(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procCloseHandle.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetStdHandle(stdhandle int) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procGetStdHandle.Addr(), 1, uintptr(stdhandle), 0, 0) + handle = Handle(r0) + if handle == InvalidHandle { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func findFirstFile1(name *uint16, data *win32finddata1) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procFindFirstFileW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(data)), 0) + handle = Handle(r0) + if handle == InvalidHandle { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func findNextFile1(handle Handle, data *win32finddata1) (err error) { + r1, _, e1 := syscall.Syscall(procFindNextFileW.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FindClose(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procFindClose.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetFileInformationByHandle(handle Handle, data *ByHandleFileInformation) (err error) { + r1, _, e1 := syscall.Syscall(procGetFileInformationByHandle.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(data)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetCurrentDirectory(buflen uint32, buf *uint16) (n uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetCurrentDirectoryW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetCurrentDirectory(path *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateDirectory(path *uint16, sa *SecurityAttributes) (err error) { + r1, _, e1 := syscall.Syscall(procCreateDirectoryW.Addr(), 2, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(sa)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func RemoveDirectory(path *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procRemoveDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func DeleteFile(path *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procDeleteFileW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func MoveFile(from *uint16, to *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procMoveFileW.Addr(), 2, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func MoveFileEx(from *uint16, to *uint16, flags uint32) (err error) { + r1, _, e1 := syscall.Syscall(procMoveFileExW.Addr(), 3, uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(to)), uintptr(flags)) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetComputerName(buf *uint16, n *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetComputerNameW.Addr(), 2, uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetComputerNameEx(nametype uint32, buf *uint16, n *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetComputerNameExW.Addr(), 3, uintptr(nametype), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(n))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetEndOfFile(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procSetEndOfFile.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetSystemTimeAsFileTime(time *Filetime) { + syscall.Syscall(procGetSystemTimeAsFileTime.Addr(), 1, uintptr(unsafe.Pointer(time)), 0, 0) + return +} + +func GetTimeZoneInformation(tzi *Timezoneinformation) (rc uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetTimeZoneInformation.Addr(), 1, uintptr(unsafe.Pointer(tzi)), 0, 0) + rc = uint32(r0) + if rc == 0xffffffff { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateIoCompletionPort(filehandle Handle, cphandle Handle, key uint32, threadcnt uint32) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(filehandle), uintptr(cphandle), uintptr(key), uintptr(threadcnt), 0, 0) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetQueuedCompletionStatus(cphandle Handle, qty *uint32, key *uint32, overlapped **Overlapped, timeout uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(cphandle), uintptr(unsafe.Pointer(qty)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(overlapped)), uintptr(timeout), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func PostQueuedCompletionStatus(cphandle Handle, qty uint32, key uint32, overlapped *Overlapped) (err error) { + r1, _, e1 := syscall.Syscall6(procPostQueuedCompletionStatus.Addr(), 4, uintptr(cphandle), uintptr(qty), uintptr(key), uintptr(unsafe.Pointer(overlapped)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CancelIo(s Handle) (err error) { + r1, _, e1 := syscall.Syscall(procCancelIo.Addr(), 1, uintptr(s), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CancelIoEx(s Handle, o *Overlapped) (err error) { + r1, _, e1 := syscall.Syscall(procCancelIoEx.Addr(), 2, uintptr(s), uintptr(unsafe.Pointer(o)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateProcess(appName *uint16, commandLine *uint16, procSecurity *SecurityAttributes, threadSecurity *SecurityAttributes, inheritHandles bool, creationFlags uint32, env *uint16, currentDir *uint16, startupInfo *StartupInfo, outProcInfo *ProcessInformation) (err error) { + var _p0 uint32 + if inheritHandles { + _p0 = 1 + } else { + _p0 = 0 + } + r1, _, e1 := syscall.Syscall12(procCreateProcessW.Addr(), 10, uintptr(unsafe.Pointer(appName)), uintptr(unsafe.Pointer(commandLine)), uintptr(unsafe.Pointer(procSecurity)), uintptr(unsafe.Pointer(threadSecurity)), uintptr(_p0), uintptr(creationFlags), uintptr(unsafe.Pointer(env)), uintptr(unsafe.Pointer(currentDir)), uintptr(unsafe.Pointer(startupInfo)), uintptr(unsafe.Pointer(outProcInfo)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func OpenProcess(da uint32, inheritHandle bool, pid uint32) (handle Handle, err error) { + var _p0 uint32 + if inheritHandle { + _p0 = 1 + } else { + _p0 = 0 + } + r0, _, e1 := syscall.Syscall(procOpenProcess.Addr(), 3, uintptr(da), uintptr(_p0), uintptr(pid)) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func TerminateProcess(handle Handle, exitcode uint32) (err error) { + r1, _, e1 := syscall.Syscall(procTerminateProcess.Addr(), 2, uintptr(handle), uintptr(exitcode), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetExitCodeProcess(handle Handle, exitcode *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetExitCodeProcess.Addr(), 2, uintptr(handle), uintptr(unsafe.Pointer(exitcode)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetStartupInfo(startupInfo *StartupInfo) (err error) { + r1, _, e1 := syscall.Syscall(procGetStartupInfoW.Addr(), 1, uintptr(unsafe.Pointer(startupInfo)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetCurrentProcess() (pseudoHandle Handle, err error) { + r0, _, e1 := syscall.Syscall(procGetCurrentProcess.Addr(), 0, 0, 0, 0) + pseudoHandle = Handle(r0) + if pseudoHandle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetProcessTimes(handle Handle, creationTime *Filetime, exitTime *Filetime, kernelTime *Filetime, userTime *Filetime) (err error) { + r1, _, e1 := syscall.Syscall6(procGetProcessTimes.Addr(), 5, uintptr(handle), uintptr(unsafe.Pointer(creationTime)), uintptr(unsafe.Pointer(exitTime)), uintptr(unsafe.Pointer(kernelTime)), uintptr(unsafe.Pointer(userTime)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func DuplicateHandle(hSourceProcessHandle Handle, hSourceHandle Handle, hTargetProcessHandle Handle, lpTargetHandle *Handle, dwDesiredAccess uint32, bInheritHandle bool, dwOptions uint32) (err error) { + var _p0 uint32 + if bInheritHandle { + _p0 = 1 + } else { + _p0 = 0 + } + r1, _, e1 := syscall.Syscall9(procDuplicateHandle.Addr(), 7, uintptr(hSourceProcessHandle), uintptr(hSourceHandle), uintptr(hTargetProcessHandle), uintptr(unsafe.Pointer(lpTargetHandle)), uintptr(dwDesiredAccess), uintptr(_p0), uintptr(dwOptions), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WaitForSingleObject(handle Handle, waitMilliseconds uint32) (event uint32, err error) { + r0, _, e1 := syscall.Syscall(procWaitForSingleObject.Addr(), 2, uintptr(handle), uintptr(waitMilliseconds), 0) + event = uint32(r0) + if event == 0xffffffff { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetTempPath(buflen uint32, buf *uint16) (n uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetTempPathW.Addr(), 2, uintptr(buflen), uintptr(unsafe.Pointer(buf)), 0) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreatePipe(readhandle *Handle, writehandle *Handle, sa *SecurityAttributes, size uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procCreatePipe.Addr(), 4, uintptr(unsafe.Pointer(readhandle)), uintptr(unsafe.Pointer(writehandle)), uintptr(unsafe.Pointer(sa)), uintptr(size), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetFileType(filehandle Handle) (n uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetFileType.Addr(), 1, uintptr(filehandle), 0, 0) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CryptAcquireContext(provhandle *Handle, container *uint16, provider *uint16, provtype uint32, flags uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procCryptAcquireContextW.Addr(), 5, uintptr(unsafe.Pointer(provhandle)), uintptr(unsafe.Pointer(container)), uintptr(unsafe.Pointer(provider)), uintptr(provtype), uintptr(flags), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CryptReleaseContext(provhandle Handle, flags uint32) (err error) { + r1, _, e1 := syscall.Syscall(procCryptReleaseContext.Addr(), 2, uintptr(provhandle), uintptr(flags), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CryptGenRandom(provhandle Handle, buflen uint32, buf *byte) (err error) { + r1, _, e1 := syscall.Syscall(procCryptGenRandom.Addr(), 3, uintptr(provhandle), uintptr(buflen), uintptr(unsafe.Pointer(buf))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetEnvironmentStrings() (envs *uint16, err error) { + r0, _, e1 := syscall.Syscall(procGetEnvironmentStringsW.Addr(), 0, 0, 0, 0) + envs = (*uint16)(unsafe.Pointer(r0)) + if envs == nil { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FreeEnvironmentStrings(envs *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procFreeEnvironmentStringsW.Addr(), 1, uintptr(unsafe.Pointer(envs)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetEnvironmentVariable(name *uint16, buffer *uint16, size uint32) (n uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetEnvironmentVariableW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(size)) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetEnvironmentVariable(name *uint16, value *uint16) (err error) { + r1, _, e1 := syscall.Syscall(procSetEnvironmentVariableW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(value)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetFileTime(handle Handle, ctime *Filetime, atime *Filetime, wtime *Filetime) (err error) { + r1, _, e1 := syscall.Syscall6(procSetFileTime.Addr(), 4, uintptr(handle), uintptr(unsafe.Pointer(ctime)), uintptr(unsafe.Pointer(atime)), uintptr(unsafe.Pointer(wtime)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetFileAttributes(name *uint16) (attrs uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetFileAttributesW.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0) + attrs = uint32(r0) + if attrs == INVALID_FILE_ATTRIBUTES { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetFileAttributes(name *uint16, attrs uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetFileAttributesW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(attrs), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetFileAttributesEx(name *uint16, level uint32, info *byte) (err error) { + r1, _, e1 := syscall.Syscall(procGetFileAttributesExW.Addr(), 3, uintptr(unsafe.Pointer(name)), uintptr(level), uintptr(unsafe.Pointer(info))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetCommandLine() (cmd *uint16) { + r0, _, _ := syscall.Syscall(procGetCommandLineW.Addr(), 0, 0, 0, 0) + cmd = (*uint16)(unsafe.Pointer(r0)) + return +} + +func CommandLineToArgv(cmd *uint16, argc *int32) (argv *[8192]*[8192]uint16, err error) { + r0, _, e1 := syscall.Syscall(procCommandLineToArgvW.Addr(), 2, uintptr(unsafe.Pointer(cmd)), uintptr(unsafe.Pointer(argc)), 0) + argv = (*[8192]*[8192]uint16)(unsafe.Pointer(r0)) + if argv == nil { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func LocalFree(hmem Handle) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procLocalFree.Addr(), 1, uintptr(hmem), 0, 0) + handle = Handle(r0) + if handle != 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetHandleInformation(handle Handle, mask uint32, flags uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetHandleInformation.Addr(), 3, uintptr(handle), uintptr(mask), uintptr(flags)) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FlushFileBuffers(handle Handle) (err error) { + r1, _, e1 := syscall.Syscall(procFlushFileBuffers.Addr(), 1, uintptr(handle), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (n uint32, err error) { + r0, _, e1 := syscall.Syscall6(procGetFullPathNameW.Addr(), 4, uintptr(unsafe.Pointer(path)), uintptr(buflen), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(fname)), 0, 0) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetLongPathName(path *uint16, buf *uint16, buflen uint32) (n uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetLongPathNameW.Addr(), 3, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(buf)), uintptr(buflen)) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetShortPathName(longpath *uint16, shortpath *uint16, buflen uint32) (n uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetShortPathNameW.Addr(), 3, uintptr(unsafe.Pointer(longpath)), uintptr(unsafe.Pointer(shortpath)), uintptr(buflen)) + n = uint32(r0) + if n == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateFileMapping(fhandle Handle, sa *SecurityAttributes, prot uint32, maxSizeHigh uint32, maxSizeLow uint32, name *uint16) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall6(procCreateFileMappingW.Addr(), 6, uintptr(fhandle), uintptr(unsafe.Pointer(sa)), uintptr(prot), uintptr(maxSizeHigh), uintptr(maxSizeLow), uintptr(unsafe.Pointer(name))) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func MapViewOfFile(handle Handle, access uint32, offsetHigh uint32, offsetLow uint32, length uintptr) (addr uintptr, err error) { + r0, _, e1 := syscall.Syscall6(procMapViewOfFile.Addr(), 5, uintptr(handle), uintptr(access), uintptr(offsetHigh), uintptr(offsetLow), uintptr(length), 0) + addr = uintptr(r0) + if addr == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func UnmapViewOfFile(addr uintptr) (err error) { + r1, _, e1 := syscall.Syscall(procUnmapViewOfFile.Addr(), 1, uintptr(addr), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FlushViewOfFile(addr uintptr, length uintptr) (err error) { + r1, _, e1 := syscall.Syscall(procFlushViewOfFile.Addr(), 2, uintptr(addr), uintptr(length), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func VirtualLock(addr uintptr, length uintptr) (err error) { + r1, _, e1 := syscall.Syscall(procVirtualLock.Addr(), 2, uintptr(addr), uintptr(length), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func VirtualUnlock(addr uintptr, length uintptr) (err error) { + r1, _, e1 := syscall.Syscall(procVirtualUnlock.Addr(), 2, uintptr(addr), uintptr(length), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func TransmitFile(s Handle, handle Handle, bytesToWrite uint32, bytsPerSend uint32, overlapped *Overlapped, transmitFileBuf *TransmitFileBuffers, flags uint32) (err error) { + r1, _, e1 := syscall.Syscall9(procTransmitFile.Addr(), 7, uintptr(s), uintptr(handle), uintptr(bytesToWrite), uintptr(bytsPerSend), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(transmitFileBuf)), uintptr(flags), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree bool, mask uint32, retlen *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) { + var _p0 uint32 + if watchSubTree { + _p0 = 1 + } else { + _p0 = 0 + } + r1, _, e1 := syscall.Syscall9(procReadDirectoryChangesW.Addr(), 8, uintptr(handle), uintptr(unsafe.Pointer(buf)), uintptr(buflen), uintptr(_p0), uintptr(mask), uintptr(unsafe.Pointer(retlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertOpenSystemStore(hprov Handle, name *uint16) (store Handle, err error) { + r0, _, e1 := syscall.Syscall(procCertOpenSystemStoreW.Addr(), 2, uintptr(hprov), uintptr(unsafe.Pointer(name)), 0) + store = Handle(r0) + if store == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertOpenStore(storeProvider uintptr, msgAndCertEncodingType uint32, cryptProv uintptr, flags uint32, para uintptr) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall6(procCertOpenStore.Addr(), 5, uintptr(storeProvider), uintptr(msgAndCertEncodingType), uintptr(cryptProv), uintptr(flags), uintptr(para), 0) + handle = Handle(r0) + if handle == InvalidHandle { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertEnumCertificatesInStore(store Handle, prevContext *CertContext) (context *CertContext, err error) { + r0, _, e1 := syscall.Syscall(procCertEnumCertificatesInStore.Addr(), 2, uintptr(store), uintptr(unsafe.Pointer(prevContext)), 0) + context = (*CertContext)(unsafe.Pointer(r0)) + if context == nil { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertAddCertificateContextToStore(store Handle, certContext *CertContext, addDisposition uint32, storeContext **CertContext) (err error) { + r1, _, e1 := syscall.Syscall6(procCertAddCertificateContextToStore.Addr(), 4, uintptr(store), uintptr(unsafe.Pointer(certContext)), uintptr(addDisposition), uintptr(unsafe.Pointer(storeContext)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertCloseStore(store Handle, flags uint32) (err error) { + r1, _, e1 := syscall.Syscall(procCertCloseStore.Addr(), 2, uintptr(store), uintptr(flags), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertGetCertificateChain(engine Handle, leaf *CertContext, time *Filetime, additionalStore Handle, para *CertChainPara, flags uint32, reserved uintptr, chainCtx **CertChainContext) (err error) { + r1, _, e1 := syscall.Syscall9(procCertGetCertificateChain.Addr(), 8, uintptr(engine), uintptr(unsafe.Pointer(leaf)), uintptr(unsafe.Pointer(time)), uintptr(additionalStore), uintptr(unsafe.Pointer(para)), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(chainCtx)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertFreeCertificateChain(ctx *CertChainContext) { + syscall.Syscall(procCertFreeCertificateChain.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0) + return +} + +func CertCreateCertificateContext(certEncodingType uint32, certEncoded *byte, encodedLen uint32) (context *CertContext, err error) { + r0, _, e1 := syscall.Syscall(procCertCreateCertificateContext.Addr(), 3, uintptr(certEncodingType), uintptr(unsafe.Pointer(certEncoded)), uintptr(encodedLen)) + context = (*CertContext)(unsafe.Pointer(r0)) + if context == nil { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertFreeCertificateContext(ctx *CertContext) (err error) { + r1, _, e1 := syscall.Syscall(procCertFreeCertificateContext.Addr(), 1, uintptr(unsafe.Pointer(ctx)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CertVerifyCertificateChainPolicy(policyOID uintptr, chain *CertChainContext, para *CertChainPolicyPara, status *CertChainPolicyStatus) (err error) { + r1, _, e1 := syscall.Syscall6(procCertVerifyCertificateChainPolicy.Addr(), 4, uintptr(policyOID), uintptr(unsafe.Pointer(chain)), uintptr(unsafe.Pointer(para)), uintptr(unsafe.Pointer(status)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func RegOpenKeyEx(key Handle, subkey *uint16, options uint32, desiredAccess uint32, result *Handle) (regerrno error) { + r0, _, _ := syscall.Syscall6(procRegOpenKeyExW.Addr(), 5, uintptr(key), uintptr(unsafe.Pointer(subkey)), uintptr(options), uintptr(desiredAccess), uintptr(unsafe.Pointer(result)), 0) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func RegCloseKey(key Handle) (regerrno error) { + r0, _, _ := syscall.Syscall(procRegCloseKey.Addr(), 1, uintptr(key), 0, 0) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func RegQueryInfoKey(key Handle, class *uint16, classLen *uint32, reserved *uint32, subkeysLen *uint32, maxSubkeyLen *uint32, maxClassLen *uint32, valuesLen *uint32, maxValueNameLen *uint32, maxValueLen *uint32, saLen *uint32, lastWriteTime *Filetime) (regerrno error) { + r0, _, _ := syscall.Syscall12(procRegQueryInfoKeyW.Addr(), 12, uintptr(key), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(subkeysLen)), uintptr(unsafe.Pointer(maxSubkeyLen)), uintptr(unsafe.Pointer(maxClassLen)), uintptr(unsafe.Pointer(valuesLen)), uintptr(unsafe.Pointer(maxValueNameLen)), uintptr(unsafe.Pointer(maxValueLen)), uintptr(unsafe.Pointer(saLen)), uintptr(unsafe.Pointer(lastWriteTime))) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func RegEnumKeyEx(key Handle, index uint32, name *uint16, nameLen *uint32, reserved *uint32, class *uint16, classLen *uint32, lastWriteTime *Filetime) (regerrno error) { + r0, _, _ := syscall.Syscall9(procRegEnumKeyExW.Addr(), 8, uintptr(key), uintptr(index), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(class)), uintptr(unsafe.Pointer(classLen)), uintptr(unsafe.Pointer(lastWriteTime)), 0) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func RegQueryValueEx(key Handle, name *uint16, reserved *uint32, valtype *uint32, buf *byte, buflen *uint32) (regerrno error) { + r0, _, _ := syscall.Syscall6(procRegQueryValueExW.Addr(), 6, uintptr(key), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(reserved)), uintptr(unsafe.Pointer(valtype)), uintptr(unsafe.Pointer(buf)), uintptr(unsafe.Pointer(buflen))) + if r0 != 0 { + regerrno = syscall.Errno(r0) + } + return +} + +func getCurrentProcessId() (pid uint32) { + r0, _, _ := syscall.Syscall(procGetCurrentProcessId.Addr(), 0, 0, 0, 0) + pid = uint32(r0) + return +} + +func GetConsoleMode(console Handle, mode *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) { + r1, _, e1 := syscall.Syscall6(procWriteConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(towrite), uintptr(unsafe.Pointer(written)), uintptr(unsafe.Pointer(reserved)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) { + r1, _, e1 := syscall.Syscall6(procReadConsoleW.Addr(), 5, uintptr(console), uintptr(unsafe.Pointer(buf)), uintptr(toread), uintptr(unsafe.Pointer(read)), uintptr(unsafe.Pointer(inputControl)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateToolhelp32Snapshot(flags uint32, processId uint32) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procCreateToolhelp32Snapshot.Addr(), 2, uintptr(flags), uintptr(processId), 0) + handle = Handle(r0) + if handle == InvalidHandle { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func Process32First(snapshot Handle, procEntry *ProcessEntry32) (err error) { + r1, _, e1 := syscall.Syscall(procProcess32FirstW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func Process32Next(snapshot Handle, procEntry *ProcessEntry32) (err error) { + r1, _, e1 := syscall.Syscall(procProcess32NextW.Addr(), 2, uintptr(snapshot), uintptr(unsafe.Pointer(procEntry)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func DeviceIoControl(handle Handle, ioControlCode uint32, inBuffer *byte, inBufferSize uint32, outBuffer *byte, outBufferSize uint32, bytesReturned *uint32, overlapped *Overlapped) (err error) { + r1, _, e1 := syscall.Syscall9(procDeviceIoControl.Addr(), 8, uintptr(handle), uintptr(ioControlCode), uintptr(unsafe.Pointer(inBuffer)), uintptr(inBufferSize), uintptr(unsafe.Pointer(outBuffer)), uintptr(outBufferSize), uintptr(unsafe.Pointer(bytesReturned)), uintptr(unsafe.Pointer(overlapped)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateSymbolicLink(symlinkfilename *uint16, targetfilename *uint16, flags uint32) (err error) { + r1, _, e1 := syscall.Syscall(procCreateSymbolicLinkW.Addr(), 3, uintptr(unsafe.Pointer(symlinkfilename)), uintptr(unsafe.Pointer(targetfilename)), uintptr(flags)) + if r1&0xff == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func CreateHardLink(filename *uint16, existingfilename *uint16, reserved uintptr) (err error) { + r1, _, e1 := syscall.Syscall(procCreateHardLinkW.Addr(), 3, uintptr(unsafe.Pointer(filename)), uintptr(unsafe.Pointer(existingfilename)), uintptr(reserved)) + if r1&0xff == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetCurrentThreadId() (id uint32) { + r0, _, _ := syscall.Syscall(procGetCurrentThreadId.Addr(), 0, 0, 0, 0) + id = uint32(r0) + return +} + +func CreateEvent(eventAttrs *syscall.SecurityAttributes, manualReset uint32, initialState uint32, name *uint16) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall6(procCreateEventW.Addr(), 4, uintptr(unsafe.Pointer(eventAttrs)), uintptr(manualReset), uintptr(initialState), uintptr(unsafe.Pointer(name)), 0, 0) + handle = Handle(r0) + if handle == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func SetEvent(event Handle) (err error) { + r1, _, e1 := syscall.Syscall(procSetEvent.Addr(), 1, uintptr(event), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WSAStartup(verreq uint32, data *WSAData) (sockerr error) { + r0, _, _ := syscall.Syscall(procWSAStartup.Addr(), 2, uintptr(verreq), uintptr(unsafe.Pointer(data)), 0) + if r0 != 0 { + sockerr = syscall.Errno(r0) + } + return +} + +func WSACleanup() (err error) { + r1, _, e1 := syscall.Syscall(procWSACleanup.Addr(), 0, 0, 0, 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WSAIoctl(s Handle, iocc uint32, inbuf *byte, cbif uint32, outbuf *byte, cbob uint32, cbbr *uint32, overlapped *Overlapped, completionRoutine uintptr) (err error) { + r1, _, e1 := syscall.Syscall9(procWSAIoctl.Addr(), 9, uintptr(s), uintptr(iocc), uintptr(unsafe.Pointer(inbuf)), uintptr(cbif), uintptr(unsafe.Pointer(outbuf)), uintptr(cbob), uintptr(unsafe.Pointer(cbbr)), uintptr(unsafe.Pointer(overlapped)), uintptr(completionRoutine)) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func socket(af int32, typ int32, protocol int32) (handle Handle, err error) { + r0, _, e1 := syscall.Syscall(procsocket.Addr(), 3, uintptr(af), uintptr(typ), uintptr(protocol)) + handle = Handle(r0) + if handle == InvalidHandle { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func Setsockopt(s Handle, level int32, optname int32, optval *byte, optlen int32) (err error) { + r1, _, e1 := syscall.Syscall6(procsetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(optlen), 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func Getsockopt(s Handle, level int32, optname int32, optval *byte, optlen *int32) (err error) { + r1, _, e1 := syscall.Syscall6(procgetsockopt.Addr(), 5, uintptr(s), uintptr(level), uintptr(optname), uintptr(unsafe.Pointer(optval)), uintptr(unsafe.Pointer(optlen)), 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func bind(s Handle, name unsafe.Pointer, namelen int32) (err error) { + r1, _, e1 := syscall.Syscall(procbind.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen)) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func connect(s Handle, name unsafe.Pointer, namelen int32) (err error) { + r1, _, e1 := syscall.Syscall(procconnect.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen)) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func getsockname(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) { + r1, _, e1 := syscall.Syscall(procgetsockname.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func getpeername(s Handle, rsa *RawSockaddrAny, addrlen *int32) (err error) { + r1, _, e1 := syscall.Syscall(procgetpeername.Addr(), 3, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func listen(s Handle, backlog int32) (err error) { + r1, _, e1 := syscall.Syscall(proclisten.Addr(), 2, uintptr(s), uintptr(backlog), 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func shutdown(s Handle, how int32) (err error) { + r1, _, e1 := syscall.Syscall(procshutdown.Addr(), 2, uintptr(s), uintptr(how), 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func Closesocket(s Handle) (err error) { + r1, _, e1 := syscall.Syscall(procclosesocket.Addr(), 1, uintptr(s), 0, 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func AcceptEx(ls Handle, as Handle, buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, recvd *uint32, overlapped *Overlapped) (err error) { + r1, _, e1 := syscall.Syscall9(procAcceptEx.Addr(), 8, uintptr(ls), uintptr(as), uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(overlapped)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetAcceptExSockaddrs(buf *byte, rxdatalen uint32, laddrlen uint32, raddrlen uint32, lrsa **RawSockaddrAny, lrsalen *int32, rrsa **RawSockaddrAny, rrsalen *int32) { + syscall.Syscall9(procGetAcceptExSockaddrs.Addr(), 8, uintptr(unsafe.Pointer(buf)), uintptr(rxdatalen), uintptr(laddrlen), uintptr(raddrlen), uintptr(unsafe.Pointer(lrsa)), uintptr(unsafe.Pointer(lrsalen)), uintptr(unsafe.Pointer(rrsa)), uintptr(unsafe.Pointer(rrsalen)), 0) + return +} + +func WSARecv(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, overlapped *Overlapped, croutine *byte) (err error) { + r1, _, e1 := syscall.Syscall9(procWSARecv.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WSASend(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, overlapped *Overlapped, croutine *byte) (err error) { + r1, _, e1 := syscall.Syscall9(procWSASend.Addr(), 7, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine)), 0, 0) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WSARecvFrom(s Handle, bufs *WSABuf, bufcnt uint32, recvd *uint32, flags *uint32, from *RawSockaddrAny, fromlen *int32, overlapped *Overlapped, croutine *byte) (err error) { + r1, _, e1 := syscall.Syscall9(procWSARecvFrom.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(recvd)), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine))) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WSASendTo(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to *RawSockaddrAny, tolen int32, overlapped *Overlapped, croutine *byte) (err error) { + r1, _, e1 := syscall.Syscall9(procWSASendTo.Addr(), 9, uintptr(s), uintptr(unsafe.Pointer(bufs)), uintptr(bufcnt), uintptr(unsafe.Pointer(sent)), uintptr(flags), uintptr(unsafe.Pointer(to)), uintptr(tolen), uintptr(unsafe.Pointer(overlapped)), uintptr(unsafe.Pointer(croutine))) + if r1 == socket_error { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetHostByName(name string) (h *Hostent, err error) { + var _p0 *byte + _p0, err = syscall.BytePtrFromString(name) + if err != nil { + return + } + return _GetHostByName(_p0) +} + +func _GetHostByName(name *byte) (h *Hostent, err error) { + r0, _, e1 := syscall.Syscall(procgethostbyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0) + h = (*Hostent)(unsafe.Pointer(r0)) + if h == nil { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetServByName(name string, proto string) (s *Servent, err error) { + var _p0 *byte + _p0, err = syscall.BytePtrFromString(name) + if err != nil { + return + } + var _p1 *byte + _p1, err = syscall.BytePtrFromString(proto) + if err != nil { + return + } + return _GetServByName(_p0, _p1) +} + +func _GetServByName(name *byte, proto *byte) (s *Servent, err error) { + r0, _, e1 := syscall.Syscall(procgetservbyname.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(proto)), 0) + s = (*Servent)(unsafe.Pointer(r0)) + if s == nil { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func Ntohs(netshort uint16) (u uint16) { + r0, _, _ := syscall.Syscall(procntohs.Addr(), 1, uintptr(netshort), 0, 0) + u = uint16(r0) + return +} + +func GetProtoByName(name string) (p *Protoent, err error) { + var _p0 *byte + _p0, err = syscall.BytePtrFromString(name) + if err != nil { + return + } + return _GetProtoByName(_p0) +} + +func _GetProtoByName(name *byte) (p *Protoent, err error) { + r0, _, e1 := syscall.Syscall(procgetprotobyname.Addr(), 1, uintptr(unsafe.Pointer(name)), 0, 0) + p = (*Protoent)(unsafe.Pointer(r0)) + if p == nil { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func DnsQuery(name string, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) { + var _p0 *uint16 + _p0, status = syscall.UTF16PtrFromString(name) + if status != nil { + return + } + return _DnsQuery(_p0, qtype, options, extra, qrs, pr) +} + +func _DnsQuery(name *uint16, qtype uint16, options uint32, extra *byte, qrs **DNSRecord, pr *byte) (status error) { + r0, _, _ := syscall.Syscall6(procDnsQuery_W.Addr(), 6, uintptr(unsafe.Pointer(name)), uintptr(qtype), uintptr(options), uintptr(unsafe.Pointer(extra)), uintptr(unsafe.Pointer(qrs)), uintptr(unsafe.Pointer(pr))) + if r0 != 0 { + status = syscall.Errno(r0) + } + return +} + +func DnsRecordListFree(rl *DNSRecord, freetype uint32) { + syscall.Syscall(procDnsRecordListFree.Addr(), 2, uintptr(unsafe.Pointer(rl)), uintptr(freetype), 0) + return +} + +func DnsNameCompare(name1 *uint16, name2 *uint16) (same bool) { + r0, _, _ := syscall.Syscall(procDnsNameCompare_W.Addr(), 2, uintptr(unsafe.Pointer(name1)), uintptr(unsafe.Pointer(name2)), 0) + same = r0 != 0 + return +} + +func GetAddrInfoW(nodename *uint16, servicename *uint16, hints *AddrinfoW, result **AddrinfoW) (sockerr error) { + r0, _, _ := syscall.Syscall6(procGetAddrInfoW.Addr(), 4, uintptr(unsafe.Pointer(nodename)), uintptr(unsafe.Pointer(servicename)), uintptr(unsafe.Pointer(hints)), uintptr(unsafe.Pointer(result)), 0, 0) + if r0 != 0 { + sockerr = syscall.Errno(r0) + } + return +} + +func FreeAddrInfoW(addrinfo *AddrinfoW) { + syscall.Syscall(procFreeAddrInfoW.Addr(), 1, uintptr(unsafe.Pointer(addrinfo)), 0, 0) + return +} + +func GetIfEntry(pIfRow *MibIfRow) (errcode error) { + r0, _, _ := syscall.Syscall(procGetIfEntry.Addr(), 1, uintptr(unsafe.Pointer(pIfRow)), 0, 0) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + +func GetAdaptersInfo(ai *IpAdapterInfo, ol *uint32) (errcode error) { + r0, _, _ := syscall.Syscall(procGetAdaptersInfo.Addr(), 2, uintptr(unsafe.Pointer(ai)), uintptr(unsafe.Pointer(ol)), 0) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + +func SetFileCompletionNotificationModes(handle Handle, flags uint8) (err error) { + r1, _, e1 := syscall.Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(handle), uintptr(flags), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func WSAEnumProtocols(protocols *int32, protocolBuffer *WSAProtocolInfo, bufferLength *uint32) (n int32, err error) { + r0, _, e1 := syscall.Syscall(procWSAEnumProtocolsW.Addr(), 3, uintptr(unsafe.Pointer(protocols)), uintptr(unsafe.Pointer(protocolBuffer)), uintptr(unsafe.Pointer(bufferLength))) + n = int32(r0) + if n == -1 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) { + r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0) + if r0 != 0 { + errcode = syscall.Errno(r0) + } + return +} + +func GetACP() (acp uint32) { + r0, _, _ := syscall.Syscall(procGetACP.Addr(), 0, 0, 0, 0) + acp = uint32(r0) + return +} + +func MultiByteToWideChar(codePage uint32, dwFlags uint32, str *byte, nstr int32, wchar *uint16, nwchar int32) (nwrite int32, err error) { + r0, _, e1 := syscall.Syscall6(procMultiByteToWideChar.Addr(), 6, uintptr(codePage), uintptr(dwFlags), uintptr(unsafe.Pointer(str)), uintptr(nstr), uintptr(unsafe.Pointer(wchar)), uintptr(nwchar)) + nwrite = int32(r0) + if nwrite == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func TranslateName(accName *uint16, accNameFormat uint32, desiredNameFormat uint32, translatedName *uint16, nSize *uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procTranslateNameW.Addr(), 5, uintptr(unsafe.Pointer(accName)), uintptr(accNameFormat), uintptr(desiredNameFormat), uintptr(unsafe.Pointer(translatedName)), uintptr(unsafe.Pointer(nSize)), 0) + if r1&0xff == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetUserNameEx(nameFormat uint32, nameBuffre *uint16, nSize *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetUserNameExW.Addr(), 3, uintptr(nameFormat), uintptr(unsafe.Pointer(nameBuffre)), uintptr(unsafe.Pointer(nSize))) + if r1&0xff == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func NetUserGetInfo(serverName *uint16, userName *uint16, level uint32, buf **byte) (neterr error) { + r0, _, _ := syscall.Syscall6(procNetUserGetInfo.Addr(), 4, uintptr(unsafe.Pointer(serverName)), uintptr(unsafe.Pointer(userName)), uintptr(level), uintptr(unsafe.Pointer(buf)), 0, 0) + if r0 != 0 { + neterr = syscall.Errno(r0) + } + return +} + +func NetGetJoinInformation(server *uint16, name **uint16, bufType *uint32) (neterr error) { + r0, _, _ := syscall.Syscall(procNetGetJoinInformation.Addr(), 3, uintptr(unsafe.Pointer(server)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(bufType))) + if r0 != 0 { + neterr = syscall.Errno(r0) + } + return +} + +func NetApiBufferFree(buf *byte) (neterr error) { + r0, _, _ := syscall.Syscall(procNetApiBufferFree.Addr(), 1, uintptr(unsafe.Pointer(buf)), 0, 0) + if r0 != 0 { + neterr = syscall.Errno(r0) + } + return +} + +func LookupAccountSid(systemName *uint16, sid *SID, name *uint16, nameLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) { + r1, _, e1 := syscall.Syscall9(procLookupAccountSidW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func LookupAccountName(systemName *uint16, accountName *uint16, sid *SID, sidLen *uint32, refdDomainName *uint16, refdDomainNameLen *uint32, use *uint32) (err error) { + r1, _, e1 := syscall.Syscall9(procLookupAccountNameW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidLen)), uintptr(unsafe.Pointer(refdDomainName)), uintptr(unsafe.Pointer(refdDomainNameLen)), uintptr(unsafe.Pointer(use)), 0, 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ConvertSidToStringSid(sid *SID, stringSid **uint16) (err error) { + r1, _, e1 := syscall.Syscall(procConvertSidToStringSidW.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(stringSid)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func ConvertStringSidToSid(stringSid *uint16, sid **SID) (err error) { + r1, _, e1 := syscall.Syscall(procConvertStringSidToSidW.Addr(), 2, uintptr(unsafe.Pointer(stringSid)), uintptr(unsafe.Pointer(sid)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetLengthSid(sid *SID) (len uint32) { + r0, _, _ := syscall.Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) + len = uint32(r0) + return +} + +func CopySid(destSidLen uint32, destSid *SID, srcSid *SID) (err error) { + r1, _, e1 := syscall.Syscall(procCopySid.Addr(), 3, uintptr(destSidLen), uintptr(unsafe.Pointer(destSid)), uintptr(unsafe.Pointer(srcSid))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func AllocateAndInitializeSid(identAuth *SidIdentifierAuthority, subAuth byte, subAuth0 uint32, subAuth1 uint32, subAuth2 uint32, subAuth3 uint32, subAuth4 uint32, subAuth5 uint32, subAuth6 uint32, subAuth7 uint32, sid **SID) (err error) { + r1, _, e1 := syscall.Syscall12(procAllocateAndInitializeSid.Addr(), 11, uintptr(unsafe.Pointer(identAuth)), uintptr(subAuth), uintptr(subAuth0), uintptr(subAuth1), uintptr(subAuth2), uintptr(subAuth3), uintptr(subAuth4), uintptr(subAuth5), uintptr(subAuth6), uintptr(subAuth7), uintptr(unsafe.Pointer(sid)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func FreeSid(sid *SID) (err error) { + r1, _, e1 := syscall.Syscall(procFreeSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) + if r1 != 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func EqualSid(sid1 *SID, sid2 *SID) (isEqual bool) { + r0, _, _ := syscall.Syscall(procEqualSid.Addr(), 2, uintptr(unsafe.Pointer(sid1)), uintptr(unsafe.Pointer(sid2)), 0) + isEqual = r0 != 0 + return +} + +func OpenProcessToken(h Handle, access uint32, token *Token) (err error) { + r1, _, e1 := syscall.Syscall(procOpenProcessToken.Addr(), 3, uintptr(h), uintptr(access), uintptr(unsafe.Pointer(token))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetTokenInformation(t Token, infoClass uint32, info *byte, infoLen uint32, returnedLen *uint32) (err error) { + r1, _, e1 := syscall.Syscall6(procGetTokenInformation.Addr(), 5, uintptr(t), uintptr(infoClass), uintptr(unsafe.Pointer(info)), uintptr(infoLen), uintptr(unsafe.Pointer(returnedLen)), 0) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} + +func GetUserProfileDirectory(t Token, dir *uint16, dirLen *uint32) (err error) { + r1, _, e1 := syscall.Syscall(procGetUserProfileDirectoryW.Addr(), 3, uintptr(t), uintptr(unsafe.Pointer(dir)), uintptr(unsafe.Pointer(dirLen))) + if r1 == 0 { + if e1 != 0 { + err = error(e1) + } else { + err = syscall.EINVAL + } + } + return +} diff --git a/vendor/golang.org/x/sys/windows/ztypes_windows.go b/vendor/golang.org/x/sys/windows/ztypes_windows.go new file mode 100644 index 000000000..1fe19d1d7 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/ztypes_windows.go @@ -0,0 +1,1242 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package windows + +import "syscall" + +const ( + // Windows errors. + ERROR_FILE_NOT_FOUND syscall.Errno = 2 + ERROR_PATH_NOT_FOUND syscall.Errno = 3 + ERROR_ACCESS_DENIED syscall.Errno = 5 + ERROR_NO_MORE_FILES syscall.Errno = 18 + ERROR_HANDLE_EOF syscall.Errno = 38 + ERROR_NETNAME_DELETED syscall.Errno = 64 + ERROR_FILE_EXISTS syscall.Errno = 80 + ERROR_BROKEN_PIPE syscall.Errno = 109 + ERROR_BUFFER_OVERFLOW syscall.Errno = 111 + ERROR_INSUFFICIENT_BUFFER syscall.Errno = 122 + ERROR_MOD_NOT_FOUND syscall.Errno = 126 + ERROR_PROC_NOT_FOUND syscall.Errno = 127 + ERROR_ALREADY_EXISTS syscall.Errno = 183 + ERROR_ENVVAR_NOT_FOUND syscall.Errno = 203 + ERROR_MORE_DATA syscall.Errno = 234 + ERROR_OPERATION_ABORTED syscall.Errno = 995 + ERROR_IO_PENDING syscall.Errno = 997 + ERROR_SERVICE_SPECIFIC_ERROR syscall.Errno = 1066 + ERROR_NOT_FOUND syscall.Errno = 1168 + ERROR_PRIVILEGE_NOT_HELD syscall.Errno = 1314 + WSAEACCES syscall.Errno = 10013 + WSAECONNRESET syscall.Errno = 10054 +) + +const ( + // Invented values to support what package os expects. + O_RDONLY = 0x00000 + O_WRONLY = 0x00001 + O_RDWR = 0x00002 + O_CREAT = 0x00040 + O_EXCL = 0x00080 + O_NOCTTY = 0x00100 + O_TRUNC = 0x00200 + O_NONBLOCK = 0x00800 + O_APPEND = 0x00400 + O_SYNC = 0x01000 + O_ASYNC = 0x02000 + O_CLOEXEC = 0x80000 +) + +const ( + // More invented values for signals + SIGHUP = Signal(0x1) + SIGINT = Signal(0x2) + SIGQUIT = Signal(0x3) + SIGILL = Signal(0x4) + SIGTRAP = Signal(0x5) + SIGABRT = Signal(0x6) + SIGBUS = Signal(0x7) + SIGFPE = Signal(0x8) + SIGKILL = Signal(0x9) + SIGSEGV = Signal(0xb) + SIGPIPE = Signal(0xd) + SIGALRM = Signal(0xe) + SIGTERM = Signal(0xf) +) + +var signals = [...]string{ + 1: "hangup", + 2: "interrupt", + 3: "quit", + 4: "illegal instruction", + 5: "trace/breakpoint trap", + 6: "aborted", + 7: "bus error", + 8: "floating point exception", + 9: "killed", + 10: "user defined signal 1", + 11: "segmentation fault", + 12: "user defined signal 2", + 13: "broken pipe", + 14: "alarm clock", + 15: "terminated", +} + +const ( + GENERIC_READ = 0x80000000 + GENERIC_WRITE = 0x40000000 + GENERIC_EXECUTE = 0x20000000 + GENERIC_ALL = 0x10000000 + + FILE_LIST_DIRECTORY = 0x00000001 + FILE_APPEND_DATA = 0x00000004 + FILE_WRITE_ATTRIBUTES = 0x00000100 + + FILE_SHARE_READ = 0x00000001 + FILE_SHARE_WRITE = 0x00000002 + FILE_SHARE_DELETE = 0x00000004 + FILE_ATTRIBUTE_READONLY = 0x00000001 + FILE_ATTRIBUTE_HIDDEN = 0x00000002 + FILE_ATTRIBUTE_SYSTEM = 0x00000004 + FILE_ATTRIBUTE_DIRECTORY = 0x00000010 + FILE_ATTRIBUTE_ARCHIVE = 0x00000020 + FILE_ATTRIBUTE_NORMAL = 0x00000080 + FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400 + + INVALID_FILE_ATTRIBUTES = 0xffffffff + + CREATE_NEW = 1 + CREATE_ALWAYS = 2 + OPEN_EXISTING = 3 + OPEN_ALWAYS = 4 + TRUNCATE_EXISTING = 5 + + FILE_FLAG_OPEN_REPARSE_POINT = 0x00200000 + FILE_FLAG_BACKUP_SEMANTICS = 0x02000000 + FILE_FLAG_OVERLAPPED = 0x40000000 + + HANDLE_FLAG_INHERIT = 0x00000001 + STARTF_USESTDHANDLES = 0x00000100 + STARTF_USESHOWWINDOW = 0x00000001 + DUPLICATE_CLOSE_SOURCE = 0x00000001 + DUPLICATE_SAME_ACCESS = 0x00000002 + + STD_INPUT_HANDLE = -10 + STD_OUTPUT_HANDLE = -11 + STD_ERROR_HANDLE = -12 + + FILE_BEGIN = 0 + FILE_CURRENT = 1 + FILE_END = 2 + + LANG_ENGLISH = 0x09 + SUBLANG_ENGLISH_US = 0x01 + + FORMAT_MESSAGE_ALLOCATE_BUFFER = 256 + FORMAT_MESSAGE_IGNORE_INSERTS = 512 + FORMAT_MESSAGE_FROM_STRING = 1024 + FORMAT_MESSAGE_FROM_HMODULE = 2048 + FORMAT_MESSAGE_FROM_SYSTEM = 4096 + FORMAT_MESSAGE_ARGUMENT_ARRAY = 8192 + FORMAT_MESSAGE_MAX_WIDTH_MASK = 255 + + MAX_PATH = 260 + MAX_LONG_PATH = 32768 + + MAX_COMPUTERNAME_LENGTH = 15 + + TIME_ZONE_ID_UNKNOWN = 0 + TIME_ZONE_ID_STANDARD = 1 + + TIME_ZONE_ID_DAYLIGHT = 2 + IGNORE = 0 + INFINITE = 0xffffffff + + WAIT_TIMEOUT = 258 + WAIT_ABANDONED = 0x00000080 + WAIT_OBJECT_0 = 0x00000000 + WAIT_FAILED = 0xFFFFFFFF + + CREATE_NEW_PROCESS_GROUP = 0x00000200 + CREATE_UNICODE_ENVIRONMENT = 0x00000400 + + PROCESS_TERMINATE = 1 + PROCESS_QUERY_INFORMATION = 0x00000400 + SYNCHRONIZE = 0x00100000 + + PAGE_READONLY = 0x02 + PAGE_READWRITE = 0x04 + PAGE_WRITECOPY = 0x08 + PAGE_EXECUTE_READ = 0x20 + PAGE_EXECUTE_READWRITE = 0x40 + PAGE_EXECUTE_WRITECOPY = 0x80 + + FILE_MAP_COPY = 0x01 + FILE_MAP_WRITE = 0x02 + FILE_MAP_READ = 0x04 + FILE_MAP_EXECUTE = 0x20 + + CTRL_C_EVENT = 0 + CTRL_BREAK_EVENT = 1 + + // Windows reserves errors >= 1<<29 for application use. + APPLICATION_ERROR = 1 << 29 +) + +const ( + // flags for CreateToolhelp32Snapshot + TH32CS_SNAPHEAPLIST = 0x01 + TH32CS_SNAPPROCESS = 0x02 + TH32CS_SNAPTHREAD = 0x04 + TH32CS_SNAPMODULE = 0x08 + TH32CS_SNAPMODULE32 = 0x10 + TH32CS_SNAPALL = TH32CS_SNAPHEAPLIST | TH32CS_SNAPMODULE | TH32CS_SNAPPROCESS | TH32CS_SNAPTHREAD + TH32CS_INHERIT = 0x80000000 +) + +const ( + // filters for ReadDirectoryChangesW + FILE_NOTIFY_CHANGE_FILE_NAME = 0x001 + FILE_NOTIFY_CHANGE_DIR_NAME = 0x002 + FILE_NOTIFY_CHANGE_ATTRIBUTES = 0x004 + FILE_NOTIFY_CHANGE_SIZE = 0x008 + FILE_NOTIFY_CHANGE_LAST_WRITE = 0x010 + FILE_NOTIFY_CHANGE_LAST_ACCESS = 0x020 + FILE_NOTIFY_CHANGE_CREATION = 0x040 + FILE_NOTIFY_CHANGE_SECURITY = 0x100 +) + +const ( + // do not reorder + FILE_ACTION_ADDED = iota + 1 + FILE_ACTION_REMOVED + FILE_ACTION_MODIFIED + FILE_ACTION_RENAMED_OLD_NAME + FILE_ACTION_RENAMED_NEW_NAME +) + +const ( + // wincrypt.h + PROV_RSA_FULL = 1 + PROV_RSA_SIG = 2 + PROV_DSS = 3 + PROV_FORTEZZA = 4 + PROV_MS_EXCHANGE = 5 + PROV_SSL = 6 + PROV_RSA_SCHANNEL = 12 + PROV_DSS_DH = 13 + PROV_EC_ECDSA_SIG = 14 + PROV_EC_ECNRA_SIG = 15 + PROV_EC_ECDSA_FULL = 16 + PROV_EC_ECNRA_FULL = 17 + PROV_DH_SCHANNEL = 18 + PROV_SPYRUS_LYNKS = 20 + PROV_RNG = 21 + PROV_INTEL_SEC = 22 + PROV_REPLACE_OWF = 23 + PROV_RSA_AES = 24 + CRYPT_VERIFYCONTEXT = 0xF0000000 + CRYPT_NEWKEYSET = 0x00000008 + CRYPT_DELETEKEYSET = 0x00000010 + CRYPT_MACHINE_KEYSET = 0x00000020 + CRYPT_SILENT = 0x00000040 + CRYPT_DEFAULT_CONTAINER_OPTIONAL = 0x00000080 + + USAGE_MATCH_TYPE_AND = 0 + USAGE_MATCH_TYPE_OR = 1 + + X509_ASN_ENCODING = 0x00000001 + PKCS_7_ASN_ENCODING = 0x00010000 + + CERT_STORE_PROV_MEMORY = 2 + + CERT_STORE_ADD_ALWAYS = 4 + + CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG = 0x00000004 + + CERT_TRUST_NO_ERROR = 0x00000000 + CERT_TRUST_IS_NOT_TIME_VALID = 0x00000001 + CERT_TRUST_IS_REVOKED = 0x00000004 + CERT_TRUST_IS_NOT_SIGNATURE_VALID = 0x00000008 + CERT_TRUST_IS_NOT_VALID_FOR_USAGE = 0x00000010 + CERT_TRUST_IS_UNTRUSTED_ROOT = 0x00000020 + CERT_TRUST_REVOCATION_STATUS_UNKNOWN = 0x00000040 + CERT_TRUST_IS_CYCLIC = 0x00000080 + CERT_TRUST_INVALID_EXTENSION = 0x00000100 + CERT_TRUST_INVALID_POLICY_CONSTRAINTS = 0x00000200 + CERT_TRUST_INVALID_BASIC_CONSTRAINTS = 0x00000400 + CERT_TRUST_INVALID_NAME_CONSTRAINTS = 0x00000800 + CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT = 0x00001000 + CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT = 0x00002000 + CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT = 0x00004000 + CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT = 0x00008000 + CERT_TRUST_IS_OFFLINE_REVOCATION = 0x01000000 + CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY = 0x02000000 + CERT_TRUST_IS_EXPLICIT_DISTRUST = 0x04000000 + CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT = 0x08000000 + + CERT_CHAIN_POLICY_BASE = 1 + CERT_CHAIN_POLICY_AUTHENTICODE = 2 + CERT_CHAIN_POLICY_AUTHENTICODE_TS = 3 + CERT_CHAIN_POLICY_SSL = 4 + CERT_CHAIN_POLICY_BASIC_CONSTRAINTS = 5 + CERT_CHAIN_POLICY_NT_AUTH = 6 + CERT_CHAIN_POLICY_MICROSOFT_ROOT = 7 + CERT_CHAIN_POLICY_EV = 8 + + CERT_E_EXPIRED = 0x800B0101 + CERT_E_ROLE = 0x800B0103 + CERT_E_PURPOSE = 0x800B0106 + CERT_E_UNTRUSTEDROOT = 0x800B0109 + CERT_E_CN_NO_MATCH = 0x800B010F + + AUTHTYPE_CLIENT = 1 + AUTHTYPE_SERVER = 2 +) + +var ( + OID_PKIX_KP_SERVER_AUTH = []byte("1.3.6.1.5.5.7.3.1\x00") + OID_SERVER_GATED_CRYPTO = []byte("1.3.6.1.4.1.311.10.3.3\x00") + OID_SGC_NETSCAPE = []byte("2.16.840.1.113730.4.1\x00") +) + +// Invented values to support what package os expects. +type Timeval struct { + Sec int32 + Usec int32 +} + +func (tv *Timeval) Nanoseconds() int64 { + return (int64(tv.Sec)*1e6 + int64(tv.Usec)) * 1e3 +} + +func NsecToTimeval(nsec int64) (tv Timeval) { + tv.Sec = int32(nsec / 1e9) + tv.Usec = int32(nsec % 1e9 / 1e3) + return +} + +type SecurityAttributes struct { + Length uint32 + SecurityDescriptor uintptr + InheritHandle uint32 +} + +type Overlapped struct { + Internal uintptr + InternalHigh uintptr + Offset uint32 + OffsetHigh uint32 + HEvent Handle +} + +type FileNotifyInformation struct { + NextEntryOffset uint32 + Action uint32 + FileNameLength uint32 + FileName uint16 +} + +type Filetime struct { + LowDateTime uint32 + HighDateTime uint32 +} + +// Nanoseconds returns Filetime ft in nanoseconds +// since Epoch (00:00:00 UTC, January 1, 1970). +func (ft *Filetime) Nanoseconds() int64 { + // 100-nanosecond intervals since January 1, 1601 + nsec := int64(ft.HighDateTime)<<32 + int64(ft.LowDateTime) + // change starting time to the Epoch (00:00:00 UTC, January 1, 1970) + nsec -= 116444736000000000 + // convert into nanoseconds + nsec *= 100 + return nsec +} + +func NsecToFiletime(nsec int64) (ft Filetime) { + // convert into 100-nanosecond + nsec /= 100 + // change starting time to January 1, 1601 + nsec += 116444736000000000 + // split into high / low + ft.LowDateTime = uint32(nsec & 0xffffffff) + ft.HighDateTime = uint32(nsec >> 32 & 0xffffffff) + return ft +} + +type Win32finddata struct { + FileAttributes uint32 + CreationTime Filetime + LastAccessTime Filetime + LastWriteTime Filetime + FileSizeHigh uint32 + FileSizeLow uint32 + Reserved0 uint32 + Reserved1 uint32 + FileName [MAX_PATH - 1]uint16 + AlternateFileName [13]uint16 +} + +// This is the actual system call structure. +// Win32finddata is what we committed to in Go 1. +type win32finddata1 struct { + FileAttributes uint32 + CreationTime Filetime + LastAccessTime Filetime + LastWriteTime Filetime + FileSizeHigh uint32 + FileSizeLow uint32 + Reserved0 uint32 + Reserved1 uint32 + FileName [MAX_PATH]uint16 + AlternateFileName [14]uint16 +} + +func copyFindData(dst *Win32finddata, src *win32finddata1) { + dst.FileAttributes = src.FileAttributes + dst.CreationTime = src.CreationTime + dst.LastAccessTime = src.LastAccessTime + dst.LastWriteTime = src.LastWriteTime + dst.FileSizeHigh = src.FileSizeHigh + dst.FileSizeLow = src.FileSizeLow + dst.Reserved0 = src.Reserved0 + dst.Reserved1 = src.Reserved1 + + // The src is 1 element bigger than dst, but it must be NUL. + copy(dst.FileName[:], src.FileName[:]) + copy(dst.AlternateFileName[:], src.AlternateFileName[:]) +} + +type ByHandleFileInformation struct { + FileAttributes uint32 + CreationTime Filetime + LastAccessTime Filetime + LastWriteTime Filetime + VolumeSerialNumber uint32 + FileSizeHigh uint32 + FileSizeLow uint32 + NumberOfLinks uint32 + FileIndexHigh uint32 + FileIndexLow uint32 +} + +const ( + GetFileExInfoStandard = 0 + GetFileExMaxInfoLevel = 1 +) + +type Win32FileAttributeData struct { + FileAttributes uint32 + CreationTime Filetime + LastAccessTime Filetime + LastWriteTime Filetime + FileSizeHigh uint32 + FileSizeLow uint32 +} + +// ShowWindow constants +const ( + // winuser.h + SW_HIDE = 0 + SW_NORMAL = 1 + SW_SHOWNORMAL = 1 + SW_SHOWMINIMIZED = 2 + SW_SHOWMAXIMIZED = 3 + SW_MAXIMIZE = 3 + SW_SHOWNOACTIVATE = 4 + SW_SHOW = 5 + SW_MINIMIZE = 6 + SW_SHOWMINNOACTIVE = 7 + SW_SHOWNA = 8 + SW_RESTORE = 9 + SW_SHOWDEFAULT = 10 + SW_FORCEMINIMIZE = 11 +) + +type StartupInfo struct { + Cb uint32 + _ *uint16 + Desktop *uint16 + Title *uint16 + X uint32 + Y uint32 + XSize uint32 + YSize uint32 + XCountChars uint32 + YCountChars uint32 + FillAttribute uint32 + Flags uint32 + ShowWindow uint16 + _ uint16 + _ *byte + StdInput Handle + StdOutput Handle + StdErr Handle +} + +type ProcessInformation struct { + Process Handle + Thread Handle + ProcessId uint32 + ThreadId uint32 +} + +type ProcessEntry32 struct { + Size uint32 + Usage uint32 + ProcessID uint32 + DefaultHeapID uintptr + ModuleID uint32 + Threads uint32 + ParentProcessID uint32 + PriClassBase int32 + Flags uint32 + ExeFile [MAX_PATH]uint16 +} + +type Systemtime struct { + Year uint16 + Month uint16 + DayOfWeek uint16 + Day uint16 + Hour uint16 + Minute uint16 + Second uint16 + Milliseconds uint16 +} + +type Timezoneinformation struct { + Bias int32 + StandardName [32]uint16 + StandardDate Systemtime + StandardBias int32 + DaylightName [32]uint16 + DaylightDate Systemtime + DaylightBias int32 +} + +// Socket related. + +const ( + AF_UNSPEC = 0 + AF_UNIX = 1 + AF_INET = 2 + AF_INET6 = 23 + AF_NETBIOS = 17 + + SOCK_STREAM = 1 + SOCK_DGRAM = 2 + SOCK_RAW = 3 + SOCK_SEQPACKET = 5 + + IPPROTO_IP = 0 + IPPROTO_IPV6 = 0x29 + IPPROTO_TCP = 6 + IPPROTO_UDP = 17 + + SOL_SOCKET = 0xffff + SO_REUSEADDR = 4 + SO_KEEPALIVE = 8 + SO_DONTROUTE = 16 + SO_BROADCAST = 32 + SO_LINGER = 128 + SO_RCVBUF = 0x1002 + SO_SNDBUF = 0x1001 + SO_UPDATE_ACCEPT_CONTEXT = 0x700b + SO_UPDATE_CONNECT_CONTEXT = 0x7010 + + IOC_OUT = 0x40000000 + IOC_IN = 0x80000000 + IOC_VENDOR = 0x18000000 + IOC_INOUT = IOC_IN | IOC_OUT + IOC_WS2 = 0x08000000 + SIO_GET_EXTENSION_FUNCTION_POINTER = IOC_INOUT | IOC_WS2 | 6 + SIO_KEEPALIVE_VALS = IOC_IN | IOC_VENDOR | 4 + SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12 + + // cf. http://support.microsoft.com/default.aspx?scid=kb;en-us;257460 + + IP_TOS = 0x3 + IP_TTL = 0x4 + IP_MULTICAST_IF = 0x9 + IP_MULTICAST_TTL = 0xa + IP_MULTICAST_LOOP = 0xb + IP_ADD_MEMBERSHIP = 0xc + IP_DROP_MEMBERSHIP = 0xd + + IPV6_V6ONLY = 0x1b + IPV6_UNICAST_HOPS = 0x4 + IPV6_MULTICAST_IF = 0x9 + IPV6_MULTICAST_HOPS = 0xa + IPV6_MULTICAST_LOOP = 0xb + IPV6_JOIN_GROUP = 0xc + IPV6_LEAVE_GROUP = 0xd + + SOMAXCONN = 0x7fffffff + + TCP_NODELAY = 1 + + SHUT_RD = 0 + SHUT_WR = 1 + SHUT_RDWR = 2 + + WSADESCRIPTION_LEN = 256 + WSASYS_STATUS_LEN = 128 +) + +type WSABuf struct { + Len uint32 + Buf *byte +} + +// Invented values to support what package os expects. +const ( + S_IFMT = 0x1f000 + S_IFIFO = 0x1000 + S_IFCHR = 0x2000 + S_IFDIR = 0x4000 + S_IFBLK = 0x6000 + S_IFREG = 0x8000 + S_IFLNK = 0xa000 + S_IFSOCK = 0xc000 + S_ISUID = 0x800 + S_ISGID = 0x400 + S_ISVTX = 0x200 + S_IRUSR = 0x100 + S_IWRITE = 0x80 + S_IWUSR = 0x80 + S_IXUSR = 0x40 +) + +const ( + FILE_TYPE_CHAR = 0x0002 + FILE_TYPE_DISK = 0x0001 + FILE_TYPE_PIPE = 0x0003 + FILE_TYPE_REMOTE = 0x8000 + FILE_TYPE_UNKNOWN = 0x0000 +) + +type Hostent struct { + Name *byte + Aliases **byte + AddrType uint16 + Length uint16 + AddrList **byte +} + +type Protoent struct { + Name *byte + Aliases **byte + Proto uint16 +} + +const ( + DNS_TYPE_A = 0x0001 + DNS_TYPE_NS = 0x0002 + DNS_TYPE_MD = 0x0003 + DNS_TYPE_MF = 0x0004 + DNS_TYPE_CNAME = 0x0005 + DNS_TYPE_SOA = 0x0006 + DNS_TYPE_MB = 0x0007 + DNS_TYPE_MG = 0x0008 + DNS_TYPE_MR = 0x0009 + DNS_TYPE_NULL = 0x000a + DNS_TYPE_WKS = 0x000b + DNS_TYPE_PTR = 0x000c + DNS_TYPE_HINFO = 0x000d + DNS_TYPE_MINFO = 0x000e + DNS_TYPE_MX = 0x000f + DNS_TYPE_TEXT = 0x0010 + DNS_TYPE_RP = 0x0011 + DNS_TYPE_AFSDB = 0x0012 + DNS_TYPE_X25 = 0x0013 + DNS_TYPE_ISDN = 0x0014 + DNS_TYPE_RT = 0x0015 + DNS_TYPE_NSAP = 0x0016 + DNS_TYPE_NSAPPTR = 0x0017 + DNS_TYPE_SIG = 0x0018 + DNS_TYPE_KEY = 0x0019 + DNS_TYPE_PX = 0x001a + DNS_TYPE_GPOS = 0x001b + DNS_TYPE_AAAA = 0x001c + DNS_TYPE_LOC = 0x001d + DNS_TYPE_NXT = 0x001e + DNS_TYPE_EID = 0x001f + DNS_TYPE_NIMLOC = 0x0020 + DNS_TYPE_SRV = 0x0021 + DNS_TYPE_ATMA = 0x0022 + DNS_TYPE_NAPTR = 0x0023 + DNS_TYPE_KX = 0x0024 + DNS_TYPE_CERT = 0x0025 + DNS_TYPE_A6 = 0x0026 + DNS_TYPE_DNAME = 0x0027 + DNS_TYPE_SINK = 0x0028 + DNS_TYPE_OPT = 0x0029 + DNS_TYPE_DS = 0x002B + DNS_TYPE_RRSIG = 0x002E + DNS_TYPE_NSEC = 0x002F + DNS_TYPE_DNSKEY = 0x0030 + DNS_TYPE_DHCID = 0x0031 + DNS_TYPE_UINFO = 0x0064 + DNS_TYPE_UID = 0x0065 + DNS_TYPE_GID = 0x0066 + DNS_TYPE_UNSPEC = 0x0067 + DNS_TYPE_ADDRS = 0x00f8 + DNS_TYPE_TKEY = 0x00f9 + DNS_TYPE_TSIG = 0x00fa + DNS_TYPE_IXFR = 0x00fb + DNS_TYPE_AXFR = 0x00fc + DNS_TYPE_MAILB = 0x00fd + DNS_TYPE_MAILA = 0x00fe + DNS_TYPE_ALL = 0x00ff + DNS_TYPE_ANY = 0x00ff + DNS_TYPE_WINS = 0xff01 + DNS_TYPE_WINSR = 0xff02 + DNS_TYPE_NBSTAT = 0xff01 +) + +const ( + DNS_INFO_NO_RECORDS = 0x251D +) + +const ( + // flags inside DNSRecord.Dw + DnsSectionQuestion = 0x0000 + DnsSectionAnswer = 0x0001 + DnsSectionAuthority = 0x0002 + DnsSectionAdditional = 0x0003 +) + +type DNSSRVData struct { + Target *uint16 + Priority uint16 + Weight uint16 + Port uint16 + Pad uint16 +} + +type DNSPTRData struct { + Host *uint16 +} + +type DNSMXData struct { + NameExchange *uint16 + Preference uint16 + Pad uint16 +} + +type DNSTXTData struct { + StringCount uint16 + StringArray [1]*uint16 +} + +type DNSRecord struct { + Next *DNSRecord + Name *uint16 + Type uint16 + Length uint16 + Dw uint32 + Ttl uint32 + Reserved uint32 + Data [40]byte +} + +const ( + TF_DISCONNECT = 1 + TF_REUSE_SOCKET = 2 + TF_WRITE_BEHIND = 4 + TF_USE_DEFAULT_WORKER = 0 + TF_USE_SYSTEM_THREAD = 16 + TF_USE_KERNEL_APC = 32 +) + +type TransmitFileBuffers struct { + Head uintptr + HeadLength uint32 + Tail uintptr + TailLength uint32 +} + +const ( + IFF_UP = 1 + IFF_BROADCAST = 2 + IFF_LOOPBACK = 4 + IFF_POINTTOPOINT = 8 + IFF_MULTICAST = 16 +) + +const SIO_GET_INTERFACE_LIST = 0x4004747F + +// TODO(mattn): SockaddrGen is union of sockaddr/sockaddr_in/sockaddr_in6_old. +// will be fixed to change variable type as suitable. + +type SockaddrGen [24]byte + +type InterfaceInfo struct { + Flags uint32 + Address SockaddrGen + BroadcastAddress SockaddrGen + Netmask SockaddrGen +} + +type IpAddressString struct { + String [16]byte +} + +type IpMaskString IpAddressString + +type IpAddrString struct { + Next *IpAddrString + IpAddress IpAddressString + IpMask IpMaskString + Context uint32 +} + +const MAX_ADAPTER_NAME_LENGTH = 256 +const MAX_ADAPTER_DESCRIPTION_LENGTH = 128 +const MAX_ADAPTER_ADDRESS_LENGTH = 8 + +type IpAdapterInfo struct { + Next *IpAdapterInfo + ComboIndex uint32 + AdapterName [MAX_ADAPTER_NAME_LENGTH + 4]byte + Description [MAX_ADAPTER_DESCRIPTION_LENGTH + 4]byte + AddressLength uint32 + Address [MAX_ADAPTER_ADDRESS_LENGTH]byte + Index uint32 + Type uint32 + DhcpEnabled uint32 + CurrentIpAddress *IpAddrString + IpAddressList IpAddrString + GatewayList IpAddrString + DhcpServer IpAddrString + HaveWins bool + PrimaryWinsServer IpAddrString + SecondaryWinsServer IpAddrString + LeaseObtained int64 + LeaseExpires int64 +} + +const MAXLEN_PHYSADDR = 8 +const MAX_INTERFACE_NAME_LEN = 256 +const MAXLEN_IFDESCR = 256 + +type MibIfRow struct { + Name [MAX_INTERFACE_NAME_LEN]uint16 + Index uint32 + Type uint32 + Mtu uint32 + Speed uint32 + PhysAddrLen uint32 + PhysAddr [MAXLEN_PHYSADDR]byte + AdminStatus uint32 + OperStatus uint32 + LastChange uint32 + InOctets uint32 + InUcastPkts uint32 + InNUcastPkts uint32 + InDiscards uint32 + InErrors uint32 + InUnknownProtos uint32 + OutOctets uint32 + OutUcastPkts uint32 + OutNUcastPkts uint32 + OutDiscards uint32 + OutErrors uint32 + OutQLen uint32 + DescrLen uint32 + Descr [MAXLEN_IFDESCR]byte +} + +type CertContext struct { + EncodingType uint32 + EncodedCert *byte + Length uint32 + CertInfo uintptr + Store Handle +} + +type CertChainContext struct { + Size uint32 + TrustStatus CertTrustStatus + ChainCount uint32 + Chains **CertSimpleChain + LowerQualityChainCount uint32 + LowerQualityChains **CertChainContext + HasRevocationFreshnessTime uint32 + RevocationFreshnessTime uint32 +} + +type CertSimpleChain struct { + Size uint32 + TrustStatus CertTrustStatus + NumElements uint32 + Elements **CertChainElement + TrustListInfo uintptr + HasRevocationFreshnessTime uint32 + RevocationFreshnessTime uint32 +} + +type CertChainElement struct { + Size uint32 + CertContext *CertContext + TrustStatus CertTrustStatus + RevocationInfo *CertRevocationInfo + IssuanceUsage *CertEnhKeyUsage + ApplicationUsage *CertEnhKeyUsage + ExtendedErrorInfo *uint16 +} + +type CertRevocationInfo struct { + Size uint32 + RevocationResult uint32 + RevocationOid *byte + OidSpecificInfo uintptr + HasFreshnessTime uint32 + FreshnessTime uint32 + CrlInfo uintptr // *CertRevocationCrlInfo +} + +type CertTrustStatus struct { + ErrorStatus uint32 + InfoStatus uint32 +} + +type CertUsageMatch struct { + Type uint32 + Usage CertEnhKeyUsage +} + +type CertEnhKeyUsage struct { + Length uint32 + UsageIdentifiers **byte +} + +type CertChainPara struct { + Size uint32 + RequestedUsage CertUsageMatch + RequstedIssuancePolicy CertUsageMatch + URLRetrievalTimeout uint32 + CheckRevocationFreshnessTime uint32 + RevocationFreshnessTime uint32 + CacheResync *Filetime +} + +type CertChainPolicyPara struct { + Size uint32 + Flags uint32 + ExtraPolicyPara uintptr +} + +type SSLExtraCertChainPolicyPara struct { + Size uint32 + AuthType uint32 + Checks uint32 + ServerName *uint16 +} + +type CertChainPolicyStatus struct { + Size uint32 + Error uint32 + ChainIndex uint32 + ElementIndex uint32 + ExtraPolicyStatus uintptr +} + +const ( + // do not reorder + HKEY_CLASSES_ROOT = 0x80000000 + iota + HKEY_CURRENT_USER + HKEY_LOCAL_MACHINE + HKEY_USERS + HKEY_PERFORMANCE_DATA + HKEY_CURRENT_CONFIG + HKEY_DYN_DATA + + KEY_QUERY_VALUE = 1 + KEY_SET_VALUE = 2 + KEY_CREATE_SUB_KEY = 4 + KEY_ENUMERATE_SUB_KEYS = 8 + KEY_NOTIFY = 16 + KEY_CREATE_LINK = 32 + KEY_WRITE = 0x20006 + KEY_EXECUTE = 0x20019 + KEY_READ = 0x20019 + KEY_WOW64_64KEY = 0x0100 + KEY_WOW64_32KEY = 0x0200 + KEY_ALL_ACCESS = 0xf003f +) + +const ( + // do not reorder + REG_NONE = iota + REG_SZ + REG_EXPAND_SZ + REG_BINARY + REG_DWORD_LITTLE_ENDIAN + REG_DWORD_BIG_ENDIAN + REG_LINK + REG_MULTI_SZ + REG_RESOURCE_LIST + REG_FULL_RESOURCE_DESCRIPTOR + REG_RESOURCE_REQUIREMENTS_LIST + REG_QWORD_LITTLE_ENDIAN + REG_DWORD = REG_DWORD_LITTLE_ENDIAN + REG_QWORD = REG_QWORD_LITTLE_ENDIAN +) + +type AddrinfoW struct { + Flags int32 + Family int32 + Socktype int32 + Protocol int32 + Addrlen uintptr + Canonname *uint16 + Addr uintptr + Next *AddrinfoW +} + +const ( + AI_PASSIVE = 1 + AI_CANONNAME = 2 + AI_NUMERICHOST = 4 +) + +type GUID struct { + Data1 uint32 + Data2 uint16 + Data3 uint16 + Data4 [8]byte +} + +var WSAID_CONNECTEX = GUID{ + 0x25a207b9, + 0xddf3, + 0x4660, + [8]byte{0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e}, +} + +const ( + FILE_SKIP_COMPLETION_PORT_ON_SUCCESS = 1 + FILE_SKIP_SET_EVENT_ON_HANDLE = 2 +) + +const ( + WSAPROTOCOL_LEN = 255 + MAX_PROTOCOL_CHAIN = 7 + BASE_PROTOCOL = 1 + LAYERED_PROTOCOL = 0 + + XP1_CONNECTIONLESS = 0x00000001 + XP1_GUARANTEED_DELIVERY = 0x00000002 + XP1_GUARANTEED_ORDER = 0x00000004 + XP1_MESSAGE_ORIENTED = 0x00000008 + XP1_PSEUDO_STREAM = 0x00000010 + XP1_GRACEFUL_CLOSE = 0x00000020 + XP1_EXPEDITED_DATA = 0x00000040 + XP1_CONNECT_DATA = 0x00000080 + XP1_DISCONNECT_DATA = 0x00000100 + XP1_SUPPORT_BROADCAST = 0x00000200 + XP1_SUPPORT_MULTIPOINT = 0x00000400 + XP1_MULTIPOINT_CONTROL_PLANE = 0x00000800 + XP1_MULTIPOINT_DATA_PLANE = 0x00001000 + XP1_QOS_SUPPORTED = 0x00002000 + XP1_UNI_SEND = 0x00008000 + XP1_UNI_RECV = 0x00010000 + XP1_IFS_HANDLES = 0x00020000 + XP1_PARTIAL_MESSAGE = 0x00040000 + XP1_SAN_SUPPORT_SDP = 0x00080000 + + PFL_MULTIPLE_PROTO_ENTRIES = 0x00000001 + PFL_RECOMMENDED_PROTO_ENTRY = 0x00000002 + PFL_HIDDEN = 0x00000004 + PFL_MATCHES_PROTOCOL_ZERO = 0x00000008 + PFL_NETWORKDIRECT_PROVIDER = 0x00000010 +) + +type WSAProtocolInfo struct { + ServiceFlags1 uint32 + ServiceFlags2 uint32 + ServiceFlags3 uint32 + ServiceFlags4 uint32 + ProviderFlags uint32 + ProviderId GUID + CatalogEntryId uint32 + ProtocolChain WSAProtocolChain + Version int32 + AddressFamily int32 + MaxSockAddr int32 + MinSockAddr int32 + SocketType int32 + Protocol int32 + ProtocolMaxOffset int32 + NetworkByteOrder int32 + SecurityScheme int32 + MessageSize uint32 + ProviderReserved uint32 + ProtocolName [WSAPROTOCOL_LEN + 1]uint16 +} + +type WSAProtocolChain struct { + ChainLen int32 + ChainEntries [MAX_PROTOCOL_CHAIN]uint32 +} + +type TCPKeepalive struct { + OnOff uint32 + Time uint32 + Interval uint32 +} + +type symbolicLinkReparseBuffer struct { + SubstituteNameOffset uint16 + SubstituteNameLength uint16 + PrintNameOffset uint16 + PrintNameLength uint16 + Flags uint32 + PathBuffer [1]uint16 +} + +type mountPointReparseBuffer struct { + SubstituteNameOffset uint16 + SubstituteNameLength uint16 + PrintNameOffset uint16 + PrintNameLength uint16 + PathBuffer [1]uint16 +} + +type reparseDataBuffer struct { + ReparseTag uint32 + ReparseDataLength uint16 + Reserved uint16 + + // GenericReparseBuffer + reparseBuffer byte +} + +const ( + FSCTL_GET_REPARSE_POINT = 0x900A8 + MAXIMUM_REPARSE_DATA_BUFFER_SIZE = 16 * 1024 + IO_REPARSE_TAG_MOUNT_POINT = 0xA0000003 + IO_REPARSE_TAG_SYMLINK = 0xA000000C + SYMBOLIC_LINK_FLAG_DIRECTORY = 0x1 +) + +const ( + ComputerNameNetBIOS = 0 + ComputerNameDnsHostname = 1 + ComputerNameDnsDomain = 2 + ComputerNameDnsFullyQualified = 3 + ComputerNamePhysicalNetBIOS = 4 + ComputerNamePhysicalDnsHostname = 5 + ComputerNamePhysicalDnsDomain = 6 + ComputerNamePhysicalDnsFullyQualified = 7 + ComputerNameMax = 8 +) + +const ( + MOVEFILE_REPLACE_EXISTING = 0x1 + MOVEFILE_COPY_ALLOWED = 0x2 + MOVEFILE_DELAY_UNTIL_REBOOT = 0x4 + MOVEFILE_WRITE_THROUGH = 0x8 + MOVEFILE_CREATE_HARDLINK = 0x10 + MOVEFILE_FAIL_IF_NOT_TRACKABLE = 0x20 +) + +const GAA_FLAG_INCLUDE_PREFIX = 0x00000010 + +const ( + IF_TYPE_OTHER = 1 + IF_TYPE_ETHERNET_CSMACD = 6 + IF_TYPE_ISO88025_TOKENRING = 9 + IF_TYPE_PPP = 23 + IF_TYPE_SOFTWARE_LOOPBACK = 24 + IF_TYPE_ATM = 37 + IF_TYPE_IEEE80211 = 71 + IF_TYPE_TUNNEL = 131 + IF_TYPE_IEEE1394 = 144 +) + +type SocketAddress struct { + Sockaddr *syscall.RawSockaddrAny + SockaddrLength int32 +} + +type IpAdapterUnicastAddress struct { + Length uint32 + Flags uint32 + Next *IpAdapterUnicastAddress + Address SocketAddress + PrefixOrigin int32 + SuffixOrigin int32 + DadState int32 + ValidLifetime uint32 + PreferredLifetime uint32 + LeaseLifetime uint32 + OnLinkPrefixLength uint8 +} + +type IpAdapterAnycastAddress struct { + Length uint32 + Flags uint32 + Next *IpAdapterAnycastAddress + Address SocketAddress +} + +type IpAdapterMulticastAddress struct { + Length uint32 + Flags uint32 + Next *IpAdapterMulticastAddress + Address SocketAddress +} + +type IpAdapterDnsServerAdapter struct { + Length uint32 + Reserved uint32 + Next *IpAdapterDnsServerAdapter + Address SocketAddress +} + +type IpAdapterPrefix struct { + Length uint32 + Flags uint32 + Next *IpAdapterPrefix + Address SocketAddress + PrefixLength uint32 +} + +type IpAdapterAddresses struct { + Length uint32 + IfIndex uint32 + Next *IpAdapterAddresses + AdapterName *byte + FirstUnicastAddress *IpAdapterUnicastAddress + FirstAnycastAddress *IpAdapterAnycastAddress + FirstMulticastAddress *IpAdapterMulticastAddress + FirstDnsServerAddress *IpAdapterDnsServerAdapter + DnsSuffix *uint16 + Description *uint16 + FriendlyName *uint16 + PhysicalAddress [syscall.MAX_ADAPTER_ADDRESS_LENGTH]byte + PhysicalAddressLength uint32 + Flags uint32 + Mtu uint32 + IfType uint32 + OperStatus uint32 + Ipv6IfIndex uint32 + ZoneIndices [16]uint32 + FirstPrefix *IpAdapterPrefix + /* more fields might be present here. */ +} + +const ( + IfOperStatusUp = 1 + IfOperStatusDown = 2 + IfOperStatusTesting = 3 + IfOperStatusUnknown = 4 + IfOperStatusDormant = 5 + IfOperStatusNotPresent = 6 + IfOperStatusLowerLayerDown = 7 +) diff --git a/vendor/golang.org/x/sys/windows/ztypes_windows_386.go b/vendor/golang.org/x/sys/windows/ztypes_windows_386.go new file mode 100644 index 000000000..10f33be0b --- /dev/null +++ b/vendor/golang.org/x/sys/windows/ztypes_windows_386.go @@ -0,0 +1,22 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package windows + +type WSAData struct { + Version uint16 + HighVersion uint16 + Description [WSADESCRIPTION_LEN + 1]byte + SystemStatus [WSASYS_STATUS_LEN + 1]byte + MaxSockets uint16 + MaxUdpDg uint16 + VendorInfo *byte +} + +type Servent struct { + Name *byte + Aliases **byte + Port uint16 + Proto *byte +} diff --git a/vendor/golang.org/x/sys/windows/ztypes_windows_amd64.go b/vendor/golang.org/x/sys/windows/ztypes_windows_amd64.go new file mode 100644 index 000000000..3f272c249 --- /dev/null +++ b/vendor/golang.org/x/sys/windows/ztypes_windows_amd64.go @@ -0,0 +1,22 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package windows + +type WSAData struct { + Version uint16 + HighVersion uint16 + MaxSockets uint16 + MaxUdpDg uint16 + VendorInfo *byte + Description [WSADESCRIPTION_LEN + 1]byte + SystemStatus [WSASYS_STATUS_LEN + 1]byte +} + +type Servent struct { + Name *byte + Aliases **byte + Proto *byte + Port uint16 +} diff --git a/vendor/gopkg.in/alexcesaro/quotedprintable.v3/LICENSE b/vendor/gopkg.in/alexcesaro/quotedprintable.v3/LICENSE new file mode 100644 index 000000000..5f5c12af7 --- /dev/null +++ b/vendor/gopkg.in/alexcesaro/quotedprintable.v3/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2014 Alexandre Cesaro + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/gopkg.in/alexcesaro/quotedprintable.v3/README.md b/vendor/gopkg.in/alexcesaro/quotedprintable.v3/README.md new file mode 100644 index 000000000..98ddf829f --- /dev/null +++ b/vendor/gopkg.in/alexcesaro/quotedprintable.v3/README.md @@ -0,0 +1,16 @@ +# quotedprintable + +## Introduction + +Package quotedprintable implements quoted-printable and message header encoding +as specified by RFC 2045 and RFC 2047. + +It is a copy of the Go 1.5 package `mime/quotedprintable`. It also includes +the new functions of package `mime` concerning RFC 2047. + +This code has minor changes with the standard library code in order to work +with Go 1.0 and newer. + +## Documentation + +https://godoc.org/gopkg.in/alexcesaro/quotedprintable.v3 diff --git a/vendor/gopkg.in/alexcesaro/quotedprintable.v3/encodedword.go b/vendor/gopkg.in/alexcesaro/quotedprintable.v3/encodedword.go new file mode 100644 index 000000000..cfd02617c --- /dev/null +++ b/vendor/gopkg.in/alexcesaro/quotedprintable.v3/encodedword.go @@ -0,0 +1,279 @@ +package quotedprintable + +import ( + "bytes" + "encoding/base64" + "errors" + "fmt" + "io" + "strings" + "unicode" + "unicode/utf8" +) + +// A WordEncoder is a RFC 2047 encoded-word encoder. +type WordEncoder byte + +const ( + // BEncoding represents Base64 encoding scheme as defined by RFC 2045. + BEncoding = WordEncoder('b') + // QEncoding represents the Q-encoding scheme as defined by RFC 2047. + QEncoding = WordEncoder('q') +) + +var ( + errInvalidWord = errors.New("mime: invalid RFC 2047 encoded-word") +) + +// Encode returns the encoded-word form of s. If s is ASCII without special +// characters, it is returned unchanged. The provided charset is the IANA +// charset name of s. It is case insensitive. +func (e WordEncoder) Encode(charset, s string) string { + if !needsEncoding(s) { + return s + } + return e.encodeWord(charset, s) +} + +func needsEncoding(s string) bool { + for _, b := range s { + if (b < ' ' || b > '~') && b != '\t' { + return true + } + } + return false +} + +// encodeWord encodes a string into an encoded-word. +func (e WordEncoder) encodeWord(charset, s string) string { + buf := getBuffer() + defer putBuffer(buf) + + buf.WriteString("=?") + buf.WriteString(charset) + buf.WriteByte('?') + buf.WriteByte(byte(e)) + buf.WriteByte('?') + + if e == BEncoding { + w := base64.NewEncoder(base64.StdEncoding, buf) + io.WriteString(w, s) + w.Close() + } else { + enc := make([]byte, 3) + for i := 0; i < len(s); i++ { + b := s[i] + switch { + case b == ' ': + buf.WriteByte('_') + case b <= '~' && b >= '!' && b != '=' && b != '?' && b != '_': + buf.WriteByte(b) + default: + enc[0] = '=' + enc[1] = upperhex[b>>4] + enc[2] = upperhex[b&0x0f] + buf.Write(enc) + } + } + } + buf.WriteString("?=") + return buf.String() +} + +const upperhex = "0123456789ABCDEF" + +// A WordDecoder decodes MIME headers containing RFC 2047 encoded-words. +type WordDecoder struct { + // CharsetReader, if non-nil, defines a function to generate + // charset-conversion readers, converting from the provided + // charset into UTF-8. + // Charsets are always lower-case. utf-8, iso-8859-1 and us-ascii charsets + // are handled by default. + // One of the the CharsetReader's result values must be non-nil. + CharsetReader func(charset string, input io.Reader) (io.Reader, error) +} + +// Decode decodes an encoded-word. If word is not a valid RFC 2047 encoded-word, +// word is returned unchanged. +func (d *WordDecoder) Decode(word string) (string, error) { + fields := strings.Split(word, "?") // TODO: remove allocation? + if len(fields) != 5 || fields[0] != "=" || fields[4] != "=" || len(fields[2]) != 1 { + return "", errInvalidWord + } + + content, err := decode(fields[2][0], fields[3]) + if err != nil { + return "", err + } + + buf := getBuffer() + defer putBuffer(buf) + + if err := d.convert(buf, fields[1], content); err != nil { + return "", err + } + + return buf.String(), nil +} + +// DecodeHeader decodes all encoded-words of the given string. It returns an +// error if and only if CharsetReader of d returns an error. +func (d *WordDecoder) DecodeHeader(header string) (string, error) { + // If there is no encoded-word, returns before creating a buffer. + i := strings.Index(header, "=?") + if i == -1 { + return header, nil + } + + buf := getBuffer() + defer putBuffer(buf) + + buf.WriteString(header[:i]) + header = header[i:] + + betweenWords := false + for { + start := strings.Index(header, "=?") + if start == -1 { + break + } + cur := start + len("=?") + + i := strings.Index(header[cur:], "?") + if i == -1 { + break + } + charset := header[cur : cur+i] + cur += i + len("?") + + if len(header) < cur+len("Q??=") { + break + } + encoding := header[cur] + cur++ + + if header[cur] != '?' { + break + } + cur++ + + j := strings.Index(header[cur:], "?=") + if j == -1 { + break + } + text := header[cur : cur+j] + end := cur + j + len("?=") + + content, err := decode(encoding, text) + if err != nil { + betweenWords = false + buf.WriteString(header[:start+2]) + header = header[start+2:] + continue + } + + // Write characters before the encoded-word. White-space and newline + // characters separating two encoded-words must be deleted. + if start > 0 && (!betweenWords || hasNonWhitespace(header[:start])) { + buf.WriteString(header[:start]) + } + + if err := d.convert(buf, charset, content); err != nil { + return "", err + } + + header = header[end:] + betweenWords = true + } + + if len(header) > 0 { + buf.WriteString(header) + } + + return buf.String(), nil +} + +func decode(encoding byte, text string) ([]byte, error) { + switch encoding { + case 'B', 'b': + return base64.StdEncoding.DecodeString(text) + case 'Q', 'q': + return qDecode(text) + } + return nil, errInvalidWord +} + +func (d *WordDecoder) convert(buf *bytes.Buffer, charset string, content []byte) error { + switch { + case strings.EqualFold("utf-8", charset): + buf.Write(content) + case strings.EqualFold("iso-8859-1", charset): + for _, c := range content { + buf.WriteRune(rune(c)) + } + case strings.EqualFold("us-ascii", charset): + for _, c := range content { + if c >= utf8.RuneSelf { + buf.WriteRune(unicode.ReplacementChar) + } else { + buf.WriteByte(c) + } + } + default: + if d.CharsetReader == nil { + return fmt.Errorf("mime: unhandled charset %q", charset) + } + r, err := d.CharsetReader(strings.ToLower(charset), bytes.NewReader(content)) + if err != nil { + return err + } + if _, err = buf.ReadFrom(r); err != nil { + return err + } + } + return nil +} + +// hasNonWhitespace reports whether s (assumed to be ASCII) contains at least +// one byte of non-whitespace. +func hasNonWhitespace(s string) bool { + for _, b := range s { + switch b { + // Encoded-words can only be separated by linear white spaces which does + // not include vertical tabs (\v). + case ' ', '\t', '\n', '\r': + default: + return true + } + } + return false +} + +// qDecode decodes a Q encoded string. +func qDecode(s string) ([]byte, error) { + dec := make([]byte, len(s)) + n := 0 + for i := 0; i < len(s); i++ { + switch c := s[i]; { + case c == '_': + dec[n] = ' ' + case c == '=': + if i+2 >= len(s) { + return nil, errInvalidWord + } + b, err := readHexByte(s[i+1], s[i+2]) + if err != nil { + return nil, err + } + dec[n] = b + i += 2 + case (c <= '~' && c >= ' ') || c == '\n' || c == '\r' || c == '\t': + dec[n] = c + default: + return nil, errInvalidWord + } + n++ + } + + return dec[:n], nil +} diff --git a/vendor/gopkg.in/alexcesaro/quotedprintable.v3/pool.go b/vendor/gopkg.in/alexcesaro/quotedprintable.v3/pool.go new file mode 100644 index 000000000..24283c52f --- /dev/null +++ b/vendor/gopkg.in/alexcesaro/quotedprintable.v3/pool.go @@ -0,0 +1,26 @@ +// +build go1.3 + +package quotedprintable + +import ( + "bytes" + "sync" +) + +var bufPool = sync.Pool{ + New: func() interface{} { + return new(bytes.Buffer) + }, +} + +func getBuffer() *bytes.Buffer { + return bufPool.Get().(*bytes.Buffer) +} + +func putBuffer(buf *bytes.Buffer) { + if buf.Len() > 1024 { + return + } + buf.Reset() + bufPool.Put(buf) +} diff --git a/vendor/gopkg.in/alexcesaro/quotedprintable.v3/pool_go12.go b/vendor/gopkg.in/alexcesaro/quotedprintable.v3/pool_go12.go new file mode 100644 index 000000000..d335b4ab5 --- /dev/null +++ b/vendor/gopkg.in/alexcesaro/quotedprintable.v3/pool_go12.go @@ -0,0 +1,24 @@ +// +build !go1.3 + +package quotedprintable + +import "bytes" + +var ch = make(chan *bytes.Buffer, 32) + +func getBuffer() *bytes.Buffer { + select { + case buf := <-ch: + return buf + default: + } + return new(bytes.Buffer) +} + +func putBuffer(buf *bytes.Buffer) { + buf.Reset() + select { + case ch <- buf: + default: + } +} diff --git a/vendor/gopkg.in/alexcesaro/quotedprintable.v3/reader.go b/vendor/gopkg.in/alexcesaro/quotedprintable.v3/reader.go new file mode 100644 index 000000000..955edca29 --- /dev/null +++ b/vendor/gopkg.in/alexcesaro/quotedprintable.v3/reader.go @@ -0,0 +1,121 @@ +// Package quotedprintable implements quoted-printable encoding as specified by +// RFC 2045. +package quotedprintable + +import ( + "bufio" + "bytes" + "fmt" + "io" +) + +// Reader is a quoted-printable decoder. +type Reader struct { + br *bufio.Reader + rerr error // last read error + line []byte // to be consumed before more of br +} + +// NewReader returns a quoted-printable reader, decoding from r. +func NewReader(r io.Reader) *Reader { + return &Reader{ + br: bufio.NewReader(r), + } +} + +func fromHex(b byte) (byte, error) { + switch { + case b >= '0' && b <= '9': + return b - '0', nil + case b >= 'A' && b <= 'F': + return b - 'A' + 10, nil + // Accept badly encoded bytes. + case b >= 'a' && b <= 'f': + return b - 'a' + 10, nil + } + return 0, fmt.Errorf("quotedprintable: invalid hex byte 0x%02x", b) +} + +func readHexByte(a, b byte) (byte, error) { + var hb, lb byte + var err error + if hb, err = fromHex(a); err != nil { + return 0, err + } + if lb, err = fromHex(b); err != nil { + return 0, err + } + return hb<<4 | lb, nil +} + +func isQPDiscardWhitespace(r rune) bool { + switch r { + case '\n', '\r', ' ', '\t': + return true + } + return false +} + +var ( + crlf = []byte("\r\n") + lf = []byte("\n") + softSuffix = []byte("=") +) + +// Read reads and decodes quoted-printable data from the underlying reader. +func (r *Reader) Read(p []byte) (n int, err error) { + // Deviations from RFC 2045: + // 1. in addition to "=\r\n", "=\n" is also treated as soft line break. + // 2. it will pass through a '\r' or '\n' not preceded by '=', consistent + // with other broken QP encoders & decoders. + for len(p) > 0 { + if len(r.line) == 0 { + if r.rerr != nil { + return n, r.rerr + } + r.line, r.rerr = r.br.ReadSlice('\n') + + // Does the line end in CRLF instead of just LF? + hasLF := bytes.HasSuffix(r.line, lf) + hasCR := bytes.HasSuffix(r.line, crlf) + wholeLine := r.line + r.line = bytes.TrimRightFunc(wholeLine, isQPDiscardWhitespace) + if bytes.HasSuffix(r.line, softSuffix) { + rightStripped := wholeLine[len(r.line):] + r.line = r.line[:len(r.line)-1] + if !bytes.HasPrefix(rightStripped, lf) && !bytes.HasPrefix(rightStripped, crlf) { + r.rerr = fmt.Errorf("quotedprintable: invalid bytes after =: %q", rightStripped) + } + } else if hasLF { + if hasCR { + r.line = append(r.line, '\r', '\n') + } else { + r.line = append(r.line, '\n') + } + } + continue + } + b := r.line[0] + + switch { + case b == '=': + if len(r.line[1:]) < 2 { + return n, io.ErrUnexpectedEOF + } + b, err = readHexByte(r.line[1], r.line[2]) + if err != nil { + return n, err + } + r.line = r.line[2:] // 2 of the 3; other 1 is done below + case b == '\t' || b == '\r' || b == '\n': + break + case b < ' ' || b > '~': + return n, fmt.Errorf("quotedprintable: invalid unescaped byte 0x%02x in body", b) + } + p[0] = b + p = p[1:] + r.line = r.line[1:] + n++ + } + return n, nil +} diff --git a/vendor/gopkg.in/alexcesaro/quotedprintable.v3/writer.go b/vendor/gopkg.in/alexcesaro/quotedprintable.v3/writer.go new file mode 100644 index 000000000..43359d51d --- /dev/null +++ b/vendor/gopkg.in/alexcesaro/quotedprintable.v3/writer.go @@ -0,0 +1,166 @@ +package quotedprintable + +import "io" + +const lineMaxLen = 76 + +// A Writer is a quoted-printable writer that implements io.WriteCloser. +type Writer struct { + // Binary mode treats the writer's input as pure binary and processes end of + // line bytes as binary data. + Binary bool + + w io.Writer + i int + line [78]byte + cr bool +} + +// NewWriter returns a new Writer that writes to w. +func NewWriter(w io.Writer) *Writer { + return &Writer{w: w} +} + +// Write encodes p using quoted-printable encoding and writes it to the +// underlying io.Writer. It limits line length to 76 characters. The encoded +// bytes are not necessarily flushed until the Writer is closed. +func (w *Writer) Write(p []byte) (n int, err error) { + for i, b := range p { + switch { + // Simple writes are done in batch. + case b >= '!' && b <= '~' && b != '=': + continue + case isWhitespace(b) || !w.Binary && (b == '\n' || b == '\r'): + continue + } + + if i > n { + if err := w.write(p[n:i]); err != nil { + return n, err + } + n = i + } + + if err := w.encode(b); err != nil { + return n, err + } + n++ + } + + if n == len(p) { + return n, nil + } + + if err := w.write(p[n:]); err != nil { + return n, err + } + + return len(p), nil +} + +// Close closes the Writer, flushing any unwritten data to the underlying +// io.Writer, but does not close the underlying io.Writer. +func (w *Writer) Close() error { + if err := w.checkLastByte(); err != nil { + return err + } + + return w.flush() +} + +// write limits text encoded in quoted-printable to 76 characters per line. +func (w *Writer) write(p []byte) error { + for _, b := range p { + if b == '\n' || b == '\r' { + // If the previous byte was \r, the CRLF has already been inserted. + if w.cr && b == '\n' { + w.cr = false + continue + } + + if b == '\r' { + w.cr = true + } + + if err := w.checkLastByte(); err != nil { + return err + } + if err := w.insertCRLF(); err != nil { + return err + } + continue + } + + if w.i == lineMaxLen-1 { + if err := w.insertSoftLineBreak(); err != nil { + return err + } + } + + w.line[w.i] = b + w.i++ + w.cr = false + } + + return nil +} + +func (w *Writer) encode(b byte) error { + if lineMaxLen-1-w.i < 3 { + if err := w.insertSoftLineBreak(); err != nil { + return err + } + } + + w.line[w.i] = '=' + w.line[w.i+1] = upperhex[b>>4] + w.line[w.i+2] = upperhex[b&0x0f] + w.i += 3 + + return nil +} + +// checkLastByte encodes the last buffered byte if it is a space or a tab. +func (w *Writer) checkLastByte() error { + if w.i == 0 { + return nil + } + + b := w.line[w.i-1] + if isWhitespace(b) { + w.i-- + if err := w.encode(b); err != nil { + return err + } + } + + return nil +} + +func (w *Writer) insertSoftLineBreak() error { + w.line[w.i] = '=' + w.i++ + + return w.insertCRLF() +} + +func (w *Writer) insertCRLF() error { + w.line[w.i] = '\r' + w.line[w.i+1] = '\n' + w.i += 2 + + return w.flush() +} + +func (w *Writer) flush() error { + if _, err := w.w.Write(w.line[:w.i]); err != nil { + return err + } + + w.i = 0 + return nil +} + +func isWhitespace(b byte) bool { + return b == ' ' || b == '\t' +} diff --git a/vendor/vendor.json b/vendor/vendor.json index e9b1d68e7..1c1b0acdf 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -44,18 +44,48 @@ "revision": "7748a72e01415173a27d79866b984328e7b0c12b", "revisionTime": "2015-11-04T15:16:17Z" }, + { + "checksumSHA1": "JQCb0Qb3kl18te1fq+2volRoqIs=", + "path": "github.com/boltdb/bolt", + "revision": "831b652a7f8dbefaf94da0eb66abd46c0c4bcf23", + "revisionTime": "2016-03-26T03:18:27Z" + }, { "checksumSHA1": "fNAC4qgZDqF3kxq74/yyk3PWdy8=", "path": "github.com/bradfitz/gomemcache/memcache", "revision": "fb1f79c6b65acda83063cbc69f6bba1522558bfc", "revisionTime": "2016-01-17T19:21:50Z" }, + { + "checksumSHA1": "agNqSytP0indDCoGizlMyC1L/m4=", + "path": "github.com/coreos/etcd/error", + "revision": "01c303113d0a3d5a8075864321c3aedb72035bdd", + "revisionTime": "2016-04-05T06:22:04Z" + }, + { + "checksumSHA1": "BJXHEdzHxRPmVnt6GFaPpwgns2c=", + "path": "github.com/coreos/go-etcd/etcd", + "revision": "003851be7bb0694fe3cc457a49529a19388ee7cf", + "revisionTime": "2015-10-26T16:03:18Z" + }, { "checksumSHA1": "Lf3uUXTkKK5DJ37BxQvxO1Fq+K8=", "path": "github.com/davecgh/go-spew/spew", "revision": "976c720a22c8eb4eb6a0b4348ad85ad12491a506", "revisionTime": "2016-09-25T22:06:09Z" }, + { + "checksumSHA1": "5ftkjfUwI9A6xCQ1PwIAd5+qlo0=", + "path": "github.com/elazarl/go-bindata-assetfs", + "revision": "57eb5e1fc594ad4b0b1dbea7b286d299e0cb43c2", + "revisionTime": "2015-12-24T04:54:52Z" + }, + { + "checksumSHA1": "qTJizMr1DBhDTZiRNmC+khEClz8=", + "path": "github.com/go-macaron/bindata", + "revision": "de74a053830c7d338bf209adf3b711c969f63e59", + "revisionTime": "2016-01-05T04:39:20Z" + }, { "checksumSHA1": "qM/kf31cT2cxjtHxdzbu8q8jPq0=", "path": "github.com/go-macaron/binding", @@ -146,6 +176,12 @@ "revision": "2ec3936f8a8a3fb6397c6c10185acffa87488534", "revisionTime": "2016-11-01T01:36:51Z" }, + { + "checksumSHA1": "k52lEKLp8j5M+jFpe+3u+bIFpxQ=", + "path": "github.com/go-xorm/tidb", + "revision": "21e49190ce47a766fa741cf7edc831a30c12c6ac", + "revisionTime": "2016-08-11T02:11:45Z" + }, { "checksumSHA1": "eOdqyQnmqdF0VZpBgYoOaYQDaiw=", "path": "github.com/go-xorm/xorm", @@ -164,6 +200,24 @@ "revision": "7f3990acf1833faa5ebd0e86f0a4c72a4b5eba3c", "revisionTime": "2016-08-10T03:50:02Z" }, + { + "checksumSHA1": "s2E4fYDL3LeDZAnuN4+WNNsQxxk=", + "path": "github.com/golang/protobuf/proto", + "revision": "99511271042a09d1e01baea8781caa5210fec66e", + "revisionTime": "2016-03-10T10:13:00Z" + }, + { + "checksumSHA1": "imgdbnirk7WG7YBw06DJOKRabcY=", + "path": "github.com/golang/snappy", + "revision": "5f1c01d9f64b941dd9582c638279d046eda6ca31", + "revisionTime": "2016-03-04T05:48:22Z" + }, + { + "checksumSHA1": "P3zGmsNjW8m15a+nks4FdVpFKwE=", + "path": "github.com/gopherjs/gopherjs/js", + "revision": "e34a5cd6a1bc7c4fde759f2d3039852fc68b5fcc", + "revisionTime": "2016-10-31T10:43:57Z" + }, { "checksumSHA1": "MLO0PyrK2MUO6A7Z9PxWuu43C/A=", "path": "github.com/issue9/identicon", @@ -182,6 +236,12 @@ "revision": "8ddce2a84170772b95dd5d576c48d517b22cac63", "revisionTime": "2016-01-05T22:08:40Z" }, + { + "checksumSHA1": "KIX/3RadQkfl4ZxCmOQ01vAGLEI=", + "path": "github.com/juju/errors", + "revision": "b2c7a7da5b2995941048f60146e67702a292e468", + "revisionTime": "2016-02-12T04:00:40Z" + }, { "checksumSHA1": "/dBJ2h8Jo359deiC5GQ8ZYzX8M8=", "path": "github.com/kardianos/minwinsvc", @@ -254,6 +314,384 @@ "revision": "891127d8d1b52734debe1b3c3d7e747502b6c366", "revisionTime": "2016-07-24T20:39:20Z" }, + { + "checksumSHA1": "4cpSC3uJq4CtHRajz3PViPLVmWg=", + "path": "github.com/ngaut/deadline", + "revision": "fae8f9dfd7048de16575b9d4c255278e38c28a4f", + "revisionTime": "2015-03-02T04:54:50Z" + }, + { + "checksumSHA1": "GttQuSOlzAuI0YkJIqrWBvSjopA=", + "path": "github.com/ngaut/go-zookeeper/zk", + "revision": "9c3719e318c7cfd072e41eb48cb71fcaa49d5e05", + "revisionTime": "2015-08-13T08:49:40Z" + }, + { + "checksumSHA1": "wLXFUHpjYiigLxib/vQZ6RcMM34=", + "path": "github.com/ngaut/log", + "revision": "37d3e0f43b4fe05429e1adb75e835bf31fc1bba6", + "revisionTime": "2015-09-18T08:53:30Z" + }, + { + "checksumSHA1": "EcKjGj2rrdhMK90WMmP5gGwGQt8=", + "path": "github.com/ngaut/pools", + "revision": "6352e005618615ffaf1cb1c6622b8e91435751fe", + "revisionTime": "2014-10-08T03:39:41Z" + }, + { + "checksumSHA1": "zv8kksmkpeXWGoSJHidIP0l0+s4=", + "path": "github.com/ngaut/sync2", + "revision": "7a24ed77b2efb460c1468b7dc917821c66e80e55", + "revisionTime": "2014-10-08T03:26:47Z" + }, + { + "checksumSHA1": "LlUAzt+dtyU2OvilawmNJiC9qNU=", + "path": "github.com/ngaut/tso/client", + "revision": "118f6c141d58f1e72577ff61f43f649bf39355ee", + "revisionTime": "2016-02-25T05:19:56Z" + }, + { + "checksumSHA1": "31RuOu1tSyA//xxngSG9UQl11NU=", + "path": "github.com/ngaut/tso/proto", + "revision": "118f6c141d58f1e72577ff61f43f649bf39355ee", + "revisionTime": "2016-02-25T05:19:56Z" + }, + { + "checksumSHA1": "K0mzAqLI1FgUo6pkNvChI6KuCmI=", + "path": "github.com/ngaut/tso/util", + "revision": "118f6c141d58f1e72577ff61f43f649bf39355ee", + "revisionTime": "2016-02-25T05:19:56Z" + }, + { + "checksumSHA1": "L5QR3db40M2adRm1AGTyq9KIEVw=", + "path": "github.com/ngaut/zkhelper", + "revision": "6738bdc138d469112c6687fbfcfe049ccabd6a0a", + "revisionTime": "2015-12-22T12:59:12Z" + }, + { + "checksumSHA1": "Hc7LMQrHR71kkSsd/P/SBdiC258=", + "path": "github.com/petar/GoLLRB/llrb", + "revision": "53be0d36a84c2a886ca057d34b6aa4468df9ccb4", + "revisionTime": "2013-04-27T21:51:48Z" + }, + { + "checksumSHA1": "gFLdPBQU1OSM0/wALEo0qhVDlPM=", + "path": "github.com/pingcap/go-hbase", + "revision": "7a98d1fe4e9e115de8c77ae0e158c0d08732c550", + "revisionTime": "2015-12-22T04:40:48Z" + }, + { + "checksumSHA1": "7nOQMtkwqAjpuZQ1zJ6dSu2Q+/M=", + "path": "github.com/pingcap/go-hbase/iohelper", + "revision": "7a98d1fe4e9e115de8c77ae0e158c0d08732c550", + "revisionTime": "2015-12-22T04:40:48Z" + }, + { + "checksumSHA1": "AObWgg5Tfo21R8qskhffF6+tFYQ=", + "path": "github.com/pingcap/go-hbase/proto", + "revision": "7a98d1fe4e9e115de8c77ae0e158c0d08732c550", + "revisionTime": "2015-12-22T04:40:48Z" + }, + { + "checksumSHA1": "/niVyLhLYQmNhGnB3jbXTmTZhEU=", + "path": "github.com/pingcap/go-themis", + "revision": "dbb996606c1d1fe8571fd9ac6da2254c76d2c5c9", + "revisionTime": "2015-12-31T02:20:52Z" + }, + { + "checksumSHA1": "pmxOXwYT6Pj0DaVKBhXC3VqWE0M=", + "path": "github.com/pingcap/go-themis/oracle", + "revision": "dbb996606c1d1fe8571fd9ac6da2254c76d2c5c9", + "revisionTime": "2015-12-31T02:20:52Z" + }, + { + "checksumSHA1": "nxTRmIJoD2TrG7/g7SguiUba7bc=", + "path": "github.com/pingcap/go-themis/oracle/oracles", + "revision": "dbb996606c1d1fe8571fd9ac6da2254c76d2c5c9", + "revisionTime": "2015-12-31T02:20:52Z" + }, + { + "checksumSHA1": "XHdZUslXzh4sU1CjTejfdc3xFjk=", + "path": "github.com/pingcap/tidb", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "XQ/UZrVoFAH7RVui8JtqSX3sWUs=", + "path": "github.com/pingcap/tidb/ast", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "T7hVZwbE0vpe+feE1H8iAFCZOqE=", + "path": "github.com/pingcap/tidb/column", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "E8U/6vLZXpuzPKFy6TC8ntlaW80=", + "path": "github.com/pingcap/tidb/context", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "IoaRHoKbxUdaeOXqtrZe107cEH0=", + "path": "github.com/pingcap/tidb/ddl", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "J1FSDp+a8A1qHwnb3dt5alf/CDo=", + "path": "github.com/pingcap/tidb/domain", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "cCunloFG3iJpnMXKObOoDKru/fk=", + "path": "github.com/pingcap/tidb/evaluator", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "7DJSqqLJ1HzKJU99PDlm9UOY2Uc=", + "path": "github.com/pingcap/tidb/executor", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "jGB489McolO4pVyt7GEHg+aAiCw=", + "path": "github.com/pingcap/tidb/infoschema", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "lg0mAGEUgHPTXR2M47wxIUzlrG0=", + "path": "github.com/pingcap/tidb/inspectkv", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "9eDMEpiFBsDoYDn4HIATrT9YOmc=", + "path": "github.com/pingcap/tidb/kv", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "DDqBJzeHTASlWe8scuVz3sIqUC0=", + "path": "github.com/pingcap/tidb/kv/memkv", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "wyTHMbYOVkR4FFGJAxusDteFInQ=", + "path": "github.com/pingcap/tidb/meta", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "z7WeiCjR8zbACNI+/x20lekIBQs=", + "path": "github.com/pingcap/tidb/meta/autoid", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "LuT4yuutL7txRdfI0I+t7AIMIBI=", + "path": "github.com/pingcap/tidb/model", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "rF1oX1VNrZ8VRgJGLqrdyhOsfGA=", + "path": "github.com/pingcap/tidb/mysql", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "Ogs+7owzIcSAyQmmbP6mnjfSraM=", + "path": "github.com/pingcap/tidb/optimizer", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "4a2Jdm6O639BOku8Rwb+ojiLdpo=", + "path": "github.com/pingcap/tidb/optimizer/plan", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "lt9OsTqXc3Byy4lQOUeudHMjGZI=", + "path": "github.com/pingcap/tidb/parser", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "N/2YzFSUJRhHHzgyCX/9bro2VnY=", + "path": "github.com/pingcap/tidb/parser/opcode", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "4cOQq7twkcp0yEDorVPBHTkzbE8=", + "path": "github.com/pingcap/tidb/perfschema", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "soVal/Uo1e1KdI2oONwvXlOBZkA=", + "path": "github.com/pingcap/tidb/privilege", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "E2Bdlt+dV3zjB6CLZJPlI3xTRbc=", + "path": "github.com/pingcap/tidb/privilege/privileges", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "eKI3NBXuycHpHrNFklSzl0i4nzg=", + "path": "github.com/pingcap/tidb/sessionctx", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "rLFMnSPqz0Vbx3H7yKjXhu1PWXA=", + "path": "github.com/pingcap/tidb/sessionctx/autocommit", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "vu2oG/KScNo0syCHZwzgVCmnR24=", + "path": "github.com/pingcap/tidb/sessionctx/db", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "sSeAM32hl0VqJhTFNpl34zqYEhE=", + "path": "github.com/pingcap/tidb/sessionctx/forupdate", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "hchtJ0bkOXxOWYBzx2xpyy1Mxu4=", + "path": "github.com/pingcap/tidb/sessionctx/variable", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "3N1oGMkZZyNvCbU06dmwmudeJ/8=", + "path": "github.com/pingcap/tidb/store/hbase", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "mXglyDILDwOazdNYgI9JP/qqyjI=", + "path": "github.com/pingcap/tidb/store/localstore", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "0CHlQj4f4psPVkhNShSNxDyeYjw=", + "path": "github.com/pingcap/tidb/store/localstore/boltdb", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "HyPB6v/w1OOhHa2Teg3tp4a6d3g=", + "path": "github.com/pingcap/tidb/store/localstore/engine", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "9RLeS/sYwSYRMa+YZ42Yza6n7Cw=", + "path": "github.com/pingcap/tidb/store/localstore/goleveldb", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "UsL3aMURlvsG7CoogaYbh31UVGs=", + "path": "github.com/pingcap/tidb/structure", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "xZRhepGoWmw/DXbuFWKa+HlqPHw=", + "path": "github.com/pingcap/tidb/table", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "51Ue+vXkt00+TwRC6xdxBlogicI=", + "path": "github.com/pingcap/tidb/table/tables", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "ud75M8O6PYaZGNwYdibDNbj8n+Q=", + "path": "github.com/pingcap/tidb/terror", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "vLbw6DUx/As5bnvwIxNsvzk1h94=", + "path": "github.com/pingcap/tidb/util", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "JfeSzD0cC1Z61t7o7XuGDiUpzM8=", + "path": "github.com/pingcap/tidb/util/bytes", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "MV+aUCOnj7l6D7XGE8Iu5jsjn6o=", + "path": "github.com/pingcap/tidb/util/charset", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "aa2guzA1Tu6ApJbHpp6O4XB4Tkw=", + "path": "github.com/pingcap/tidb/util/codec", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "B+1M+Nzit8ZKuzDfV2PLFaAMAcs=", + "path": "github.com/pingcap/tidb/util/distinct", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "nUC7zVoAMNR2a+z2iGqHoN2AkFE=", + "path": "github.com/pingcap/tidb/util/hack", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "IqIzpcvQpXRa8w6G1cTZPmQqwXE=", + "path": "github.com/pingcap/tidb/util/segmentmap", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "2sqCtR2kshPusYzkoSbvsmwppMQ=", + "path": "github.com/pingcap/tidb/util/sqlexec", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "EoxSTIUgsQHkWjsMxNYxC/Qx3wM=", + "path": "github.com/pingcap/tidb/util/stringutil", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, + { + "checksumSHA1": "+M+nSTDzFBXtOlKeGkAkHBqng7g=", + "path": "github.com/pingcap/tidb/util/types", + "revision": "33197485abe227dcb254644cf5081c9a3c281669", + "revisionTime": "2016-03-22T02:19:37Z" + }, { "checksumSHA1": "zKKp5SZ3d3ycKe4EKMNT0BqAWBw=", "path": "github.com/pmezard/go-difflib/difflib", @@ -326,6 +764,90 @@ "revision": "976c720a22c8eb4eb6a0b4348ad85ad12491a506", "revisionTime": "2016-09-25T22:06:09Z" }, + { + "checksumSHA1": "MAnxhGyQfhoyoATeT1zJDPyWq7A=", + "path": "github.com/syndtr/goleveldb/leveldb", + "revision": "917f41c560270110ceb73c5b38be2a9127387071", + "revisionTime": "2016-03-11T05:04:36Z" + }, + { + "checksumSHA1": "BX+u3k6if9kZNYYqbL56gC48BAQ=", + "path": "github.com/syndtr/goleveldb/leveldb/cache", + "revision": "917f41c560270110ceb73c5b38be2a9127387071", + "revisionTime": "2016-03-11T05:04:36Z" + }, + { + "checksumSHA1": "5KPgnvCPlR0ysDAqo6jApzRQ3tw=", + "path": "github.com/syndtr/goleveldb/leveldb/comparer", + "revision": "917f41c560270110ceb73c5b38be2a9127387071", + "revisionTime": "2016-03-11T05:04:36Z" + }, + { + "checksumSHA1": "Vpvz4qmbq/kz0SN95yt0tmSI7JE=", + "path": "github.com/syndtr/goleveldb/leveldb/errors", + "revision": "917f41c560270110ceb73c5b38be2a9127387071", + "revisionTime": "2016-03-11T05:04:36Z" + }, + { + "checksumSHA1": "eqKeD6DS7eNCtxVYZEHHRKkyZrw=", + "path": "github.com/syndtr/goleveldb/leveldb/filter", + "revision": "917f41c560270110ceb73c5b38be2a9127387071", + "revisionTime": "2016-03-11T05:04:36Z" + }, + { + "checksumSHA1": "cRn09EwfU3k2ZjvClHYmVFlakRY=", + "path": "github.com/syndtr/goleveldb/leveldb/iterator", + "revision": "917f41c560270110ceb73c5b38be2a9127387071", + "revisionTime": "2016-03-11T05:04:36Z" + }, + { + "checksumSHA1": "CMBbso8ZuG2kBGDL2Blf/wpeheU=", + "path": "github.com/syndtr/goleveldb/leveldb/journal", + "revision": "917f41c560270110ceb73c5b38be2a9127387071", + "revisionTime": "2016-03-11T05:04:36Z" + }, + { + "checksumSHA1": "LshzRv+3spfwuHLepRxiyjf/3sQ=", + "path": "github.com/syndtr/goleveldb/leveldb/memdb", + "revision": "917f41c560270110ceb73c5b38be2a9127387071", + "revisionTime": "2016-03-11T05:04:36Z" + }, + { + "checksumSHA1": "MP/sSiEbzIN5M664sO4r9+dwzV4=", + "path": "github.com/syndtr/goleveldb/leveldb/opt", + "revision": "917f41c560270110ceb73c5b38be2a9127387071", + "revisionTime": "2016-03-11T05:04:36Z" + }, + { + "checksumSHA1": "X+PA6Wrhhy5+nujN1TNOGWtd1RI=", + "path": "github.com/syndtr/goleveldb/leveldb/storage", + "revision": "917f41c560270110ceb73c5b38be2a9127387071", + "revisionTime": "2016-03-11T05:04:36Z" + }, + { + "checksumSHA1": "4EGplyU1Q07vIczP2yZgKvjuYVA=", + "path": "github.com/syndtr/goleveldb/leveldb/table", + "revision": "917f41c560270110ceb73c5b38be2a9127387071", + "revisionTime": "2016-03-11T05:04:36Z" + }, + { + "checksumSHA1": "kgGxCIF5+2SQj2rNVophj4a8jYs=", + "path": "github.com/syndtr/goleveldb/leveldb/util", + "revision": "917f41c560270110ceb73c5b38be2a9127387071", + "revisionTime": "2016-03-11T05:04:36Z" + }, + { + "checksumSHA1": "76U6GiRZsKjr9OWohbsdfKPok/E=", + "path": "github.com/twinj/uuid", + "revision": "89173bcdda19db0eb88aef1e1cb1cb2505561d31", + "revisionTime": "2015-10-29T04:44:42Z" + }, + { + "checksumSHA1": "tHm2SMtuRfrwh6NnnymsuoJ6e0Q=", + "path": "github.com/ugorji/go/codec", + "revision": "c062049c1793b01a3cc3fe786108edabbaf7756b", + "revisionTime": "2016-03-14T17:21:18Z" + }, { "checksumSHA1": "ToTZYDqlvtuFsetAq5FeCwUxp0E=", "path": "github.com/urfave/cli", @@ -374,6 +896,24 @@ "revision": "569280fa63be4e201b975e5411e30a92178f0118", "revisionTime": "2016-11-03T00:14:07Z" }, + { + "checksumSHA1": "8fD/im5Kwvy3JgmxulDTambmE8w=", + "path": "golang.org/x/sys/unix", + "revision": "a646d33e2ee3172a661fc09bca23bb4889a41bc8", + "revisionTime": "2016-07-15T05:43:45Z" + }, + { + "checksumSHA1": "fpW2dhGFC6SrVzipJx7fjg2DIH8=", + "path": "golang.org/x/sys/windows", + "revision": "a646d33e2ee3172a661fc09bca23bb4889a41bc8", + "revisionTime": "2016-07-15T05:43:45Z" + }, + { + "checksumSHA1": "IRqLaXM/VQRzkbXPuiqOxTb2W0Y=", + "path": "golang.org/x/sys/windows/svc", + "revision": "a646d33e2ee3172a661fc09bca23bb4889a41bc8", + "revisionTime": "2016-07-15T05:43:45Z" + }, { "checksumSHA1": "Mr4ur60bgQJnQFfJY0dGtwWwMPE=", "path": "golang.org/x/text/encoding", @@ -464,6 +1004,12 @@ "revision": "a8b38433e35b65ba247bb267317037dee1b70cea", "revisionTime": "2016-10-19T13:35:53Z" }, + { + "checksumSHA1": "6IzzHO9p32aHJhMYMwijccDUIVA=", + "path": "gopkg.in/alexcesaro/quotedprintable.v3", + "revision": "2caba252f4dc53eaf6b553000885530023f54623", + "revisionTime": "2015-07-16T17:19:45Z" + }, { "checksumSHA1": "wSu8owMAP7GixsYoSZ4CmKUVhnU=", "path": "gopkg.in/asn1-ber.v1",